diff --git a/composer.json b/composer.json index 114f449..6ebefff 100644 --- a/composer.json +++ b/composer.json @@ -26,7 +26,6 @@ }, "require-dev": { "fakerphp/faker": "^1.9.1", - "laravel/sail": "^1.0.1", "mockery/mockery": "^1.4.4", "nunomaduro/collision": "^v8.1.1", "pestphp/pest": "^3.4", diff --git a/composer.lock b/composer.lock index d8ff291..f67039f 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "79da62f937f51deb17dc1833f77d8ff5", + "content-hash": "f3c7400a39f89dbc5af59b6a413ff639", "packages": [ { "name": "ajthinking/archetype", @@ -71,16 +71,16 @@ }, { "name": "aws/aws-crt-php", - "version": "v1.2.6", + "version": "v1.2.7", "source": { "type": "git", "url": "https://github.com/awslabs/aws-crt-php.git", - "reference": "a63485b65b6b3367039306496d49737cf1995408" + "reference": "d71d9906c7bb63a28295447ba12e74723bd3730e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/awslabs/aws-crt-php/zipball/a63485b65b6b3367039306496d49737cf1995408", - "reference": "a63485b65b6b3367039306496d49737cf1995408", + "url": "https://api.github.com/repos/awslabs/aws-crt-php/zipball/d71d9906c7bb63a28295447ba12e74723bd3730e", + "reference": "d71d9906c7bb63a28295447ba12e74723bd3730e", "shasum": "" }, "require": { @@ -119,22 +119,22 @@ ], "support": { "issues": "https://github.com/awslabs/aws-crt-php/issues", - "source": "https://github.com/awslabs/aws-crt-php/tree/v1.2.6" + "source": "https://github.com/awslabs/aws-crt-php/tree/v1.2.7" }, - "time": "2024-06-13T17:21:28+00:00" + "time": "2024-10-18T22:15:13+00:00" }, { "name": "aws/aws-sdk-php", - "version": "3.324.6", + "version": "3.324.12", "source": { "type": "git", "url": "https://github.com/aws/aws-sdk-php.git", - "reference": "7412a44da62fd607efbaac4084e69d6621f29de1" + "reference": "c4aea23ee93e4567e353a0f3b907d154056bf4f6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/7412a44da62fd607efbaac4084e69d6621f29de1", - "reference": "7412a44da62fd607efbaac4084e69d6621f29de1", + "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/c4aea23ee93e4567e353a0f3b907d154056bf4f6", + "reference": "c4aea23ee93e4567e353a0f3b907d154056bf4f6", "shasum": "" }, "require": { @@ -217,9 +217,9 @@ "support": { "forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80", "issues": "https://github.com/aws/aws-sdk-php/issues", - "source": "https://github.com/aws/aws-sdk-php/tree/3.324.6" + "source": "https://github.com/aws/aws-sdk-php/tree/3.324.12" }, - "time": "2024-10-18T18:06:33+00:00" + "time": "2024-10-28T18:07:02+00:00" }, { "name": "brick/math", @@ -1769,16 +1769,16 @@ }, { "name": "laravel/framework", - "version": "v11.28.1", + "version": "v11.29.0", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "3ef5c8a85b4c598d5ffaf98afd72f6a5d6a0be2c" + "reference": "425054512c362835ba9c0307561973c8eeac7385" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/3ef5c8a85b4c598d5ffaf98afd72f6a5d6a0be2c", - "reference": "3ef5c8a85b4c598d5ffaf98afd72f6a5d6a0be2c", + "url": "https://api.github.com/repos/laravel/framework/zipball/425054512c362835ba9c0307561973c8eeac7385", + "reference": "425054512c362835ba9c0307561973c8eeac7385", "shasum": "" }, "require": { @@ -1974,7 +1974,7 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2024-10-16T16:32:21+00:00" + "time": "2024-10-22T14:13:31+00:00" }, { "name": "laravel/prompts", @@ -5963,16 +5963,16 @@ }, { "name": "statamic/cms", - "version": "v5.32.0", + "version": "v5.35.0", "source": { "type": "git", "url": "https://github.com/statamic/cms.git", - "reference": "6e69539d9f29766480c38aeb55ed4f1b42d1b25d" + "reference": "8ea5a19a74ad8a1127356dc3d147f3b618b0f10b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/statamic/cms/zipball/6e69539d9f29766480c38aeb55ed4f1b42d1b25d", - "reference": "6e69539d9f29766480c38aeb55ed4f1b42d1b25d", + "url": "https://api.github.com/repos/statamic/cms/zipball/8ea5a19a74ad8a1127356dc3d147f3b618b0f10b", + "reference": "8ea5a19a74ad8a1127356dc3d147f3b618b0f10b", "shasum": "" }, "require": { @@ -6055,7 +6055,7 @@ ], "support": { "issues": "https://github.com/statamic/cms/issues", - "source": "https://github.com/statamic/cms/tree/v5.32.0" + "source": "https://github.com/statamic/cms/tree/v5.35.0" }, "funding": [ { @@ -6063,7 +6063,7 @@ "type": "github" } ], - "time": "2024-10-18T15:13:43+00:00" + "time": "2024-10-28T14:06:17+00:00" }, { "name": "statamic/stringy", @@ -6135,16 +6135,16 @@ }, { "name": "symfony/console", - "version": "v7.1.5", + "version": "v7.1.6", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "0fa539d12b3ccf068a722bbbffa07ca7079af9ee" + "reference": "bb5192af6edc797cbab5c8e8ecfea2fe5f421e57" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/0fa539d12b3ccf068a722bbbffa07ca7079af9ee", - "reference": "0fa539d12b3ccf068a722bbbffa07ca7079af9ee", + "url": "https://api.github.com/repos/symfony/console/zipball/bb5192af6edc797cbab5c8e8ecfea2fe5f421e57", + "reference": "bb5192af6edc797cbab5c8e8ecfea2fe5f421e57", "shasum": "" }, "require": { @@ -6208,7 +6208,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v7.1.5" + "source": "https://github.com/symfony/console/tree/v7.1.6" }, "funding": [ { @@ -6224,20 +6224,20 @@ "type": "tidelift" } ], - "time": "2024-09-20T08:28:38+00:00" + "time": "2024-10-09T08:46:59+00:00" }, { "name": "symfony/css-selector", - "version": "v7.1.1", + "version": "v7.1.6", "source": { "type": "git", "url": "https://github.com/symfony/css-selector.git", - "reference": "1c7cee86c6f812896af54434f8ce29c8d94f9ff4" + "reference": "4aa4f6b3d6749c14d3aa815eef8226632e7bbc66" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/css-selector/zipball/1c7cee86c6f812896af54434f8ce29c8d94f9ff4", - "reference": "1c7cee86c6f812896af54434f8ce29c8d94f9ff4", + "url": "https://api.github.com/repos/symfony/css-selector/zipball/4aa4f6b3d6749c14d3aa815eef8226632e7bbc66", + "reference": "4aa4f6b3d6749c14d3aa815eef8226632e7bbc66", "shasum": "" }, "require": { @@ -6273,7 +6273,7 @@ "description": "Converts CSS selectors to XPath expressions", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/css-selector/tree/v7.1.1" + "source": "https://github.com/symfony/css-selector/tree/v7.1.6" }, "funding": [ { @@ -6289,7 +6289,7 @@ "type": "tidelift" } ], - "time": "2024-05-31T14:57:53+00:00" + "time": "2024-09-25T14:20:29+00:00" }, { "name": "symfony/deprecation-contracts", @@ -6360,16 +6360,16 @@ }, { "name": "symfony/error-handler", - "version": "v7.1.3", + "version": "v7.1.6", "source": { "type": "git", "url": "https://github.com/symfony/error-handler.git", - "reference": "432bb369952795c61ca1def65e078c4a80dad13c" + "reference": "d60117093c2a9fe667baa8fedf84e8a09b9c592f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/error-handler/zipball/432bb369952795c61ca1def65e078c4a80dad13c", - "reference": "432bb369952795c61ca1def65e078c4a80dad13c", + "url": "https://api.github.com/repos/symfony/error-handler/zipball/d60117093c2a9fe667baa8fedf84e8a09b9c592f", + "reference": "d60117093c2a9fe667baa8fedf84e8a09b9c592f", "shasum": "" }, "require": { @@ -6415,7 +6415,7 @@ "description": "Provides tools to manage errors and ease debugging PHP code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/error-handler/tree/v7.1.3" + "source": "https://github.com/symfony/error-handler/tree/v7.1.6" }, "funding": [ { @@ -6431,20 +6431,20 @@ "type": "tidelift" } ], - "time": "2024-07-26T13:02:51+00:00" + "time": "2024-09-25T14:20:29+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v7.1.1", + "version": "v7.1.6", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "9fa7f7a21beb22a39a8f3f28618b29e50d7a55a7" + "reference": "87254c78dd50721cfd015b62277a8281c5589702" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/9fa7f7a21beb22a39a8f3f28618b29e50d7a55a7", - "reference": "9fa7f7a21beb22a39a8f3f28618b29e50d7a55a7", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/87254c78dd50721cfd015b62277a8281c5589702", + "reference": "87254c78dd50721cfd015b62277a8281c5589702", "shasum": "" }, "require": { @@ -6495,7 +6495,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.1.1" + "source": "https://github.com/symfony/event-dispatcher/tree/v7.1.6" }, "funding": [ { @@ -6511,7 +6511,7 @@ "type": "tidelift" } ], - "time": "2024-05-31T14:57:53+00:00" + "time": "2024-09-25T14:20:29+00:00" }, { "name": "symfony/event-dispatcher-contracts", @@ -6591,16 +6591,16 @@ }, { "name": "symfony/finder", - "version": "v7.1.4", + "version": "v7.1.6", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "d95bbf319f7d052082fb7af147e0f835a695e823" + "reference": "2cb89664897be33f78c65d3d2845954c8d7a43b8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/d95bbf319f7d052082fb7af147e0f835a695e823", - "reference": "d95bbf319f7d052082fb7af147e0f835a695e823", + "url": "https://api.github.com/repos/symfony/finder/zipball/2cb89664897be33f78c65d3d2845954c8d7a43b8", + "reference": "2cb89664897be33f78c65d3d2845954c8d7a43b8", "shasum": "" }, "require": { @@ -6635,7 +6635,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v7.1.4" + "source": "https://github.com/symfony/finder/tree/v7.1.6" }, "funding": [ { @@ -6651,20 +6651,20 @@ "type": "tidelift" } ], - "time": "2024-08-13T14:28:19+00:00" + "time": "2024-10-01T08:31:23+00:00" }, { "name": "symfony/http-foundation", - "version": "v7.1.5", + "version": "v7.1.6", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "e30ef73b1e44eea7eb37ba69600a354e553f694b" + "reference": "3d7bbf071b25f802f7d55524d408bed414ea71e2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/e30ef73b1e44eea7eb37ba69600a354e553f694b", - "reference": "e30ef73b1e44eea7eb37ba69600a354e553f694b", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/3d7bbf071b25f802f7d55524d408bed414ea71e2", + "reference": "3d7bbf071b25f802f7d55524d408bed414ea71e2", "shasum": "" }, "require": { @@ -6712,7 +6712,7 @@ "description": "Defines an object-oriented layer for the HTTP specification", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-foundation/tree/v7.1.5" + "source": "https://github.com/symfony/http-foundation/tree/v7.1.6" }, "funding": [ { @@ -6728,20 +6728,20 @@ "type": "tidelift" } ], - "time": "2024-09-20T08:28:38+00:00" + "time": "2024-10-11T19:23:14+00:00" }, { "name": "symfony/http-kernel", - "version": "v7.1.5", + "version": "v7.1.6", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "44204d96150a9df1fc57601ec933d23fefc2d65b" + "reference": "5d8315899cd76b2e7e29179bf5fea103e41bdf03" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/44204d96150a9df1fc57601ec933d23fefc2d65b", - "reference": "44204d96150a9df1fc57601ec933d23fefc2d65b", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/5d8315899cd76b2e7e29179bf5fea103e41bdf03", + "reference": "5d8315899cd76b2e7e29179bf5fea103e41bdf03", "shasum": "" }, "require": { @@ -6826,7 +6826,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/v7.1.5" + "source": "https://github.com/symfony/http-kernel/tree/v7.1.6" }, "funding": [ { @@ -6842,20 +6842,20 @@ "type": "tidelift" } ], - "time": "2024-09-21T06:09:21+00:00" + "time": "2024-10-27T13:54:21+00:00" }, { "name": "symfony/lock", - "version": "v6.4.8", + "version": "v6.4.13", "source": { "type": "git", "url": "https://github.com/symfony/lock.git", - "reference": "1387f50285c23607467c1f05b258bde65f1ab276" + "reference": "a69c3dd151ab7e14925f119164cfdf65d55392a4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/lock/zipball/1387f50285c23607467c1f05b258bde65f1ab276", - "reference": "1387f50285c23607467c1f05b258bde65f1ab276", + "url": "https://api.github.com/repos/symfony/lock/zipball/a69c3dd151ab7e14925f119164cfdf65d55392a4", + "reference": "a69c3dd151ab7e14925f119164cfdf65d55392a4", "shasum": "" }, "require": { @@ -6905,7 +6905,7 @@ "semaphore" ], "support": { - "source": "https://github.com/symfony/lock/tree/v6.4.8" + "source": "https://github.com/symfony/lock/tree/v6.4.13" }, "funding": [ { @@ -6921,20 +6921,20 @@ "type": "tidelift" } ], - "time": "2024-05-31T14:49:08+00:00" + "time": "2024-10-25T15:19:46+00:00" }, { "name": "symfony/mailer", - "version": "v7.1.5", + "version": "v7.1.6", "source": { "type": "git", "url": "https://github.com/symfony/mailer.git", - "reference": "bbf21460c56f29810da3df3e206e38dfbb01e80b" + "reference": "69c9948451fb3a6a4d47dc8261d1794734e76cdd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mailer/zipball/bbf21460c56f29810da3df3e206e38dfbb01e80b", - "reference": "bbf21460c56f29810da3df3e206e38dfbb01e80b", + "url": "https://api.github.com/repos/symfony/mailer/zipball/69c9948451fb3a6a4d47dc8261d1794734e76cdd", + "reference": "69c9948451fb3a6a4d47dc8261d1794734e76cdd", "shasum": "" }, "require": { @@ -6985,7 +6985,7 @@ "description": "Helps sending emails", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/mailer/tree/v7.1.5" + "source": "https://github.com/symfony/mailer/tree/v7.1.6" }, "funding": [ { @@ -7001,20 +7001,20 @@ "type": "tidelift" } ], - "time": "2024-09-08T12:32:26+00:00" + "time": "2024-09-25T14:20:29+00:00" }, { "name": "symfony/mime", - "version": "v7.1.5", + "version": "v7.1.6", "source": { "type": "git", "url": "https://github.com/symfony/mime.git", - "reference": "711d2e167e8ce65b05aea6b258c449671cdd38ff" + "reference": "caa1e521edb2650b8470918dfe51708c237f0598" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mime/zipball/711d2e167e8ce65b05aea6b258c449671cdd38ff", - "reference": "711d2e167e8ce65b05aea6b258c449671cdd38ff", + "url": "https://api.github.com/repos/symfony/mime/zipball/caa1e521edb2650b8470918dfe51708c237f0598", + "reference": "caa1e521edb2650b8470918dfe51708c237f0598", "shasum": "" }, "require": { @@ -7069,7 +7069,7 @@ "mime-type" ], "support": { - "source": "https://github.com/symfony/mime/tree/v7.1.5" + "source": "https://github.com/symfony/mime/tree/v7.1.6" }, "funding": [ { @@ -7085,7 +7085,7 @@ "type": "tidelift" } ], - "time": "2024-09-20T08:28:38+00:00" + "time": "2024-10-25T15:11:02+00:00" }, { "name": "symfony/polyfill-ctype", @@ -7805,16 +7805,16 @@ }, { "name": "symfony/process", - "version": "v7.1.5", + "version": "v7.1.6", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "5c03ee6369281177f07f7c68252a280beccba847" + "reference": "6aaa189ddb4ff6b5de8fa3210f2fb42c87b4d12e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/5c03ee6369281177f07f7c68252a280beccba847", - "reference": "5c03ee6369281177f07f7c68252a280beccba847", + "url": "https://api.github.com/repos/symfony/process/zipball/6aaa189ddb4ff6b5de8fa3210f2fb42c87b4d12e", + "reference": "6aaa189ddb4ff6b5de8fa3210f2fb42c87b4d12e", "shasum": "" }, "require": { @@ -7846,7 +7846,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v7.1.5" + "source": "https://github.com/symfony/process/tree/v7.1.6" }, "funding": [ { @@ -7862,20 +7862,20 @@ "type": "tidelift" } ], - "time": "2024-09-19T21:48:23+00:00" + "time": "2024-09-25T14:20:29+00:00" }, { "name": "symfony/routing", - "version": "v7.1.4", + "version": "v7.1.6", "source": { "type": "git", "url": "https://github.com/symfony/routing.git", - "reference": "1500aee0094a3ce1c92626ed8cf3c2037e86f5a7" + "reference": "66a2c469f6c22d08603235c46a20007c0701ea0a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/1500aee0094a3ce1c92626ed8cf3c2037e86f5a7", - "reference": "1500aee0094a3ce1c92626ed8cf3c2037e86f5a7", + "url": "https://api.github.com/repos/symfony/routing/zipball/66a2c469f6c22d08603235c46a20007c0701ea0a", + "reference": "66a2c469f6c22d08603235c46a20007c0701ea0a", "shasum": "" }, "require": { @@ -7927,7 +7927,7 @@ "url" ], "support": { - "source": "https://github.com/symfony/routing/tree/v7.1.4" + "source": "https://github.com/symfony/routing/tree/v7.1.6" }, "funding": [ { @@ -7943,7 +7943,7 @@ "type": "tidelift" } ], - "time": "2024-08-29T08:16:25+00:00" + "time": "2024-10-01T08:31:23+00:00" }, { "name": "symfony/service-contracts", @@ -8030,16 +8030,16 @@ }, { "name": "symfony/stopwatch", - "version": "v7.1.1", + "version": "v7.1.6", "source": { "type": "git", "url": "https://github.com/symfony/stopwatch.git", - "reference": "5b75bb1ac2ba1b9d05c47fc4b3046a625377d23d" + "reference": "8b4a434e6e7faf6adedffb48783a5c75409a1a05" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/stopwatch/zipball/5b75bb1ac2ba1b9d05c47fc4b3046a625377d23d", - "reference": "5b75bb1ac2ba1b9d05c47fc4b3046a625377d23d", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/8b4a434e6e7faf6adedffb48783a5c75409a1a05", + "reference": "8b4a434e6e7faf6adedffb48783a5c75409a1a05", "shasum": "" }, "require": { @@ -8072,7 +8072,7 @@ "description": "Provides a way to profile code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/stopwatch/tree/v7.1.1" + "source": "https://github.com/symfony/stopwatch/tree/v7.1.6" }, "funding": [ { @@ -8088,20 +8088,20 @@ "type": "tidelift" } ], - "time": "2024-05-31T14:57:53+00:00" + "time": "2024-09-25T14:20:29+00:00" }, { "name": "symfony/string", - "version": "v7.1.5", + "version": "v7.1.6", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "d66f9c343fa894ec2037cc928381df90a7ad4306" + "reference": "61b72d66bf96c360a727ae6232df5ac83c71f626" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/d66f9c343fa894ec2037cc928381df90a7ad4306", - "reference": "d66f9c343fa894ec2037cc928381df90a7ad4306", + "url": "https://api.github.com/repos/symfony/string/zipball/61b72d66bf96c360a727ae6232df5ac83c71f626", + "reference": "61b72d66bf96c360a727ae6232df5ac83c71f626", "shasum": "" }, "require": { @@ -8159,7 +8159,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v7.1.5" + "source": "https://github.com/symfony/string/tree/v7.1.6" }, "funding": [ { @@ -8175,20 +8175,20 @@ "type": "tidelift" } ], - "time": "2024-09-20T08:28:38+00:00" + "time": "2024-09-25T14:20:29+00:00" }, { "name": "symfony/translation", - "version": "v6.4.12", + "version": "v6.4.13", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "cf8360b8352b086be620fae8342c4d96e391a489" + "reference": "bee9bfabfa8b4045a66bf82520e492cddbaffa66" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/cf8360b8352b086be620fae8342c4d96e391a489", - "reference": "cf8360b8352b086be620fae8342c4d96e391a489", + "url": "https://api.github.com/repos/symfony/translation/zipball/bee9bfabfa8b4045a66bf82520e492cddbaffa66", + "reference": "bee9bfabfa8b4045a66bf82520e492cddbaffa66", "shasum": "" }, "require": { @@ -8254,7 +8254,7 @@ "description": "Provides tools to internationalize your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/translation/tree/v6.4.12" + "source": "https://github.com/symfony/translation/tree/v6.4.13" }, "funding": [ { @@ -8270,7 +8270,7 @@ "type": "tidelift" } ], - "time": "2024-09-16T06:02:54+00:00" + "time": "2024-09-27T18:14:25+00:00" }, { "name": "symfony/translation-contracts", @@ -8352,16 +8352,16 @@ }, { "name": "symfony/uid", - "version": "v7.1.5", + "version": "v7.1.6", "source": { "type": "git", "url": "https://github.com/symfony/uid.git", - "reference": "8c7bb8acb933964055215d89f9a9871df0239317" + "reference": "65befb3bb2d503bbffbd08c815aa38b472999917" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/uid/zipball/8c7bb8acb933964055215d89f9a9871df0239317", - "reference": "8c7bb8acb933964055215d89f9a9871df0239317", + "url": "https://api.github.com/repos/symfony/uid/zipball/65befb3bb2d503bbffbd08c815aa38b472999917", + "reference": "65befb3bb2d503bbffbd08c815aa38b472999917", "shasum": "" }, "require": { @@ -8406,7 +8406,7 @@ "uuid" ], "support": { - "source": "https://github.com/symfony/uid/tree/v7.1.5" + "source": "https://github.com/symfony/uid/tree/v7.1.6" }, "funding": [ { @@ -8422,20 +8422,20 @@ "type": "tidelift" } ], - "time": "2024-09-17T09:16:35+00:00" + "time": "2024-09-25T14:20:29+00:00" }, { "name": "symfony/var-dumper", - "version": "v7.1.5", + "version": "v7.1.6", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "e20e03889539fd4e4211e14d2179226c513c010d" + "reference": "cb5bd55a6b8c2c1c7fb68b0aeae0e257948a720c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/e20e03889539fd4e4211e14d2179226c513c010d", - "reference": "e20e03889539fd4e4211e14d2179226c513c010d", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/cb5bd55a6b8c2c1c7fb68b0aeae0e257948a720c", + "reference": "cb5bd55a6b8c2c1c7fb68b0aeae0e257948a720c", "shasum": "" }, "require": { @@ -8489,7 +8489,7 @@ "dump" ], "support": { - "source": "https://github.com/symfony/var-dumper/tree/v7.1.5" + "source": "https://github.com/symfony/var-dumper/tree/v7.1.6" }, "funding": [ { @@ -8505,20 +8505,20 @@ "type": "tidelift" } ], - "time": "2024-09-16T10:07:02+00:00" + "time": "2024-09-25T14:20:29+00:00" }, { "name": "symfony/var-exporter", - "version": "v6.4.9", + "version": "v6.4.13", "source": { "type": "git", "url": "https://github.com/symfony/var-exporter.git", - "reference": "f9a060622e0d93777b7f8687ec4860191e16802e" + "reference": "0f605f72a363f8743001038a176eeb2a11223b51" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-exporter/zipball/f9a060622e0d93777b7f8687ec4860191e16802e", - "reference": "f9a060622e0d93777b7f8687ec4860191e16802e", + "url": "https://api.github.com/repos/symfony/var-exporter/zipball/0f605f72a363f8743001038a176eeb2a11223b51", + "reference": "0f605f72a363f8743001038a176eeb2a11223b51", "shasum": "" }, "require": { @@ -8566,7 +8566,7 @@ "serialize" ], "support": { - "source": "https://github.com/symfony/var-exporter/tree/v6.4.9" + "source": "https://github.com/symfony/var-exporter/tree/v6.4.13" }, "funding": [ { @@ -8582,20 +8582,20 @@ "type": "tidelift" } ], - "time": "2024-06-24T15:53:56+00:00" + "time": "2024-09-25T14:18:03+00:00" }, { "name": "symfony/yaml", - "version": "v7.1.5", + "version": "v7.1.6", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "4e561c316e135e053bd758bf3b3eb291d9919de4" + "reference": "3ced3f29e4f0d6bce2170ff26719f1fe9aacc671" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/4e561c316e135e053bd758bf3b3eb291d9919de4", - "reference": "4e561c316e135e053bd758bf3b3eb291d9919de4", + "url": "https://api.github.com/repos/symfony/yaml/zipball/3ced3f29e4f0d6bce2170ff26719f1fe9aacc671", + "reference": "3ced3f29e4f0d6bce2170ff26719f1fe9aacc671", "shasum": "" }, "require": { @@ -8637,7 +8637,7 @@ "description": "Loads and dumps YAML files", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/yaml/tree/v7.1.5" + "source": "https://github.com/symfony/yaml/tree/v7.1.6" }, "funding": [ { @@ -8653,7 +8653,7 @@ "type": "tidelift" } ], - "time": "2024-09-17T12:49:58+00:00" + "time": "2024-09-25T14:20:29+00:00" }, { "name": "thecodingmachine/safe", @@ -9324,16 +9324,16 @@ }, { "name": "webonyx/graphql-php", - "version": "v15.14.3", + "version": "v15.17.0", "source": { "type": "git", "url": "https://github.com/webonyx/graphql-php.git", - "reference": "fac6205e957c9fbe0145606bc82a32973db1a339" + "reference": "c1c9e5b5a4eaf8d6209bf33becdcc93d20f71912" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webonyx/graphql-php/zipball/fac6205e957c9fbe0145606bc82a32973db1a339", - "reference": "fac6205e957c9fbe0145606bc82a32973db1a339", + "url": "https://api.github.com/repos/webonyx/graphql-php/zipball/c1c9e5b5a4eaf8d6209bf33becdcc93d20f71912", + "reference": "c1c9e5b5a4eaf8d6209bf33becdcc93d20f71912", "shasum": "" }, "require": { @@ -9351,7 +9351,7 @@ "nyholm/psr7": "^1.5", "phpbench/phpbench": "^1.2", "phpstan/extension-installer": "^1.1", - "phpstan/phpstan": "1.12.6", + "phpstan/phpstan": "1.12.7", "phpstan/phpstan-phpunit": "1.4.0", "phpstan/phpstan-strict-rules": "1.6.1", "phpunit/phpunit": "^9.5 || ^10.5.21 || ^11", @@ -9386,7 +9386,7 @@ ], "support": { "issues": "https://github.com/webonyx/graphql-php/issues", - "source": "https://github.com/webonyx/graphql-php/tree/v15.14.3" + "source": "https://github.com/webonyx/graphql-php/tree/v15.17.0" }, "funding": [ { @@ -9394,7 +9394,7 @@ "type": "open_collective" } ], - "time": "2024-10-17T13:03:37+00:00" + "time": "2024-10-26T10:54:35+00:00" }, { "name": "wilderborn/partyline", @@ -10185,69 +10185,6 @@ }, "time": "2024-03-08T09:58:59+00:00" }, - { - "name": "laravel/sail", - "version": "v1.36.0", - "source": { - "type": "git", - "url": "https://github.com/laravel/sail.git", - "reference": "f184d3d687155d06bc8cb9ff6dc48596a138460c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laravel/sail/zipball/f184d3d687155d06bc8cb9ff6dc48596a138460c", - "reference": "f184d3d687155d06bc8cb9ff6dc48596a138460c", - "shasum": "" - }, - "require": { - "illuminate/console": "^9.52.16|^10.0|^11.0", - "illuminate/contracts": "^9.52.16|^10.0|^11.0", - "illuminate/support": "^9.52.16|^10.0|^11.0", - "php": "^8.0", - "symfony/console": "^6.0|^7.0", - "symfony/yaml": "^6.0|^7.0" - }, - "require-dev": { - "orchestra/testbench": "^7.0|^8.0|^9.0", - "phpstan/phpstan": "^1.10" - }, - "bin": [ - "bin/sail" - ], - "type": "library", - "extra": { - "laravel": { - "providers": [ - "Laravel\\Sail\\SailServiceProvider" - ] - } - }, - "autoload": { - "psr-4": { - "Laravel\\Sail\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "Docker files for running a basic Laravel application.", - "keywords": [ - "docker", - "laravel" - ], - "support": { - "issues": "https://github.com/laravel/sail/issues", - "source": "https://github.com/laravel/sail" - }, - "time": "2024-10-10T13:26:02+00:00" - }, { "name": "mockery/mockery", "version": "1.6.12", @@ -10490,16 +10427,16 @@ }, { "name": "pestphp/pest", - "version": "v3.4.1", + "version": "v3.5.0", "source": { "type": "git", "url": "https://github.com/pestphp/pest.git", - "reference": "67f217852ce153134fbea8857487a3829904c086" + "reference": "eaeb133c77f3f5382620f0307c3b45b34961bcfc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pestphp/pest/zipball/67f217852ce153134fbea8857487a3829904c086", - "reference": "67f217852ce153134fbea8857487a3829904c086", + "url": "https://api.github.com/repos/pestphp/pest/zipball/eaeb133c77f3f5382620f0307c3b45b34961bcfc", + "reference": "eaeb133c77f3f5382620f0307c3b45b34961bcfc", "shasum": "" }, "require": { @@ -10510,11 +10447,11 @@ "pestphp/pest-plugin-arch": "^3.0.0", "pestphp/pest-plugin-mutate": "^3.0.5", "php": "^8.2.0", - "phpunit/phpunit": "^11.4.1" + "phpunit/phpunit": "^11.4.2" }, "conflict": { "filp/whoops": "<2.16.0", - "phpunit/phpunit": ">11.4.1", + "phpunit/phpunit": ">11.4.2", "sebastian/exporter": "<6.0.0", "webmozart/assert": "<1.11.0" }, @@ -10586,7 +10523,7 @@ ], "support": { "issues": "https://github.com/pestphp/pest/issues", - "source": "https://github.com/pestphp/pest/tree/v3.4.1" + "source": "https://github.com/pestphp/pest/tree/v3.5.0" }, "funding": [ { @@ -10598,7 +10535,7 @@ "type": "github" } ], - "time": "2024-10-15T16:17:09+00:00" + "time": "2024-10-22T14:33:27+00:00" }, { "name": "pestphp/pest-plugin", @@ -11477,16 +11414,16 @@ }, { "name": "phpunit/phpunit", - "version": "11.4.1", + "version": "11.4.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "7875627f15f4da7e7f0823d1f323f7295a77334e" + "reference": "1863643c3f04ad03dcb9c6996c294784cdda4805" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/7875627f15f4da7e7f0823d1f323f7295a77334e", - "reference": "7875627f15f4da7e7f0823d1f323f7295a77334e", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/1863643c3f04ad03dcb9c6996c294784cdda4805", + "reference": "1863643c3f04ad03dcb9c6996c294784cdda4805", "shasum": "" }, "require": { @@ -11500,21 +11437,21 @@ "phar-io/manifest": "^2.0.4", "phar-io/version": "^3.2.1", "php": ">=8.2", - "phpunit/php-code-coverage": "^11.0.6", + "phpunit/php-code-coverage": "^11.0.7", "phpunit/php-file-iterator": "^5.1.0", "phpunit/php-invoker": "^5.0.1", "phpunit/php-text-template": "^4.0.1", "phpunit/php-timer": "^7.0.1", "sebastian/cli-parser": "^3.0.2", "sebastian/code-unit": "^3.0.1", - "sebastian/comparator": "^6.1.0", + "sebastian/comparator": "^6.1.1", "sebastian/diff": "^6.0.2", "sebastian/environment": "^7.2.0", "sebastian/exporter": "^6.1.3", "sebastian/global-state": "^7.0.2", "sebastian/object-enumerator": "^6.0.1", "sebastian/type": "^5.1.0", - "sebastian/version": "^5.0.1" + "sebastian/version": "^5.0.2" }, "suggest": { "ext-soap": "To be able to generate mocks based on WSDL files" @@ -11557,7 +11494,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/11.4.1" + "source": "https://github.com/sebastianbergmann/phpunit/tree/11.4.2" }, "funding": [ { @@ -11573,7 +11510,7 @@ "type": "tidelift" } ], - "time": "2024-10-08T15:38:37+00:00" + "time": "2024-10-19T13:05:19+00:00" }, { "name": "sebastian/cli-parser", diff --git a/public/vendor/statamic/cp/build/assets/app-4350e625.js b/public/vendor/statamic/cp/build/assets/app-4350e625.js new file mode 100644 index 0000000..43e2201 --- /dev/null +++ b/public/vendor/statamic/cp/build/assets/app-4350e625.js @@ -0,0 +1,643 @@ +var Lu=Object.defineProperty;var Fu=(M,$,I)=>$ in M?Lu(M,$,{enumerable:!0,configurable:!0,writable:!0,value:I}):M[$]=I;var $l=(M,$,I)=>(Fu(M,typeof $!="symbol"?$+"":$,I),I),uc=(M,$,I)=>{if(!$.has(M))throw TypeError("Cannot "+I)};var Vi=(M,$,I)=>(uc(M,$,"read from private field"),I?I.call(M):$.get(M)),ks=(M,$,I)=>{if($.has(M))throw TypeError("Cannot add the same private member more than once");$ instanceof WeakSet?$.add(M):$.set(M,I)},Oo=(M,$,I,N)=>(uc(M,$,"write to private field"),N?N.call(M,I):$.set(M,I),I);var Zo=(M,$,I)=>(uc(M,$,"access private method"),I);const scriptRel="modulepreload",assetsURL=function(M,$){return new URL(M,$).href},seen={},__vitePreload=function($,I,N){if(!I||I.length===0)return $();const B=document.getElementsByTagName("link");return Promise.all(I.map(j=>{if(j=assetsURL(j,N),j in seen)return;seen[j]=!0;const U=j.endsWith(".css"),q=U?'[rel="stylesheet"]':"";if(!!N)for(let G=B.length-1;G>=0;G--){const J=B[G];if(J.href===j&&(!U||J.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${j}"]${q}`))return;const K=document.createElement("link");if(K.rel=U?"stylesheet":scriptRel,U||(K.as="script",K.crossOrigin=""),K.href=j,document.head.appendChild(K),U)return new Promise((G,J)=>{K.addEventListener("load",G),K.addEventListener("error",()=>J(new Error(`Unable to preload CSS for ${j}`)))})})).then(()=>$()).catch(j=>{const U=new Event("vite:preloadError",{cancelable:!0});if(U.payload=j,window.dispatchEvent(U),!U.defaultPrevented)throw j})};/*! + * Vue.js v2.7.14 + * (c) 2014-2022 Evan You + * Released under the MIT License. + */var emptyObject=Object.freeze({}),isArray$9=Array.isArray;function isUndef(M){return M==null}function isDef(M){return M!=null}function isTrue(M){return M===!0}function isFalse(M){return M===!1}function isPrimitive(M){return typeof M=="string"||typeof M=="number"||typeof M=="symbol"||typeof M=="boolean"}function isFunction$6(M){return typeof M=="function"}function isObject$6(M){return M!==null&&typeof M=="object"}var _toString=Object.prototype.toString;function toRawType$1(M){return _toString.call(M).slice(8,-1)}function isPlainObject$2(M){return _toString.call(M)==="[object Object]"}function isRegExp$5(M){return _toString.call(M)==="[object RegExp]"}function isValidArrayIndex(M){var $=parseFloat(String(M));return $>=0&&Math.floor($)===$&&isFinite(M)}function isPromise$1(M){return isDef(M)&&typeof M.then=="function"&&typeof M.catch=="function"}function toString$4(M){return M==null?"":Array.isArray(M)||isPlainObject$2(M)&&M.toString===_toString?JSON.stringify(M,null,2):String(M)}function toNumber(M){var $=parseFloat(M);return isNaN($)?M:$}function makeMap$1(M,$){for(var I=Object.create(null),N=M.split(","),B=0;B-1)return M.splice(N,1)}}var hasOwnProperty$3=Object.prototype.hasOwnProperty;function hasOwn$4(M,$){return hasOwnProperty$3.call(M,$)}function cached(M){var $=Object.create(null);return function(N){var B=$[N];return B||($[N]=M(N))}}var camelizeRE=/-(\w)/g,camelize=cached(function(M){return M.replace(camelizeRE,function($,I){return I?I.toUpperCase():""})}),capitalize$1=cached(function(M){return M.charAt(0).toUpperCase()+M.slice(1)}),hyphenateRE=/\B([A-Z])/g,hyphenate=cached(function(M){return M.replace(hyphenateRE,"-$1").toLowerCase()});function polyfillBind(M,$){function I(N){var B=arguments.length;return B?B>1?M.apply($,arguments):M.call($,N):M.call($)}return I._length=M.length,I}function nativeBind(M,$){return M.bind($)}var bind$1$1=Function.prototype.bind?nativeBind:polyfillBind;function toArray$3(M,$){$=$||0;for(var I=M.length-$,N=new Array(I);I--;)N[I]=M[I+$];return N}function extend$6(M,$){for(var I in $)M[I]=$[I];return M}function toObject$1(M){for(var $={},I=0;I0,isEdge=UA&&UA.indexOf("edge/")>0;UA&&UA.indexOf("android")>0;var isIOS$1=UA&&/iphone|ipad|ipod|ios/.test(UA),isFF=UA&&UA.match(/firefox\/(\d+)/),nativeWatch={}.watch,supportsPassive$1=!1;if(inBrowser)try{var opts={};Object.defineProperty(opts,"passive",{get:function(){supportsPassive$1=!0}}),window.addEventListener("test-passive",null,opts)}catch{}var _isServer,isServerRendering=function(){return _isServer===void 0&&(!inBrowser&&typeof global<"u"?_isServer=global.process&&global.process.env.VUE_ENV==="server":_isServer=!1),_isServer},devtools=inBrowser&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function isNative(M){return typeof M=="function"&&/native code/.test(M.toString())}var hasSymbol=typeof Symbol<"u"&&isNative(Symbol)&&typeof Reflect<"u"&&isNative(Reflect.ownKeys),_Set;typeof Set<"u"&&isNative(Set)?_Set=Set:_Set=function(){function M(){this.set=Object.create(null)}return M.prototype.has=function($){return this.set[$]===!0},M.prototype.add=function($){this.set[$]=!0},M.prototype.clear=function(){this.set=Object.create(null)},M}();var currentInstance=null;function getCurrentInstance(){return currentInstance&&{proxy:currentInstance}}function setCurrentInstance(M){M===void 0&&(M=null),M||currentInstance&¤tInstance._scope.off(),currentInstance=M,M&&M._scope.on()}var VNode=function(){function M($,I,N,B,j,U,q,Y){this.tag=$,this.data=I,this.children=N,this.text=B,this.elm=j,this.ns=void 0,this.context=U,this.fnContext=void 0,this.fnOptions=void 0,this.fnScopeId=void 0,this.key=I&&I.key,this.componentOptions=q,this.componentInstance=void 0,this.parent=void 0,this.raw=!1,this.isStatic=!1,this.isRootInsert=!0,this.isComment=!1,this.isCloned=!1,this.isOnce=!1,this.asyncFactory=Y,this.asyncMeta=void 0,this.isAsyncPlaceholder=!1}return Object.defineProperty(M.prototype,"child",{get:function(){return this.componentInstance},enumerable:!1,configurable:!0}),M}(),createEmptyVNode=function(M){M===void 0&&(M="");var $=new VNode;return $.text=M,$.isComment=!0,$};function createTextVNode(M){return new VNode(void 0,void 0,void 0,String(M))}function cloneVNode(M){var $=new VNode(M.tag,M.data,M.children&&M.children.slice(),M.text,M.elm,M.context,M.componentOptions,M.asyncFactory);return $.ns=M.ns,$.isStatic=M.isStatic,$.key=M.key,$.isComment=M.isComment,$.fnContext=M.fnContext,$.fnOptions=M.fnOptions,$.fnScopeId=M.fnScopeId,$.asyncMeta=M.asyncMeta,$.isCloned=!0,$}var uid$2=0,pendingCleanupDeps=[],cleanupDeps=function(){for(var M=0;M0&&(B=normalizeArrayChildren(B,"".concat($||"","_").concat(N)),isTextNode(B[0])&&isTextNode(U)&&(I[j]=createTextVNode(U.text+B[0].text),B.shift()),I.push.apply(I,B)):isPrimitive(B)?isTextNode(U)?I[j]=createTextVNode(U.text+B):B!==""&&I.push(createTextVNode(B)):isTextNode(B)&&isTextNode(U)?I[j]=createTextVNode(U.text+B.text):(isTrue(M._isVList)&&isDef(B.tag)&&isUndef(B.key)&&isDef($)&&(B.key="__vlist".concat($,"_").concat(N,"__")),I.push(B)));return I}var SIMPLE_NORMALIZE=1,ALWAYS_NORMALIZE=2;function createElement$1(M,$,I,N,B,j){return(isArray$9(I)||isPrimitive(I))&&(B=N,N=I,I=void 0),isTrue(j)&&(B=ALWAYS_NORMALIZE),_createElement(M,$,I,N,B)}function _createElement(M,$,I,N,B){if(isDef(I)&&isDef(I.__ob__)||(isDef(I)&&isDef(I.is)&&($=I.is),!$))return createEmptyVNode();isArray$9(N)&&isFunction$6(N[0])&&(I=I||{},I.scopedSlots={default:N[0]},N.length=0),B===ALWAYS_NORMALIZE?N=normalizeChildren(N):B===SIMPLE_NORMALIZE&&(N=simpleNormalizeChildren(N));var j,U;if(typeof $=="string"){var q=void 0;U=M.$vnode&&M.$vnode.ns||config$1.getTagNamespace($),config$1.isReservedTag($)?j=new VNode(config$1.parsePlatformTagName($),I,N,void 0,void 0,M):(!I||!I.pre)&&isDef(q=resolveAsset(M.$options,"components",$))?j=createComponent(q,I,M,N,$):j=new VNode($,I,N,void 0,void 0,M)}else j=createComponent($,I,M,N);return isArray$9(j)?j:isDef(j)?(isDef(U)&&applyNS(j,U),isDef(I)&®isterDeepBindings(I),j):createEmptyVNode()}function applyNS(M,$,I){if(M.ns=$,M.tag==="foreignObject"&&($=void 0,I=!0),isDef(M.children))for(var N=0,B=M.children.length;N0,U=$?!!$.$stable:!j,q=$&&$.$key;if(!$)B={};else{if($._normalized)return $._normalized;if(U&&N&&N!==emptyObject&&q===N.$key&&!j&&!N.$hasNormal)return N;B={};for(var Y in $)$[Y]&&Y[0]!=="$"&&(B[Y]=normalizeScopedSlot(M,I,Y,$[Y]))}for(var K in I)K in B||(B[K]=proxyNormalSlot(I,K));return $&&Object.isExtensible($)&&($._normalized=B),def(B,"$stable",U),def(B,"$key",q),def(B,"$hasNormal",j),B}function normalizeScopedSlot(M,$,I,N){var B=function(){var j=currentInstance;setCurrentInstance(M);var U=arguments.length?N.apply(null,arguments):N({});U=U&&typeof U=="object"&&!isArray$9(U)?[U]:normalizeChildren(U);var q=U&&U[0];return setCurrentInstance(j),U&&(!q||U.length===1&&q.isComment&&!isAsyncPlaceholder(q))?void 0:U};return N.proxy&&Object.defineProperty($,I,{get:B,enumerable:!0,configurable:!0}),B}function proxyNormalSlot(M,$){return function(){return M[$]}}function initSetup(M){var $=M.$options,I=$.setup;if(I){var N=M._setupContext=createSetupContext(M);setCurrentInstance(M),pushTarget();var B=invokeWithErrorHandling(I,null,[M._props||shallowReactive({}),N],M,"setup");if(popTarget(),setCurrentInstance(),isFunction$6(B))$.render=B;else if(isObject$6(B))if(M._setupState=B,B.__sfc){var U=M._setupProxy={};for(var j in B)j!=="__sfc"&&proxyWithRefUnwrap(U,B,j)}else for(var j in B)isReserved(j)||proxyWithRefUnwrap(M,B,j)}}function createSetupContext(M){return{get attrs(){if(!M._attrsProxy){var $=M._attrsProxy={};def($,"_v_attr_proxy",!0),syncSetupProxy($,M.$attrs,emptyObject,M,"$attrs")}return M._attrsProxy},get listeners(){if(!M._listenersProxy){var $=M._listenersProxy={};syncSetupProxy($,M.$listeners,emptyObject,M,"$listeners")}return M._listenersProxy},get slots(){return initSlotsProxy(M)},emit:bind$1$1(M.$emit,M),expose:function($){$&&Object.keys($).forEach(function(I){return proxyWithRefUnwrap(M,$,I)})}}}function syncSetupProxy(M,$,I,N,B){var j=!1;for(var U in $)U in M?$[U]!==I[U]&&(j=!0):(j=!0,defineProxyAttr(M,U,N,B));for(var U in M)U in $||(j=!0,delete M[U]);return j}function defineProxyAttr(M,$,I,N){Object.defineProperty(M,$,{enumerable:!0,configurable:!0,get:function(){return I[N][$]}})}function initSlotsProxy(M){return M._slotsProxy||syncSetupSlots(M._slotsProxy={},M.$scopedSlots),M._slotsProxy}function syncSetupSlots(M,$){for(var I in $)M[I]=$[I];for(var I in M)I in $||delete M[I]}function useSlots(){return getContext().slots}function useAttrs(){return getContext().attrs}function useListeners(){return getContext().listeners}function getContext(){var M=currentInstance;return M._setupContext||(M._setupContext=createSetupContext(M))}function mergeDefaults(M,$){var I=isArray$9(M)?M.reduce(function(j,U){return j[U]={},j},{}):M;for(var N in $){var B=I[N];B?isArray$9(B)||isFunction$6(B)?I[N]={type:B,default:$[N]}:B.default=$[N]:B===null&&(I[N]={default:$[N]})}return I}function initRender(M){M._vnode=null,M._staticTrees=null;var $=M.$options,I=M.$vnode=$._parentVnode,N=I&&I.context;M.$slots=resolveSlots($._renderChildren,N),M.$scopedSlots=I?normalizeScopedSlots(M.$parent,I.data.scopedSlots,M.$slots):emptyObject,M._c=function(j,U,q,Y){return createElement$1(M,j,U,q,Y,!1)},M.$createElement=function(j,U,q,Y){return createElement$1(M,j,U,q,Y,!0)};var B=I&&I.data;defineReactive(M,"$attrs",B&&B.attrs||emptyObject,null,!0),defineReactive(M,"$listeners",$._parentListeners||emptyObject,null,!0)}var currentRenderingInstance=null;function renderMixin(M){installRenderHelpers(M.prototype),M.prototype.$nextTick=function($){return nextTick$1($,this)},M.prototype._render=function(){var $=this,I=$.$options,N=I.render,B=I._parentVnode;B&&$._isMounted&&($.$scopedSlots=normalizeScopedSlots($.$parent,B.data.scopedSlots,$.$slots,$.$scopedSlots),$._slotsProxy&&syncSetupSlots($._slotsProxy,$.$scopedSlots)),$.$vnode=B;var j;try{setCurrentInstance($),currentRenderingInstance=$,j=N.call($._renderProxy,$.$createElement)}catch(U){handleError$1(U,$,"render"),j=$._vnode}finally{currentRenderingInstance=null,setCurrentInstance()}return isArray$9(j)&&j.length===1&&(j=j[0]),j instanceof VNode||(j=createEmptyVNode()),j.parent=B,j}}function ensureCtor(M,$){return(M.__esModule||hasSymbol&&M[Symbol.toStringTag]==="Module")&&(M=M.default),isObject$6(M)?$.extend(M):M}function createAsyncPlaceholder(M,$,I,N,B){var j=createEmptyVNode();return j.asyncFactory=M,j.asyncMeta={data:$,context:I,children:N,tag:B},j}function resolveAsyncComponent(M,$){if(isTrue(M.error)&&isDef(M.errorComp))return M.errorComp;if(isDef(M.resolved))return M.resolved;var I=currentRenderingInstance;if(I&&isDef(M.owners)&&M.owners.indexOf(I)===-1&&M.owners.push(I),isTrue(M.loading)&&isDef(M.loadingComp))return M.loadingComp;if(I&&!isDef(M.owners)){var N=M.owners=[I],B=!0,j=null,U=null;I.$on("hook:destroyed",function(){return remove$2(N,I)});var q=function(J){for(var Z=0,ee=N.length;Z1?toArray$3(B):B;for(var j=toArray$3(arguments,1),U='event handler for "'.concat(I,'"'),q=0,Y=B.length;qdocument.createEvent("Event").timeStamp&&(getNow=function(){return performance_1.now()})}var sortCompareFn=function(M,$){if(M.post){if(!$.post)return 1}else if($.post)return-1;return M.id-$.id};function flushSchedulerQueue(){currentFlushTimestamp=getNow(),flushing$1=!0;var M,$;for(queue$1.sort(sortCompareFn),index$1$1=0;index$1$1index$1$1&&queue$1[I].id>M.id;)I--;queue$1.splice(I+1,0,M)}waiting||(waiting=!0,nextTick$1(flushSchedulerQueue))}}var WATCHER="watcher",WATCHER_CB="".concat(WATCHER," callback"),WATCHER_GETTER="".concat(WATCHER," getter"),WATCHER_CLEANUP="".concat(WATCHER," cleanup");function watchEffect(M,$){return doWatch(M,null,$)}function watchPostEffect(M,$){return doWatch(M,null,{flush:"post"})}function watchSyncEffect(M,$){return doWatch(M,null,{flush:"sync"})}var INITIAL_WATCHER_VALUE={};function watch(M,$,I){return doWatch(M,$,I)}function doWatch(M,$,I){var N=I===void 0?emptyObject:I,B=N.immediate,j=N.deep,U=N.flush,q=U===void 0?"pre":U;N.onTrack,N.onTrigger;var Y=currentInstance,K=function(le,me,ue){return ue===void 0&&(ue=null),invokeWithErrorHandling(le,null,ue,Y,me)},G,J=!1,Z=!1;if(isRef$1(M)?(G=function(){return M.value},J=isShallow(M)):isReactive$1(M)?(G=function(){return M.__ob__.dep.depend(),M},j=!0):isArray$9(M)?(Z=!0,J=M.some(function(le){return isReactive$1(le)||isShallow(le)}),G=function(){return M.map(function(le){if(isRef$1(le))return le.value;if(isReactive$1(le))return traverse(le);if(isFunction$6(le))return K(le,WATCHER_GETTER)})}):isFunction$6(M)?$?G=function(){return K(M,WATCHER_GETTER)}:G=function(){if(!(Y&&Y._isDestroyed))return te&&te(),K(M,WATCHER,[se])}:G=noop$2,$&&j){var ee=G;G=function(){return traverse(ee())}}var te,se=function(le){te=re.onStop=function(){K(le,WATCHER_CLEANUP)}};if(isServerRendering())return se=noop$2,$?B&&K($,WATCHER_CB,[G(),Z?[]:void 0,se]):G(),noop$2;var re=new Watcher(currentInstance,G,noop$2,{lazy:!0});re.noRecurse=!$;var ne=Z?[]:INITIAL_WATCHER_VALUE;return re.run=function(){if(re.active)if($){var le=re.get();(j||J||(Z?le.some(function(me,ue){return hasChanged$1(me,ne[ue])}):hasChanged$1(le,ne)))&&(te&&te(),K($,WATCHER_CB,[le,ne===INITIAL_WATCHER_VALUE?void 0:ne,se]),ne=le)}else re.get()},q==="sync"?re.update=re.run:q==="post"?(re.post=!0,re.update=function(){return queueWatcher(re)}):re.update=function(){if(Y&&Y===currentInstance&&!Y._isMounted){var le=Y._preWatchers||(Y._preWatchers=[]);le.indexOf(re)<0&&le.push(re)}else queueWatcher(re)},$?B?re.run():ne=re.get():q==="post"&&Y?Y.$once("hook:mounted",function(){return re.get()}):re.get(),function(){re.teardown()}}var activeEffectScope,EffectScope=function(){function M($){$===void 0&&($=!1),this.detached=$,this.active=!0,this.effects=[],this.cleanups=[],this.parent=activeEffectScope,!$&&activeEffectScope&&(this.index=(activeEffectScope.scopes||(activeEffectScope.scopes=[])).push(this)-1)}return M.prototype.run=function($){if(this.active){var I=activeEffectScope;try{return activeEffectScope=this,$()}finally{activeEffectScope=I}}},M.prototype.on=function(){activeEffectScope=this},M.prototype.off=function(){activeEffectScope=this.parent},M.prototype.stop=function($){if(this.active){var I=void 0,N=void 0;for(I=0,N=this.effects.length;I1)return I&&isFunction$6($)?$.call(N):$}}function h$2(M,$,I){return createElement$1(currentInstance,M,$,I,2,!0)}function handleError$1(M,$,I){pushTarget();try{if($)for(var N=$;N=N.$parent;){var B=N.$options.errorCaptured;if(B)for(var j=0;j-1){if(j&&!hasOwn$4(B,"default"))U=!1;else if(U===""||U===hyphenate(M)){var Y=getTypeIndex(String,B.type);(Y<0||q-1)return this;var N=toArray$3(arguments,1);return N.unshift(this),isFunction$6($.install)?$.install.apply($,N):isFunction$6($)&&$.apply(null,N),I.push($),this}}function initMixin(M){M.mixin=function($){return this.options=mergeOptions(this.options,$),this}}function initExtend(M){M.cid=0;var $=1;M.extend=function(I){I=I||{};var N=this,B=N.cid,j=I._Ctor||(I._Ctor={});if(j[B])return j[B];var U=getComponentName(I)||getComponentName(N.options),q=function(K){this._init(K)};return q.prototype=Object.create(N.prototype),q.prototype.constructor=q,q.cid=$++,q.options=mergeOptions(N.options,I),q.super=N,q.options.props&&initProps(q),q.options.computed&&initComputed(q),q.extend=N.extend,q.mixin=N.mixin,q.use=N.use,ASSET_TYPES.forEach(function(Y){q[Y]=N[Y]}),U&&(q.options.components[U]=q),q.superOptions=N.options,q.extendOptions=I,q.sealedOptions=extend$6({},q.options),j[B]=q,q}}function initProps(M){var $=M.options.props;for(var I in $)proxy(M.prototype,"_props",I)}function initComputed(M){var $=M.options.computed;for(var I in $)defineComputed(M.prototype,I,$[I])}function initAssetRegisters(M){ASSET_TYPES.forEach(function($){M[$]=function(I,N){return N?($==="component"&&isPlainObject$2(N)&&(N.name=N.name||I,N=this.options._base.extend(N)),$==="directive"&&isFunction$6(N)&&(N={bind:N,update:N}),this.options[$+"s"][I]=N,N):this.options[$+"s"][I]}})}function _getComponentName(M){return M&&(getComponentName(M.Ctor.options)||M.tag)}function matches$1(M,$){return isArray$9(M)?M.indexOf($)>-1:typeof M=="string"?M.split(",").indexOf($)>-1:isRegExp$5(M)?M.test($):!1}function pruneCache(M,$){var I=M.cache,N=M.keys,B=M._vnode;for(var j in I){var U=I[j];if(U){var q=U.name;q&&!$(q)&&pruneCacheEntry(I,j,N,B)}}}function pruneCacheEntry(M,$,I,N){var B=M[$];B&&(!N||B.tag!==N.tag)&&B.componentInstance.$destroy(),M[$]=null,remove$2(I,$)}var patternTypes=[String,RegExp,Array],KeepAlive={name:"keep-alive",abstract:!0,props:{include:patternTypes,exclude:patternTypes,max:[String,Number]},methods:{cacheVNode:function(){var M=this,$=M.cache,I=M.keys,N=M.vnodeToCache,B=M.keyToCache;if(N){var j=N.tag,U=N.componentInstance,q=N.componentOptions;$[B]={name:_getComponentName(q),tag:j,componentInstance:U},I.push(B),this.max&&I.length>parseInt(this.max)&&pruneCacheEntry($,I[0],I,this._vnode),this.vnodeToCache=null}}},created:function(){this.cache=Object.create(null),this.keys=[]},destroyed:function(){for(var M in this.cache)pruneCacheEntry(this.cache,M,this.keys)},mounted:function(){var M=this;this.cacheVNode(),this.$watch("include",function($){pruneCache(M,function(I){return matches$1($,I)})}),this.$watch("exclude",function($){pruneCache(M,function(I){return!matches$1($,I)})})},updated:function(){this.cacheVNode()},render:function(){var M=this.$slots.default,$=getFirstComponentChild(M),I=$&&$.componentOptions;if(I){var N=_getComponentName(I),B=this,j=B.include,U=B.exclude;if(j&&(!N||!matches$1(j,N))||U&&N&&matches$1(U,N))return $;var q=this,Y=q.cache,K=q.keys,G=$.key==null?I.Ctor.cid+(I.tag?"::".concat(I.tag):""):$.key;Y[G]?($.componentInstance=Y[G].componentInstance,remove$2(K,G),K.push(G)):(this.vnodeToCache=$,this.keyToCache=G),$.data.keepAlive=!0}return $||M&&M[0]}},builtInComponents={KeepAlive};function initGlobalAPI(M){var $={};$.get=function(){return config$1},Object.defineProperty(M,"config",$),M.util={warn:warn$2$1,extend:extend$6,mergeOptions,defineReactive},M.set=set$3,M.delete=del,M.nextTick=nextTick$1,M.observable=function(I){return observe(I),I},M.options=Object.create(null),ASSET_TYPES.forEach(function(I){M.options[I+"s"]=Object.create(null)}),M.options._base=M,extend$6(M.options.components,builtInComponents),initUse(M),initMixin(M),initExtend(M),initAssetRegisters(M)}initGlobalAPI(Vue$3);Object.defineProperty(Vue$3.prototype,"$isServer",{get:isServerRendering});Object.defineProperty(Vue$3.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}});Object.defineProperty(Vue$3,"FunctionalRenderContext",{value:FunctionalRenderContext});Vue$3.version=version$3;var isReservedAttr=makeMap$1("style,class"),acceptValue=makeMap$1("input,textarea,option,select,progress"),mustUseProp=function(M,$,I){return I==="value"&&acceptValue(M)&&$!=="button"||I==="selected"&&M==="option"||I==="checked"&&M==="input"||I==="muted"&&M==="video"},isEnumeratedAttr=makeMap$1("contenteditable,draggable,spellcheck"),isValidContentEditableValue=makeMap$1("events,caret,typing,plaintext-only"),convertEnumeratedValue=function(M,$){return isFalsyAttrValue($)||$==="false"?"false":M==="contenteditable"&&isValidContentEditableValue($)?$:"true"},isBooleanAttr$1=makeMap$1("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,truespeed,typemustmatch,visible"),xlinkNS="http://www.w3.org/1999/xlink",isXlink=function(M){return M.charAt(5)===":"&&M.slice(0,5)==="xlink"},getXlinkProp=function(M){return isXlink(M)?M.slice(6,M.length):""},isFalsyAttrValue=function(M){return M==null||M===!1};function genClassForVnode(M){for(var $=M.data,I=M,N=M;isDef(N.componentInstance);)N=N.componentInstance._vnode,N&&N.data&&($=mergeClassData(N.data,$));for(;isDef(I=I.parent);)I&&I.data&&($=mergeClassData($,I.data));return renderClass($.staticClass,$.class)}function mergeClassData(M,$){return{staticClass:concat$3(M.staticClass,$.staticClass),class:isDef(M.class)?[M.class,$.class]:$.class}}function renderClass(M,$){return isDef(M)||isDef($)?concat$3(M,stringifyClass($)):""}function concat$3(M,$){return M?$?M+" "+$:M:$||""}function stringifyClass(M){return Array.isArray(M)?stringifyArray(M):isObject$6(M)?stringifyObject(M):typeof M=="string"?M:""}function stringifyArray(M){for(var $="",I,N=0,B=M.length;N-1?unknownElementCache[M]=$.constructor===window.HTMLUnknownElement||$.constructor===window.HTMLElement:unknownElementCache[M]=/HTMLUnknownElement/.test($.toString())}var isTextInputType=makeMap$1("text,number,password,search,email,tel,url");function query(M){if(typeof M=="string"){var $=document.querySelector(M);return $||document.createElement("div")}else return M}function createElement(M,$){var I=document.createElement(M);return M!=="select"||$.data&&$.data.attrs&&$.data.attrs.multiple!==void 0&&I.setAttribute("multiple","multiple"),I}function createElementNS(M,$){return document.createElementNS(namespaceMap[M],$)}function createTextNode(M){return document.createTextNode(M)}function createComment(M){return document.createComment(M)}function insertBefore$1(M,$,I){M.insertBefore($,I)}function removeChild(M,$){M.removeChild($)}function appendChild(M,$){M.appendChild($)}function parentNode$1(M){return M.parentNode}function nextSibling(M){return M.nextSibling}function tagName(M){return M.tagName}function setTextContent(M,$){M.textContent=$}function setStyleScope(M,$){M.setAttribute($,"")}var nodeOps=Object.freeze({__proto__:null,createElement,createElementNS,createTextNode,createComment,insertBefore:insertBefore$1,removeChild,appendChild,parentNode:parentNode$1,nextSibling,tagName,setTextContent,setStyleScope}),ref={create:function(M,$){registerRef($)},update:function(M,$){M.data.ref!==$.data.ref&&(registerRef(M,!0),registerRef($))},destroy:function(M){registerRef(M,!0)}};function registerRef(M,$){var I=M.data.ref;if(isDef(I)){var N=M.context,B=M.componentInstance||M.elm,j=$?null:B,U=$?void 0:B;if(isFunction$6(I)){invokeWithErrorHandling(I,N,[j],N,"template ref function");return}var q=M.data.refInFor,Y=typeof I=="string"||typeof I=="number",K=isRef$1(I),G=N.$refs;if(Y||K){if(q){var J=Y?G[I]:I.value;$?isArray$9(J)&&remove$2(J,B):isArray$9(J)?J.includes(B)||J.push(B):Y?(G[I]=[B],setSetupRef(N,I,G[I])):I.value=[B]}else if(Y){if($&&G[I]!==B)return;G[I]=U,setSetupRef(N,I,j)}else if(K){if($&&I.value!==B)return;I.value=j}}}}function setSetupRef(M,$,I){var N=M._setupState;N&&hasOwn$4(N,$)&&(isRef$1(N[$])?N[$].value=I:N[$]=I)}var emptyNode=new VNode("",{},[]),hooks$2=["create","activate","update","remove","destroy"];function sameVnode(M,$){return M.key===$.key&&M.asyncFactory===$.asyncFactory&&(M.tag===$.tag&&M.isComment===$.isComment&&isDef(M.data)===isDef($.data)&&sameInputType(M,$)||isTrue(M.isAsyncPlaceholder)&&isUndef($.asyncFactory.error))}function sameInputType(M,$){if(M.tag!=="input")return!0;var I,N=isDef(I=M.data)&&isDef(I=I.attrs)&&I.type,B=isDef(I=$.data)&&isDef(I=I.attrs)&&I.type;return N===B||isTextInputType(N)&&isTextInputType(B)}function createKeyToOldIdx(M,$,I){var N,B,j={};for(N=$;N<=I;++N)B=M[N].key,isDef(B)&&(j[B]=N);return j}function createPatchFunction(M){var $,I,N={},B=M.modules,j=M.nodeOps;for($=0;$Fe?(Wt=isUndef(Ae[qe+1])?null:Ae[qe+1].elm,le(ve,Wt,Ae,Le,qe,Se)):Le>qe&&ue(we,Re,Fe)}function ge(ve,we,Ae,Se){for(var Pe=Ae;Pe-1?baseSetAttr(M,$,I):isBooleanAttr$1($)?isFalsyAttrValue(I)?M.removeAttribute($):(I=$==="allowfullscreen"&&M.tagName==="EMBED"?"true":$,M.setAttribute($,I)):isEnumeratedAttr($)?M.setAttribute($,convertEnumeratedValue($,I)):isXlink($)?isFalsyAttrValue(I)?M.removeAttributeNS(xlinkNS,getXlinkProp($)):M.setAttributeNS(xlinkNS,$,I):baseSetAttr(M,$,I)}function baseSetAttr(M,$,I){if(isFalsyAttrValue(I))M.removeAttribute($);else{if(isIE$1&&!isIE9&&M.tagName==="TEXTAREA"&&$==="placeholder"&&I!==""&&!M.__ieph){var N=function(B){B.stopImmediatePropagation(),M.removeEventListener("input",N)};M.addEventListener("input",N),M.__ieph=!0}M.setAttribute($,I)}}var attrs={create:updateAttrs,update:updateAttrs};function updateClass(M,$){var I=$.elm,N=$.data,B=M.data;if(!(isUndef(N.staticClass)&&isUndef(N.class)&&(isUndef(B)||isUndef(B.staticClass)&&isUndef(B.class)))){var j=genClassForVnode($),U=I._transitionClasses;isDef(U)&&(j=concat$3(j,stringifyClass(U))),j!==I._prevClass&&(I.setAttribute("class",j),I._prevClass=j)}}var klass$1={create:updateClass,update:updateClass},validDivisionCharRE=/[\w).+\-_$\]]/;function parseFilters(M){var $=!1,I=!1,N=!1,B=!1,j=0,U=0,q=0,Y=0,K,G,J,Z,ee;for(J=0;J=0&&(se=M.charAt(te),se===" ");te--);(!se||!validDivisionCharRE.test(se))&&(B=!0)}}Z===void 0?Z=M.slice(0,J).trim():Y!==0&&re();function re(){(ee||(ee=[])).push(M.slice(Y,J).trim()),Y=J+1}if(ee)for(J=0;J-1?{exp:M.slice(0,index$3),key:'"'+M.slice(index$3+1)+'"'}:{exp:M,key:null};for(str=M,index$3=expressionPos=expressionEndPos=0;!eof();)chr=next(),isStringStart(chr)?parseString(chr):chr===91&&parseBracket(chr);return{exp:M.slice(0,expressionPos),key:M.slice(expressionPos+1,expressionEndPos)}}function next(){return str.charCodeAt(++index$3)}function eof(){return index$3>=len}function isStringStart(M){return M===34||M===39}function parseBracket(M){var $=1;for(expressionPos=index$3;!eof();){if(M=next(),isStringStart(M)){parseString(M);continue}if(M===91&&$++,M===93&&$--,$===0){expressionEndPos=index$3;break}}}function parseString(M){for(var $=M;!eof()&&(M=next(),M!==$););}var RANGE_TOKEN="__r",CHECKBOX_RADIO_TOKEN="__c";function model$1(M,$,I){var N=$.value,B=$.modifiers,j=M.tag,U=M.attrsMap.type;if(M.component)return genComponentModel(M,N,B),!1;if(j==="select")genSelect(M,N,B);else if(j==="input"&&U==="checkbox")genCheckboxModel(M,N,B);else if(j==="input"&&U==="radio")genRadioModel(M,N,B);else if(j==="input"||j==="textarea")genDefaultModel(M,N,B);else if(!config$1.isReservedTag(j))return genComponentModel(M,N,B),!1;return!0}function genCheckboxModel(M,$,I){var N=I&&I.number,B=getBindingAttr(M,"value")||"null",j=getBindingAttr(M,"true-value")||"true",U=getBindingAttr(M,"false-value")||"false";addProp(M,"checked","Array.isArray(".concat($,")")+"?_i(".concat($,",").concat(B,")>-1")+(j==="true"?":(".concat($,")"):":_q(".concat($,",").concat(j,")"))),addHandler(M,"change","var $$a=".concat($,",")+"$$el=$event.target,"+"$$c=$$el.checked?(".concat(j,"):(").concat(U,");")+"if(Array.isArray($$a)){"+"var $$v=".concat(N?"_n("+B+")":B,",")+"$$i=_i($$a,$$v);"+"if($$el.checked){$$i<0&&(".concat(genAssignmentCode($,"$$a.concat([$$v])"),")}")+"else{$$i>-1&&(".concat(genAssignmentCode($,"$$a.slice(0,$$i).concat($$a.slice($$i+1))"),")}")+"}else{".concat(genAssignmentCode($,"$$c"),"}"),null,!0)}function genRadioModel(M,$,I){var N=I&&I.number,B=getBindingAttr(M,"value")||"null";B=N?"_n(".concat(B,")"):B,addProp(M,"checked","_q(".concat($,",").concat(B,")")),addHandler(M,"change",genAssignmentCode($,B),null,!0)}function genSelect(M,$,I){var N=I&&I.number,B='Array.prototype.filter.call($event.target.options,function(o){return o.selected}).map(function(o){var val = "_value" in o ? o._value : o.value;'+"return ".concat(N?"_n(val)":"val","})"),j="$event.target.multiple ? $$selectedVal : $$selectedVal[0]",U="var $$selectedVal = ".concat(B,";");U="".concat(U," ").concat(genAssignmentCode($,j)),addHandler(M,"change",U,null,!0)}function genDefaultModel(M,$,I){var N=M.attrsMap.type,B=I||{},j=B.lazy,U=B.number,q=B.trim,Y=!j&&N!=="range",K=j?"change":N==="range"?RANGE_TOKEN:"input",G="$event.target.value";q&&(G="$event.target.value.trim()"),U&&(G="_n(".concat(G,")"));var J=genAssignmentCode($,G);Y&&(J="if($event.target.composing)return;".concat(J)),addProp(M,"value","(".concat($,")")),addHandler(M,K,J,null,!0),(q||U)&&addHandler(M,"blur","$forceUpdate()")}function normalizeEvents(M){if(isDef(M[RANGE_TOKEN])){var $=isIE$1?"change":"input";M[$]=[].concat(M[RANGE_TOKEN],M[$]||[]),delete M[RANGE_TOKEN]}isDef(M[CHECKBOX_RADIO_TOKEN])&&(M.change=[].concat(M[CHECKBOX_RADIO_TOKEN],M.change||[]),delete M[CHECKBOX_RADIO_TOKEN])}var target$2;function createOnceHandler(M,$,I){var N=target$2;return function B(){var j=$.apply(null,arguments);j!==null&&remove(M,B,I,N)}}var useMicrotaskFix=isUsingMicroTask&&!(isFF&&Number(isFF[1])<=53);function add$3(M,$,I,N){if(useMicrotaskFix){var B=currentFlushTimestamp,j=$;$=j._wrapper=function(U){if(U.target===U.currentTarget||U.timeStamp>=B||U.timeStamp<=0||U.target.ownerDocument!==document)return j.apply(this,arguments)}}target$2.addEventListener(M,$,supportsPassive$1?{capture:I,passive:N}:I)}function remove(M,$,I,N){(N||target$2).removeEventListener(M,$._wrapper||$,I)}function updateDOMListeners(M,$){if(!(isUndef(M.data.on)&&isUndef($.data.on))){var I=$.data.on||{},N=M.data.on||{};target$2=$.elm||M.elm,normalizeEvents(I),updateListeners(I,N,add$3,remove,createOnceHandler,$.context),target$2=void 0}}var events={create:updateDOMListeners,update:updateDOMListeners,destroy:function(M){return updateDOMListeners(M,emptyNode)}},svgContainer;function updateDOMProps(M,$){if(!(isUndef(M.data.domProps)&&isUndef($.data.domProps))){var I,N,B=$.elm,j=M.data.domProps||{},U=$.data.domProps||{};(isDef(U.__ob__)||isTrue(U._v_attr_proxy))&&(U=$.data.domProps=extend$6({},U));for(I in j)I in U||(B[I]="");for(I in U){if(N=U[I],I==="textContent"||I==="innerHTML"){if($.children&&($.children.length=0),N===j[I])continue;B.childNodes.length===1&&B.removeChild(B.childNodes[0])}if(I==="value"&&B.tagName!=="PROGRESS"){B._value=N;var q=isUndef(N)?"":String(N);shouldUpdateValue(B,q)&&(B.value=q)}else if(I==="innerHTML"&&isSVG(B.tagName)&&isUndef(B.innerHTML)){svgContainer=svgContainer||document.createElement("div"),svgContainer.innerHTML="".concat(N,"");for(var Y=svgContainer.firstChild;B.firstChild;)B.removeChild(B.firstChild);for(;Y.firstChild;)B.appendChild(Y.firstChild)}else if(N!==j[I])try{B[I]=N}catch{}}}}function shouldUpdateValue(M,$){return!M.composing&&(M.tagName==="OPTION"||isNotInFocusAndDirty(M,$)||isDirtyWithModifiers(M,$))}function isNotInFocusAndDirty(M,$){var I=!0;try{I=document.activeElement!==M}catch{}return I&&M.value!==$}function isDirtyWithModifiers(M,$){var I=M.value,N=M._vModifiers;if(isDef(N)){if(N.number)return toNumber(I)!==toNumber($);if(N.trim)return I.trim()!==$.trim()}return I!==$}var domProps={create:updateDOMProps,update:updateDOMProps},parseStyleText=cached(function(M){var $={},I=/;(?![^(]*\))/g,N=/:(.+)/;return M.split(I).forEach(function(B){if(B){var j=B.split(N);j.length>1&&($[j[0].trim()]=j[1].trim())}}),$});function normalizeStyleData(M){var $=normalizeStyleBinding(M.style);return M.staticStyle?extend$6(M.staticStyle,$):$}function normalizeStyleBinding(M){return Array.isArray(M)?toObject$1(M):typeof M=="string"?parseStyleText(M):M}function getStyle(M,$){var I={},N;if($)for(var B=M;B.componentInstance;)B=B.componentInstance._vnode,B&&B.data&&(N=normalizeStyleData(B.data))&&extend$6(I,N);(N=normalizeStyleData(M.data))&&extend$6(I,N);for(var j=M;j=j.parent;)j.data&&(N=normalizeStyleData(j.data))&&extend$6(I,N);return I}var cssVarRE=/^--/,importantRE=/\s*!important$/,setProp=function(M,$,I){if(cssVarRE.test($))M.style.setProperty($,I);else if(importantRE.test(I))M.style.setProperty(hyphenate($),I.replace(importantRE,""),"important");else{var N=normalize$1($);if(Array.isArray(I))for(var B=0,j=I.length;B-1?$.split(whitespaceRE$1).forEach(function(N){return M.classList.add(N)}):M.classList.add($);else{var I=" ".concat(M.getAttribute("class")||""," ");I.indexOf(" "+$+" ")<0&&M.setAttribute("class",(I+$).trim())}}function removeClass(M,$){if(!(!$||!($=$.trim())))if(M.classList)$.indexOf(" ")>-1?$.split(whitespaceRE$1).forEach(function(B){return M.classList.remove(B)}):M.classList.remove($),M.classList.length||M.removeAttribute("class");else{for(var I=" ".concat(M.getAttribute("class")||""," "),N=" "+$+" ";I.indexOf(N)>=0;)I=I.replace(N," ");I=I.trim(),I?M.setAttribute("class",I):M.removeAttribute("class")}}function resolveTransition(M){if(M){if(typeof M=="object"){var $={};return M.css!==!1&&extend$6($,autoCssTransition(M.name||"v")),extend$6($,M),$}else if(typeof M=="string")return autoCssTransition(M)}}var autoCssTransition=cached(function(M){return{enterClass:"".concat(M,"-enter"),enterToClass:"".concat(M,"-enter-to"),enterActiveClass:"".concat(M,"-enter-active"),leaveClass:"".concat(M,"-leave"),leaveToClass:"".concat(M,"-leave-to"),leaveActiveClass:"".concat(M,"-leave-active")}}),hasTransition=inBrowser&&!isIE9,TRANSITION="transition",ANIMATION="animation",transitionProp="transition",transitionEndEvent="transitionend",animationProp="animation",animationEndEvent="animationend";hasTransition&&(window.ontransitionend===void 0&&window.onwebkittransitionend!==void 0&&(transitionProp="WebkitTransition",transitionEndEvent="webkitTransitionEnd"),window.onanimationend===void 0&&window.onwebkitanimationend!==void 0&&(animationProp="WebkitAnimation",animationEndEvent="webkitAnimationEnd"));var raf=inBrowser?window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout:function(M){return M()};function nextFrame$1(M){raf(function(){raf(M)})}function addTransitionClass(M,$){var I=M._transitionClasses||(M._transitionClasses=[]);I.indexOf($)<0&&(I.push($),addClass(M,$))}function removeTransitionClass(M,$){M._transitionClasses&&remove$2(M._transitionClasses,$),removeClass(M,$)}function whenTransitionEnds(M,$,I){var N=getTransitionInfo(M,$),B=N.type,j=N.timeout,U=N.propCount;if(!B)return I();var q=B===TRANSITION?transitionEndEvent:animationEndEvent,Y=0,K=function(){M.removeEventListener(q,G),I()},G=function(J){J.target===M&&++Y>=U&&K()};setTimeout(function(){Y0&&(K=TRANSITION,G=j,J=B.length):$===ANIMATION?Y>0&&(K=ANIMATION,G=Y,J=q.length):(G=Math.max(j,Y),K=G>0?j>Y?TRANSITION:ANIMATION:null,J=K?K===TRANSITION?B.length:q.length:0);var Z=K===TRANSITION&&transformRE.test(I[transitionProp+"Property"]);return{type:K,timeout:G,propCount:J,hasTransform:Z}}function getTimeout(M,$){for(;M.length<$.length;)M=M.concat(M);return Math.max.apply(null,$.map(function(I,N){return toMs(I)+toMs(M[N])}))}function toMs(M){return Number(M.slice(0,-1).replace(",","."))*1e3}function enter$1(M,$){var I=M.elm;isDef(I._leaveCb)&&(I._leaveCb.cancelled=!0,I._leaveCb());var N=resolveTransition(M.data.transition);if(!isUndef(N)&&!(isDef(I._enterCb)||I.nodeType!==1)){for(var B=N.css,j=N.type,U=N.enterClass,q=N.enterToClass,Y=N.enterActiveClass,K=N.appearClass,G=N.appearToClass,J=N.appearActiveClass,Z=N.beforeEnter,ee=N.enter,te=N.afterEnter,se=N.enterCancelled,re=N.beforeAppear,ne=N.appear,le=N.afterAppear,me=N.appearCancelled,ue=N.duration,_e=activeInstance,fe=activeInstance.$vnode;fe&&fe.parent;)_e=fe.context,fe=fe.parent;var ge=!_e._isMounted||!M.isRootInsert;if(!(ge&&!ne&&ne!=="")){var ye=ge&&K?K:U,xe=ge&&J?J:Y,oe=ge&&G?G:q,be=ge&&re||Z,ve=ge&&isFunction$6(ne)?ne:ee,we=ge&&le||te,Ae=ge&&me||se,Se=toNumber(isObject$6(ue)?ue.enter:ue),Pe=B!==!1&&!isIE9,Re=getHookArgumentsLength(ve),Le=I._enterCb=once$2(function(){Pe&&(removeTransitionClass(I,oe),removeTransitionClass(I,xe)),Le.cancelled?(Pe&&removeTransitionClass(I,ye),Ae&&Ae(I)):we&&we(I),I._enterCb=null});M.data.show||mergeVNodeHook(M,"insert",function(){var Fe=I.parentNode,Ze=Fe&&Fe._pending&&Fe._pending[M.key];Ze&&Ze.tag===M.tag&&Ze.elm._leaveCb&&Ze.elm._leaveCb(),ve&&ve(I,Le)}),be&&be(I),Pe&&(addTransitionClass(I,ye),addTransitionClass(I,xe),nextFrame$1(function(){removeTransitionClass(I,ye),Le.cancelled||(addTransitionClass(I,oe),Re||(isValidDuration(Se)?setTimeout(Le,Se):whenTransitionEnds(I,j,Le)))})),M.data.show&&($&&$(),ve&&ve(I,Le)),!Pe&&!Re&&Le()}}}function leave(M,$){var I=M.elm;isDef(I._enterCb)&&(I._enterCb.cancelled=!0,I._enterCb());var N=resolveTransition(M.data.transition);if(isUndef(N)||I.nodeType!==1)return $();if(isDef(I._leaveCb))return;var B=N.css,j=N.type,U=N.leaveClass,q=N.leaveToClass,Y=N.leaveActiveClass,K=N.beforeLeave,G=N.leave,J=N.afterLeave,Z=N.leaveCancelled,ee=N.delayLeave,te=N.duration,se=B!==!1&&!isIE9,re=getHookArgumentsLength(G),ne=toNumber(isObject$6(te)?te.leave:te),le=I._leaveCb=once$2(function(){I.parentNode&&I.parentNode._pending&&(I.parentNode._pending[M.key]=null),se&&(removeTransitionClass(I,q),removeTransitionClass(I,Y)),le.cancelled?(se&&removeTransitionClass(I,U),Z&&Z(I)):($(),J&&J(I)),I._leaveCb=null});ee?ee(me):me();function me(){le.cancelled||(!M.data.show&&I.parentNode&&((I.parentNode._pending||(I.parentNode._pending={}))[M.key]=M),K&&K(I),se&&(addTransitionClass(I,U),addTransitionClass(I,Y),nextFrame$1(function(){removeTransitionClass(I,U),le.cancelled||(addTransitionClass(I,q),re||(isValidDuration(ne)?setTimeout(le,ne):whenTransitionEnds(I,j,le)))})),G&&G(I,le),!se&&!re&&le())}}function isValidDuration(M){return typeof M=="number"&&!isNaN(M)}function getHookArgumentsLength(M){if(isUndef(M))return!1;var $=M.fns;return isDef($)?getHookArgumentsLength(Array.isArray($)?$[0]:$):(M._length||M.length)>1}function _enter(M,$){$.data.show!==!0&&enter$1($)}var transition$1=inBrowser?{create:_enter,activate:_enter,remove:function(M,$){M.data.show!==!0?leave(M,$):$()}}:{},platformModules=[attrs,klass$1,events,domProps,style$1$1,transition$1],modules$1=platformModules.concat(baseModules),patch=createPatchFunction({nodeOps,modules:modules$1});isIE9&&document.addEventListener("selectionchange",function(){var M=document.activeElement;M&&M.vmodel&&trigger$1(M,"input")});var directive$2={inserted:function(M,$,I,N){I.tag==="select"?(N.elm&&!N.elm._vOptions?mergeVNodeHook(I,"postpatch",function(){directive$2.componentUpdated(M,$,I)}):setSelected(M,$,I.context),M._vOptions=[].map.call(M.options,getValue)):(I.tag==="textarea"||isTextInputType(M.type))&&(M._vModifiers=$.modifiers,$.modifiers.lazy||(M.addEventListener("compositionstart",onCompositionStart),M.addEventListener("compositionend",onCompositionEnd),M.addEventListener("change",onCompositionEnd),isIE9&&(M.vmodel=!0)))},componentUpdated:function(M,$,I){if(I.tag==="select"){setSelected(M,$,I.context);var N=M._vOptions,B=M._vOptions=[].map.call(M.options,getValue);if(B.some(function(U,q){return!looseEqual(U,N[q])})){var j=M.multiple?$.value.some(function(U){return hasNoMatchingOption(U,B)}):$.value!==$.oldValue&&hasNoMatchingOption($.value,B);j&&trigger$1(M,"change")}}}};function setSelected(M,$,I){actuallySetSelected(M,$),(isIE$1||isEdge)&&setTimeout(function(){actuallySetSelected(M,$)},0)}function actuallySetSelected(M,$,I){var N=$.value,B=M.multiple;if(!(B&&!Array.isArray(N))){for(var j,U,q=0,Y=M.options.length;q-1,U.selected!==j&&(U.selected=j);else if(looseEqual(getValue(U),N)){M.selectedIndex!==q&&(M.selectedIndex=q);return}B||(M.selectedIndex=-1)}}function hasNoMatchingOption(M,$){return $.every(function(I){return!looseEqual(I,M)})}function getValue(M){return"_value"in M?M._value:M.value}function onCompositionStart(M){M.target.composing=!0}function onCompositionEnd(M){M.target.composing&&(M.target.composing=!1,trigger$1(M.target,"input"))}function trigger$1(M,$){var I=document.createEvent("HTMLEvents");I.initEvent($,!0,!0),M.dispatchEvent(I)}function locateNode(M){return M.componentInstance&&(!M.data||!M.data.transition)?locateNode(M.componentInstance._vnode):M}var show={bind:function(M,$,I){var N=$.value;I=locateNode(I);var B=I.data&&I.data.transition,j=M.__vOriginalDisplay=M.style.display==="none"?"":M.style.display;N&&B?(I.data.show=!0,enter$1(I,function(){M.style.display=j})):M.style.display=N?j:"none"},update:function(M,$,I){var N=$.value,B=$.oldValue;if(!N!=!B){I=locateNode(I);var j=I.data&&I.data.transition;j?(I.data.show=!0,N?enter$1(I,function(){M.style.display=M.__vOriginalDisplay}):leave(I,function(){M.style.display="none"})):M.style.display=N?M.__vOriginalDisplay:"none"}},unbind:function(M,$,I,N,B){B||(M.style.display=M.__vOriginalDisplay)}},platformDirectives={model:directive$2,show},transitionProps={name:String,appear:Boolean,css:Boolean,mode:String,type:String,enterClass:String,leaveClass:String,enterToClass:String,leaveToClass:String,enterActiveClass:String,leaveActiveClass:String,appearClass:String,appearActiveClass:String,appearToClass:String,duration:[Number,String,Object]};function getRealChild(M){var $=M&&M.componentOptions;return $&&$.Ctor.options.abstract?getRealChild(getFirstComponentChild($.children)):M}function extractTransitionData(M){var $={},I=M.$options;for(var N in I.propsData)$[N]=M[N];var B=I._parentListeners;for(var N in B)$[camelize(N)]=B[N];return $}function placeholder(M,$){if(/\d-keep-alive$/.test($.tag))return M("keep-alive",{props:$.componentOptions.propsData})}function hasParentTransition(M){for(;M=M.parent;)if(M.data.transition)return!0}function isSameChild(M,$){return $.key===M.key&&$.tag===M.tag}var isNotTextNode=function(M){return M.tag||isAsyncPlaceholder(M)},isVShowDirective=function(M){return M.name==="show"},Transition={name:"transition",props:transitionProps,abstract:!0,render:function(M){var $=this,I=this.$slots.default;if(I&&(I=I.filter(isNotTextNode),!!I.length)){var N=this.mode,B=I[0];if(hasParentTransition(this.$vnode))return B;var j=getRealChild(B);if(!j)return B;if(this._leaving)return placeholder(M,B);var U="__transition-".concat(this._uid,"-");j.key=j.key==null?j.isComment?U+"comment":U+j.tag:isPrimitive(j.key)?String(j.key).indexOf(U)===0?j.key:U+j.key:j.key;var q=(j.data||(j.data={})).transition=extractTransitionData(this),Y=this._vnode,K=getRealChild(Y);if(j.data.directives&&j.data.directives.some(isVShowDirective)&&(j.data.show=!0),K&&K.data&&!isSameChild(j,K)&&!isAsyncPlaceholder(K)&&!(K.componentInstance&&K.componentInstance._vnode.isComment)){var G=K.data.transition=extend$6({},q);if(N==="out-in")return this._leaving=!0,mergeVNodeHook(G,"afterLeave",function(){$._leaving=!1,$.$forceUpdate()}),placeholder(M,B);if(N==="in-out"){if(isAsyncPlaceholder(j))return Y;var J,Z=function(){J()};mergeVNodeHook(q,"afterEnter",Z),mergeVNodeHook(q,"enterCancelled",Z),mergeVNodeHook(G,"delayLeave",function(ee){J=ee})}}return B}}},props=extend$6({tag:String,moveClass:String},transitionProps);delete props.mode;var TransitionGroup={props,beforeMount:function(){var M=this,$=this._update;this._update=function(I,N){var B=setActiveInstance(M);M.__patch__(M._vnode,M.kept,!1,!0),M._vnode=M.kept,B(),$.call(M,I,N)}},render:function(M){for(var $=this.tag||this.$vnode.data.tag||"span",I=Object.create(null),N=this.prevChildren=this.children,B=this.$slots.default||[],j=this.children=[],U=extractTransitionData(this),q=0;qj&&(B.push(Y=M.slice(j,q)),N.push(JSON.stringify(Y)));var K=parseFilters(U[1].trim());N.push("_s(".concat(K,")")),B.push({"@binding":K}),j=q+U[0].length}return j\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,dynamicArgAttribute=/^\s*((?:v-[\w-]+:|@|:|#)\[[^=]+?\][^\s"'<>\/=]*)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,ncname="[a-zA-Z_][\\-\\.0-9_a-zA-Z".concat(unicodeRegExp.source,"]*"),qnameCapture="((?:".concat(ncname,"\\:)?").concat(ncname,")"),startTagOpen=new RegExp("^<".concat(qnameCapture)),startTagClose=/^\s*(\/?)>/,endTag=new RegExp("^<\\/".concat(qnameCapture,"[^>]*>")),doctype=/^]+>/i,comment=/^",""":'"',"&":"&"," ":` +`," ":" ","'":"'"},encodedAttr=/&(?:lt|gt|quot|amp|#39);/g,encodedAttrWithNewLines=/&(?:lt|gt|quot|amp|#39|#10|#9);/g,isIgnoreNewlineTag=makeMap$1("pre,textarea",!0),shouldIgnoreFirstNewline=function(M,$){return M&&isIgnoreNewlineTag(M)&&$[0]===` +`};function decodeAttr(M,$){var I=$?encodedAttrWithNewLines:encodedAttr;return M.replace(I,function(N){return decodingMap[N]})}function parseHTML(M,$){for(var I=[],N=$.expectHTML,B=$.isUnaryTag||no,j=$.canBeLeftOpenTag||no,U=0,q,Y,K=function(){if(q=M,!Y||!isPlainTextElement(Y)){var se=M.indexOf("<");if(se===0){if(comment.test(M)){var re=M.indexOf("-->");if(re>=0)return $.shouldKeepComment&&$.comment&&$.comment(M.substring(4,re),U,U+re+3),J(re+3),"continue"}if(conditionalComment.test(M)){var ne=M.indexOf("]>");if(ne>=0)return J(ne+2),"continue"}var le=M.match(doctype);if(le)return J(le[0].length),"continue";var me=M.match(endTag);if(me){var ue=U;return J(me[0].length),te(me[1],ue,U),"continue"}var _e=Z();if(_e)return ee(_e),shouldIgnoreFirstNewline(_e.tagName,M)&&J(1),"continue"}var fe=void 0,ge=void 0,ye=void 0;if(se>=0){for(ge=M.slice(se);!endTag.test(ge)&&!startTagOpen.test(ge)&&!comment.test(ge)&&!conditionalComment.test(ge)&&(ye=ge.indexOf("<",1),!(ye<0));)se+=ye,ge=M.slice(se);fe=M.substring(0,se)}se<0&&(fe=M),fe&&J(fe.length),$.chars&&fe&&$.chars(fe,U-fe.length,U)}else{var xe=0,oe=Y.toLowerCase(),be=reCache[oe]||(reCache[oe]=new RegExp("([\\s\\S]*?)(]*>)","i")),ge=M.replace(be,function(we,Ae,Se){return xe=Se.length,!isPlainTextElement(oe)&&oe!=="noscript"&&(Ae=Ae.replace(//g,"$1").replace(//g,"$1")),shouldIgnoreFirstNewline(oe,Ae)&&(Ae=Ae.slice(1)),$.chars&&$.chars(Ae),""});U+=M.length-ge.length,M=ge,te(oe,U-xe,U)}if(M===q)return $.chars&&$.chars(M),"break"};M;){var G=K();if(G==="break")break}te();function J(se){U+=se,M=M.substring(se)}function Z(){var se=M.match(startTagOpen);if(se){var re={tagName:se[1],attrs:[],start:U};J(se[0].length);for(var ne=void 0,le=void 0;!(ne=M.match(startTagClose))&&(le=M.match(dynamicArgAttribute)||M.match(attribute));)le.start=U,J(le[0].length),le.end=U,re.attrs.push(le);if(ne)return re.unarySlash=ne[1],J(ne[0].length),re.end=U,re}}function ee(se){var re=se.tagName,ne=se.unarySlash;N&&(Y==="p"&&isNonPhrasingTag(re)&&te(Y),j(re)&&Y===re&&te(re));for(var le=B(re)||!!ne,me=se.attrs.length,ue=new Array(me),_e=0;_e=0&&I[le].lowerCasedTag!==me;le--);else le=0;if(le>=0){for(var ue=I.length-1;ue>=le;ue--)$.end&&$.end(I[ue].tag,re,ne);I.length=le,Y=le&&I[le-1].tag}else me==="br"?$.start&&$.start(se,[],!0,re,ne):me==="p"&&($.start&&$.start(se,[],!1,re,ne),$.end&&$.end(se,re,ne))}}var onRE=/^@|^v-on:/,dirRE=/^v-|^@|^:|^#/,forAliasRE=/([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/,forIteratorRE=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,stripParensRE=/^\(|\)$/g,dynamicArgRE=/^\[.*\]$/,argRE=/:(.*)$/,bindRE=/^:|^\.|^v-bind:/,modifierRE=/\.[^.\]]+(?=[^\]]*$)/g,slotRE=/^v-slot(:|$)|^#/,lineBreakRE=/[\r\n]/,whitespaceRE=/[ \f\t\r\n]+/g,decodeHTMLCached=cached(he.decode),emptySlotScopeToken="_empty_",warn$4,delimiters,transforms,preTransforms,postTransforms,platformIsPreTag,platformMustUseProp,platformGetTagNamespace;function createASTElement(M,$,I){return{type:1,tag:M,attrsList:$,attrsMap:makeAttrsMap($),rawAttrsMap:{},parent:I,children:[]}}function parse$3(M,$){warn$4=$.warn||baseWarn,platformIsPreTag=$.isPreTag||no,platformMustUseProp=$.mustUseProp||no,platformGetTagNamespace=$.getTagNamespace||no,$.isReservedTag,transforms=pluckModuleFunction($.modules,"transformNode"),preTransforms=pluckModuleFunction($.modules,"preTransformNode"),postTransforms=pluckModuleFunction($.modules,"postTransformNode"),delimiters=$.delimiters;var I=[],N=$.preserveWhitespace!==!1,B=$.whitespace,j,U,q=!1,Y=!1;function K(J){if(G(J),!q&&!J.processed&&(J=processElement(J,$)),!I.length&&J!==j&&j.if&&(J.elseif||J.else)&&addIfCondition(j,{exp:J.elseif,block:J}),U&&!J.forbidden)if(J.elseif||J.else)processIfConditions(J,U);else{if(J.slotScope){var Z=J.slotTarget||'"default"';(U.scopedSlots||(U.scopedSlots={}))[Z]=J}U.children.push(J),J.parent=U}J.children=J.children.filter(function(te){return!te.slotScope}),G(J),J.pre&&(q=!1),platformIsPreTag(J.tag)&&(Y=!1);for(var ee=0;ee|^function(?:\s+[\w$]+)?\s*\(/,fnInvokeRE=/\([^)]*?\);*$/,simplePathRE=/^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['[^']*?']|\["[^"]*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*$/,keyCodes={esc:27,tab:9,enter:13,space:32,up:38,left:37,right:39,down:40,delete:[8,46]},keyNames={esc:["Esc","Escape"],tab:"Tab",enter:"Enter",space:[" ","Spacebar"],up:["Up","ArrowUp"],left:["Left","ArrowLeft"],right:["Right","ArrowRight"],down:["Down","ArrowDown"],delete:["Backspace","Delete","Del"]},genGuard=function(M){return"if(".concat(M,")return null;")},modifierCode={stop:"$event.stopPropagation();",prevent:"$event.preventDefault();",self:genGuard("$event.target !== $event.currentTarget"),ctrl:genGuard("!$event.ctrlKey"),shift:genGuard("!$event.shiftKey"),alt:genGuard("!$event.altKey"),meta:genGuard("!$event.metaKey"),left:genGuard("'button' in $event && $event.button !== 0"),middle:genGuard("'button' in $event && $event.button !== 1"),right:genGuard("'button' in $event && $event.button !== 2")};function genHandlers(M,$){var I=$?"nativeOn:":"on:",N="",B="";for(var j in M){var U=genHandler(M[j]);M[j]&&M[j].dynamic?B+="".concat(j,",").concat(U,","):N+='"'.concat(j,'":').concat(U,",")}return N="{".concat(N.slice(0,-1),"}"),B?I+"_d(".concat(N,",[").concat(B.slice(0,-1),"])"):I+N}function genHandler(M){if(!M)return"function(){}";if(Array.isArray(M))return"[".concat(M.map(function(G){return genHandler(G)}).join(","),"]");var $=simplePathRE.test(M.value),I=fnExpRE.test(M.value),N=simplePathRE.test(M.value.replace(fnInvokeRE,""));if(M.modifiers){var B="",j="",U=[],q=function(G){if(modifierCode[G])j+=modifierCode[G],keyCodes[G]&&U.push(G);else if(G==="exact"){var J=M.modifiers;j+=genGuard(["ctrl","shift","alt","meta"].filter(function(Z){return!J[Z]}).map(function(Z){return"$event.".concat(Z,"Key")}).join("||"))}else U.push(G)};for(var Y in M.modifiers)q(Y);U.length&&(B+=genKeyFilter(U)),j&&(B+=j);var K=$?"return ".concat(M.value,".apply(null, arguments)"):I?"return (".concat(M.value,").apply(null, arguments)"):N?"return ".concat(M.value):M.value;return"function($event){".concat(B).concat(K,"}")}else return $||I?M.value:"function($event){".concat(N?"return ".concat(M.value):M.value,"}")}function genKeyFilter(M){return"if(!$event.type.indexOf('key')&&"+"".concat(M.map(genFilterCode).join("&&"),")return null;")}function genFilterCode(M){var $=parseInt(M,10);if($)return"$event.keyCode!==".concat($);var I=keyCodes[M],N=keyNames[M];return"_k($event.keyCode,"+"".concat(JSON.stringify(M),",")+"".concat(JSON.stringify(I),",")+"$event.key,"+"".concat(JSON.stringify(N))+")"}function on$1(M,$){M.wrapListeners=function(I){return"_g(".concat(I,",").concat($.value,")")}}function bind$8(M,$){M.wrapData=function(I){return"_b(".concat(I,",'").concat(M.tag,"',").concat($.value,",").concat($.modifiers&&$.modifiers.prop?"true":"false").concat($.modifiers&&$.modifiers.sync?",true":"",")")}}var baseDirectives={on:on$1,bind:bind$8,cloak:noop$2},CodegenState=function(){function M($){this.options=$,this.warn=$.warn||baseWarn,this.transforms=pluckModuleFunction($.modules,"transformCode"),this.dataGenFns=pluckModuleFunction($.modules,"genData"),this.directives=extend$6(extend$6({},baseDirectives),$.directives);var I=$.isReservedTag||no;this.maybeComponent=function(N){return!!N.component||!I(N.tag)},this.onceId=0,this.staticRenderFns=[],this.pre=!1}return M}();function generate(M,$){var I=new CodegenState($),N=M?M.tag==="script"?"null":genElement(M,I):'_c("div")';return{render:"with(this){return ".concat(N,"}"),staticRenderFns:I.staticRenderFns}}function genElement(M,$){if(M.parent&&(M.pre=M.pre||M.parent.pre),M.staticRoot&&!M.staticProcessed)return genStatic(M,$);if(M.once&&!M.onceProcessed)return genOnce(M,$);if(M.for&&!M.forProcessed)return genFor(M,$);if(M.if&&!M.ifProcessed)return genIf(M,$);if(M.tag==="template"&&!M.slotTarget&&!$.pre)return genChildren(M,$)||"void 0";if(M.tag==="slot")return genSlot(M,$);var I=void 0;if(M.component)I=genComponent(M.component,M,$);else{var N=void 0,B=$.maybeComponent(M);(!M.plain||M.pre&&B)&&(N=genData(M,$));var j=void 0,U=$.options.bindings;B&&U&&U.__isScriptSetup!==!1&&(j=checkBindingType(U,M.tag)),j||(j="'".concat(M.tag,"'"));var q=M.inlineTemplate?null:genChildren(M,$,!0);I="_c(".concat(j).concat(N?",".concat(N):"").concat(q?",".concat(q):"",")")}for(var Y=0;Y<$.transforms.length;Y++)I=$.transforms[Y](M,I);return I}function checkBindingType(M,$){var I=camelize($),N=capitalize$1(I),B=function(q){if(M[$]===q)return $;if(M[I]===q)return I;if(M[N]===q)return N},j=B("setup-const")||B("setup-reactive-const");if(j)return j;var U=B("setup-let")||B("setup-ref")||B("setup-maybe-ref");if(U)return U}function genStatic(M,$){M.staticProcessed=!0;var I=$.pre;return M.pre&&($.pre=M.pre),$.staticRenderFns.push("with(this){return ".concat(genElement(M,$),"}")),$.pre=I,"_m(".concat($.staticRenderFns.length-1).concat(M.staticInFor?",true":"",")")}function genOnce(M,$){if(M.onceProcessed=!0,M.if&&!M.ifProcessed)return genIf(M,$);if(M.staticInFor){for(var I="",N=M.parent;N;){if(N.for){I=N.key;break}N=N.parent}return I?"_o(".concat(genElement(M,$),",").concat($.onceId++,",").concat(I,")"):genElement(M,$)}else return genStatic(M,$)}function genIf(M,$,I,N){return M.ifProcessed=!0,genIfConditions(M.ifConditions.slice(),$,I,N)}function genIfConditions(M,$,I,N){if(!M.length)return N||"_e()";var B=M.shift();if(B.exp)return"(".concat(B.exp,")?").concat(j(B.block),":").concat(genIfConditions(M,$,I,N));return"".concat(j(B.block));function j(U){return I?I(U,$):U.once?genOnce(U,$):genElement(U,$)}}function genFor(M,$,I,N){var B=M.for,j=M.alias,U=M.iterator1?",".concat(M.iterator1):"",q=M.iterator2?",".concat(M.iterator2):"";return M.forProcessed=!0,"".concat(N||"_l","((").concat(B,"),")+"function(".concat(j).concat(U).concat(q,"){")+"return ".concat((I||genElement)(M,$))+"})"}function genData(M,$){var I="{",N=genDirectives(M,$);N&&(I+=N+","),M.key&&(I+="key:".concat(M.key,",")),M.ref&&(I+="ref:".concat(M.ref,",")),M.refInFor&&(I+="refInFor:true,"),M.pre&&(I+="pre:true,"),M.component&&(I+='tag:"'.concat(M.tag,'",'));for(var B=0;B<$.dataGenFns.length;B++)I+=$.dataGenFns[B](M);if(M.attrs&&(I+="attrs:".concat(genProps(M.attrs),",")),M.props&&(I+="domProps:".concat(genProps(M.props),",")),M.events&&(I+="".concat(genHandlers(M.events,!1),",")),M.nativeEvents&&(I+="".concat(genHandlers(M.nativeEvents,!0),",")),M.slotTarget&&!M.slotScope&&(I+="slot:".concat(M.slotTarget,",")),M.scopedSlots&&(I+="".concat(genScopedSlots(M,M.scopedSlots,$),",")),M.model&&(I+="model:{value:".concat(M.model.value,",callback:").concat(M.model.callback,",expression:").concat(M.model.expression,"},")),M.inlineTemplate){var j=genInlineTemplate(M,$);j&&(I+="".concat(j,","))}return I=I.replace(/,$/,"")+"}",M.dynamicAttrs&&(I="_b(".concat(I,',"').concat(M.tag,'",').concat(genProps(M.dynamicAttrs),")")),M.wrapData&&(I=M.wrapData(I)),M.wrapListeners&&(I=M.wrapListeners(I)),I}function genDirectives(M,$){var I=M.directives;if(I){var N="directives:[",B=!1,j,U,q,Y;for(j=0,U=I.length;j>>0}function containsSlotChild(M){return M.type===1?M.tag==="slot"?!0:M.children.some(containsSlotChild):!1}function genScopedSlot(M,$){var I=M.attrsMap["slot-scope"];if(M.if&&!M.ifProcessed&&!I)return genIf(M,$,genScopedSlot,"null");if(M.for&&!M.forProcessed)return genFor(M,$,genScopedSlot);var N=M.slotScope===emptySlotScopeToken?"":String(M.slotScope),B="function(".concat(N,"){")+"return ".concat(M.tag==="template"?M.if&&I?"(".concat(M.if,")?").concat(genChildren(M,$)||"undefined",":undefined"):genChildren(M,$)||"undefined":genElement(M,$),"}"),j=N?"":",proxy:true";return"{key:".concat(M.slotTarget||'"default"',",fn:").concat(B).concat(j,"}")}function genChildren(M,$,I,N,B){var j=M.children;if(j.length){var U=j[0];if(j.length===1&&U.for&&U.tag!=="template"&&U.tag!=="slot"){var q=I?$.maybeComponent(U)?",1":",0":"";return"".concat((N||genElement)(U,$)).concat(q)}var Y=I?getNormalizationType(j,$.maybeComponent):0,K=B||genNode;return"[".concat(j.map(function(G){return K(G,$)}).join(","),"]").concat(Y?",".concat(Y):"")}}function getNormalizationType(M,$){for(var I=0,N=0;N`:`
`,div$1.innerHTML.indexOf(" ")>0}var shouldDecodeNewlines=inBrowser?getShouldDecode(!1):!1,shouldDecodeNewlinesForHref=inBrowser?getShouldDecode(!0):!1,idToTemplate=cached(function(M){var $=query(M);return $&&$.innerHTML}),mount=Vue$3.prototype.$mount;Vue$3.prototype.$mount=function(M,$){if(M=M&&query(M),M===document.body||M===document.documentElement)return this;var I=this.$options;if(!I.render){var N=I.template;if(N)if(typeof N=="string")N.charAt(0)==="#"&&(N=idToTemplate(N));else if(N.nodeType)N=N.innerHTML;else return this;else M&&(N=getOuterHTML(M));if(N){var B=compileToFunctions(N,{outputSourceRange:!1,shouldDecodeNewlines,shouldDecodeNewlinesForHref,delimiters:I.delimiters,comments:I.comments},this),j=B.render,U=B.staticRenderFns;I.render=j,I.staticRenderFns=U}}return mount.call(this,M,$)};function getOuterHTML(M){if(M.outerHTML)return M.outerHTML;var $=document.createElement("div");return $.appendChild(M.cloneNode(!0)),$.innerHTML}Vue$3.compile=compileToFunctions;const vue_esm=Object.freeze(Object.defineProperty({__proto__:null,EffectScope,computed,customRef,default:Vue$3,defineAsyncComponent,defineComponent,del,effectScope,getCurrentInstance,getCurrentScope,h:h$2,inject,isProxy,isReactive:isReactive$1,isReadonly,isRef:isRef$1,isShallow,markRaw,mergeDefaults,nextTick:nextTick$1,onActivated,onBeforeMount,onBeforeUnmount,onBeforeUpdate,onDeactivated,onErrorCaptured,onMounted,onRenderTracked,onRenderTriggered,onScopeDispose,onServerPrefetch,onUnmounted,onUpdated,provide,proxyRefs,reactive:reactive$1,readonly:readonly$1,ref:ref$1,set:set$3,shallowReactive,shallowReadonly,shallowRef,toRaw:toRaw$1,toRef,toRefs,triggerRef,unref,useAttrs,useCssModule,useCssVars,useListeners,useSlots,version:version$3,watch,watchEffect,watchPostEffect,watchSyncEffect},Symbol.toStringTag,{value:"Module"}));var commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function getDefaultExportFromCjs$1(M){return M&&M.__esModule&&Object.prototype.hasOwnProperty.call(M,"default")?M.default:M}function getAugmentedNamespace(M){if(M.__esModule)return M;var $=M.default;if(typeof $=="function"){var I=function N(){return this instanceof N?Reflect.construct($,arguments,this.constructor):$.apply(this,arguments)};I.prototype=$.prototype}else I={};return Object.defineProperty(I,"__esModule",{value:!0}),Object.keys(M).forEach(function(N){var B=Object.getOwnPropertyDescriptor(M,N);Object.defineProperty(I,N,B.get?B:{enumerable:!0,get:function(){return M[N]}})}),I}var vueToasted_min={exports:{}};(function(M,$){(function(I,N){M.exports=N()})(commonjsGlobal,function(){return function(I){function N(j){if(B[j])return B[j].exports;var U=B[j]={i:j,l:!1,exports:{}};return I[j].call(U.exports,U,U.exports,N),U.l=!0,U.exports}var B={};return N.m=I,N.c=B,N.i=function(j){return j},N.d=function(j,U,q){N.o(j,U)||Object.defineProperty(j,U,{configurable:!1,enumerable:!0,get:q})},N.n=function(j){var U=j&&j.__esModule?function(){return j.default}:function(){return j};return N.d(U,"a",U),U},N.o=function(j,U){return Object.prototype.hasOwnProperty.call(j,U)},N.p="/dist/",N(N.s=6)}([function(I,N,B){function j(){se=!1}function U(le){if(!le)return void(ee!==ne&&(ee=ne,j()));if(le!==ee){if(le.length!==ne.length)throw new Error("Custom alphabet for shortid must be "+ne.length+" unique characters. You submitted "+le.length+" characters: "+le);var me=le.split("").filter(function(ue,_e,fe){return _e!==fe.lastIndexOf(ue)});if(me.length)throw new Error("Custom alphabet for shortid must be "+ne.length+" unique characters. These characters were not unique: "+me.join(", "));ee=le,j()}}function q(le){return U(le),ee}function Y(le){re.seed(le),te!==le&&(j(),te=le)}function K(){ee||U(ne);for(var le,me=ee.split(""),ue=[],_e=re.nextValue();me.length>0;)_e=re.nextValue(),le=Math.floor(_e*me.length),ue.push(me.splice(le,1)[0]);return ue.join("")}function G(){return se||(se=K())}function J(le){return G()[le]}function Z(){return ee||ne}var ee,te,se,re=B(19),ne="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_-";I.exports={get:Z,characters:q,seed:Y,lookup:J,shuffled:G}},function(I,N,B){var j=B(5),U=B.n(j);N.a={animateIn:function(q){U()({targets:q,translateY:"-35px",opacity:1,duration:300,easing:"easeOutCubic"})},animateOut:function(q,Y){U()({targets:q,opacity:0,marginTop:"-40px",duration:300,easing:"easeOutExpo",complete:Y})},animateOutBottom:function(q,Y){U()({targets:q,opacity:0,marginBottom:"-40px",duration:300,easing:"easeOutExpo",complete:Y})},animateReset:function(q){U()({targets:q,left:0,opacity:1,duration:300,easing:"easeOutExpo"})},animatePanning:function(q,Y,K){U()({targets:q,duration:10,easing:"easeOutQuad",left:Y,opacity:K})},animatePanEnd:function(q,Y){U()({targets:q,opacity:0,duration:300,easing:"easeOutExpo",complete:Y})},clearAnimation:function(q){var Y=U.a.timeline();q.forEach(function(K){Y.add({targets:K.el,opacity:0,right:"-40px",duration:300,offset:"-=150",easing:"easeOutExpo",complete:function(){K.remove()}})})}}},function(I,N,B){I.exports=B(16)},function(I,N,B){B.d(N,"a",function(){return K});var j=B(8),U=B(1),q=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(te){return typeof te}:function(te){return te&&typeof Symbol=="function"&&te.constructor===Symbol&&te!==Symbol.prototype?"symbol":typeof te},Y=B(2);B(11).polyfill();var K=function te(se){var re=this;return this.id=Y.generate(),this.options=se,this.cached_options={},this.global={},this.groups=[],this.toasts=[],this.container=null,Z(this),J(this),this.group=function(ne){ne||(ne={}),ne.globalToasts||(ne.globalToasts={}),Object.assign(ne.globalToasts,re.global);var le=new te(ne);return re.groups.push(le),le},this.register=function(ne,le,me){return me=me||{},ee(re,ne,le,me)},this.show=function(ne,le){return G(re,ne,le)},this.success=function(ne,le){return le=le||{},le.type="success",G(re,ne,le)},this.info=function(ne,le){return le=le||{},le.type="info",G(re,ne,le)},this.error=function(ne,le){return le=le||{},le.type="error",G(re,ne,le)},this.remove=function(ne){re.toasts=re.toasts.filter(function(le){return le.el.hash!==ne.hash}),ne.parentNode&&ne.parentNode.removeChild(ne)},this.clear=function(ne){return U.a.clearAnimation(re.toasts,function(){ne&&ne()}),re.toasts=[],!0},this},G=function(te,se,re){re=re||{};var ne=null;if((re===void 0?"undefined":q(re))!=="object")return console.error("Options should be a type of object. given : "+re),null;te.options.singleton&&te.toasts.length>0&&(te.cached_options=re,te.toasts[te.toasts.length-1].goAway(0));var le=Object.assign({},te.options);return Object.assign(le,re),ne=B.i(j.a)(te,se,le),te.toasts.push(ne),ne},J=function(te){var se=te.options.globalToasts,re=function(ne,le){return typeof le=="string"&&te[le]?te[le].apply(te,[ne,{}]):G(te,ne,le)};se&&(te.global={},Object.keys(se).forEach(function(ne){te.global[ne]=function(){var le=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return se[ne].apply(null,[le,re])}}))},Z=function(te){var se=document.createElement("div");se.id=te.id,se.setAttribute("role","status"),se.setAttribute("aria-live","polite"),se.setAttribute("aria-atomic","false"),document.body.appendChild(se),te.container=se},ee=function(te,se,re,ne){te.options.globalToasts||(te.options.globalToasts={}),te.options.globalToasts[se]=function(le,me){var ue=null;return typeof re=="string"&&(ue=re),typeof re=="function"&&(ue=re(le)),me(ue,ne)},J(te)}},function(I,N,B){B(22);var j=B(21)(null,null,null,null);I.exports=j.exports},function(I,N,B){(function(j){var U,q,Y,K={scope:{}};K.defineProperty=typeof Object.defineProperties=="function"?Object.defineProperty:function(J,Z,ee){if(ee.get||ee.set)throw new TypeError("ES3 does not support getters and setters.");J!=Array.prototype&&J!=Object.prototype&&(J[Z]=ee.value)},K.getGlobal=function(J){return typeof window<"u"&&window===J?J:j!==void 0&&j!=null?j:J},K.global=K.getGlobal(this),K.SYMBOL_PREFIX="jscomp_symbol_",K.initSymbol=function(){K.initSymbol=function(){},K.global.Symbol||(K.global.Symbol=K.Symbol)},K.symbolCounter_=0,K.Symbol=function(J){return K.SYMBOL_PREFIX+(J||"")+K.symbolCounter_++},K.initSymbolIterator=function(){K.initSymbol();var J=K.global.Symbol.iterator;J||(J=K.global.Symbol.iterator=K.global.Symbol("iterator")),typeof Array.prototype[J]!="function"&&K.defineProperty(Array.prototype,J,{configurable:!0,writable:!0,value:function(){return K.arrayIterator(this)}}),K.initSymbolIterator=function(){}},K.arrayIterator=function(J){var Z=0;return K.iteratorPrototype(function(){return Zut&&(ut+=1),1ut?dt:ut<2/3?rt+(dt-rt)*(2/3-ut)*6:rt}var ke=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(We)||/hsla\((\d+),\s*([\d.]+)%,\s*([\d.]+)%,\s*([\d.]+)\)/g.exec(We);We=parseInt(ke[1])/360;var Ue=parseInt(ke[2])/100,Oe=parseInt(ke[3])/100,ke=ke[4]||1;if(Ue==0)Oe=Ue=We=Oe;else{var $e=.5>Oe?Oe*(1+Ue):Oe+Ue-Oe*Ue,Ge=2*Oe-$e,Oe=xt(Ge,$e,We+1/3),Ue=xt(Ge,$e,We);We=xt(Ge,$e,We-1/3)}return"rgba("+255*Oe+","+255*Ue+","+255*We+","+ke+")"}function _e(We){if(We=/([\+\-]?[0-9#\.]+)(%|px|pt|em|rem|in|cm|mm|ex|ch|pc|vw|vh|vmin|vmax|deg|rad|turn)?$/.exec(We))return We[2]}function fe(We){return-1=Ot.currentTime)for(var mn=0;mn=yn||!Fn)&&(Ot.began||(Ot.began=!0,ke("begin")),ke("run")),Pt>en&&Pt=Fn&<!==Fn||!Fn)&&(Oe(Fn),pt||$e())),ke("update"),dn>=Fn&&(Ot.remaining?(dt=rt,Ot.direction==="alternate"&&(Ot.reversed=!Ot.reversed)):(Ot.pause(),Ot.completed||(Ot.completed=!0,ke("complete"),"Promise"in window&&(it(),ot=xt()))),ut=0)}We=We===void 0?{}:We;var rt,dt,ut=0,it=null,ot=xt(),Ot=Lt(We);return Ot.reset=function(){var dn=Ot.direction,Fn=Ot.loop;for(Ot.currentTime=0,Ot.progress=0,Ot.paused=!0,Ot.began=!1,Ot.completed=!1,Ot.reversed=dn==="reverse",Ot.remaining=dn==="alternate"&&Fn===1?2:Fn,Oe(0),dn=Ot.children.length;dn--;)Ot.children[dn].reset()},Ot.tick=function(dn){rt=dn,dt||(dt=rt),Ge((ut+rt-dt)*Ht.speed)},Ot.seek=function(dn){Ge(Ue(dn))},Ot.pause=function(){var dn=An.indexOf(Ot);-1=xt&&0<=Oe&&1>=Oe){var $e=new Float32Array(11);if(xt!==Ue||Oe!==ke)for(var Ge=0;11>Ge;++Ge)$e[Ge]=We(.1*Ge,xt,Oe);return function(rt){if(xt===Ue&&Oe===ke)return rt;if(rt===0)return 0;if(rt===1)return 1;for(var dt=0,ut=1;ut!==10&&$e[ut]<=rt;++ut)dt+=.1;--ut;var ut=dt+(rt-$e[ut])/($e[ut+1]-$e[ut])*.1,it=3*(1-3*Oe+3*xt)*ut*ut+2*(3*Oe-6*xt)*ut+3*xt;if(.001<=it){for(dt=0;4>dt&&(it=3*(1-3*Oe+3*xt)*ut*ut+2*(3*Oe-6*xt)*ut+3*xt)!==0;++dt)var ot=We(ut,xt,Oe)-rt,ut=ut-ot/it;rt=ut}else if(it===0)rt=ut;else{var ut=dt,dt=dt+.1,Ot=0;do ot=ut+(dt-ut)/2,it=We(ot,xt,Oe)-rt,0++Ot);rt=ot}return We(rt,Ue,ke)}}}}(),Pn=function(){function We(Ge,rt){return Ge===0||Ge===1?Ge:-Math.pow(2,10*(Ge-1))*Math.sin(2*(Ge-1-rt/(2*Math.PI)*Math.asin(1))*Math.PI/rt)}var xt,Ue="Quad Cubic Quart Quint Sine Expo Circ Back Elastic".split(" "),Oe={In:[[.55,.085,.68,.53],[.55,.055,.675,.19],[.895,.03,.685,.22],[.755,.05,.855,.06],[.47,0,.745,.715],[.95,.05,.795,.035],[.6,.04,.98,.335],[.6,-.28,.735,.045],We],Out:[[.25,.46,.45,.94],[.215,.61,.355,1],[.165,.84,.44,1],[.23,1,.32,1],[.39,.575,.565,1],[.19,1,.22,1],[.075,.82,.165,1],[.175,.885,.32,1.275],function(Ge,rt){return 1-We(1-Ge,rt)}],InOut:[[.455,.03,.515,.955],[.645,.045,.355,1],[.77,0,.175,1],[.86,0,.07,1],[.445,.05,.55,.95],[1,0,0,1],[.785,.135,.15,.86],[.68,-.55,.265,1.55],function(Ge,rt){return .5>Ge?We(2*Ge,rt)/2:1-We(-2*Ge+2,rt)/2}]},ke={linear:Hn(.25,.25,.75,.75)},$e={};for(xt in Oe)$e.type=xt,Oe[$e.type].forEach(function(Ge){return function(rt,dt){ke["ease"+Ge.type+Ue[dt]]=gn.fnc(rt)?rt:Hn.apply(G,rt)}}($e)),$e={type:$e.type};return ke}(),Bn={css:function(We,xt,Ue){return We.style[xt]=Ue},attribute:function(We,xt,Ue){return We.setAttribute(xt,Ue)},object:function(We,xt,Ue){return We[xt]=Ue},transform:function(We,xt,Ue,Oe,ke){Oe[ke]||(Oe[ke]=[]),Oe[ke].push(xt+"("+Ue+")")}},An=[],Dn=0,kt=function(){function We(){Dn=requestAnimationFrame(xt)}function xt(Ue){var Oe=An.length;if(Oe){for(var ke=0;keOe&&(xt.duration=ke.duration),xt.children.push(ke)}),xt.seek(0),xt.reset(),xt.autoplay&&xt.restart(),xt},xt},Ht.random=function(We,xt){return Math.floor(Math.random()*(xt-We+1))+We},Ht})}).call(N,B(25))},function(I,N,B){Object.defineProperty(N,"__esModule",{value:!0});var j=B(3),U=B(4),q=B.n(U),Y={install:function(K,G){G||(G={});var J=new j.a(G);K.component("toasted",q.a),K.toasted=K.prototype.$toasted=J}};typeof window<"u"&&window.Vue&&(window.Toasted=Y),N.default=Y},function(I,N,B){B.d(N,"a",function(){return G});var j=B(1),U=this,q=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(J){return typeof J}:function(J){return J&&typeof Symbol=="function"&&J.constructor===Symbol&&J!==Symbol.prototype?"symbol":typeof J},Y=function(J,Z,ee){return setTimeout(function(){if(ee.cached_options.position&&ee.cached_options.position.includes("bottom"))return void j.a.animateOutBottom(J,function(){ee.remove(J)});j.a.animateOut(J,function(){ee.remove(J)})},Z),!0},K=function(J,Z){return((typeof HTMLElement>"u"?"undefined":q(HTMLElement))==="object"?Z instanceof HTMLElement:Z&&(Z===void 0?"undefined":q(Z))==="object"&&Z!==null&&Z.nodeType===1&&typeof Z.nodeName=="string")?J.appendChild(Z):J.innerHTML=Z,U},G=function(J,Z){var ee=!1;return{el:J,text:function(te){return K(J,te),this},goAway:function(){var te=arguments.length>0&&arguments[0]!==void 0?arguments[0]:800;return ee=!0,Y(J,te,Z)},remove:function(){Z.remove(J)},disposed:function(){return ee}}}},function(I,N,B){var j=B(12),U=B.n(j),q=B(1),Y=B(7),K=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(le){return typeof le}:function(le){return le&&typeof Symbol=="function"&&le.constructor===Symbol&&le!==Symbol.prototype?"symbol":typeof le},G=B(2);String.prototype.includes||Object.defineProperty(String.prototype,"includes",{value:function(le,me){return typeof me!="number"&&(me=0),!(me+le.length>this.length)&&this.indexOf(le,me)!==-1}});var J={},Z=null,ee=function(le){return le.className=le.className||null,le.onComplete=le.onComplete||null,le.position=le.position||"top-right",le.duration=le.duration||null,le.keepOnHover=le.keepOnHover||!1,le.theme=le.theme||"toasted-primary",le.type=le.type||"default",le.containerClass=le.containerClass||null,le.fullWidth=le.fullWidth||!1,le.icon=le.icon||null,le.action=le.action||null,le.fitToScreen=le.fitToScreen||null,le.closeOnSwipe=le.closeOnSwipe===void 0||le.closeOnSwipe,le.iconPack=le.iconPack||"material",le.className&&typeof le.className=="string"&&(le.className=le.className.split(" ")),le.className||(le.className=[]),le.theme&&le.className.push(le.theme.trim()),le.type&&le.className.push(le.type),le.containerClass&&typeof le.containerClass=="string"&&(le.containerClass=le.containerClass.split(" ")),le.containerClass||(le.containerClass=[]),le.position&&le.containerClass.push(le.position.trim()),le.fullWidth&&le.containerClass.push("full-width"),le.fitToScreen&&le.containerClass.push("fit-to-screen"),J=le,le},te=function(le,me){var ue=document.createElement("div");if(ue.classList.add("toasted"),ue.hash=G.generate(),me.className&&me.className.forEach(function(ge){ue.classList.add(ge)}),((typeof HTMLElement>"u"?"undefined":K(HTMLElement))==="object"?le instanceof HTMLElement:le&&(le===void 0?"undefined":K(le))==="object"&&le!==null&&le.nodeType===1&&typeof le.nodeName=="string")?ue.appendChild(le):ue.innerHTML=le,se(me,ue),me.closeOnSwipe){var _e=new U.a(ue,{prevent_default:!1});_e.on("pan",function(ge){var ye=ge.deltaX;ue.classList.contains("panning")||ue.classList.add("panning");var xe=1-Math.abs(ye/80);xe<0&&(xe=0),q.a.animatePanning(ue,ye,xe)}),_e.on("panend",function(ge){var ye=ge.deltaX;Math.abs(ye)>80?q.a.animatePanEnd(ue,function(){typeof me.onComplete=="function"&&me.onComplete(),ue.parentNode&&Z.remove(ue)}):(ue.classList.remove("panning"),q.a.animateReset(ue))})}if(Array.isArray(me.action))me.action.forEach(function(ge){var ye=ne(ge,B.i(Y.a)(ue,Z));ye&&ue.appendChild(ye)});else if(K(me.action)==="object"){var fe=ne(me.action,B.i(Y.a)(ue,Z));fe&&ue.appendChild(fe)}return ue},se=function(le,me){if(le.icon){var ue=document.createElement("i");switch(ue.setAttribute("aria-hidden","true"),le.iconPack){case"fontawesome":ue.classList.add("fa");var _e=le.icon.name?le.icon.name:le.icon;_e.includes("fa-")?ue.classList.add(_e.trim()):ue.classList.add("fa-"+_e.trim());break;case"mdi":ue.classList.add("mdi");var fe=le.icon.name?le.icon.name:le.icon;fe.includes("mdi-")?ue.classList.add(fe.trim()):ue.classList.add("mdi-"+fe.trim());break;case"custom-class":var ge=le.icon.name?le.icon.name:le.icon;typeof ge=="string"?ge.split(" ").forEach(function(xe){ue.classList.add(xe)}):Array.isArray(ge)&&ge.forEach(function(xe){ue.classList.add(xe.trim())});break;case"callback":var ye=le.icon&&le.icon instanceof Function?le.icon:null;ye&&(ue=ye(ue));break;default:ue.classList.add("material-icons"),ue.textContent=le.icon.name?le.icon.name:le.icon}le.icon.after&&ue.classList.add("after"),re(le,ue,me)}},re=function(le,me,ue){le.icon&&(le.icon.after&&le.icon.name?ue.appendChild(me):(le.icon.name,ue.insertBefore(me,ue.firstChild)))},ne=function(le,me){if(!le)return null;var ue=document.createElement("a");if(ue.classList.add("action"),ue.classList.add("ripple"),le.text&&(ue.text=le.text),le.href&&(ue.href=le.href),le.target&&(ue.target=le.target),le.icon){ue.classList.add("icon");var _e=document.createElement("i");switch(J.iconPack){case"fontawesome":_e.classList.add("fa"),le.icon.includes("fa-")?_e.classList.add(le.icon.trim()):_e.classList.add("fa-"+le.icon.trim());break;case"mdi":_e.classList.add("mdi"),le.icon.includes("mdi-")?_e.classList.add(le.icon.trim()):_e.classList.add("mdi-"+le.icon.trim());break;case"custom-class":typeof le.icon=="string"?le.icon.split(" ").forEach(function(fe){ue.classList.add(fe)}):Array.isArray(le.icon)&&le.icon.forEach(function(fe){ue.classList.add(fe.trim())});break;default:_e.classList.add("material-icons"),_e.textContent=le.icon}ue.appendChild(_e)}return le.class&&(typeof le.class=="string"?le.class.split(" ").forEach(function(fe){ue.classList.add(fe)}):Array.isArray(le.class)&&le.class.forEach(function(fe){ue.classList.add(fe.trim())})),le.push&&ue.addEventListener("click",function(fe){if(fe.preventDefault(),!J.router)return void console.warn("[vue-toasted] : Vue Router instance is not attached. please check the docs");J.router.push(le.push),le.push.dontClose||me.goAway(0)}),le.onClick&&typeof le.onClick=="function"&&ue.addEventListener("click",function(fe){le.onClick&&(fe.preventDefault(),le.onClick(fe,me))}),ue};N.a=function(le,me,ue){Z=le,ue=ee(ue);var _e=Z.container;ue.containerClass.unshift("toasted-container"),_e.className!==ue.containerClass.join(" ")&&(_e.className="",ue.containerClass.forEach(function(oe){_e.classList.add(oe)}));var fe=te(me,ue);me&&_e.appendChild(fe),fe.style.opacity=0,q.a.animateIn(fe);var ge=ue.duration,ye=void 0;if(ge!==null){var xe=function(){return setInterval(function(){fe.parentNode===null&&window.clearInterval(ye),fe.classList.contains("panning")||(ge-=20),ge<=0&&(q.a.animateOut(fe,function(){typeof ue.onComplete=="function"&&ue.onComplete(),fe.parentNode&&Z.remove(fe)}),window.clearInterval(ye))},20)};ye=xe(),ue.keepOnHover&&(fe.addEventListener("mouseover",function(){window.clearInterval(ye)}),fe.addEventListener("mouseout",function(){ye=xe()}))}return B.i(Y.a)(fe,Z)}},function(I,N,B){N=I.exports=B(10)(),N.push([I.i,".toasted{padding:0 20px}.toasted.rounded{border-radius:24px}.toasted .primary,.toasted.toasted-primary{border-radius:2px;min-height:38px;line-height:1.1em;background-color:#353535;padding:6px 20px;font-size:15px;font-weight:300;color:#fff;box-shadow:0 1px 3px rgba(0,0,0,.12),0 1px 2px rgba(0,0,0,.24)}.toasted .primary.success,.toasted.toasted-primary.success{background:#4caf50}.toasted .primary.error,.toasted.toasted-primary.error{background:#f44336}.toasted .primary.info,.toasted.toasted-primary.info{background:#3f51b5}.toasted .primary .action,.toasted.toasted-primary .action{color:#a1c2fa}.toasted.bubble{border-radius:30px;min-height:38px;line-height:1.1em;background-color:#ff7043;padding:0 20px;font-size:15px;font-weight:300;color:#fff;box-shadow:0 1px 3px rgba(0,0,0,.12),0 1px 2px rgba(0,0,0,.24)}.toasted.bubble.success{background:#4caf50}.toasted.bubble.error{background:#f44336}.toasted.bubble.info{background:#3f51b5}.toasted.bubble .action{color:#8e2b0c}.toasted.outline{border-radius:30px;min-height:38px;line-height:1.1em;background-color:#fff;border:1px solid #676767;padding:0 20px;font-size:15px;color:#676767;box-shadow:0 1px 3px rgba(0,0,0,.12),0 1px 2px rgba(0,0,0,.24);font-weight:700}.toasted.outline.success{color:#4caf50;border-color:#4caf50}.toasted.outline.error{color:#f44336;border-color:#f44336}.toasted.outline.info{color:#3f51b5;border-color:#3f51b5}.toasted.outline .action{color:#607d8b}.toasted-container{position:fixed;z-index:10000}.toasted-container,.toasted-container.full-width{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.toasted-container.full-width{max-width:86%;width:100%}.toasted-container.full-width.fit-to-screen{min-width:100%}.toasted-container.full-width.fit-to-screen .toasted:first-child{margin-top:0}.toasted-container.full-width.fit-to-screen.top-right{top:0;right:0}.toasted-container.full-width.fit-to-screen.top-left{top:0;left:0}.toasted-container.full-width.fit-to-screen.top-center{top:0;left:0;-webkit-transform:translateX(0);transform:translateX(0)}.toasted-container.full-width.fit-to-screen.bottom-right{right:0;bottom:0}.toasted-container.full-width.fit-to-screen.bottom-left{left:0;bottom:0}.toasted-container.full-width.fit-to-screen.bottom-center{left:0;bottom:0;-webkit-transform:translateX(0);transform:translateX(0)}.toasted-container.top-right{top:10%;right:7%}.toasted-container.top-left{top:10%;left:7%}.toasted-container.top-center{top:10%;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%)}.toasted-container.bottom-right{right:5%;bottom:7%}.toasted-container.bottom-left{left:5%;bottom:7%}.toasted-container.bottom-center{left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%);bottom:7%}.toasted-container.bottom-left .toasted,.toasted-container.top-left .toasted{float:left}.toasted-container.bottom-right .toasted,.toasted-container.top-right .toasted{float:right}.toasted-container .toasted{top:35px;width:auto;clear:both;margin-top:10px;position:relative;max-width:100%;height:auto;word-break:normal;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;box-sizing:inherit}.toasted-container .toasted .fa,.toasted-container .toasted .fab,.toasted-container .toasted .far,.toasted-container .toasted .fas,.toasted-container .toasted .material-icons,.toasted-container .toasted .mdi{margin-right:.5rem;margin-left:-.4rem}.toasted-container .toasted .fa.after,.toasted-container .toasted .fab.after,.toasted-container .toasted .far.after,.toasted-container .toasted .fas.after,.toasted-container .toasted .material-icons.after,.toasted-container .toasted .mdi.after{margin-left:.5rem;margin-right:-.4rem}.toasted-container .toasted .action{text-decoration:none;font-size:.8rem;padding:8px;margin:5px -7px 5px 7px;border-radius:3px;text-transform:uppercase;letter-spacing:.03em;font-weight:600;cursor:pointer}.toasted-container .toasted .action.icon{padding:4px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.toasted-container .toasted .action.icon .fa,.toasted-container .toasted .action.icon .material-icons,.toasted-container .toasted .action.icon .mdi{margin-right:0;margin-left:4px}.toasted-container .toasted .action.icon:hover{text-decoration:none}.toasted-container .toasted .action:hover{text-decoration:underline}@media only screen and (max-width:600px){.toasted-container{min-width:100%}.toasted-container .toasted:first-child{margin-top:0}.toasted-container.top-right{top:0;right:0}.toasted-container.top-left{top:0;left:0}.toasted-container.top-center{top:0;left:0;-webkit-transform:translateX(0);transform:translateX(0)}.toasted-container.bottom-right{right:0;bottom:0}.toasted-container.bottom-left{left:0;bottom:0}.toasted-container.bottom-center{left:0;bottom:0;-webkit-transform:translateX(0);transform:translateX(0)}.toasted-container.bottom-center,.toasted-container.top-center{-ms-flex-align:stretch!important;align-items:stretch!important}.toasted-container.bottom-left .toasted,.toasted-container.bottom-right .toasted,.toasted-container.top-left .toasted,.toasted-container.top-right .toasted{float:none}.toasted-container .toasted{border-radius:0}}",""])},function(I,N){I.exports=function(){var B=[];return B.toString=function(){for(var j=[],U=0;U\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",Jn=U.console&&(U.console.warn||U.console.log);return Jn&&Jn.call(U.console,nn,Un),nt.apply(this,arguments)}}function te(nt,gt,et){var nn,kn=gt.prototype;nn=nt.prototype=Object.create(kn),nn.constructor=nt,nn._super=kn,et&&en(nn,et)}function se(nt,gt){return function(){return nt.apply(gt,arguments)}}function re(nt,gt){return typeof nt==pt?nt.apply(gt&>[0]||K,gt):nt}function ne(nt,gt){return nt===K?gt:nt}function le(nt,gt,et){Z(fe(gt),function(nn){nt.addEventListener(nn,et,!1)})}function me(nt,gt,et){Z(fe(gt),function(nn){nt.removeEventListener(nn,et,!1)})}function ue(nt,gt){for(;nt;){if(nt==gt)return!0;nt=nt.parentNode}return!1}function _e(nt,gt){return nt.indexOf(gt)>-1}function fe(nt){return nt.trim().split(/\s+/g)}function ge(nt,gt,et){if(nt.indexOf&&!et)return nt.indexOf(gt);for(var nn=0;nnxr[gt]}):nn.sort()),nn}function oe(nt,gt){for(var et,nn,kn=gt[0].toUpperCase()+gt.slice(1),Un=0;Un1&&!et.firstMultiple?et.firstMultiple=Fe(gt):kn===1&&(et.firstMultiple=!1);var Un=et.firstInput,Jn=et.firstMultiple,_r=Jn?Jn.center:Un.center,xr=gt.center=Ze(nn);gt.timeStamp=qt(),gt.deltaTime=gt.timeStamp-Un.timeStamp,gt.angle=Rt(_r,xr),gt.distance=Ve(_r,xr),Re(et,gt),gt.offsetDirection=qe(gt.deltaX,gt.deltaY);var Nr=ct(gt.deltaTime,gt.deltaX,gt.deltaY);gt.overallVelocityX=Nr.x,gt.overallVelocityY=Nr.y,gt.overallVelocity=Yt(Nr.x)>Yt(Nr.y)?Nr.x:Nr.y,gt.scale=Jn?Lt(Jn.pointers,nn):1,gt.rotation=Jn?Nt(Jn.pointers,nn):0,gt.maxPointers=et.prevInput?gt.pointers.length>et.prevInput.maxPointers?gt.pointers.length:et.prevInput.maxPointers:gt.pointers.length,Le(et,gt);var Mr=nt.element;ue(gt.srcEvent.target,Mr)&&(Mr=gt.srcEvent.target),gt.target=Mr}function Re(nt,gt){var et=gt.center,nn=nt.offsetDelta||{},kn=nt.prevDelta||{},Un=nt.prevInput||{};gt.eventType!==Sn&&Un.eventType!==jn||(kn=nt.prevDelta={x:Un.deltaX||0,y:Un.deltaY||0},nn=nt.offsetDelta={x:et.x,y:et.y}),gt.deltaX=kn.x+(et.x-nn.x),gt.deltaY=kn.y+(et.y-nn.y)}function Le(nt,gt){var et,nn,kn,Un,Jn=nt.lastInterval||gt,_r=gt.timeStamp-Jn.timeStamp;if(gt.eventType!=ir&&(_r>hn||Jn.velocity===K)){var xr=gt.deltaX-Jn.deltaX,Nr=gt.deltaY-Jn.deltaY,Mr=ct(_r,xr,Nr);nn=Mr.x,kn=Mr.y,et=Yt(Mr.x)>Yt(Mr.y)?Mr.x:Mr.y,Un=qe(xr,Nr),nt.lastInterval=gt}else et=Jn.velocity,nn=Jn.velocityX,kn=Jn.velocityY,Un=Jn.direction;gt.velocity=et,gt.velocityX=nn,gt.velocityY=kn,gt.direction=Un}function Fe(nt){for(var gt=[],et=0;et=Yt(gt)?nt<0?Er:Dr:gt<0?Vr:Ke}function Ve(nt,gt,et){et||(et=_t);var nn=gt[et[0]]-nt[et[0]],kn=gt[et[1]]-nt[et[1]];return Math.sqrt(nn*nn+kn*kn)}function Rt(nt,gt,et){et||(et=_t);var nn=gt[et[0]]-nt[et[0]],kn=gt[et[1]]-nt[et[1]];return 180*Math.atan2(kn,nn)/Math.PI}function Nt(nt,gt){return Rt(gt[1],gt[0],Xt)+Rt(nt[1],nt[0],Xt)}function Lt(nt,gt){return Ve(gt[0],gt[1],Xt)/Ve(nt[0],nt[1],Xt)}function Ht(){this.evEl=Tn,this.evWin=Nn,this.pressed=!1,we.apply(this,arguments)}function Wt(){this.evEl=Rr,this.evWin=tr,we.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}function Jt(){this.evTarget=kr,this.evWin=sr,this.started=!1,we.apply(this,arguments)}function Zt(nt,gt){var et=ye(nt.touches),nn=ye(nt.changedTouches);return gt&(jn|ir)&&(et=xe(et.concat(nn),"identifier",!0)),[et,nn]}function bn(){this.evTarget=mr,this.targetIds={},we.apply(this,arguments)}function gn(nt,gt){var et=ye(nt.touches),nn=this.targetIds;if(gt&(Sn|cr)&&et.length===1)return nn[et[0].identifier]=!0,[et,et];var kn,Un,Jn=ye(nt.changedTouches),_r=[],xr=this.target;if(Un=et.filter(function(Nr){return ue(Nr.target,xr)}),gt===Sn)for(kn=0;kn-1&&nn.splice(Un,1)};setTimeout(kn,br)}}function An(nt){for(var gt=nt.srcEvent.clientX,et=nt.srcEvent.clientY,nn=0;nn-1&&this.requireFail.splice(gt,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(nt){return!!this.simultaneous[nt.id]},emit:function(nt){function gt(kn){et.manager.emit(kn,nt)}var et=this,nn=this.state;nn=cn&>(et.options.event+xt(nn))},tryEmit:function(nt){if(this.canEmit())return this.emit(nt);this.state=32},canEmit:function(){for(var nt=0;ntgt.threshold&&kn>.direction},attrTest:function(nt){return ke.prototype.attrTest.call(this,nt)&&(this.state&pn||!(this.state&pn)&&this.directionTest(nt))},emit:function(nt){this.pX=nt.deltaX,this.pY=nt.deltaY;var gt=Ue(nt.direction);gt&&(nt.additionalEvent=this.options.event+gt),this._super.emit.call(this,nt)}}),te(Ge,ke,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[wt]},attrTest:function(nt){return this._super.attrTest.call(this,nt)&&(Math.abs(nt.scale-1)>this.options.threshold||this.state&pn)},emit:function(nt){if(nt.scale!==1){var gt=nt.scale<1?"in":"out";nt.additionalEvent=this.options.event+gt}this._super.emit.call(this,nt)}}),te(rt,We,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[Qe]},process:function(nt){var gt=this.options,et=nt.pointers.length===gt.pointers,nn=nt.distancegt.time;if(this._input=nt,!nn||!et||nt.eventType&(jn|ir)&&!kn)this.reset();else if(nt.eventType&Sn)this.reset(),this._timer=G(function(){this.state=ur,this.tryEmit()},gt.time,this);else if(nt.eventType&jn)return ur;return 32},reset:function(){clearTimeout(this._timer)},emit:function(nt){this.state===ur&&(nt&&nt.eventType&jn?this.manager.emit(this.options.event+"up",nt):(this._input.timeStamp=qt(),this.manager.emit(this.options.event,this._input)))}}),te(dt,ke,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[wt]},attrTest:function(nt){return this._super.attrTest.call(this,nt)&&(Math.abs(nt.rotation)>this.options.threshold||this.state&pn)}}),te(ut,ke,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:mt|ft,pointers:1},getTouchAction:function(){return $e.prototype.getTouchAction.call(this)},attrTest:function(nt){var gt,et=this.options.direction;return et&(mt|ft)?gt=nt.overallVelocity:et&mt?gt=nt.overallVelocityX:et&ft&&(gt=nt.overallVelocityY),this._super.attrTest.call(this,nt)&&et&nt.offsetDirection&&nt.distance>this.options.threshold&&nt.maxPointers==this.options.pointers&&Yt(gt)>this.options.velocity&&nt.eventType&jn},emit:function(nt){var gt=Ue(nt.offsetDirection);gt&&this.manager.emit(this.options.event+gt,nt),this.manager.emit(this.options.event,nt)}}),te(it,We,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[bt]},process:function(nt){var gt=this.options,et=nt.pointers.length===gt.pointers,nn=nt.distance0&&(Z+=Y(U)),Z+=Y(ee)}var U,q,Y=B(15),K=(B(0),1567752802062),G=7;I.exports=j},function(I,N,B){function j(K){for(var G,J=0,Z="";!G;)Z+=Y(q,U.get(),1),G=Kye.parts.length&&(xe.parts.length=ye.parts.length)}else{for(var be=[],oe=0;oe{$.goAway(0)}}});const Toast={data:{toast:null,flash:null,initialToasts:null},created(){this.flash=Statamic.$config.get("flash"),this.initialToasts=Statamic.$config.get("toasts"),this.$events.$on("toast.success",this.setFlashSuccess),this.$events.$on("toast.error",this.setFlashError),this.$events.$on("toast.info",this.setFlashInfo)},mounted(){this.flashMessages(this.flash),this.flashMessages(this.initialToasts)},methods:{flashMessages(M){M.forEach(({type:$,message:I,duration:N})=>{const B={duration:N};switch($){case"error":this.$toast.error(I,B);break;case"success":this.$toast.success(I,B);break;default:this.$toast.info(I,B)}})},setFlashInfo(M,$){$={iconPack:"callback",icon:I=>(I.innerHTML='',I),...$},this.$toasted.show(M,this.normalizeToastOptions($))},setFlashSuccess(M,$){$={iconPack:"callback",icon:I=>(I.innerHTML='',I),...$},this.$toasted.success(M,this.normalizeToastOptions($))},setFlashError(M,$){$={iconPack:"callback",icon:I=>(I.innerHTML='',I),...$},this.$toasted.error(M,this.normalizeToastOptions($))},normalizeToastOptions(M){return M.duration||delete M.duration,M}}};function _typeof$2(M){"@babel/helpers - typeof";return _typeof$2=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function($){return typeof $}:function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},_typeof$2(M)}function _classCallCheck(M,$){if(!(M instanceof $))throw new TypeError("Cannot call a class as a function")}function _defineProperties(M,$){for(var I=0;I<$.length;I++){var N=$[I];N.enumerable=N.enumerable||!1,N.configurable=!0,"value"in N&&(N.writable=!0),Object.defineProperty(M,N.key,N)}}function _createClass(M,$,I){return $&&_defineProperties(M.prototype,$),I&&_defineProperties(M,I),Object.defineProperty(M,"prototype",{writable:!1}),M}function _extends(){return _extends=Object.assign||function(M){for(var $=1;$"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _assertThisInitialized(M){if(M===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return M}function _possibleConstructorReturn(M,$){if($&&(typeof $=="object"||typeof $=="function"))return $;if($!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(M)}function _createSuper(M){var $=_isNativeReflectConstruct();return function(){var N=_getPrototypeOf(M),B;if($){var j=_getPrototypeOf(this).constructor;B=Reflect.construct(N,arguments,j)}else B=N.apply(this,arguments);return _possibleConstructorReturn(this,B)}}var Channel=function(){function M(){_classCallCheck(this,M)}return _createClass(M,[{key:"listenForWhisper",value:function(I,N){return this.listen(".client-"+I,N)}},{key:"notification",value:function(I){return this.listen(".Illuminate\\Notifications\\Events\\BroadcastNotificationCreated",I)}},{key:"stopListeningForWhisper",value:function(I,N){return this.stopListening(".client-"+I,N)}}]),M}(),EventFormatter=function(){function M($){_classCallCheck(this,M),this.namespace=$}return _createClass(M,[{key:"format",value:function(I){return I.charAt(0)==="."||I.charAt(0)==="\\"?I.substr(1):(this.namespace&&(I=this.namespace+"."+I),I.replace(/\./g,"\\"))}},{key:"setNamespace",value:function(I){this.namespace=I}}]),M}(),PusherChannel=function(M){_inherits(I,M);var $=_createSuper(I);function I(N,B,j){var U;return _classCallCheck(this,I),U=$.call(this),U.name=B,U.pusher=N,U.options=j,U.eventFormatter=new EventFormatter(U.options.namespace),U.subscribe(),U}return _createClass(I,[{key:"subscribe",value:function(){this.subscription=this.pusher.subscribe(this.name)}},{key:"unsubscribe",value:function(){this.pusher.unsubscribe(this.name)}},{key:"listen",value:function(B,j){return this.on(this.eventFormatter.format(B),j),this}},{key:"listenToAll",value:function(B){var j=this;return this.subscription.bind_global(function(U,q){if(!U.startsWith("pusher:")){var Y=j.options.namespace.replace(/\./g,"\\"),K=U.startsWith(Y)?U.substring(Y.length+1):"."+U;B(K,q)}}),this}},{key:"stopListening",value:function(B,j){return j?this.subscription.unbind(this.eventFormatter.format(B),j):this.subscription.unbind(this.eventFormatter.format(B)),this}},{key:"stopListeningToAll",value:function(B){return B?this.subscription.unbind_global(B):this.subscription.unbind_global(),this}},{key:"subscribed",value:function(B){return this.on("pusher:subscription_succeeded",function(){B()}),this}},{key:"error",value:function(B){return this.on("pusher:subscription_error",function(j){B(j)}),this}},{key:"on",value:function(B,j){return this.subscription.bind(B,j),this}}]),I}(Channel),PusherPrivateChannel=function(M){_inherits(I,M);var $=_createSuper(I);function I(){return _classCallCheck(this,I),$.apply(this,arguments)}return _createClass(I,[{key:"whisper",value:function(B,j){return this.pusher.channels.channels[this.name].trigger("client-".concat(B),j),this}}]),I}(PusherChannel),PusherEncryptedPrivateChannel=function(M){_inherits(I,M);var $=_createSuper(I);function I(){return _classCallCheck(this,I),$.apply(this,arguments)}return _createClass(I,[{key:"whisper",value:function(B,j){return this.pusher.channels.channels[this.name].trigger("client-".concat(B),j),this}}]),I}(PusherChannel),PusherPresenceChannel=function(M){_inherits(I,M);var $=_createSuper(I);function I(){return _classCallCheck(this,I),$.apply(this,arguments)}return _createClass(I,[{key:"here",value:function(B){return this.on("pusher:subscription_succeeded",function(j){B(Object.keys(j.members).map(function(U){return j.members[U]}))}),this}},{key:"joining",value:function(B){return this.on("pusher:member_added",function(j){B(j.info)}),this}},{key:"whisper",value:function(B,j){return this.pusher.channels.channels[this.name].trigger("client-".concat(B),j),this}},{key:"leaving",value:function(B){return this.on("pusher:member_removed",function(j){B(j.info)}),this}}]),I}(PusherChannel),SocketIoChannel=function(M){_inherits(I,M);var $=_createSuper(I);function I(N,B,j){var U;return _classCallCheck(this,I),U=$.call(this),U.events={},U.listeners={},U.name=B,U.socket=N,U.options=j,U.eventFormatter=new EventFormatter(U.options.namespace),U.subscribe(),U}return _createClass(I,[{key:"subscribe",value:function(){this.socket.emit("subscribe",{channel:this.name,auth:this.options.auth||{}})}},{key:"unsubscribe",value:function(){this.unbind(),this.socket.emit("unsubscribe",{channel:this.name,auth:this.options.auth||{}})}},{key:"listen",value:function(B,j){return this.on(this.eventFormatter.format(B),j),this}},{key:"stopListening",value:function(B,j){return this.unbindEvent(this.eventFormatter.format(B),j),this}},{key:"subscribed",value:function(B){return this.on("connect",function(j){B(j)}),this}},{key:"error",value:function(B){return this}},{key:"on",value:function(B,j){var U=this;return this.listeners[B]=this.listeners[B]||[],this.events[B]||(this.events[B]=function(q,Y){U.name===q&&U.listeners[B]&&U.listeners[B].forEach(function(K){return K(Y)})},this.socket.on(B,this.events[B])),this.listeners[B].push(j),this}},{key:"unbind",value:function(){var B=this;Object.keys(this.events).forEach(function(j){B.unbindEvent(j)})}},{key:"unbindEvent",value:function(B,j){this.listeners[B]=this.listeners[B]||[],j&&(this.listeners[B]=this.listeners[B].filter(function(U){return U!==j})),(!j||this.listeners[B].length===0)&&(this.events[B]&&(this.socket.removeListener(B,this.events[B]),delete this.events[B]),delete this.listeners[B])}}]),I}(Channel),SocketIoPrivateChannel=function(M){_inherits(I,M);var $=_createSuper(I);function I(){return _classCallCheck(this,I),$.apply(this,arguments)}return _createClass(I,[{key:"whisper",value:function(B,j){return this.socket.emit("client event",{channel:this.name,event:"client-".concat(B),data:j}),this}}]),I}(SocketIoChannel),SocketIoPresenceChannel=function(M){_inherits(I,M);var $=_createSuper(I);function I(){return _classCallCheck(this,I),$.apply(this,arguments)}return _createClass(I,[{key:"here",value:function(B){return this.on("presence:subscribed",function(j){B(j.map(function(U){return U.user_info}))}),this}},{key:"joining",value:function(B){return this.on("presence:joining",function(j){return B(j.user_info)}),this}},{key:"whisper",value:function(B,j){return this.socket.emit("client event",{channel:this.name,event:"client-".concat(B),data:j}),this}},{key:"leaving",value:function(B){return this.on("presence:leaving",function(j){return B(j.user_info)}),this}}]),I}(SocketIoPrivateChannel),NullChannel=function(M){_inherits(I,M);var $=_createSuper(I);function I(){return _classCallCheck(this,I),$.apply(this,arguments)}return _createClass(I,[{key:"subscribe",value:function(){}},{key:"unsubscribe",value:function(){}},{key:"listen",value:function(B,j){return this}},{key:"listenToAll",value:function(B){return this}},{key:"stopListening",value:function(B,j){return this}},{key:"subscribed",value:function(B){return this}},{key:"error",value:function(B){return this}},{key:"on",value:function(B,j){return this}}]),I}(Channel),NullPrivateChannel=function(M){_inherits(I,M);var $=_createSuper(I);function I(){return _classCallCheck(this,I),$.apply(this,arguments)}return _createClass(I,[{key:"whisper",value:function(B,j){return this}}]),I}(NullChannel),NullPresenceChannel=function(M){_inherits(I,M);var $=_createSuper(I);function I(){return _classCallCheck(this,I),$.apply(this,arguments)}return _createClass(I,[{key:"here",value:function(B){return this}},{key:"joining",value:function(B){return this}},{key:"whisper",value:function(B,j){return this}},{key:"leaving",value:function(B){return this}}]),I}(NullChannel),Connector=function(){function M($){_classCallCheck(this,M),this._defaultOptions={auth:{headers:{}},authEndpoint:"/broadcasting/auth",userAuthentication:{endpoint:"/broadcasting/user-auth",headers:{}},broadcaster:"pusher",csrfToken:null,bearerToken:null,host:null,key:null,namespace:"App.Events"},this.setOptions($),this.connect()}return _createClass(M,[{key:"setOptions",value:function(I){this.options=_extends(this._defaultOptions,I);var N=this.csrfToken();return N&&(this.options.auth.headers["X-CSRF-TOKEN"]=N,this.options.userAuthentication.headers["X-CSRF-TOKEN"]=N),N=this.options.bearerToken,N&&(this.options.auth.headers.Authorization="Bearer "+N,this.options.userAuthentication.headers.Authorization="Bearer "+N),I}},{key:"csrfToken",value:function(){var I;return typeof window<"u"&&window.Laravel&&window.Laravel.csrfToken?window.Laravel.csrfToken:this.options.csrfToken?this.options.csrfToken:typeof document<"u"&&typeof document.querySelector=="function"&&(I=document.querySelector('meta[name="csrf-token"]'))?I.getAttribute("content"):null}}]),M}(),PusherConnector=function(M){_inherits(I,M);var $=_createSuper(I);function I(){var N;return _classCallCheck(this,I),N=$.apply(this,arguments),N.channels={},N}return _createClass(I,[{key:"connect",value:function(){typeof this.options.client<"u"?this.pusher=this.options.client:this.options.Pusher?this.pusher=new this.options.Pusher(this.options.key,this.options):this.pusher=new Pusher(this.options.key,this.options)}},{key:"signin",value:function(){this.pusher.signin()}},{key:"listen",value:function(B,j,U){return this.channel(B).listen(j,U)}},{key:"channel",value:function(B){return this.channels[B]||(this.channels[B]=new PusherChannel(this.pusher,B,this.options)),this.channels[B]}},{key:"privateChannel",value:function(B){return this.channels["private-"+B]||(this.channels["private-"+B]=new PusherPrivateChannel(this.pusher,"private-"+B,this.options)),this.channels["private-"+B]}},{key:"encryptedPrivateChannel",value:function(B){return this.channels["private-encrypted-"+B]||(this.channels["private-encrypted-"+B]=new PusherEncryptedPrivateChannel(this.pusher,"private-encrypted-"+B,this.options)),this.channels["private-encrypted-"+B]}},{key:"presenceChannel",value:function(B){return this.channels["presence-"+B]||(this.channels["presence-"+B]=new PusherPresenceChannel(this.pusher,"presence-"+B,this.options)),this.channels["presence-"+B]}},{key:"leave",value:function(B){var j=this,U=[B,"private-"+B,"private-encrypted-"+B,"presence-"+B];U.forEach(function(q,Y){j.leaveChannel(q)})}},{key:"leaveChannel",value:function(B){this.channels[B]&&(this.channels[B].unsubscribe(),delete this.channels[B])}},{key:"socketId",value:function(){return this.pusher.connection.socket_id}},{key:"disconnect",value:function(){this.pusher.disconnect()}}]),I}(Connector),SocketIoConnector=function(M){_inherits(I,M);var $=_createSuper(I);function I(){var N;return _classCallCheck(this,I),N=$.apply(this,arguments),N.channels={},N}return _createClass(I,[{key:"connect",value:function(){var B=this,j=this.getSocketIO();return this.socket=j(this.options.host,this.options),this.socket.on("reconnect",function(){Object.values(B.channels).forEach(function(U){U.subscribe()})}),this.socket}},{key:"getSocketIO",value:function(){if(typeof this.options.client<"u")return this.options.client;if(typeof io<"u")return io;throw new Error("Socket.io client not found. Should be globally available or passed via options.client")}},{key:"listen",value:function(B,j,U){return this.channel(B).listen(j,U)}},{key:"channel",value:function(B){return this.channels[B]||(this.channels[B]=new SocketIoChannel(this.socket,B,this.options)),this.channels[B]}},{key:"privateChannel",value:function(B){return this.channels["private-"+B]||(this.channels["private-"+B]=new SocketIoPrivateChannel(this.socket,"private-"+B,this.options)),this.channels["private-"+B]}},{key:"presenceChannel",value:function(B){return this.channels["presence-"+B]||(this.channels["presence-"+B]=new SocketIoPresenceChannel(this.socket,"presence-"+B,this.options)),this.channels["presence-"+B]}},{key:"leave",value:function(B){var j=this,U=[B,"private-"+B,"presence-"+B];U.forEach(function(q){j.leaveChannel(q)})}},{key:"leaveChannel",value:function(B){this.channels[B]&&(this.channels[B].unsubscribe(),delete this.channels[B])}},{key:"socketId",value:function(){return this.socket.id}},{key:"disconnect",value:function(){this.socket.disconnect()}}]),I}(Connector),NullConnector=function(M){_inherits(I,M);var $=_createSuper(I);function I(){var N;return _classCallCheck(this,I),N=$.apply(this,arguments),N.channels={},N}return _createClass(I,[{key:"connect",value:function(){}},{key:"listen",value:function(B,j,U){return new NullChannel}},{key:"channel",value:function(B){return new NullChannel}},{key:"privateChannel",value:function(B){return new NullPrivateChannel}},{key:"encryptedPrivateChannel",value:function(B){return new NullPrivateChannel}},{key:"presenceChannel",value:function(B){return new NullPresenceChannel}},{key:"leave",value:function(B){}},{key:"leaveChannel",value:function(B){}},{key:"socketId",value:function(){return"fake-socket-id"}},{key:"disconnect",value:function(){}}]),I}(Connector),Echo$1=function(){function M($){_classCallCheck(this,M),this.options=$,this.connect(),this.options.withoutInterceptors||this.registerInterceptors()}return _createClass(M,[{key:"channel",value:function(I){return this.connector.channel(I)}},{key:"connect",value:function(){this.options.broadcaster=="reverb"?this.connector=new PusherConnector(_extends(_extends({},this.options),{cluster:""})):this.options.broadcaster=="pusher"?this.connector=new PusherConnector(this.options):this.options.broadcaster=="socket.io"?this.connector=new SocketIoConnector(this.options):this.options.broadcaster=="null"?this.connector=new NullConnector(this.options):typeof this.options.broadcaster=="function"&&(this.connector=new this.options.broadcaster(this.options))}},{key:"disconnect",value:function(){this.connector.disconnect()}},{key:"join",value:function(I){return this.connector.presenceChannel(I)}},{key:"leave",value:function(I){this.connector.leave(I)}},{key:"leaveChannel",value:function(I){this.connector.leaveChannel(I)}},{key:"leaveAllChannels",value:function(){for(var I in this.connector.channels)this.leaveChannel(I)}},{key:"listen",value:function(I,N,B){return this.connector.listen(I,N,B)}},{key:"private",value:function(I){return this.connector.privateChannel(I)}},{key:"encryptedPrivate",value:function(I){return this.connector.encryptedPrivateChannel(I)}},{key:"socketId",value:function(){return this.connector.socketId()}},{key:"registerInterceptors",value:function(){typeof Vue=="function"&&Vue.http&&this.registerVueRequestInterceptor(),typeof axios=="function"&&this.registerAxiosRequestInterceptor(),typeof jQuery=="function"&&this.registerjQueryAjaxSetup(),(typeof Turbo>"u"?"undefined":_typeof$2(Turbo))==="object"&&this.registerTurboRequestInterceptor()}},{key:"registerVueRequestInterceptor",value:function(){var I=this;Vue.http.interceptors.push(function(N,B){I.socketId()&&N.headers.set("X-Socket-ID",I.socketId()),B()})}},{key:"registerAxiosRequestInterceptor",value:function(){var I=this;axios.interceptors.request.use(function(N){return I.socketId()&&(N.headers["X-Socket-Id"]=I.socketId()),N})}},{key:"registerjQueryAjaxSetup",value:function(){var I=this;typeof jQuery.ajax<"u"&&jQuery.ajaxPrefilter(function(N,B,j){I.socketId()&&j.setRequestHeader("X-Socket-Id",I.socketId())})}},{key:"registerTurboRequestInterceptor",value:function(){var I=this;document.addEventListener("turbo:before-fetch-request",function(N){N.detail.fetchOptions.headers["X-Socket-Id"]=I.socketId()})}}]),M}(),pusher={exports:{}};/*! + * Pusher JavaScript Library v4.4.0 + * https://pusher.com/ + * + * Copyright 2017, Pusher + * Released under the MIT licence. + */(function(M,$){(function(N,B){M.exports=B()})(commonjsGlobal,function(){return function(I){var N={};function B(j){if(N[j])return N[j].exports;var U=N[j]={exports:{},id:j,loaded:!1};return I[j].call(U.exports,U,U.exports,B),U.loaded=!0,U.exports}return B.m=I,B.c=N,B.p="",B(0)}([function(I,N,B){var j=B(1);I.exports=j.default},function(I,N,B){var j=B(2),U=B(9),q=B(24),Y=B(39),K=B(40),G=B(41),J=B(12),Z=B(5),ee=B(71),te=B(8),se=B(43),re=B(14),ne=function(){function me(ue,_e){var fe=this;if(le(ue),_e=_e||{},!_e.cluster&&!(_e.wsHost||_e.httpHost)){var ge=re.default.buildLogSuffix("javascriptQuickStart");te.default.warn("You should always specify a cluster when connecting. "+ge)}this.key=ue,this.config=U.extend(ee.getGlobalConfig(),_e.cluster?ee.getClusterConfig(_e.cluster):{},_e),this.channels=se.default.createChannels(),this.global_emitter=new q.default,this.sessionID=Math.floor(Math.random()*1e9),this.timeline=new Y.default(this.key,this.sessionID,{cluster:this.config.cluster,features:me.getClientFeatures(),params:this.config.timelineParams||{},limit:50,level:K.default.INFO,version:Z.default.VERSION}),this.config.disableStats||(this.timelineSender=se.default.createTimelineSender(this.timeline,{host:this.config.statsHost,path:"/timeline/v2/"+j.default.TimelineTransport.name}));var ye=function(xe){var oe=U.extend({},fe.config,xe);return G.build(j.default.getDefaultStrategy(oe),oe)};this.connection=se.default.createConnectionManager(this.key,U.extend({getStrategy:ye,timeline:this.timeline,activityTimeout:this.config.activity_timeout,pongTimeout:this.config.pong_timeout,unavailableTimeout:this.config.unavailable_timeout},this.config,{useTLS:this.shouldUseTLS()})),this.connection.bind("connected",function(){fe.subscribeAll(),fe.timelineSender&&fe.timelineSender.send(fe.connection.isUsingTLS())}),this.connection.bind("message",function(xe){var oe=xe.event,be=oe.indexOf("pusher_internal:")===0;if(xe.channel){var ve=fe.channel(xe.channel);ve&&ve.handleEvent(xe)}be||fe.global_emitter.emit(xe.event,xe.data)}),this.connection.bind("connecting",function(){fe.channels.disconnect()}),this.connection.bind("disconnected",function(){fe.channels.disconnect()}),this.connection.bind("error",function(xe){te.default.warn("Error",xe)}),me.instances.push(this),this.timeline.info({instances:me.instances.length}),me.isReady&&this.connect()}return me.ready=function(){me.isReady=!0;for(var ue=0,_e=me.instances.length;ue<_e;ue++)me.instances[ue].connect()},me.log=function(ue){me.logToConsole&&window.console&&window.console.log&&window.console.log(ue)},me.getClientFeatures=function(){return U.keys(U.filterObject({ws:j.default.Transports.ws},function(ue){return ue.isSupported({})}))},me.prototype.channel=function(ue){return this.channels.find(ue)},me.prototype.allChannels=function(){return this.channels.all()},me.prototype.connect=function(){if(this.connection.connect(),this.timelineSender&&!this.timelineSenderTimer){var ue=this.connection.isUsingTLS(),_e=this.timelineSender;this.timelineSenderTimer=new J.PeriodicTimer(6e4,function(){_e.send(ue)})}},me.prototype.disconnect=function(){this.connection.disconnect(),this.timelineSenderTimer&&(this.timelineSenderTimer.ensureAborted(),this.timelineSenderTimer=null)},me.prototype.bind=function(ue,_e,fe){return this.global_emitter.bind(ue,_e,fe),this},me.prototype.unbind=function(ue,_e,fe){return this.global_emitter.unbind(ue,_e,fe),this},me.prototype.bind_global=function(ue){return this.global_emitter.bind_global(ue),this},me.prototype.unbind_global=function(ue){return this.global_emitter.unbind_global(ue),this},me.prototype.unbind_all=function(ue){return this.global_emitter.unbind_all(),this},me.prototype.subscribeAll=function(){var ue;for(ue in this.channels.channels)this.channels.channels.hasOwnProperty(ue)&&this.subscribe(ue)},me.prototype.subscribe=function(ue){var _e=this.channels.add(ue,this);return _e.subscriptionPending&&_e.subscriptionCancelled?_e.reinstateSubscription():!_e.subscriptionPending&&this.connection.state==="connected"&&_e.subscribe(),_e},me.prototype.unsubscribe=function(ue){var _e=this.channels.find(ue);_e&&_e.subscriptionPending?_e.cancelSubscription():(_e=this.channels.remove(ue),_e&&this.connection.state==="connected"&&_e.unsubscribe())},me.prototype.send_event=function(ue,_e,fe){return this.connection.send_event(ue,_e,fe)},me.prototype.shouldUseTLS=function(){return j.default.getProtocol()==="https:"||this.config.forceTLS===!0?!0:!!this.config.encrypted},me.instances=[],me.isReady=!1,me.logToConsole=!1,me.Runtime=j.default,me.ScriptReceivers=j.default.ScriptReceivers,me.DependenciesReceivers=j.default.DependenciesReceivers,me.auth_callbacks=j.default.auth_callbacks,me}();N.__esModule=!0,N.default=ne;function le(me){if(me==null)throw"You must pass your app key when you instantiate Pusher."}j.default.setup(ne)},function(I,N,B){var j=B(3),U=B(7),q=B(15),Y=B(16),K=B(17),G=B(4),J=B(18),Z=B(19),ee=B(26),te=B(27),se=B(28),re=B(29),ne={nextAuthCallbackID:1,auth_callbacks:{},ScriptReceivers:G.ScriptReceivers,DependenciesReceivers:j.DependenciesReceivers,getDefaultStrategy:te.default,Transports:Z.default,transportConnectionInitializer:se.default,HTTPFactory:re.default,TimelineTransport:J.default,getXHRAPI:function(){return window.XMLHttpRequest},getWebSocketAPI:function(){return window.WebSocket||window.MozWebSocket},setup:function(le){var me=this;window.Pusher=le;var ue=function(){me.onDocumentBody(le.ready)};window.JSON?ue():j.Dependencies.load("json2",{},ue)},getDocument:function(){return document},getProtocol:function(){return this.getDocument().location.protocol},getAuthorizers:function(){return{ajax:U.default,jsonp:q.default}},onDocumentBody:function(le){var me=this;document.body?le():setTimeout(function(){me.onDocumentBody(le)},0)},createJSONPRequest:function(le,me){return new K.default(le,me)},createScriptRequest:function(le){return new Y.default(le)},getLocalStorage:function(){try{return window.localStorage}catch{return}},createXHR:function(){return this.getXHRAPI()?this.createXMLHttpRequest():this.createMicrosoftXHR()},createXMLHttpRequest:function(){var le=this.getXHRAPI();return new le},createMicrosoftXHR:function(){return new ActiveXObject("Microsoft.XMLHTTP")},getNetwork:function(){return ee.Network},createWebSocket:function(le){var me=this.getWebSocketAPI();return new me(le)},createSocketRequest:function(le,me){if(this.isXHRSupported())return this.HTTPFactory.createXHR(le,me);if(this.isXDRSupported(me.indexOf("https:")===0))return this.HTTPFactory.createXDR(le,me);throw"Cross-origin HTTP requests are not supported"},isXHRSupported:function(){var le=this.getXHRAPI();return!!le&&new le().withCredentials!==void 0},isXDRSupported:function(le){var me=le?"https:":"http:",ue=this.getProtocol();return!!window.XDomainRequest&&ue===me},addUnloadListener:function(le){window.addEventListener!==void 0?window.addEventListener("unload",le,!1):window.attachEvent!==void 0&&window.attachEvent("onunload",le)},removeUnloadListener:function(le){window.addEventListener!==void 0?window.removeEventListener("unload",le,!1):window.detachEvent!==void 0&&window.detachEvent("onunload",le)}};N.__esModule=!0,N.default=ne},function(I,N,B){var j=B(4),U=B(5),q=B(6);N.DependenciesReceivers=new j.ScriptReceiverFactory("_pusher_dependencies","Pusher.DependenciesReceivers"),N.Dependencies=new q.default({cdn_http:U.default.cdn_http,cdn_https:U.default.cdn_https,version:U.default.VERSION,suffix:U.default.dependency_suffix,receivers:N.DependenciesReceivers})},function(I,N){var B=function(){function j(U,q){this.lastId=0,this.prefix=U,this.name=q}return j.prototype.create=function(U){this.lastId++;var q=this.lastId,Y=this.prefix+q,K=this.name+"["+q+"]",G=!1,J=function(){G||(U.apply(null,arguments),G=!0)};return this[q]=J,{number:q,id:Y,name:K,callback:J}},j.prototype.remove=function(U){delete this[U.number]},j}();N.ScriptReceiverFactory=B,N.ScriptReceivers=new B("_pusher_script_","Pusher.ScriptReceivers")},function(I,N){var B={VERSION:"4.4.0",PROTOCOL:7,host:"ws.pusherapp.com",ws_port:80,wss_port:443,ws_path:"",sockjs_host:"sockjs.pusher.com",sockjs_http_port:80,sockjs_https_port:443,sockjs_path:"/pusher",stats_host:"stats.pusher.com",channel_auth_endpoint:"/pusher/auth",channel_auth_transport:"ajax",activity_timeout:12e4,pong_timeout:3e4,unavailable_timeout:1e4,cdn_http:"http://js.pusher.com",cdn_https:"https://js.pusher.com",dependency_suffix:""};N.__esModule=!0,N.default=B},function(I,N,B){var j=B(4),U=B(2),q=function(){function Y(K){this.options=K,this.receivers=K.receivers||j.ScriptReceivers,this.loading={}}return Y.prototype.load=function(K,G,J){var Z=this;if(Z.loading[K]&&Z.loading[K].length>0)Z.loading[K].push(J);else{Z.loading[K]=[J];var ee=U.default.createScriptRequest(Z.getPath(K,G)),te=Z.receivers.create(function(se){if(Z.receivers.remove(te),Z.loading[K]){var re=Z.loading[K];delete Z.loading[K];for(var ne=function(me){me||ee.cleanup()},le=0;le>>6)+U(128|ee&63):U(224|ee>>>12&15)+U(128|ee>>>6&63)+U(128|ee&63)},K=function(Z){return Z.replace(/[^\x00-\x7F]/g,Y)},G=function(Z){var ee=[0,2,1][Z.length%3],te=Z.charCodeAt(0)<<16|(Z.length>1?Z.charCodeAt(1):0)<<8|(Z.length>2?Z.charCodeAt(2):0),se=[q.charAt(te>>>18),q.charAt(te>>>12&63),ee>=2?"=":q.charAt(te>>>6&63),ee>=1?"=":q.charAt(te&63)];return se.join("")},J=window.btoa||function(Z){return Z.replace(/[\s\S]{1,3}/g,G)}},function(I,N,B){var j=B(12),U={now:function(){return Date.now?Date.now():new Date().valueOf()},defer:function(q){return new j.OneOffTimer(0,q)},method:function(q){var Y=Array.prototype.slice.call(arguments,1);return function(K){return K[q].apply(K,Y.concat(arguments))}}};N.__esModule=!0,N.default=U},function(I,N,B){var j=this&&this.__extends||function(J,Z){for(var ee in Z)Z.hasOwnProperty(ee)&&(J[ee]=Z[ee]);function te(){this.constructor=J}J.prototype=Z===null?Object.create(Z):(te.prototype=Z.prototype,new te)},U=B(13);function q(J){window.clearTimeout(J)}function Y(J){window.clearInterval(J)}var K=function(J){j(Z,J);function Z(ee,te){J.call(this,setTimeout,q,ee,function(se){return te(),null})}return Z}(U.default);N.OneOffTimer=K;var G=function(J){j(Z,J);function Z(ee,te){J.call(this,setInterval,Y,ee,function(se){return te(),se})}return Z}(U.default);N.PeriodicTimer=G},function(I,N){var B=function(){function j(U,q,Y,K){var G=this;this.clear=q,this.timer=U(function(){G.timer&&(G.timer=K(G.timer))},Y)}return j.prototype.isRunning=function(){return this.timer!==null},j.prototype.ensureAborted=function(){this.timer&&(this.clear(this.timer),this.timer=null)},j}();N.__esModule=!0,N.default=B},function(I,N){var B={baseUrl:"https://pusher.com",urls:{authenticationEndpoint:{path:"/docs/authenticating_users"},javascriptQuickStart:{path:"/docs/javascript_quick_start"},triggeringClientEvents:{path:"/docs/client_api_guide/client_events#trigger-events"}}},j=function(U){var q="See:",Y=B.urls[U];if(!Y)return"";var K;return Y.fullUrl?K=Y.fullUrl:Y.path&&(K=B.baseUrl+Y.path),K?q+" "+K:""};N.__esModule=!0,N.default={buildLogSuffix:j}},function(I,N,B){var j=B(8),U=function(q,Y,K){this.authOptions.headers!==void 0&&j.default.warn("Warn","To send headers with the auth request, you must use AJAX, rather than JSONP.");var G=q.nextAuthCallbackID.toString();q.nextAuthCallbackID++;var J=q.getDocument(),Z=J.createElement("script");q.auth_callbacks[G]=function(se){K(!1,se)};var ee="Pusher.auth_callbacks['"+G+"']";Z.src=this.options.authEndpoint+"?callback="+encodeURIComponent(ee)+"&"+this.composeQuery(Y);var te=J.getElementsByTagName("head")[0]||J.documentElement;te.insertBefore(Z,te.firstChild)};N.__esModule=!0,N.default=U},function(I,N){var B=function(){function j(U){this.src=U}return j.prototype.send=function(U){var q=this,Y="Error loading "+q.src;q.script=document.createElement("script"),q.script.id=U.id,q.script.src=q.src,q.script.type="text/javascript",q.script.charset="UTF-8",q.script.addEventListener?(q.script.onerror=function(){U.callback(Y)},q.script.onload=function(){U.callback(null)}):q.script.onreadystatechange=function(){(q.script.readyState==="loaded"||q.script.readyState==="complete")&&U.callback(null)},q.script.async===void 0&&document.attachEvent&&/opera/i.test(navigator.userAgent)?(q.errorScript=document.createElement("script"),q.errorScript.id=U.id+"_error",q.errorScript.text=U.name+"('"+Y+"');",q.script.async=q.errorScript.async=!1):q.script.async=!0;var K=document.getElementsByTagName("head")[0];K.insertBefore(q.script,K.firstChild),q.errorScript&&K.insertBefore(q.errorScript,q.script.nextSibling)},j.prototype.cleanup=function(){this.script&&(this.script.onload=this.script.onerror=null,this.script.onreadystatechange=null),this.script&&this.script.parentNode&&this.script.parentNode.removeChild(this.script),this.errorScript&&this.errorScript.parentNode&&this.errorScript.parentNode.removeChild(this.errorScript),this.script=null,this.errorScript=null},j}();N.__esModule=!0,N.default=B},function(I,N,B){var j=B(9),U=B(2),q=function(){function Y(K,G){this.url=K,this.data=G}return Y.prototype.send=function(K){if(!this.request){var G=j.buildQueryString(this.data),J=this.url+"/"+K.number+"?"+G;this.request=U.default.createScriptRequest(J),this.request.send(K)}},Y.prototype.cleanup=function(){this.request&&this.request.cleanup()},Y}();N.__esModule=!0,N.default=q},function(I,N,B){var j=B(2),U=B(4),q=function(K,G){return function(J,Z){var ee="http"+(G?"s":"")+"://",te=ee+(K.host||K.options.host)+K.options.path,se=j.default.createJSONPRequest(te,J),re=j.default.ScriptReceivers.create(function(ne,le){U.ScriptReceivers.remove(re),se.cleanup(),le&&le.host&&(K.host=le.host),Z&&Z(ne,le)});se.send(re)}},Y={name:"jsonp",getAgent:q};N.__esModule=!0,N.default=Y},function(I,N,B){var j=B(20),U=B(22),q=B(21),Y=B(2),K=B(3),G=B(9),J=new U.default({file:"sockjs",urls:q.sockjs,handlesActivityChecks:!0,supportsPing:!1,isSupported:function(){return!0},isInitialized:function(){return window.SockJS!==void 0},getSocket:function(se,re){return new window.SockJS(se,null,{js_path:K.Dependencies.getPath("sockjs",{useTLS:re.useTLS}),ignore_null_origin:re.ignoreNullOrigin})},beforeOpen:function(se,re){se.send(JSON.stringify({path:re}))}}),Z={isSupported:function(se){var re=Y.default.isXDRSupported(se.useTLS);return re}},ee=new U.default(G.extend({},j.streamingConfiguration,Z)),te=new U.default(G.extend({},j.pollingConfiguration,Z));j.default.xdr_streaming=ee,j.default.xdr_polling=te,j.default.sockjs=J,N.__esModule=!0,N.default=j.default},function(I,N,B){var j=B(21),U=B(22),q=B(9),Y=B(2),K=new U.default({urls:j.ws,handlesActivityChecks:!1,supportsPing:!1,isInitialized:function(){return!!Y.default.getWebSocketAPI()},isSupported:function(){return!!Y.default.getWebSocketAPI()},getSocket:function(se){return Y.default.createWebSocket(se)}}),G={urls:j.http,handlesActivityChecks:!1,supportsPing:!0,isInitialized:function(){return!0}};N.streamingConfiguration=q.extend({getSocket:function(se){return Y.default.HTTPFactory.createStreamingSocket(se)}},G),N.pollingConfiguration=q.extend({getSocket:function(se){return Y.default.HTTPFactory.createPollingSocket(se)}},G);var J={isSupported:function(){return Y.default.isXHRSupported()}},Z=new U.default(q.extend({},N.streamingConfiguration,J)),ee=new U.default(q.extend({},N.pollingConfiguration,J)),te={ws:K,xhr_streaming:Z,xhr_polling:ee};N.__esModule=!0,N.default=te},function(I,N,B){var j=B(5);function U(Y,K,G){var J=Y+(K.useTLS?"s":""),Z=K.useTLS?K.hostTLS:K.hostNonTLS;return J+"://"+Z+G}function q(Y,K){var G="/app/"+Y,J="?protocol="+j.default.PROTOCOL+"&client=js&version="+j.default.VERSION+(K?"&"+K:"");return G+J}N.ws={getInitial:function(Y,K){var G=(K.httpPath||"")+q(Y,"flash=false");return U("ws",K,G)}},N.http={getInitial:function(Y,K){var G=(K.httpPath||"/pusher")+q(Y);return U("http",K,G)}},N.sockjs={getInitial:function(Y,K){return U("http",K,K.httpPath||"/pusher")},getPath:function(Y,K){return q(Y)}}},function(I,N,B){var j=B(23),U=function(){function q(Y){this.hooks=Y}return q.prototype.isSupported=function(Y){return this.hooks.isSupported(Y)},q.prototype.createConnection=function(Y,K,G,J){return new j.default(this.hooks,Y,K,G,J)},q}();N.__esModule=!0,N.default=U},function(I,N,B){var j=this&&this.__extends||function(Z,ee){for(var te in ee)ee.hasOwnProperty(te)&&(Z[te]=ee[te]);function se(){this.constructor=Z}Z.prototype=ee===null?Object.create(ee):(se.prototype=ee.prototype,new se)},U=B(11),q=B(9),Y=B(24),K=B(8),G=B(2),J=function(Z){j(ee,Z);function ee(te,se,re,ne,le){Z.call(this),this.initialize=G.default.transportConnectionInitializer,this.hooks=te,this.name=se,this.priority=re,this.key=ne,this.options=le,this.state="new",this.timeline=le.timeline,this.activityTimeout=le.activityTimeout,this.id=this.timeline.generateUniqueID()}return ee.prototype.handlesActivityChecks=function(){return!!this.hooks.handlesActivityChecks},ee.prototype.supportsPing=function(){return!!this.hooks.supportsPing},ee.prototype.connect=function(){var te=this;if(this.socket||this.state!=="initialized")return!1;var se=this.hooks.urls.getInitial(this.key,this.options);try{this.socket=this.hooks.getSocket(se,this.options)}catch(re){return U.default.defer(function(){te.onError(re),te.changeState("closed")}),!1}return this.bindListeners(),K.default.debug("Connecting",{transport:this.name,url:se}),this.changeState("connecting"),!0},ee.prototype.close=function(){return this.socket?(this.socket.close(),!0):!1},ee.prototype.send=function(te){var se=this;return this.state==="open"?(U.default.defer(function(){se.socket&&se.socket.send(te)}),!0):!1},ee.prototype.ping=function(){this.state==="open"&&this.supportsPing()&&this.socket.ping()},ee.prototype.onOpen=function(){this.hooks.beforeOpen&&this.hooks.beforeOpen(this.socket,this.hooks.urls.getPath(this.key,this.options)),this.changeState("open"),this.socket.onopen=void 0},ee.prototype.onError=function(te){this.emit("error",{type:"WebSocketError",error:te}),this.timeline.error(this.buildTimelineMessage({error:te.toString()}))},ee.prototype.onClose=function(te){te?this.changeState("closed",{code:te.code,reason:te.reason,wasClean:te.wasClean}):this.changeState("closed"),this.unbindListeners(),this.socket=void 0},ee.prototype.onMessage=function(te){this.emit("message",te)},ee.prototype.onActivity=function(){this.emit("activity")},ee.prototype.bindListeners=function(){var te=this;this.socket.onopen=function(){te.onOpen()},this.socket.onerror=function(se){te.onError(se)},this.socket.onclose=function(se){te.onClose(se)},this.socket.onmessage=function(se){te.onMessage(se)},this.supportsPing()&&(this.socket.onactivity=function(){te.onActivity()})},ee.prototype.unbindListeners=function(){this.socket&&(this.socket.onopen=void 0,this.socket.onerror=void 0,this.socket.onclose=void 0,this.socket.onmessage=void 0,this.supportsPing()&&(this.socket.onactivity=void 0))},ee.prototype.changeState=function(te,se){this.state=te,this.timeline.info(this.buildTimelineMessage({state:te,params:se})),this.emit(te,se)},ee.prototype.buildTimelineMessage=function(te){return q.extend({cid:this.id},te)},ee}(Y.default);N.__esModule=!0,N.default=J},function(I,N,B){var j=B(9),U=B(25),q=function(){function Y(K){this.callbacks=new U.default,this.global_callbacks=[],this.failThrough=K}return Y.prototype.bind=function(K,G,J){return this.callbacks.add(K,G,J),this},Y.prototype.bind_global=function(K){return this.global_callbacks.push(K),this},Y.prototype.unbind=function(K,G,J){return this.callbacks.remove(K,G,J),this},Y.prototype.unbind_global=function(K){return K?(this.global_callbacks=j.filter(this.global_callbacks||[],function(G){return G!==K}),this):(this.global_callbacks=[],this)},Y.prototype.unbind_all=function(){return this.unbind(),this.unbind_global(),this},Y.prototype.emit=function(K,G,J){for(var Z=0;Z0)for(var Z=0;Z0&&q.onChunk(200,Y.responseText)},Y.onload=function(){Y.responseText&&Y.responseText.length>0&&q.onChunk(200,Y.responseText),q.emit("finished",200),q.close()},Y},abortRequest:function(q){q.ontimeout=q.onerror=q.onprogress=q.onload=null,q.abort()}};N.__esModule=!0,N.default=U},function(I,N){var B=this&&this.__extends||function(Z,ee){for(var te in ee)ee.hasOwnProperty(te)&&(Z[te]=ee[te]);function se(){this.constructor=Z}Z.prototype=ee===null?Object.create(ee):(se.prototype=ee.prototype,new se)},j=function(Z){B(ee,Z);function ee(){Z.apply(this,arguments)}return ee}(Error);N.BadEventName=j;var U=function(Z){B(ee,Z);function ee(){Z.apply(this,arguments)}return ee}(Error);N.RequestTimedOut=U;var q=function(Z){B(ee,Z);function ee(){Z.apply(this,arguments)}return ee}(Error);N.TransportPriorityTooLow=q;var Y=function(Z){B(ee,Z);function ee(){Z.apply(this,arguments)}return ee}(Error);N.TransportClosed=Y;var K=function(Z){B(ee,Z);function ee(){Z.apply(this,arguments)}return ee}(Error);N.UnsupportedFeature=K;var G=function(Z){B(ee,Z);function ee(){Z.apply(this,arguments)}return ee}(Error);N.UnsupportedTransport=G;var J=function(Z){B(ee,Z);function ee(){Z.apply(this,arguments)}return ee}(Error);N.UnsupportedStrategy=J},function(I,N,B){var j=B(33),U=B(34),q=B(36),Y=B(37),K=B(38),G={createStreamingSocket:function(J){return this.createSocket(q.default,J)},createPollingSocket:function(J){return this.createSocket(Y.default,J)},createSocket:function(J,Z){return new U.default(J,Z)},createXHR:function(J,Z){return this.createRequest(K.default,J,Z)},createRequest:function(J,Z,ee){return new j.default(J,Z,ee)}};N.__esModule=!0,N.default=G},function(I,N,B){var j=this&&this.__extends||function(G,J){for(var Z in J)J.hasOwnProperty(Z)&&(G[Z]=J[Z]);function ee(){this.constructor=G}G.prototype=J===null?Object.create(J):(ee.prototype=J.prototype,new ee)},U=B(2),q=B(24),Y=256*1024,K=function(G){j(J,G);function J(Z,ee,te){G.call(this),this.hooks=Z,this.method=ee,this.url=te}return J.prototype.start=function(Z){var ee=this;this.position=0,this.xhr=this.hooks.getRequest(this),this.unloader=function(){ee.close()},U.default.addUnloadListener(this.unloader),this.xhr.open(this.method,this.url,!0),this.xhr.setRequestHeader&&this.xhr.setRequestHeader("Content-Type","application/json"),this.xhr.send(Z)},J.prototype.close=function(){this.unloader&&(U.default.removeUnloadListener(this.unloader),this.unloader=null),this.xhr&&(this.hooks.abortRequest(this.xhr),this.xhr=null)},J.prototype.onChunk=function(Z,ee){for(;;){var te=this.advanceBuffer(ee);if(te)this.emit("chunk",{status:Z,data:te});else break}this.isBufferTooLong(ee)&&this.emit("buffer_too_long")},J.prototype.advanceBuffer=function(Z){var ee=Z.slice(this.position),te=ee.indexOf(` +`);return te!==-1?(this.position+=te+1,ee.slice(0,te)):null},J.prototype.isBufferTooLong=function(Z){return this.position===Z.length&&Z.length>Y},J}(q.default);N.__esModule=!0,N.default=K},function(I,N,B){var j=B(35),U=B(11),q=B(2),Y=1,K=function(){function re(ne,le){this.hooks=ne,this.session=te(1e3)+"/"+se(8),this.location=G(le),this.readyState=j.default.CONNECTING,this.openStream()}return re.prototype.send=function(ne){return this.sendRaw(JSON.stringify([ne]))},re.prototype.ping=function(){this.hooks.sendHeartbeat(this)},re.prototype.close=function(ne,le){this.onClose(ne,le,!0)},re.prototype.sendRaw=function(ne){if(this.readyState===j.default.OPEN)try{return q.default.createSocketRequest("POST",Z(J(this.location,this.session))).start(ne),!0}catch{return!1}else return!1},re.prototype.reconnect=function(){this.closeStream(),this.openStream()},re.prototype.onClose=function(ne,le,me){this.closeStream(),this.readyState=j.default.CLOSED,this.onclose&&this.onclose({code:ne,reason:le,wasClean:me})},re.prototype.onChunk=function(ne){if(ne.status===200){this.readyState===j.default.OPEN&&this.onActivity();var le,me=ne.data.slice(0,1);switch(me){case"o":le=JSON.parse(ne.data.slice(1)||"{}"),this.onOpen(le);break;case"a":le=JSON.parse(ne.data.slice(1)||"[]");for(var ue=0;ue0&&q.onChunk(K.status,K.responseText);break;case 4:K.responseText&&K.responseText.length>0&&q.onChunk(K.status,K.responseText),q.emit("finished",K.status),q.close();break}},K},abortRequest:function(q){q.onreadystatechange=null,q.abort()}};N.__esModule=!0,N.default=U},function(I,N,B){var j=B(9),U=B(11),q=B(40),Y=function(){function K(G,J,Z){this.key=G,this.session=J,this.events=[],this.options=Z||{},this.sent=0,this.uniqueID=0}return K.prototype.log=function(G,J){G<=this.options.level&&(this.events.push(j.extend({},J,{timestamp:U.default.now()})),this.options.limit&&this.events.length>this.options.limit&&this.events.shift())},K.prototype.error=function(G){this.log(q.default.ERROR,G)},K.prototype.info=function(G){this.log(q.default.INFO,G)},K.prototype.debug=function(G){this.log(q.default.DEBUG,G)},K.prototype.isEmpty=function(){return this.events.length===0},K.prototype.send=function(G,J){var Z=this,ee=j.extend({session:this.session,bundle:this.sent+1,key:this.key,lib:"js",version:this.options.version,cluster:this.options.cluster,features:this.options.features,timeline:this.events},this.options.params);return this.events=[],G(ee,function(te,se){te||Z.sent++,J&&J(te,se)}),!0},K.prototype.generateUniqueID=function(){return this.uniqueID++,this.uniqueID},K}();N.__esModule=!0,N.default=Y},function(I,N){var B;(function(j){j[j.ERROR=3]="ERROR",j[j.INFO=6]="INFO",j[j.DEBUG=7]="DEBUG"})(B||(B={})),N.__esModule=!0,N.default=B},function(I,N,B){var j=B(9),U=B(11),q=B(42),Y=B(31),K=B(64),G=B(65),J=B(66),Z=B(67),ee=B(68),te=B(69),se=B(70),re=B(2),ne=re.default.Transports;N.build=function(be,ve){var we=j.extend({},ue,ve);return oe(be,we)[1].strategy};var le={isSupported:function(){return!1},connect:function(be,ve){var we=U.default.defer(function(){ve(new Y.UnsupportedStrategy)});return{abort:function(){we.ensureAborted()},forceMinPriority:function(){}}}};function me(be){return function(ve){return[be.apply(this,arguments),ve]}}var ue={extend:function(be,ve,we){return[j.extend({},ve,we),be]},def:function(be,ve,we){if(be[ve]!==void 0)throw"Redefining symbol "+ve;return be[ve]=we,[void 0,be]},def_transport:function(be,ve,we,Ae,Se,Pe){var Re=ne[we];if(!Re)throw new Y.UnsupportedTransport(we);var Le=(!be.enabledTransports||j.arrayIndexOf(be.enabledTransports,ve)!==-1)&&(!be.disabledTransports||j.arrayIndexOf(be.disabledTransports,ve)===-1),Fe;Le?Fe=new K.default(ve,Ae,Pe?Pe.getAssistant(Re):Re,j.extend({key:be.key,useTLS:be.useTLS,timeline:be.timeline,ignoreNullOrigin:be.ignoreNullOrigin},Se)):Fe=le;var Ze=be.def(be,ve,Fe)[1];return Ze.Transports=be.Transports||{},Ze.Transports[ve]=Fe,[void 0,Ze]},transport_manager:me(function(be,ve){return new q.default(ve)}),sequential:me(function(be,ve){var we=Array.prototype.slice.call(arguments,2);return new G.default(we,ve)}),cached:me(function(be,ve,we){return new Z.default(we,be.Transports,{ttl:ve,timeline:be.timeline,useTLS:be.useTLS})}),first_connected:me(function(be,ve){return new se.default(ve)}),best_connected_ever:me(function(){var be=Array.prototype.slice.call(arguments,1);return new J.default(be)}),delayed:me(function(be,ve,we){return new ee.default(we,{delay:ve})}),if:me(function(be,ve,we,Ae){return new te.default(ve,we,Ae)}),is_supported:me(function(be,ve){return function(){return ve.isSupported()}})};function _e(be){return typeof be=="string"&&be.charAt(0)===":"}function fe(be,ve){return ve[be.slice(1)]}function ge(be,ve){if(be.length===0)return[[],ve];var we=oe(be[0],ve),Ae=ge(be.slice(1),we[1]);return[[we[0]].concat(Ae[0]),Ae[1]]}function ye(be,ve){if(!_e(be))return[be,ve];var we=fe(be,ve);if(we===void 0)throw"Undefined symbol "+be;return[we,ve]}function xe(be,ve){if(_e(be[0])){var we=fe(be[0],ve);if(be.length>1){if(typeof we!="function")throw"Calling non-function "+be[0];var Ae=[j.extend({},ve)].concat(j.map(be.slice(1),function(Se){return oe(Se,j.extend({},ve))[0]}));return we.apply(this,Ae)}else return[we,ve]}else return ge(be,ve)}function oe(be,ve){return typeof be=="string"?ye(be,ve):typeof be=="object"&&be instanceof Array&&be.length>0?xe(be,ve):[be,ve]}},function(I,N,B){var j=B(43),U=function(){function q(Y){this.options=Y||{},this.livesLeft=this.options.lives||1/0}return q.prototype.getAssistant=function(Y){return j.default.createAssistantToTheTransportManager(this,Y,{minPingDelay:this.options.minPingDelay,maxPingDelay:this.options.maxPingDelay})},q.prototype.isAlive=function(){return this.livesLeft>0},q.prototype.reportDeath=function(){this.livesLeft-=1},q}();N.__esModule=!0,N.default=U},function(I,N,B){var j=B(44),U=B(45),q=B(48),Y=B(49),K=B(50),G=B(51),J=B(54),Z=B(52),ee=B(62),te=B(63),se={createChannels:function(){return new te.default},createConnectionManager:function(re,ne){return new ee.default(re,ne)},createChannel:function(re,ne){return new Z.default(re,ne)},createPrivateChannel:function(re,ne){return new G.default(re,ne)},createPresenceChannel:function(re,ne){return new K.default(re,ne)},createEncryptedChannel:function(re,ne){return new J.default(re,ne)},createTimelineSender:function(re,ne){return new Y.default(re,ne)},createAuthorizer:function(re,ne){return ne.authorizer?ne.authorizer(re,ne):new q.default(re,ne)},createHandshake:function(re,ne){return new U.default(re,ne)},createAssistantToTheTransportManager:function(re,ne,le){return new j.default(re,ne,le)}};N.__esModule=!0,N.default=se},function(I,N,B){var j=B(11),U=B(9),q=function(){function Y(K,G,J){this.manager=K,this.transport=G,this.minPingDelay=J.minPingDelay,this.maxPingDelay=J.maxPingDelay,this.pingDelay=void 0}return Y.prototype.createConnection=function(K,G,J,Z){var ee=this;Z=U.extend({},Z,{activityTimeout:this.pingDelay});var te=this.transport.createConnection(K,G,J,Z),se=null,re=function(){te.unbind("open",re),te.bind("closed",ne),se=j.default.now()},ne=function(le){if(te.unbind("closed",ne),le.code===1002||le.code===1003)ee.manager.reportDeath();else if(!le.wasClean&&se){var me=j.default.now()-se;me<2*ee.maxPingDelay&&(ee.manager.reportDeath(),ee.pingDelay=Math.max(me/2,ee.minPingDelay))}};return te.bind("open",re),te},Y.prototype.isSupported=function(K){return this.manager.isAlive()&&this.transport.isSupported(K)},Y}();N.__esModule=!0,N.default=q},function(I,N,B){var j=B(9),U=B(46),q=B(47),Y=function(){function K(G,J){this.transport=G,this.callback=J,this.bindListeners()}return K.prototype.close=function(){this.unbindListeners(),this.transport.close()},K.prototype.bindListeners=function(){var G=this;this.onMessage=function(J){G.unbindListeners();var Z;try{Z=U.processHandshake(J)}catch(ee){G.finish("error",{error:ee}),G.transport.close();return}Z.action==="connected"?G.finish("connected",{connection:new q.default(Z.id,G.transport),activityTimeout:Z.activityTimeout}):(G.finish(Z.action,{error:Z.error}),G.transport.close())},this.onClosed=function(J){G.unbindListeners();var Z=U.getCloseAction(J)||"backoff",ee=U.getCloseError(J);G.finish(Z,{error:ee})},this.transport.bind("message",this.onMessage),this.transport.bind("closed",this.onClosed)},K.prototype.unbindListeners=function(){this.transport.unbind("message",this.onMessage),this.transport.unbind("closed",this.onClosed)},K.prototype.finish=function(G,J){this.callback(j.extend({transport:this.transport,action:G},J))},K}();N.__esModule=!0,N.default=Y},function(I,N){N.decodeMessage=function(B){try{var j=JSON.parse(B.data),U=j.data;if(typeof U=="string")try{U=JSON.parse(j.data)}catch{}var q={event:j.event,channel:j.channel,data:U};return j.user_id&&(q.user_id=j.user_id),q}catch(Y){throw{type:"MessageParseError",error:Y,data:B.data}}},N.encodeMessage=function(B){return JSON.stringify(B)},N.processHandshake=function(B){var j=N.decodeMessage(B);if(j.event==="pusher:connection_established"){if(!j.data.activity_timeout)throw"No activity timeout specified in handshake";return{action:"connected",id:j.data.socket_id,activityTimeout:j.data.activity_timeout*1e3}}else{if(j.event==="pusher:error")return{action:this.getCloseAction(j.data),error:this.getCloseError(j.data)};throw"Invalid handshake"}},N.getCloseAction=function(B){return B.code<4e3?B.code>=1002&&B.code<=1004?"backoff":null:B.code===4e3?"tls_only":B.code<4100?"refused":B.code<4200?"backoff":B.code<4300?"retry":"refused"},N.getCloseError=function(B){return B.code!==1e3&&B.code!==1001?{type:"PusherError",data:{code:B.code,message:B.reason||B.message}}:null}},function(I,N,B){var j=this&&this.__extends||function(J,Z){for(var ee in Z)Z.hasOwnProperty(ee)&&(J[ee]=Z[ee]);function te(){this.constructor=J}J.prototype=Z===null?Object.create(Z):(te.prototype=Z.prototype,new te)},U=B(9),q=B(24),Y=B(46),K=B(8),G=function(J){j(Z,J);function Z(ee,te){J.call(this),this.id=ee,this.transport=te,this.activityTimeout=te.activityTimeout,this.bindListeners()}return Z.prototype.handlesActivityChecks=function(){return this.transport.handlesActivityChecks()},Z.prototype.send=function(ee){return this.transport.send(ee)},Z.prototype.send_event=function(ee,te,se){var re={event:ee,data:te};return se&&(re.channel=se),K.default.debug("Event sent",re),this.send(Y.encodeMessage(re))},Z.prototype.ping=function(){this.transport.supportsPing()?this.transport.ping():this.send_event("pusher:ping",{})},Z.prototype.close=function(){this.transport.close()},Z.prototype.bindListeners=function(){var ee=this,te={message:function(re){var ne;try{ne=Y.decodeMessage(re)}catch(le){ee.emit("error",{type:"MessageParseError",error:le,data:re.data})}if(ne!==void 0){switch(K.default.debug("Event recd",ne),ne.event){case"pusher:error":ee.emit("error",{type:"PusherError",data:ne.data});break;case"pusher:ping":ee.emit("ping");break;case"pusher:pong":ee.emit("pong");break}ee.emit("message",ne)}},activity:function(){ee.emit("activity")},error:function(re){ee.emit("error",{type:"WebSocketError",error:re})},closed:function(re){se(),re&&re.code&&ee.handleCloseEvent(re),ee.transport=null,ee.emit("closed")}},se=function(){U.objectApply(te,function(re,ne){ee.transport.unbind(ne,re)})};U.objectApply(te,function(re,ne){ee.transport.bind(ne,re)})},Z.prototype.handleCloseEvent=function(ee){var te=Y.getCloseAction(ee),se=Y.getCloseError(ee);se&&this.emit("error",se),te&&this.emit(te,{action:te,error:se})},Z}(q.default);N.__esModule=!0,N.default=G},function(I,N,B){var j=B(2),U=function(){function q(Y,K){this.channel=Y;var G=K.authTransport;if(typeof j.default.getAuthorizers()[G]>"u")throw"'"+G+"' is not a recognized auth transport";this.type=G,this.options=K,this.authOptions=(K||{}).auth||{}}return q.prototype.composeQuery=function(Y){var K="socket_id="+encodeURIComponent(Y)+"&channel_name="+encodeURIComponent(this.channel.name);for(var G in this.authOptions.params)K+="&"+encodeURIComponent(G)+"="+encodeURIComponent(this.authOptions.params[G]);return K},q.prototype.authorize=function(Y,K){return q.authorizers=q.authorizers||j.default.getAuthorizers(),q.authorizers[this.type].call(this,j.default,Y,K)},q}();N.__esModule=!0,N.default=U},function(I,N,B){var j=B(2),U=function(){function q(Y,K){this.timeline=Y,this.options=K||{}}return q.prototype.send=function(Y,K){this.timeline.isEmpty()||this.timeline.send(j.default.TimelineTransport.getAgent(this,Y),K)},q}();N.__esModule=!0,N.default=U},function(I,N,B){var j=this&&this.__extends||function(J,Z){for(var ee in Z)Z.hasOwnProperty(ee)&&(J[ee]=Z[ee]);function te(){this.constructor=J}J.prototype=Z===null?Object.create(Z):(te.prototype=Z.prototype,new te)},U=B(51),q=B(8),Y=B(53),K=B(14),G=function(J){j(Z,J);function Z(ee,te){J.call(this,ee,te),this.members=new Y.default}return Z.prototype.authorize=function(ee,te){var se=this;J.prototype.authorize.call(this,ee,function(re,ne){if(!re){if(ne.channel_data===void 0){var le=K.default.buildLogSuffix("authenticationEndpoint");q.default.warn("Invalid auth response for channel '"+se.name+"',"+("expected 'channel_data' field. "+le)),te("Invalid auth response");return}var me=JSON.parse(ne.channel_data);se.members.setMyID(me.user_id)}te(re,ne)})},Z.prototype.handleEvent=function(ee){var te=ee.event;if(te.indexOf("pusher_internal:")===0)this.handleInternalEvent(ee);else{var se=ee.data,re={};ee.user_id&&(re.user_id=ee.user_id),this.emit(te,se,re)}},Z.prototype.handleInternalEvent=function(ee){var te=ee.event,se=ee.data;switch(te){case"pusher_internal:subscription_succeeded":this.handleSubscriptionSucceededEvent(ee);break;case"pusher_internal:member_added":var re=this.members.addMember(se);this.emit("pusher:member_added",re);break;case"pusher_internal:member_removed":var ne=this.members.removeMember(se);ne&&this.emit("pusher:member_removed",ne);break}},Z.prototype.handleSubscriptionSucceededEvent=function(ee){this.subscriptionPending=!1,this.subscribed=!0,this.subscriptionCancelled?this.pusher.unsubscribe(this.name):(this.members.onSubscription(ee.data),this.emit("pusher:subscription_succeeded",this.members))},Z.prototype.disconnect=function(){this.members.reset(),J.prototype.disconnect.call(this)},Z}(U.default);N.__esModule=!0,N.default=G},function(I,N,B){var j=this&&this.__extends||function(K,G){for(var J in G)G.hasOwnProperty(J)&&(K[J]=G[J]);function Z(){this.constructor=K}K.prototype=G===null?Object.create(G):(Z.prototype=G.prototype,new Z)},U=B(43),q=B(52),Y=function(K){j(G,K);function G(){K.apply(this,arguments)}return G.prototype.authorize=function(J,Z){var ee=U.default.createAuthorizer(this,this.pusher.config);return ee.authorize(J,Z)},G}(q.default);N.__esModule=!0,N.default=Y},function(I,N,B){var j=this&&this.__extends||function(J,Z){for(var ee in Z)Z.hasOwnProperty(ee)&&(J[ee]=Z[ee]);function te(){this.constructor=J}J.prototype=Z===null?Object.create(Z):(te.prototype=Z.prototype,new te)},U=B(24),q=B(31),Y=B(8),K=B(14),G=function(J){j(Z,J);function Z(ee,te){J.call(this,function(se,re){Y.default.debug("No callbacks on "+ee+" for "+se)}),this.name=ee,this.pusher=te,this.subscribed=!1,this.subscriptionPending=!1,this.subscriptionCancelled=!1}return Z.prototype.authorize=function(ee,te){return te(!1,{})},Z.prototype.trigger=function(ee,te){if(ee.indexOf("client-")!==0)throw new q.BadEventName("Event '"+ee+"' does not start with 'client-'");if(!this.subscribed){var se=K.default.buildLogSuffix("triggeringClientEvents");Y.default.warn("Client event triggered before channel 'subscription_succeeded' event . "+se)}return this.pusher.send_event(ee,te,this.name)},Z.prototype.disconnect=function(){this.subscribed=!1,this.subscriptionPending=!1},Z.prototype.handleEvent=function(ee){var te=ee.event,se=ee.data;if(te==="pusher_internal:subscription_succeeded")this.handleSubscriptionSucceededEvent(ee);else if(te.indexOf("pusher_internal:")!==0){var re={};this.emit(te,se,re)}},Z.prototype.handleSubscriptionSucceededEvent=function(ee){this.subscriptionPending=!1,this.subscribed=!0,this.subscriptionCancelled?this.pusher.unsubscribe(this.name):this.emit("pusher:subscription_succeeded",ee.data)},Z.prototype.subscribe=function(){var ee=this;this.subscribed||(this.subscriptionPending=!0,this.subscriptionCancelled=!1,this.authorize(this.pusher.connection.socket_id,function(te,se){te?ee.emit("pusher:subscription_error",se):ee.pusher.send_event("pusher:subscribe",{auth:se.auth,channel_data:se.channel_data,channel:ee.name})}))},Z.prototype.unsubscribe=function(){this.subscribed=!1,this.pusher.send_event("pusher:unsubscribe",{channel:this.name})},Z.prototype.cancelSubscription=function(){this.subscriptionCancelled=!0},Z.prototype.reinstateSubscription=function(){this.subscriptionCancelled=!1},Z}(U.default);N.__esModule=!0,N.default=G},function(I,N,B){var j=B(9),U=function(){function q(){this.reset()}return q.prototype.get=function(Y){return Object.prototype.hasOwnProperty.call(this.members,Y)?{id:Y,info:this.members[Y]}:null},q.prototype.each=function(Y){var K=this;j.objectApply(this.members,function(G,J){Y(K.get(J))})},q.prototype.setMyID=function(Y){this.myID=Y},q.prototype.onSubscription=function(Y){this.members=Y.presence.hash,this.count=Y.presence.count,this.me=this.get(this.myID)},q.prototype.addMember=function(Y){return this.get(Y.user_id)===null&&this.count++,this.members[Y.user_id]=Y.user_info,this.get(Y.user_id)},q.prototype.removeMember=function(Y){var K=this.get(Y.user_id);return K&&(delete this.members[Y.user_id],this.count--),K},q.prototype.reset=function(){this.members={},this.count=0,this.myID=null,this.me=null},q}();N.__esModule=!0,N.default=U},function(I,N,B){var j=this&&this.__extends||function(Z,ee){for(var te in ee)ee.hasOwnProperty(te)&&(Z[te]=ee[te]);function se(){this.constructor=Z}Z.prototype=ee===null?Object.create(ee):(se.prototype=ee.prototype,new se)},U=B(51),q=B(31),Y=B(8),K=B(55),G=B(57),J=function(Z){j(ee,Z);function ee(){Z.apply(this,arguments),this.key=null}return ee.prototype.authorize=function(te,se){var re=this;Z.prototype.authorize.call(this,te,function(ne,le){if(ne){se(!0,le);return}var me=le.shared_secret;if(!me){var ue="No shared_secret key in auth payload for encrypted channel: "+re.name;se(!0,ue),Y.default.warn("Error: "+ue);return}re.key=G.decodeBase64(me),delete le.shared_secret,se(!1,le)})},ee.prototype.trigger=function(te,se){throw new q.UnsupportedFeature("Client events are not currently supported for encrypted channels")},ee.prototype.handleEvent=function(te){var se=te.event,re=te.data;if(se.indexOf("pusher_internal:")===0||se.indexOf("pusher:")===0){Z.prototype.handleEvent.call(this,te);return}this.handleEncryptedEvent(se,re)},ee.prototype.handleEncryptedEvent=function(te,se){var re=this;if(!this.key){Y.default.debug("Received encrypted event before key has been retrieved from the authEndpoint");return}if(!se.ciphertext||!se.nonce){Y.default.warn("Unexpected format for encrypted event, expected object with `ciphertext` and `nonce` fields, got: "+se);return}var ne=G.decodeBase64(se.ciphertext);if(ne.length>24&255,Ke[mt+1]=ft>>16&255,Ke[mt+2]=ft>>8&255,Ke[mt+3]=ft&255,Ke[mt+4]=Ne>>24&255,Ke[mt+5]=Ne>>16&255,Ke[mt+6]=Ne>>8&255,Ke[mt+7]=Ne&255}function me(Ke,mt,ft,Ne,_t){var Xt,sn=0;for(Xt=0;Xt<_t;Xt++)sn|=Ke[mt+Xt]^ft[Ne+Xt];return(1&sn-1>>>8)-1}function ue(Ke,mt,ft,Ne){return me(Ke,mt,ft,Ne,16)}function _e(Ke,mt,ft,Ne){return me(Ke,mt,ft,Ne,32)}function fe(Ke,mt,ft,Ne){for(var _t=Ne[0]&255|(Ne[1]&255)<<8|(Ne[2]&255)<<16|(Ne[3]&255)<<24,Xt=ft[0]&255|(ft[1]&255)<<8|(ft[2]&255)<<16|(ft[3]&255)<<24,sn=ft[4]&255|(ft[5]&255)<<8|(ft[6]&255)<<16|(ft[7]&255)<<24,Tn=ft[8]&255|(ft[9]&255)<<8|(ft[10]&255)<<16|(ft[11]&255)<<24,Nn=ft[12]&255|(ft[13]&255)<<8|(ft[14]&255)<<16|(ft[15]&255)<<24,Qn=Ne[4]&255|(Ne[5]&255)<<8|(Ne[6]&255)<<16|(Ne[7]&255)<<24,Xn=mt[0]&255|(mt[1]&255)<<8|(mt[2]&255)<<16|(mt[3]&255)<<24,Rr=mt[4]&255|(mt[5]&255)<<8|(mt[6]&255)<<16|(mt[7]&255)<<24,tr=mt[8]&255|(mt[9]&255)<<8|(mt[10]&255)<<16|(mt[11]&255)<<24,fr=mt[12]&255|(mt[13]&255)<<8|(mt[14]&255)<<16|(mt[15]&255)<<24,kr=Ne[8]&255|(Ne[9]&255)<<8|(Ne[10]&255)<<16|(Ne[11]&255)<<24,sr=ft[16]&255|(ft[17]&255)<<8|(ft[18]&255)<<16|(ft[19]&255)<<24,Rn=ft[20]&255|(ft[21]&255)<<8|(ft[22]&255)<<16|(ft[23]&255)<<24,mr=ft[24]&255|(ft[25]&255)<<8|(ft[26]&255)<<16|(ft[27]&255)<<24,br=ft[28]&255|(ft[29]&255)<<8|(ft[30]&255)<<16|(ft[31]&255)<<24,hr=Ne[12]&255|(Ne[13]&255)<<8|(Ne[14]&255)<<16|(Ne[15]&255)<<24,zn=_t,er=Xt,Qe=sn,bt=Tn,wt=Nn,zt=Qn,Kt=Xn,Mt=Rr,tn=tr,pn=fr,En=kr,cn=sr,ur=Rn,or=mr,nt=br,gt=hr,et,nn=0;nn<20;nn+=2)et=zn+ur|0,wt^=et<<7|et>>>32-7,et=wt+zn|0,tn^=et<<9|et>>>32-9,et=tn+wt|0,ur^=et<<13|et>>>32-13,et=ur+tn|0,zn^=et<<18|et>>>32-18,et=zt+er|0,pn^=et<<7|et>>>32-7,et=pn+zt|0,or^=et<<9|et>>>32-9,et=or+pn|0,er^=et<<13|et>>>32-13,et=er+or|0,zt^=et<<18|et>>>32-18,et=En+Kt|0,nt^=et<<7|et>>>32-7,et=nt+En|0,Qe^=et<<9|et>>>32-9,et=Qe+nt|0,Kt^=et<<13|et>>>32-13,et=Kt+Qe|0,En^=et<<18|et>>>32-18,et=gt+cn|0,bt^=et<<7|et>>>32-7,et=bt+gt|0,Mt^=et<<9|et>>>32-9,et=Mt+bt|0,cn^=et<<13|et>>>32-13,et=cn+Mt|0,gt^=et<<18|et>>>32-18,et=zn+bt|0,er^=et<<7|et>>>32-7,et=er+zn|0,Qe^=et<<9|et>>>32-9,et=Qe+er|0,bt^=et<<13|et>>>32-13,et=bt+Qe|0,zn^=et<<18|et>>>32-18,et=zt+wt|0,Kt^=et<<7|et>>>32-7,et=Kt+zt|0,Mt^=et<<9|et>>>32-9,et=Mt+Kt|0,wt^=et<<13|et>>>32-13,et=wt+Mt|0,zt^=et<<18|et>>>32-18,et=En+pn|0,cn^=et<<7|et>>>32-7,et=cn+En|0,tn^=et<<9|et>>>32-9,et=tn+cn|0,pn^=et<<13|et>>>32-13,et=pn+tn|0,En^=et<<18|et>>>32-18,et=gt+nt|0,ur^=et<<7|et>>>32-7,et=ur+gt|0,or^=et<<9|et>>>32-9,et=or+ur|0,nt^=et<<13|et>>>32-13,et=nt+or|0,gt^=et<<18|et>>>32-18;zn=zn+_t|0,er=er+Xt|0,Qe=Qe+sn|0,bt=bt+Tn|0,wt=wt+Nn|0,zt=zt+Qn|0,Kt=Kt+Xn|0,Mt=Mt+Rr|0,tn=tn+tr|0,pn=pn+fr|0,En=En+kr|0,cn=cn+sr|0,ur=ur+Rn|0,or=or+mr|0,nt=nt+br|0,gt=gt+hr|0,Ke[0]=zn>>>0&255,Ke[1]=zn>>>8&255,Ke[2]=zn>>>16&255,Ke[3]=zn>>>24&255,Ke[4]=er>>>0&255,Ke[5]=er>>>8&255,Ke[6]=er>>>16&255,Ke[7]=er>>>24&255,Ke[8]=Qe>>>0&255,Ke[9]=Qe>>>8&255,Ke[10]=Qe>>>16&255,Ke[11]=Qe>>>24&255,Ke[12]=bt>>>0&255,Ke[13]=bt>>>8&255,Ke[14]=bt>>>16&255,Ke[15]=bt>>>24&255,Ke[16]=wt>>>0&255,Ke[17]=wt>>>8&255,Ke[18]=wt>>>16&255,Ke[19]=wt>>>24&255,Ke[20]=zt>>>0&255,Ke[21]=zt>>>8&255,Ke[22]=zt>>>16&255,Ke[23]=zt>>>24&255,Ke[24]=Kt>>>0&255,Ke[25]=Kt>>>8&255,Ke[26]=Kt>>>16&255,Ke[27]=Kt>>>24&255,Ke[28]=Mt>>>0&255,Ke[29]=Mt>>>8&255,Ke[30]=Mt>>>16&255,Ke[31]=Mt>>>24&255,Ke[32]=tn>>>0&255,Ke[33]=tn>>>8&255,Ke[34]=tn>>>16&255,Ke[35]=tn>>>24&255,Ke[36]=pn>>>0&255,Ke[37]=pn>>>8&255,Ke[38]=pn>>>16&255,Ke[39]=pn>>>24&255,Ke[40]=En>>>0&255,Ke[41]=En>>>8&255,Ke[42]=En>>>16&255,Ke[43]=En>>>24&255,Ke[44]=cn>>>0&255,Ke[45]=cn>>>8&255,Ke[46]=cn>>>16&255,Ke[47]=cn>>>24&255,Ke[48]=ur>>>0&255,Ke[49]=ur>>>8&255,Ke[50]=ur>>>16&255,Ke[51]=ur>>>24&255,Ke[52]=or>>>0&255,Ke[53]=or>>>8&255,Ke[54]=or>>>16&255,Ke[55]=or>>>24&255,Ke[56]=nt>>>0&255,Ke[57]=nt>>>8&255,Ke[58]=nt>>>16&255,Ke[59]=nt>>>24&255,Ke[60]=gt>>>0&255,Ke[61]=gt>>>8&255,Ke[62]=gt>>>16&255,Ke[63]=gt>>>24&255}function ge(Ke,mt,ft,Ne){for(var _t=Ne[0]&255|(Ne[1]&255)<<8|(Ne[2]&255)<<16|(Ne[3]&255)<<24,Xt=ft[0]&255|(ft[1]&255)<<8|(ft[2]&255)<<16|(ft[3]&255)<<24,sn=ft[4]&255|(ft[5]&255)<<8|(ft[6]&255)<<16|(ft[7]&255)<<24,Tn=ft[8]&255|(ft[9]&255)<<8|(ft[10]&255)<<16|(ft[11]&255)<<24,Nn=ft[12]&255|(ft[13]&255)<<8|(ft[14]&255)<<16|(ft[15]&255)<<24,Qn=Ne[4]&255|(Ne[5]&255)<<8|(Ne[6]&255)<<16|(Ne[7]&255)<<24,Xn=mt[0]&255|(mt[1]&255)<<8|(mt[2]&255)<<16|(mt[3]&255)<<24,Rr=mt[4]&255|(mt[5]&255)<<8|(mt[6]&255)<<16|(mt[7]&255)<<24,tr=mt[8]&255|(mt[9]&255)<<8|(mt[10]&255)<<16|(mt[11]&255)<<24,fr=mt[12]&255|(mt[13]&255)<<8|(mt[14]&255)<<16|(mt[15]&255)<<24,kr=Ne[8]&255|(Ne[9]&255)<<8|(Ne[10]&255)<<16|(Ne[11]&255)<<24,sr=ft[16]&255|(ft[17]&255)<<8|(ft[18]&255)<<16|(ft[19]&255)<<24,Rn=ft[20]&255|(ft[21]&255)<<8|(ft[22]&255)<<16|(ft[23]&255)<<24,mr=ft[24]&255|(ft[25]&255)<<8|(ft[26]&255)<<16|(ft[27]&255)<<24,br=ft[28]&255|(ft[29]&255)<<8|(ft[30]&255)<<16|(ft[31]&255)<<24,hr=Ne[12]&255|(Ne[13]&255)<<8|(Ne[14]&255)<<16|(Ne[15]&255)<<24,zn=_t,er=Xt,Qe=sn,bt=Tn,wt=Nn,zt=Qn,Kt=Xn,Mt=Rr,tn=tr,pn=fr,En=kr,cn=sr,ur=Rn,or=mr,nt=br,gt=hr,et,nn=0;nn<20;nn+=2)et=zn+ur|0,wt^=et<<7|et>>>32-7,et=wt+zn|0,tn^=et<<9|et>>>32-9,et=tn+wt|0,ur^=et<<13|et>>>32-13,et=ur+tn|0,zn^=et<<18|et>>>32-18,et=zt+er|0,pn^=et<<7|et>>>32-7,et=pn+zt|0,or^=et<<9|et>>>32-9,et=or+pn|0,er^=et<<13|et>>>32-13,et=er+or|0,zt^=et<<18|et>>>32-18,et=En+Kt|0,nt^=et<<7|et>>>32-7,et=nt+En|0,Qe^=et<<9|et>>>32-9,et=Qe+nt|0,Kt^=et<<13|et>>>32-13,et=Kt+Qe|0,En^=et<<18|et>>>32-18,et=gt+cn|0,bt^=et<<7|et>>>32-7,et=bt+gt|0,Mt^=et<<9|et>>>32-9,et=Mt+bt|0,cn^=et<<13|et>>>32-13,et=cn+Mt|0,gt^=et<<18|et>>>32-18,et=zn+bt|0,er^=et<<7|et>>>32-7,et=er+zn|0,Qe^=et<<9|et>>>32-9,et=Qe+er|0,bt^=et<<13|et>>>32-13,et=bt+Qe|0,zn^=et<<18|et>>>32-18,et=zt+wt|0,Kt^=et<<7|et>>>32-7,et=Kt+zt|0,Mt^=et<<9|et>>>32-9,et=Mt+Kt|0,wt^=et<<13|et>>>32-13,et=wt+Mt|0,zt^=et<<18|et>>>32-18,et=En+pn|0,cn^=et<<7|et>>>32-7,et=cn+En|0,tn^=et<<9|et>>>32-9,et=tn+cn|0,pn^=et<<13|et>>>32-13,et=pn+tn|0,En^=et<<18|et>>>32-18,et=gt+nt|0,ur^=et<<7|et>>>32-7,et=ur+gt|0,or^=et<<9|et>>>32-9,et=or+ur|0,nt^=et<<13|et>>>32-13,et=nt+or|0,gt^=et<<18|et>>>32-18;Ke[0]=zn>>>0&255,Ke[1]=zn>>>8&255,Ke[2]=zn>>>16&255,Ke[3]=zn>>>24&255,Ke[4]=zt>>>0&255,Ke[5]=zt>>>8&255,Ke[6]=zt>>>16&255,Ke[7]=zt>>>24&255,Ke[8]=En>>>0&255,Ke[9]=En>>>8&255,Ke[10]=En>>>16&255,Ke[11]=En>>>24&255,Ke[12]=gt>>>0&255,Ke[13]=gt>>>8&255,Ke[14]=gt>>>16&255,Ke[15]=gt>>>24&255,Ke[16]=Kt>>>0&255,Ke[17]=Kt>>>8&255,Ke[18]=Kt>>>16&255,Ke[19]=Kt>>>24&255,Ke[20]=Mt>>>0&255,Ke[21]=Mt>>>8&255,Ke[22]=Mt>>>16&255,Ke[23]=Mt>>>24&255,Ke[24]=tn>>>0&255,Ke[25]=tn>>>8&255,Ke[26]=tn>>>16&255,Ke[27]=tn>>>24&255,Ke[28]=pn>>>0&255,Ke[29]=pn>>>8&255,Ke[30]=pn>>>16&255,Ke[31]=pn>>>24&255}function ye(Ke,mt,ft,Ne){fe(Ke,mt,ft,Ne)}function xe(Ke,mt,ft,Ne){ge(Ke,mt,ft,Ne)}var oe=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function be(Ke,mt,ft,Ne,_t,Xt,sn){var Tn=new Uint8Array(16),Nn=new Uint8Array(64),Qn,Xn;for(Xn=0;Xn<16;Xn++)Tn[Xn]=0;for(Xn=0;Xn<8;Xn++)Tn[Xn]=Xt[Xn];for(;_t>=64;){for(ye(Nn,Tn,sn,oe),Xn=0;Xn<64;Xn++)Ke[mt+Xn]=ft[Ne+Xn]^Nn[Xn];for(Qn=1,Xn=8;Xn<16;Xn++)Qn=Qn+(Tn[Xn]&255)|0,Tn[Xn]=Qn&255,Qn>>>=8;_t-=64,mt+=64,Ne+=64}if(_t>0)for(ye(Nn,Tn,sn,oe),Xn=0;Xn<_t;Xn++)Ke[mt+Xn]=ft[Ne+Xn]^Nn[Xn];return 0}function ve(Ke,mt,ft,Ne,_t){var Xt=new Uint8Array(16),sn=new Uint8Array(64),Tn,Nn;for(Nn=0;Nn<16;Nn++)Xt[Nn]=0;for(Nn=0;Nn<8;Nn++)Xt[Nn]=Ne[Nn];for(;ft>=64;){for(ye(sn,Xt,_t,oe),Nn=0;Nn<64;Nn++)Ke[mt+Nn]=sn[Nn];for(Tn=1,Nn=8;Nn<16;Nn++)Tn=Tn+(Xt[Nn]&255)|0,Xt[Nn]=Tn&255,Tn>>>=8;ft-=64,mt+=64}if(ft>0)for(ye(sn,Xt,_t,oe),Nn=0;Nn>>13|ft<<3)&8191,Ne=Ke[4]&255|(Ke[5]&255)<<8,this.r[2]=(ft>>>10|Ne<<6)&7939,_t=Ke[6]&255|(Ke[7]&255)<<8,this.r[3]=(Ne>>>7|_t<<9)&8191,Xt=Ke[8]&255|(Ke[9]&255)<<8,this.r[4]=(_t>>>4|Xt<<12)&255,this.r[5]=Xt>>>1&8190,sn=Ke[10]&255|(Ke[11]&255)<<8,this.r[6]=(Xt>>>14|sn<<2)&8191,Tn=Ke[12]&255|(Ke[13]&255)<<8,this.r[7]=(sn>>>11|Tn<<5)&8065,Nn=Ke[14]&255|(Ke[15]&255)<<8,this.r[8]=(Tn>>>8|Nn<<8)&8191,this.r[9]=Nn>>>5&127,this.pad[0]=Ke[16]&255|(Ke[17]&255)<<8,this.pad[1]=Ke[18]&255|(Ke[19]&255)<<8,this.pad[2]=Ke[20]&255|(Ke[21]&255)<<8,this.pad[3]=Ke[22]&255|(Ke[23]&255)<<8,this.pad[4]=Ke[24]&255|(Ke[25]&255)<<8,this.pad[5]=Ke[26]&255|(Ke[27]&255)<<8,this.pad[6]=Ke[28]&255|(Ke[29]&255)<<8,this.pad[7]=Ke[30]&255|(Ke[31]&255)<<8};Se.prototype.blocks=function(Ke,mt,ft){for(var Ne=this.fin?0:2048,_t,Xt,sn,Tn,Nn,Qn,Xn,Rr,tr,fr,kr,sr,Rn,mr,br,hr,zn,er,Qe,bt=this.h[0],wt=this.h[1],zt=this.h[2],Kt=this.h[3],Mt=this.h[4],tn=this.h[5],pn=this.h[6],En=this.h[7],cn=this.h[8],ur=this.h[9],or=this.r[0],nt=this.r[1],gt=this.r[2],et=this.r[3],nn=this.r[4],kn=this.r[5],Un=this.r[6],Jn=this.r[7],_r=this.r[8],xr=this.r[9];ft>=16;)_t=Ke[mt+0]&255|(Ke[mt+1]&255)<<8,bt+=_t&8191,Xt=Ke[mt+2]&255|(Ke[mt+3]&255)<<8,wt+=(_t>>>13|Xt<<3)&8191,sn=Ke[mt+4]&255|(Ke[mt+5]&255)<<8,zt+=(Xt>>>10|sn<<6)&8191,Tn=Ke[mt+6]&255|(Ke[mt+7]&255)<<8,Kt+=(sn>>>7|Tn<<9)&8191,Nn=Ke[mt+8]&255|(Ke[mt+9]&255)<<8,Mt+=(Tn>>>4|Nn<<12)&8191,tn+=Nn>>>1&8191,Qn=Ke[mt+10]&255|(Ke[mt+11]&255)<<8,pn+=(Nn>>>14|Qn<<2)&8191,Xn=Ke[mt+12]&255|(Ke[mt+13]&255)<<8,En+=(Qn>>>11|Xn<<5)&8191,Rr=Ke[mt+14]&255|(Ke[mt+15]&255)<<8,cn+=(Xn>>>8|Rr<<8)&8191,ur+=Rr>>>5|Ne,tr=0,fr=tr,fr+=bt*or,fr+=wt*(5*xr),fr+=zt*(5*_r),fr+=Kt*(5*Jn),fr+=Mt*(5*Un),tr=fr>>>13,fr&=8191,fr+=tn*(5*kn),fr+=pn*(5*nn),fr+=En*(5*et),fr+=cn*(5*gt),fr+=ur*(5*nt),tr+=fr>>>13,fr&=8191,kr=tr,kr+=bt*nt,kr+=wt*or,kr+=zt*(5*xr),kr+=Kt*(5*_r),kr+=Mt*(5*Jn),tr=kr>>>13,kr&=8191,kr+=tn*(5*Un),kr+=pn*(5*kn),kr+=En*(5*nn),kr+=cn*(5*et),kr+=ur*(5*gt),tr+=kr>>>13,kr&=8191,sr=tr,sr+=bt*gt,sr+=wt*nt,sr+=zt*or,sr+=Kt*(5*xr),sr+=Mt*(5*_r),tr=sr>>>13,sr&=8191,sr+=tn*(5*Jn),sr+=pn*(5*Un),sr+=En*(5*kn),sr+=cn*(5*nn),sr+=ur*(5*et),tr+=sr>>>13,sr&=8191,Rn=tr,Rn+=bt*et,Rn+=wt*gt,Rn+=zt*nt,Rn+=Kt*or,Rn+=Mt*(5*xr),tr=Rn>>>13,Rn&=8191,Rn+=tn*(5*_r),Rn+=pn*(5*Jn),Rn+=En*(5*Un),Rn+=cn*(5*kn),Rn+=ur*(5*nn),tr+=Rn>>>13,Rn&=8191,mr=tr,mr+=bt*nn,mr+=wt*et,mr+=zt*gt,mr+=Kt*nt,mr+=Mt*or,tr=mr>>>13,mr&=8191,mr+=tn*(5*xr),mr+=pn*(5*_r),mr+=En*(5*Jn),mr+=cn*(5*Un),mr+=ur*(5*kn),tr+=mr>>>13,mr&=8191,br=tr,br+=bt*kn,br+=wt*nn,br+=zt*et,br+=Kt*gt,br+=Mt*nt,tr=br>>>13,br&=8191,br+=tn*or,br+=pn*(5*xr),br+=En*(5*_r),br+=cn*(5*Jn),br+=ur*(5*Un),tr+=br>>>13,br&=8191,hr=tr,hr+=bt*Un,hr+=wt*kn,hr+=zt*nn,hr+=Kt*et,hr+=Mt*gt,tr=hr>>>13,hr&=8191,hr+=tn*nt,hr+=pn*or,hr+=En*(5*xr),hr+=cn*(5*_r),hr+=ur*(5*Jn),tr+=hr>>>13,hr&=8191,zn=tr,zn+=bt*Jn,zn+=wt*Un,zn+=zt*kn,zn+=Kt*nn,zn+=Mt*et,tr=zn>>>13,zn&=8191,zn+=tn*gt,zn+=pn*nt,zn+=En*or,zn+=cn*(5*xr),zn+=ur*(5*_r),tr+=zn>>>13,zn&=8191,er=tr,er+=bt*_r,er+=wt*Jn,er+=zt*Un,er+=Kt*kn,er+=Mt*nn,tr=er>>>13,er&=8191,er+=tn*et,er+=pn*gt,er+=En*nt,er+=cn*or,er+=ur*(5*xr),tr+=er>>>13,er&=8191,Qe=tr,Qe+=bt*xr,Qe+=wt*_r,Qe+=zt*Jn,Qe+=Kt*Un,Qe+=Mt*kn,tr=Qe>>>13,Qe&=8191,Qe+=tn*nn,Qe+=pn*et,Qe+=En*gt,Qe+=cn*nt,Qe+=ur*or,tr+=Qe>>>13,Qe&=8191,tr=(tr<<2)+tr|0,tr=tr+fr|0,fr=tr&8191,tr=tr>>>13,kr+=tr,bt=fr,wt=kr,zt=sr,Kt=Rn,Mt=mr,tn=br,pn=hr,En=zn,cn=er,ur=Qe,mt+=16,ft-=16;this.h[0]=bt,this.h[1]=wt,this.h[2]=zt,this.h[3]=Kt,this.h[4]=Mt,this.h[5]=tn,this.h[6]=pn,this.h[7]=En,this.h[8]=cn,this.h[9]=ur},Se.prototype.finish=function(Ke,mt){var ft=new Uint16Array(10),Ne,_t,Xt,sn;if(this.leftover){for(sn=this.leftover,this.buffer[sn++]=1;sn<16;sn++)this.buffer[sn]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(Ne=this.h[1]>>>13,this.h[1]&=8191,sn=2;sn<10;sn++)this.h[sn]+=Ne,Ne=this.h[sn]>>>13,this.h[sn]&=8191;for(this.h[0]+=Ne*5,Ne=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=Ne,Ne=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=Ne,ft[0]=this.h[0]+5,Ne=ft[0]>>>13,ft[0]&=8191,sn=1;sn<10;sn++)ft[sn]=this.h[sn]+Ne,Ne=ft[sn]>>>13,ft[sn]&=8191;for(ft[9]-=8192,_t=(Ne^1)-1,sn=0;sn<10;sn++)ft[sn]&=_t;for(_t=~_t,sn=0;sn<10;sn++)this.h[sn]=this.h[sn]&_t|ft[sn];for(this.h[0]=(this.h[0]|this.h[1]<<13)&65535,this.h[1]=(this.h[1]>>>3|this.h[2]<<10)&65535,this.h[2]=(this.h[2]>>>6|this.h[3]<<7)&65535,this.h[3]=(this.h[3]>>>9|this.h[4]<<4)&65535,this.h[4]=(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14)&65535,this.h[5]=(this.h[6]>>>2|this.h[7]<<11)&65535,this.h[6]=(this.h[7]>>>5|this.h[8]<<8)&65535,this.h[7]=(this.h[8]>>>8|this.h[9]<<5)&65535,Xt=this.h[0]+this.pad[0],this.h[0]=Xt&65535,sn=1;sn<8;sn++)Xt=(this.h[sn]+this.pad[sn]|0)+(Xt>>>16)|0,this.h[sn]=Xt&65535;Ke[mt+0]=this.h[0]>>>0&255,Ke[mt+1]=this.h[0]>>>8&255,Ke[mt+2]=this.h[1]>>>0&255,Ke[mt+3]=this.h[1]>>>8&255,Ke[mt+4]=this.h[2]>>>0&255,Ke[mt+5]=this.h[2]>>>8&255,Ke[mt+6]=this.h[3]>>>0&255,Ke[mt+7]=this.h[3]>>>8&255,Ke[mt+8]=this.h[4]>>>0&255,Ke[mt+9]=this.h[4]>>>8&255,Ke[mt+10]=this.h[5]>>>0&255,Ke[mt+11]=this.h[5]>>>8&255,Ke[mt+12]=this.h[6]>>>0&255,Ke[mt+13]=this.h[6]>>>8&255,Ke[mt+14]=this.h[7]>>>0&255,Ke[mt+15]=this.h[7]>>>8&255},Se.prototype.update=function(Ke,mt,ft){var Ne,_t;if(this.leftover){for(_t=16-this.leftover,_t>ft&&(_t=ft),Ne=0;Ne<_t;Ne++)this.buffer[this.leftover+Ne]=Ke[mt+Ne];if(ft-=_t,mt+=_t,this.leftover+=_t,this.leftover<16)return;this.blocks(this.buffer,0,16),this.leftover=0}if(ft>=16&&(_t=ft-ft%16,this.blocks(Ke,mt,_t),mt+=_t,ft-=_t),ft){for(Ne=0;Ne>16&1),Xt[ft-1]&=65535;Xt[15]=sn[15]-32767-(Xt[14]>>16&1),_t=Xt[15]>>16&1,Xt[14]&=65535,qe(sn,Xt,1-_t)}for(ft=0;ft<16;ft++)Ke[2*ft]=sn[ft]&255,Ke[2*ft+1]=sn[ft]>>8}function Rt(Ke,mt){var ft=new Uint8Array(32),Ne=new Uint8Array(32);return Ve(ft,Ke),Ve(Ne,mt),_e(ft,0,Ne,0)}function Nt(Ke){var mt=new Uint8Array(32);return Ve(mt,Ke),mt[0]&1}function Lt(Ke,mt){var ft;for(ft=0;ft<16;ft++)Ke[ft]=mt[2*ft]+(mt[2*ft+1]<<8);Ke[15]&=32767}function Ht(Ke,mt,ft){for(var Ne=0;Ne<16;Ne++)Ke[Ne]=mt[Ne]+ft[Ne]}function Wt(Ke,mt,ft){for(var Ne=0;Ne<16;Ne++)Ke[Ne]=mt[Ne]-ft[Ne]}function Jt(Ke,mt,ft){var Ne,_t,Xt=0,sn=0,Tn=0,Nn=0,Qn=0,Xn=0,Rr=0,tr=0,fr=0,kr=0,sr=0,Rn=0,mr=0,br=0,hr=0,zn=0,er=0,Qe=0,bt=0,wt=0,zt=0,Kt=0,Mt=0,tn=0,pn=0,En=0,cn=0,ur=0,or=0,nt=0,gt=0,et=ft[0],nn=ft[1],kn=ft[2],Un=ft[3],Jn=ft[4],_r=ft[5],xr=ft[6],Nr=ft[7],Mr=ft[8],Zr=ft[9],ti=ft[10],Xr=ft[11],ni=ft[12],qr=ft[13],ei=ft[14],mi=ft[15];Ne=mt[0],Xt+=Ne*et,sn+=Ne*nn,Tn+=Ne*kn,Nn+=Ne*Un,Qn+=Ne*Jn,Xn+=Ne*_r,Rr+=Ne*xr,tr+=Ne*Nr,fr+=Ne*Mr,kr+=Ne*Zr,sr+=Ne*ti,Rn+=Ne*Xr,mr+=Ne*ni,br+=Ne*qr,hr+=Ne*ei,zn+=Ne*mi,Ne=mt[1],sn+=Ne*et,Tn+=Ne*nn,Nn+=Ne*kn,Qn+=Ne*Un,Xn+=Ne*Jn,Rr+=Ne*_r,tr+=Ne*xr,fr+=Ne*Nr,kr+=Ne*Mr,sr+=Ne*Zr,Rn+=Ne*ti,mr+=Ne*Xr,br+=Ne*ni,hr+=Ne*qr,zn+=Ne*ei,er+=Ne*mi,Ne=mt[2],Tn+=Ne*et,Nn+=Ne*nn,Qn+=Ne*kn,Xn+=Ne*Un,Rr+=Ne*Jn,tr+=Ne*_r,fr+=Ne*xr,kr+=Ne*Nr,sr+=Ne*Mr,Rn+=Ne*Zr,mr+=Ne*ti,br+=Ne*Xr,hr+=Ne*ni,zn+=Ne*qr,er+=Ne*ei,Qe+=Ne*mi,Ne=mt[3],Nn+=Ne*et,Qn+=Ne*nn,Xn+=Ne*kn,Rr+=Ne*Un,tr+=Ne*Jn,fr+=Ne*_r,kr+=Ne*xr,sr+=Ne*Nr,Rn+=Ne*Mr,mr+=Ne*Zr,br+=Ne*ti,hr+=Ne*Xr,zn+=Ne*ni,er+=Ne*qr,Qe+=Ne*ei,bt+=Ne*mi,Ne=mt[4],Qn+=Ne*et,Xn+=Ne*nn,Rr+=Ne*kn,tr+=Ne*Un,fr+=Ne*Jn,kr+=Ne*_r,sr+=Ne*xr,Rn+=Ne*Nr,mr+=Ne*Mr,br+=Ne*Zr,hr+=Ne*ti,zn+=Ne*Xr,er+=Ne*ni,Qe+=Ne*qr,bt+=Ne*ei,wt+=Ne*mi,Ne=mt[5],Xn+=Ne*et,Rr+=Ne*nn,tr+=Ne*kn,fr+=Ne*Un,kr+=Ne*Jn,sr+=Ne*_r,Rn+=Ne*xr,mr+=Ne*Nr,br+=Ne*Mr,hr+=Ne*Zr,zn+=Ne*ti,er+=Ne*Xr,Qe+=Ne*ni,bt+=Ne*qr,wt+=Ne*ei,zt+=Ne*mi,Ne=mt[6],Rr+=Ne*et,tr+=Ne*nn,fr+=Ne*kn,kr+=Ne*Un,sr+=Ne*Jn,Rn+=Ne*_r,mr+=Ne*xr,br+=Ne*Nr,hr+=Ne*Mr,zn+=Ne*Zr,er+=Ne*ti,Qe+=Ne*Xr,bt+=Ne*ni,wt+=Ne*qr,zt+=Ne*ei,Kt+=Ne*mi,Ne=mt[7],tr+=Ne*et,fr+=Ne*nn,kr+=Ne*kn,sr+=Ne*Un,Rn+=Ne*Jn,mr+=Ne*_r,br+=Ne*xr,hr+=Ne*Nr,zn+=Ne*Mr,er+=Ne*Zr,Qe+=Ne*ti,bt+=Ne*Xr,wt+=Ne*ni,zt+=Ne*qr,Kt+=Ne*ei,Mt+=Ne*mi,Ne=mt[8],fr+=Ne*et,kr+=Ne*nn,sr+=Ne*kn,Rn+=Ne*Un,mr+=Ne*Jn,br+=Ne*_r,hr+=Ne*xr,zn+=Ne*Nr,er+=Ne*Mr,Qe+=Ne*Zr,bt+=Ne*ti,wt+=Ne*Xr,zt+=Ne*ni,Kt+=Ne*qr,Mt+=Ne*ei,tn+=Ne*mi,Ne=mt[9],kr+=Ne*et,sr+=Ne*nn,Rn+=Ne*kn,mr+=Ne*Un,br+=Ne*Jn,hr+=Ne*_r,zn+=Ne*xr,er+=Ne*Nr,Qe+=Ne*Mr,bt+=Ne*Zr,wt+=Ne*ti,zt+=Ne*Xr,Kt+=Ne*ni,Mt+=Ne*qr,tn+=Ne*ei,pn+=Ne*mi,Ne=mt[10],sr+=Ne*et,Rn+=Ne*nn,mr+=Ne*kn,br+=Ne*Un,hr+=Ne*Jn,zn+=Ne*_r,er+=Ne*xr,Qe+=Ne*Nr,bt+=Ne*Mr,wt+=Ne*Zr,zt+=Ne*ti,Kt+=Ne*Xr,Mt+=Ne*ni,tn+=Ne*qr,pn+=Ne*ei,En+=Ne*mi,Ne=mt[11],Rn+=Ne*et,mr+=Ne*nn,br+=Ne*kn,hr+=Ne*Un,zn+=Ne*Jn,er+=Ne*_r,Qe+=Ne*xr,bt+=Ne*Nr,wt+=Ne*Mr,zt+=Ne*Zr,Kt+=Ne*ti,Mt+=Ne*Xr,tn+=Ne*ni,pn+=Ne*qr,En+=Ne*ei,cn+=Ne*mi,Ne=mt[12],mr+=Ne*et,br+=Ne*nn,hr+=Ne*kn,zn+=Ne*Un,er+=Ne*Jn,Qe+=Ne*_r,bt+=Ne*xr,wt+=Ne*Nr,zt+=Ne*Mr,Kt+=Ne*Zr,Mt+=Ne*ti,tn+=Ne*Xr,pn+=Ne*ni,En+=Ne*qr,cn+=Ne*ei,ur+=Ne*mi,Ne=mt[13],br+=Ne*et,hr+=Ne*nn,zn+=Ne*kn,er+=Ne*Un,Qe+=Ne*Jn,bt+=Ne*_r,wt+=Ne*xr,zt+=Ne*Nr,Kt+=Ne*Mr,Mt+=Ne*Zr,tn+=Ne*ti,pn+=Ne*Xr,En+=Ne*ni,cn+=Ne*qr,ur+=Ne*ei,or+=Ne*mi,Ne=mt[14],hr+=Ne*et,zn+=Ne*nn,er+=Ne*kn,Qe+=Ne*Un,bt+=Ne*Jn,wt+=Ne*_r,zt+=Ne*xr,Kt+=Ne*Nr,Mt+=Ne*Mr,tn+=Ne*Zr,pn+=Ne*ti,En+=Ne*Xr,cn+=Ne*ni,ur+=Ne*qr,or+=Ne*ei,nt+=Ne*mi,Ne=mt[15],zn+=Ne*et,er+=Ne*nn,Qe+=Ne*kn,bt+=Ne*Un,wt+=Ne*Jn,zt+=Ne*_r,Kt+=Ne*xr,Mt+=Ne*Nr,tn+=Ne*Mr,pn+=Ne*Zr,En+=Ne*ti,cn+=Ne*Xr,ur+=Ne*ni,or+=Ne*qr,nt+=Ne*ei,gt+=Ne*mi,Xt+=38*er,sn+=38*Qe,Tn+=38*bt,Nn+=38*wt,Qn+=38*zt,Xn+=38*Kt,Rr+=38*Mt,tr+=38*tn,fr+=38*pn,kr+=38*En,sr+=38*cn,Rn+=38*ur,mr+=38*or,br+=38*nt,hr+=38*gt,_t=1,Ne=Xt+_t+65535,_t=Math.floor(Ne/65536),Xt=Ne-_t*65536,Ne=sn+_t+65535,_t=Math.floor(Ne/65536),sn=Ne-_t*65536,Ne=Tn+_t+65535,_t=Math.floor(Ne/65536),Tn=Ne-_t*65536,Ne=Nn+_t+65535,_t=Math.floor(Ne/65536),Nn=Ne-_t*65536,Ne=Qn+_t+65535,_t=Math.floor(Ne/65536),Qn=Ne-_t*65536,Ne=Xn+_t+65535,_t=Math.floor(Ne/65536),Xn=Ne-_t*65536,Ne=Rr+_t+65535,_t=Math.floor(Ne/65536),Rr=Ne-_t*65536,Ne=tr+_t+65535,_t=Math.floor(Ne/65536),tr=Ne-_t*65536,Ne=fr+_t+65535,_t=Math.floor(Ne/65536),fr=Ne-_t*65536,Ne=kr+_t+65535,_t=Math.floor(Ne/65536),kr=Ne-_t*65536,Ne=sr+_t+65535,_t=Math.floor(Ne/65536),sr=Ne-_t*65536,Ne=Rn+_t+65535,_t=Math.floor(Ne/65536),Rn=Ne-_t*65536,Ne=mr+_t+65535,_t=Math.floor(Ne/65536),mr=Ne-_t*65536,Ne=br+_t+65535,_t=Math.floor(Ne/65536),br=Ne-_t*65536,Ne=hr+_t+65535,_t=Math.floor(Ne/65536),hr=Ne-_t*65536,Ne=zn+_t+65535,_t=Math.floor(Ne/65536),zn=Ne-_t*65536,Xt+=_t-1+37*(_t-1),_t=1,Ne=Xt+_t+65535,_t=Math.floor(Ne/65536),Xt=Ne-_t*65536,Ne=sn+_t+65535,_t=Math.floor(Ne/65536),sn=Ne-_t*65536,Ne=Tn+_t+65535,_t=Math.floor(Ne/65536),Tn=Ne-_t*65536,Ne=Nn+_t+65535,_t=Math.floor(Ne/65536),Nn=Ne-_t*65536,Ne=Qn+_t+65535,_t=Math.floor(Ne/65536),Qn=Ne-_t*65536,Ne=Xn+_t+65535,_t=Math.floor(Ne/65536),Xn=Ne-_t*65536,Ne=Rr+_t+65535,_t=Math.floor(Ne/65536),Rr=Ne-_t*65536,Ne=tr+_t+65535,_t=Math.floor(Ne/65536),tr=Ne-_t*65536,Ne=fr+_t+65535,_t=Math.floor(Ne/65536),fr=Ne-_t*65536,Ne=kr+_t+65535,_t=Math.floor(Ne/65536),kr=Ne-_t*65536,Ne=sr+_t+65535,_t=Math.floor(Ne/65536),sr=Ne-_t*65536,Ne=Rn+_t+65535,_t=Math.floor(Ne/65536),Rn=Ne-_t*65536,Ne=mr+_t+65535,_t=Math.floor(Ne/65536),mr=Ne-_t*65536,Ne=br+_t+65535,_t=Math.floor(Ne/65536),br=Ne-_t*65536,Ne=hr+_t+65535,_t=Math.floor(Ne/65536),hr=Ne-_t*65536,Ne=zn+_t+65535,_t=Math.floor(Ne/65536),zn=Ne-_t*65536,Xt+=_t-1+37*(_t-1),Ke[0]=Xt,Ke[1]=sn,Ke[2]=Tn,Ke[3]=Nn,Ke[4]=Qn,Ke[5]=Xn,Ke[6]=Rr,Ke[7]=tr,Ke[8]=fr,Ke[9]=kr,Ke[10]=sr,Ke[11]=Rn,Ke[12]=mr,Ke[13]=br,Ke[14]=hr,Ke[15]=zn}function Zt(Ke,mt){Jt(Ke,mt,mt)}function bn(Ke,mt){var ft=U(),Ne;for(Ne=0;Ne<16;Ne++)ft[Ne]=mt[Ne];for(Ne=253;Ne>=0;Ne--)Zt(ft,ft),Ne!==2&&Ne!==4&&Jt(ft,ft,mt);for(Ne=0;Ne<16;Ne++)Ke[Ne]=ft[Ne]}function gn(Ke,mt){var ft=U(),Ne;for(Ne=0;Ne<16;Ne++)ft[Ne]=mt[Ne];for(Ne=250;Ne>=0;Ne--)Zt(ft,ft),Ne!==1&&Jt(ft,ft,mt);for(Ne=0;Ne<16;Ne++)Ke[Ne]=ft[Ne]}function Hn(Ke,mt,ft){var Ne=new Uint8Array(32),_t=new Float64Array(80),Xt,sn,Tn=U(),Nn=U(),Qn=U(),Xn=U(),Rr=U(),tr=U();for(sn=0;sn<31;sn++)Ne[sn]=mt[sn];for(Ne[31]=mt[31]&127|64,Ne[0]&=248,Lt(_t,ft),sn=0;sn<16;sn++)Nn[sn]=_t[sn],Xn[sn]=Tn[sn]=Qn[sn]=0;for(Tn[0]=Xn[0]=1,sn=254;sn>=0;--sn)Xt=Ne[sn>>>3]>>>(sn&7)&1,qe(Tn,Nn,Xt),qe(Qn,Xn,Xt),Ht(Rr,Tn,Qn),Wt(Tn,Tn,Qn),Ht(Qn,Nn,Xn),Wt(Nn,Nn,Xn),Zt(Xn,Rr),Zt(tr,Tn),Jt(Tn,Qn,Tn),Jt(Qn,Nn,Rr),Ht(Rr,Tn,Qn),Wt(Tn,Tn,Qn),Zt(Nn,Tn),Wt(Qn,Xn,tr),Jt(Tn,Qn,Z),Ht(Tn,Tn,Xn),Jt(Qn,Qn,Tn),Jt(Tn,Xn,tr),Jt(Xn,Nn,_t),Zt(Nn,Rr),qe(Tn,Nn,Xt),qe(Qn,Xn,Xt);for(sn=0;sn<16;sn++)_t[sn+16]=Tn[sn],_t[sn+32]=Qn[sn],_t[sn+48]=Nn[sn],_t[sn+64]=Xn[sn];var fr=_t.subarray(32),kr=_t.subarray(16);return bn(fr,fr),Jt(kr,kr,fr),Ve(Ke,kr),0}function Pn(Ke,mt){return Hn(Ke,mt,K)}function Bn(Ke,mt){return q(mt,32),Pn(Ke,mt)}function An(Ke,mt,ft){var Ne=new Uint8Array(32);return Hn(Ne,ft,mt),xe(Ke,Y,Ne,oe)}var Dn=Le,kt=Fe;function We(Ke,mt,ft,Ne,_t,Xt){var sn=new Uint8Array(32);return An(sn,_t,Xt),Dn(Ke,mt,ft,Ne,sn)}function xt(Ke,mt,ft,Ne,_t,Xt){var sn=new Uint8Array(32);return An(sn,_t,Xt),kt(Ke,mt,ft,Ne,sn)}var Ue=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function Oe(Ke,mt,ft,Ne){for(var _t=new Int32Array(16),Xt=new Int32Array(16),sn,Tn,Nn,Qn,Xn,Rr,tr,fr,kr,sr,Rn,mr,br,hr,zn,er,Qe,bt,wt,zt,Kt,Mt,tn,pn,En,cn,ur=Ke[0],or=Ke[1],nt=Ke[2],gt=Ke[3],et=Ke[4],nn=Ke[5],kn=Ke[6],Un=Ke[7],Jn=mt[0],_r=mt[1],xr=mt[2],Nr=mt[3],Mr=mt[4],Zr=mt[5],ti=mt[6],Xr=mt[7],ni=0;Ne>=128;){for(wt=0;wt<16;wt++)zt=8*wt+ni,_t[wt]=ft[zt+0]<<24|ft[zt+1]<<16|ft[zt+2]<<8|ft[zt+3],Xt[wt]=ft[zt+4]<<24|ft[zt+5]<<16|ft[zt+6]<<8|ft[zt+7];for(wt=0;wt<80;wt++)if(sn=ur,Tn=or,Nn=nt,Qn=gt,Xn=et,Rr=nn,tr=kn,fr=Un,kr=Jn,sr=_r,Rn=xr,mr=Nr,br=Mr,hr=Zr,zn=ti,er=Xr,Kt=Un,Mt=Xr,tn=Mt&65535,pn=Mt>>>16,En=Kt&65535,cn=Kt>>>16,Kt=(et>>>14|Mr<<32-14)^(et>>>18|Mr<<32-18)^(Mr>>>41-32|et<<32-(41-32)),Mt=(Mr>>>14|et<<32-14)^(Mr>>>18|et<<32-18)^(et>>>41-32|Mr<<32-(41-32)),tn+=Mt&65535,pn+=Mt>>>16,En+=Kt&65535,cn+=Kt>>>16,Kt=et&nn^~et&kn,Mt=Mr&Zr^~Mr&ti,tn+=Mt&65535,pn+=Mt>>>16,En+=Kt&65535,cn+=Kt>>>16,Kt=Ue[wt*2],Mt=Ue[wt*2+1],tn+=Mt&65535,pn+=Mt>>>16,En+=Kt&65535,cn+=Kt>>>16,Kt=_t[wt%16],Mt=Xt[wt%16],tn+=Mt&65535,pn+=Mt>>>16,En+=Kt&65535,cn+=Kt>>>16,pn+=tn>>>16,En+=pn>>>16,cn+=En>>>16,Qe=En&65535|cn<<16,bt=tn&65535|pn<<16,Kt=Qe,Mt=bt,tn=Mt&65535,pn=Mt>>>16,En=Kt&65535,cn=Kt>>>16,Kt=(ur>>>28|Jn<<32-28)^(Jn>>>34-32|ur<<32-(34-32))^(Jn>>>39-32|ur<<32-(39-32)),Mt=(Jn>>>28|ur<<32-28)^(ur>>>34-32|Jn<<32-(34-32))^(ur>>>39-32|Jn<<32-(39-32)),tn+=Mt&65535,pn+=Mt>>>16,En+=Kt&65535,cn+=Kt>>>16,Kt=ur&or^ur&nt^or&nt,Mt=Jn&_r^Jn&xr^_r&xr,tn+=Mt&65535,pn+=Mt>>>16,En+=Kt&65535,cn+=Kt>>>16,pn+=tn>>>16,En+=pn>>>16,cn+=En>>>16,fr=En&65535|cn<<16,er=tn&65535|pn<<16,Kt=Qn,Mt=mr,tn=Mt&65535,pn=Mt>>>16,En=Kt&65535,cn=Kt>>>16,Kt=Qe,Mt=bt,tn+=Mt&65535,pn+=Mt>>>16,En+=Kt&65535,cn+=Kt>>>16,pn+=tn>>>16,En+=pn>>>16,cn+=En>>>16,Qn=En&65535|cn<<16,mr=tn&65535|pn<<16,or=sn,nt=Tn,gt=Nn,et=Qn,nn=Xn,kn=Rr,Un=tr,ur=fr,_r=kr,xr=sr,Nr=Rn,Mr=mr,Zr=br,ti=hr,Xr=zn,Jn=er,wt%16===15)for(zt=0;zt<16;zt++)Kt=_t[zt],Mt=Xt[zt],tn=Mt&65535,pn=Mt>>>16,En=Kt&65535,cn=Kt>>>16,Kt=_t[(zt+9)%16],Mt=Xt[(zt+9)%16],tn+=Mt&65535,pn+=Mt>>>16,En+=Kt&65535,cn+=Kt>>>16,Qe=_t[(zt+1)%16],bt=Xt[(zt+1)%16],Kt=(Qe>>>1|bt<<32-1)^(Qe>>>8|bt<<32-8)^Qe>>>7,Mt=(bt>>>1|Qe<<32-1)^(bt>>>8|Qe<<32-8)^(bt>>>7|Qe<<32-7),tn+=Mt&65535,pn+=Mt>>>16,En+=Kt&65535,cn+=Kt>>>16,Qe=_t[(zt+14)%16],bt=Xt[(zt+14)%16],Kt=(Qe>>>19|bt<<32-19)^(bt>>>61-32|Qe<<32-(61-32))^Qe>>>6,Mt=(bt>>>19|Qe<<32-19)^(Qe>>>61-32|bt<<32-(61-32))^(bt>>>6|Qe<<32-6),tn+=Mt&65535,pn+=Mt>>>16,En+=Kt&65535,cn+=Kt>>>16,pn+=tn>>>16,En+=pn>>>16,cn+=En>>>16,_t[zt]=En&65535|cn<<16,Xt[zt]=tn&65535|pn<<16;Kt=ur,Mt=Jn,tn=Mt&65535,pn=Mt>>>16,En=Kt&65535,cn=Kt>>>16,Kt=Ke[0],Mt=mt[0],tn+=Mt&65535,pn+=Mt>>>16,En+=Kt&65535,cn+=Kt>>>16,pn+=tn>>>16,En+=pn>>>16,cn+=En>>>16,Ke[0]=ur=En&65535|cn<<16,mt[0]=Jn=tn&65535|pn<<16,Kt=or,Mt=_r,tn=Mt&65535,pn=Mt>>>16,En=Kt&65535,cn=Kt>>>16,Kt=Ke[1],Mt=mt[1],tn+=Mt&65535,pn+=Mt>>>16,En+=Kt&65535,cn+=Kt>>>16,pn+=tn>>>16,En+=pn>>>16,cn+=En>>>16,Ke[1]=or=En&65535|cn<<16,mt[1]=_r=tn&65535|pn<<16,Kt=nt,Mt=xr,tn=Mt&65535,pn=Mt>>>16,En=Kt&65535,cn=Kt>>>16,Kt=Ke[2],Mt=mt[2],tn+=Mt&65535,pn+=Mt>>>16,En+=Kt&65535,cn+=Kt>>>16,pn+=tn>>>16,En+=pn>>>16,cn+=En>>>16,Ke[2]=nt=En&65535|cn<<16,mt[2]=xr=tn&65535|pn<<16,Kt=gt,Mt=Nr,tn=Mt&65535,pn=Mt>>>16,En=Kt&65535,cn=Kt>>>16,Kt=Ke[3],Mt=mt[3],tn+=Mt&65535,pn+=Mt>>>16,En+=Kt&65535,cn+=Kt>>>16,pn+=tn>>>16,En+=pn>>>16,cn+=En>>>16,Ke[3]=gt=En&65535|cn<<16,mt[3]=Nr=tn&65535|pn<<16,Kt=et,Mt=Mr,tn=Mt&65535,pn=Mt>>>16,En=Kt&65535,cn=Kt>>>16,Kt=Ke[4],Mt=mt[4],tn+=Mt&65535,pn+=Mt>>>16,En+=Kt&65535,cn+=Kt>>>16,pn+=tn>>>16,En+=pn>>>16,cn+=En>>>16,Ke[4]=et=En&65535|cn<<16,mt[4]=Mr=tn&65535|pn<<16,Kt=nn,Mt=Zr,tn=Mt&65535,pn=Mt>>>16,En=Kt&65535,cn=Kt>>>16,Kt=Ke[5],Mt=mt[5],tn+=Mt&65535,pn+=Mt>>>16,En+=Kt&65535,cn+=Kt>>>16,pn+=tn>>>16,En+=pn>>>16,cn+=En>>>16,Ke[5]=nn=En&65535|cn<<16,mt[5]=Zr=tn&65535|pn<<16,Kt=kn,Mt=ti,tn=Mt&65535,pn=Mt>>>16,En=Kt&65535,cn=Kt>>>16,Kt=Ke[6],Mt=mt[6],tn+=Mt&65535,pn+=Mt>>>16,En+=Kt&65535,cn+=Kt>>>16,pn+=tn>>>16,En+=pn>>>16,cn+=En>>>16,Ke[6]=kn=En&65535|cn<<16,mt[6]=ti=tn&65535|pn<<16,Kt=Un,Mt=Xr,tn=Mt&65535,pn=Mt>>>16,En=Kt&65535,cn=Kt>>>16,Kt=Ke[7],Mt=mt[7],tn+=Mt&65535,pn+=Mt>>>16,En+=Kt&65535,cn+=Kt>>>16,pn+=tn>>>16,En+=pn>>>16,cn+=En>>>16,Ke[7]=Un=En&65535|cn<<16,mt[7]=Xr=tn&65535|pn<<16,ni+=128,Ne-=128}return Ne}function ke(Ke,mt,ft){var Ne=new Int32Array(8),_t=new Int32Array(8),Xt=new Uint8Array(256),sn,Tn=ft;for(Ne[0]=1779033703,Ne[1]=3144134277,Ne[2]=1013904242,Ne[3]=2773480762,Ne[4]=1359893119,Ne[5]=2600822924,Ne[6]=528734635,Ne[7]=1541459225,_t[0]=4089235720,_t[1]=2227873595,_t[2]=4271175723,_t[3]=1595750129,_t[4]=2917565137,_t[5]=725511199,_t[6]=4215389547,_t[7]=327033209,Oe(Ne,_t,mt,ft),ft%=128,sn=0;sn=0;--_t)Ne=ft[_t/8|0]>>(_t&7)&1,Ge(Ke,mt,Ne),$e(mt,Ke),$e(Ke,Ke),Ge(Ke,mt,Ne)}function ut(Ke,mt){var ft=[U(),U(),U(),U()];Ze(ft[0],se),Ze(ft[1],re),Ze(ft[2],J),Jt(ft[3],se,re),dt(Ke,ft,mt)}function it(Ke,mt,ft){var Ne=new Uint8Array(64),_t=[U(),U(),U(),U()],Xt;for(ft||q(mt,32),ke(Ne,mt,32),Ne[0]&=248,Ne[31]&=127,Ne[31]|=64,ut(_t,Ne),rt(Ke,_t),Xt=0;Xt<32;Xt++)mt[Xt+32]=Ke[Xt];return 0}var ot=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function Ot(Ke,mt){var ft,Ne,_t,Xt;for(Ne=63;Ne>=32;--Ne){for(ft=0,_t=Ne-32,Xt=Ne-12;_t>8,mt[_t]-=ft*256;mt[_t]+=ft,mt[Ne]=0}for(ft=0,_t=0;_t<32;_t++)mt[_t]+=ft-(mt[31]>>4)*ot[_t],ft=mt[_t]>>8,mt[_t]&=255;for(_t=0;_t<32;_t++)mt[_t]-=ft*ot[_t];for(Ne=0;Ne<32;Ne++)mt[Ne+1]+=mt[Ne]>>8,Ke[Ne]=mt[Ne]&255}function dn(Ke){var mt=new Float64Array(64),ft;for(ft=0;ft<64;ft++)mt[ft]=Ke[ft];for(ft=0;ft<64;ft++)Ke[ft]=0;Ot(Ke,mt)}function Fn(Ke,mt,ft,Ne){var _t=new Uint8Array(64),Xt=new Uint8Array(64),sn=new Uint8Array(64),Tn,Nn,Qn=new Float64Array(64),Xn=[U(),U(),U(),U()];ke(_t,Ne,32),_t[0]&=248,_t[31]&=127,_t[31]|=64;var Rr=ft+64;for(Tn=0;Tn>7&&Wt(Ke[0],G,Ke[0]),Jt(Ke[3],Ke[0],Ke[1]),0)}function yn(Ke,mt,ft,Ne){var _t,Xt,sn=new Uint8Array(32),Tn=new Uint8Array(64),Nn=[U(),U(),U(),U()],Qn=[U(),U(),U(),U()];if(Xt=-1,ft<64||en(Qn,Ne))return-1;for(_t=0;_t=0},j.sign.keyPair=function(){var Ke=new Uint8Array(Sn),mt=new Uint8Array(cr);return it(Ke,mt),{publicKey:Ke,secretKey:mt}},j.sign.keyPair.fromSecretKey=function(Ke){if(Dr(Ke),Ke.length!==cr)throw new Error("bad secret key size");for(var mt=new Uint8Array(Sn),ft=0;ft"u"?typeof j.from<"u"?(U.encodeBase64=function(Y){return j.from(Y).toString("base64")},U.decodeBase64=function(Y){return q(Y),new Uint8Array(Array.prototype.slice.call(j.from(Y,"base64"),0))}):(U.encodeBase64=function(Y){return new j(Y).toString("base64")},U.decodeBase64=function(Y){return q(Y),new Uint8Array(Array.prototype.slice.call(new j(Y,"base64"),0))}):(U.encodeBase64=function(Y){var K,G=[],J=Y.length;for(K=0;K=K())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+K().toString(16)+" bytes");return Oe|0}function _e(Oe){return+Oe!=Oe&&(Oe=0),J.alloc(+Oe)}J.isBuffer=function(ke){return!!(ke!=null&&ke._isBuffer)},J.compare=function(ke,$e){if(!J.isBuffer(ke)||!J.isBuffer($e))throw new TypeError("Arguments must be Buffers");if(ke===$e)return 0;for(var Ge=ke.length,rt=$e.length,dt=0,ut=Math.min(Ge,rt);dt>>1;case"base64":return We(Oe).length;default:if(Ge)return An(Oe).length;ke=(""+ke).toLowerCase(),Ge=!0}}J.byteLength=fe;function ge(Oe,ke,$e){var Ge=!1;if((ke===void 0||ke<0)&&(ke=0),ke>this.length||(($e===void 0||$e>this.length)&&($e=this.length),$e<=0)||($e>>>=0,ke>>>=0,$e<=ke))return"";for(Oe||(Oe="utf8");;)switch(Oe){case"hex":return Ve(this,ke,$e);case"utf8":case"utf-8":return Le(this,ke,$e);case"ascii":return ct(this,ke,$e);case"latin1":case"binary":return qe(this,ke,$e);case"base64":return Re(this,ke,$e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Rt(this,ke,$e);default:if(Ge)throw new TypeError("Unknown encoding: "+Oe);Oe=(Oe+"").toLowerCase(),Ge=!0}}J.prototype._isBuffer=!0;function ye(Oe,ke,$e){var Ge=Oe[ke];Oe[ke]=Oe[$e],Oe[$e]=Ge}J.prototype.swap16=function(){var ke=this.length;if(ke%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var $e=0;$e0&&(ke=this.toString("hex",0,$e).match(/.{2}/g).join(" "),this.length>$e&&(ke+=" ... ")),""},J.prototype.compare=function(ke,$e,Ge,rt,dt){if(!J.isBuffer(ke))throw new TypeError("Argument must be a Buffer");if($e===void 0&&($e=0),Ge===void 0&&(Ge=ke?ke.length:0),rt===void 0&&(rt=0),dt===void 0&&(dt=this.length),$e<0||Ge>ke.length||rt<0||dt>this.length)throw new RangeError("out of range index");if(rt>=dt&&$e>=Ge)return 0;if(rt>=dt)return-1;if($e>=Ge)return 1;if($e>>>=0,Ge>>>=0,rt>>>=0,dt>>>=0,this===ke)return 0;for(var ut=dt-rt,it=Ge-$e,ot=Math.min(ut,it),Ot=this.slice(rt,dt),dn=ke.slice($e,Ge),Fn=0;Fn2147483647?$e=2147483647:$e<-2147483648&&($e=-2147483648),$e=+$e,isNaN($e)&&($e=rt?0:Oe.length-1),$e<0&&($e=Oe.length+$e),$e>=Oe.length){if(rt)return-1;$e=Oe.length-1}else if($e<0)if(rt)$e=0;else return-1;if(typeof ke=="string"&&(ke=J.from(ke,Ge)),J.isBuffer(ke))return ke.length===0?-1:oe(Oe,ke,$e,Ge,rt);if(typeof ke=="number")return ke=ke&255,J.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?rt?Uint8Array.prototype.indexOf.call(Oe,ke,$e):Uint8Array.prototype.lastIndexOf.call(Oe,ke,$e):oe(Oe,[ke],$e,Ge,rt);throw new TypeError("val must be string, number or Buffer")}function oe(Oe,ke,$e,Ge,rt){var dt=1,ut=Oe.length,it=ke.length;if(Ge!==void 0&&(Ge=String(Ge).toLowerCase(),Ge==="ucs2"||Ge==="ucs-2"||Ge==="utf16le"||Ge==="utf-16le")){if(Oe.length<2||ke.length<2)return-1;dt=2,ut/=2,it/=2,$e/=2}function ot(yn,lt){return dt===1?yn[lt]:yn.readUInt16BE(lt*dt)}var Ot;if(rt){var dn=-1;for(Ot=$e;Otut&&($e=ut-it),Ot=$e;Ot>=0;Ot--){for(var Fn=!0,en=0;enrt&&(Ge=rt)):Ge=rt;var dt=ke.length;if(dt%2!==0)throw new TypeError("Invalid hex string");Ge>dt/2&&(Ge=dt/2);for(var ut=0;utdt)&&(Ge=dt),ke.length>0&&(Ge<0||$e<0)||$e>this.length)throw new RangeError("Attempt to write outside buffer bounds");rt||(rt="utf8");for(var ut=!1;;)switch(rt){case"hex":return be(this,ke,$e,Ge);case"utf8":case"utf-8":return ve(this,ke,$e,Ge);case"ascii":return we(this,ke,$e,Ge);case"latin1":case"binary":return Ae(this,ke,$e,Ge);case"base64":return Se(this,ke,$e,Ge);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Pe(this,ke,$e,Ge);default:if(ut)throw new TypeError("Unknown encoding: "+rt);rt=(""+rt).toLowerCase(),ut=!0}},J.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Re(Oe,ke,$e){return ke===0&&$e===Oe.length?j.fromByteArray(Oe):j.fromByteArray(Oe.slice(ke,$e))}function Le(Oe,ke,$e){$e=Math.min(Oe.length,$e);for(var Ge=[],rt=ke;rt<$e;){var dt=Oe[rt],ut=null,it=dt>239?4:dt>223?3:dt>191?2:1;if(rt+it<=$e){var ot,Ot,dn,Fn;switch(it){case 1:dt<128&&(ut=dt);break;case 2:ot=Oe[rt+1],(ot&192)===128&&(Fn=(dt&31)<<6|ot&63,Fn>127&&(ut=Fn));break;case 3:ot=Oe[rt+1],Ot=Oe[rt+2],(ot&192)===128&&(Ot&192)===128&&(Fn=(dt&15)<<12|(ot&63)<<6|Ot&63,Fn>2047&&(Fn<55296||Fn>57343)&&(ut=Fn));break;case 4:ot=Oe[rt+1],Ot=Oe[rt+2],dn=Oe[rt+3],(ot&192)===128&&(Ot&192)===128&&(dn&192)===128&&(Fn=(dt&15)<<18|(ot&63)<<12|(Ot&63)<<6|dn&63,Fn>65535&&Fn<1114112&&(ut=Fn))}}ut===null?(ut=65533,it=1):ut>65535&&(ut-=65536,Ge.push(ut>>>10&1023|55296),ut=56320|ut&1023),Ge.push(ut),rt+=it}return Ze(Ge)}var Fe=4096;function Ze(Oe){var ke=Oe.length;if(ke<=Fe)return String.fromCharCode.apply(String,Oe);for(var $e="",Ge=0;GeGe)&&($e=Ge);for(var rt="",dt=ke;dt<$e;++dt)rt+=Bn(Oe[dt]);return rt}function Rt(Oe,ke,$e){for(var Ge=Oe.slice(ke,$e),rt="",dt=0;dtGe&&(ke=Ge),$e<0?($e+=Ge,$e<0&&($e=0)):$e>Ge&&($e=Ge),$e$e)throw new RangeError("Trying to access beyond buffer length")}J.prototype.readUIntLE=function(ke,$e,Ge){ke=ke|0,$e=$e|0,Ge||Nt(ke,$e,this.length);for(var rt=this[ke],dt=1,ut=0;++ut<$e&&(dt*=256);)rt+=this[ke+ut]*dt;return rt},J.prototype.readUIntBE=function(ke,$e,Ge){ke=ke|0,$e=$e|0,Ge||Nt(ke,$e,this.length);for(var rt=this[ke+--$e],dt=1;$e>0&&(dt*=256);)rt+=this[ke+--$e]*dt;return rt},J.prototype.readUInt8=function(ke,$e){return $e||Nt(ke,1,this.length),this[ke]},J.prototype.readUInt16LE=function(ke,$e){return $e||Nt(ke,2,this.length),this[ke]|this[ke+1]<<8},J.prototype.readUInt16BE=function(ke,$e){return $e||Nt(ke,2,this.length),this[ke]<<8|this[ke+1]},J.prototype.readUInt32LE=function(ke,$e){return $e||Nt(ke,4,this.length),(this[ke]|this[ke+1]<<8|this[ke+2]<<16)+this[ke+3]*16777216},J.prototype.readUInt32BE=function(ke,$e){return $e||Nt(ke,4,this.length),this[ke]*16777216+(this[ke+1]<<16|this[ke+2]<<8|this[ke+3])},J.prototype.readIntLE=function(ke,$e,Ge){ke=ke|0,$e=$e|0,Ge||Nt(ke,$e,this.length);for(var rt=this[ke],dt=1,ut=0;++ut<$e&&(dt*=256);)rt+=this[ke+ut]*dt;return dt*=128,rt>=dt&&(rt-=Math.pow(2,8*$e)),rt},J.prototype.readIntBE=function(ke,$e,Ge){ke=ke|0,$e=$e|0,Ge||Nt(ke,$e,this.length);for(var rt=$e,dt=1,ut=this[ke+--rt];rt>0&&(dt*=256);)ut+=this[ke+--rt]*dt;return dt*=128,ut>=dt&&(ut-=Math.pow(2,8*$e)),ut},J.prototype.readInt8=function(ke,$e){return $e||Nt(ke,1,this.length),this[ke]&128?(255-this[ke]+1)*-1:this[ke]},J.prototype.readInt16LE=function(ke,$e){$e||Nt(ke,2,this.length);var Ge=this[ke]|this[ke+1]<<8;return Ge&32768?Ge|4294901760:Ge},J.prototype.readInt16BE=function(ke,$e){$e||Nt(ke,2,this.length);var Ge=this[ke+1]|this[ke]<<8;return Ge&32768?Ge|4294901760:Ge},J.prototype.readInt32LE=function(ke,$e){return $e||Nt(ke,4,this.length),this[ke]|this[ke+1]<<8|this[ke+2]<<16|this[ke+3]<<24},J.prototype.readInt32BE=function(ke,$e){return $e||Nt(ke,4,this.length),this[ke]<<24|this[ke+1]<<16|this[ke+2]<<8|this[ke+3]},J.prototype.readFloatLE=function(ke,$e){return $e||Nt(ke,4,this.length),U.read(this,ke,!0,23,4)},J.prototype.readFloatBE=function(ke,$e){return $e||Nt(ke,4,this.length),U.read(this,ke,!1,23,4)},J.prototype.readDoubleLE=function(ke,$e){return $e||Nt(ke,8,this.length),U.read(this,ke,!0,52,8)},J.prototype.readDoubleBE=function(ke,$e){return $e||Nt(ke,8,this.length),U.read(this,ke,!1,52,8)};function Lt(Oe,ke,$e,Ge,rt,dt){if(!J.isBuffer(Oe))throw new TypeError('"buffer" argument must be a Buffer instance');if(ke>rt||keOe.length)throw new RangeError("Index out of range")}J.prototype.writeUIntLE=function(ke,$e,Ge,rt){if(ke=+ke,$e=$e|0,Ge=Ge|0,!rt){var dt=Math.pow(2,8*Ge)-1;Lt(this,ke,$e,Ge,dt,0)}var ut=1,it=0;for(this[$e]=ke&255;++it=0&&(it*=256);)this[$e+ut]=ke/it&255;return $e+Ge},J.prototype.writeUInt8=function(ke,$e,Ge){return ke=+ke,$e=$e|0,Ge||Lt(this,ke,$e,1,255,0),J.TYPED_ARRAY_SUPPORT||(ke=Math.floor(ke)),this[$e]=ke&255,$e+1};function Ht(Oe,ke,$e,Ge){ke<0&&(ke=65535+ke+1);for(var rt=0,dt=Math.min(Oe.length-$e,2);rt>>(Ge?rt:1-rt)*8}J.prototype.writeUInt16LE=function(ke,$e,Ge){return ke=+ke,$e=$e|0,Ge||Lt(this,ke,$e,2,65535,0),J.TYPED_ARRAY_SUPPORT?(this[$e]=ke&255,this[$e+1]=ke>>>8):Ht(this,ke,$e,!0),$e+2},J.prototype.writeUInt16BE=function(ke,$e,Ge){return ke=+ke,$e=$e|0,Ge||Lt(this,ke,$e,2,65535,0),J.TYPED_ARRAY_SUPPORT?(this[$e]=ke>>>8,this[$e+1]=ke&255):Ht(this,ke,$e,!1),$e+2};function Wt(Oe,ke,$e,Ge){ke<0&&(ke=4294967295+ke+1);for(var rt=0,dt=Math.min(Oe.length-$e,4);rt>>(Ge?rt:3-rt)*8&255}J.prototype.writeUInt32LE=function(ke,$e,Ge){return ke=+ke,$e=$e|0,Ge||Lt(this,ke,$e,4,4294967295,0),J.TYPED_ARRAY_SUPPORT?(this[$e+3]=ke>>>24,this[$e+2]=ke>>>16,this[$e+1]=ke>>>8,this[$e]=ke&255):Wt(this,ke,$e,!0),$e+4},J.prototype.writeUInt32BE=function(ke,$e,Ge){return ke=+ke,$e=$e|0,Ge||Lt(this,ke,$e,4,4294967295,0),J.TYPED_ARRAY_SUPPORT?(this[$e]=ke>>>24,this[$e+1]=ke>>>16,this[$e+2]=ke>>>8,this[$e+3]=ke&255):Wt(this,ke,$e,!1),$e+4},J.prototype.writeIntLE=function(ke,$e,Ge,rt){if(ke=+ke,$e=$e|0,!rt){var dt=Math.pow(2,8*Ge-1);Lt(this,ke,$e,Ge,dt-1,-dt)}var ut=0,it=1,ot=0;for(this[$e]=ke&255;++ut>0)-ot&255;return $e+Ge},J.prototype.writeIntBE=function(ke,$e,Ge,rt){if(ke=+ke,$e=$e|0,!rt){var dt=Math.pow(2,8*Ge-1);Lt(this,ke,$e,Ge,dt-1,-dt)}var ut=Ge-1,it=1,ot=0;for(this[$e+ut]=ke&255;--ut>=0&&(it*=256);)ke<0&&ot===0&&this[$e+ut+1]!==0&&(ot=1),this[$e+ut]=(ke/it>>0)-ot&255;return $e+Ge},J.prototype.writeInt8=function(ke,$e,Ge){return ke=+ke,$e=$e|0,Ge||Lt(this,ke,$e,1,127,-128),J.TYPED_ARRAY_SUPPORT||(ke=Math.floor(ke)),ke<0&&(ke=255+ke+1),this[$e]=ke&255,$e+1},J.prototype.writeInt16LE=function(ke,$e,Ge){return ke=+ke,$e=$e|0,Ge||Lt(this,ke,$e,2,32767,-32768),J.TYPED_ARRAY_SUPPORT?(this[$e]=ke&255,this[$e+1]=ke>>>8):Ht(this,ke,$e,!0),$e+2},J.prototype.writeInt16BE=function(ke,$e,Ge){return ke=+ke,$e=$e|0,Ge||Lt(this,ke,$e,2,32767,-32768),J.TYPED_ARRAY_SUPPORT?(this[$e]=ke>>>8,this[$e+1]=ke&255):Ht(this,ke,$e,!1),$e+2},J.prototype.writeInt32LE=function(ke,$e,Ge){return ke=+ke,$e=$e|0,Ge||Lt(this,ke,$e,4,2147483647,-2147483648),J.TYPED_ARRAY_SUPPORT?(this[$e]=ke&255,this[$e+1]=ke>>>8,this[$e+2]=ke>>>16,this[$e+3]=ke>>>24):Wt(this,ke,$e,!0),$e+4},J.prototype.writeInt32BE=function(ke,$e,Ge){return ke=+ke,$e=$e|0,Ge||Lt(this,ke,$e,4,2147483647,-2147483648),ke<0&&(ke=4294967295+ke+1),J.TYPED_ARRAY_SUPPORT?(this[$e]=ke>>>24,this[$e+1]=ke>>>16,this[$e+2]=ke>>>8,this[$e+3]=ke&255):Wt(this,ke,$e,!1),$e+4};function Jt(Oe,ke,$e,Ge,rt,dt){if($e+Ge>Oe.length)throw new RangeError("Index out of range");if($e<0)throw new RangeError("Index out of range")}function Zt(Oe,ke,$e,Ge,rt){return rt||Jt(Oe,ke,$e,4),U.write(Oe,ke,$e,Ge,23,4),$e+4}J.prototype.writeFloatLE=function(ke,$e,Ge){return Zt(this,ke,$e,!0,Ge)},J.prototype.writeFloatBE=function(ke,$e,Ge){return Zt(this,ke,$e,!1,Ge)};function bn(Oe,ke,$e,Ge,rt){return rt||Jt(Oe,ke,$e,8),U.write(Oe,ke,$e,Ge,52,8),$e+8}J.prototype.writeDoubleLE=function(ke,$e,Ge){return bn(this,ke,$e,!0,Ge)},J.prototype.writeDoubleBE=function(ke,$e,Ge){return bn(this,ke,$e,!1,Ge)},J.prototype.copy=function(ke,$e,Ge,rt){if(Ge||(Ge=0),!rt&&rt!==0&&(rt=this.length),$e>=ke.length&&($e=ke.length),$e||($e=0),rt>0&&rt=this.length)throw new RangeError("sourceStart out of bounds");if(rt<0)throw new RangeError("sourceEnd out of bounds");rt>this.length&&(rt=this.length),ke.length-$e=0;--ut)ke[ut+$e]=this[ut+Ge];else if(dt<1e3||!J.TYPED_ARRAY_SUPPORT)for(ut=0;ut>>0,Ge=Ge===void 0?this.length:Ge>>>0,ke||(ke=0);var ut;if(typeof ke=="number")for(ut=$e;ut55295&&$e<57344){if(!rt){if($e>56319){(ke-=3)>-1&&dt.push(239,191,189);continue}else if(ut+1===Ge){(ke-=3)>-1&&dt.push(239,191,189);continue}rt=$e;continue}if($e<56320){(ke-=3)>-1&&dt.push(239,191,189),rt=$e;continue}$e=(rt-55296<<10|$e-56320)+65536}else rt&&(ke-=3)>-1&&dt.push(239,191,189);if(rt=null,$e<128){if((ke-=1)<0)break;dt.push($e)}else if($e<2048){if((ke-=2)<0)break;dt.push($e>>6|192,$e&63|128)}else if($e<65536){if((ke-=3)<0)break;dt.push($e>>12|224,$e>>6&63|128,$e&63|128)}else if($e<1114112){if((ke-=4)<0)break;dt.push($e>>18|240,$e>>12&63|128,$e>>6&63|128,$e&63|128)}else throw new Error("Invalid code point")}return dt}function Dn(Oe){for(var ke=[],$e=0;$e>8,rt=$e%256,dt.push(rt),dt.push(Ge);return dt}function We(Oe){return j.toByteArray(Hn(Oe))}function xt(Oe,ke,$e,Ge){for(var rt=0;rt=ke.length||rt>=Oe.length);++rt)ke[rt+$e]=Oe[rt];return rt}function Ue(Oe){return Oe!==Oe}},function(I,N){N.byteLength=J,N.toByteArray=ee,N.fromByteArray=re;for(var B=[],j=[],U=typeof Uint8Array<"u"?Uint8Array:Array,q="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Y=0,K=q.length;Y0)throw new Error("Invalid string. Length must be a multiple of 4");var me=ne.indexOf("=");me===-1&&(me=le);var ue=me===le?0:4-me%4;return[me,ue]}function J(ne){var le=G(ne),me=le[0],ue=le[1];return(me+ue)*3/4-ue}function Z(ne,le,me){return(le+me)*3/4-me}function ee(ne){for(var le,me=G(ne),ue=me[0],_e=me[1],fe=new U(Z(ne,ue,_e)),ge=0,ye=_e>0?ue-4:ue,xe=0;xe>16&255,fe[ge++]=le>>8&255,fe[ge++]=le&255;return _e===2&&(le=j[ne.charCodeAt(xe)]<<2|j[ne.charCodeAt(xe+1)]>>4,fe[ge++]=le&255),_e===1&&(le=j[ne.charCodeAt(xe)]<<10|j[ne.charCodeAt(xe+1)]<<4|j[ne.charCodeAt(xe+2)]>>2,fe[ge++]=le>>8&255,fe[ge++]=le&255),fe}function te(ne){return B[ne>>18&63]+B[ne>>12&63]+B[ne>>6&63]+B[ne&63]}function se(ne,le,me){for(var ue,_e=[],fe=le;feye?ye:ge+fe));return ue===1?(le=ne[me-1],_e.push(B[le>>2]+B[le<<4&63]+"==")):ue===2&&(le=(ne[me-2]<<8)+ne[me-1],_e.push(B[le>>10]+B[le>>4&63]+B[le<<2&63]+"=")),_e.join("")}},function(I,N){N.read=function(B,j,U,q,Y){var K,G,J=Y*8-q-1,Z=(1<>1,te=-7,se=U?Y-1:0,re=U?-1:1,ne=B[j+se];for(se+=re,K=ne&(1<<-te)-1,ne>>=-te,te+=J;te>0;K=K*256+B[j+se],se+=re,te-=8);for(G=K&(1<<-te)-1,K>>=-te,te+=q;te>0;G=G*256+B[j+se],se+=re,te-=8);if(K===0)K=1-ee;else{if(K===Z)return G?NaN:(ne?-1:1)*(1/0);G=G+Math.pow(2,q),K=K-ee}return(ne?-1:1)*G*Math.pow(2,K-q)},N.write=function(B,j,U,q,Y,K){var G,J,Z,ee=K*8-Y-1,te=(1<>1,re=Y===23?Math.pow(2,-24)-Math.pow(2,-77):0,ne=q?0:K-1,le=q?1:-1,me=j<0||j===0&&1/j<0?1:0;for(j=Math.abs(j),isNaN(j)||j===1/0?(J=isNaN(j)?1:0,G=te):(G=Math.floor(Math.log(j)/Math.LN2),j*(Z=Math.pow(2,-G))<1&&(G--,Z*=2),G+se>=1?j+=re/Z:j+=re*Math.pow(2,1-se),j*Z>=2&&(G++,Z/=2),G+se>=te?(J=0,G=te):G+se>=1?(J=(j*Z-1)*Math.pow(2,Y),G=G+se):(J=j*Math.pow(2,se-1)*Math.pow(2,Y),G=0));Y>=8;B[U+ne]=J&255,ne+=le,J/=256,Y-=8);for(G=G<0;B[U+ne]=G&255,ne+=le,G/=256,ee-=8);B[U+ne-le]|=me*128}},function(I,N){var B={}.toString;I.exports=Array.isArray||function(j){return B.call(j)=="[object Array]"}},function(I,N,B){var j=this&&this.__extends||function(Z,ee){for(var te in ee)ee.hasOwnProperty(te)&&(Z[te]=ee[te]);function se(){this.constructor=Z}Z.prototype=ee===null?Object.create(ee):(se.prototype=ee.prototype,new se)},U=B(24),q=B(12),Y=B(8),K=B(9),G=B(2),J=function(Z){j(ee,Z);function ee(te,se){var re=this;Z.call(this),this.key=te,this.options=se||{},this.state="initialized",this.connection=null,this.usingTLS=!!se.useTLS,this.timeline=this.options.timeline,this.errorCallbacks=this.buildErrorCallbacks(),this.connectionCallbacks=this.buildConnectionCallbacks(this.errorCallbacks),this.handshakeCallbacks=this.buildHandshakeCallbacks(this.errorCallbacks);var ne=G.default.getNetwork();ne.bind("online",function(){re.timeline.info({netinfo:"online"}),(re.state==="connecting"||re.state==="unavailable")&&re.retryIn(0)}),ne.bind("offline",function(){re.timeline.info({netinfo:"offline"}),re.connection&&re.sendActivityCheck()}),this.updateStrategy()}return ee.prototype.connect=function(){if(!(this.connection||this.runner)){if(!this.strategy.isSupported()){this.updateState("failed");return}this.updateState("connecting"),this.startConnecting(),this.setUnavailableTimer()}},ee.prototype.send=function(te){return this.connection?this.connection.send(te):!1},ee.prototype.send_event=function(te,se,re){return this.connection?this.connection.send_event(te,se,re):!1},ee.prototype.disconnect=function(){this.disconnectInternally(),this.updateState("disconnected")},ee.prototype.isUsingTLS=function(){return this.usingTLS},ee.prototype.startConnecting=function(){var te=this,se=function(re,ne){re?te.runner=te.strategy.connect(0,se):ne.action==="error"?(te.emit("error",{type:"HandshakeError",error:ne.error}),te.timeline.error({handshakeError:ne.error})):(te.abortConnecting(),te.handshakeCallbacks[ne.action](ne))};this.runner=this.strategy.connect(0,se)},ee.prototype.abortConnecting=function(){this.runner&&(this.runner.abort(),this.runner=null)},ee.prototype.disconnectInternally=function(){if(this.abortConnecting(),this.clearRetryTimer(),this.clearUnavailableTimer(),this.connection){var te=this.abandonConnection();te.close()}},ee.prototype.updateStrategy=function(){this.strategy=this.options.getStrategy({key:this.key,timeline:this.timeline,useTLS:this.usingTLS})},ee.prototype.retryIn=function(te){var se=this;this.timeline.info({action:"retry",delay:te}),te>0&&this.emit("connecting_in",Math.round(te/1e3)),this.retryTimer=new q.OneOffTimer(te||0,function(){se.disconnectInternally(),se.connect()})},ee.prototype.clearRetryTimer=function(){this.retryTimer&&(this.retryTimer.ensureAborted(),this.retryTimer=null)},ee.prototype.setUnavailableTimer=function(){var te=this;this.unavailableTimer=new q.OneOffTimer(this.options.unavailableTimeout,function(){te.updateState("unavailable")})},ee.prototype.clearUnavailableTimer=function(){this.unavailableTimer&&this.unavailableTimer.ensureAborted()},ee.prototype.sendActivityCheck=function(){var te=this;this.stopActivityCheck(),this.connection.ping(),this.activityTimer=new q.OneOffTimer(this.options.pongTimeout,function(){te.timeline.error({pong_timed_out:te.options.pongTimeout}),te.retryIn(0)})},ee.prototype.resetActivityCheck=function(){var te=this;this.stopActivityCheck(),this.connection&&!this.connection.handlesActivityChecks()&&(this.activityTimer=new q.OneOffTimer(this.activityTimeout,function(){te.sendActivityCheck()}))},ee.prototype.stopActivityCheck=function(){this.activityTimer&&this.activityTimer.ensureAborted()},ee.prototype.buildConnectionCallbacks=function(te){var se=this;return K.extend({},te,{message:function(re){se.resetActivityCheck(),se.emit("message",re)},ping:function(){se.send_event("pusher:pong",{})},activity:function(){se.resetActivityCheck()},error:function(re){se.emit("error",{type:"WebSocketError",error:re})},closed:function(){se.abandonConnection(),se.shouldRetry()&&se.retryIn(1e3)}})},ee.prototype.buildHandshakeCallbacks=function(te){var se=this;return K.extend({},te,{connected:function(re){se.activityTimeout=Math.min(se.options.activityTimeout,re.activityTimeout,re.connection.activityTimeout||1/0),se.clearUnavailableTimer(),se.setConnection(re.connection),se.socket_id=se.connection.id,se.updateState("connected",{socket_id:se.socket_id})}})},ee.prototype.buildErrorCallbacks=function(){var te=this,se=function(re){return function(ne){ne.error&&te.emit("error",{type:"WebSocketError",error:ne.error}),re(ne)}};return{tls_only:se(function(){te.usingTLS=!0,te.updateStrategy(),te.retryIn(0)}),refused:se(function(){te.disconnect()}),backoff:se(function(){te.retryIn(1e3)}),retry:se(function(){te.retryIn(0)})}},ee.prototype.setConnection=function(te){this.connection=te;for(var se in this.connectionCallbacks)this.connection.bind(se,this.connectionCallbacks[se]);this.resetActivityCheck()},ee.prototype.abandonConnection=function(){if(this.connection){this.stopActivityCheck();for(var te in this.connectionCallbacks)this.connection.unbind(te,this.connectionCallbacks[te]);var se=this.connection;return this.connection=null,se}},ee.prototype.updateState=function(te,se){var re=this.state;if(this.state=te,re!==te){var ne=te;ne==="connected"&&(ne+=" with new socket ID "+se.socket_id),Y.default.debug("State changed",re+" -> "+ne),this.timeline.info({state:te,params:se}),this.emit("state_change",{previous:re,current:te}),this.emit(te,se)}},ee.prototype.shouldRetry=function(){return this.state==="connecting"||this.state==="connected"},ee}(U.default);N.__esModule=!0,N.default=J},function(I,N,B){var j=B(9),U=B(43),q=B(31),Y=function(){function G(){this.channels={}}return G.prototype.add=function(J,Z){return this.channels[J]||(this.channels[J]=K(J,Z)),this.channels[J]},G.prototype.all=function(){return j.values(this.channels)},G.prototype.find=function(J){return this.channels[J]},G.prototype.remove=function(J){var Z=this.channels[J];return delete this.channels[J],Z},G.prototype.disconnect=function(){j.objectApply(this.channels,function(J){J.disconnect()})},G}();N.__esModule=!0,N.default=Y;function K(G,J){if(G.indexOf("private-encrypted-")===0){if(navigator.product=="ReactNative"){var Z="Encrypted channels are not yet supported when using React Native builds.";throw new q.UnsupportedFeature(Z)}return U.default.createEncryptedChannel(G,J)}else return G.indexOf("private-")===0?U.default.createPrivateChannel(G,J):G.indexOf("presence-")===0?U.default.createPresenceChannel(G,J):U.default.createChannel(G,J)}},function(I,N,B){var j=B(43),U=B(11),q=B(31),Y=B(9),K=function(){function J(Z,ee,te,se){this.name=Z,this.priority=ee,this.transport=te,this.options=se||{}}return J.prototype.isSupported=function(){return this.transport.isSupported({useTLS:this.options.useTLS})},J.prototype.connect=function(Z,ee){var te=this;if(this.isSupported()){if(this.priority0&&(te=new q.OneOffTimer(Z.timeout,function(){se.abort(),ee(!0)})),se=G.connect(J,function(re,ne){re&&te&&te.isRunning()&&!Z.failFast||(te&&te.ensureAborted(),ee(re,ne))}),{abort:function(){te&&te.ensureAborted(),se.abort()},forceMinPriority:function(re){se.forceMinPriority(re)}}},K}();N.__esModule=!0,N.default=Y},function(I,N,B){var j=B(9),U=B(11),q=function(){function J(Z){this.strategies=Z}return J.prototype.isSupported=function(){return j.any(this.strategies,U.default.method("isSupported"))},J.prototype.connect=function(Z,ee){return Y(this.strategies,Z,function(te,se){return function(re,ne){if(se[te].error=re,re){K(se)&&ee(!0);return}j.apply(se,function(le){le.forceMinPriority(ne.transport.priority)}),ee(null,ne)}})},J}();N.__esModule=!0,N.default=q;function Y(J,Z,ee){var te=j.map(J,function(se,re,ne,le){return se.connect(Z,ee(re,le))});return{abort:function(){j.apply(te,G)},forceMinPriority:function(se){j.apply(te,function(re){re.forceMinPriority(se)})}}}function K(J){return j.all(J,function(Z){return!!Z.error})}function G(J){!J.error&&!J.aborted&&(J.abort(),J.aborted=!0)}},function(I,N,B){var j=B(11),U=B(2),q=B(65),Y=B(9),K=function(){function te(se,re,ne){this.strategy=se,this.transports=re,this.ttl=ne.ttl||1800*1e3,this.usingTLS=ne.useTLS,this.timeline=ne.timeline}return te.prototype.isSupported=function(){return this.strategy.isSupported()},te.prototype.connect=function(se,re){var ne=this.usingTLS,le=J(ne),me=[this.strategy];if(le&&le.timestamp+this.ttl>=j.default.now()){var ue=this.transports[le.transport];ue&&(this.timeline.info({cached:!0,transport:le.transport,latency:le.latency}),me.push(new q.default([ue],{timeout:le.latency*2+1e3,failFast:!0})))}var _e=j.default.now(),fe=me.pop().connect(se,function ge(ye,xe){ye?(ee(ne),me.length>0?(_e=j.default.now(),fe=me.pop().connect(se,ge)):re(ye)):(Z(ne,xe.transport.name,j.default.now()-_e),re(null,xe))});return{abort:function(){fe.abort()},forceMinPriority:function(ge){se=ge,fe&&fe.forceMinPriority(ge)}}},te}();N.__esModule=!0,N.default=K;function G(te){return"pusherTransport"+(te?"TLS":"NonTLS")}function J(te){var se=U.default.getLocalStorage();if(se)try{var re=se[G(te)];if(re)return JSON.parse(re)}catch{ee(te)}return null}function Z(te,se,re){var ne=U.default.getLocalStorage();if(ne)try{ne[G(te)]=Y.safeJSONStringify({timestamp:j.default.now(),transport:se,latency:re})}catch{}}function ee(te){var se=U.default.getLocalStorage();if(se)try{delete se[G(te)]}catch{}}},function(I,N,B){var j=B(12),U=function(){function q(Y,K){var G=K.delay;this.strategy=Y,this.options={delay:G}}return q.prototype.isSupported=function(){return this.strategy.isSupported()},q.prototype.connect=function(Y,K){var G=this.strategy,J,Z=new j.OneOffTimer(this.options.delay,function(){J=G.connect(Y,K)});return{abort:function(){Z.ensureAborted(),J&&J.abort()},forceMinPriority:function(ee){Y=ee,J&&J.forceMinPriority(ee)}}},q}();N.__esModule=!0,N.default=U},function(I,N){var B=function(){function j(U,q,Y){this.test=U,this.trueBranch=q,this.falseBranch=Y}return j.prototype.isSupported=function(){var U=this.test()?this.trueBranch:this.falseBranch;return U.isSupported()},j.prototype.connect=function(U,q){var Y=this.test()?this.trueBranch:this.falseBranch;return Y.connect(U,q)},j}();N.__esModule=!0,N.default=B},function(I,N){var B=function(){function j(U){this.strategy=U}return j.prototype.isSupported=function(){return this.strategy.isSupported()},j.prototype.connect=function(U,q){var Y=this.strategy.connect(U,function(K,G){G&&Y.abort(),q(K,G)});return Y},j}();N.__esModule=!0,N.default=B},function(I,N,B){var j=B(5);N.getGlobalConfig=function(){return{wsHost:j.default.host,wsPort:j.default.ws_port,wssPort:j.default.wss_port,wsPath:j.default.ws_path,httpHost:j.default.sockjs_host,httpPort:j.default.sockjs_http_port,httpsPort:j.default.sockjs_https_port,httpPath:j.default.sockjs_path,statsHost:j.default.stats_host,authEndpoint:j.default.channel_auth_endpoint,authTransport:j.default.channel_auth_transport,activity_timeout:j.default.activity_timeout,pong_timeout:j.default.pong_timeout,unavailable_timeout:j.default.unavailable_timeout}},N.getClusterConfig=function(U){return{wsHost:"ws-"+U+".pusher.com",httpHost:"sockjs-"+U+".pusher.com"}}}])})})(pusher);var pusherExports=pusher.exports;const Pusher$1=getDefaultExportFromCjs$1(pusherExports);window.Pusher=Pusher$1;class Echo{constructor(){this.configCallbacks=[],this.bootedCallbacks=[]}config($){this.configCallbacks.push($)}booted($){this.bootedCallbacks.push($)}start(){let $={...Statamic.$config.get("broadcasting.options"),csrfToken:Statamic.$config.get("csrfToken"),authEndpoint:Statamic.$config.get("broadcasting.endpoint")};this.configCallbacks.forEach(I=>$=I($)),this.echo=new Echo$1($),this.bootedCallbacks.forEach(I=>I(this)),this.bootedCallbacks=[]}}["channel","connect","disconnect","join","leave","leaveChannel","listen","private","socketId","registerInterceptors","registerVueRequestInterceptor","registerAxiosRequestInterceptor","registerjQueryAjaxSetup"].forEach(M=>{Echo.prototype[M]=function(...$){return this.echo[M](...$)}});function OrderedMap(M){this.content=M}OrderedMap.prototype={constructor:OrderedMap,find:function(M){for(var $=0;$>1}};OrderedMap.from=function(M){if(M instanceof OrderedMap)return M;var $=[];if(M)for(var I in M)$.push(I,M[I]);return new OrderedMap($)};function findDiffStart(M,$,I){for(let N=0;;N++){if(N==M.childCount||N==$.childCount)return M.childCount==$.childCount?null:I;let B=M.child(N),j=$.child(N);if(B==j){I+=B.nodeSize;continue}if(!B.sameMarkup(j))return I;if(B.isText&&B.text!=j.text){for(let U=0;B.text[U]==j.text[U];U++)I++;return I}if(B.content.size||j.content.size){let U=findDiffStart(B.content,j.content,I+1);if(U!=null)return U}I+=B.nodeSize}}function findDiffEnd(M,$,I,N){for(let B=M.childCount,j=$.childCount;;){if(B==0||j==0)return B==j?null:{a:I,b:N};let U=M.child(--B),q=$.child(--j),Y=U.nodeSize;if(U==q){I-=Y,N-=Y;continue}if(!U.sameMarkup(q))return{a:I,b:N};if(U.isText&&U.text!=q.text){let K=0,G=Math.min(U.text.length,q.text.length);for(;K$&&N(Y,B+q,j||null,U)!==!1&&Y.content.size){let G=q+1;Y.nodesBetween(Math.max(0,$-G),Math.min(Y.content.size,I-G),N,B+G)}q=K}}descendants($){this.nodesBetween(0,this.size,$)}textBetween($,I,N,B){let j="",U=!0;return this.nodesBetween($,I,(q,Y)=>{let K=q.isText?q.text.slice(Math.max($,Y)-Y,I-Y):q.isLeaf?B?typeof B=="function"?B(q):B:q.type.spec.leafText?q.type.spec.leafText(q):"":"";q.isBlock&&(q.isLeaf&&K||q.isTextblock)&&N&&(U?U=!1:j+=N),j+=K},0),j}append($){if(!$.size)return this;if(!this.size)return $;let I=this.lastChild,N=$.firstChild,B=this.content.slice(),j=0;for(I.isText&&I.sameMarkup(N)&&(B[B.length-1]=I.withText(I.text+N.text),j=1);j<$.content.length;j++)B.push($.content[j]);return new Fragment(B,this.size+$.size)}cut($,I=this.size){if($==0&&I==this.size)return this;let N=[],B=0;if(I>$)for(let j=0,U=0;U$&&((U<$||Y>I)&&(q.isText?q=q.cut(Math.max(0,$-U),Math.min(q.text.length,I-U)):q=q.cut(Math.max(0,$-U-1),Math.min(q.content.size,I-U-1))),N.push(q),B+=q.nodeSize),U=Y}return new Fragment(N,B)}cutByIndex($,I){return $==I?Fragment.empty:$==0&&I==this.content.length?this:new Fragment(this.content.slice($,I))}replaceChild($,I){let N=this.content[$];if(N==I)return this;let B=this.content.slice(),j=this.size+I.nodeSize-N.nodeSize;return B[$]=I,new Fragment(B,j)}addToStart($){return new Fragment([$].concat(this.content),this.size+$.nodeSize)}addToEnd($){return new Fragment(this.content.concat($),this.size+$.nodeSize)}eq($){if(this.content.length!=$.content.length)return!1;for(let I=0;Ithis.size||$<0)throw new RangeError(`Position ${$} outside of fragment (${this})`);for(let N=0,B=0;;N++){let j=this.child(N),U=B+j.nodeSize;if(U>=$)return U==$||I>0?retIndex(N+1,U):retIndex(N,B);B=U}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map($=>$.toJSON()):null}static fromJSON($,I){if(!I)return Fragment.empty;if(!Array.isArray(I))throw new RangeError("Invalid input for Fragment.fromJSON");return new Fragment(I.map($.nodeFromJSON))}static fromArray($){if(!$.length)return Fragment.empty;let I,N=0;for(let B=0;B<$.length;B++){let j=$[B];N+=j.nodeSize,B&&j.isText&&$[B-1].sameMarkup(j)?(I||(I=$.slice(0,B)),I[I.length-1]=j.withText(I[I.length-1].text+j.text)):I&&I.push(j)}return new Fragment(I||$,N)}static from($){if(!$)return Fragment.empty;if($ instanceof Fragment)return $;if(Array.isArray($))return this.fromArray($);if($.attrs)return new Fragment([$],$.nodeSize);throw new RangeError("Can not convert "+$+" to a Fragment"+($.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}Fragment.empty=new Fragment([],0);const found={index:0,offset:0};function retIndex(M,$){return found.index=M,found.offset=$,found}function compareDeep(M,$){if(M===$)return!0;if(!(M&&typeof M=="object")||!($&&typeof $=="object"))return!1;let I=Array.isArray(M);if(Array.isArray($)!=I)return!1;if(I){if(M.length!=$.length)return!1;for(let N=0;Nthis.type.rank&&(I||(I=$.slice(0,B)),I.push(this),N=!0),I&&I.push(j)}}return I||(I=$.slice()),N||I.push(this),I}removeFromSet($){for(let I=0;I<$.length;I++)if(this.eq($[I]))return $.slice(0,I).concat($.slice(I+1));return $}isInSet($){for(let I=0;I<$.length;I++)if(this.eq($[I]))return!0;return!1}eq($){return this==$||this.type==$.type&&compareDeep(this.attrs,$.attrs)}toJSON(){let $={type:this.type.name};for(let I in this.attrs){$.attrs=this.attrs;break}return $}static fromJSON($,I){if(!I)throw new RangeError("Invalid input for Mark.fromJSON");let N=$.marks[I.type];if(!N)throw new RangeError(`There is no mark type ${I.type} in this schema`);let B=N.create(I.attrs);return N.checkAttrs(B.attrs),B}static sameSet($,I){if($==I)return!0;if($.length!=I.length)return!1;for(let N=0;N<$.length;N++)if(!$[N].eq(I[N]))return!1;return!0}static setFrom($){if(!$||Array.isArray($)&&$.length==0)return dc.none;if($ instanceof dc)return[$];let I=$.slice();return I.sort((N,B)=>N.type.rank-B.type.rank),I}};Mark$1.none=[];class ReplaceError extends Error{}class Slice{constructor($,I,N){this.content=$,this.openStart=I,this.openEnd=N}get size(){return this.content.size-this.openStart-this.openEnd}insertAt($,I){let N=insertInto(this.content,$+this.openStart,I);return N&&new Slice(N,this.openStart,this.openEnd)}removeBetween($,I){return new Slice(removeRange(this.content,$+this.openStart,I+this.openStart),this.openStart,this.openEnd)}eq($){return this.content.eq($.content)&&this.openStart==$.openStart&&this.openEnd==$.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let $={content:this.content.toJSON()};return this.openStart>0&&($.openStart=this.openStart),this.openEnd>0&&($.openEnd=this.openEnd),$}static fromJSON($,I){if(!I)return Slice.empty;let N=I.openStart||0,B=I.openEnd||0;if(typeof N!="number"||typeof B!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new Slice(Fragment.fromJSON($,I.content),N,B)}static maxOpen($,I=!0){let N=0,B=0;for(let j=$.firstChild;j&&!j.isLeaf&&(I||!j.type.spec.isolating);j=j.firstChild)N++;for(let j=$.lastChild;j&&!j.isLeaf&&(I||!j.type.spec.isolating);j=j.lastChild)B++;return new Slice($,N,B)}}Slice.empty=new Slice(Fragment.empty,0,0);function removeRange(M,$,I){let{index:N,offset:B}=M.findIndex($),j=M.maybeChild(N),{index:U,offset:q}=M.findIndex(I);if(B==$||j.isText){if(q!=I&&!M.child(U).isText)throw new RangeError("Removing non-flat range");return M.cut(0,$).append(M.cut(I))}if(N!=U)throw new RangeError("Removing non-flat range");return M.replaceChild(N,j.copy(removeRange(j.content,$-B-1,I-B-1)))}function insertInto(M,$,I,N){let{index:B,offset:j}=M.findIndex($),U=M.maybeChild(B);if(j==$||U.isText)return N&&!N.canReplace(B,B,I)?null:M.cut(0,$).append(I).append(M.cut($));let q=insertInto(U.content,$-j-1,I);return q&&M.replaceChild(B,U.copy(q))}function replace$1(M,$,I){if(I.openStart>M.depth)throw new ReplaceError("Inserted content deeper than insertion position");if(M.depth-I.openStart!=$.depth-I.openEnd)throw new ReplaceError("Inconsistent open depths");return replaceOuter(M,$,I,0)}function replaceOuter(M,$,I,N){let B=M.index(N),j=M.node(N);if(B==$.index(N)&&N=0&&M.isText&&M.sameMarkup($[I])?$[I]=M.withText($[I].text+M.text):$.push(M)}function addRange(M,$,I,N){let B=($||M).node(I),j=0,U=$?$.index(I):B.childCount;M&&(j=M.index(I),M.depth>I?j++:M.textOffset&&(addNode(M.nodeAfter,N),j++));for(let q=j;qB&&joinable$1(M,$,B+1),U=N.depth>B&&joinable$1(I,N,B+1),q=[];return addRange(null,M,B,q),j&&U&&$.index(B)==I.index(B)?(checkJoin(j,U),addNode(close(j,replaceThreeWay(M,$,I,N,B+1)),q)):(j&&addNode(close(j,replaceTwoWay(M,$,B+1)),q),addRange($,I,B,q),U&&addNode(close(U,replaceTwoWay(I,N,B+1)),q)),addRange(N,null,B,q),new Fragment(q)}function replaceTwoWay(M,$,I){let N=[];if(addRange(null,M,I,N),M.depth>I){let B=joinable$1(M,$,I+1);addNode(close(B,replaceTwoWay(M,$,I+1)),N)}return addRange($,null,I,N),new Fragment(N)}function prepareSliceForReplace(M,$){let I=$.depth-M.openStart,B=$.node(I).copy(M.content);for(let j=I-1;j>=0;j--)B=$.node(j).copy(Fragment.from(B));return{start:B.resolveNoCache(M.openStart+I),end:B.resolveNoCache(B.content.size-M.openEnd-I)}}class ResolvedPos{constructor($,I,N){this.pos=$,this.path=I,this.parentOffset=N,this.depth=I.length/3-1}resolveDepth($){return $==null?this.depth:$<0?this.depth+$:$}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node($){return this.path[this.resolveDepth($)*3]}index($){return this.path[this.resolveDepth($)*3+1]}indexAfter($){return $=this.resolveDepth($),this.index($)+($==this.depth&&!this.textOffset?0:1)}start($){return $=this.resolveDepth($),$==0?0:this.path[$*3-1]+1}end($){return $=this.resolveDepth($),this.start($)+this.node($).content.size}before($){if($=this.resolveDepth($),!$)throw new RangeError("There is no position before the top-level node");return $==this.depth+1?this.pos:this.path[$*3-1]}after($){if($=this.resolveDepth($),!$)throw new RangeError("There is no position after the top-level node");return $==this.depth+1?this.pos:this.path[$*3-1]+this.path[$*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let $=this.parent,I=this.index(this.depth);if(I==$.childCount)return null;let N=this.pos-this.path[this.path.length-1],B=$.child(I);return N?$.child(I).cut(N):B}get nodeBefore(){let $=this.index(this.depth),I=this.pos-this.path[this.path.length-1];return I?this.parent.child($).cut(0,I):$==0?null:this.parent.child($-1)}posAtIndex($,I){I=this.resolveDepth(I);let N=this.path[I*3],B=I==0?0:this.path[I*3-1]+1;for(let j=0;j<$;j++)B+=N.child(j).nodeSize;return B}marks(){let $=this.parent,I=this.index();if($.content.size==0)return Mark$1.none;if(this.textOffset)return $.child(I).marks;let N=$.maybeChild(I-1),B=$.maybeChild(I);if(!N){let q=N;N=B,B=q}let j=N.marks;for(var U=0;U0;I--)if(this.start(I)<=$&&this.end(I)>=$)return I;return 0}blockRange($=this,I){if($.pos=0;N--)if($.pos<=this.end(N)&&(!I||I(this.node(N))))return new NodeRange(this,$,N);return null}sameParent($){return this.pos-this.parentOffset==$.pos-$.parentOffset}max($){return $.pos>this.pos?$:this}min($){return $.pos=0&&I<=$.content.size))throw new RangeError("Position "+I+" out of range");let N=[],B=0,j=I;for(let U=$;;){let{index:q,offset:Y}=U.content.findIndex(j),K=j-Y;if(N.push(U,q,B+Y),!K||(U=U.child(q),U.isText))break;j=K-1,B+=Y+1}return new ResolvedPos(I,N,j)}static resolveCached($,I){let N=resolveCache.get($);if(N)for(let j=0;j$&&this.nodesBetween($,I,j=>(N.isInSet(j.marks)&&(B=!0),!B)),B}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let $=this.type.name;return this.content.size&&($+="("+this.content.toStringInner()+")"),wrapMarks(this.marks,$)}contentMatchAt($){let I=this.type.contentMatch.matchFragment(this.content,0,$);if(!I)throw new Error("Called contentMatchAt on a node with invalid content");return I}canReplace($,I,N=Fragment.empty,B=0,j=N.childCount){let U=this.contentMatchAt($).matchFragment(N,B,j),q=U&&U.matchFragment(this.content,I);if(!q||!q.validEnd)return!1;for(let Y=B;YI.type.name)}`);this.content.forEach(I=>I.check())}toJSON(){let $={type:this.type.name};for(let I in this.attrs){$.attrs=this.attrs;break}return this.content.size&&($.content=this.content.toJSON()),this.marks.length&&($.marks=this.marks.map(I=>I.toJSON())),$}static fromJSON($,I){if(!I)throw new RangeError("Invalid input for Node.fromJSON");let N;if(I.marks){if(!Array.isArray(I.marks))throw new RangeError("Invalid mark data for Node.fromJSON");N=I.marks.map($.markFromJSON)}if(I.type=="text"){if(typeof I.text!="string")throw new RangeError("Invalid text node in JSON");return $.text(I.text,N)}let B=Fragment.fromJSON($,I.content),j=$.nodeType(I.type).create(I.attrs,B,N);return j.type.checkAttrs(j.attrs),j}};Node$2.prototype.text=void 0;class TextNode extends Node$2{constructor($,I,N,B){if(super($,I,null,B),!N)throw new RangeError("Empty text nodes are not allowed");this.text=N}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):wrapMarks(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween($,I){return this.text.slice($,I)}get nodeSize(){return this.text.length}mark($){return $==this.marks?this:new TextNode(this.type,this.attrs,this.text,$)}withText($){return $==this.text?this:new TextNode(this.type,this.attrs,$,this.marks)}cut($=0,I=this.text.length){return $==0&&I==this.text.length?this:this.withText(this.text.slice($,I))}eq($){return this.sameMarkup($)&&this.text==$.text}toJSON(){let $=super.toJSON();return $.text=this.text,$}}function wrapMarks(M,$){for(let I=M.length-1;I>=0;I--)$=M[I].type.name+"("+$+")";return $}class ContentMatch{constructor($){this.validEnd=$,this.next=[],this.wrapCache=[]}static parse($,I){let N=new TokenStream($,I);if(N.next==null)return ContentMatch.empty;let B=parseExpr(N);N.next&&N.err("Unexpected trailing text");let j=dfa(nfa(B));return checkForDeadEnds(j,N),j}matchType($){for(let I=0;IK.createAndFill()));for(let K=0;K=this.next.length)throw new RangeError(`There's no ${$}th edge in this content match`);return this.next[$]}toString(){let $=[];function I(N){$.push(N);for(let B=0;B{let j=B+(N.validEnd?"*":" ")+" ";for(let U=0;U"+$.indexOf(N.next[U].next);return j}).join(` +`)}}ContentMatch.empty=new ContentMatch(!0);class TokenStream{constructor($,I){this.string=$,this.nodeTypes=I,this.inline=null,this.pos=0,this.tokens=$.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat($){return this.next==$&&(this.pos++||!0)}err($){throw new SyntaxError($+" (in content expression '"+this.string+"')")}}function parseExpr(M){let $=[];do $.push(parseExprSeq(M));while(M.eat("|"));return $.length==1?$[0]:{type:"choice",exprs:$}}function parseExprSeq(M){let $=[];do $.push(parseExprSubscript(M));while(M.next&&M.next!=")"&&M.next!="|");return $.length==1?$[0]:{type:"seq",exprs:$}}function parseExprSubscript(M){let $=parseExprAtom(M);for(;;)if(M.eat("+"))$={type:"plus",expr:$};else if(M.eat("*"))$={type:"star",expr:$};else if(M.eat("?"))$={type:"opt",expr:$};else if(M.eat("{"))$=parseExprRange(M,$);else break;return $}function parseNum(M){/\D/.test(M.next)&&M.err("Expected number, got '"+M.next+"'");let $=Number(M.next);return M.pos++,$}function parseExprRange(M,$){let I=parseNum(M),N=I;return M.eat(",")&&(M.next!="}"?N=parseNum(M):N=-1),M.eat("}")||M.err("Unclosed braced range"),{type:"range",min:I,max:N,expr:$}}function resolveName(M,$){let I=M.nodeTypes,N=I[$];if(N)return[N];let B=[];for(let j in I){let U=I[j];U.groups.indexOf($)>-1&&B.push(U)}return B.length==0&&M.err("No node type or group '"+$+"' found"),B}function parseExprAtom(M){if(M.eat("(")){let $=parseExpr(M);return M.eat(")")||M.err("Missing closing paren"),$}else if(/\W/.test(M.next))M.err("Unexpected token '"+M.next+"'");else{let $=resolveName(M,M.next).map(I=>(M.inline==null?M.inline=I.isInline:M.inline!=I.isInline&&M.err("Mixing inline and block content"),{type:"name",value:I}));return M.pos++,$.length==1?$[0]:{type:"choice",exprs:$}}}function nfa(M){let $=[[]];return B(j(M,0),I()),$;function I(){return $.push([])-1}function N(U,q,Y){let K={term:Y,to:q};return $[U].push(K),K}function B(U,q){U.forEach(Y=>Y.to=q)}function j(U,q){if(U.type=="choice")return U.exprs.reduce((Y,K)=>Y.concat(j(K,q)),[]);if(U.type=="seq")for(let Y=0;;Y++){let K=j(U.exprs[Y],q);if(Y==U.exprs.length-1)return K;B(K,q=I())}else if(U.type=="star"){let Y=I();return N(q,Y),B(j(U.expr,Y),Y),[N(Y)]}else if(U.type=="plus"){let Y=I();return B(j(U.expr,q),Y),B(j(U.expr,Y),Y),[N(Y)]}else{if(U.type=="opt")return[N(q)].concat(j(U.expr,q));if(U.type=="range"){let Y=q;for(let K=0;K{M[U].forEach(({term:q,to:Y})=>{if(!q)return;let K;for(let G=0;G{K||B.push([q,K=[]]),K.indexOf(G)==-1&&K.push(G)})})});let j=$[N.join(",")]=new ContentMatch(N.indexOf(M.length-1)>-1);for(let U=0;U-1}allowsMarks($){if(this.markSet==null)return!0;for(let I=0;I<$.length;I++)if(!this.allowsMarkType($[I].type))return!1;return!0}allowedMarks($){if(this.markSet==null)return $;let I;for(let N=0;N<$.length;N++)this.allowsMarkType($[N].type)?I&&I.push($[N]):I||(I=$.slice(0,N));return I?I.length?I:Mark$1.none:$}static compile($,I){let N=Object.create(null);$.forEach((j,U)=>N[j]=new Uc(j,I,U));let B=I.spec.topNode||"doc";if(!N[B])throw new RangeError("Schema is missing its top node type ('"+B+"')");if(!N.text)throw new RangeError("Every schema needs a 'text' type");for(let j in N.text.attrs)throw new RangeError("The text node type should not have attributes");return N}};function validateType(M,$,I){let N=I.split("|");return B=>{let j=B===null?"null":typeof B;if(N.indexOf(j)<0)throw new RangeError(`Expected value of type ${N} for attribute ${$} on type ${M}, got ${j}`)}}class Attribute{constructor($,I,N){this.hasDefault=Object.prototype.hasOwnProperty.call(N,"default"),this.default=N.default,this.validate=typeof N.validate=="string"?validateType($,I,N.validate):N.validate}get isRequired(){return!this.hasDefault}}class MarkType{constructor($,I,N,B){this.name=$,this.rank=I,this.schema=N,this.spec=B,this.attrs=initAttrs($,B.attrs),this.excluded=null;let j=defaultAttrs(this.attrs);this.instance=j?new Mark$1(this,j):null}create($=null){return!$&&this.instance?this.instance:new Mark$1(this,computeAttrs(this.attrs,$))}static compile($,I){let N=Object.create(null),B=0;return $.forEach((j,U)=>N[j]=new MarkType(j,B++,I,U)),N}removeFromSet($){for(var I=0;I<$.length;I++)$[I].type==this&&($=$.slice(0,I).concat($.slice(I+1)),I--);return $}isInSet($){for(let I=0;I<$.length;I++)if($[I].type==this)return $[I]}checkAttrs($){checkAttrs(this.attrs,$,"mark",this.name)}excludes($){return this.excluded.indexOf($)>-1}}class Schema{constructor($){this.linebreakReplacement=null,this.cached=Object.create(null);let I=this.spec={};for(let B in $)I[B]=$[B];I.nodes=OrderedMap.from($.nodes),I.marks=OrderedMap.from($.marks||{}),this.nodes=NodeType$1.compile(this.spec.nodes,this),this.marks=MarkType.compile(this.spec.marks,this);let N=Object.create(null);for(let B in this.nodes){if(B in this.marks)throw new RangeError(B+" can not be both a node and a mark");let j=this.nodes[B],U=j.spec.content||"",q=j.spec.marks;if(j.contentMatch=N[U]||(N[U]=ContentMatch.parse(U,this.nodes)),j.inlineContent=j.contentMatch.inlineContent,j.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!j.isInline||!j.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=j}j.markSet=q=="_"?null:q?gatherMarks(this,q.split(" ")):q==""||!j.inlineContent?[]:null}for(let B in this.marks){let j=this.marks[B],U=j.spec.excludes;j.excluded=U==null?[j]:U==""?[]:gatherMarks(this,U.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node($,I=null,N,B){if(typeof $=="string")$=this.nodeType($);else if($ instanceof NodeType$1){if($.schema!=this)throw new RangeError("Node type from different schema used ("+$.name+")")}else throw new RangeError("Invalid node type: "+$);return $.createChecked(I,N,B)}text($,I){let N=this.nodes.text;return new TextNode(N,N.defaultAttrs,$,Mark$1.setFrom(I))}mark($,I){return typeof $=="string"&&($=this.marks[$]),$.create(I)}nodeFromJSON($){return Node$2.fromJSON(this,$)}markFromJSON($){return Mark$1.fromJSON(this,$)}nodeType($){let I=this.nodes[$];if(!I)throw new RangeError("Unknown node type: "+$);return I}}function gatherMarks(M,$){let I=[];for(let N=0;N<$.length;N++){let B=$[N],j=M.marks[B],U=j;if(j)I.push(j);else for(let q in M.marks){let Y=M.marks[q];(B=="_"||Y.spec.group&&Y.spec.group.split(" ").indexOf(B)>-1)&&I.push(U=Y)}if(!U)throw new SyntaxError("Unknown mark type: '"+$[N]+"'")}return I}function isTagRule(M){return M.tag!=null}function isStyleRule(M){return M.style!=null}class DOMParser{constructor($,I){this.schema=$,this.rules=I,this.tags=[],this.styles=[];let N=this.matchedStyles=[];I.forEach(B=>{if(isTagRule(B))this.tags.push(B);else if(isStyleRule(B)){let j=/[^=]*/.exec(B.style)[0];N.indexOf(j)<0&&N.push(j),this.styles.push(B)}}),this.normalizeLists=!this.tags.some(B=>{if(!/^(ul|ol)\b/.test(B.tag)||!B.node)return!1;let j=$.nodes[B.node];return j.contentMatch.matchType(j)})}parse($,I={}){let N=new ParseContext(this,I,!1);return N.addAll($,Mark$1.none,I.from,I.to),N.finish()}parseSlice($,I={}){let N=new ParseContext(this,I,!0);return N.addAll($,Mark$1.none,I.from,I.to),Slice.maxOpen(N.finish())}matchTag($,I,N){for(let B=N?this.tags.indexOf(N)+1:0;B$.length&&(q.charCodeAt($.length)!=61||q.slice($.length+1)!=I))){if(U.getAttrs){let Y=U.getAttrs(I);if(Y===!1)continue;U.attrs=Y||void 0}return U}}}static schemaRules($){let I=[];function N(B){let j=B.priority==null?50:B.priority,U=0;for(;U{N(U=copy(U)),U.mark||U.ignore||U.clearMark||(U.mark=B)})}for(let B in $.nodes){let j=$.nodes[B].spec.parseDOM;j&&j.forEach(U=>{N(U=copy(U)),U.node||U.ignore||U.mark||(U.node=B)})}return I}static fromSchema($){return $.cached.domParser||($.cached.domParser=new DOMParser($,DOMParser.schemaRules($)))}}const blockTags={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},ignoreTags={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},listTags={ol:!0,ul:!0},OPT_PRESERVE_WS=1,OPT_PRESERVE_WS_FULL=2,OPT_OPEN_LEFT=4;function wsOptionsFor(M,$,I){return $!=null?($?OPT_PRESERVE_WS:0)|($==="full"?OPT_PRESERVE_WS_FULL:0):M&&M.whitespace=="pre"?OPT_PRESERVE_WS|OPT_PRESERVE_WS_FULL:I&~OPT_OPEN_LEFT}class NodeContext{constructor($,I,N,B,j,U){this.type=$,this.attrs=I,this.marks=N,this.solid=B,this.options=U,this.content=[],this.activeMarks=Mark$1.none,this.match=j||(U&OPT_OPEN_LEFT?null:$.contentMatch)}findWrapping($){if(!this.match){if(!this.type)return[];let I=this.type.contentMatch.fillBefore(Fragment.from($));if(I)this.match=this.type.contentMatch.matchFragment(I);else{let N=this.type.contentMatch,B;return(B=N.findWrapping($.type))?(this.match=N,B):null}}return this.match.findWrapping($.type)}finish($){if(!(this.options&OPT_PRESERVE_WS)){let N=this.content[this.content.length-1],B;if(N&&N.isText&&(B=/[ \t\r\n\u000c]+$/.exec(N.text))){let j=N;N.text.length==B[0].length?this.content.pop():this.content[this.content.length-1]=j.withText(j.text.slice(0,j.text.length-B[0].length))}}let I=Fragment.from(this.content);return!$&&this.match&&(I=I.append(this.match.fillBefore(Fragment.empty,!0))),this.type?this.type.create(this.attrs,I,this.marks):I}inlineContext($){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:$.parentNode&&!blockTags.hasOwnProperty($.parentNode.nodeName.toLowerCase())}}class ParseContext{constructor($,I,N){this.parser=$,this.options=I,this.isOpen=N,this.open=0;let B=I.topNode,j,U=wsOptionsFor(null,I.preserveWhitespace,0)|(N?OPT_OPEN_LEFT:0);B?j=new NodeContext(B.type,B.attrs,Mark$1.none,!0,I.topMatch||B.type.contentMatch,U):N?j=new NodeContext(null,null,Mark$1.none,!0,null,U):j=new NodeContext($.schema.topNodeType,null,Mark$1.none,!0,null,U),this.nodes=[j],this.find=I.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM($,I){$.nodeType==3?this.addTextNode($,I):$.nodeType==1&&this.addElement($,I)}addTextNode($,I){let N=$.nodeValue,B=this.top;if(B.options&OPT_PRESERVE_WS_FULL||B.inlineContext($)||/[^ \t\r\n\u000c]/.test(N)){if(B.options&OPT_PRESERVE_WS)B.options&OPT_PRESERVE_WS_FULL?N=N.replace(/\r\n?/g,` +`):N=N.replace(/\r?\n|\r/g," ");else if(N=N.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(N)&&this.open==this.nodes.length-1){let j=B.content[B.content.length-1],U=$.previousSibling;(!j||U&&U.nodeName=="BR"||j.isText&&/[ \t\r\n\u000c]$/.test(j.text))&&(N=N.slice(1))}N&&this.insertNode(this.parser.schema.text(N),I),this.findInText($)}else this.findInside($)}addElement($,I,N){let B=$.nodeName.toLowerCase(),j;listTags.hasOwnProperty(B)&&this.parser.normalizeLists&&normalizeList($);let U=this.options.ruleFromNode&&this.options.ruleFromNode($)||(j=this.parser.matchTag($,this,N));if(U?U.ignore:ignoreTags.hasOwnProperty(B))this.findInside($),this.ignoreFallback($,I);else if(!U||U.skip||U.closeParent){U&&U.closeParent?this.open=Math.max(0,this.open-1):U&&U.skip.nodeType&&($=U.skip);let q,Y=this.top,K=this.needsBlock;if(blockTags.hasOwnProperty(B))Y.content.length&&Y.content[0].isInline&&this.open&&(this.open--,Y=this.top),q=!0,Y.type||(this.needsBlock=!0);else if(!$.firstChild){this.leafFallback($,I);return}let G=U&&U.skip?I:this.readStyles($,I);G&&this.addAll($,G),q&&this.sync(Y),this.needsBlock=K}else{let q=this.readStyles($,I);q&&this.addElementByRule($,U,q,U.consuming===!1?j:void 0)}}leafFallback($,I){$.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode($.ownerDocument.createTextNode(` +`),I)}ignoreFallback($,I){$.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),I)}readStyles($,I){let N=$.style;if(N&&N.length)for(let B=0;B!Y.clearMark(K)):I=I.concat(this.parser.schema.marks[Y.mark].create(Y.attrs)),Y.consuming===!1)q=Y;else break}}return I}addElementByRule($,I,N,B){let j,U;if(I.node)if(U=this.parser.schema.nodes[I.node],U.isLeaf)this.insertNode(U.create(I.attrs),N)||this.leafFallback($,N);else{let Y=this.enter(U,I.attrs||null,N,I.preserveWhitespace);Y&&(j=!0,N=Y)}else{let Y=this.parser.schema.marks[I.mark];N=N.concat(Y.create(I.attrs))}let q=this.top;if(U&&U.isLeaf)this.findInside($);else if(B)this.addElement($,N,B);else if(I.getContent)this.findInside($),I.getContent($,this.parser.schema).forEach(Y=>this.insertNode(Y,N));else{let Y=$;typeof I.contentElement=="string"?Y=$.querySelector(I.contentElement):typeof I.contentElement=="function"?Y=I.contentElement($):I.contentElement&&(Y=I.contentElement),this.findAround($,Y,!0),this.addAll(Y,N)}j&&this.sync(q)&&this.open--}addAll($,I,N,B){let j=N||0;for(let U=N?$.childNodes[N]:$.firstChild,q=B==null?null:$.childNodes[B];U!=q;U=U.nextSibling,++j)this.findAtPoint($,j),this.addDOM(U,I);this.findAtPoint($,j)}findPlace($,I){let N,B;for(let j=this.open;j>=0;j--){let U=this.nodes[j],q=U.findWrapping($);if(q&&(!N||N.length>q.length)&&(N=q,B=U,!q.length)||U.solid)break}if(!N)return null;this.sync(B);for(let j=0;j(U.type?U.type.allowsMarkType(K.type):markMayApply(K.type,$))?(Y=K.addToSet(Y),!1):!0),this.nodes.push(new NodeContext($,I,Y,B,null,q)),this.open++,N}closeExtra($=!1){let I=this.nodes.length-1;if(I>this.open){for(;I>this.open;I--)this.nodes[I-1].content.push(this.nodes[I].finish($));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(this.isOpen||this.options.topOpen)}sync($){for(let I=this.open;I>=0;I--)if(this.nodes[I]==$)return this.open=I,!0;return!1}get currentPos(){this.closeExtra();let $=0;for(let I=this.open;I>=0;I--){let N=this.nodes[I].content;for(let B=N.length-1;B>=0;B--)$+=N[B].nodeSize;I&&$++}return $}findAtPoint($,I){if(this.find)for(let N=0;N-1)return $.split(/\s*\|\s*/).some(this.matchesContext,this);let I=$.split("/"),N=this.options.context,B=!this.isOpen&&(!N||N.parent.type==this.nodes[0].type),j=-(N?N.depth+1:0)+(B?0:1),U=(q,Y)=>{for(;q>=0;q--){let K=I[q];if(K==""){if(q==I.length-1||q==0)continue;for(;Y>=j;Y--)if(U(q-1,Y))return!0;return!1}else{let G=Y>0||Y==0&&B?this.nodes[Y].type:N&&Y>=j?N.node(Y-j).type:null;if(!G||G.name!=K&&G.groups.indexOf(K)==-1)return!1;Y--}}return!0};return U(I.length-1,this.open)}textblockFromContext(){let $=this.options.context;if($)for(let I=$.depth;I>=0;I--){let N=$.node(I).contentMatchAt($.indexAfter(I)).defaultType;if(N&&N.isTextblock&&N.defaultAttrs)return N}for(let I in this.parser.schema.nodes){let N=this.parser.schema.nodes[I];if(N.isTextblock&&N.defaultAttrs)return N}}}function normalizeList(M){for(let $=M.firstChild,I=null;$;$=$.nextSibling){let N=$.nodeType==1?$.nodeName.toLowerCase():null;N&&listTags.hasOwnProperty(N)&&I?(I.appendChild($),$=I):N=="li"?I=$:N&&(I=null)}}function matches(M,$){return(M.matches||M.msMatchesSelector||M.webkitMatchesSelector||M.mozMatchesSelector).call(M,$)}function copy(M){let $={};for(let I in M)$[I]=M[I];return $}function markMayApply(M,$){let I=$.schema.nodes;for(let N in I){let B=I[N];if(!B.allowsMarkType(M))continue;let j=[],U=q=>{j.push(q);for(let Y=0;Y{if(j.length||U.marks.length){let q=0,Y=0;for(;q=0;B--){let j=this.serializeMark($.marks[B],$.isInline,I);j&&((j.contentDOM||j.dom).appendChild(N),N=j.dom)}return N}serializeMark($,I,N={}){let B=this.marks[$.type.name];return B&&renderSpec(doc$1(N),B($,I),null,$.attrs)}static renderSpec($,I,N=null,B){return renderSpec($,I,N,B)}static fromSchema($){return $.cached.domSerializer||($.cached.domSerializer=new DOMSerializer(this.nodesFromSchema($),this.marksFromSchema($)))}static nodesFromSchema($){let I=gatherToDOM($.nodes);return I.text||(I.text=N=>N.text),I}static marksFromSchema($){return gatherToDOM($.marks)}}function gatherToDOM(M){let $={};for(let I in M){let N=M[I].spec.toDOM;N&&($[I]=N)}return $}function doc$1(M){return M.document||window.document}const suspiciousAttributeCache=new WeakMap;function suspiciousAttributes(M){let $=suspiciousAttributeCache.get(M);return $===void 0&&suspiciousAttributeCache.set(M,$=suspiciousAttributesInner(M)),$}function suspiciousAttributesInner(M){let $=null;function I(N){if(N&&typeof N=="object")if(Array.isArray(N))if(typeof N[0]=="string")$||($=[]),$.push(N);else for(let B=0;B-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let U=B.indexOf(" ");U>0&&(I=B.slice(0,U),B=B.slice(U+1));let q,Y=I?M.createElementNS(I,B):M.createElement(B),K=$[1],G=1;if(K&&typeof K=="object"&&K.nodeType==null&&!Array.isArray(K)){G=2;for(let J in K)if(K[J]!=null){let Z=J.indexOf(" ");Z>0?Y.setAttributeNS(J.slice(0,Z),J.slice(Z+1),K[J]):Y.setAttribute(J,K[J])}}for(let J=G;J<$.length;J++){let Z=$[J];if(Z===0){if(J<$.length-1||J>G)throw new RangeError("Content hole must be the only child of its parent node");return{dom:Y,contentDOM:Y}}else{let{dom:ee,contentDOM:te}=renderSpec(M,Z,I,N);if(Y.appendChild(ee),te){if(q)throw new RangeError("Multiple content holes");q=te}}}return{dom:Y,contentDOM:q}}const lower16=65535,factor16=Math.pow(2,16);function makeRecover(M,$){return M+$*factor16}function recoverIndex(M){return M&lower16}function recoverOffset(M){return(M-(M&lower16))/factor16}const DEL_BEFORE=1,DEL_AFTER=2,DEL_ACROSS=4,DEL_SIDE=8;class MapResult{constructor($,I,N){this.pos=$,this.delInfo=I,this.recover=N}get deleted(){return(this.delInfo&DEL_SIDE)>0}get deletedBefore(){return(this.delInfo&(DEL_BEFORE|DEL_ACROSS))>0}get deletedAfter(){return(this.delInfo&(DEL_AFTER|DEL_ACROSS))>0}get deletedAcross(){return(this.delInfo&DEL_ACROSS)>0}}class StepMap{constructor($,I=!1){if(this.ranges=$,this.inverted=I,!$.length&&StepMap.empty)return StepMap.empty}recover($){let I=0,N=recoverIndex($);if(!this.inverted)for(let B=0;B$)break;let K=this.ranges[q+j],G=this.ranges[q+U],J=Y+K;if($<=J){let Z=K?$==Y?-1:$==J?1:I:I,ee=Y+B+(Z<0?0:G);if(N)return ee;let te=$==(I<0?Y:J)?null:makeRecover(q/3,$-Y),se=$==Y?DEL_AFTER:$==J?DEL_BEFORE:DEL_ACROSS;return(I<0?$!=Y:$!=J)&&(se|=DEL_SIDE),new MapResult(ee,se,te)}B+=G-K}return N?$+B:new MapResult($+B,0,null)}touches($,I){let N=0,B=recoverIndex(I),j=this.inverted?2:1,U=this.inverted?1:2;for(let q=0;q$)break;let K=this.ranges[q+j],G=Y+K;if($<=G&&q==B*3)return!0;N+=this.ranges[q+U]-K}return!1}forEach($){let I=this.inverted?2:1,N=this.inverted?1:2;for(let B=0,j=0;B=0;I--){let B=$.getMirror(I);this.appendMap($.maps[I].invert(),B!=null&&B>I?N-B-1:void 0)}}invert(){let $=new Mapping;return $.appendMappingInverted(this),$}map($,I=1){if(this.mirror)return this._map($,I,!0);for(let N=this.from;Nj&&Y!U.isAtom||!q.type.allowsMarkType(this.mark.type)?U:U.mark(this.mark.addToSet(U.marks)),B),I.openStart,I.openEnd);return StepResult.fromReplace($,this.from,this.to,j)}invert(){return new RemoveMarkStep(this.from,this.to,this.mark)}map($){let I=$.mapResult(this.from,1),N=$.mapResult(this.to,-1);return I.deleted&&N.deleted||I.pos>=N.pos?null:new AddMarkStep(I.pos,N.pos,this.mark)}merge($){return $ instanceof AddMarkStep&&$.mark.eq(this.mark)&&this.from<=$.to&&this.to>=$.from?new AddMarkStep(Math.min(this.from,$.from),Math.max(this.to,$.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON($,I){if(typeof I.from!="number"||typeof I.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new AddMarkStep(I.from,I.to,$.markFromJSON(I.mark))}}Step.jsonID("addMark",AddMarkStep);class RemoveMarkStep extends Step{constructor($,I,N){super(),this.from=$,this.to=I,this.mark=N}apply($){let I=$.slice(this.from,this.to),N=new Slice(mapFragment(I.content,B=>B.mark(this.mark.removeFromSet(B.marks)),$),I.openStart,I.openEnd);return StepResult.fromReplace($,this.from,this.to,N)}invert(){return new AddMarkStep(this.from,this.to,this.mark)}map($){let I=$.mapResult(this.from,1),N=$.mapResult(this.to,-1);return I.deleted&&N.deleted||I.pos>=N.pos?null:new RemoveMarkStep(I.pos,N.pos,this.mark)}merge($){return $ instanceof RemoveMarkStep&&$.mark.eq(this.mark)&&this.from<=$.to&&this.to>=$.from?new RemoveMarkStep(Math.min(this.from,$.from),Math.max(this.to,$.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON($,I){if(typeof I.from!="number"||typeof I.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new RemoveMarkStep(I.from,I.to,$.markFromJSON(I.mark))}}Step.jsonID("removeMark",RemoveMarkStep);class AddNodeMarkStep extends Step{constructor($,I){super(),this.pos=$,this.mark=I}apply($){let I=$.nodeAt(this.pos);if(!I)return StepResult.fail("No node at mark step's position");let N=I.type.create(I.attrs,null,this.mark.addToSet(I.marks));return StepResult.fromReplace($,this.pos,this.pos+1,new Slice(Fragment.from(N),0,I.isLeaf?0:1))}invert($){let I=$.nodeAt(this.pos);if(I){let N=this.mark.addToSet(I.marks);if(N.length==I.marks.length){for(let B=0;BN.pos?null:new ReplaceAroundStep(I.pos,N.pos,B,j,this.slice,this.insert,this.structure)}toJSON(){let $={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&($.slice=this.slice.toJSON()),this.structure&&($.structure=!0),$}static fromJSON($,I){if(typeof I.from!="number"||typeof I.to!="number"||typeof I.gapFrom!="number"||typeof I.gapTo!="number"||typeof I.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new ReplaceAroundStep(I.from,I.to,I.gapFrom,I.gapTo,Slice.fromJSON($,I.slice),I.insert,!!I.structure)}}Step.jsonID("replaceAround",ReplaceAroundStep);function contentBetween(M,$,I){let N=M.resolve($),B=I-$,j=N.depth;for(;B>0&&j>0&&N.indexAfter(j)==N.node(j).childCount;)j--,B--;if(B>0){let U=N.node(j).maybeChild(N.indexAfter(j));for(;B>0;){if(!U||U.isLeaf)return!0;U=U.firstChild,B--}}return!1}function addMark(M,$,I,N){let B=[],j=[],U,q;M.doc.nodesBetween($,I,(Y,K,G)=>{if(!Y.isInline)return;let J=Y.marks;if(!N.isInSet(J)&&G.type.allowsMarkType(N.type)){let Z=Math.max(K,$),ee=Math.min(K+Y.nodeSize,I),te=N.addToSet(J);for(let se=0;seM.step(Y)),j.forEach(Y=>M.step(Y))}function removeMark(M,$,I,N){let B=[],j=0;M.doc.nodesBetween($,I,(U,q)=>{if(!U.isInline)return;j++;let Y=null;if(N instanceof MarkType){let K=U.marks,G;for(;G=N.isInSet(K);)(Y||(Y=[])).push(G),K=G.removeFromSet(K)}else N?N.isInSet(U.marks)&&(Y=[N]):Y=U.marks;if(Y&&Y.length){let K=Math.min(q+U.nodeSize,I);for(let G=0;GM.step(new RemoveMarkStep(U.from,U.to,U.style)))}function clearIncompatible(M,$,I,N=I.contentMatch,B=!0){let j=M.doc.nodeAt($),U=[],q=$+1;for(let Y=0;Y=0;Y--)M.step(U[Y])}function canCut(M,$,I){return($==0||M.canReplace($,M.childCount))&&(I==M.childCount||M.canReplace(0,I))}function liftTarget(M){let I=M.parent.content.cutByIndex(M.startIndex,M.endIndex);for(let N=M.depth;;--N){let B=M.$from.node(N),j=M.$from.index(N),U=M.$to.indexAfter(N);if(NI;te--)se||N.index(te)>0?(se=!0,G=Fragment.from(N.node(te).copy(G)),J++):Y--;let Z=Fragment.empty,ee=0;for(let te=j,se=!1;te>I;te--)se||B.after(te+1)=0;U--){if(N.size){let q=I[U].type.contentMatch.matchFragment(N);if(!q||!q.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}N=Fragment.from(I[U].type.create(I[U].attrs,N))}let B=$.start,j=$.end;M.step(new ReplaceAroundStep(B,j,B,j,new Slice(N,0,0),I.length,!0))}function setBlockType$1(M,$,I,N,B){if(!N.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let j=M.steps.length;M.doc.nodesBetween($,I,(U,q)=>{let Y=typeof B=="function"?B(U):B;if(U.isTextblock&&!U.hasMarkup(N,Y)&&canChangeType(M.doc,M.mapping.slice(j).map(q),N)){let K=null;if(N.schema.linebreakReplacement){let ee=N.whitespace=="pre",te=!!N.contentMatch.matchType(N.schema.linebreakReplacement);ee&&!te?K=!1:!ee&&te&&(K=!0)}K===!1&&replaceLinebreaks(M,U,q,j),clearIncompatible(M,M.mapping.slice(j).map(q,1),N,void 0,K===null);let G=M.mapping.slice(j),J=G.map(q,1),Z=G.map(q+U.nodeSize,1);return M.step(new ReplaceAroundStep(J,Z,J+1,Z-1,new Slice(Fragment.from(N.create(Y,null,U.marks)),0,0),1,!0)),K===!0&&replaceNewlines(M,U,q,j),!1}})}function replaceNewlines(M,$,I,N){$.forEach((B,j)=>{if(B.isText){let U,q=/\r?\n|\r/g;for(;U=q.exec(B.text);){let Y=M.mapping.slice(N).map(I+1+j+U.index);M.replaceWith(Y,Y+1,$.type.schema.linebreakReplacement.create())}}})}function replaceLinebreaks(M,$,I,N){$.forEach((B,j)=>{if(B.type==B.type.schema.linebreakReplacement){let U=M.mapping.slice(N).map(I+1+j);M.replaceWith(U,U+1,$.type.schema.text(` +`))}})}function canChangeType(M,$,I){let N=M.resolve($),B=N.index();return N.parent.canReplaceWith(B,B+1,I)}function setNodeMarkup(M,$,I,N,B){let j=M.doc.nodeAt($);if(!j)throw new RangeError("No node at given position");I||(I=j.type);let U=I.create(N,null,B||j.marks);if(j.isLeaf)return M.replaceWith($,$+j.nodeSize,U);if(!I.validContent(j.content))throw new RangeError("Invalid content for node type "+I.name);M.step(new ReplaceAroundStep($,$+j.nodeSize,$+1,$+j.nodeSize-1,new Slice(Fragment.from(U),0,0),1,!0))}function canSplit(M,$,I=1,N){let B=M.resolve($),j=B.depth-I,U=N&&N[N.length-1]||B.parent;if(j<0||B.parent.type.spec.isolating||!B.parent.canReplace(B.index(),B.parent.childCount)||!U.type.validContent(B.parent.content.cutByIndex(B.index(),B.parent.childCount)))return!1;for(let K=B.depth-1,G=I-2;K>j;K--,G--){let J=B.node(K),Z=B.index(K);if(J.type.spec.isolating)return!1;let ee=J.content.cutByIndex(Z,J.childCount),te=N&&N[G+1];te&&(ee=ee.replaceChild(0,te.type.create(te.attrs)));let se=N&&N[G]||J;if(!J.canReplace(Z+1,J.childCount)||!se.type.validContent(ee))return!1}let q=B.indexAfter(j),Y=N&&N[0];return B.node(j).canReplaceWith(q,q,Y?Y.type:B.node(j+1).type)}function split(M,$,I=1,N){let B=M.doc.resolve($),j=Fragment.empty,U=Fragment.empty;for(let q=B.depth,Y=B.depth-I,K=I-1;q>Y;q--,K--){j=Fragment.from(B.node(q).copy(j));let G=N&&N[K];U=Fragment.from(G?G.type.create(G.attrs,U):B.node(q).copy(U))}M.step(new ReplaceStep($,$,new Slice(j.append(U),I,I),!0))}function canJoin(M,$){let I=M.resolve($),N=I.index();return joinable(I.nodeBefore,I.nodeAfter)&&I.parent.canReplace(N,N+1)}function joinable(M,$){return!!(M&&$&&!M.isLeaf&&M.canAppend($))}function joinPoint(M,$,I=-1){let N=M.resolve($);for(let B=N.depth;;B--){let j,U,q=N.index(B);if(B==N.depth?(j=N.nodeBefore,U=N.nodeAfter):I>0?(j=N.node(B+1),q++,U=N.node(B).maybeChild(q)):(j=N.node(B).maybeChild(q-1),U=N.node(B+1)),j&&!j.isTextblock&&joinable(j,U)&&N.node(B).canReplace(q,q+1))return $;if(B==0)break;$=I<0?N.before(B):N.after(B)}}function join(M,$,I){let N=new ReplaceStep($-I,$+I,Slice.empty,!0);M.step(N)}function insertPoint(M,$,I){let N=M.resolve($);if(N.parent.canReplaceWith(N.index(),N.index(),I))return $;if(N.parentOffset==0)for(let B=N.depth-1;B>=0;B--){let j=N.index(B);if(N.node(B).canReplaceWith(j,j,I))return N.before(B+1);if(j>0)return null}if(N.parentOffset==N.parent.content.size)for(let B=N.depth-1;B>=0;B--){let j=N.indexAfter(B);if(N.node(B).canReplaceWith(j,j,I))return N.after(B+1);if(j=0;U--){let q=U==N.depth?0:N.pos<=(N.start(U+1)+N.end(U+1))/2?-1:1,Y=N.index(U)+(q>0?1:0),K=N.node(U),G=!1;if(j==1)G=K.canReplace(Y,Y,B);else{let J=K.contentMatchAt(Y).findWrapping(B.firstChild.type);G=J&&K.canReplaceWith(Y,Y,J[0])}if(G)return q==0?N.pos:q<0?N.before(U+1):N.after(U+1)}return null}function replaceStep(M,$,I=$,N=Slice.empty){if($==I&&!N.size)return null;let B=M.resolve($),j=M.resolve(I);return fitsTrivially(B,j,N)?new ReplaceStep($,I,N):new Fitter(B,j,N).fit()}function fitsTrivially(M,$,I){return!I.openStart&&!I.openEnd&&M.start()==$.start()&&M.parent.canReplace(M.index(),$.index(),I.content)}class Fitter{constructor($,I,N){this.$from=$,this.$to=I,this.unplaced=N,this.frontier=[],this.placed=Fragment.empty;for(let B=0;B<=$.depth;B++){let j=$.node(B);this.frontier.push({type:j.type,match:j.contentMatchAt($.indexAfter(B))})}for(let B=$.depth;B>0;B--)this.placed=Fragment.from($.node(B).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let K=this.findFittable();K?this.placeNodes(K):this.openMore()||this.dropNode()}let $=this.mustMoveInline(),I=this.placed.size-this.depth-this.$from.depth,N=this.$from,B=this.close($<0?this.$to:N.doc.resolve($));if(!B)return null;let j=this.placed,U=N.depth,q=B.depth;for(;U&&q&&j.childCount==1;)j=j.firstChild.content,U--,q--;let Y=new Slice(j,U,q);return $>-1?new ReplaceAroundStep(N.pos,$,this.$to.pos,this.$to.end(),Y,I):Y.size||N.pos!=this.$to.pos?new ReplaceStep(N.pos,B.pos,Y):null}findFittable(){let $=this.unplaced.openStart;for(let I=this.unplaced.content,N=0,B=this.unplaced.openEnd;N<$;N++){let j=I.firstChild;if(I.childCount>1&&(B=0),j.type.spec.isolating&&B<=N){$=N;break}I=j.content}for(let I=1;I<=2;I++)for(let N=I==1?$:this.unplaced.openStart;N>=0;N--){let B,j=null;N?(j=contentAt(this.unplaced.content,N-1).firstChild,B=j.content):B=this.unplaced.content;let U=B.firstChild;for(let q=this.depth;q>=0;q--){let{type:Y,match:K}=this.frontier[q],G,J=null;if(I==1&&(U?K.matchType(U.type)||(J=K.fillBefore(Fragment.from(U),!1)):j&&Y.compatibleContent(j.type)))return{sliceDepth:N,frontierDepth:q,parent:j,inject:J};if(I==2&&U&&(G=K.findWrapping(U.type)))return{sliceDepth:N,frontierDepth:q,parent:j,wrap:G};if(j&&K.matchType(j.type))break}}}openMore(){let{content:$,openStart:I,openEnd:N}=this.unplaced,B=contentAt($,I);return!B.childCount||B.firstChild.isLeaf?!1:(this.unplaced=new Slice($,I+1,Math.max(N,B.size+I>=$.size-N?I+1:0)),!0)}dropNode(){let{content:$,openStart:I,openEnd:N}=this.unplaced,B=contentAt($,I);if(B.childCount<=1&&I>0){let j=$.size-I<=I+B.size;this.unplaced=new Slice(dropFromFragment($,I-1,1),I-1,j?I-1:N)}else this.unplaced=new Slice(dropFromFragment($,I,1),I,N)}placeNodes({sliceDepth:$,frontierDepth:I,parent:N,inject:B,wrap:j}){for(;this.depth>I;)this.closeFrontierNode();if(j)for(let se=0;se1||Y==0||se.content.size)&&(J=re,G.push(closeNodeStart(se.mark(Z.allowedMarks(se.marks)),K==1?Y:0,K==q.childCount?ee:-1)))}let te=K==q.childCount;te||(ee=-1),this.placed=addToFragment(this.placed,I,Fragment.from(G)),this.frontier[I].match=J,te&&ee<0&&N&&N.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let se=0,re=q;se1&&B==this.$to.end(--N);)++B;return B}findCloseLevel($){e:for(let I=Math.min(this.depth,$.depth);I>=0;I--){let{match:N,type:B}=this.frontier[I],j=I<$.depth&&$.end(I+1)==$.pos+($.depth-(I+1)),U=contentAfterFits($,I,B,N,j);if(U){for(let q=I-1;q>=0;q--){let{match:Y,type:K}=this.frontier[q],G=contentAfterFits($,q,K,Y,!0);if(!G||G.childCount)continue e}return{depth:I,fit:U,move:j?$.doc.resolve($.after(I+1)):$}}}}close($){let I=this.findCloseLevel($);if(!I)return null;for(;this.depth>I.depth;)this.closeFrontierNode();I.fit.childCount&&(this.placed=addToFragment(this.placed,I.depth,I.fit)),$=I.move;for(let N=I.depth+1;N<=$.depth;N++){let B=$.node(N),j=B.type.contentMatch.fillBefore(B.content,!0,$.index(N));this.openFrontierNode(B.type,B.attrs,j)}return $}openFrontierNode($,I=null,N){let B=this.frontier[this.depth];B.match=B.match.matchType($),this.placed=addToFragment(this.placed,this.depth,Fragment.from($.create(I,N))),this.frontier.push({type:$,match:$.contentMatch})}closeFrontierNode(){let I=this.frontier.pop().match.fillBefore(Fragment.empty,!0);I.childCount&&(this.placed=addToFragment(this.placed,this.frontier.length,I))}}function dropFromFragment(M,$,I){return $==0?M.cutByIndex(I,M.childCount):M.replaceChild(0,M.firstChild.copy(dropFromFragment(M.firstChild.content,$-1,I)))}function addToFragment(M,$,I){return $==0?M.append(I):M.replaceChild(M.childCount-1,M.lastChild.copy(addToFragment(M.lastChild.content,$-1,I)))}function contentAt(M,$){for(let I=0;I<$;I++)M=M.firstChild.content;return M}function closeNodeStart(M,$,I){if($<=0)return M;let N=M.content;return $>1&&(N=N.replaceChild(0,closeNodeStart(N.firstChild,$-1,N.childCount==1?I-1:0))),$>0&&(N=M.type.contentMatch.fillBefore(N).append(N),I<=0&&(N=N.append(M.type.contentMatch.matchFragment(N).fillBefore(Fragment.empty,!0)))),M.copy(N)}function contentAfterFits(M,$,I,N,B){let j=M.node($),U=B?M.indexAfter($):M.index($);if(U==j.childCount&&!I.compatibleContent(j.type))return null;let q=N.fillBefore(j.content,!0,U);return q&&!invalidMarks(I,j.content,U)?q:null}function invalidMarks(M,$,I){for(let N=I;N<$.childCount;N++)if(!M.allowsMarks($.child(N).marks))return!0;return!1}function definesContent(M){return M.spec.defining||M.spec.definingForContent}function replaceRange(M,$,I,N){if(!N.size)return M.deleteRange($,I);let B=M.doc.resolve($),j=M.doc.resolve(I);if(fitsTrivially(B,j,N))return M.step(new ReplaceStep($,I,N));let U=coveredDepths(B,M.doc.resolve(I));U[U.length-1]==0&&U.pop();let q=-(B.depth+1);U.unshift(q);for(let Z=B.depth,ee=B.pos-1;Z>0;Z--,ee--){let te=B.node(Z).type.spec;if(te.defining||te.definingAsContext||te.isolating)break;U.indexOf(Z)>-1?q=Z:B.before(Z)==ee&&U.splice(1,0,-Z)}let Y=U.indexOf(q),K=[],G=N.openStart;for(let Z=N.content,ee=0;;ee++){let te=Z.firstChild;if(K.push(te),ee==N.openStart)break;Z=te.content}for(let Z=G-1;Z>=0;Z--){let ee=K[Z],te=definesContent(ee.type);if(te&&!ee.sameMarkup(B.node(Math.abs(q)-1)))G=Z;else if(te||!ee.type.isTextblock)break}for(let Z=N.openStart;Z>=0;Z--){let ee=(Z+G+1)%(N.openStart+1),te=K[ee];if(te)for(let se=0;se=0&&(M.replace($,I,N),!(M.steps.length>J));Z--){let ee=U[Z];ee<0||($=B.before(ee),I=j.after(ee))}}function closeFragment(M,$,I,N,B){if($N){let j=B.contentMatchAt(0),U=j.fillBefore(M).append(M);M=U.append(j.matchFragment(U).fillBefore(Fragment.empty,!0))}return M}function replaceRangeWith(M,$,I,N){if(!N.isInline&&$==I&&M.doc.resolve($).parent.content.size){let B=insertPoint(M.doc,$,N.type);B!=null&&($=I=B)}M.replaceRange($,I,new Slice(Fragment.from(N),0,0))}function deleteRange$1(M,$,I){let N=M.doc.resolve($),B=M.doc.resolve(I),j=coveredDepths(N,B);for(let U=0;U0&&(Y||N.node(q-1).canReplace(N.index(q-1),B.indexAfter(q-1))))return M.delete(N.before(q),B.after(q))}for(let U=1;U<=N.depth&&U<=B.depth;U++)if($-N.start(U)==N.depth-U&&I>N.end(U)&&B.end(U)-I!=B.depth-U)return M.delete(N.before(U),I);M.delete($,I)}function coveredDepths(M,$){let I=[],N=Math.min(M.depth,$.depth);for(let B=N;B>=0;B--){let j=M.start(B);if(j$.pos+($.depth-B)||M.node(B).type.spec.isolating||$.node(B).type.spec.isolating)break;(j==$.start(B)||B==M.depth&&B==$.depth&&M.parent.inlineContent&&$.parent.inlineContent&&B&&$.start(B-1)==j-1)&&I.push(B)}return I}class AttrStep extends Step{constructor($,I,N){super(),this.pos=$,this.attr=I,this.value=N}apply($){let I=$.nodeAt(this.pos);if(!I)return StepResult.fail("No node at attribute step's position");let N=Object.create(null);for(let j in I.attrs)N[j]=I.attrs[j];N[this.attr]=this.value;let B=I.type.create(N,null,I.marks);return StepResult.fromReplace($,this.pos,this.pos+1,new Slice(Fragment.from(B),0,I.isLeaf?0:1))}getMap(){return StepMap.empty}invert($){return new AttrStep(this.pos,this.attr,$.nodeAt(this.pos).attrs[this.attr])}map($){let I=$.mapResult(this.pos,1);return I.deletedAfter?null:new AttrStep(I.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON($,I){if(typeof I.pos!="number"||typeof I.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new AttrStep(I.pos,I.attr,I.value)}}Step.jsonID("attr",AttrStep);class DocAttrStep extends Step{constructor($,I){super(),this.attr=$,this.value=I}apply($){let I=Object.create(null);for(let B in $.attrs)I[B]=$.attrs[B];I[this.attr]=this.value;let N=$.type.create(I,$.content,$.marks);return StepResult.ok(N)}getMap(){return StepMap.empty}invert($){return new DocAttrStep(this.attr,$.attrs[this.attr])}map($){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON($,I){if(typeof I.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new DocAttrStep(I.attr,I.value)}}Step.jsonID("docAttr",DocAttrStep);let TransformError=class extends Error{};TransformError=function M($){let I=Error.call(this,$);return I.__proto__=M.prototype,I};TransformError.prototype=Object.create(Error.prototype);TransformError.prototype.constructor=TransformError;TransformError.prototype.name="TransformError";class Transform{constructor($){this.doc=$,this.steps=[],this.docs=[],this.mapping=new Mapping}get before(){return this.docs.length?this.docs[0]:this.doc}step($){let I=this.maybeStep($);if(I.failed)throw new TransformError(I.failed);return this}maybeStep($){let I=$.apply(this.doc);return I.failed||this.addStep($,I.doc),I}get docChanged(){return this.steps.length>0}addStep($,I){this.docs.push(this.doc),this.steps.push($),this.mapping.appendMap($.getMap()),this.doc=I}replace($,I=$,N=Slice.empty){let B=replaceStep(this.doc,$,I,N);return B&&this.step(B),this}replaceWith($,I,N){return this.replace($,I,new Slice(Fragment.from(N),0,0))}delete($,I){return this.replace($,I,Slice.empty)}insert($,I){return this.replaceWith($,$,I)}replaceRange($,I,N){return replaceRange(this,$,I,N),this}replaceRangeWith($,I,N){return replaceRangeWith(this,$,I,N),this}deleteRange($,I){return deleteRange$1(this,$,I),this}lift($,I){return lift$2(this,$,I),this}join($,I=1){return join(this,$,I),this}wrap($,I){return wrap$1(this,$,I),this}setBlockType($,I=$,N,B=null){return setBlockType$1(this,$,I,N,B),this}setNodeMarkup($,I,N=null,B){return setNodeMarkup(this,$,I,N,B),this}setNodeAttribute($,I,N){return this.step(new AttrStep($,I,N)),this}setDocAttribute($,I){return this.step(new DocAttrStep($,I)),this}addNodeMark($,I){return this.step(new AddNodeMarkStep($,I)),this}removeNodeMark($,I){if(!(I instanceof Mark$1)){let N=this.doc.nodeAt($);if(!N)throw new RangeError("No node at position "+$);if(I=I.isInSet(N.marks),!I)return this}return this.step(new RemoveNodeMarkStep($,I)),this}split($,I=1,N){return split(this,$,I,N),this}addMark($,I,N){return addMark(this,$,I,N),this}removeMark($,I,N){return removeMark(this,$,I,N),this}clearIncompatible($,I,N){return clearIncompatible(this,$,I,N),this}}const classesById=Object.create(null);class Selection{constructor($,I,N){this.$anchor=$,this.$head=I,this.ranges=N||[new SelectionRange($.min(I),$.max(I))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let $=this.ranges;for(let I=0;I<$.length;I++)if($[I].$from.pos!=$[I].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace($,I=Slice.empty){let N=I.content.lastChild,B=null;for(let q=0;q=0;j--){let U=I<0?findSelectionIn($.node(0),$.node(j),$.before(j+1),$.index(j),I,N):findSelectionIn($.node(0),$.node(j),$.after(j+1),$.index(j)+1,I,N);if(U)return U}return null}static near($,I=1){return this.findFrom($,I)||this.findFrom($,-I)||new AllSelection($.node(0))}static atStart($){return findSelectionIn($,$,0,0,1)||new AllSelection($)}static atEnd($){return findSelectionIn($,$,$.content.size,$.childCount,-1)||new AllSelection($)}static fromJSON($,I){if(!I||!I.type)throw new RangeError("Invalid input for Selection.fromJSON");let N=classesById[I.type];if(!N)throw new RangeError(`No selection type ${I.type} defined`);return N.fromJSON($,I)}static jsonID($,I){if($ in classesById)throw new RangeError("Duplicate use of selection JSON ID "+$);return classesById[$]=I,I.prototype.jsonID=$,I}getBookmark(){return TextSelection.between(this.$anchor,this.$head).getBookmark()}}Selection.prototype.visible=!0;class SelectionRange{constructor($,I){this.$from=$,this.$to=I}}let warnedAboutTextSelection=!1;function checkTextSelection(M){!warnedAboutTextSelection&&!M.parent.inlineContent&&(warnedAboutTextSelection=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+M.parent.type.name+")"))}class TextSelection extends Selection{constructor($,I=$){checkTextSelection($),checkTextSelection(I),super($,I)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map($,I){let N=$.resolve(I.map(this.head));if(!N.parent.inlineContent)return Selection.near(N);let B=$.resolve(I.map(this.anchor));return new TextSelection(B.parent.inlineContent?B:N,N)}replace($,I=Slice.empty){if(super.replace($,I),I==Slice.empty){let N=this.$from.marksAcross(this.$to);N&&$.ensureMarks(N)}}eq($){return $ instanceof TextSelection&&$.anchor==this.anchor&&$.head==this.head}getBookmark(){return new TextBookmark(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON($,I){if(typeof I.anchor!="number"||typeof I.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new TextSelection($.resolve(I.anchor),$.resolve(I.head))}static create($,I,N=I){let B=$.resolve(I);return new this(B,N==I?B:$.resolve(N))}static between($,I,N){let B=$.pos-I.pos;if((!N||B)&&(N=B>=0?1:-1),!I.parent.inlineContent){let j=Selection.findFrom(I,N,!0)||Selection.findFrom(I,-N,!0);if(j)I=j.$head;else return Selection.near(I,N)}return $.parent.inlineContent||(B==0?$=I:($=(Selection.findFrom($,-N,!0)||Selection.findFrom($,N,!0)).$anchor,$.pos0?0:1);B>0?U<$.childCount:U>=0;U+=B){let q=$.child(U);if(q.isAtom){if(!j&&NodeSelection.isSelectable(q))return NodeSelection.create(M,I-(B<0?q.nodeSize:0))}else{let Y=findSelectionIn(M,q,I+B,B<0?q.childCount:0,B,j);if(Y)return Y}I+=q.nodeSize*B}return null}function selectionToInsertionEnd$1(M,$,I){let N=M.steps.length-1;if(N<$)return;let B=M.steps[N];if(!(B instanceof ReplaceStep||B instanceof ReplaceAroundStep))return;let j=M.mapping.maps[N],U;j.forEach((q,Y,K,G)=>{U==null&&(U=G)}),M.setSelection(Selection.near(M.doc.resolve(U),I))}const UPDATED_SEL=1,UPDATED_MARKS=2,UPDATED_SCROLL=4;class Transaction extends Transform{constructor($){super($.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=$.selection,this.storedMarks=$.storedMarks}get selection(){return this.curSelectionFor0}setStoredMarks($){return this.storedMarks=$,this.updated|=UPDATED_MARKS,this}ensureMarks($){return Mark$1.sameSet(this.storedMarks||this.selection.$from.marks(),$)||this.setStoredMarks($),this}addStoredMark($){return this.ensureMarks($.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark($){return this.ensureMarks($.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&UPDATED_MARKS)>0}addStep($,I){super.addStep($,I),this.updated=this.updated&~UPDATED_MARKS,this.storedMarks=null}setTime($){return this.time=$,this}replaceSelection($){return this.selection.replace(this,$),this}replaceSelectionWith($,I=!0){let N=this.selection;return I&&($=$.mark(this.storedMarks||(N.empty?N.$from.marks():N.$from.marksAcross(N.$to)||Mark$1.none))),N.replaceWith(this,$),this}deleteSelection(){return this.selection.replace(this),this}insertText($,I,N){let B=this.doc.type.schema;if(I==null)return $?this.replaceSelectionWith(B.text($),!0):this.deleteSelection();{if(N==null&&(N=I),N=N??I,!$)return this.deleteRange(I,N);let j=this.storedMarks;if(!j){let U=this.doc.resolve(I);j=N==I?U.marks():U.marksAcross(this.doc.resolve(N))}return this.replaceRangeWith(I,N,B.text($,j)),this.selection.empty||this.setSelection(Selection.near(this.selection.$to)),this}}setMeta($,I){return this.meta[typeof $=="string"?$:$.key]=I,this}getMeta($){return this.meta[typeof $=="string"?$:$.key]}get isGeneric(){for(let $ in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=UPDATED_SCROLL,this}get scrolledIntoView(){return(this.updated&UPDATED_SCROLL)>0}}function bind$7(M,$){return!$||!M?M:M.bind($)}class FieldDesc{constructor($,I,N){this.name=$,this.init=bind$7(I.init,N),this.apply=bind$7(I.apply,N)}}const baseFields=[new FieldDesc("doc",{init(M){return M.doc||M.schema.topNodeType.createAndFill()},apply(M){return M.doc}}),new FieldDesc("selection",{init(M,$){return M.selection||Selection.atStart($.doc)},apply(M){return M.selection}}),new FieldDesc("storedMarks",{init(M){return M.storedMarks||null},apply(M,$,I,N){return N.selection.$cursor?M.storedMarks:null}}),new FieldDesc("scrollToSelection",{init(){return 0},apply(M,$){return M.scrolledIntoView?$+1:$}})];class Configuration{constructor($,I){this.schema=$,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=baseFields.slice(),I&&I.forEach(N=>{if(this.pluginsByKey[N.key])throw new RangeError("Adding different instances of a keyed plugin ("+N.key+")");this.plugins.push(N),this.pluginsByKey[N.key]=N,N.spec.state&&this.fields.push(new FieldDesc(N.key,N.spec.state,N))})}}class EditorState{constructor($){this.config=$}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply($){return this.applyTransaction($).state}filterTransaction($,I=-1){for(let N=0;NN.toJSON())),$&&typeof $=="object")for(let N in $){if(N=="doc"||N=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let B=$[N],j=B.spec.state;j&&j.toJSON&&(I[N]=j.toJSON.call(B,this[B.key]))}return I}static fromJSON($,I,N){if(!I)throw new RangeError("Invalid input for EditorState.fromJSON");if(!$.schema)throw new RangeError("Required config field 'schema' missing");let B=new Configuration($.schema,$.plugins),j=new EditorState(B);return B.fields.forEach(U=>{if(U.name=="doc")j.doc=Node$2.fromJSON($.schema,I.doc);else if(U.name=="selection")j.selection=Selection.fromJSON(j.doc,I.selection);else if(U.name=="storedMarks")I.storedMarks&&(j.storedMarks=I.storedMarks.map($.schema.markFromJSON));else{if(N)for(let q in N){let Y=N[q],K=Y.spec.state;if(Y.key==U.name&&K&&K.fromJSON&&Object.prototype.hasOwnProperty.call(I,q)){j[U.name]=K.fromJSON.call(Y,$,I[q],j);return}}j[U.name]=U.init($,j)}}),j}}function bindProps(M,$,I){for(let N in M){let B=M[N];B instanceof Function?B=B.bind($):N=="handleDOMEvents"&&(B=bindProps(B,$,{})),I[N]=B}return I}class Plugin{constructor($){this.spec=$,this.props={},$.props&&bindProps($.props,this,this.props),this.key=$.key?$.key.key:createKey("plugin")}getState($){return $[this.key]}}const keys$3=Object.create(null);function createKey(M){return M in keys$3?M+"$"+ ++keys$3[M]:(keys$3[M]=0,M+"$")}class PluginKey{constructor($="key"){this.key=createKey($)}get($){return $.config.pluginsByKey[this.key]}getState($){return $[this.key]}}const state=Object.freeze(Object.defineProperty({__proto__:null,AllSelection,EditorState,NodeSelection,Plugin,PluginKey,Selection,SelectionRange,TextSelection,Transaction},Symbol.toStringTag,{value:"Module"})),domIndex=function(M){for(var $=0;;$++)if(M=M.previousSibling,!M)return $},parentNode=function(M){let $=M.assignedSlot||M.parentNode;return $&&$.nodeType==11?$.host:$};let reusedRange=null;const textRange=function(M,$,I){let N=reusedRange||(reusedRange=document.createRange());return N.setEnd(M,I??M.nodeValue.length),N.setStart(M,$||0),N},clearReusedRange=function(){reusedRange=null},isEquivalentPosition=function(M,$,I,N){return I&&(scanFor(M,$,I,N,-1)||scanFor(M,$,I,N,1))},atomElements=/^(img|br|input|textarea|hr)$/i;function scanFor(M,$,I,N,B){for(;;){if(M==I&&$==N)return!0;if($==(B<0?0:nodeSize(M))){let j=M.parentNode;if(!j||j.nodeType!=1||hasBlockDesc(M)||atomElements.test(M.nodeName)||M.contentEditable=="false")return!1;$=domIndex(M)+(B<0?0:1),M=j}else if(M.nodeType==1){if(M=M.childNodes[$+(B<0?-1:0)],M.contentEditable=="false")return!1;$=B<0?nodeSize(M):0}else return!1}}function nodeSize(M){return M.nodeType==3?M.nodeValue.length:M.childNodes.length}function textNodeBefore$1(M,$){for(;;){if(M.nodeType==3&&$)return M;if(M.nodeType==1&&$>0){if(M.contentEditable=="false")return null;M=M.childNodes[$-1],$=nodeSize(M)}else if(M.parentNode&&!hasBlockDesc(M))$=domIndex(M),M=M.parentNode;else return null}}function textNodeAfter$1(M,$){for(;;){if(M.nodeType==3&&$2),mac$3=ios||(nav?/Mac/.test(nav.platform):!1),windows=nav?/Win/.test(nav.platform):!1,android=/Android \d/.test(agent),webkit=!!doc&&"webkitFontSmoothing"in doc.documentElement.style,webkit_version=webkit?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function windowRect(M){let $=M.defaultView&&M.defaultView.visualViewport;return $?{left:0,right:$.width,top:0,bottom:$.height}:{left:0,right:M.documentElement.clientWidth,top:0,bottom:M.documentElement.clientHeight}}function getSide(M,$){return typeof M=="number"?M:M[$]}function clientRect(M){let $=M.getBoundingClientRect(),I=$.width/M.offsetWidth||1,N=$.height/M.offsetHeight||1;return{left:$.left,right:$.left+M.clientWidth*I,top:$.top,bottom:$.top+M.clientHeight*N}}function scrollRectIntoView(M,$,I){let N=M.someProp("scrollThreshold")||0,B=M.someProp("scrollMargin")||5,j=M.dom.ownerDocument;for(let U=I||M.dom;U;U=parentNode(U)){if(U.nodeType!=1)continue;let q=U,Y=q==j.body,K=Y?windowRect(j):clientRect(q),G=0,J=0;if($.topK.bottom-getSide(N,"bottom")&&(J=$.bottom-$.top>K.bottom-K.top?$.top+getSide(B,"top")-K.top:$.bottom-K.bottom+getSide(B,"bottom")),$.leftK.right-getSide(N,"right")&&(G=$.right-K.right+getSide(B,"right")),G||J)if(Y)j.defaultView.scrollBy(G,J);else{let Z=q.scrollLeft,ee=q.scrollTop;J&&(q.scrollTop+=J),G&&(q.scrollLeft+=G);let te=q.scrollLeft-Z,se=q.scrollTop-ee;$={left:$.left-te,top:$.top-se,right:$.right-te,bottom:$.bottom-se}}if(Y||/^(fixed|sticky)$/.test(getComputedStyle(U).position))break}}function storeScrollPos(M){let $=M.dom.getBoundingClientRect(),I=Math.max(0,$.top),N,B;for(let j=($.left+$.right)/2,U=I+1;U=I-20){N=q,B=Y.top;break}}return{refDOM:N,refTop:B,stack:scrollStack(M.dom)}}function scrollStack(M){let $=[],I=M.ownerDocument;for(let N=M;N&&($.push({dom:N,top:N.scrollTop,left:N.scrollLeft}),M!=I);N=parentNode(N));return $}function resetScrollPos({refDOM:M,refTop:$,stack:I}){let N=M?M.getBoundingClientRect().top:0;restoreScrollStack(I,N==0?0:N-$)}function restoreScrollStack(M,$){for(let I=0;I=q){U=Math.max(te.bottom,U),q=Math.min(te.top,q);let se=te.left>$.left?te.left-$.left:te.right<$.left?$.left-te.right:0;if(se=(te.left+te.right)/2?1:0));continue}}else te.top>$.top&&!Y&&te.left<=$.left&&te.right>=$.left&&(Y=G,K={left:Math.max(te.left,Math.min(te.right,$.left)),top:te.top});!I&&($.left>=te.right&&$.top>=te.top||$.left>=te.left&&$.top>=te.bottom)&&(j=J+1)}}return!I&&Y&&(I=Y,B=K,N=0),I&&I.nodeType==3?findOffsetInText(I,B):!I||N&&I.nodeType==1?{node:M,offset:j}:findOffsetInNode(I,B)}function findOffsetInText(M,$){let I=M.nodeValue.length,N=document.createRange();for(let B=0;B=(j.left+j.right)/2?1:0)}}return{node:M,offset:0}}function inRect(M,$){return M.left>=$.left-1&&M.left<=$.right+1&&M.top>=$.top-1&&M.top<=$.bottom+1}function targetKludge(M,$){let I=M.parentNode;return I&&/^li$/i.test(I.nodeName)&&$.left(U.left+U.right)/2?1:-1}return M.docView.posFromDOM(N,B,j)}function posFromCaret(M,$,I,N){let B=-1;for(let j=$,U=!1;j!=M.dom;){let q=M.docView.nearestDesc(j,!0);if(!q)return null;if(q.dom.nodeType==1&&(q.node.isBlock&&q.parent||!q.contentDOM)){let Y=q.dom.getBoundingClientRect();if(q.node.isBlock&&q.parent&&(!U&&Y.left>N.left||Y.top>N.top?B=q.posBefore:(!U&&Y.right-1?B:M.docView.posFromDOM($,I,-1)}function elementFromPoint(M,$,I){let N=M.childNodes.length;if(N&&I.top$.top&&B++}let K;webkit&&B&&N.nodeType==1&&(K=N.childNodes[B-1]).nodeType==1&&K.contentEditable=="false"&&K.getBoundingClientRect().top>=$.top&&B--,N==M.dom&&B==N.childNodes.length-1&&N.lastChild.nodeType==1&&$.top>N.lastChild.getBoundingClientRect().bottom?q=M.state.doc.content.size:(B==0||N.nodeType!=1||N.childNodes[B-1].nodeName!="BR")&&(q=posFromCaret(M,N,B,$))}q==null&&(q=posFromElement(M,U,$));let Y=M.docView.nearestDesc(U,!0);return{pos:q,inside:Y?Y.posAtStart-Y.border:-1}}function nonZero(M){return M.top=0&&B==N.nodeValue.length?(Y--,G=1):I<0?Y--:K++,flattenV(singleRect(textRange(N,Y,K),G),G<0)}if(!M.state.doc.resolve($-(j||0)).parent.inlineContent){if(j==null&&B&&(I<0||B==nodeSize(N))){let Y=N.childNodes[B-1];if(Y.nodeType==1)return flattenH(Y.getBoundingClientRect(),!1)}if(j==null&&B=0)}if(j==null&&B&&(I<0||B==nodeSize(N))){let Y=N.childNodes[B-1],K=Y.nodeType==3?textRange(Y,nodeSize(Y)-(U?0:1)):Y.nodeType==1&&(Y.nodeName!="BR"||!Y.nextSibling)?Y:null;if(K)return flattenV(singleRect(K,1),!1)}if(j==null&&B=0)}function flattenV(M,$){if(M.width==0)return M;let I=$?M.left:M.right;return{top:M.top,bottom:M.bottom,left:I,right:I}}function flattenH(M,$){if(M.height==0)return M;let I=$?M.top:M.bottom;return{top:I,bottom:I,left:M.left,right:M.right}}function withFlushedState(M,$,I){let N=M.state,B=M.root.activeElement;N!=$&&M.updateState($),B!=M.dom&&M.focus();try{return I()}finally{N!=$&&M.updateState(N),B!=M.dom&&B&&B.focus()}}function endOfTextblockVertical(M,$,I){let N=$.selection,B=I=="up"?N.$from:N.$to;return withFlushedState(M,$,()=>{let{node:j}=M.docView.domFromPos(B.pos,I=="up"?-1:1);for(;;){let q=M.docView.nearestDesc(j,!0);if(!q)break;if(q.node.isBlock){j=q.contentDOM||q.dom;break}j=q.dom.parentNode}let U=coordsAtPos(M,B.pos,1);for(let q=j.firstChild;q;q=q.nextSibling){let Y;if(q.nodeType==1)Y=q.getClientRects();else if(q.nodeType==3)Y=textRange(q,0,q.nodeValue.length).getClientRects();else continue;for(let K=0;KG.top+1&&(I=="up"?U.top-G.top>(G.bottom-U.top)*2:G.bottom-U.bottom>(U.bottom-G.top)*2))return!1}}return!0})}const maybeRTL=/[\u0590-\u08ac]/;function endOfTextblockHorizontal(M,$,I){let{$head:N}=$.selection;if(!N.parent.isTextblock)return!1;let B=N.parentOffset,j=!B,U=B==N.parent.content.size,q=M.domSelection();return q?!maybeRTL.test(N.parent.textContent)||!q.modify?I=="left"||I=="backward"?j:U:withFlushedState(M,$,()=>{let{focusNode:Y,focusOffset:K,anchorNode:G,anchorOffset:J}=M.domSelectionRange(),Z=q.caretBidiLevel;q.modify("move",I,"character");let ee=N.depth?M.docView.domAfterPos(N.before()):M.dom,{focusNode:te,focusOffset:se}=M.domSelectionRange(),re=te&&!ee.contains(te.nodeType==1?te:te.parentNode)||Y==te&&K==se;try{q.collapse(G,J),Y&&(Y!=G||K!=J)&&q.extend&&q.extend(Y,K)}catch{}return Z!=null&&(q.caretBidiLevel=Z),re}):N.pos==N.start()||N.pos==N.end()}let cachedState=null,cachedDir=null,cachedResult=!1;function endOfTextblock(M,$,I){return cachedState==$&&cachedDir==I?cachedResult:(cachedState=$,cachedDir=I,cachedResult=I=="up"||I=="down"?endOfTextblockVertical(M,$,I):endOfTextblockHorizontal(M,$,I))}const NOT_DIRTY=0,CHILD_DIRTY=1,CONTENT_DIRTY=2,NODE_DIRTY=3;class ViewDesc{constructor($,I,N,B){this.parent=$,this.children=I,this.dom=N,this.contentDOM=B,this.dirty=NOT_DIRTY,N.pmViewDesc=this}matchesWidget($){return!1}matchesMark($){return!1}matchesNode($,I,N){return!1}matchesHack($){return!1}parseRule(){return null}stopEvent($){return!1}get size(){let $=0;for(let I=0;IdomIndex(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))B=$.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(I==0)for(let j=$;;j=j.parentNode){if(j==this.dom){B=!1;break}if(j.previousSibling)break}if(B==null&&I==$.childNodes.length)for(let j=$;;j=j.parentNode){if(j==this.dom){B=!0;break}if(j.nextSibling)break}}return B??N>0?this.posAtEnd:this.posAtStart}nearestDesc($,I=!1){for(let N=!0,B=$;B;B=B.parentNode){let j=this.getDesc(B),U;if(j&&(!I||j.node))if(N&&(U=j.nodeDOM)&&!(U.nodeType==1?U.contains($.nodeType==1?$:$.parentNode):U==$))N=!1;else return j}}getDesc($){let I=$.pmViewDesc;for(let N=I;N;N=N.parent)if(N==this)return I}posFromDOM($,I,N){for(let B=$;B;B=B.parentNode){let j=this.getDesc(B);if(j)return j.localPosFromDOM($,I,N)}return-1}descAt($){for(let I=0,N=0;I$||U instanceof TrailingHackViewDesc){B=$-j;break}j=q}if(B)return this.children[N].domFromPos(B-this.children[N].border,I);for(let j;N&&!(j=this.children[N-1]).size&&j instanceof WidgetViewDesc&&j.side>=0;N--);if(I<=0){let j,U=!0;for(;j=N?this.children[N-1]:null,!(!j||j.dom.parentNode==this.contentDOM);N--,U=!1);return j&&I&&U&&!j.border&&!j.domAtom?j.domFromPos(j.size,I):{node:this.contentDOM,offset:j?domIndex(j.dom)+1:0}}else{let j,U=!0;for(;j=N=G&&I<=K-Y.border&&Y.node&&Y.contentDOM&&this.contentDOM.contains(Y.contentDOM))return Y.parseRange($,I,G);$=U;for(let J=q;J>0;J--){let Z=this.children[J-1];if(Z.size&&Z.dom.parentNode==this.contentDOM&&!Z.emptyChildAt(1)){B=domIndex(Z.dom)+1;break}$-=Z.size}B==-1&&(B=0)}if(B>-1&&(K>I||q==this.children.length-1)){I=K;for(let G=q+1;Gee&&UI){let ee=q;q=Y,Y=ee}let Z=document.createRange();Z.setEnd(Y.node,Y.offset),Z.setStart(q.node,q.offset),K.removeAllRanges(),K.addRange(Z)}}ignoreMutation($){return!this.contentDOM&&$.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty($,I){for(let N=0,B=0;B=N:$N){let q=N+j.border,Y=U-j.border;if($>=q&&I<=Y){this.dirty=$==N||I==U?CONTENT_DIRTY:CHILD_DIRTY,$==q&&I==Y&&(j.contentLost||j.dom.parentNode!=this.contentDOM)?j.dirty=NODE_DIRTY:j.markDirty($-q,I-q);return}else j.dirty=j.dom==j.contentDOM&&j.dom.parentNode==this.contentDOM&&!j.children.length?CONTENT_DIRTY:NODE_DIRTY}N=U}this.dirty=CONTENT_DIRTY}markParentsDirty(){let $=1;for(let I=this.parent;I;I=I.parent,$++){let N=$==1?CONTENT_DIRTY:CHILD_DIRTY;I.dirty{if(!j)return B;if(j.parent)return j.parent.posBeforeChild(j)})),!I.type.spec.raw){if(U.nodeType!=1){let q=document.createElement("span");q.appendChild(U),U=q}U.contentEditable="false",U.classList.add("ProseMirror-widget")}super($,[],U,null),this.widget=I,this.widget=I,j=this}matchesWidget($){return this.dirty==NOT_DIRTY&&$.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent($){let I=this.widget.spec.stopEvent;return I?I($):!1}ignoreMutation($){return $.type!="selection"||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get side(){return this.widget.type.side}}class CompositionViewDesc extends ViewDesc{constructor($,I,N,B){super($,[],I,null),this.textDOM=N,this.text=B}get size(){return this.text.length}localPosFromDOM($,I){return $!=this.textDOM?this.posAtStart+(I?this.size:0):this.posAtStart+I}domFromPos($){return{node:this.textDOM,offset:$}}ignoreMutation($){return $.type==="characterData"&&$.target.nodeValue==$.oldValue}}class MarkViewDesc extends ViewDesc{constructor($,I,N,B){super($,[],N,B),this.mark=I}static create($,I,N,B){let j=B.nodeViews[I.type.name],U=j&&j(I,B,N);return(!U||!U.dom)&&(U=DOMSerializer.renderSpec(document,I.type.spec.toDOM(I,N),null,I.attrs)),new MarkViewDesc($,I,U.dom,U.contentDOM||U.dom)}parseRule(){return this.dirty&NODE_DIRTY||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark($){return this.dirty!=NODE_DIRTY&&this.mark.eq($)}markDirty($,I){if(super.markDirty($,I),this.dirty!=NOT_DIRTY){let N=this.parent;for(;!N.node;)N=N.parent;N.dirty0&&(j=replaceNodes(j,0,$,N));for(let q=0;q{if(!Y)return U;if(Y.parent)return Y.parent.posBeforeChild(Y)},N,B),G=K&&K.dom,J=K&&K.contentDOM;if(I.isText){if(!G)G=document.createTextNode(I.text);else if(G.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else G||({dom:G,contentDOM:J}=DOMSerializer.renderSpec(document,I.type.spec.toDOM(I),null,I.attrs));!J&&!I.isText&&G.nodeName!="BR"&&(G.hasAttribute("contenteditable")||(G.contentEditable="false"),I.type.spec.draggable&&(G.draggable=!0));let Z=G;return G=applyOuterDeco(G,N,I),K?Y=new CustomNodeViewDesc($,I,N,B,G,J||null,Z,K,j,U+1):I.isText?new TextViewDesc($,I,N,B,G,Z,j):new NodeViewDesc($,I,N,B,G,J||null,Z,j,U+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let $={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&($.preserveWhitespace="full"),!this.contentDOM)$.getContent=()=>this.node.content;else if(!this.contentLost)$.contentElement=this.contentDOM;else{for(let I=this.children.length-1;I>=0;I--){let N=this.children[I];if(this.dom.contains(N.dom.parentNode)){$.contentElement=N.dom.parentNode;break}}$.contentElement||($.getContent=()=>Fragment.empty)}return $}matchesNode($,I,N){return this.dirty==NOT_DIRTY&&$.eq(this.node)&&sameOuterDeco(I,this.outerDeco)&&N.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren($,I){let N=this.node.inlineContent,B=I,j=$.composing?this.localCompositionInfo($,I):null,U=j&&j.pos>-1?j:null,q=j&&j.pos<0,Y=new ViewTreeUpdater(this,U&&U.node,$);iterDeco(this.node,this.innerDeco,(K,G,J)=>{K.spec.marks?Y.syncToMarks(K.spec.marks,N,$):K.type.side>=0&&!J&&Y.syncToMarks(G==this.node.childCount?Mark$1.none:this.node.child(G).marks,N,$),Y.placeWidget(K,$,B)},(K,G,J,Z)=>{Y.syncToMarks(K.marks,N,$);let ee;Y.findNodeMatch(K,G,J,Z)||q&&$.state.selection.from>B&&$.state.selection.to-1&&Y.updateNodeAt(K,G,J,ee,$)||Y.updateNextNode(K,G,J,$,Z,B)||Y.addNode(K,G,J,$,B),B+=K.nodeSize}),Y.syncToMarks([],N,$),this.node.isTextblock&&Y.addTextblockHacks(),Y.destroyRest(),(Y.changed||this.dirty==CONTENT_DIRTY)&&(U&&this.protectLocalComposition($,U),renderDescs(this.contentDOM,this.children,$),ios&&iosHacks(this.dom))}localCompositionInfo($,I){let{from:N,to:B}=$.state.selection;if(!($.state.selection instanceof TextSelection)||NI+this.node.content.size)return null;let j=$.input.compositionNode;if(!j||!this.dom.contains(j.parentNode))return null;if(this.node.inlineContent){let U=j.nodeValue,q=findTextInFragment(this.node.content,U,N-I,B-I);return q<0?null:{node:j,pos:q,text:U}}else return{node:j,pos:-1,text:""}}protectLocalComposition($,{node:I,pos:N,text:B}){if(this.getDesc(I))return;let j=I;for(;j.parentNode!=this.contentDOM;j=j.parentNode){for(;j.previousSibling;)j.parentNode.removeChild(j.previousSibling);for(;j.nextSibling;)j.parentNode.removeChild(j.nextSibling);j.pmViewDesc&&(j.pmViewDesc=void 0)}let U=new CompositionViewDesc(this,j,I,B);$.input.compositionNodes.push(U),this.children=replaceNodes(this.children,N,N+B.length,$,U)}update($,I,N,B){return this.dirty==NODE_DIRTY||!$.sameMarkup(this.node)?!1:(this.updateInner($,I,N,B),!0)}updateInner($,I,N,B){this.updateOuterDeco(I),this.node=$,this.innerDeco=N,this.contentDOM&&this.updateChildren(B,this.posAtStart),this.dirty=NOT_DIRTY}updateOuterDeco($){if(sameOuterDeco($,this.outerDeco))return;let I=this.nodeDOM.nodeType!=1,N=this.dom;this.dom=patchOuterDeco(this.dom,this.nodeDOM,computeOuterDeco(this.outerDeco,this.node,I),computeOuterDeco($,this.node,I)),this.dom!=N&&(N.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=$}selectNode(){this.nodeDOM.nodeType==1&&this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.dom.draggable=!0)}deselectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.dom.removeAttribute("draggable"))}get domAtom(){return this.node.isAtom}}function docViewDesc(M,$,I,N,B){applyOuterDeco(N,$,M);let j=new NodeViewDesc(void 0,M,$,I,N,N,N,B,0);return j.contentDOM&&j.updateChildren(B,0),j}class TextViewDesc extends NodeViewDesc{constructor($,I,N,B,j,U,q){super($,I,N,B,j,null,U,q,0)}parseRule(){let $=this.nodeDOM.parentNode;for(;$&&$!=this.dom&&!$.pmIsDeco;)$=$.parentNode;return{skip:$||!0}}update($,I,N,B){return this.dirty==NODE_DIRTY||this.dirty!=NOT_DIRTY&&!this.inParent()||!$.sameMarkup(this.node)?!1:(this.updateOuterDeco(I),(this.dirty!=NOT_DIRTY||$.text!=this.node.text)&&$.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=$.text,B.trackWrites==this.nodeDOM&&(B.trackWrites=null)),this.node=$,this.dirty=NOT_DIRTY,!0)}inParent(){let $=this.parent.contentDOM;for(let I=this.nodeDOM;I;I=I.parentNode)if(I==$)return!0;return!1}domFromPos($){return{node:this.nodeDOM,offset:$}}localPosFromDOM($,I,N){return $==this.nodeDOM?this.posAtStart+Math.min(I,this.node.text.length):super.localPosFromDOM($,I,N)}ignoreMutation($){return $.type!="characterData"&&$.type!="selection"}slice($,I,N){let B=this.node.cut($,I),j=document.createTextNode(B.text);return new TextViewDesc(this.parent,B,this.outerDeco,this.innerDeco,j,j,N)}markDirty($,I){super.markDirty($,I),this.dom!=this.nodeDOM&&($==0||I==this.nodeDOM.nodeValue.length)&&(this.dirty=NODE_DIRTY)}get domAtom(){return!1}isText($){return this.node.text==$}}class TrailingHackViewDesc extends ViewDesc{parseRule(){return{ignore:!0}}matchesHack($){return this.dirty==NOT_DIRTY&&this.dom.nodeName==$}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class CustomNodeViewDesc extends NodeViewDesc{constructor($,I,N,B,j,U,q,Y,K,G){super($,I,N,B,j,U,q,K,G),this.spec=Y}update($,I,N,B){if(this.dirty==NODE_DIRTY)return!1;if(this.spec.update){let j=this.spec.update($,I,N);return j&&this.updateInner($,I,N,B),j}else return!this.contentDOM&&!$.isLeaf?!1:super.update($,I,N,B)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection($,I,N,B){this.spec.setSelection?this.spec.setSelection($,I,N):super.setSelection($,I,N,B)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent($){return this.spec.stopEvent?this.spec.stopEvent($):!1}ignoreMutation($){return this.spec.ignoreMutation?this.spec.ignoreMutation($):super.ignoreMutation($)}}function renderDescs(M,$,I){let N=M.firstChild,B=!1;for(let j=0;j<$.length;j++){let U=$[j],q=U.dom;if(q.parentNode==M){for(;q!=N;)N=rm(N),B=!0;N=N.nextSibling}else B=!0,M.insertBefore(q,N);if(U instanceof MarkViewDesc){let Y=N?N.previousSibling:M.lastChild;renderDescs(U.contentDOM,U.children,I),N=Y?Y.nextSibling:M.firstChild}}for(;N;)N=rm(N),B=!0;B&&I.trackWrites==M&&(I.trackWrites=null)}const OuterDecoLevel=function(M){M&&(this.nodeName=M)};OuterDecoLevel.prototype=Object.create(null);const noDeco=[new OuterDecoLevel];function computeOuterDeco(M,$,I){if(M.length==0)return noDeco;let N=I?noDeco[0]:new OuterDecoLevel,B=[N];for(let j=0;j>1,U=Math.min(j,$.length);for(;B-1)q>this.index&&(this.changed=!0,this.destroyBetween(this.index,q)),this.top=this.top.children[this.index];else{let Y=MarkViewDesc.create(this.top,$[j],I,N);this.top.children.splice(this.index,0,Y),this.top=Y,this.changed=!0}this.index=0,j++}}findNodeMatch($,I,N,B){let j=-1,U;if(B>=this.preMatch.index&&(U=this.preMatch.matches[B-this.preMatch.index]).parent==this.top&&U.matchesNode($,I,N))j=this.top.children.indexOf(U,this.index);else for(let q=this.index,Y=Math.min(this.top.children.length,q+5);q0;){let q;for(;;)if(N){let K=I.children[N-1];if(K instanceof MarkViewDesc)I=K,N=K.children.length;else{q=K,N--;break}}else{if(I==$)break e;N=I.parent.children.indexOf(I),I=I.parent}let Y=q.node;if(Y){if(Y!=M.child(B-1))break;--B,j.set(q,B),U.push(q)}}return{index:B,matched:j,matches:U.reverse()}}function compareSide(M,$){return M.type.side-$.type.side}function iterDeco(M,$,I,N){let B=$.locals(M),j=0;if(B.length==0){for(let K=0;Kj;)q.push(B[U++]);let te=j+Z.nodeSize;if(Z.isText){let re=te;U!re.inline):q.slice();N(Z,se,$.forChild(j,Z),ee),j=te}}function iosHacks(M){if(M.nodeName=="UL"||M.nodeName=="OL"){let $=M.style.cssText;M.style.cssText=$+"; list-style: square !important",window.getComputedStyle(M).listStyle,M.style.cssText=$}}function findTextInFragment(M,$,I,N){for(let B=0,j=0;B=I){if(j>=N&&Y.slice(N-$.length-q,N-q)==$)return N-$.length;let K=q=0&&K+$.length+q>=I)return q+K;if(I==N&&Y.length>=N+$.length-q&&Y.slice(N-q,N-q+$.length)==$)return N}}return-1}function replaceNodes(M,$,I,N,B){let j=[];for(let U=0,q=0;U=I||G<=$?j.push(Y):(K<$&&j.push(Y.slice(0,$-K,N)),B&&(j.push(B),B=void 0),G>I&&j.push(Y.slice(I-K,Y.size,N)))}return j}function selectionFromDOM(M,$=null){let I=M.domSelectionRange(),N=M.state.doc;if(!I.focusNode)return null;let B=M.docView.nearestDesc(I.focusNode),j=B&&B.size==0,U=M.docView.posFromDOM(I.focusNode,I.focusOffset,1);if(U<0)return null;let q=N.resolve(U),Y,K;if(selectionCollapsed(I)){for(Y=U;B&&!B.node;)B=B.parent;let J=B.node;if(B&&J.isAtom&&NodeSelection.isSelectable(J)&&B.parent&&!(J.isInline&&isOnEdge(I.focusNode,I.focusOffset,B.dom))){let Z=B.posBefore;K=new NodeSelection(U==Z?q:N.resolve(Z))}}else{if(I instanceof M.dom.ownerDocument.defaultView.Selection&&I.rangeCount>1){let J=U,Z=U;for(let ee=0;ee{(I.anchorNode!=N||I.anchorOffset!=B)&&($.removeEventListener("selectionchange",M.input.hideSelectionGuard),setTimeout(()=>{(!editorOwnsSelection(M)||M.state.selection.visible)&&M.dom.classList.remove("ProseMirror-hideselection")},20))})}function selectCursorWrapper(M){let $=M.domSelection(),I=document.createRange();if(!$)return;let N=M.cursorWrapper.dom,B=N.nodeName=="IMG";B?I.setStart(N.parentNode,domIndex(N)+1):I.setStart(N,0),I.collapse(!0),$.removeAllRanges(),$.addRange(I),!B&&!M.state.selection.visible&&ie$1&&ie_version<=11&&(N.disabled=!0,N.disabled=!1)}function syncNodeSelection(M,$){if($ instanceof NodeSelection){let I=M.docView.descAt($.from);I!=M.lastSelectedViewDesc&&(clearNodeSelection(M),I&&I.selectNode(),M.lastSelectedViewDesc=I)}else clearNodeSelection(M)}function clearNodeSelection(M){M.lastSelectedViewDesc&&(M.lastSelectedViewDesc.parent&&M.lastSelectedViewDesc.deselectNode(),M.lastSelectedViewDesc=void 0)}function selectionBetween(M,$,I,N){return M.someProp("createSelectionBetween",B=>B(M,$,I))||TextSelection.between($,I,N)}function hasFocusAndSelection(M){return M.editable&&!M.hasFocus()?!1:hasSelection(M)}function hasSelection(M){let $=M.domSelectionRange();if(!$.anchorNode)return!1;try{return M.dom.contains($.anchorNode.nodeType==3?$.anchorNode.parentNode:$.anchorNode)&&(M.editable||M.dom.contains($.focusNode.nodeType==3?$.focusNode.parentNode:$.focusNode))}catch{return!1}}function anchorInRightPlace(M){let $=M.docView.domFromPos(M.state.selection.anchor,0),I=M.domSelectionRange();return isEquivalentPosition($.node,$.offset,I.anchorNode,I.anchorOffset)}function moveSelectionBlock(M,$){let{$anchor:I,$head:N}=M.selection,B=$>0?I.max(N):I.min(N),j=B.parent.inlineContent?B.depth?M.doc.resolve($>0?B.after():B.before()):null:B;return j&&Selection.findFrom(j,$)}function apply(M,$){return M.dispatch(M.state.tr.setSelection($).scrollIntoView()),!0}function selectHorizontally(M,$,I){let N=M.state.selection;if(N instanceof TextSelection)if(I.indexOf("s")>-1){let{$head:B}=N,j=B.textOffset?null:$<0?B.nodeBefore:B.nodeAfter;if(!j||j.isText||!j.isLeaf)return!1;let U=M.state.doc.resolve(B.pos+j.nodeSize*($<0?-1:1));return apply(M,new TextSelection(N.$anchor,U))}else if(N.empty){if(M.endOfTextblock($>0?"forward":"backward")){let B=moveSelectionBlock(M.state,$);return B&&B instanceof NodeSelection?apply(M,B):!1}else if(!(mac$3&&I.indexOf("m")>-1)){let B=N.$head,j=B.textOffset?null:$<0?B.nodeBefore:B.nodeAfter,U;if(!j||j.isText)return!1;let q=$<0?B.pos-j.nodeSize:B.pos;return j.isAtom||(U=M.docView.descAt(q))&&!U.contentDOM?NodeSelection.isSelectable(j)?apply(M,new NodeSelection($<0?M.state.doc.resolve(B.pos-j.nodeSize):B)):webkit?apply(M,new TextSelection(M.state.doc.resolve($<0?q:q+j.nodeSize))):!1:!1}}else return!1;else{if(N instanceof NodeSelection&&N.node.isInline)return apply(M,new TextSelection($>0?N.$to:N.$from));{let B=moveSelectionBlock(M.state,$);return B?apply(M,B):!1}}}function nodeLen(M){return M.nodeType==3?M.nodeValue.length:M.childNodes.length}function isIgnorable(M,$){let I=M.pmViewDesc;return I&&I.size==0&&($<0||M.nextSibling||M.nodeName!="BR")}function skipIgnoredNodes(M,$){return $<0?skipIgnoredNodesBefore(M):skipIgnoredNodesAfter(M)}function skipIgnoredNodesBefore(M){let $=M.domSelectionRange(),I=$.focusNode,N=$.focusOffset;if(!I)return;let B,j,U=!1;for(gecko&&I.nodeType==1&&N0){if(I.nodeType!=1)break;{let q=I.childNodes[N-1];if(isIgnorable(q,-1))B=I,j=--N;else if(q.nodeType==3)I=q,N=I.nodeValue.length;else break}}else{if(isBlockNode(I))break;{let q=I.previousSibling;for(;q&&isIgnorable(q,-1);)B=I.parentNode,j=domIndex(q),q=q.previousSibling;if(q)I=q,N=nodeLen(I);else{if(I=I.parentNode,I==M.dom)break;N=0}}}U?setSelFocus(M,I,N):B&&setSelFocus(M,B,j)}function skipIgnoredNodesAfter(M){let $=M.domSelectionRange(),I=$.focusNode,N=$.focusOffset;if(!I)return;let B=nodeLen(I),j,U;for(;;)if(N{M.state==B&&selectionToDOM(M)},50)}function findDirection(M,$){let I=M.state.doc.resolve($);if(!(chrome||windows)&&I.parent.inlineContent){let B=M.coordsAtPos($);if($>I.start()){let j=M.coordsAtPos($-1),U=(j.top+j.bottom)/2;if(U>B.top&&U1)return j.leftB.top&&U1)return j.left>B.left?"ltr":"rtl"}}return getComputedStyle(M.dom).direction=="rtl"?"rtl":"ltr"}function selectVertically(M,$,I){let N=M.state.selection;if(N instanceof TextSelection&&!N.empty||I.indexOf("s")>-1||mac$3&&I.indexOf("m")>-1)return!1;let{$from:B,$to:j}=N;if(!B.parent.inlineContent||M.endOfTextblock($<0?"up":"down")){let U=moveSelectionBlock(M.state,$);if(U&&U instanceof NodeSelection)return apply(M,U)}if(!B.parent.inlineContent){let U=$<0?B:j,q=N instanceof AllSelection?Selection.near(U,$):Selection.findFrom(U,$);return q?apply(M,q):!1}return!1}function stopNativeHorizontalDelete(M,$){if(!(M.state.selection instanceof TextSelection))return!0;let{$head:I,$anchor:N,empty:B}=M.state.selection;if(!I.sameParent(N))return!0;if(!B)return!1;if(M.endOfTextblock($>0?"forward":"backward"))return!0;let j=!I.textOffset&&($<0?I.nodeBefore:I.nodeAfter);if(j&&!j.isText){let U=M.state.tr;return $<0?U.delete(I.pos-j.nodeSize,I.pos):U.delete(I.pos,I.pos+j.nodeSize),M.dispatch(U),!0}return!1}function switchEditable(M,$,I){M.domObserver.stop(),$.contentEditable=I,M.domObserver.start()}function safariDownArrowBug(M){if(!safari||M.state.selection.$head.parentOffset>0)return!1;let{focusNode:$,focusOffset:I}=M.domSelectionRange();if($&&$.nodeType==1&&I==0&&$.firstChild&&$.firstChild.contentEditable=="false"){let N=$.firstChild;switchEditable(M,N,"true"),setTimeout(()=>switchEditable(M,N,"false"),20)}return!1}function getMods(M){let $="";return M.ctrlKey&&($+="c"),M.metaKey&&($+="m"),M.altKey&&($+="a"),M.shiftKey&&($+="s"),$}function captureKeyDown(M,$){let I=$.keyCode,N=getMods($);if(I==8||mac$3&&I==72&&N=="c")return stopNativeHorizontalDelete(M,-1)||skipIgnoredNodes(M,-1);if(I==46&&!$.shiftKey||mac$3&&I==68&&N=="c")return stopNativeHorizontalDelete(M,1)||skipIgnoredNodes(M,1);if(I==13||I==27)return!0;if(I==37||mac$3&&I==66&&N=="c"){let B=I==37?findDirection(M,M.state.selection.from)=="ltr"?-1:1:-1;return selectHorizontally(M,B,N)||skipIgnoredNodes(M,B)}else if(I==39||mac$3&&I==70&&N=="c"){let B=I==39?findDirection(M,M.state.selection.from)=="ltr"?1:-1:1;return selectHorizontally(M,B,N)||skipIgnoredNodes(M,B)}else{if(I==38||mac$3&&I==80&&N=="c")return selectVertically(M,-1,N)||skipIgnoredNodes(M,-1);if(I==40||mac$3&&I==78&&N=="c")return safariDownArrowBug(M)||selectVertically(M,1,N)||skipIgnoredNodes(M,1);if(N==(mac$3?"m":"c")&&(I==66||I==73||I==89||I==90))return!0}return!1}function serializeForClipboard(M,$){M.someProp("transformCopied",ee=>{$=ee($,M)});let I=[],{content:N,openStart:B,openEnd:j}=$;for(;B>1&&j>1&&N.childCount==1&&N.firstChild.childCount==1;){B--,j--;let ee=N.firstChild;I.push(ee.type.name,ee.attrs!=ee.type.defaultAttrs?ee.attrs:null),N=ee.content}let U=M.someProp("clipboardSerializer")||DOMSerializer.fromSchema(M.state.schema),q=detachedDoc(),Y=q.createElement("div");Y.appendChild(U.serializeFragment(N,{document:q}));let K=Y.firstChild,G,J=0;for(;K&&K.nodeType==1&&(G=wrapMap[K.nodeName.toLowerCase()]);){for(let ee=G.length-1;ee>=0;ee--){let te=q.createElement(G[ee]);for(;Y.firstChild;)te.appendChild(Y.firstChild);Y.appendChild(te),J++}K=Y.firstChild}K&&K.nodeType==1&&K.setAttribute("data-pm-slice",`${B} ${j}${J?` -${J}`:""} ${JSON.stringify(I)}`);let Z=M.someProp("clipboardTextSerializer",ee=>ee($,M))||$.content.textBetween(0,$.content.size,` + +`);return{dom:Y,text:Z,slice:$}}function parseFromClipboard(M,$,I,N,B){let j=B.parent.type.spec.code,U,q;if(!I&&!$)return null;let Y=$&&(N||j||!I);if(Y){if(M.someProp("transformPastedText",Z=>{$=Z($,j||N,M)}),j)return $?new Slice(Fragment.from(M.state.schema.text($.replace(/\r\n?/g,` +`))),0,0):Slice.empty;let J=M.someProp("clipboardTextParser",Z=>Z($,B,N,M));if(J)q=J;else{let Z=B.marks(),{schema:ee}=M.state,te=DOMSerializer.fromSchema(ee);U=document.createElement("div"),$.split(/(?:\r\n?|\n)+/).forEach(se=>{let re=U.appendChild(document.createElement("p"));se&&re.appendChild(te.serializeNode(ee.text(se,Z)))})}}else M.someProp("transformPastedHTML",J=>{I=J(I,M)}),U=readHTML(I),webkit&&restoreReplacedSpaces(U);let K=U&&U.querySelector("[data-pm-slice]"),G=K&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(K.getAttribute("data-pm-slice")||"");if(G&&G[3])for(let J=+G[3];J>0;J--){let Z=U.firstChild;for(;Z&&Z.nodeType!=1;)Z=Z.nextSibling;if(!Z)break;U=Z}if(q||(q=(M.someProp("clipboardParser")||M.someProp("domParser")||DOMParser.fromSchema(M.state.schema)).parseSlice(U,{preserveWhitespace:!!(Y||G),context:B,ruleFromNode(Z){return Z.nodeName=="BR"&&!Z.nextSibling&&Z.parentNode&&!inlineParents.test(Z.parentNode.nodeName)?{ignore:!0}:null}})),G)q=addContext(closeSlice(q,+G[1],+G[2]),G[4]);else if(q=Slice.maxOpen(normalizeSiblings(q.content,B),!0),q.openStart||q.openEnd){let J=0,Z=0;for(let ee=q.content.firstChild;J{q=J(q,M)}),q}const inlineParents=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function normalizeSiblings(M,$){if(M.childCount<2)return M;for(let I=$.depth;I>=0;I--){let B=$.node(I).contentMatchAt($.index(I)),j,U=[];if(M.forEach(q=>{if(!U)return;let Y=B.findWrapping(q.type),K;if(!Y)return U=null;if(K=U.length&&j.length&&addToSibling(Y,j,q,U[U.length-1],0))U[U.length-1]=K;else{U.length&&(U[U.length-1]=closeRight(U[U.length-1],j.length));let G=withWrappers(q,Y);U.push(G),B=B.matchType(G.type),j=Y}}),U)return Fragment.from(U)}return M}function withWrappers(M,$,I=0){for(let N=$.length-1;N>=I;N--)M=$[N].create(null,Fragment.from(M));return M}function addToSibling(M,$,I,N,B){if(B1&&(j=0),B=I&&(q=$<0?U.contentMatchAt(0).fillBefore(q,j<=B).append(q):q.append(U.contentMatchAt(U.childCount).fillBefore(Fragment.empty,!0))),M.replaceChild($<0?0:M.childCount-1,U.copy(q))}function closeSlice(M,$,I){return $I}).createHTML(M):M}function readHTML(M){let $=/^(\s*]*>)*/.exec(M);$&&(M=M.slice($[0].length));let I=detachedDoc().createElement("div"),N=/<([a-z][^>\s]+)/i.exec(M),B;if((B=N&&wrapMap[N[1].toLowerCase()])&&(M=B.map(j=>"<"+j+">").join("")+M+B.map(j=>"").reverse().join("")),I.innerHTML=maybeWrapTrusted(M),B)for(let j=0;j=0;q-=2){let Y=I.nodes[N[q]];if(!Y||Y.hasRequiredAttrs())break;B=Fragment.from(Y.create(N[q+1],B)),j++,U++}return new Slice(B,j,U)}const handlers={},editHandlers={},passiveHandlers={touchstart:!0,touchmove:!0};class InputState{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:""},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastAndroidDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function initInput(M){for(let $ in handlers){let I=handlers[$];M.dom.addEventListener($,M.input.eventHandlers[$]=N=>{eventBelongsToView(M,N)&&!runCustomHandler(M,N)&&(M.editable||!(N.type in editHandlers))&&I(M,N)},passiveHandlers[$]?{passive:!0}:void 0)}safari&&M.dom.addEventListener("input",()=>null),ensureListeners(M)}function setSelectionOrigin(M,$){M.input.lastSelectionOrigin=$,M.input.lastSelectionTime=Date.now()}function destroyInput(M){M.domObserver.stop();for(let $ in M.input.eventHandlers)M.dom.removeEventListener($,M.input.eventHandlers[$]);clearTimeout(M.input.composingTimeout),clearTimeout(M.input.lastIOSEnterFallbackTimeout)}function ensureListeners(M){M.someProp("handleDOMEvents",$=>{for(let I in $)M.input.eventHandlers[I]||M.dom.addEventListener(I,M.input.eventHandlers[I]=N=>runCustomHandler(M,N))})}function runCustomHandler(M,$){return M.someProp("handleDOMEvents",I=>{let N=I[$.type];return N?N(M,$)||$.defaultPrevented:!1})}function eventBelongsToView(M,$){if(!$.bubbles)return!0;if($.defaultPrevented)return!1;for(let I=$.target;I!=M.dom;I=I.parentNode)if(!I||I.nodeType==11||I.pmViewDesc&&I.pmViewDesc.stopEvent($))return!1;return!0}function dispatchEvent(M,$){!runCustomHandler(M,$)&&handlers[$.type]&&(M.editable||!($.type in editHandlers))&&handlers[$.type](M,$)}editHandlers.keydown=(M,$)=>{let I=$;if(M.input.shiftKey=I.keyCode==16||I.shiftKey,!inOrNearComposition(M,I)&&(M.input.lastKeyCode=I.keyCode,M.input.lastKeyCodeTime=Date.now(),!(android&&chrome&&I.keyCode==13)))if(M.domObserver.selectionChanged(M.domSelectionRange())?M.domObserver.flush():I.keyCode!=229&&M.domObserver.forceFlush(),ios&&I.keyCode==13&&!I.ctrlKey&&!I.altKey&&!I.metaKey){let N=Date.now();M.input.lastIOSEnter=N,M.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{M.input.lastIOSEnter==N&&(M.someProp("handleKeyDown",B=>B(M,keyEvent(13,"Enter"))),M.input.lastIOSEnter=0)},200)}else M.someProp("handleKeyDown",N=>N(M,I))||captureKeyDown(M,I)?I.preventDefault():setSelectionOrigin(M,"key")};editHandlers.keyup=(M,$)=>{$.keyCode==16&&(M.input.shiftKey=!1)};editHandlers.keypress=(M,$)=>{let I=$;if(inOrNearComposition(M,I)||!I.charCode||I.ctrlKey&&!I.altKey||mac$3&&I.metaKey)return;if(M.someProp("handleKeyPress",B=>B(M,I))){I.preventDefault();return}let N=M.state.selection;if(!(N instanceof TextSelection)||!N.$from.sameParent(N.$to)){let B=String.fromCharCode(I.charCode);!/[\r\n]/.test(B)&&!M.someProp("handleTextInput",j=>j(M,N.$from.pos,N.$to.pos,B))&&M.dispatch(M.state.tr.insertText(B).scrollIntoView()),I.preventDefault()}};function eventCoords(M){return{left:M.clientX,top:M.clientY}}function isNear(M,$){let I=$.x-M.clientX,N=$.y-M.clientY;return I*I+N*N<100}function runHandlerOnContext(M,$,I,N,B){if(N==-1)return!1;let j=M.state.doc.resolve(N);for(let U=j.depth+1;U>0;U--)if(M.someProp($,q=>U>j.depth?q(M,I,j.nodeAfter,j.before(U),B,!0):q(M,I,j.node(U),j.before(U),B,!1)))return!0;return!1}function updateSelection(M,$,I){if(M.focused||M.focus(),M.state.selection.eq($))return;let N=M.state.tr.setSelection($);I=="pointer"&&N.setMeta("pointer",!0),M.dispatch(N)}function selectClickedLeaf(M,$){if($==-1)return!1;let I=M.state.doc.resolve($),N=I.nodeAfter;return N&&N.isAtom&&NodeSelection.isSelectable(N)?(updateSelection(M,new NodeSelection(I),"pointer"),!0):!1}function selectClickedNode(M,$){if($==-1)return!1;let I=M.state.selection,N,B;I instanceof NodeSelection&&(N=I.node);let j=M.state.doc.resolve($);for(let U=j.depth+1;U>0;U--){let q=U>j.depth?j.nodeAfter:j.node(U);if(NodeSelection.isSelectable(q)){N&&I.$from.depth>0&&U>=I.$from.depth&&j.before(I.$from.depth+1)==I.$from.pos?B=j.before(I.$from.depth):B=j.before(U);break}}return B!=null?(updateSelection(M,NodeSelection.create(M.state.doc,B),"pointer"),!0):!1}function handleSingleClick(M,$,I,N,B){return runHandlerOnContext(M,"handleClickOn",$,I,N)||M.someProp("handleClick",j=>j(M,$,N))||(B?selectClickedNode(M,I):selectClickedLeaf(M,I))}function handleDoubleClick(M,$,I,N){return runHandlerOnContext(M,"handleDoubleClickOn",$,I,N)||M.someProp("handleDoubleClick",B=>B(M,$,N))}function handleTripleClick$1(M,$,I,N){return runHandlerOnContext(M,"handleTripleClickOn",$,I,N)||M.someProp("handleTripleClick",B=>B(M,$,N))||defaultTripleClick(M,I,N)}function defaultTripleClick(M,$,I){if(I.button!=0)return!1;let N=M.state.doc;if($==-1)return N.inlineContent?(updateSelection(M,TextSelection.create(N,0,N.content.size),"pointer"),!0):!1;let B=N.resolve($);for(let j=B.depth+1;j>0;j--){let U=j>B.depth?B.nodeAfter:B.node(j),q=B.before(j);if(U.inlineContent)updateSelection(M,TextSelection.create(N,q+1,q+1+U.content.size),"pointer");else if(NodeSelection.isSelectable(U))updateSelection(M,NodeSelection.create(N,q),"pointer");else continue;return!0}}function forceDOMFlush(M){return endComposition(M)}const selectNodeModifier=mac$3?"metaKey":"ctrlKey";handlers.mousedown=(M,$)=>{let I=$;M.input.shiftKey=I.shiftKey;let N=forceDOMFlush(M),B=Date.now(),j="singleClick";B-M.input.lastClick.time<500&&isNear(I,M.input.lastClick)&&!I[selectNodeModifier]&&(M.input.lastClick.type=="singleClick"?j="doubleClick":M.input.lastClick.type=="doubleClick"&&(j="tripleClick")),M.input.lastClick={time:B,x:I.clientX,y:I.clientY,type:j};let U=M.posAtCoords(eventCoords(I));U&&(j=="singleClick"?(M.input.mouseDown&&M.input.mouseDown.done(),M.input.mouseDown=new MouseDown(M,U,I,!!N)):(j=="doubleClick"?handleDoubleClick:handleTripleClick$1)(M,U.pos,U.inside,I)?I.preventDefault():setSelectionOrigin(M,"pointer"))};class MouseDown{constructor($,I,N,B){this.view=$,this.pos=I,this.event=N,this.flushed=B,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=$.state.doc,this.selectNode=!!N[selectNodeModifier],this.allowDefault=N.shiftKey;let j,U;if(I.inside>-1)j=$.state.doc.nodeAt(I.inside),U=I.inside;else{let G=$.state.doc.resolve(I.pos);j=G.parent,U=G.depth?G.before():0}const q=B?null:N.target,Y=q?$.docView.nearestDesc(q,!0):null;this.target=Y&&Y.dom.nodeType==1?Y.dom:null;let{selection:K}=$.state;(N.button==0&&j.type.spec.draggable&&j.type.spec.selectable!==!1||K instanceof NodeSelection&&K.from<=U&&K.to>U)&&(this.mightDrag={node:j,pos:U,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&gecko&&!this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),$.root.addEventListener("mouseup",this.up=this.up.bind(this)),$.root.addEventListener("mousemove",this.move=this.move.bind(this)),setSelectionOrigin($,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>selectionToDOM(this.view)),this.view.input.mouseDown=null}up($){if(this.done(),!this.view.dom.contains($.target))return;let I=this.pos;this.view.state.doc!=this.startDoc&&(I=this.view.posAtCoords(eventCoords($))),this.updateAllowDefault($),this.allowDefault||!I?setSelectionOrigin(this.view,"pointer"):handleSingleClick(this.view,I.pos,I.inside,$,this.selectNode)?$.preventDefault():$.button==0&&(this.flushed||safari&&this.mightDrag&&!this.mightDrag.node.isAtom||chrome&&!this.view.state.selection.visible&&Math.min(Math.abs(I.pos-this.view.state.selection.from),Math.abs(I.pos-this.view.state.selection.to))<=2)?(updateSelection(this.view,Selection.near(this.view.state.doc.resolve(I.pos)),"pointer"),$.preventDefault()):setSelectionOrigin(this.view,"pointer")}move($){this.updateAllowDefault($),setSelectionOrigin(this.view,"pointer"),$.buttons==0&&this.done()}updateAllowDefault($){!this.allowDefault&&(Math.abs(this.event.x-$.clientX)>4||Math.abs(this.event.y-$.clientY)>4)&&(this.allowDefault=!0)}}handlers.touchstart=M=>{M.input.lastTouch=Date.now(),forceDOMFlush(M),setSelectionOrigin(M,"pointer")};handlers.touchmove=M=>{M.input.lastTouch=Date.now(),setSelectionOrigin(M,"pointer")};handlers.contextmenu=M=>forceDOMFlush(M);function inOrNearComposition(M,$){return M.composing?!0:safari&&Math.abs($.timeStamp-M.input.compositionEndedAt)<500?(M.input.compositionEndedAt=-2e8,!0):!1}const timeoutComposition=android?5e3:-1;editHandlers.compositionstart=editHandlers.compositionupdate=M=>{if(!M.composing){M.domObserver.flush();let{state:$}=M,I=$.selection.$to;if($.selection instanceof TextSelection&&($.storedMarks||!I.textOffset&&I.parentOffset&&I.nodeBefore.marks.some(N=>N.type.spec.inclusive===!1)))M.markCursor=M.state.storedMarks||I.marks(),endComposition(M,!0),M.markCursor=null;else if(endComposition(M,!$.selection.empty),gecko&&$.selection.empty&&I.parentOffset&&!I.textOffset&&I.nodeBefore.marks.length){let N=M.domSelectionRange();for(let B=N.focusNode,j=N.focusOffset;B&&B.nodeType==1&&j!=0;){let U=j<0?B.lastChild:B.childNodes[j-1];if(!U)break;if(U.nodeType==3){let q=M.domSelection();q&&q.collapse(U,U.nodeValue.length);break}else B=U,j=-1}}M.input.composing=!0}scheduleComposeEnd(M,timeoutComposition)};editHandlers.compositionend=(M,$)=>{M.composing&&(M.input.composing=!1,M.input.compositionEndedAt=$.timeStamp,M.input.compositionPendingChanges=M.domObserver.pendingRecords().length?M.input.compositionID:0,M.input.compositionNode=null,M.input.compositionPendingChanges&&Promise.resolve().then(()=>M.domObserver.flush()),M.input.compositionID++,scheduleComposeEnd(M,20))};function scheduleComposeEnd(M,$){clearTimeout(M.input.composingTimeout),$>-1&&(M.input.composingTimeout=setTimeout(()=>endComposition(M),$))}function clearComposition(M){for(M.composing&&(M.input.composing=!1,M.input.compositionEndedAt=timestampFromCustomEvent());M.input.compositionNodes.length>0;)M.input.compositionNodes.pop().markParentsDirty()}function findCompositionNode(M){let $=M.domSelectionRange();if(!$.focusNode)return null;let I=textNodeBefore$1($.focusNode,$.focusOffset),N=textNodeAfter$1($.focusNode,$.focusOffset);if(I&&N&&I!=N){let B=N.pmViewDesc,j=M.domObserver.lastChangedTextNode;if(I==j||N==j)return j;if(!B||!B.isText(N.nodeValue))return N;if(M.input.compositionNode==N){let U=I.pmViewDesc;if(!(!U||!U.isText(I.nodeValue)))return N}}return I||N}function timestampFromCustomEvent(){let M=document.createEvent("Event");return M.initEvent("event",!0,!0),M.timeStamp}function endComposition(M,$=!1){if(!(android&&M.domObserver.flushingSoon>=0)){if(M.domObserver.forceFlush(),clearComposition(M),$||M.docView&&M.docView.dirty){let I=selectionFromDOM(M);return I&&!I.eq(M.state.selection)?M.dispatch(M.state.tr.setSelection(I)):(M.markCursor||$)&&!M.state.selection.empty?M.dispatch(M.state.tr.deleteSelection()):M.updateState(M.state),!0}return!1}}function captureCopy(M,$){if(!M.dom.parentNode)return;let I=M.dom.parentNode.appendChild(document.createElement("div"));I.appendChild($),I.style.cssText="position: fixed; left: -10000px; top: 10px";let N=getSelection(),B=document.createRange();B.selectNodeContents($),M.dom.blur(),N.removeAllRanges(),N.addRange(B),setTimeout(()=>{I.parentNode&&I.parentNode.removeChild(I),M.focus()},50)}const brokenClipboardAPI=ie$1&&ie_version<15||ios&&webkit_version<604;handlers.copy=editHandlers.cut=(M,$)=>{let I=$,N=M.state.selection,B=I.type=="cut";if(N.empty)return;let j=brokenClipboardAPI?null:I.clipboardData,U=N.content(),{dom:q,text:Y}=serializeForClipboard(M,U);j?(I.preventDefault(),j.clearData(),j.setData("text/html",q.innerHTML),j.setData("text/plain",Y)):captureCopy(M,q),B&&M.dispatch(M.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function sliceSingleNode(M){return M.openStart==0&&M.openEnd==0&&M.content.childCount==1?M.content.firstChild:null}function capturePaste(M,$){if(!M.dom.parentNode)return;let I=M.input.shiftKey||M.state.selection.$from.parent.type.spec.code,N=M.dom.parentNode.appendChild(document.createElement(I?"textarea":"div"));I||(N.contentEditable="true"),N.style.cssText="position: fixed; left: -10000px; top: 10px",N.focus();let B=M.input.shiftKey&&M.input.lastKeyCode!=45;setTimeout(()=>{M.focus(),N.parentNode&&N.parentNode.removeChild(N),I?doPaste(M,N.value,null,B,$):doPaste(M,N.textContent,N.innerHTML,B,$)},50)}function doPaste(M,$,I,N,B){let j=parseFromClipboard(M,$,I,N,M.state.selection.$from);if(M.someProp("handlePaste",Y=>Y(M,B,j||Slice.empty)))return!0;if(!j)return!1;let U=sliceSingleNode(j),q=U?M.state.tr.replaceSelectionWith(U,N):M.state.tr.replaceSelection(j);return M.dispatch(q.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function getText$1(M){let $=M.getData("text/plain")||M.getData("Text");if($)return $;let I=M.getData("text/uri-list");return I?I.replace(/\r?\n/g," "):""}editHandlers.paste=(M,$)=>{let I=$;if(M.composing&&!android)return;let N=brokenClipboardAPI?null:I.clipboardData,B=M.input.shiftKey&&M.input.lastKeyCode!=45;N&&doPaste(M,getText$1(N),N.getData("text/html"),B,I)?I.preventDefault():capturePaste(M,I)};class Dragging{constructor($,I,N){this.slice=$,this.move=I,this.node=N}}const dragCopyModifier=mac$3?"altKey":"ctrlKey";handlers.dragstart=(M,$)=>{let I=$,N=M.input.mouseDown;if(N&&N.done(),!I.dataTransfer)return;let B=M.state.selection,j=B.empty?null:M.posAtCoords(eventCoords(I)),U;if(!(j&&j.pos>=B.from&&j.pos<=(B instanceof NodeSelection?B.to-1:B.to))){if(N&&N.mightDrag)U=NodeSelection.create(M.state.doc,N.mightDrag.pos);else if(I.target&&I.target.nodeType==1){let J=M.docView.nearestDesc(I.target,!0);J&&J.node.type.spec.draggable&&J!=M.docView&&(U=NodeSelection.create(M.state.doc,J.posBefore))}}let q=(U||M.state.selection).content(),{dom:Y,text:K,slice:G}=serializeForClipboard(M,q);(!I.dataTransfer.files.length||!chrome||chrome_version>120)&&I.dataTransfer.clearData(),I.dataTransfer.setData(brokenClipboardAPI?"Text":"text/html",Y.innerHTML),I.dataTransfer.effectAllowed="copyMove",brokenClipboardAPI||I.dataTransfer.setData("text/plain",K),M.dragging=new Dragging(G,!I[dragCopyModifier],U)};handlers.dragend=M=>{let $=M.dragging;window.setTimeout(()=>{M.dragging==$&&(M.dragging=null)},50)};editHandlers.dragover=editHandlers.dragenter=(M,$)=>$.preventDefault();editHandlers.drop=(M,$)=>{let I=$,N=M.dragging;if(M.dragging=null,!I.dataTransfer)return;let B=M.posAtCoords(eventCoords(I));if(!B)return;let j=M.state.doc.resolve(B.pos),U=N&&N.slice;U?M.someProp("transformPasted",te=>{U=te(U,M)}):U=parseFromClipboard(M,getText$1(I.dataTransfer),brokenClipboardAPI?null:I.dataTransfer.getData("text/html"),!1,j);let q=!!(N&&!I[dragCopyModifier]);if(M.someProp("handleDrop",te=>te(M,I,U||Slice.empty,q))){I.preventDefault();return}if(!U)return;I.preventDefault();let Y=U?dropPoint(M.state.doc,j.pos,U):j.pos;Y==null&&(Y=j.pos);let K=M.state.tr;if(q){let{node:te}=N;te?te.replace(K):K.deleteSelection()}let G=K.mapping.map(Y),J=U.openStart==0&&U.openEnd==0&&U.content.childCount==1,Z=K.doc;if(J?K.replaceRangeWith(G,G,U.content.firstChild):K.replaceRange(G,G,U),K.doc.eq(Z))return;let ee=K.doc.resolve(G);if(J&&NodeSelection.isSelectable(U.content.firstChild)&&ee.nodeAfter&&ee.nodeAfter.sameMarkup(U.content.firstChild))K.setSelection(new NodeSelection(ee));else{let te=K.mapping.map(Y);K.mapping.maps[K.mapping.maps.length-1].forEach((se,re,ne,le)=>te=le),K.setSelection(selectionBetween(M,ee,K.doc.resolve(te)))}M.focus(),M.dispatch(K.setMeta("uiEvent","drop"))};handlers.focus=M=>{M.input.lastFocus=Date.now(),M.focused||(M.domObserver.stop(),M.dom.classList.add("ProseMirror-focused"),M.domObserver.start(),M.focused=!0,setTimeout(()=>{M.docView&&M.hasFocus()&&!M.domObserver.currentSelection.eq(M.domSelectionRange())&&selectionToDOM(M)},20))};handlers.blur=(M,$)=>{let I=$;M.focused&&(M.domObserver.stop(),M.dom.classList.remove("ProseMirror-focused"),M.domObserver.start(),I.relatedTarget&&M.dom.contains(I.relatedTarget)&&M.domObserver.currentSelection.clear(),M.focused=!1)};handlers.beforeinput=(M,$)=>{if(chrome&&android&&$.inputType=="deleteContentBackward"){M.domObserver.flushSoon();let{domChangeCount:N}=M.input;setTimeout(()=>{if(M.input.domChangeCount!=N||(M.dom.blur(),M.focus(),M.someProp("handleKeyDown",j=>j(M,keyEvent(8,"Backspace")))))return;let{$cursor:B}=M.state.selection;B&&B.pos>0&&M.dispatch(M.state.tr.delete(B.pos-1,B.pos).scrollIntoView())},50)}};for(let M in editHandlers)handlers[M]=editHandlers[M];function compareObjs(M,$){if(M==$)return!0;for(let I in M)if(M[I]!==$[I])return!1;for(let I in $)if(!(I in M))return!1;return!0}class WidgetType{constructor($,I){this.toDOM=$,this.spec=I||noSpec,this.side=this.spec.side||0}map($,I,N,B){let{pos:j,deleted:U}=$.mapResult(I.from+B,this.side<0?-1:1);return U?null:new Decoration(j-N,j-N,this)}valid(){return!0}eq($){return this==$||$ instanceof WidgetType&&(this.spec.key&&this.spec.key==$.spec.key||this.toDOM==$.toDOM&&compareObjs(this.spec,$.spec))}destroy($){this.spec.destroy&&this.spec.destroy($)}}class InlineType{constructor($,I){this.attrs=$,this.spec=I||noSpec}map($,I,N,B){let j=$.map(I.from+B,this.spec.inclusiveStart?-1:1)-N,U=$.map(I.to+B,this.spec.inclusiveEnd?1:-1)-N;return j>=U?null:new Decoration(j,U,this)}valid($,I){return I.from=$&&(!j||j(q.spec))&&N.push(q.copy(q.from+B,q.to+B))}for(let U=0;U$){let q=this.children[U]+1;this.children[U+2].findInner($-q,I-q,N,B+q,j)}}map($,I,N){return this==empty||$.maps.length==0?this:this.mapInner($,I,0,0,N||noSpec)}mapInner($,I,N,B,j){let U;for(let q=0;q{let K=Y+N,G;if(G=takeSpansForNode(I,q,K)){for(B||(B=this.children.slice());jq&&J.to=$){this.children[q]==$&&(N=this.children[q+2]);break}let j=$+1,U=j+I.content.size;for(let q=0;qj&&Y.type instanceof InlineType){let K=Math.max(j,Y.from)-j,G=Math.min(U,Y.to)-j;KB.map($,I,noSpec));return DecorationGroup.from(N)}forChild($,I){if(I.isLeaf)return DecorationSet.empty;let N=[];for(let B=0;BI instanceof DecorationSet)?$:$.reduce((I,N)=>I.concat(N instanceof DecorationSet?N:N.members),[]))}}forEachSet($){for(let I=0;I{let re=se-te-(ee-Z);for(let ne=0;nele+G-J)continue;let me=q[ne]+G-J;ee>=me?q[ne+1]=Z<=me?-2:-1:Z>=G&&re&&(q[ne]+=re,q[ne+1]+=re)}J+=re}),G=I.maps[K].map(G,-1)}let Y=!1;for(let K=0;K=N.content.size){Y=!0;continue}let Z=I.map(M[K+1]+j,-1),ee=Z-B,{index:te,offset:se}=N.content.findIndex(J),re=N.maybeChild(te);if(re&&se==J&&se+re.nodeSize==ee){let ne=q[K+2].mapInner(I,re,G+1,M[K]+j+1,U);ne!=empty?(q[K]=J,q[K+1]=ee,q[K+2]=ne):(q[K+1]=-2,Y=!0)}else Y=!0}if(Y){let K=mapAndGatherRemainingDecorations(q,M,$,I,B,j,U),G=buildTree(K,N,0,U);$=G.local;for(let J=0;JI&&U.to{let K=takeSpansForNode(M,q,Y+I);if(K){j=!0;let G=buildTree(K,q,I+Y+1,N);G!=empty&&B.push(Y,Y+q.nodeSize,G)}});let U=moveSpans(j?withoutNulls(M):M,-I).sort(byPos);for(let q=0;q0;)$++;M.splice($,0,I)}function viewDecorations(M){let $=[];return M.someProp("decorations",I=>{let N=I(M.state);N&&N!=empty&&$.push(N)}),M.cursorWrapper&&$.push(DecorationSet.create(M.state.doc,[M.cursorWrapper.deco])),DecorationGroup.from($)}const observeOptions={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},useCharData=ie$1&&ie_version<=11;class SelectionState{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set($){this.anchorNode=$.anchorNode,this.anchorOffset=$.anchorOffset,this.focusNode=$.focusNode,this.focusOffset=$.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq($){return $.anchorNode==this.anchorNode&&$.anchorOffset==this.anchorOffset&&$.focusNode==this.focusNode&&$.focusOffset==this.focusOffset}}class DOMObserver{constructor($,I){this.view=$,this.handleDOMChange=I,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new SelectionState,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(N=>{for(let B=0;BB.type=="childList"&&B.removedNodes.length||B.type=="characterData"&&B.oldValue.length>B.target.nodeValue.length)?this.flushSoon():this.flush()}),useCharData&&(this.onCharData=N=>{this.queue.push({target:N.target,type:"characterData",oldValue:N.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,observeOptions)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let $=this.observer.takeRecords();if($.length){for(let I=0;I<$.length;I++)this.queue.push($[I]);window.setTimeout(()=>this.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(hasFocusAndSelection(this.view)){if(this.suppressingSelectionUpdates)return selectionToDOM(this.view);if(ie$1&&ie_version<=11&&!this.view.state.selection.empty){let $=this.view.domSelectionRange();if($.focusNode&&isEquivalentPosition($.focusNode,$.focusOffset,$.anchorNode,$.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange($){if(!$.focusNode)return!0;let I=new Set,N;for(let j=$.focusNode;j;j=parentNode(j))I.add(j);for(let j=$.anchorNode;j;j=parentNode(j))if(I.has(j)){N=j;break}let B=N&&this.view.docView.nearestDesc(N);if(B&&B.ignoreMutation({type:"selection",target:N.nodeType==3?N.parentNode:N}))return this.setCurSelection(),!0}pendingRecords(){if(this.observer)for(let $ of this.observer.takeRecords())this.queue.push($);return this.queue}selectionChanged($){return!this.suppressingSelectionUpdates&&!this.currentSelection.eq($)&&hasFocusAndSelection(this.view)&&!this.ignoreSelectionChange($)}flush(){let{view:$}=this;if(!$.docView||this.flushingSoon>-1)return;let I=this.pendingRecords();I.length&&(this.queue=[]);let N=$.domSelectionRange(),B=this.selectionChanged(N),j=-1,U=-1,q=!1,Y=[];if($.editable)for(let G=0;GJ.nodeName=="BR");if(G.length==2){let[J,Z]=G;J.parentNode&&J.parentNode.parentNode==Z.parentNode?Z.remove():J.remove()}else{let{focusNode:J}=this.currentSelection;for(let Z of G){let ee=Z.parentNode;ee&&ee.nodeName=="LI"&&(!J||blockParent($,J)!=ee)&&Z.remove()}}}let K=null;j<0&&B&&$.input.lastFocus>Date.now()-200&&Math.max($.input.lastTouch,$.input.lastClick.time)-1||B)&&(j>-1&&($.docView.markDirty(j,U),checkCSS($)),this.handleDOMChange(j,U,q,Y),$.docView&&$.docView.dirty?$.updateState($.state):this.currentSelection.eq(N)||selectionToDOM($),this.currentSelection.set(N))}registerMutation($,I){if(I.indexOf($.target)>-1)return null;let N=this.view.docView.nearestDesc($.target);if($.type=="attributes"&&(N==this.view.docView||$.attributeName=="contenteditable"||$.attributeName=="style"&&!$.oldValue&&!$.target.getAttribute("style"))||!N||N.ignoreMutation($))return null;if($.type=="childList"){for(let G=0;G<$.addedNodes.length;G++){let J=$.addedNodes[G];I.push(J),J.nodeType==3&&(this.lastChangedTextNode=J)}if(N.contentDOM&&N.contentDOM!=N.dom&&!N.contentDOM.contains($.target))return{from:N.posBefore,to:N.posAfter};let B=$.previousSibling,j=$.nextSibling;if(ie$1&&ie_version<=11&&$.addedNodes.length)for(let G=0;G<$.addedNodes.length;G++){let{previousSibling:J,nextSibling:Z}=$.addedNodes[G];(!J||Array.prototype.indexOf.call($.addedNodes,J)<0)&&(B=J),(!Z||Array.prototype.indexOf.call($.addedNodes,Z)<0)&&(j=Z)}let U=B&&B.parentNode==$.target?domIndex(B)+1:0,q=N.localPosFromDOM($.target,U,-1),Y=j&&j.parentNode==$.target?domIndex(j):$.target.childNodes.length,K=N.localPosFromDOM($.target,Y,1);return{from:q,to:K}}else return $.type=="attributes"?{from:N.posAtStart-N.border,to:N.posAtEnd+N.border}:(this.lastChangedTextNode=$.target,{from:N.posAtStart,to:N.posAtEnd,typeOver:$.target.nodeValue==$.oldValue})}}let cssChecked=new WeakMap,cssCheckWarned=!1;function checkCSS(M){if(!cssChecked.has(M)&&(cssChecked.set(M,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(M.dom).whiteSpace)!==-1)){if(M.requiresGeckoHackNode=gecko,cssCheckWarned)return;console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."),cssCheckWarned=!0}}function rangeToSelectionRange(M,$){let I=$.startContainer,N=$.startOffset,B=$.endContainer,j=$.endOffset,U=M.domAtPos(M.state.selection.anchor);return isEquivalentPosition(U.node,U.offset,B,j)&&([I,N,B,j]=[B,j,I,N]),{anchorNode:I,anchorOffset:N,focusNode:B,focusOffset:j}}function safariShadowSelectionRange(M,$){if($.getComposedRanges){let B=$.getComposedRanges(M.root)[0];if(B)return rangeToSelectionRange(M,B)}let I;function N(B){B.preventDefault(),B.stopImmediatePropagation(),I=B.getTargetRanges()[0]}return M.dom.addEventListener("beforeinput",N,!0),document.execCommand("indent"),M.dom.removeEventListener("beforeinput",N,!0),I?rangeToSelectionRange(M,I):null}function blockParent(M,$){for(let I=$.parentNode;I&&I!=M.dom;I=I.parentNode){let N=M.docView.nearestDesc(I,!0);if(N&&N.node.isBlock)return I}return null}function parseBetween(M,$,I){let{node:N,fromOffset:B,toOffset:j,from:U,to:q}=M.docView.parseRange($,I),Y=M.domSelectionRange(),K,G=Y.anchorNode;if(G&&M.dom.contains(G.nodeType==1?G:G.parentNode)&&(K=[{node:G,offset:Y.anchorOffset}],selectionCollapsed(Y)||K.push({node:Y.focusNode,offset:Y.focusOffset})),chrome&&M.input.lastKeyCode===8)for(let re=j;re>B;re--){let ne=N.childNodes[re-1],le=ne.pmViewDesc;if(ne.nodeName=="BR"&&!le){j=re;break}if(!le||le.size)break}let J=M.state.doc,Z=M.someProp("domParser")||DOMParser.fromSchema(M.state.schema),ee=J.resolve(U),te=null,se=Z.parse(N,{topNode:ee.parent,topMatch:ee.parent.contentMatchAt(ee.index()),topOpen:!0,from:B,to:j,preserveWhitespace:ee.parent.type.whitespace=="pre"?"full":!0,findPositions:K,ruleFromNode,context:ee});if(K&&K[0].pos!=null){let re=K[0].pos,ne=K[1]&&K[1].pos;ne==null&&(ne=re),te={anchor:re+U,head:ne+U}}return{doc:se,sel:te,from:U,to:q}}function ruleFromNode(M){let $=M.pmViewDesc;if($)return $.parseRule();if(M.nodeName=="BR"&&M.parentNode){if(safari&&/^(ul|ol)$/i.test(M.parentNode.nodeName)){let I=document.createElement("div");return I.appendChild(document.createElement("li")),{skip:I}}else if(M.parentNode.lastChild==M||safari&&/^(tr|table)$/i.test(M.parentNode.nodeName))return{ignore:!0}}else if(M.nodeName=="IMG"&&M.getAttribute("mark-placeholder"))return{ignore:!0};return null}const isInline=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function readDOMChange(M,$,I,N,B){let j=M.input.compositionPendingChanges||(M.composing?M.input.compositionID:0);if(M.input.compositionPendingChanges=0,$<0){let xe=M.input.lastSelectionTime>Date.now()-50?M.input.lastSelectionOrigin:null,oe=selectionFromDOM(M,xe);if(oe&&!M.state.selection.eq(oe)){if(chrome&&android&&M.input.lastKeyCode===13&&Date.now()-100ve(M,keyEvent(13,"Enter"))))return;let be=M.state.tr.setSelection(oe);xe=="pointer"?be.setMeta("pointer",!0):xe=="key"&&be.scrollIntoView(),j&&be.setMeta("composition",j),M.dispatch(be)}return}let U=M.state.doc.resolve($),q=U.sharedDepth(I);$=U.before(q+1),I=M.state.doc.resolve(I).after(q+1);let Y=M.state.selection,K=parseBetween(M,$,I),G=M.state.doc,J=G.slice(K.from,K.to),Z,ee;M.input.lastKeyCode===8&&Date.now()-100Date.now()-225||android)&&B.some(xe=>xe.nodeType==1&&!isInline.test(xe.nodeName))&&(!te||te.endA>=te.endB)&&M.someProp("handleKeyDown",xe=>xe(M,keyEvent(13,"Enter")))){M.input.lastIOSEnter=0;return}if(!te)if(N&&Y instanceof TextSelection&&!Y.empty&&Y.$head.sameParent(Y.$anchor)&&!M.composing&&!(K.sel&&K.sel.anchor!=K.sel.head))te={start:Y.from,endA:Y.to,endB:Y.to};else{if(K.sel){let xe=resolveSelection(M,M.state.doc,K.sel);if(xe&&!xe.eq(M.state.selection)){let oe=M.state.tr.setSelection(xe);j&&oe.setMeta("composition",j),M.dispatch(oe)}}return}M.state.selection.fromM.state.selection.from&&te.start<=M.state.selection.from+2&&M.state.selection.from>=K.from?te.start=M.state.selection.from:te.endA=M.state.selection.to-2&&M.state.selection.to<=K.to&&(te.endB+=M.state.selection.to-te.endA,te.endA=M.state.selection.to)),ie$1&&ie_version<=11&&te.endB==te.start+1&&te.endA==te.start&&te.start>K.from&&K.doc.textBetween(te.start-K.from-1,te.start-K.from+1)=="  "&&(te.start--,te.endA--,te.endB--);let se=K.doc.resolveNoCache(te.start-K.from),re=K.doc.resolveNoCache(te.endB-K.from),ne=G.resolve(te.start),le=se.sameParent(re)&&se.parent.inlineContent&&ne.end()>=te.endA,me;if((ios&&M.input.lastIOSEnter>Date.now()-225&&(!le||B.some(xe=>xe.nodeName=="DIV"||xe.nodeName=="P"))||!le&&se.posxe(M,keyEvent(13,"Enter")))){M.input.lastIOSEnter=0;return}if(M.state.selection.anchor>te.start&&looksLikeBackspace(G,te.start,te.endA,se,re)&&M.someProp("handleKeyDown",xe=>xe(M,keyEvent(8,"Backspace")))){android&&chrome&&M.domObserver.suppressSelectionUpdates();return}chrome&&android&&te.endB==te.start&&(M.input.lastAndroidDelete=Date.now()),android&&!le&&se.start()!=re.start()&&re.parentOffset==0&&se.depth==re.depth&&K.sel&&K.sel.anchor==K.sel.head&&K.sel.head==te.endA&&(te.endB-=2,re=K.doc.resolveNoCache(te.endB-K.from),setTimeout(()=>{M.someProp("handleKeyDown",function(xe){return xe(M,keyEvent(13,"Enter"))})},20));let ue=te.start,_e=te.endA,fe,ge,ye;if(le){if(se.pos==re.pos)ie$1&&ie_version<=11&&se.parentOffset==0&&(M.domObserver.suppressSelectionUpdates(),setTimeout(()=>selectionToDOM(M),20)),fe=M.state.tr.delete(ue,_e),ge=G.resolve(te.start).marksAcross(G.resolve(te.endA));else if(te.endA==te.endB&&(ye=isMarkChange(se.parent.content.cut(se.parentOffset,re.parentOffset),ne.parent.content.cut(ne.parentOffset,te.endA-ne.start()))))fe=M.state.tr,ye.type=="add"?fe.addMark(ue,_e,ye.mark):fe.removeMark(ue,_e,ye.mark);else if(se.parent.child(se.index()).isText&&se.index()==re.index()-(re.textOffset?0:1)){let xe=se.parent.textBetween(se.parentOffset,re.parentOffset);if(M.someProp("handleTextInput",oe=>oe(M,ue,_e,xe)))return;fe=M.state.tr.insertText(xe,ue,_e)}}if(fe||(fe=M.state.tr.replace(ue,_e,K.doc.slice(te.start-K.from,te.endB-K.from))),K.sel){let xe=resolveSelection(M,fe.doc,K.sel);xe&&!(chrome&&android&&M.composing&&xe.empty&&(te.start!=te.endB||M.input.lastAndroidDelete$.content.size?null:selectionBetween(M,$.resolve(I.anchor),$.resolve(I.head))}function isMarkChange(M,$){let I=M.firstChild.marks,N=$.firstChild.marks,B=I,j=N,U,q,Y;for(let G=0;GG.mark(q.addToSet(G.marks));else if(B.length==0&&j.length==1)q=j[0],U="remove",Y=G=>G.mark(q.removeFromSet(G.marks));else return null;let K=[];for(let G=0;G<$.childCount;G++)K.push(Y($.child(G)));if(Fragment.from(K).eq(M))return{mark:q,type:U}}function looksLikeBackspace(M,$,I,N,B){if(I-$<=B.pos-N.pos||skipClosingAndOpening(N,!0,!1)I||skipClosingAndOpening(U,!0,!1)0&&($||M.indexAfter(N)==M.node(N).childCount);)N--,B++,$=!1;if(I){let j=M.node(N).maybeChild(M.indexAfter(N));for(;j&&!j.isLeaf;)j=j.firstChild,B++}return B}function findDiff(M,$,I,N,B){let j=M.findDiffStart($,I);if(j==null)return null;let{a:U,b:q}=M.findDiffEnd($,I+M.size,I+$.size);if(B=="end"){let Y=Math.max(0,j-Math.min(U,q));N-=U+Y-j}if(U=U?j-N:0;j-=Y,j&&j<$.size&&isSurrogatePair($.textBetween(j-1,j+1))&&(j+=Y?1:-1),q=j+(q-U),U=j}else if(q=q?j-N:0;j-=Y,j&&j=56320&&$<=57343&&I>=55296&&I<=56319}const __serializeForClipboard=serializeForClipboard,__parseFromClipboard=parseFromClipboard,__endComposition=endComposition;class EditorView{constructor($,I){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new InputState,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=I,this.state=I.state,this.directPlugins=I.plugins||[],this.directPlugins.forEach(checkStateComponent),this.dispatch=this.dispatch.bind(this),this.dom=$&&$.mount||document.createElement("div"),$&&($.appendChild?$.appendChild(this.dom):typeof $=="function"?$(this.dom):$.mount&&(this.mounted=!0)),this.editable=getEditable(this),updateCursorWrapper(this),this.nodeViews=buildNodeViews(this),this.docView=docViewDesc(this.state.doc,computeDocDeco(this),viewDecorations(this),this.dom,this),this.domObserver=new DOMObserver(this,(N,B,j,U)=>readDOMChange(this,N,B,j,U)),this.domObserver.start(),initInput(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let $=this._props;this._props={};for(let I in $)this._props[I]=$[I];this._props.state=this.state}return this._props}update($){$.handleDOMEvents!=this._props.handleDOMEvents&&ensureListeners(this);let I=this._props;this._props=$,$.plugins&&($.plugins.forEach(checkStateComponent),this.directPlugins=$.plugins),this.updateStateInner($.state,I)}setProps($){let I={};for(let N in this._props)I[N]=this._props[N];I.state=this.state;for(let N in $)I[N]=$[N];this.update(I)}updateState($){this.updateStateInner($,this._props)}updateStateInner($,I){var N;let B=this.state,j=!1,U=!1;$.storedMarks&&this.composing&&(clearComposition(this),U=!0),this.state=$;let q=B.plugins!=$.plugins||this._props.plugins!=I.plugins;if(q||this._props.plugins!=I.plugins||this._props.nodeViews!=I.nodeViews){let ee=buildNodeViews(this);changedNodeViews(ee,this.nodeViews)&&(this.nodeViews=ee,j=!0)}(q||I.handleDOMEvents!=this._props.handleDOMEvents)&&ensureListeners(this),this.editable=getEditable(this),updateCursorWrapper(this);let Y=viewDecorations(this),K=computeDocDeco(this),G=B.plugins!=$.plugins&&!B.doc.eq($.doc)?"reset":$.scrollToSelection>B.scrollToSelection?"to selection":"preserve",J=j||!this.docView.matchesNode($.doc,K,Y);(J||!$.selection.eq(B.selection))&&(U=!0);let Z=G=="preserve"&&U&&this.dom.style.overflowAnchor==null&&storeScrollPos(this);if(U){this.domObserver.stop();let ee=J&&(ie$1||chrome)&&!this.composing&&!B.selection.empty&&!$.selection.empty&&selectionContextChanged(B.selection,$.selection);if(J){let te=chrome?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=findCompositionNode(this)),(j||!this.docView.update($.doc,K,Y,this))&&(this.docView.updateOuterDeco(K),this.docView.destroy(),this.docView=docViewDesc($.doc,K,Y,this.dom,this)),te&&!this.trackWrites&&(ee=!0)}ee||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&anchorInRightPlace(this))?selectionToDOM(this,ee):(syncNodeSelection(this,$.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(B),!((N=this.dragging)===null||N===void 0)&&N.node&&!B.doc.eq($.doc)&&this.updateDraggedNode(this.dragging,B),G=="reset"?this.dom.scrollTop=0:G=="to selection"?this.scrollToSelection():Z&&resetScrollPos(Z)}scrollToSelection(){let $=this.domSelectionRange().focusNode;if(!this.someProp("handleScrollToSelection",I=>I(this)))if(this.state.selection instanceof NodeSelection){let I=this.docView.domAfterPos(this.state.selection.from);I.nodeType==1&&scrollRectIntoView(this,I.getBoundingClientRect(),$)}else scrollRectIntoView(this,this.coordsAtPos(this.state.selection.head,1),$)}destroyPluginViews(){let $;for(;$=this.pluginViews.pop();)$.destroy&&$.destroy()}updatePluginViews($){if(!$||$.plugins!=this.state.plugins||this.directPlugins!=this.prevDirectPlugins){this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let I=0;I0&&this.state.doc.nodeAt(j))==N.node&&(B=j)}this.dragging=new Dragging($.slice,$.move,B<0?void 0:NodeSelection.create(this.state.doc,B))}someProp($,I){let N=this._props&&this._props[$],B;if(N!=null&&(B=I?I(N):N))return B;for(let U=0;UI.ownerDocument.getSelection()),this._root=I}return $||document}updateRoot(){this._root=null}posAtCoords($){return posAtCoords(this,$)}coordsAtPos($,I=1){return coordsAtPos(this,$,I)}domAtPos($,I=0){return this.docView.domFromPos($,I)}nodeDOM($){let I=this.docView.descAt($);return I?I.nodeDOM:null}posAtDOM($,I,N=-1){let B=this.docView.posFromDOM($,I,N);if(B==null)throw new RangeError("DOM position not inside the editor");return B}endOfTextblock($,I){return endOfTextblock(this,I||this.state,$)}pasteHTML($,I){return doPaste(this,"",$,!1,I||new ClipboardEvent("paste"))}pasteText($,I){return doPaste(this,$,null,!0,I||new ClipboardEvent("paste"))}destroy(){this.docView&&(destroyInput(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],viewDecorations(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,clearReusedRange())}get isDestroyed(){return this.docView==null}dispatchEvent($){return dispatchEvent(this,$)}dispatch($){let I=this._props.dispatchTransaction;I?I.call(this,$):this.updateState(this.state.apply($))}domSelectionRange(){let $=this.domSelection();return $?safari&&this.root.nodeType===11&&deepActiveElement(this.dom.ownerDocument)==this.dom&&safariShadowSelectionRange(this,$)||$:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}}function computeDocDeco(M){let $=Object.create(null);return $.class="ProseMirror",$.contenteditable=String(M.editable),M.someProp("attributes",I=>{if(typeof I=="function"&&(I=I(M.state)),I)for(let N in I)N=="class"?$.class+=" "+I[N]:N=="style"?$.style=($.style?$.style+";":"")+I[N]:!$[N]&&N!="contenteditable"&&N!="nodeName"&&($[N]=String(I[N]))}),$.translate||($.translate="no"),[Decoration.node(0,M.state.doc.content.size,$)]}function updateCursorWrapper(M){if(M.markCursor){let $=document.createElement("img");$.className="ProseMirror-separator",$.setAttribute("mark-placeholder","true"),$.setAttribute("alt",""),M.cursorWrapper={dom:$,deco:Decoration.widget(M.state.selection.from,$,{raw:!0,marks:M.markCursor})}}else M.cursorWrapper=null}function getEditable(M){return!M.someProp("editable",$=>$(M.state)===!1)}function selectionContextChanged(M,$){let I=Math.min(M.$anchor.sharedDepth(M.head),$.$anchor.sharedDepth($.head));return M.$anchor.start(I)!=$.$anchor.start(I)}function buildNodeViews(M){let $=Object.create(null);function I(N){for(let B in N)Object.prototype.hasOwnProperty.call($,B)||($[B]=N[B])}return M.someProp("nodeViews",I),M.someProp("markViews",I),$}function changedNodeViews(M,$){let I=0,N=0;for(let B in M){if(M[B]!=$[B])return!0;I++}for(let B in $)N++;return I!=N}function checkStateComponent(M){if(M.spec.state||M.spec.filterTransaction||M.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}const view=Object.freeze(Object.defineProperty({__proto__:null,Decoration,DecorationSet,EditorView,__endComposition,__parseFromClipboard,__serializeForClipboard},Symbol.toStringTag,{value:"Module"}));var base={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},shift$1={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},mac$2=typeof navigator<"u"&&/Mac/.test(navigator.platform),ie=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var i$3=0;i$3<10;i$3++)base[48+i$3]=base[96+i$3]=String(i$3);for(var i$3=1;i$3<=24;i$3++)base[i$3+111]="F"+i$3;for(var i$3=65;i$3<=90;i$3++)base[i$3]=String.fromCharCode(i$3+32),shift$1[i$3]=String.fromCharCode(i$3);for(var code in base)shift$1.hasOwnProperty(code)||(shift$1[code]=base[code]);function keyName(M){var $=mac$2&&M.metaKey&&M.shiftKey&&!M.ctrlKey&&!M.altKey||ie&&M.shiftKey&&M.key&&M.key.length==1||M.key=="Unidentified",I=!$&&M.key||(M.shiftKey?shift$1:base)[M.keyCode]||M.key||"Unidentified";return I=="Esc"&&(I="Escape"),I=="Del"&&(I="Delete"),I=="Left"&&(I="ArrowLeft"),I=="Up"&&(I="ArrowUp"),I=="Right"&&(I="ArrowRight"),I=="Down"&&(I="ArrowDown"),I}const mac$1=typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):!1;function normalizeKeyName$1(M){let $=M.split(/-(?!$)/),I=$[$.length-1];I=="Space"&&(I=" ");let N,B,j,U;for(let q=0;q<$.length-1;q++){let Y=$[q];if(/^(cmd|meta|m)$/i.test(Y))U=!0;else if(/^a(lt)?$/i.test(Y))N=!0;else if(/^(c|ctrl|control)$/i.test(Y))B=!0;else if(/^s(hift)?$/i.test(Y))j=!0;else if(/^mod$/i.test(Y))mac$1?U=!0:B=!0;else throw new Error("Unrecognized modifier name: "+Y)}return N&&(I="Alt-"+I),B&&(I="Ctrl-"+I),U&&(I="Meta-"+I),j&&(I="Shift-"+I),I}function normalize(M){let $=Object.create(null);for(let I in M)$[normalizeKeyName$1(I)]=M[I];return $}function modifiers(M,$,I=!0){return $.altKey&&(M="Alt-"+M),$.ctrlKey&&(M="Ctrl-"+M),$.metaKey&&(M="Meta-"+M),I&&$.shiftKey&&(M="Shift-"+M),M}function keymap(M){return new Plugin({props:{handleKeyDown:keydownHandler(M)}})}function keydownHandler(M){let $=normalize(M);return function(I,N){let B=keyName(N),j,U=$[modifiers(B,N)];if(U&&U(I.state,I.dispatch,I))return!0;if(B.length==1&&B!=" "){if(N.shiftKey){let q=$[modifiers(B,N,!1)];if(q&&q(I.state,I.dispatch,I))return!0}if((N.shiftKey||N.altKey||N.metaKey||B.charCodeAt(0)>127)&&(j=base[N.keyCode])&&j!=B){let q=$[modifiers(j,N)];if(q&&q(I.state,I.dispatch,I))return!0}}return!1}}const model=Object.freeze(Object.defineProperty({__proto__:null,ContentMatch,DOMParser,DOMSerializer,Fragment,Mark:Mark$1,MarkType,Node:Node$2,NodeRange,NodeType:NodeType$1,ReplaceError,ResolvedPos,Schema,Slice},Symbol.toStringTag,{value:"Module"})),deleteSelection$1=(M,$)=>M.selection.empty?!1:($&&$(M.tr.deleteSelection().scrollIntoView()),!0);function atBlockStart(M,$){let{$cursor:I}=M.selection;return!I||($?!$.endOfTextblock("backward",M):I.parentOffset>0)?null:I}const joinBackward$1=(M,$,I)=>{let N=atBlockStart(M,I);if(!N)return!1;let B=findCutBefore(N);if(!B){let U=N.blockRange(),q=U&&liftTarget(U);return q==null?!1:($&&$(M.tr.lift(U,q).scrollIntoView()),!0)}let j=B.nodeBefore;if(deleteBarrier(M,B,$,-1))return!0;if(N.parent.content.size==0&&(textblockAt(j,"end")||NodeSelection.isSelectable(j)))for(let U=N.depth;;U--){let q=replaceStep(M.doc,N.before(U),N.after(U),Slice.empty);if(q&&q.slice.size1)break}return j.isAtom&&B.depth==N.depth-1?($&&$(M.tr.delete(B.pos-j.nodeSize,B.pos).scrollIntoView()),!0):!1},joinTextblockBackward$1=(M,$,I)=>{let N=atBlockStart(M,I);if(!N)return!1;let B=findCutBefore(N);return B?joinTextblocksAround(M,B,$):!1},joinTextblockForward$1=(M,$,I)=>{let N=atBlockEnd(M,I);if(!N)return!1;let B=findCutAfter(N);return B?joinTextblocksAround(M,B,$):!1};function joinTextblocksAround(M,$,I){let N=$.nodeBefore,B=N,j=$.pos-1;for(;!B.isTextblock;j--){if(B.type.spec.isolating)return!1;let G=B.lastChild;if(!G)return!1;B=G}let U=$.nodeAfter,q=U,Y=$.pos+1;for(;!q.isTextblock;Y++){if(q.type.spec.isolating)return!1;let G=q.firstChild;if(!G)return!1;q=G}let K=replaceStep(M.doc,j,Y,Slice.empty);if(!K||K.from!=j||K instanceof ReplaceStep&&K.slice.size>=Y-j)return!1;if(I){let G=M.tr.step(K);G.setSelection(TextSelection.create(G.doc,j)),I(G.scrollIntoView())}return!0}function textblockAt(M,$,I=!1){for(let N=M;N;N=$=="start"?N.firstChild:N.lastChild){if(N.isTextblock)return!0;if(I&&N.childCount!=1)return!1}return!1}const selectNodeBackward$1=(M,$,I)=>{let{$head:N,empty:B}=M.selection,j=N;if(!B)return!1;if(N.parent.isTextblock){if(I?!I.endOfTextblock("backward",M):N.parentOffset>0)return!1;j=findCutBefore(N)}let U=j&&j.nodeBefore;return!U||!NodeSelection.isSelectable(U)?!1:($&&$(M.tr.setSelection(NodeSelection.create(M.doc,j.pos-U.nodeSize)).scrollIntoView()),!0)};function findCutBefore(M){if(!M.parent.type.spec.isolating)for(let $=M.depth-1;$>=0;$--){if(M.index($)>0)return M.doc.resolve(M.before($+1));if(M.node($).type.spec.isolating)break}return null}function atBlockEnd(M,$){let{$cursor:I}=M.selection;return!I||($?!$.endOfTextblock("forward",M):I.parentOffset{let N=atBlockEnd(M,I);if(!N)return!1;let B=findCutAfter(N);if(!B)return!1;let j=B.nodeAfter;if(deleteBarrier(M,B,$,1))return!0;if(N.parent.content.size==0&&(textblockAt(j,"start")||NodeSelection.isSelectable(j))){let U=replaceStep(M.doc,N.before(),N.after(),Slice.empty);if(U&&U.slice.size{let{$head:N,empty:B}=M.selection,j=N;if(!B)return!1;if(N.parent.isTextblock){if(I?!I.endOfTextblock("forward",M):N.parentOffset=0;$--){let I=M.node($);if(M.index($)+1{let I=M.selection,N=I instanceof NodeSelection,B;if(N){if(I.node.isTextblock||!canJoin(M.doc,I.from))return!1;B=I.from}else if(B=joinPoint(M.doc,I.from,-1),B==null)return!1;if($){let j=M.tr.join(B);N&&j.setSelection(NodeSelection.create(j.doc,B-M.doc.resolve(B).nodeBefore.nodeSize)),$(j.scrollIntoView())}return!0},joinDown$1=(M,$)=>{let I=M.selection,N;if(I instanceof NodeSelection){if(I.node.isTextblock||!canJoin(M.doc,I.to))return!1;N=I.to}else if(N=joinPoint(M.doc,I.to,1),N==null)return!1;return $&&$(M.tr.join(N).scrollIntoView()),!0},lift$1=(M,$)=>{let{$from:I,$to:N}=M.selection,B=I.blockRange(N),j=B&&liftTarget(B);return j==null?!1:($&&$(M.tr.lift(B,j).scrollIntoView()),!0)},newlineInCode$1=(M,$)=>{let{$head:I,$anchor:N}=M.selection;return!I.parent.type.spec.code||!I.sameParent(N)?!1:($&&$(M.tr.insertText(` +`).scrollIntoView()),!0)};function defaultBlockAt$1(M){for(let $=0;${let{$head:I,$anchor:N}=M.selection;if(!I.parent.type.spec.code||!I.sameParent(N))return!1;let B=I.node(-1),j=I.indexAfter(-1),U=defaultBlockAt$1(B.contentMatchAt(j));if(!U||!B.canReplaceWith(j,j,U))return!1;if($){let q=I.after(),Y=M.tr.replaceWith(q,q,U.createAndFill());Y.setSelection(Selection.near(Y.doc.resolve(q),1)),$(Y.scrollIntoView())}return!0},createParagraphNear$1=(M,$)=>{let I=M.selection,{$from:N,$to:B}=I;if(I instanceof AllSelection||N.parent.inlineContent||B.parent.inlineContent)return!1;let j=defaultBlockAt$1(B.parent.contentMatchAt(B.indexAfter()));if(!j||!j.isTextblock)return!1;if($){let U=(!N.parentOffset&&B.index(){let{$cursor:I}=M.selection;if(!I||I.parent.content.size)return!1;if(I.depth>1&&I.after()!=I.end(-1)){let j=I.before();if(canSplit(M.doc,j))return $&&$(M.tr.split(j).scrollIntoView()),!0}let N=I.blockRange(),B=N&&liftTarget(N);return B==null?!1:($&&$(M.tr.lift(N,B).scrollIntoView()),!0)},selectParentNode$1=(M,$)=>{let{$from:I,to:N}=M.selection,B,j=I.sharedDepth(N);return j==0?!1:(B=I.before(j),$&&$(M.tr.setSelection(NodeSelection.create(M.doc,B))),!0)};function joinMaybeClear(M,$,I){let N=$.nodeBefore,B=$.nodeAfter,j=$.index();return!N||!B||!N.type.compatibleContent(B.type)?!1:!N.content.size&&$.parent.canReplace(j-1,j)?(I&&I(M.tr.delete($.pos-N.nodeSize,$.pos).scrollIntoView()),!0):!$.parent.canReplace(j,j+1)||!(B.isTextblock||canJoin(M.doc,$.pos))?!1:(I&&I(M.tr.clearIncompatible($.pos,N.type,N.contentMatchAt(N.childCount)).join($.pos).scrollIntoView()),!0)}function deleteBarrier(M,$,I,N){let B=$.nodeBefore,j=$.nodeAfter,U,q,Y=B.type.spec.isolating||j.type.spec.isolating;if(!Y&&joinMaybeClear(M,$,I))return!0;let K=!Y&&$.parent.canReplace($.index(),$.index()+1);if(K&&(U=(q=B.contentMatchAt(B.childCount)).findWrapping(j.type))&&q.matchType(U[0]||j.type).validEnd){if(I){let ee=$.pos+j.nodeSize,te=Fragment.empty;for(let ne=U.length-1;ne>=0;ne--)te=Fragment.from(U[ne].create(null,te));te=Fragment.from(B.copy(te));let se=M.tr.step(new ReplaceAroundStep($.pos-1,ee,$.pos,ee,new Slice(te,1,0),U.length,!0)),re=ee+2*U.length;canJoin(se.doc,re)&&se.join(re),I(se.scrollIntoView())}return!0}let G=j.type.spec.isolating||N>0&&Y?null:Selection.findFrom($,1),J=G&&G.$from.blockRange(G.$to),Z=J&&liftTarget(J);if(Z!=null&&Z>=$.depth)return I&&I(M.tr.lift(J,Z).scrollIntoView()),!0;if(K&&textblockAt(j,"start",!0)&&textblockAt(B,"end")){let ee=B,te=[];for(;te.push(ee),!ee.isTextblock;)ee=ee.lastChild;let se=j,re=1;for(;!se.isTextblock;se=se.firstChild)re++;if(ee.canReplace(ee.childCount,ee.childCount,se.content)){if(I){let ne=Fragment.empty;for(let me=te.length-1;me>=0;me--)ne=Fragment.from(te[me].copy(ne));let le=M.tr.step(new ReplaceAroundStep($.pos-te.length,$.pos+j.nodeSize,$.pos+re,$.pos+j.nodeSize-re,new Slice(ne,te.length,0),0,!0));I(le.scrollIntoView())}return!0}}return!1}function selectTextblockSide(M){return function($,I){let N=$.selection,B=M<0?N.$from:N.$to,j=B.depth;for(;B.node(j).isInline;){if(!j)return!1;j--}return B.node(j).isTextblock?(I&&I($.tr.setSelection(TextSelection.create($.doc,M<0?B.start(j):B.end(j)))),!0):!1}}const selectTextblockStart$1=selectTextblockSide(-1),selectTextblockEnd$1=selectTextblockSide(1);function wrapIn$1(M,$=null){return function(I,N){let{$from:B,$to:j}=I.selection,U=B.blockRange(j),q=U&&findWrapping(U,M,$);return q?(N&&N(I.tr.wrap(U,q).scrollIntoView()),!0):!1}}function setBlockType(M,$=null){return function(I,N){let B=!1;for(let j=0;j{if(B)return!1;if(!(!Y.isTextblock||Y.hasMarkup(M,$)))if(Y.type==M)B=!0;else{let G=I.doc.resolve(K),J=G.index();B=G.parent.canReplaceWith(J,J+1,M)}})}if(!B)return!1;if(N){let j=I.tr;for(let U=0;U=2&&B.node(U.depth-1).type.compatibleContent(M)&&U.startIndex==0){if(B.index(U.depth-1)==0)return!1;let G=I.doc.resolve(U.start-2);Y=new NodeRange(G,G,U.depth),U.endIndex=0;G--)j=Fragment.from(I[G].type.create(I[G].attrs,j));M.step(new ReplaceAroundStep($.start-(N?2:0),$.end,$.start,$.end,new Slice(j,0,0),I.length,!0));let U=0;for(let G=0;GU.childCount>0&&U.firstChild.type==M);return j?I?N.node(j.depth-1).type==M?liftToOuterList($,I,M,j):liftOutOfList($,I,j):!0:!1}}function liftToOuterList(M,$,I,N){let B=M.tr,j=N.end,U=N.$to.end(N.depth);jse;te--)ee-=B.child(te).nodeSize,N.delete(ee-1,ee+1);let j=N.doc.resolve(I.start),U=j.nodeAfter;if(N.mapping.map(I.end)!=I.start+j.nodeAfter.nodeSize)return!1;let q=I.startIndex==0,Y=I.endIndex==B.childCount,K=j.node(-1),G=j.index(-1);if(!K.canReplace(G+(q?0:1),G+1,U.content.append(Y?Fragment.empty:Fragment.from(B))))return!1;let J=j.pos,Z=J+U.nodeSize;return N.step(new ReplaceAroundStep(J-(q?1:0),Z+(Y?1:0),J+1,Z-1,new Slice((q?Fragment.empty:Fragment.from(B.copy(Fragment.empty))).append(Y?Fragment.empty:Fragment.from(B.copy(Fragment.empty))),q?0:1,Y?0:1),q?0:1)),$(N.scrollIntoView()),!0}function sinkListItem$1(M){return function($,I){let{$from:N,$to:B}=$.selection,j=N.blockRange(B,K=>K.childCount>0&&K.firstChild.type==M);if(!j)return!1;let U=j.startIndex;if(U==0)return!1;let q=j.parent,Y=q.child(U-1);if(Y.type!=M)return!1;if(I){let K=Y.lastChild&&Y.lastChild.type==q.type,G=Fragment.from(K?M.create():null),J=new Slice(Fragment.from(M.create(null,Fragment.from(q.type.create(null,G)))),K?3:1,0),Z=j.start,ee=j.end;I($.tr.step(new ReplaceAroundStep(Z-(K?3:1),ee,Z,ee,J,1,!0)).scrollIntoView())}return!0}}function createChainableState(M){const{state:$,transaction:I}=M;let{selection:N}=I,{doc:B}=I,{storedMarks:j}=I;return{...$,apply:$.apply.bind($),applyTransaction:$.applyTransaction.bind($),plugins:$.plugins,schema:$.schema,reconfigure:$.reconfigure.bind($),toJSON:$.toJSON.bind($),get storedMarks(){return j},get selection(){return N},get doc(){return B},get tr(){return N=I.selection,B=I.doc,j=I.storedMarks,I}}}class CommandManager{constructor($){this.editor=$.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=$.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){const{rawCommands:$,editor:I,state:N}=this,{view:B}=I,{tr:j}=N,U=this.buildProps(j);return Object.fromEntries(Object.entries($).map(([q,Y])=>[q,(...G)=>{const J=Y(...G)(U);return!j.getMeta("preventDispatch")&&!this.hasCustomState&&B.dispatch(j),J}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain($,I=!0){const{rawCommands:N,editor:B,state:j}=this,{view:U}=B,q=[],Y=!!$,K=$||j.tr,G=()=>(!Y&&I&&!K.getMeta("preventDispatch")&&!this.hasCustomState&&U.dispatch(K),q.every(Z=>Z===!0)),J={...Object.fromEntries(Object.entries(N).map(([Z,ee])=>[Z,(...se)=>{const re=this.buildProps(K,I),ne=ee(...se)(re);return q.push(ne),J}])),run:G};return J}createCan($){const{rawCommands:I,state:N}=this,B=!1,j=$||N.tr,U=this.buildProps(j,B);return{...Object.fromEntries(Object.entries(I).map(([Y,K])=>[Y,(...G)=>K(...G)({...U,dispatch:void 0})])),chain:()=>this.createChain(j,B)}}buildProps($,I=!0){const{rawCommands:N,editor:B,state:j}=this,{view:U}=B,q={tr:$,editor:B,view:U,state:createChainableState({state:j,transaction:$}),dispatch:I?()=>{}:void 0,chain:()=>this.createChain($,I),can:()=>this.createCan($),get commands(){return Object.fromEntries(Object.entries(N).map(([Y,K])=>[Y,(...G)=>K(...G)(q)]))}};return q}}class EventEmitter{constructor(){this.callbacks={}}on($,I){return this.callbacks[$]||(this.callbacks[$]=[]),this.callbacks[$].push(I),this}emit($,...I){const N=this.callbacks[$];return N&&N.forEach(B=>B.apply(this,I)),this}off($,I){const N=this.callbacks[$];return N&&(I?this.callbacks[$]=N.filter(B=>B!==I):delete this.callbacks[$]),this}removeAllListeners(){this.callbacks={}}}function getExtensionField(M,$,I){return M.config[$]===void 0&&M.parent?getExtensionField(M.parent,$,I):typeof M.config[$]=="function"?M.config[$].bind({...I,parent:M.parent?getExtensionField(M.parent,$,I):null}):M.config[$]}function splitExtensions(M){const $=M.filter(B=>B.type==="extension"),I=M.filter(B=>B.type==="node"),N=M.filter(B=>B.type==="mark");return{baseExtensions:$,nodeExtensions:I,markExtensions:N}}function getAttributesFromExtensions(M){const $=[],{nodeExtensions:I,markExtensions:N}=splitExtensions(M),B=[...I,...N],j={default:null,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1};return M.forEach(U=>{const q={name:U.name,options:U.options,storage:U.storage,extensions:B},Y=getExtensionField(U,"addGlobalAttributes",q);if(!Y)return;Y().forEach(G=>{G.types.forEach(J=>{Object.entries(G.attributes).forEach(([Z,ee])=>{$.push({type:J,name:Z,attribute:{...j,...ee}})})})})}),B.forEach(U=>{const q={name:U.name,options:U.options,storage:U.storage},Y=getExtensionField(U,"addAttributes",q);if(!Y)return;const K=Y();Object.entries(K).forEach(([G,J])=>{const Z={...j,...J};typeof(Z==null?void 0:Z.default)=="function"&&(Z.default=Z.default()),Z!=null&&Z.isRequired&&(Z==null?void 0:Z.default)===void 0&&delete Z.default,$.push({type:U.name,name:G,attribute:Z})})}),$}function getNodeType(M,$){if(typeof M=="string"){if(!$.nodes[M])throw Error(`There is no node type named '${M}'. Maybe you forgot to add the extension?`);return $.nodes[M]}return M}function mergeAttributes(...M){return M.filter($=>!!$).reduce(($,I)=>{const N={...$};return Object.entries(I).forEach(([B,j])=>{if(!N[B]){N[B]=j;return}if(B==="class"){const q=j?j.split(" "):[],Y=N[B]?N[B].split(" "):[],K=q.filter(G=>!Y.includes(G));N[B]=[...Y,...K].join(" ")}else if(B==="style"){const q=j?j.split(";").map(G=>G.trim()).filter(Boolean):[],Y=N[B]?N[B].split(";").map(G=>G.trim()).filter(Boolean):[],K=new Map;Y.forEach(G=>{const[J,Z]=G.split(":").map(ee=>ee.trim());K.set(J,Z)}),q.forEach(G=>{const[J,Z]=G.split(":").map(ee=>ee.trim());K.set(J,Z)}),N[B]=Array.from(K.entries()).map(([G,J])=>`${G}: ${J}`).join("; ")}else N[B]=j}),N},{})}function getRenderedAttributes(M,$){return $.filter(I=>I.type===M.type.name).filter(I=>I.attribute.rendered).map(I=>I.attribute.renderHTML?I.attribute.renderHTML(M.attrs)||{}:{[I.name]:M.attrs[I.name]}).reduce((I,N)=>mergeAttributes(I,N),{})}function isFunction$5(M){return typeof M=="function"}function callOrReturn(M,$=void 0,...I){return isFunction$5(M)?$?M.bind($)(...I):M(...I):M}function isEmptyObject(M={}){return Object.keys(M).length===0&&M.constructor===Object}function fromString(M){return typeof M!="string"?M:M.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(M):M==="true"?!0:M==="false"?!1:M}function injectExtensionAttributesToParseRule(M,$){return"style"in M?M:{...M,getAttrs:I=>{const N=M.getAttrs?M.getAttrs(I):M.attrs;if(N===!1)return!1;const B=$.reduce((j,U)=>{const q=U.attribute.parseHTML?U.attribute.parseHTML(I):fromString(I.getAttribute(U.name));return q==null?j:{...j,[U.name]:q}},{});return{...N,...B}}}}function cleanUpSchemaItem(M){return Object.fromEntries(Object.entries(M).filter(([$,I])=>$==="attrs"&&isEmptyObject(I)?!1:I!=null))}function getSchemaByResolvedExtensions(M,$){var I;const N=getAttributesFromExtensions(M),{nodeExtensions:B,markExtensions:j}=splitExtensions(M),U=(I=B.find(K=>getExtensionField(K,"topNode")))===null||I===void 0?void 0:I.name,q=Object.fromEntries(B.map(K=>{const G=N.filter(ne=>ne.type===K.name),J={name:K.name,options:K.options,storage:K.storage,editor:$},Z=M.reduce((ne,le)=>{const me=getExtensionField(le,"extendNodeSchema",J);return{...ne,...me?me(K):{}}},{}),ee=cleanUpSchemaItem({...Z,content:callOrReturn(getExtensionField(K,"content",J)),marks:callOrReturn(getExtensionField(K,"marks",J)),group:callOrReturn(getExtensionField(K,"group",J)),inline:callOrReturn(getExtensionField(K,"inline",J)),atom:callOrReturn(getExtensionField(K,"atom",J)),selectable:callOrReturn(getExtensionField(K,"selectable",J)),draggable:callOrReturn(getExtensionField(K,"draggable",J)),code:callOrReturn(getExtensionField(K,"code",J)),whitespace:callOrReturn(getExtensionField(K,"whitespace",J)),defining:callOrReturn(getExtensionField(K,"defining",J)),isolating:callOrReturn(getExtensionField(K,"isolating",J)),attrs:Object.fromEntries(G.map(ne=>{var le;return[ne.name,{default:(le=ne==null?void 0:ne.attribute)===null||le===void 0?void 0:le.default}]}))}),te=callOrReturn(getExtensionField(K,"parseHTML",J));te&&(ee.parseDOM=te.map(ne=>injectExtensionAttributesToParseRule(ne,G)));const se=getExtensionField(K,"renderHTML",J);se&&(ee.toDOM=ne=>se({node:ne,HTMLAttributes:getRenderedAttributes(ne,G)}));const re=getExtensionField(K,"renderText",J);return re&&(ee.toText=re),[K.name,ee]})),Y=Object.fromEntries(j.map(K=>{const G=N.filter(re=>re.type===K.name),J={name:K.name,options:K.options,storage:K.storage,editor:$},Z=M.reduce((re,ne)=>{const le=getExtensionField(ne,"extendMarkSchema",J);return{...re,...le?le(K):{}}},{}),ee=cleanUpSchemaItem({...Z,inclusive:callOrReturn(getExtensionField(K,"inclusive",J)),excludes:callOrReturn(getExtensionField(K,"excludes",J)),group:callOrReturn(getExtensionField(K,"group",J)),spanning:callOrReturn(getExtensionField(K,"spanning",J)),code:callOrReturn(getExtensionField(K,"code",J)),attrs:Object.fromEntries(G.map(re=>{var ne;return[re.name,{default:(ne=re==null?void 0:re.attribute)===null||ne===void 0?void 0:ne.default}]}))}),te=callOrReturn(getExtensionField(K,"parseHTML",J));te&&(ee.parseDOM=te.map(re=>injectExtensionAttributesToParseRule(re,G)));const se=getExtensionField(K,"renderHTML",J);return se&&(ee.toDOM=re=>se({mark:re,HTMLAttributes:getRenderedAttributes(re,G)})),[K.name,ee]}));return new Schema({topNode:U,nodes:q,marks:Y})}function getSchemaTypeByName(M,$){return $.nodes[M]||$.marks[M]||null}function isExtensionRulesEnabled(M,$){return Array.isArray($)?$.some(I=>(typeof I=="string"?I:I.name)===M.name):$}const getTextContentFromNodes=(M,$=500)=>{let I="";const N=M.parentOffset;return M.parent.nodesBetween(Math.max(0,N-$),N,(B,j,U,q)=>{var Y,K;const G=((K=(Y=B.type.spec).toText)===null||K===void 0?void 0:K.call(Y,{node:B,pos:j,parent:U,index:q}))||B.textContent||"%leaf%";I+=B.isAtom&&!B.isText?G:G.slice(0,Math.max(0,N-j))}),I};function isRegExp$4(M){return Object.prototype.toString.call(M)==="[object RegExp]"}class InputRule{constructor($){this.find=$.find,this.handler=$.handler}}const inputRuleMatcherHandler=(M,$)=>{if(isRegExp$4($))return $.exec(M);const I=$(M);if(!I)return null;const N=[I.text];return N.index=I.index,N.input=M,N.data=I.data,I.replaceWith&&(I.text.includes(I.replaceWith)||console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'),N.push(I.replaceWith)),N};function run$1(M){var $;const{editor:I,from:N,to:B,text:j,rules:U,plugin:q}=M,{view:Y}=I;if(Y.composing)return!1;const K=Y.state.doc.resolve(N);if(K.parent.type.spec.code||!(($=K.nodeBefore||K.nodeAfter)===null||$===void 0)&&$.marks.find(Z=>Z.type.spec.code))return!1;let G=!1;const J=getTextContentFromNodes(K)+j;return U.forEach(Z=>{if(G)return;const ee=inputRuleMatcherHandler(J,Z.find);if(!ee)return;const te=Y.state.tr,se=createChainableState({state:Y.state,transaction:te}),re={from:N-(ee[0].length-j.length),to:B},{commands:ne,chain:le,can:me}=new CommandManager({editor:I,state:se});Z.handler({state:se,range:re,match:ee,commands:ne,chain:le,can:me})===null||!te.steps.length||(te.setMeta(q,{transform:te,from:N,to:B,text:j}),Y.dispatch(te),G=!0)}),G}function inputRulesPlugin(M){const{editor:$,rules:I}=M,N=new Plugin({state:{init(){return null},apply(B,j){const U=B.getMeta(N);if(U)return U;const q=B.getMeta("applyInputRules");return!!q&&setTimeout(()=>{const{from:K,text:G}=q,J=K+G.length;run$1({editor:$,from:K,to:J,text:G,rules:I,plugin:N})}),B.selectionSet||B.docChanged?null:j}},props:{handleTextInput(B,j,U,q){return run$1({editor:$,from:j,to:U,text:q,rules:I,plugin:N})},handleDOMEvents:{compositionend:B=>(setTimeout(()=>{const{$cursor:j}=B.state.selection;j&&run$1({editor:$,from:j.pos,to:j.pos,text:"",rules:I,plugin:N})}),!1)},handleKeyDown(B,j){if(j.key!=="Enter")return!1;const{$cursor:U}=B.state.selection;return U?run$1({editor:$,from:U.pos,to:U.pos,text:` +`,rules:I,plugin:N}):!1}},isInputRules:!0});return N}function getType(M){return Object.prototype.toString.call(M).slice(8,-1)}function isPlainObject$1(M){return getType(M)!=="Object"?!1:M.constructor===Object&&Object.getPrototypeOf(M)===Object.prototype}function mergeDeep(M,$){const I={...M};return isPlainObject$1(M)&&isPlainObject$1($)&&Object.keys($).forEach(N=>{isPlainObject$1($[N])&&isPlainObject$1(M[N])?I[N]=mergeDeep(M[N],$[N]):I[N]=$[N]}),I}class Mark{constructor($={}){this.type="mark",this.name="mark",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...$},this.name=this.config.name,$.defaultOptions&&Object.keys($.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=callOrReturn(getExtensionField(this,"addOptions",{name:this.name}))),this.storage=callOrReturn(getExtensionField(this,"addStorage",{name:this.name,options:this.options}))||{}}static create($={}){return new Mark($)}configure($={}){const I=this.extend({...this.config,addOptions:()=>mergeDeep(this.options,$)});return I.name=this.name,I.parent=this.parent,I}extend($={}){const I=new Mark($);return I.parent=this,this.child=I,I.name=$.name?$.name:I.parent.name,$.defaultOptions&&Object.keys($.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${I.name}".`),I.options=callOrReturn(getExtensionField(I,"addOptions",{name:I.name})),I.storage=callOrReturn(getExtensionField(I,"addStorage",{name:I.name,options:I.options})),I}static handleExit({editor:$,mark:I}){const{tr:N}=$.state,B=$.state.selection.$from;if(B.pos===B.end()){const U=B.marks();if(!!!U.find(K=>(K==null?void 0:K.type.name)===I.name))return!1;const Y=U.find(K=>(K==null?void 0:K.type.name)===I.name);return Y&&N.removeStoredMark(Y),N.insertText(" ",B.pos),$.view.dispatch(N),!0}return!1}}function isNumber$4(M){return typeof M=="number"}class PasteRule{constructor($){this.find=$.find,this.handler=$.handler}}const pasteRuleMatcherHandler=(M,$,I)=>{if(isRegExp$4($))return[...M.matchAll($)];const N=$(M,I);return N?N.map(B=>{const j=[B.text];return j.index=B.index,j.input=M,j.data=B.data,B.replaceWith&&(B.text.includes(B.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),j.push(B.replaceWith)),j}):[]};function run(M){const{editor:$,state:I,from:N,to:B,rule:j,pasteEvent:U,dropEvent:q}=M,{commands:Y,chain:K,can:G}=new CommandManager({editor:$,state:I}),J=[];return I.doc.nodesBetween(N,B,(ee,te)=>{if(!ee.isTextblock||ee.type.spec.code)return;const se=Math.max(N,te),re=Math.min(B,te+ee.content.size),ne=ee.textBetween(se-te,re-te,void 0,"");pasteRuleMatcherHandler(ne,j.find,U).forEach(me=>{if(me.index===void 0)return;const ue=se+me.index+1,_e=ue+me[0].length,fe={from:I.tr.mapping.map(ue),to:I.tr.mapping.map(_e)},ge=j.handler({state:I,range:fe,match:me,commands:Y,chain:K,can:G,pasteEvent:U,dropEvent:q});J.push(ge)})}),J.every(ee=>ee!==null)}const createClipboardPasteEvent=M=>{var $;const I=new ClipboardEvent("paste",{clipboardData:new DataTransfer});return($=I.clipboardData)===null||$===void 0||$.setData("text/html",M),I};function pasteRulesPlugin(M){const{editor:$,rules:I}=M;let N=null,B=!1,j=!1,U=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,q=typeof DragEvent<"u"?new DragEvent("drop"):null;const Y=({state:G,from:J,to:Z,rule:ee,pasteEvt:te})=>{const se=G.tr,re=createChainableState({state:G,transaction:se});if(!(!run({editor:$,state:re,from:Math.max(J-1,0),to:Z.b-1,rule:ee,pasteEvent:te,dropEvent:q})||!se.steps.length))return q=typeof DragEvent<"u"?new DragEvent("drop"):null,U=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,se};return I.map(G=>new Plugin({view(J){const Z=ee=>{var te;N=!((te=J.dom.parentElement)===null||te===void 0)&&te.contains(ee.target)?J.dom.parentElement:null};return window.addEventListener("dragstart",Z),{destroy(){window.removeEventListener("dragstart",Z)}}},props:{handleDOMEvents:{drop:(J,Z)=>(j=N===J.dom.parentElement,q=Z,!1),paste:(J,Z)=>{var ee;const te=(ee=Z.clipboardData)===null||ee===void 0?void 0:ee.getData("text/html");return U=Z,B=!!(te!=null&&te.includes("data-pm-slice")),!1}}},appendTransaction:(J,Z,ee)=>{const te=J[0],se=te.getMeta("uiEvent")==="paste"&&!B,re=te.getMeta("uiEvent")==="drop"&&!j,ne=te.getMeta("applyPasteRules"),le=!!ne;if(!se&&!re&&!le)return;if(le){const{from:_e,text:fe}=ne,ge=_e+fe.length,ye=createClipboardPasteEvent(fe);return Y({rule:G,state:ee,from:_e,to:{b:ge},pasteEvt:ye})}const me=Z.doc.content.findDiffStart(ee.doc.content),ue=Z.doc.content.findDiffEnd(ee.doc.content);if(!(!isNumber$4(me)||!ue||me===ue.b))return Y({rule:G,state:ee,from:me,to:ue,pasteEvt:U})}}))}function findDuplicates(M){const $=M.filter((I,N)=>M.indexOf(I)!==N);return Array.from(new Set($))}class ExtensionManager{constructor($,I){this.splittableMarks=[],this.editor=I,this.extensions=ExtensionManager.resolve($),this.schema=getSchemaByResolvedExtensions(this.extensions,I),this.setupExtensions()}static resolve($){const I=ExtensionManager.sort(ExtensionManager.flatten($)),N=findDuplicates(I.map(B=>B.name));return N.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${N.map(B=>`'${B}'`).join(", ")}]. This can lead to issues.`),I}static flatten($){return $.map(I=>{const N={name:I.name,options:I.options,storage:I.storage},B=getExtensionField(I,"addExtensions",N);return B?[I,...this.flatten(B())]:I}).flat(10)}static sort($){return $.sort((N,B)=>{const j=getExtensionField(N,"priority")||100,U=getExtensionField(B,"priority")||100;return j>U?-1:j{const N={name:I.name,options:I.options,storage:I.storage,editor:this.editor,type:getSchemaTypeByName(I.name,this.schema)},B=getExtensionField(I,"addCommands",N);return B?{...$,...B()}:$},{})}get plugins(){const{editor:$}=this,I=ExtensionManager.sort([...this.extensions].reverse()),N=[],B=[],j=I.map(U=>{const q={name:U.name,options:U.options,storage:U.storage,editor:$,type:getSchemaTypeByName(U.name,this.schema)},Y=[],K=getExtensionField(U,"addKeyboardShortcuts",q);let G={};if(U.type==="mark"&&getExtensionField(U,"exitable",q)&&(G.ArrowRight=()=>Mark.handleExit({editor:$,mark:U})),K){const se=Object.fromEntries(Object.entries(K()).map(([re,ne])=>[re,()=>ne({editor:$})]));G={...G,...se}}const J=keymap(G);Y.push(J);const Z=getExtensionField(U,"addInputRules",q);isExtensionRulesEnabled(U,$.options.enableInputRules)&&Z&&N.push(...Z());const ee=getExtensionField(U,"addPasteRules",q);isExtensionRulesEnabled(U,$.options.enablePasteRules)&&ee&&B.push(...ee());const te=getExtensionField(U,"addProseMirrorPlugins",q);if(te){const se=te();Y.push(...se)}return Y}).flat();return[inputRulesPlugin({editor:$,rules:N}),...pasteRulesPlugin({editor:$,rules:B}),...j]}get attributes(){return getAttributesFromExtensions(this.extensions)}get nodeViews(){const{editor:$}=this,{nodeExtensions:I}=splitExtensions(this.extensions);return Object.fromEntries(I.filter(N=>!!getExtensionField(N,"addNodeView")).map(N=>{const B=this.attributes.filter(Y=>Y.type===N.name),j={name:N.name,options:N.options,storage:N.storage,editor:$,type:getNodeType(N.name,this.schema)},U=getExtensionField(N,"addNodeView",j);if(!U)return[];const q=(Y,K,G,J,Z)=>{const ee=getRenderedAttributes(Y,B);return U()({node:Y,view:K,getPos:G,decorations:J,innerDecorations:Z,editor:$,extension:N,HTMLAttributes:ee})};return[N.name,q]}))}setupExtensions(){this.extensions.forEach($=>{var I;this.editor.extensionStorage[$.name]=$.storage;const N={name:$.name,options:$.options,storage:$.storage,editor:this.editor,type:getSchemaTypeByName($.name,this.schema)};$.type==="mark"&&(!((I=callOrReturn(getExtensionField($,"keepOnSplit",N)))!==null&&I!==void 0)||I)&&this.splittableMarks.push($.name);const B=getExtensionField($,"onBeforeCreate",N),j=getExtensionField($,"onCreate",N),U=getExtensionField($,"onUpdate",N),q=getExtensionField($,"onSelectionUpdate",N),Y=getExtensionField($,"onTransaction",N),K=getExtensionField($,"onFocus",N),G=getExtensionField($,"onBlur",N),J=getExtensionField($,"onDestroy",N);B&&this.editor.on("beforeCreate",B),j&&this.editor.on("create",j),U&&this.editor.on("update",U),q&&this.editor.on("selectionUpdate",q),Y&&this.editor.on("transaction",Y),K&&this.editor.on("focus",K),G&&this.editor.on("blur",G),J&&this.editor.on("destroy",J)})}}class Extension{constructor($={}){this.type="extension",this.name="extension",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...$},this.name=this.config.name,$.defaultOptions&&Object.keys($.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=callOrReturn(getExtensionField(this,"addOptions",{name:this.name}))),this.storage=callOrReturn(getExtensionField(this,"addStorage",{name:this.name,options:this.options}))||{}}static create($={}){return new Extension($)}configure($={}){const I=this.extend({...this.config,addOptions:()=>mergeDeep(this.options,$)});return I.name=this.name,I.parent=this.parent,I}extend($={}){const I=new Extension({...this.config,...$});return I.parent=this,this.child=I,I.name=$.name?$.name:I.parent.name,$.defaultOptions&&Object.keys($.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${I.name}".`),I.options=callOrReturn(getExtensionField(I,"addOptions",{name:I.name})),I.storage=callOrReturn(getExtensionField(I,"addStorage",{name:I.name,options:I.options})),I}}function getTextBetween(M,$,I){const{from:N,to:B}=$,{blockSeparator:j=` + +`,textSerializers:U={}}=I||{};let q="";return M.nodesBetween(N,B,(Y,K,G,J)=>{var Z;Y.isBlock&&K>N&&(q+=j);const ee=U==null?void 0:U[Y.type.name];if(ee)return G&&(q+=ee({node:Y,pos:K,parent:G,index:J,range:$})),!1;Y.isText&&(q+=(Z=Y==null?void 0:Y.text)===null||Z===void 0?void 0:Z.slice(Math.max(N,K)-K,B-K))}),q}function getTextSerializersFromSchema(M){return Object.fromEntries(Object.entries(M.nodes).filter(([,$])=>$.spec.toText).map(([$,I])=>[$,I.spec.toText]))}const ClipboardTextSerializer=Extension.create({name:"clipboardTextSerializer",addOptions(){return{blockSeparator:void 0}},addProseMirrorPlugins(){return[new Plugin({key:new PluginKey("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{const{editor:M}=this,{state:$,schema:I}=M,{doc:N,selection:B}=$,{ranges:j}=B,U=Math.min(...j.map(G=>G.$from.pos)),q=Math.max(...j.map(G=>G.$to.pos)),Y=getTextSerializersFromSchema(I);return getTextBetween(N,{from:U,to:q},{...this.options.blockSeparator!==void 0?{blockSeparator:this.options.blockSeparator}:{},textSerializers:Y})}}})]}}),blur=()=>({editor:M,view:$})=>(requestAnimationFrame(()=>{var I;M.isDestroyed||($.dom.blur(),(I=window==null?void 0:window.getSelection())===null||I===void 0||I.removeAllRanges())}),!0),clearContent=(M=!1)=>({commands:$})=>$.setContent("",M),clearNodes=()=>({state:M,tr:$,dispatch:I})=>{const{selection:N}=$,{ranges:B}=N;return I&&B.forEach(({$from:j,$to:U})=>{M.doc.nodesBetween(j.pos,U.pos,(q,Y)=>{if(q.type.isText)return;const{doc:K,mapping:G}=$,J=K.resolve(G.map(Y)),Z=K.resolve(G.map(Y+q.nodeSize)),ee=J.blockRange(Z);if(!ee)return;const te=liftTarget(ee);if(q.type.isTextblock){const{defaultType:se}=J.parent.contentMatchAt(J.index());$.setNodeMarkup(ee.start,se)}(te||te===0)&&$.lift(ee,te)})}),!0},command=M=>$=>M($),createParagraphNear=()=>({state:M,dispatch:$})=>createParagraphNear$1(M,$),cut=(M,$)=>({editor:I,tr:N})=>{const{state:B}=I,j=B.doc.slice(M.from,M.to);N.deleteRange(M.from,M.to);const U=N.mapping.map($);return N.insert(U,j.content),N.setSelection(new TextSelection(N.doc.resolve(U-1))),!0},deleteCurrentNode=()=>({tr:M,dispatch:$})=>{const{selection:I}=M,N=I.$anchor.node();if(N.content.size>0)return!1;const B=M.selection.$anchor;for(let j=B.depth;j>0;j-=1)if(B.node(j).type===N.type){if($){const q=B.before(j),Y=B.after(j);M.delete(q,Y).scrollIntoView()}return!0}return!1},deleteNode=M=>({tr:$,state:I,dispatch:N})=>{const B=getNodeType(M,I.schema),j=$.selection.$anchor;for(let U=j.depth;U>0;U-=1)if(j.node(U).type===B){if(N){const Y=j.before(U),K=j.after(U);$.delete(Y,K).scrollIntoView()}return!0}return!1},deleteRange=M=>({tr:$,dispatch:I})=>{const{from:N,to:B}=M;return I&&$.delete(N,B),!0},deleteSelection=()=>({state:M,dispatch:$})=>deleteSelection$1(M,$),enter=()=>({commands:M})=>M.keyboardShortcut("Enter"),exitCode=()=>({state:M,dispatch:$})=>exitCode$1(M,$);function objectIncludes$1(M,$,I={strict:!0}){const N=Object.keys($);return N.length?N.every(B=>I.strict?$[B]===M[B]:isRegExp$4($[B])?$[B].test(M[B]):$[B]===M[B]):!0}function findMarkInSet(M,$,I={}){return M.find(N=>N.type===$&&objectIncludes$1(N.attrs,I))}function isMarkInSet(M,$,I={}){return!!findMarkInSet(M,$,I)}function getMarkRange(M,$,I={}){if(!M||!$)return;let N=M.parent.childAfter(M.parentOffset);if(M.parentOffset===N.offset&&N.offset!==0&&(N=M.parent.childBefore(M.parentOffset)),!N.node)return;const B=findMarkInSet([...N.node.marks],$,I);if(!B)return;let j=N.index,U=M.start()+N.offset,q=j+1,Y=U+N.node.nodeSize;for(findMarkInSet([...N.node.marks],$,I);j>0&&B.isInSet(M.parent.child(j-1).marks);)j-=1,U-=M.parent.child(j).nodeSize;for(;q({tr:I,state:N,dispatch:B})=>{const j=getMarkType(M,N.schema),{doc:U,selection:q}=I,{$from:Y,from:K,to:G}=q;if(B){const J=getMarkRange(Y,j,$);if(J&&J.from<=K&&J.to>=G){const Z=TextSelection.create(U,J.from,J.to);I.setSelection(Z)}}return!0},first$1=M=>$=>{const I=typeof M=="function"?M($):M;for(let N=0;N({editor:I,view:N,tr:B,dispatch:j})=>{$={scrollIntoView:!0,...$};const U=()=>{isiOS()&&N.dom.focus(),requestAnimationFrame(()=>{I.isDestroyed||(N.focus(),$!=null&&$.scrollIntoView&&I.commands.scrollIntoView())})};if(N.hasFocus()&&M===null||M===!1)return!0;if(j&&M===null&&!isTextSelection(I.state.selection))return U(),!0;const q=resolveFocusPosition(B.doc,M)||I.state.selection,Y=I.state.selection.eq(q);return j&&(Y||B.setSelection(q),Y&&B.storedMarks&&B.setStoredMarks(B.storedMarks),U()),!0},forEach$1=(M,$)=>I=>M.every((N,B)=>$(N,{...I,index:B})),insertContent=(M,$)=>({tr:I,commands:N})=>N.insertContentAt({from:I.selection.from,to:I.selection.to},M,$),removeWhitespaces=M=>{const $=M.childNodes;for(let I=$.length-1;I>=0;I-=1){const N=$[I];N.nodeType===3&&N.nodeValue&&/^(\n\s\s|\n)$/.test(N.nodeValue)?M.removeChild(N):N.nodeType===1&&removeWhitespaces(N)}return M};function elementFromString(M){const $=`${M}`,I=new window.DOMParser().parseFromString($,"text/html").body;return removeWhitespaces(I)}function createNodeFromContent(M,$,I){I={slice:!0,parseOptions:{},...I};const N=typeof M=="object"&&M!==null,B=typeof M=="string";if(N)try{if(Array.isArray(M)&&M.length>0)return Fragment.fromArray(M.map(q=>$.nodeFromJSON(q)));const U=$.nodeFromJSON(M);return I.errorOnInvalidContent&&U.check(),U}catch(j){if(I.errorOnInvalidContent)throw new Error("[tiptap error]: Invalid JSON content",{cause:j});return console.warn("[tiptap warn]: Invalid content.","Passed value:",M,"Error:",j),createNodeFromContent("",$,I)}if(B){if(I.errorOnInvalidContent){let U=!1,q="";const Y=new Schema({topNode:$.spec.topNode,marks:$.spec.marks,nodes:$.spec.nodes.append({__tiptap__private__unknown__catch__all__node:{content:"inline*",group:"block",parseDOM:[{tag:"*",getAttrs:K=>(U=!0,q=typeof K=="string"?K:K.outerHTML,null)}]}})});if(I.slice?DOMParser.fromSchema(Y).parseSlice(elementFromString(M),I.parseOptions):DOMParser.fromSchema(Y).parse(elementFromString(M),I.parseOptions),I.errorOnInvalidContent&&U)throw new Error("[tiptap error]: Invalid HTML content",{cause:new Error(`Invalid element found: ${q}`)})}const j=DOMParser.fromSchema($);return I.slice?j.parseSlice(elementFromString(M),I.parseOptions).content:j.parse(elementFromString(M),I.parseOptions)}return createNodeFromContent("",$,I)}function selectionToInsertionEnd(M,$,I){const N=M.steps.length-1;if(N<$)return;const B=M.steps[N];if(!(B instanceof ReplaceStep||B instanceof ReplaceAroundStep))return;const j=M.mapping.maps[N];let U=0;j.forEach((q,Y,K,G)=>{U===0&&(U=G)}),M.setSelection(Selection.near(M.doc.resolve(U),I))}const isFragment=M=>!("type"in M),insertContentAt=(M,$,I)=>({tr:N,dispatch:B,editor:j})=>{var U;if(B){I={parseOptions:{},updateSelection:!0,applyInputRules:!1,applyPasteRules:!1,...I};let q;try{q=createNodeFromContent($,j.schema,{parseOptions:{preserveWhitespace:"full",...I.parseOptions},errorOnInvalidContent:(U=I.errorOnInvalidContent)!==null&&U!==void 0?U:j.options.enableContentCheck})}catch(te){return j.emit("contentError",{editor:j,error:te,disableCollaboration:()=>{console.error("[tiptap error]: Unable to disable collaboration at this point in time")}}),!1}let{from:Y,to:K}=typeof M=="number"?{from:M,to:M}:{from:M.from,to:M.to},G=!0,J=!0;if((isFragment(q)?q:[q]).forEach(te=>{te.check(),G=G?te.isText&&te.marks.length===0:!1,J=J?te.isBlock:!1}),Y===K&&J){const{parent:te}=N.doc.resolve(Y);te.isTextblock&&!te.type.spec.code&&!te.childCount&&(Y-=1,K+=1)}let ee;G?(Array.isArray($)?ee=$.map(te=>te.text||"").join(""):typeof $=="object"&&$&&$.text?ee=$.text:ee=$,N.insertText(ee,Y,K)):(ee=q,N.replaceWith(Y,K,ee)),I.updateSelection&&selectionToInsertionEnd(N,N.steps.length-1,-1),I.applyInputRules&&N.setMeta("applyInputRules",{from:Y,text:ee}),I.applyPasteRules&&N.setMeta("applyPasteRules",{from:Y,text:ee})}return!0},joinUp=()=>({state:M,dispatch:$})=>joinUp$1(M,$),joinDown=()=>({state:M,dispatch:$})=>joinDown$1(M,$),joinBackward=()=>({state:M,dispatch:$})=>joinBackward$1(M,$),joinForward=()=>({state:M,dispatch:$})=>joinForward$1(M,$),joinItemBackward=()=>({state:M,dispatch:$,tr:I})=>{try{const N=joinPoint(M.doc,M.selection.$from.pos,-1);return N==null?!1:(I.join(N,2),$&&$(I),!0)}catch{return!1}},joinItemForward=()=>({state:M,dispatch:$,tr:I})=>{try{const N=joinPoint(M.doc,M.selection.$from.pos,1);return N==null?!1:(I.join(N,2),$&&$(I),!0)}catch{return!1}},joinTextblockBackward=()=>({state:M,dispatch:$})=>joinTextblockBackward$1(M,$),joinTextblockForward=()=>({state:M,dispatch:$})=>joinTextblockForward$1(M,$);function isMacOS(){return typeof navigator<"u"?/Mac/.test(navigator.platform):!1}function normalizeKeyName(M){const $=M.split(/-(?!$)/);let I=$[$.length-1];I==="Space"&&(I=" ");let N,B,j,U;for(let q=0;q<$.length-1;q+=1){const Y=$[q];if(/^(cmd|meta|m)$/i.test(Y))U=!0;else if(/^a(lt)?$/i.test(Y))N=!0;else if(/^(c|ctrl|control)$/i.test(Y))B=!0;else if(/^s(hift)?$/i.test(Y))j=!0;else if(/^mod$/i.test(Y))isiOS()||isMacOS()?U=!0:B=!0;else throw new Error(`Unrecognized modifier name: ${Y}`)}return N&&(I=`Alt-${I}`),B&&(I=`Ctrl-${I}`),U&&(I=`Meta-${I}`),j&&(I=`Shift-${I}`),I}const keyboardShortcut=M=>({editor:$,view:I,tr:N,dispatch:B})=>{const j=normalizeKeyName(M).split(/-(?!$)/),U=j.find(K=>!["Alt","Ctrl","Meta","Shift"].includes(K)),q=new KeyboardEvent("keydown",{key:U==="Space"?" ":U,altKey:j.includes("Alt"),ctrlKey:j.includes("Ctrl"),metaKey:j.includes("Meta"),shiftKey:j.includes("Shift"),bubbles:!0,cancelable:!0}),Y=$.captureTransaction(()=>{I.someProp("handleKeyDown",K=>K(I,q))});return Y==null||Y.steps.forEach(K=>{const G=K.map(N.mapping);G&&B&&N.maybeStep(G)}),!0};function isNodeActive(M,$,I={}){const{from:N,to:B,empty:j}=M.selection,U=$?getNodeType($,M.schema):null,q=[];M.doc.nodesBetween(N,B,(J,Z)=>{if(J.isText)return;const ee=Math.max(N,Z),te=Math.min(B,Z+J.nodeSize);q.push({node:J,from:ee,to:te})});const Y=B-N,K=q.filter(J=>U?U.name===J.node.type.name:!0).filter(J=>objectIncludes$1(J.node.attrs,I,{strict:!1}));return j?!!K.length:K.reduce((J,Z)=>J+Z.to-Z.from,0)>=Y}const lift=(M,$={})=>({state:I,dispatch:N})=>{const B=getNodeType(M,I.schema);return isNodeActive(I,B,$)?lift$1(I,N):!1},liftEmptyBlock=()=>({state:M,dispatch:$})=>liftEmptyBlock$1(M,$),liftListItem=M=>({state:$,dispatch:I})=>{const N=getNodeType(M,$.schema);return liftListItem$1(N)($,I)},newlineInCode=()=>({state:M,dispatch:$})=>newlineInCode$1(M,$);function getSchemaTypeNameByName(M,$){return $.nodes[M]?"node":$.marks[M]?"mark":null}function deleteProps(M,$){const I=typeof $=="string"?[$]:$;return Object.keys(M).reduce((N,B)=>(I.includes(B)||(N[B]=M[B]),N),{})}const resetAttributes=(M,$)=>({tr:I,state:N,dispatch:B})=>{let j=null,U=null;const q=getSchemaTypeNameByName(typeof M=="string"?M:M.name,N.schema);return q?(q==="node"&&(j=getNodeType(M,N.schema)),q==="mark"&&(U=getMarkType(M,N.schema)),B&&I.selection.ranges.forEach(Y=>{N.doc.nodesBetween(Y.$from.pos,Y.$to.pos,(K,G)=>{j&&j===K.type&&I.setNodeMarkup(G,void 0,deleteProps(K.attrs,$)),U&&K.marks.length&&K.marks.forEach(J=>{U===J.type&&I.addMark(G,G+K.nodeSize,U.create(deleteProps(J.attrs,$)))})})}),!0):!1},scrollIntoView=()=>({tr:M,dispatch:$})=>($&&M.scrollIntoView(),!0),selectAll=()=>({tr:M,commands:$})=>$.setTextSelection({from:0,to:M.doc.content.size}),selectNodeBackward=()=>({state:M,dispatch:$})=>selectNodeBackward$1(M,$),selectNodeForward=()=>({state:M,dispatch:$})=>selectNodeForward$1(M,$),selectParentNode=()=>({state:M,dispatch:$})=>selectParentNode$1(M,$),selectTextblockEnd=()=>({state:M,dispatch:$})=>selectTextblockEnd$1(M,$),selectTextblockStart=()=>({state:M,dispatch:$})=>selectTextblockStart$1(M,$);function createDocument(M,$,I={},N={}){return createNodeFromContent(M,$,{slice:!1,parseOptions:I,errorOnInvalidContent:N.errorOnInvalidContent})}const setContent$1=(M,$=!1,I={},N={})=>({editor:B,tr:j,dispatch:U,commands:q})=>{var Y,K;const{doc:G}=j;if(I.preserveWhitespace!=="full"){const J=createDocument(M,B.schema,I,{errorOnInvalidContent:(Y=N.errorOnInvalidContent)!==null&&Y!==void 0?Y:B.options.enableContentCheck});return U&&j.replaceWith(0,G.content.size,J).setMeta("preventUpdate",!$),!0}return U&&j.setMeta("preventUpdate",!$),q.insertContentAt({from:0,to:G.content.size},M,{parseOptions:I,errorOnInvalidContent:(K=N.errorOnInvalidContent)!==null&&K!==void 0?K:B.options.enableContentCheck})};function getMarkAttributes(M,$){const I=getMarkType($,M.schema),{from:N,to:B,empty:j}=M.selection,U=[];j?(M.storedMarks&&U.push(...M.storedMarks),U.push(...M.selection.$head.marks())):M.doc.nodesBetween(N,B,Y=>{U.push(...Y.marks)});const q=U.find(Y=>Y.type.name===I.name);return q?{...q.attrs}:{}}function combineTransactionSteps(M,$){const I=new Transform(M);return $.forEach(N=>{N.steps.forEach(B=>{I.step(B)})}),I}function defaultBlockAt(M){for(let $=0;${$(N)&&I.push({node:N,pos:B})}),I}function findChildrenInRange(M,$,I){const N=[];return M.nodesBetween($.from,$.to,(B,j)=>{I(B)&&N.push({node:B,pos:j})}),N}function findParentNodeClosestToPos(M,$){for(let I=M.depth;I>0;I-=1){const N=M.node(I);if($(N))return{pos:I>0?M.before(I):0,start:M.start(I),depth:I,node:N}}}function findParentNode(M){return $=>findParentNodeClosestToPos($.$from,M)}function getHTMLFromFragment(M,$){const I=DOMSerializer.fromSchema($).serializeFragment(M),B=document.implementation.createHTMLDocument().createElement("div");return B.appendChild(I),B.innerHTML}function getSchema(M,$){const I=ExtensionManager.resolve(M);return getSchemaByResolvedExtensions(I,$)}function generateHTML(M,$){const I=getSchema($),N=Node$2.fromJSON(I,M);return getHTMLFromFragment(N.content,I)}function generateJSON(M,$){const I=getSchema($),N=elementFromString(M);return DOMParser.fromSchema(I).parse(N).toJSON()}function getText(M,$){const I={from:0,to:M.content.size};return getTextBetween(M,I,$)}function generateText(M,$,I){const{blockSeparator:N=` + +`,textSerializers:B={}}=I||{},j=getSchema($),U=Node$2.fromJSON(j,M);return getText(U,{blockSeparator:N,textSerializers:{...getTextSerializersFromSchema(j),...B}})}function getNodeAttributes(M,$){const I=getNodeType($,M.schema),{from:N,to:B}=M.selection,j=[];M.doc.nodesBetween(N,B,q=>{j.push(q)});const U=j.reverse().find(q=>q.type.name===I.name);return U?{...U.attrs}:{}}function getAttributes(M,$){const I=getSchemaTypeNameByName(typeof $=="string"?$:$.name,M.schema);return I==="node"?getNodeAttributes(M,$):I==="mark"?getMarkAttributes(M,$):{}}function removeDuplicates(M,$=JSON.stringify){const I={};return M.filter(N=>{const B=$(N);return Object.prototype.hasOwnProperty.call(I,B)?!1:I[B]=!0})}function simplifyChangedRanges(M){const $=removeDuplicates(M);return $.length===1?$:$.filter((I,N)=>!$.filter((j,U)=>U!==N).some(j=>I.oldRange.from>=j.oldRange.from&&I.oldRange.to<=j.oldRange.to&&I.newRange.from>=j.newRange.from&&I.newRange.to<=j.newRange.to))}function getChangedRanges(M){const{mapping:$,steps:I}=M,N=[];return $.maps.forEach((B,j)=>{const U=[];if(B.ranges.length)B.forEach((q,Y)=>{U.push({from:q,to:Y})});else{const{from:q,to:Y}=I[j];if(q===void 0||Y===void 0)return;U.push({from:q,to:Y})}U.forEach(({from:q,to:Y})=>{const K=$.slice(j).map(q,-1),G=$.slice(j).map(Y),J=$.invert().map(K,-1),Z=$.invert().map(G);N.push({oldRange:{from:J,to:Z},newRange:{from:K,to:G}})})}),simplifyChangedRanges(N)}function getDebugJSON(M,$=0){const N=M.type===M.type.schema.topNodeType?0:1,B=$,j=B+M.nodeSize,U=M.marks.map(K=>{const G={type:K.type.name};return Object.keys(K.attrs).length&&(G.attrs={...K.attrs}),G}),q={...M.attrs},Y={type:M.type.name,from:B,to:j};return Object.keys(q).length&&(Y.attrs=q),U.length&&(Y.marks=U),M.content.childCount&&(Y.content=[],M.forEach((K,G)=>{var J;(J=Y.content)===null||J===void 0||J.push(getDebugJSON(K,$+G+N))})),M.text&&(Y.text=M.text),Y}function getMarksBetween(M,$,I){const N=[];return M===$?I.resolve(M).marks().forEach(B=>{const j=I.resolve(M),U=getMarkRange(j,B.type);U&&N.push({mark:B,...U})}):I.nodesBetween(M,$,(B,j)=>{!B||(B==null?void 0:B.nodeSize)===void 0||N.push(...B.marks.map(U=>({from:j,to:j+B.nodeSize,mark:U})))}),N}const getNodeAtPosition=(M,$,I,N=20)=>{const B=M.doc.resolve(I);let j=N,U=null;for(;j>0&&U===null;){const q=B.node(j);(q==null?void 0:q.type.name)===$?U=q:j-=1}return[U,j]};function getSplittedAttributes(M,$,I){return Object.fromEntries(Object.entries(I).filter(([N])=>{const B=M.find(j=>j.type===$&&j.name===N);return B?B.attribute.keepOnSplit:!1}))}function isMarkActive(M,$,I={}){const{empty:N,ranges:B}=M.selection,j=$?getMarkType($,M.schema):null;if(N)return!!(M.storedMarks||M.selection.$from.marks()).filter(J=>j?j.name===J.type.name:!0).find(J=>objectIncludes$1(J.attrs,I,{strict:!1}));let U=0;const q=[];if(B.forEach(({$from:J,$to:Z})=>{const ee=J.pos,te=Z.pos;M.doc.nodesBetween(ee,te,(se,re)=>{if(!se.isText&&!se.marks.length)return;const ne=Math.max(ee,re),le=Math.min(te,re+se.nodeSize),me=le-ne;U+=me,q.push(...se.marks.map(ue=>({mark:ue,from:ne,to:le})))})}),U===0)return!1;const Y=q.filter(J=>j?j.name===J.mark.type.name:!0).filter(J=>objectIncludes$1(J.mark.attrs,I,{strict:!1})).reduce((J,Z)=>J+Z.to-Z.from,0),K=q.filter(J=>j?J.mark.type!==j&&J.mark.type.excludes(j):!0).reduce((J,Z)=>J+Z.to-Z.from,0);return(Y>0?Y+K:Y)>=U}function isActive(M,$,I={}){if(!$)return isNodeActive(M,null,I)||isMarkActive(M,null,I);const N=getSchemaTypeNameByName($,M.schema);return N==="node"?isNodeActive(M,$,I):N==="mark"?isMarkActive(M,$,I):!1}const isAtEndOfNode=(M,$)=>{const{$from:I,$to:N,$anchor:B}=M.selection;if($){const j=findParentNode(q=>q.type.name===$)(M.selection);if(!j)return!1;const U=M.doc.resolve(j.pos+1);return B.pos+1===U.end()}return!(N.parentOffset{const{$from:$,$to:I}=M.selection;return!($.parentOffset>0||$.pos!==I.pos)};function isList(M,$){const{nodeExtensions:I}=splitExtensions($),N=I.find(U=>U.name===M);if(!N)return!1;const B={name:N.name,options:N.options,storage:N.storage},j=callOrReturn(getExtensionField(N,"group",B));return typeof j!="string"?!1:j.split(" ").includes("list")}function isNodeEmpty(M,{checkChildren:$=!0,ignoreWhitespace:I=!1}={}){var N;if(I){if(M.type.name==="hardBreak")return!0;if(M.isText)return/^\s*$/m.test((N=M.text)!==null&&N!==void 0?N:"")}if(M.isText)return!M.text;if(M.isAtom||M.isLeaf)return!1;if(M.content.childCount===0)return!0;if($){let B=!0;return M.content.forEach(j=>{B!==!1&&(isNodeEmpty(j,{ignoreWhitespace:I,checkChildren:$})||(B=!1))}),B}return!1}function isNodeSelection(M){return M instanceof NodeSelection}function posToDOMRect(M,$,I){const B=M.state.doc.content.size,j=minMax($,0,B),U=minMax(I,0,B),q=M.coordsAtPos(j),Y=M.coordsAtPos(U,-1),K=Math.min(q.top,Y.top),G=Math.max(q.bottom,Y.bottom),J=Math.min(q.left,Y.left),Z=Math.max(q.right,Y.right),ee=Z-J,te=G-K,ne={top:K,bottom:G,left:J,right:Z,width:ee,height:te,x:J,y:K};return{...ne,toJSON:()=>ne}}function canSetMark(M,$,I){var N;const{selection:B}=$;let j=null;if(isTextSelection(B)&&(j=B.$cursor),j){const q=(N=M.storedMarks)!==null&&N!==void 0?N:j.marks();return!!I.isInSet(q)||!q.some(Y=>Y.type.excludes(I))}const{ranges:U}=B;return U.some(({$from:q,$to:Y})=>{let K=q.depth===0?M.doc.inlineContent&&M.doc.type.allowsMarkType(I):!1;return M.doc.nodesBetween(q.pos,Y.pos,(G,J,Z)=>{if(K)return!1;if(G.isInline){const ee=!Z||Z.type.allowsMarkType(I),te=!!I.isInSet(G.marks)||!G.marks.some(se=>se.type.excludes(I));K=ee&&te}return!K}),K})}const setMark=(M,$={})=>({tr:I,state:N,dispatch:B})=>{const{selection:j}=I,{empty:U,ranges:q}=j,Y=getMarkType(M,N.schema);if(B)if(U){const K=getMarkAttributes(N,Y);I.addStoredMark(Y.create({...K,...$}))}else q.forEach(K=>{const G=K.$from.pos,J=K.$to.pos;N.doc.nodesBetween(G,J,(Z,ee)=>{const te=Math.max(ee,G),se=Math.min(ee+Z.nodeSize,J);Z.marks.find(ne=>ne.type===Y)?Z.marks.forEach(ne=>{Y===ne.type&&I.addMark(te,se,Y.create({...ne.attrs,...$}))}):I.addMark(te,se,Y.create($))})});return canSetMark(N,I,Y)},setMeta=(M,$)=>({tr:I})=>(I.setMeta(M,$),!0),setNode=(M,$={})=>({state:I,dispatch:N,chain:B})=>{const j=getNodeType(M,I.schema);return j.isTextblock?B().command(({commands:U})=>setBlockType(j,$)(I)?!0:U.clearNodes()).command(({state:U})=>setBlockType(j,$)(U,N)).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},setNodeSelection=M=>({tr:$,dispatch:I})=>{if(I){const{doc:N}=$,B=minMax(M,0,N.content.size),j=NodeSelection.create(N,B);$.setSelection(j)}return!0},setTextSelection=M=>({tr:$,dispatch:I})=>{if(I){const{doc:N}=$,{from:B,to:j}=typeof M=="number"?{from:M,to:M}:M,U=TextSelection.atStart(N).from,q=TextSelection.atEnd(N).to,Y=minMax(B,U,q),K=minMax(j,U,q),G=TextSelection.create(N,Y,K);$.setSelection(G)}return!0},sinkListItem=M=>({state:$,dispatch:I})=>{const N=getNodeType(M,$.schema);return sinkListItem$1(N)($,I)};function ensureMarks(M,$){const I=M.storedMarks||M.selection.$to.parentOffset&&M.selection.$from.marks();if(I){const N=I.filter(B=>$==null?void 0:$.includes(B.type.name));M.tr.ensureMarks(N)}}const splitBlock=({keepMarks:M=!0}={})=>({tr:$,state:I,dispatch:N,editor:B})=>{const{selection:j,doc:U}=$,{$from:q,$to:Y}=j,K=B.extensionManager.attributes,G=getSplittedAttributes(K,q.node().type.name,q.node().attrs);if(j instanceof NodeSelection&&j.node.isBlock)return!q.parentOffset||!canSplit(U,q.pos)?!1:(N&&(M&&ensureMarks(I,B.extensionManager.splittableMarks),$.split(q.pos).scrollIntoView()),!0);if(!q.parent.isBlock)return!1;const J=Y.parentOffset===Y.parent.content.size,Z=q.depth===0?void 0:defaultBlockAt(q.node(-1).contentMatchAt(q.indexAfter(-1)));let ee=J&&Z?[{type:Z,attrs:G}]:void 0,te=canSplit($.doc,$.mapping.map(q.pos),1,ee);if(!ee&&!te&&canSplit($.doc,$.mapping.map(q.pos),1,Z?[{type:Z}]:void 0)&&(te=!0,ee=Z?[{type:Z,attrs:G}]:void 0),N){if(te&&(j instanceof TextSelection&&$.deleteSelection(),$.split($.mapping.map(q.pos),1,ee),Z&&!J&&!q.parentOffset&&q.parent.type!==Z)){const se=$.mapping.map(q.before()),re=$.doc.resolve(se);q.node(-1).canReplaceWith(re.index(),re.index()+1,Z)&&$.setNodeMarkup($.mapping.map(q.before()),Z)}M&&ensureMarks(I,B.extensionManager.splittableMarks),$.scrollIntoView()}return te},splitListItem=(M,$={})=>({tr:I,state:N,dispatch:B,editor:j})=>{var U;const q=getNodeType(M,N.schema),{$from:Y,$to:K}=N.selection,G=N.selection.node;if(G&&G.isBlock||Y.depth<2||!Y.sameParent(K))return!1;const J=Y.node(-1);if(J.type!==q)return!1;const Z=j.extensionManager.attributes;if(Y.parent.content.size===0&&Y.node(-1).childCount===Y.indexAfter(-1)){if(Y.depth===2||Y.node(-3).type!==q||Y.index(-2)!==Y.node(-2).childCount-1)return!1;if(B){let ne=Fragment.empty;const le=Y.index(-1)?1:Y.index(-2)?2:3;for(let ye=Y.depth-le;ye>=Y.depth-3;ye-=1)ne=Fragment.from(Y.node(ye).copy(ne));const me=Y.indexAfter(-1){if(ge>-1)return!1;ye.isTextblock&&ye.content.size===0&&(ge=xe+1)}),ge>-1&&I.setSelection(TextSelection.near(I.doc.resolve(ge))),I.scrollIntoView()}return!0}const ee=K.pos===Y.end()?J.contentMatchAt(0).defaultType:null,te={...getSplittedAttributes(Z,J.type.name,J.attrs),...$},se={...getSplittedAttributes(Z,Y.node().type.name,Y.node().attrs),...$};I.delete(Y.pos,K.pos);const re=ee?[{type:q,attrs:te},{type:ee,attrs:se}]:[{type:q,attrs:te}];if(!canSplit(I.doc,Y.pos,2))return!1;if(B){const{selection:ne,storedMarks:le}=N,{splittableMarks:me}=j.extensionManager,ue=le||ne.$to.parentOffset&&ne.$from.marks();if(I.split(Y.pos,2,re).scrollIntoView(),!ue||!B)return!0;const _e=ue.filter(fe=>me.includes(fe.type.name));I.ensureMarks(_e)}return!0},joinListBackwards=(M,$)=>{const I=findParentNode(U=>U.type===$)(M.selection);if(!I)return!0;const N=M.doc.resolve(Math.max(0,I.pos-1)).before(I.depth);if(N===void 0)return!0;const B=M.doc.nodeAt(N);return I.node.type===(B==null?void 0:B.type)&&canJoin(M.doc,I.pos)&&M.join(I.pos),!0},joinListForwards=(M,$)=>{const I=findParentNode(U=>U.type===$)(M.selection);if(!I)return!0;const N=M.doc.resolve(I.start).after(I.depth);if(N===void 0)return!0;const B=M.doc.nodeAt(N);return I.node.type===(B==null?void 0:B.type)&&canJoin(M.doc,N)&&M.join(N),!0},toggleList=(M,$,I,N={})=>({editor:B,tr:j,state:U,dispatch:q,chain:Y,commands:K,can:G})=>{const{extensions:J,splittableMarks:Z}=B.extensionManager,ee=getNodeType(M,U.schema),te=getNodeType($,U.schema),{selection:se,storedMarks:re}=U,{$from:ne,$to:le}=se,me=ne.blockRange(le),ue=re||se.$to.parentOffset&&se.$from.marks();if(!me)return!1;const _e=findParentNode(fe=>isList(fe.type.name,J))(se);if(me.depth>=1&&_e&&me.depth-_e.depth<=1){if(_e.node.type===ee)return K.liftListItem(te);if(isList(_e.node.type.name,J)&&ee.validContent(_e.node.content)&&q)return Y().command(()=>(j.setNodeMarkup(_e.pos,ee),!0)).command(()=>joinListBackwards(j,ee)).command(()=>joinListForwards(j,ee)).run()}return!I||!ue||!q?Y().command(()=>G().wrapInList(ee,N)?!0:K.clearNodes()).wrapInList(ee,N).command(()=>joinListBackwards(j,ee)).command(()=>joinListForwards(j,ee)).run():Y().command(()=>{const fe=G().wrapInList(ee,N),ge=ue.filter(ye=>Z.includes(ye.type.name));return j.ensureMarks(ge),fe?!0:K.clearNodes()}).wrapInList(ee,N).command(()=>joinListBackwards(j,ee)).command(()=>joinListForwards(j,ee)).run()},toggleMark=(M,$={},I={})=>({state:N,commands:B})=>{const{extendEmptyMarkRange:j=!1}=I,U=getMarkType(M,N.schema);return isMarkActive(N,U,$)?B.unsetMark(U,{extendEmptyMarkRange:j}):B.setMark(U,$)},toggleNode=(M,$,I={})=>({state:N,commands:B})=>{const j=getNodeType(M,N.schema),U=getNodeType($,N.schema),q=isNodeActive(N,j,I);let Y;return N.selection.$anchor.sameParent(N.selection.$head)&&(Y=N.selection.$anchor.parent.attrs),q?B.setNode(U,Y):B.setNode(j,{...Y,...I})},toggleWrap=(M,$={})=>({state:I,commands:N})=>{const B=getNodeType(M,I.schema);return isNodeActive(I,B,$)?N.lift(B):N.wrapIn(B,$)},undoInputRule=()=>({state:M,dispatch:$})=>{const I=M.plugins;for(let N=0;N=0;Y-=1)U.step(q.steps[Y].invert(q.docs[Y]));if(j.text){const Y=U.doc.resolve(j.from).marks();U.replaceWith(j.from,j.to,M.schema.text(j.text,Y))}else U.delete(j.from,j.to)}return!0}}return!1},unsetAllMarks=()=>({tr:M,dispatch:$})=>{const{selection:I}=M,{empty:N,ranges:B}=I;return N||$&&B.forEach(j=>{M.removeMark(j.$from.pos,j.$to.pos)}),!0},unsetMark=(M,$={})=>({tr:I,state:N,dispatch:B})=>{var j;const{extendEmptyMarkRange:U=!1}=$,{selection:q}=I,Y=getMarkType(M,N.schema),{$from:K,empty:G,ranges:J}=q;if(!B)return!0;if(G&&U){let{from:Z,to:ee}=q;const te=(j=K.marks().find(re=>re.type===Y))===null||j===void 0?void 0:j.attrs,se=getMarkRange(K,Y,te);se&&(Z=se.from,ee=se.to),I.removeMark(Z,ee,Y)}else J.forEach(Z=>{I.removeMark(Z.$from.pos,Z.$to.pos,Y)});return I.removeStoredMark(Y),!0},updateAttributes=(M,$={})=>({tr:I,state:N,dispatch:B})=>{let j=null,U=null;const q=getSchemaTypeNameByName(typeof M=="string"?M:M.name,N.schema);return q?(q==="node"&&(j=getNodeType(M,N.schema)),q==="mark"&&(U=getMarkType(M,N.schema)),B&&I.selection.ranges.forEach(Y=>{const K=Y.$from.pos,G=Y.$to.pos;N.doc.nodesBetween(K,G,(J,Z)=>{j&&j===J.type&&I.setNodeMarkup(Z,void 0,{...J.attrs,...$}),U&&J.marks.length&&J.marks.forEach(ee=>{if(U===ee.type){const te=Math.max(Z,K),se=Math.min(Z+J.nodeSize,G);I.addMark(te,se,U.create({...ee.attrs,...$}))}})})}),!0):!1},wrapIn=(M,$={})=>({state:I,dispatch:N})=>{const B=getNodeType(M,I.schema);return wrapIn$1(B,$)(I,N)},wrapInList=(M,$={})=>({state:I,dispatch:N})=>{const B=getNodeType(M,I.schema);return wrapInList$1(B,$)(I,N)};var commands=Object.freeze({__proto__:null,blur,clearContent,clearNodes,command,createParagraphNear,cut,deleteCurrentNode,deleteNode,deleteRange,deleteSelection,enter,exitCode,extendMarkRange,first:first$1,focus,forEach:forEach$1,insertContent,insertContentAt,joinBackward,joinDown,joinForward,joinItemBackward,joinItemForward,joinTextblockBackward,joinTextblockForward,joinUp,keyboardShortcut,lift,liftEmptyBlock,liftListItem,newlineInCode,resetAttributes,scrollIntoView,selectAll,selectNodeBackward,selectNodeForward,selectParentNode,selectTextblockEnd,selectTextblockStart,setContent:setContent$1,setMark,setMeta,setNode,setNodeSelection,setTextSelection,sinkListItem,splitBlock,splitListItem,toggleList,toggleMark,toggleNode,toggleWrap,undoInputRule,unsetAllMarks,unsetMark,updateAttributes,wrapIn,wrapInList});const Commands=Extension.create({name:"commands",addCommands(){return{...commands}}}),Drop=Extension.create({name:"drop",addProseMirrorPlugins(){return[new Plugin({key:new PluginKey("tiptapDrop"),props:{handleDrop:(M,$,I,N)=>{this.editor.emit("drop",{editor:this.editor,event:$,slice:I,moved:N})}}})]}}),Editable=Extension.create({name:"editable",addProseMirrorPlugins(){return[new Plugin({key:new PluginKey("editable"),props:{editable:()=>this.editor.options.editable}})]}}),FocusEvents=Extension.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:M}=this;return[new Plugin({key:new PluginKey("focusEvents"),props:{handleDOMEvents:{focus:($,I)=>{M.isFocused=!0;const N=M.state.tr.setMeta("focus",{event:I}).setMeta("addToHistory",!1);return $.dispatch(N),!1},blur:($,I)=>{M.isFocused=!1;const N=M.state.tr.setMeta("blur",{event:I}).setMeta("addToHistory",!1);return $.dispatch(N),!1}}}})]}}),Keymap=Extension.create({name:"keymap",addKeyboardShortcuts(){const M=()=>this.editor.commands.first(({commands:U})=>[()=>U.undoInputRule(),()=>U.command(({tr:q})=>{const{selection:Y,doc:K}=q,{empty:G,$anchor:J}=Y,{pos:Z,parent:ee}=J,te=J.parent.isTextblock&&Z>0?q.doc.resolve(Z-1):J,se=te.parent.type.spec.isolating,re=J.pos-J.parentOffset,ne=se&&te.parent.childCount===1?re===J.pos:Selection.atStart(K).from===Z;return!G||!ee.type.isTextblock||ee.textContent.length||!ne||ne&&J.parent.type.name==="paragraph"?!1:U.clearNodes()}),()=>U.deleteSelection(),()=>U.joinBackward(),()=>U.selectNodeBackward()]),$=()=>this.editor.commands.first(({commands:U})=>[()=>U.deleteSelection(),()=>U.deleteCurrentNode(),()=>U.joinForward(),()=>U.selectNodeForward()]),N={Enter:()=>this.editor.commands.first(({commands:U})=>[()=>U.newlineInCode(),()=>U.createParagraphNear(),()=>U.liftEmptyBlock(),()=>U.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:M,"Mod-Backspace":M,"Shift-Backspace":M,Delete:$,"Mod-Delete":$,"Mod-a":()=>this.editor.commands.selectAll()},B={...N},j={...N,"Ctrl-h":M,"Alt-Backspace":M,"Ctrl-d":$,"Ctrl-Alt-Backspace":$,"Alt-Delete":$,"Alt-d":$,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return isiOS()||isMacOS()?j:B},addProseMirrorPlugins(){return[new Plugin({key:new PluginKey("clearDocument"),appendTransaction:(M,$,I)=>{const N=M.some(se=>se.docChanged)&&!$.doc.eq(I.doc),B=M.some(se=>se.getMeta("preventClearDocument"));if(!N||B)return;const{empty:j,from:U,to:q}=$.selection,Y=Selection.atStart($.doc).from,K=Selection.atEnd($.doc).to;if(j||!(U===Y&&q===K)||!isNodeEmpty(I.doc))return;const Z=I.tr,ee=createChainableState({state:I,transaction:Z}),{commands:te}=new CommandManager({editor:this.editor,state:ee});if(te.clearNodes(),!!Z.steps.length)return Z}})]}}),Paste=Extension.create({name:"paste",addProseMirrorPlugins(){return[new Plugin({key:new PluginKey("tiptapPaste"),props:{handlePaste:(M,$,I)=>{this.editor.emit("paste",{editor:this.editor,event:$,slice:I})}}})]}}),Tabindex=Extension.create({name:"tabindex",addProseMirrorPlugins(){return[new Plugin({key:new PluginKey("tabindex"),props:{attributes:()=>this.editor.isEditable?{tabindex:"0"}:{}}})]}});var index$2=Object.freeze({__proto__:null,ClipboardTextSerializer,Commands,Drop,Editable,FocusEvents,Keymap,Paste,Tabindex});class NodePos{get name(){return this.node.type.name}constructor($,I,N=!1,B=null){this.currentNode=null,this.actualDepth=null,this.isBlock=N,this.resolvedPos=$,this.editor=I,this.currentNode=B}get node(){return this.currentNode||this.resolvedPos.node()}get element(){return this.editor.view.domAtPos(this.pos).node}get depth(){var $;return($=this.actualDepth)!==null&&$!==void 0?$:this.resolvedPos.depth}get pos(){return this.resolvedPos.pos}get content(){return this.node.content}set content($){let I=this.from,N=this.to;if(this.isBlock){if(this.content.size===0){console.error(`You can’t set content on a block node. Tried to set content on ${this.name} at ${this.pos}`);return}I=this.from+1,N=this.to-1}this.editor.commands.insertContentAt({from:I,to:N},$)}get attributes(){return this.node.attrs}get textContent(){return this.node.textContent}get size(){return this.node.nodeSize}get from(){return this.isBlock?this.pos:this.resolvedPos.start(this.resolvedPos.depth)}get range(){return{from:this.from,to:this.to}}get to(){return this.isBlock?this.pos+this.size:this.resolvedPos.end(this.resolvedPos.depth)+(this.node.isText?0:1)}get parent(){if(this.depth===0)return null;const $=this.resolvedPos.start(this.resolvedPos.depth-1),I=this.resolvedPos.doc.resolve($);return new NodePos(I,this.editor)}get before(){let $=this.resolvedPos.doc.resolve(this.from-(this.isBlock?1:2));return $.depth!==this.depth&&($=this.resolvedPos.doc.resolve(this.from-3)),new NodePos($,this.editor)}get after(){let $=this.resolvedPos.doc.resolve(this.to+(this.isBlock?2:1));return $.depth!==this.depth&&($=this.resolvedPos.doc.resolve(this.to+3)),new NodePos($,this.editor)}get children(){const $=[];return this.node.content.forEach((I,N)=>{const B=I.isBlock&&!I.isTextblock,j=this.pos+N+1,U=this.resolvedPos.doc.resolve(j);if(!B&&U.depth<=this.depth)return;const q=new NodePos(U,this.editor,B,B?I:null);B&&(q.actualDepth=this.depth+1),$.push(new NodePos(U,this.editor,B,B?I:null))}),$}get firstChild(){return this.children[0]||null}get lastChild(){const $=this.children;return $[$.length-1]||null}closest($,I={}){let N=null,B=this.parent;for(;B&&!N;){if(B.node.type.name===$)if(Object.keys(I).length>0){const j=B.node.attrs,U=Object.keys(I);for(let q=0;q{N&&B.length>0||(U.node.type.name===$&&j.every(Y=>I[Y]===U.node.attrs[Y])&&B.push(U),!(N&&B.length>0)&&(B=B.concat(U.querySelectorAll($,I,N))))}),B}setAttribute($){const I=this.editor.state.selection;this.editor.chain().setTextSelection(this.from).updateAttributes(this.node.type.name,$).setTextSelection(I.from).run()}}const style$1=`.ProseMirror { + position: relative; +} + +.ProseMirror { + word-wrap: break-word; + white-space: pre-wrap; + white-space: break-spaces; + -webkit-font-variant-ligatures: none; + font-variant-ligatures: none; + font-feature-settings: "liga" 0; /* the above doesn't seem to work in Edge */ +} + +.ProseMirror [contenteditable="false"] { + white-space: normal; +} + +.ProseMirror [contenteditable="false"] [contenteditable="true"] { + white-space: pre-wrap; +} + +.ProseMirror pre { + white-space: pre-wrap; +} + +img.ProseMirror-separator { + display: inline !important; + border: none !important; + margin: 0 !important; + width: 0 !important; + height: 0 !important; +} + +.ProseMirror-gapcursor { + display: none; + pointer-events: none; + position: absolute; + margin: 0; +} + +.ProseMirror-gapcursor:after { + content: ""; + display: block; + position: absolute; + top: -2px; + width: 20px; + border-top: 1px solid black; + animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite; +} + +@keyframes ProseMirror-cursor-blink { + to { + visibility: hidden; + } +} + +.ProseMirror-hideselection *::selection { + background: transparent; +} + +.ProseMirror-hideselection *::-moz-selection { + background: transparent; +} + +.ProseMirror-hideselection * { + caret-color: transparent; +} + +.ProseMirror-focused .ProseMirror-gapcursor { + display: block; +} + +.tippy-box[data-animation=fade][data-state=hidden] { + opacity: 0 +}`;function createStyleTag(M,$,I){const N=document.querySelector(`style[data-tiptap-style${I?`-${I}`:""}]`);if(N!==null)return N;const B=document.createElement("style");return $&&B.setAttribute("nonce",$),B.setAttribute(`data-tiptap-style${I?`-${I}`:""}`,""),B.innerHTML=M,document.getElementsByTagName("head")[0].appendChild(B),B}let Editor$1=class extends EventEmitter{constructor($={}){super(),this.isFocused=!1,this.isInitialized=!1,this.extensionStorage={},this.options={element:document.createElement("div"),content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,editorProps:{},parseOptions:{},coreExtensionOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,enableContentCheck:!1,onBeforeCreate:()=>null,onCreate:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null,onContentError:({error:I})=>{throw I},onPaste:()=>null,onDrop:()=>null},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.setOptions($),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.on("contentError",this.options.onContentError),this.createView(),this.injectCSS(),this.on("create",this.options.onCreate),this.on("update",this.options.onUpdate),this.on("selectionUpdate",this.options.onSelectionUpdate),this.on("transaction",this.options.onTransaction),this.on("focus",this.options.onFocus),this.on("blur",this.options.onBlur),this.on("destroy",this.options.onDestroy),this.on("drop",({event:I,slice:N,moved:B})=>this.options.onDrop(I,N,B)),this.on("paste",({event:I,slice:N})=>this.options.onPaste(I,N)),window.setTimeout(()=>{this.isDestroyed||(this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}),this.isInitialized=!0)},0)}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager.chain()}can(){return this.commandManager.can()}injectCSS(){this.options.injectCSS&&document&&(this.css=createStyleTag(style$1,this.options.injectNonce))}setOptions($={}){this.options={...this.options,...$},!(!this.view||!this.state||this.isDestroyed)&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable($,I=!0){this.setOptions({editable:$}),I&&this.emit("update",{editor:this,transaction:this.state.tr})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get state(){return this.view.state}registerPlugin($,I){const N=isFunction$5(I)?I($,[...this.state.plugins]):[...this.state.plugins,$],B=this.state.reconfigure({plugins:N});return this.view.updateState(B),B}unregisterPlugin($){if(this.isDestroyed)return;const I=typeof $=="string"?`${$}$`:$.key,N=this.state.reconfigure({plugins:this.state.plugins.filter(B=>!B.key.startsWith(I))});return this.view.updateState(N),N}createExtensionManager(){var $,I;const B=[...this.options.enableCoreExtensions?[Editable,ClipboardTextSerializer.configure({blockSeparator:(I=($=this.options.coreExtensionOptions)===null||$===void 0?void 0:$.clipboardTextSerializer)===null||I===void 0?void 0:I.blockSeparator}),Commands,FocusEvents,Keymap,Tabindex,Drop,Paste].filter(j=>typeof this.options.enableCoreExtensions=="object"?this.options.enableCoreExtensions[j.name]!==!1:!0):[],...this.options.extensions].filter(j=>["extension","node","mark"].includes(j==null?void 0:j.type));this.extensionManager=new ExtensionManager(B,this)}createCommandManager(){this.commandManager=new CommandManager({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createView(){let $;try{$=createDocument(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:this.options.enableContentCheck})}catch(j){if(!(j instanceof Error)||!["[tiptap error]: Invalid JSON content","[tiptap error]: Invalid HTML content"].includes(j.message))throw j;this.emit("contentError",{editor:this,error:j,disableCollaboration:()=>{this.options.extensions=this.options.extensions.filter(U=>U.name!=="collaboration"),this.createExtensionManager()}}),$=createDocument(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:!1})}const I=resolveFocusPosition($,this.options.autofocus);this.view=new EditorView(this.options.element,{...this.options.editorProps,dispatchTransaction:this.dispatchTransaction.bind(this),state:EditorState.create({doc:$,selection:I||void 0})});const N=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(N),this.createNodeViews(),this.prependClass();const B=this.view.dom;B.editor=this}createNodeViews(){this.view.isDestroyed||this.view.setProps({nodeViews:this.extensionManager.nodeViews})}prependClass(){this.view.dom.className=`tiptap ${this.view.dom.className}`}captureTransaction($){this.isCapturingTransaction=!0,$(),this.isCapturingTransaction=!1;const I=this.capturedTransaction;return this.capturedTransaction=null,I}dispatchTransaction($){if(this.view.isDestroyed)return;if(this.isCapturingTransaction){if(!this.capturedTransaction){this.capturedTransaction=$;return}$.steps.forEach(U=>{var q;return(q=this.capturedTransaction)===null||q===void 0?void 0:q.step(U)});return}const I=this.state.apply($),N=!this.state.selection.eq(I.selection);this.emit("beforeTransaction",{editor:this,transaction:$,nextState:I}),this.view.updateState(I),this.emit("transaction",{editor:this,transaction:$}),N&&this.emit("selectionUpdate",{editor:this,transaction:$});const B=$.getMeta("focus"),j=$.getMeta("blur");B&&this.emit("focus",{editor:this,event:B.event,transaction:$}),j&&this.emit("blur",{editor:this,event:j.event,transaction:$}),!(!$.docChanged||$.getMeta("preventUpdate"))&&this.emit("update",{editor:this,transaction:$})}getAttributes($){return getAttributes(this.state,$)}isActive($,I){const N=typeof $=="string"?$:null,B=typeof $=="string"?I:$;return isActive(this.state,N,B)}getJSON(){return this.state.doc.toJSON()}getHTML(){return getHTMLFromFragment(this.state.doc.content,this.schema)}getText($){const{blockSeparator:I=` + +`,textSerializers:N={}}=$||{};return getText(this.state.doc,{blockSeparator:I,textSerializers:{...getTextSerializersFromSchema(this.schema),...N}})}get isEmpty(){return isNodeEmpty(this.state.doc)}getCharacterCount(){return console.warn('[tiptap warn]: "editor.getCharacterCount()" is deprecated. Please use "editor.storage.characterCount.characters()" instead.'),this.state.doc.content.size-2}destroy(){if(this.emit("destroy"),this.view){const $=this.view.dom;$&&$.editor&&delete $.editor,this.view.destroy()}this.removeAllListeners()}get isDestroyed(){var $;return!(!(($=this.view)===null||$===void 0)&&$.docView)}$node($,I){var N;return((N=this.$doc)===null||N===void 0?void 0:N.querySelector($,I))||null}$nodes($,I){var N;return((N=this.$doc)===null||N===void 0?void 0:N.querySelectorAll($,I))||null}$pos($){const I=this.state.doc.resolve($);return new NodePos(I,this)}get $doc(){return this.$pos(0)}};function markInputRule(M){return new InputRule({find:M.find,handler:({state:$,range:I,match:N})=>{const B=callOrReturn(M.getAttributes,void 0,N);if(B===!1||B===null)return null;const{tr:j}=$,U=N[N.length-1],q=N[0];if(U){const Y=q.search(/\S/),K=I.from+q.indexOf(U),G=K+U.length;if(getMarksBetween(I.from,I.to,$.doc).filter(ee=>ee.mark.type.excluded.find(se=>se===M.type&&se!==ee.mark.type)).filter(ee=>ee.to>K).length)return null;GI.from&&j.delete(I.from+Y,K);const Z=I.from+Y+U.length;j.addMark(I.from+Y,Z,M.type.create(B||{})),j.removeStoredMark(M.type)}}})}function nodeInputRule(M){return new InputRule({find:M.find,handler:({state:$,range:I,match:N})=>{const B=callOrReturn(M.getAttributes,void 0,N)||{},{tr:j}=$,U=I.from;let q=I.to;const Y=M.type.create(B);if(N[1]){const K=N[0].lastIndexOf(N[1]);let G=U+K;G>q?G=q:q=G+N[1].length;const J=N[0][N[0].length-1];j.insertText(J,U+N[0].length-1),j.replaceWith(G,q,Y)}else if(N[0]){const K=M.type.isInline?U:U-1;j.insert(K,M.type.create(B)).delete(j.mapping.map(U),j.mapping.map(q))}j.scrollIntoView()}})}function textblockTypeInputRule(M){return new InputRule({find:M.find,handler:({state:$,range:I,match:N})=>{const B=$.doc.resolve(I.from),j=callOrReturn(M.getAttributes,void 0,N)||{};if(!B.node(-1).canReplaceWith(B.index(-1),B.indexAfter(-1),M.type))return null;$.tr.delete(I.from,I.to).setBlockType(I.from,I.from,M.type,j)}})}function textInputRule(M){return new InputRule({find:M.find,handler:({state:$,range:I,match:N})=>{let B=M.replace,j=I.from;const U=I.to;if(N[1]){const q=N[0].lastIndexOf(N[1]);B+=N[0].slice(q+N[1].length),j+=q;const Y=j-U;Y>0&&(B=N[0].slice(q-Y,q)+B,j=U)}$.tr.insertText(B,j,U)}})}function wrappingInputRule(M){return new InputRule({find:M.find,handler:({state:$,range:I,match:N,chain:B})=>{const j=callOrReturn(M.getAttributes,void 0,N)||{},U=$.tr.delete(I.from,I.to),Y=U.doc.resolve(I.from).blockRange(),K=Y&&findWrapping(Y,M.type,j);if(!K)return null;if(U.wrap(Y,K),M.keepMarks&&M.editor){const{selection:J,storedMarks:Z}=$,{splittableMarks:ee}=M.editor.extensionManager,te=Z||J.$to.parentOffset&&J.$from.marks();if(te){const se=te.filter(re=>ee.includes(re.type.name));U.ensureMarks(se)}}if(M.keepAttributes){const J=M.type.name==="bulletList"||M.type.name==="orderedList"?"listItem":"taskList";B().updateAttributes(J,j).run()}const G=U.doc.resolve(I.from-1).nodeBefore;G&&G.type===M.type&&canJoin(U.doc,I.from-1)&&(!M.joinPredicate||M.joinPredicate(N,G))&&U.join(I.from-1)}})}let Node$1=class pc{constructor($={}){this.type="node",this.name="node",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...$},this.name=this.config.name,$.defaultOptions&&Object.keys($.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=callOrReturn(getExtensionField(this,"addOptions",{name:this.name}))),this.storage=callOrReturn(getExtensionField(this,"addStorage",{name:this.name,options:this.options}))||{}}static create($={}){return new pc($)}configure($={}){const I=this.extend({...this.config,addOptions:()=>mergeDeep(this.options,$)});return I.name=this.name,I.parent=this.parent,I}extend($={}){const I=new pc($);return I.parent=this,this.child=I,I.name=$.name?$.name:I.parent.name,$.defaultOptions&&Object.keys($.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${I.name}".`),I.options=callOrReturn(getExtensionField(I,"addOptions",{name:I.name})),I.storage=callOrReturn(getExtensionField(I,"addStorage",{name:I.name,options:I.options})),I}};function isAndroid(){return navigator.platform==="Android"||/android/i.test(navigator.userAgent)}class NodeView{constructor($,I,N){this.isDragging=!1,this.component=$,this.editor=I.editor,this.options={stopEvent:null,ignoreMutation:null,...N},this.extension=I.extension,this.node=I.node,this.decorations=I.decorations,this.innerDecorations=I.innerDecorations,this.view=I.view,this.HTMLAttributes=I.HTMLAttributes,this.getPos=I.getPos,this.mount()}mount(){}get dom(){return this.editor.view.dom}get contentDOM(){return null}onDragStart($){var I,N,B,j,U,q,Y;const{view:K}=this.editor,G=$.target,J=G.nodeType===3?(I=G.parentElement)===null||I===void 0?void 0:I.closest("[data-drag-handle]"):G.closest("[data-drag-handle]");if(!this.dom||!((N=this.contentDOM)===null||N===void 0)&&N.contains(G)||!J)return;let Z=0,ee=0;if(this.dom!==J){const ne=this.dom.getBoundingClientRect(),le=J.getBoundingClientRect(),me=(B=$.offsetX)!==null&&B!==void 0?B:(j=$.nativeEvent)===null||j===void 0?void 0:j.offsetX,ue=(U=$.offsetY)!==null&&U!==void 0?U:(q=$.nativeEvent)===null||q===void 0?void 0:q.offsetY;Z=le.x-ne.x+me,ee=le.y-ne.y+ue}(Y=$.dataTransfer)===null||Y===void 0||Y.setDragImage(this.dom,Z,ee);const te=this.getPos();if(typeof te!="number")return;const se=NodeSelection.create(K.state.doc,te),re=K.state.tr.setSelection(se);K.dispatch(re)}stopEvent($){var I;if(!this.dom)return!1;if(typeof this.options.stopEvent=="function")return this.options.stopEvent({event:$});const N=$.target;if(!(this.dom.contains(N)&&!(!((I=this.contentDOM)===null||I===void 0)&&I.contains(N))))return!1;const j=$.type.startsWith("drag"),U=$.type==="drop";if((["INPUT","BUTTON","SELECT","TEXTAREA"].includes(N.tagName)||N.isContentEditable)&&!U&&!j)return!0;const{isEditable:Y}=this.editor,{isDragging:K}=this,G=!!this.node.type.spec.draggable,J=NodeSelection.isSelectable(this.node),Z=$.type==="copy",ee=$.type==="paste",te=$.type==="cut",se=$.type==="mousedown";if(!G&&J&&j&&$.preventDefault(),G&&j&&!K)return $.preventDefault(),!1;if(G&&Y&&!K&&se){const re=N.closest("[data-drag-handle]");re&&(this.dom===re||this.dom.contains(re))&&(this.isDragging=!0,document.addEventListener("dragend",()=>{this.isDragging=!1},{once:!0}),document.addEventListener("drop",()=>{this.isDragging=!1},{once:!0}),document.addEventListener("mouseup",()=>{this.isDragging=!1},{once:!0}))}return!(K||U||Z||ee||te||se&&J)}ignoreMutation($){return!this.dom||!this.contentDOM?!0:typeof this.options.ignoreMutation=="function"?this.options.ignoreMutation({mutation:$}):this.node.isLeaf||this.node.isAtom?!0:$.type==="selection"||this.dom.contains($.target)&&$.type==="childList"&&(isiOS()||isAndroid())&&this.editor.isFocused&&[...Array.from($.addedNodes),...Array.from($.removedNodes)].every(N=>N.isContentEditable)?!1:this.contentDOM===$.target&&$.type==="attributes"?!0:!this.contentDOM.contains($.target)}updateAttributes($){this.editor.commands.command(({tr:I})=>{const N=this.getPos();return typeof N!="number"?!1:(I.setNodeMarkup(N,void 0,{...this.node.attrs,...$}),!0)})}deleteNode(){const $=this.getPos();if(typeof $!="number")return;const I=$+this.node.nodeSize;this.editor.commands.deleteRange({from:$,to:I})}}function markPasteRule(M){return new PasteRule({find:M.find,handler:({state:$,range:I,match:N,pasteEvent:B})=>{const j=callOrReturn(M.getAttributes,void 0,N,B);if(j===!1||j===null)return null;const{tr:U}=$,q=N[N.length-1],Y=N[0];let K=I.to;if(q){const G=Y.search(/\S/),J=I.from+Y.indexOf(q),Z=J+q.length;if(getMarksBetween(I.from,I.to,$.doc).filter(te=>te.mark.type.excluded.find(re=>re===M.type&&re!==te.mark.type)).filter(te=>te.to>J).length)return null;ZI.from&&U.delete(I.from+G,J),K=I.from+G+q.length,U.addMark(I.from+G,K,M.type.create(j||{})),U.removeStoredMark(M.type)}}})}function escapeForRegEx(M){return M.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}function isString$6(M){return typeof M=="string"}function nodePasteRule(M){return new PasteRule({find:M.find,handler({match:$,chain:I,range:N,pasteEvent:B}){const j=callOrReturn(M.getAttributes,void 0,$,B),U=callOrReturn(M.getContent,void 0,j);if(j===!1||j===null)return null;const q={type:M.type.name,attrs:j};U&&(q.content=U),$.input&&I().deleteRange(N).insertContentAt(N.from,q)}})}function textPasteRule(M){return new PasteRule({find:M.find,handler:({state:$,range:I,match:N})=>{let B=M.replace,j=I.from;const U=I.to;if(N[1]){const q=N[0].lastIndexOf(N[1]);B+=N[0].slice(q+N[1].length),j+=q;const Y=j-U;Y>0&&(B=N[0].slice(q-Y,q)+B,j=U)}$.tr.insertText(B,j,U)}})}class Tracker{constructor($){this.transaction=$,this.currentStep=this.transaction.steps.length}map($){let I=!1;return{position:this.transaction.steps.slice(this.currentStep).reduce((B,j)=>{const U=j.getMap().mapResult(B);return U.deleted&&(I=!0),U.pos},$),deleted:I}}}const core$2=Object.freeze(Object.defineProperty({__proto__:null,CommandManager,Editor:Editor$1,Extension,InputRule,Mark,Node:Node$1,NodePos,NodeView,PasteRule,Tracker,callOrReturn,combineTransactionSteps,createChainableState,createDocument,createNodeFromContent,createStyleTag,defaultBlockAt,deleteProps,elementFromString,escapeForRegEx,extensions:index$2,findChildren,findChildrenInRange,findDuplicates,findParentNode,findParentNodeClosestToPos,fromString,generateHTML,generateJSON,generateText,getAttributes,getAttributesFromExtensions,getChangedRanges,getDebugJSON,getExtensionField,getHTMLFromFragment,getMarkAttributes,getMarkRange,getMarkType,getMarksBetween,getNodeAtPosition,getNodeAttributes,getNodeType,getRenderedAttributes,getSchema,getSchemaByResolvedExtensions,getSchemaTypeByName,getSchemaTypeNameByName,getSplittedAttributes,getText,getTextBetween,getTextContentFromNodes,getTextSerializersFromSchema,injectExtensionAttributesToParseRule,inputRulesPlugin,isActive,isAtEndOfNode,isAtStartOfNode,isEmptyObject,isExtensionRulesEnabled,isFunction:isFunction$5,isList,isMacOS,isMarkActive,isNodeActive,isNodeEmpty,isNodeSelection,isNumber:isNumber$4,isPlainObject:isPlainObject$1,isRegExp:isRegExp$4,isString:isString$6,isTextSelection,isiOS,markInputRule,markPasteRule,mergeAttributes,mergeDeep,minMax,nodeInputRule,nodePasteRule,objectIncludes:objectIncludes$1,pasteRulesPlugin,posToDOMRect,removeDuplicates,resolveFocusPosition,selectionToInsertionEnd,splitExtensions,textInputRule,textPasteRule,textblockTypeInputRule,wrappingInputRule},Symbol.toStringTag,{value:"Module"}));var top="top",bottom="bottom",right="right",left="left",auto="auto",basePlacements$1=[top,bottom,right,left],start$1="start",end="end",clippingParents="clippingParents",viewport="viewport",popper="popper",reference="reference",variationPlacements=basePlacements$1.reduce(function(M,$){return M.concat([$+"-"+start$1,$+"-"+end])},[]),placements$1=[].concat(basePlacements$1,[auto]).reduce(function(M,$){return M.concat([$,$+"-"+start$1,$+"-"+end])},[]),beforeRead="beforeRead",read="read",afterRead="afterRead",beforeMain="beforeMain",main="main",afterMain="afterMain",beforeWrite="beforeWrite",write="write",afterWrite="afterWrite",modifierPhases=[beforeRead,read,afterRead,beforeMain,main,afterMain,beforeWrite,write,afterWrite];function getNodeName$1(M){return M?(M.nodeName||"").toLowerCase():null}function getWindow$1(M){if(M==null)return window;if(M.toString()!=="[object Window]"){var $=M.ownerDocument;return $&&$.defaultView||window}return M}function isElement$4(M){var $=getWindow$1(M).Element;return M instanceof $||M instanceof Element}function isHTMLElement$1(M){var $=getWindow$1(M).HTMLElement;return M instanceof $||M instanceof HTMLElement}function isShadowRoot$1(M){if(typeof ShadowRoot>"u")return!1;var $=getWindow$1(M).ShadowRoot;return M instanceof $||M instanceof ShadowRoot}function applyStyles(M){var $=M.state;Object.keys($.elements).forEach(function(I){var N=$.styles[I]||{},B=$.attributes[I]||{},j=$.elements[I];!isHTMLElement$1(j)||!getNodeName$1(j)||(Object.assign(j.style,N),Object.keys(B).forEach(function(U){var q=B[U];q===!1?j.removeAttribute(U):j.setAttribute(U,q===!0?"":q)}))})}function effect$3(M){var $=M.state,I={popper:{position:$.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign($.elements.popper.style,I.popper),$.styles=I,$.elements.arrow&&Object.assign($.elements.arrow.style,I.arrow),function(){Object.keys($.elements).forEach(function(N){var B=$.elements[N],j=$.attributes[N]||{},U=Object.keys($.styles.hasOwnProperty(N)?$.styles[N]:I[N]),q=U.reduce(function(Y,K){return Y[K]="",Y},{});!isHTMLElement$1(B)||!getNodeName$1(B)||(Object.assign(B.style,q),Object.keys(j).forEach(function(Y){B.removeAttribute(Y)}))})}}const applyStyles$1={name:"applyStyles",enabled:!0,phase:"write",fn:applyStyles,effect:effect$3,requires:["computeStyles"]};function getBasePlacement$2(M){return M.split("-")[0]}var max$4=Math.max,min$4=Math.min,round$2=Math.round;function getUAString(){var M=navigator.userAgentData;return M!=null&&M.brands&&Array.isArray(M.brands)?M.brands.map(function($){return $.brand+"/"+$.version}).join(" "):navigator.userAgent}function isLayoutViewport(){return!/^((?!chrome|android).)*safari/i.test(getUAString())}function getBoundingClientRect$1(M,$,I){$===void 0&&($=!1),I===void 0&&(I=!1);var N=M.getBoundingClientRect(),B=1,j=1;$&&isHTMLElement$1(M)&&(B=M.offsetWidth>0&&round$2(N.width)/M.offsetWidth||1,j=M.offsetHeight>0&&round$2(N.height)/M.offsetHeight||1);var U=isElement$4(M)?getWindow$1(M):window,q=U.visualViewport,Y=!isLayoutViewport()&&I,K=(N.left+(Y&&q?q.offsetLeft:0))/B,G=(N.top+(Y&&q?q.offsetTop:0))/j,J=N.width/B,Z=N.height/j;return{width:J,height:Z,top:G,right:K+J,bottom:G+Z,left:K,x:K,y:G}}function getLayoutRect(M){var $=getBoundingClientRect$1(M),I=M.offsetWidth,N=M.offsetHeight;return Math.abs($.width-I)<=1&&(I=$.width),Math.abs($.height-N)<=1&&(N=$.height),{x:M.offsetLeft,y:M.offsetTop,width:I,height:N}}function contains$2(M,$){var I=$.getRootNode&&$.getRootNode();if(M.contains($))return!0;if(I&&isShadowRoot$1(I)){var N=$;do{if(N&&M.isSameNode(N))return!0;N=N.parentNode||N.host}while(N)}return!1}function getComputedStyle$2(M){return getWindow$1(M).getComputedStyle(M)}function isTableElement$1(M){return["table","td","th"].indexOf(getNodeName$1(M))>=0}function getDocumentElement$1(M){return((isElement$4(M)?M.ownerDocument:M.document)||window.document).documentElement}function getParentNode$1(M){return getNodeName$1(M)==="html"?M:M.assignedSlot||M.parentNode||(isShadowRoot$1(M)?M.host:null)||getDocumentElement$1(M)}function getTrueOffsetParent$1(M){return!isHTMLElement$1(M)||getComputedStyle$2(M).position==="fixed"?null:M.offsetParent}function getContainingBlock$1(M){var $=/firefox/i.test(getUAString()),I=/Trident/i.test(getUAString());if(I&&isHTMLElement$1(M)){var N=getComputedStyle$2(M);if(N.position==="fixed")return null}var B=getParentNode$1(M);for(isShadowRoot$1(B)&&(B=B.host);isHTMLElement$1(B)&&["html","body"].indexOf(getNodeName$1(B))<0;){var j=getComputedStyle$2(B);if(j.transform!=="none"||j.perspective!=="none"||j.contain==="paint"||["transform","perspective"].indexOf(j.willChange)!==-1||$&&j.willChange==="filter"||$&&j.filter&&j.filter!=="none")return B;B=B.parentNode}return null}function getOffsetParent$1(M){for(var $=getWindow$1(M),I=getTrueOffsetParent$1(M);I&&isTableElement$1(I)&&getComputedStyle$2(I).position==="static";)I=getTrueOffsetParent$1(I);return I&&(getNodeName$1(I)==="html"||getNodeName$1(I)==="body"&&getComputedStyle$2(I).position==="static")?$:I||getContainingBlock$1(M)||$}function getMainAxisFromPlacement$1(M){return["top","bottom"].indexOf(M)>=0?"x":"y"}function within$1(M,$,I){return max$4(M,min$4($,I))}function withinMaxClamp(M,$,I){var N=within$1(M,$,I);return N>I?I:N}function getFreshSideObject(){return{top:0,right:0,bottom:0,left:0}}function mergePaddingObject(M){return Object.assign({},getFreshSideObject(),M)}function expandToHashMap(M,$){return $.reduce(function(I,N){return I[N]=M,I},{})}var toPaddingObject=function($,I){return $=typeof $=="function"?$(Object.assign({},I.rects,{placement:I.placement})):$,mergePaddingObject(typeof $!="number"?$:expandToHashMap($,basePlacements$1))};function arrow$3(M){var $,I=M.state,N=M.name,B=M.options,j=I.elements.arrow,U=I.modifiersData.popperOffsets,q=getBasePlacement$2(I.placement),Y=getMainAxisFromPlacement$1(q),K=[left,right].indexOf(q)>=0,G=K?"height":"width";if(!(!j||!U)){var J=toPaddingObject(B.padding,I),Z=getLayoutRect(j),ee=Y==="y"?top:left,te=Y==="y"?bottom:right,se=I.rects.reference[G]+I.rects.reference[Y]-U[Y]-I.rects.popper[G],re=U[Y]-I.rects.reference[Y],ne=getOffsetParent$1(j),le=ne?Y==="y"?ne.clientHeight||0:ne.clientWidth||0:0,me=se/2-re/2,ue=J[ee],_e=le-Z[G]-J[te],fe=le/2-Z[G]/2+me,ge=within$1(ue,fe,_e),ye=Y;I.modifiersData[N]=($={},$[ye]=ge,$.centerOffset=ge-fe,$)}}function effect$2(M){var $=M.state,I=M.options,N=I.element,B=N===void 0?"[data-popper-arrow]":N;B!=null&&(typeof B=="string"&&(B=$.elements.popper.querySelector(B),!B)||contains$2($.elements.popper,B)&&($.elements.arrow=B))}const arrow$4={name:"arrow",enabled:!0,phase:"main",fn:arrow$3,effect:effect$2,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function getVariation(M){return M.split("-")[1]}var unsetSides={top:"auto",right:"auto",bottom:"auto",left:"auto"};function roundOffsetsByDPR(M,$){var I=M.x,N=M.y,B=$.devicePixelRatio||1;return{x:round$2(I*B)/B||0,y:round$2(N*B)/B||0}}function mapToStyles(M){var $,I=M.popper,N=M.popperRect,B=M.placement,j=M.variation,U=M.offsets,q=M.position,Y=M.gpuAcceleration,K=M.adaptive,G=M.roundOffsets,J=M.isFixed,Z=U.x,ee=Z===void 0?0:Z,te=U.y,se=te===void 0?0:te,re=typeof G=="function"?G({x:ee,y:se}):{x:ee,y:se};ee=re.x,se=re.y;var ne=U.hasOwnProperty("x"),le=U.hasOwnProperty("y"),me=left,ue=top,_e=window;if(K){var fe=getOffsetParent$1(I),ge="clientHeight",ye="clientWidth";if(fe===getWindow$1(I)&&(fe=getDocumentElement$1(I),getComputedStyle$2(fe).position!=="static"&&q==="absolute"&&(ge="scrollHeight",ye="scrollWidth")),fe=fe,B===top||(B===left||B===right)&&j===end){ue=bottom;var xe=J&&fe===_e&&_e.visualViewport?_e.visualViewport.height:fe[ge];se-=xe-N.height,se*=Y?1:-1}if(B===left||(B===top||B===bottom)&&j===end){me=right;var oe=J&&fe===_e&&_e.visualViewport?_e.visualViewport.width:fe[ye];ee-=oe-N.width,ee*=Y?1:-1}}var be=Object.assign({position:q},K&&unsetSides),ve=G===!0?roundOffsetsByDPR({x:ee,y:se},getWindow$1(I)):{x:ee,y:se};if(ee=ve.x,se=ve.y,Y){var we;return Object.assign({},be,(we={},we[ue]=le?"0":"",we[me]=ne?"0":"",we.transform=(_e.devicePixelRatio||1)<=1?"translate("+ee+"px, "+se+"px)":"translate3d("+ee+"px, "+se+"px, 0)",we))}return Object.assign({},be,($={},$[ue]=le?se+"px":"",$[me]=ne?ee+"px":"",$.transform="",$))}function computeStyles(M){var $=M.state,I=M.options,N=I.gpuAcceleration,B=N===void 0?!0:N,j=I.adaptive,U=j===void 0?!0:j,q=I.roundOffsets,Y=q===void 0?!0:q,K={placement:getBasePlacement$2($.placement),variation:getVariation($.placement),popper:$.elements.popper,popperRect:$.rects.popper,gpuAcceleration:B,isFixed:$.options.strategy==="fixed"};$.modifiersData.popperOffsets!=null&&($.styles.popper=Object.assign({},$.styles.popper,mapToStyles(Object.assign({},K,{offsets:$.modifiersData.popperOffsets,position:$.options.strategy,adaptive:U,roundOffsets:Y})))),$.modifiersData.arrow!=null&&($.styles.arrow=Object.assign({},$.styles.arrow,mapToStyles(Object.assign({},K,{offsets:$.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:Y})))),$.attributes.popper=Object.assign({},$.attributes.popper,{"data-popper-placement":$.placement})}const computeStyles$1={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:computeStyles,data:{}};var passive={passive:!0};function effect$1(M){var $=M.state,I=M.instance,N=M.options,B=N.scroll,j=B===void 0?!0:B,U=N.resize,q=U===void 0?!0:U,Y=getWindow$1($.elements.popper),K=[].concat($.scrollParents.reference,$.scrollParents.popper);return j&&K.forEach(function(G){G.addEventListener("scroll",I.update,passive)}),q&&Y.addEventListener("resize",I.update,passive),function(){j&&K.forEach(function(G){G.removeEventListener("scroll",I.update,passive)}),q&&Y.removeEventListener("resize",I.update,passive)}}const eventListeners={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:effect$1,data:{}};var hash$3={left:"right",right:"left",bottom:"top",top:"bottom"};function getOppositePlacement$1(M){return M.replace(/left|right|bottom|top/g,function($){return hash$3[$]})}var hash$2={start:"end",end:"start"};function getOppositeVariationPlacement(M){return M.replace(/start|end/g,function($){return hash$2[$]})}function getWindowScroll(M){var $=getWindow$1(M),I=$.pageXOffset,N=$.pageYOffset;return{scrollLeft:I,scrollTop:N}}function getWindowScrollBarX$1(M){return getBoundingClientRect$1(getDocumentElement$1(M)).left+getWindowScroll(M).scrollLeft}function getViewportRect$1(M,$){var I=getWindow$1(M),N=getDocumentElement$1(M),B=I.visualViewport,j=N.clientWidth,U=N.clientHeight,q=0,Y=0;if(B){j=B.width,U=B.height;var K=isLayoutViewport();(K||!K&&$==="fixed")&&(q=B.offsetLeft,Y=B.offsetTop)}return{width:j,height:U,x:q+getWindowScrollBarX$1(M),y:Y}}function getDocumentRect$1(M){var $,I=getDocumentElement$1(M),N=getWindowScroll(M),B=($=M.ownerDocument)==null?void 0:$.body,j=max$4(I.scrollWidth,I.clientWidth,B?B.scrollWidth:0,B?B.clientWidth:0),U=max$4(I.scrollHeight,I.clientHeight,B?B.scrollHeight:0,B?B.clientHeight:0),q=-N.scrollLeft+getWindowScrollBarX$1(M),Y=-N.scrollTop;return getComputedStyle$2(B||I).direction==="rtl"&&(q+=max$4(I.clientWidth,B?B.clientWidth:0)-j),{width:j,height:U,x:q,y:Y}}function isScrollParent$1(M){var $=getComputedStyle$2(M),I=$.overflow,N=$.overflowX,B=$.overflowY;return/auto|scroll|overlay|hidden/.test(I+B+N)}function getScrollParent$1(M){return["html","body","#document"].indexOf(getNodeName$1(M))>=0?M.ownerDocument.body:isHTMLElement$1(M)&&isScrollParent$1(M)?M:getScrollParent$1(getParentNode$1(M))}function listScrollParents(M,$){var I;$===void 0&&($=[]);var N=getScrollParent$1(M),B=N===((I=M.ownerDocument)==null?void 0:I.body),j=getWindow$1(N),U=B?[j].concat(j.visualViewport||[],isScrollParent$1(N)?N:[]):N,q=$.concat(U);return B?q:q.concat(listScrollParents(getParentNode$1(U)))}function rectToClientRect$1(M){return Object.assign({},M,{left:M.x,top:M.y,right:M.x+M.width,bottom:M.y+M.height})}function getInnerBoundingClientRect$1(M,$){var I=getBoundingClientRect$1(M,!1,$==="fixed");return I.top=I.top+M.clientTop,I.left=I.left+M.clientLeft,I.bottom=I.top+M.clientHeight,I.right=I.left+M.clientWidth,I.width=M.clientWidth,I.height=M.clientHeight,I.x=I.left,I.y=I.top,I}function getClientRectFromMixedType(M,$,I){return $===viewport?rectToClientRect$1(getViewportRect$1(M,I)):isElement$4($)?getInnerBoundingClientRect$1($,I):rectToClientRect$1(getDocumentRect$1(getDocumentElement$1(M)))}function getClippingParents$1(M){var $=listScrollParents(getParentNode$1(M)),I=["absolute","fixed"].indexOf(getComputedStyle$2(M).position)>=0,N=I&&isHTMLElement$1(M)?getOffsetParent$1(M):M;return isElement$4(N)?$.filter(function(B){return isElement$4(B)&&contains$2(B,N)&&getNodeName$1(B)!=="body"}):[]}function getClippingRect(M,$,I,N){var B=$==="clippingParents"?getClippingParents$1(M):[].concat($),j=[].concat(B,[I]),U=j[0],q=j.reduce(function(Y,K){var G=getClientRectFromMixedType(M,K,N);return Y.top=max$4(G.top,Y.top),Y.right=min$4(G.right,Y.right),Y.bottom=min$4(G.bottom,Y.bottom),Y.left=max$4(G.left,Y.left),Y},getClientRectFromMixedType(M,U,N));return q.width=q.right-q.left,q.height=q.bottom-q.top,q.x=q.left,q.y=q.top,q}function computeOffsets(M){var $=M.reference,I=M.element,N=M.placement,B=N?getBasePlacement$2(N):null,j=N?getVariation(N):null,U=$.x+$.width/2-I.width/2,q=$.y+$.height/2-I.height/2,Y;switch(B){case top:Y={x:U,y:$.y-I.height};break;case bottom:Y={x:U,y:$.y+$.height};break;case right:Y={x:$.x+$.width,y:q};break;case left:Y={x:$.x-I.width,y:q};break;default:Y={x:$.x,y:$.y}}var K=B?getMainAxisFromPlacement$1(B):null;if(K!=null){var G=K==="y"?"height":"width";switch(j){case start$1:Y[K]=Y[K]-($[G]/2-I[G]/2);break;case end:Y[K]=Y[K]+($[G]/2-I[G]/2);break}}return Y}function detectOverflow$1(M,$){$===void 0&&($={});var I=$,N=I.placement,B=N===void 0?M.placement:N,j=I.strategy,U=j===void 0?M.strategy:j,q=I.boundary,Y=q===void 0?clippingParents:q,K=I.rootBoundary,G=K===void 0?viewport:K,J=I.elementContext,Z=J===void 0?popper:J,ee=I.altBoundary,te=ee===void 0?!1:ee,se=I.padding,re=se===void 0?0:se,ne=mergePaddingObject(typeof re!="number"?re:expandToHashMap(re,basePlacements$1)),le=Z===popper?reference:popper,me=M.rects.popper,ue=M.elements[te?le:Z],_e=getClippingRect(isElement$4(ue)?ue:ue.contextElement||getDocumentElement$1(M.elements.popper),Y,G,U),fe=getBoundingClientRect$1(M.elements.reference),ge=computeOffsets({reference:fe,element:me,strategy:"absolute",placement:B}),ye=rectToClientRect$1(Object.assign({},me,ge)),xe=Z===popper?ye:fe,oe={top:_e.top-xe.top+ne.top,bottom:xe.bottom-_e.bottom+ne.bottom,left:_e.left-xe.left+ne.left,right:xe.right-_e.right+ne.right},be=M.modifiersData.offset;if(Z===popper&&be){var ve=be[B];Object.keys(oe).forEach(function(we){var Ae=[right,bottom].indexOf(we)>=0?1:-1,Se=[top,bottom].indexOf(we)>=0?"y":"x";oe[we]+=ve[Se]*Ae})}return oe}function computeAutoPlacement(M,$){$===void 0&&($={});var I=$,N=I.placement,B=I.boundary,j=I.rootBoundary,U=I.padding,q=I.flipVariations,Y=I.allowedAutoPlacements,K=Y===void 0?placements$1:Y,G=getVariation(N),J=G?q?variationPlacements:variationPlacements.filter(function(te){return getVariation(te)===G}):basePlacements$1,Z=J.filter(function(te){return K.indexOf(te)>=0});Z.length===0&&(Z=J);var ee=Z.reduce(function(te,se){return te[se]=detectOverflow$1(M,{placement:se,boundary:B,rootBoundary:j,padding:U})[getBasePlacement$2(se)],te},{});return Object.keys(ee).sort(function(te,se){return ee[te]-ee[se]})}function getExpandedFallbackPlacements(M){if(getBasePlacement$2(M)===auto)return[];var $=getOppositePlacement$1(M);return[getOppositeVariationPlacement(M),$,getOppositeVariationPlacement($)]}function flip$1(M){var $=M.state,I=M.options,N=M.name;if(!$.modifiersData[N]._skip){for(var B=I.mainAxis,j=B===void 0?!0:B,U=I.altAxis,q=U===void 0?!0:U,Y=I.fallbackPlacements,K=I.padding,G=I.boundary,J=I.rootBoundary,Z=I.altBoundary,ee=I.flipVariations,te=ee===void 0?!0:ee,se=I.allowedAutoPlacements,re=$.options.placement,ne=getBasePlacement$2(re),le=ne===re,me=Y||(le||!te?[getOppositePlacement$1(re)]:getExpandedFallbackPlacements(re)),ue=[re].concat(me).reduce(function(Rt,Nt){return Rt.concat(getBasePlacement$2(Nt)===auto?computeAutoPlacement($,{placement:Nt,boundary:G,rootBoundary:J,padding:K,flipVariations:te,allowedAutoPlacements:se}):Nt)},[]),_e=$.rects.reference,fe=$.rects.popper,ge=new Map,ye=!0,xe=ue[0],oe=0;oe=0,Se=Ae?"width":"height",Pe=detectOverflow$1($,{placement:be,boundary:G,rootBoundary:J,altBoundary:Z,padding:K}),Re=Ae?we?right:left:we?bottom:top;_e[Se]>fe[Se]&&(Re=getOppositePlacement$1(Re));var Le=getOppositePlacement$1(Re),Fe=[];if(j&&Fe.push(Pe[ve]<=0),q&&Fe.push(Pe[Re]<=0,Pe[Le]<=0),Fe.every(function(Rt){return Rt})){xe=be,ye=!1;break}ge.set(be,Fe)}if(ye)for(var Ze=te?3:1,ct=function(Nt){var Lt=ue.find(function(Ht){var Wt=ge.get(Ht);if(Wt)return Wt.slice(0,Nt).every(function(Jt){return Jt})});if(Lt)return xe=Lt,"break"},qe=Ze;qe>0;qe--){var Ve=ct(qe);if(Ve==="break")break}$.placement!==xe&&($.modifiersData[N]._skip=!0,$.placement=xe,$.reset=!0)}}const flip$2={name:"flip",enabled:!0,phase:"main",fn:flip$1,requiresIfExists:["offset"],data:{_skip:!1}};function getSideOffsets(M,$,I){return I===void 0&&(I={x:0,y:0}),{top:M.top-$.height-I.y,right:M.right-$.width+I.x,bottom:M.bottom-$.height+I.y,left:M.left-$.width-I.x}}function isAnySideFullyClipped(M){return[top,right,bottom,left].some(function($){return M[$]>=0})}function hide(M){var $=M.state,I=M.name,N=$.rects.reference,B=$.rects.popper,j=$.modifiersData.preventOverflow,U=detectOverflow$1($,{elementContext:"reference"}),q=detectOverflow$1($,{altBoundary:!0}),Y=getSideOffsets(U,N),K=getSideOffsets(q,B,j),G=isAnySideFullyClipped(Y),J=isAnySideFullyClipped(K);$.modifiersData[I]={referenceClippingOffsets:Y,popperEscapeOffsets:K,isReferenceHidden:G,hasPopperEscaped:J},$.attributes.popper=Object.assign({},$.attributes.popper,{"data-popper-reference-hidden":G,"data-popper-escaped":J})}const hide$1={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:hide};function distanceAndSkiddingToXY(M,$,I){var N=getBasePlacement$2(M),B=[left,top].indexOf(N)>=0?-1:1,j=typeof I=="function"?I(Object.assign({},$,{placement:M})):I,U=j[0],q=j[1];return U=U||0,q=(q||0)*B,[left,right].indexOf(N)>=0?{x:q,y:U}:{x:U,y:q}}function offset$2(M){var $=M.state,I=M.options,N=M.name,B=I.offset,j=B===void 0?[0,0]:B,U=placements$1.reduce(function(G,J){return G[J]=distanceAndSkiddingToXY(J,$.rects,j),G},{}),q=U[$.placement],Y=q.x,K=q.y;$.modifiersData.popperOffsets!=null&&($.modifiersData.popperOffsets.x+=Y,$.modifiersData.popperOffsets.y+=K),$.modifiersData[N]=U}const offset$3={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:offset$2};function popperOffsets(M){var $=M.state,I=M.name;$.modifiersData[I]=computeOffsets({reference:$.rects.reference,element:$.rects.popper,strategy:"absolute",placement:$.placement})}const popperOffsets$1={name:"popperOffsets",enabled:!0,phase:"read",fn:popperOffsets,data:{}};function getAltAxis(M){return M==="x"?"y":"x"}function preventOverflow(M){var $=M.state,I=M.options,N=M.name,B=I.mainAxis,j=B===void 0?!0:B,U=I.altAxis,q=U===void 0?!1:U,Y=I.boundary,K=I.rootBoundary,G=I.altBoundary,J=I.padding,Z=I.tether,ee=Z===void 0?!0:Z,te=I.tetherOffset,se=te===void 0?0:te,re=detectOverflow$1($,{boundary:Y,rootBoundary:K,padding:J,altBoundary:G}),ne=getBasePlacement$2($.placement),le=getVariation($.placement),me=!le,ue=getMainAxisFromPlacement$1(ne),_e=getAltAxis(ue),fe=$.modifiersData.popperOffsets,ge=$.rects.reference,ye=$.rects.popper,xe=typeof se=="function"?se(Object.assign({},$.rects,{placement:$.placement})):se,oe=typeof xe=="number"?{mainAxis:xe,altAxis:xe}:Object.assign({mainAxis:0,altAxis:0},xe),be=$.modifiersData.offset?$.modifiersData.offset[$.placement]:null,ve={x:0,y:0};if(fe){if(j){var we,Ae=ue==="y"?top:left,Se=ue==="y"?bottom:right,Pe=ue==="y"?"height":"width",Re=fe[ue],Le=Re+re[Ae],Fe=Re-re[Se],Ze=ee?-ye[Pe]/2:0,ct=le===start$1?ge[Pe]:ye[Pe],qe=le===start$1?-ye[Pe]:-ge[Pe],Ve=$.elements.arrow,Rt=ee&&Ve?getLayoutRect(Ve):{width:0,height:0},Nt=$.modifiersData["arrow#persistent"]?$.modifiersData["arrow#persistent"].padding:getFreshSideObject(),Lt=Nt[Ae],Ht=Nt[Se],Wt=within$1(0,ge[Pe],Rt[Pe]),Jt=me?ge[Pe]/2-Ze-Wt-Lt-oe.mainAxis:ct-Wt-Lt-oe.mainAxis,Zt=me?-ge[Pe]/2+Ze+Wt+Ht+oe.mainAxis:qe+Wt+Ht+oe.mainAxis,bn=$.elements.arrow&&getOffsetParent$1($.elements.arrow),gn=bn?ue==="y"?bn.clientTop||0:bn.clientLeft||0:0,Hn=(we=be==null?void 0:be[ue])!=null?we:0,Pn=Re+Jt-Hn-gn,Bn=Re+Zt-Hn,An=within$1(ee?min$4(Le,Pn):Le,Re,ee?max$4(Fe,Bn):Fe);fe[ue]=An,ve[ue]=An-Re}if(q){var Dn,kt=ue==="x"?top:left,We=ue==="x"?bottom:right,xt=fe[_e],Ue=_e==="y"?"height":"width",Oe=xt+re[kt],ke=xt-re[We],$e=[top,left].indexOf(ne)!==-1,Ge=(Dn=be==null?void 0:be[_e])!=null?Dn:0,rt=$e?Oe:xt-ge[Ue]-ye[Ue]-Ge+oe.altAxis,dt=$e?xt+ge[Ue]+ye[Ue]-Ge-oe.altAxis:ke,ut=ee&&$e?withinMaxClamp(rt,xt,dt):within$1(ee?rt:Oe,xt,ee?dt:ke);fe[_e]=ut,ve[_e]=ut-xt}$.modifiersData[N]=ve}}const preventOverflow$1={name:"preventOverflow",enabled:!0,phase:"main",fn:preventOverflow,requiresIfExists:["offset"]};function getHTMLElementScroll(M){return{scrollLeft:M.scrollLeft,scrollTop:M.scrollTop}}function getNodeScroll$1(M){return M===getWindow$1(M)||!isHTMLElement$1(M)?getWindowScroll(M):getHTMLElementScroll(M)}function isElementScaled(M){var $=M.getBoundingClientRect(),I=round$2($.width)/M.offsetWidth||1,N=round$2($.height)/M.offsetHeight||1;return I!==1||N!==1}function getCompositeRect(M,$,I){I===void 0&&(I=!1);var N=isHTMLElement$1($),B=isHTMLElement$1($)&&isElementScaled($),j=getDocumentElement$1($),U=getBoundingClientRect$1(M,B,I),q={scrollLeft:0,scrollTop:0},Y={x:0,y:0};return(N||!N&&!I)&&((getNodeName$1($)!=="body"||isScrollParent$1(j))&&(q=getNodeScroll$1($)),isHTMLElement$1($)?(Y=getBoundingClientRect$1($,!0),Y.x+=$.clientLeft,Y.y+=$.clientTop):j&&(Y.x=getWindowScrollBarX$1(j))),{x:U.left+q.scrollLeft-Y.x,y:U.top+q.scrollTop-Y.y,width:U.width,height:U.height}}function order(M){var $=new Map,I=new Set,N=[];M.forEach(function(j){$.set(j.name,j)});function B(j){I.add(j.name);var U=[].concat(j.requires||[],j.requiresIfExists||[]);U.forEach(function(q){if(!I.has(q)){var Y=$.get(q);Y&&B(Y)}}),N.push(j)}return M.forEach(function(j){I.has(j.name)||B(j)}),N}function orderModifiers(M){var $=order(M);return modifierPhases.reduce(function(I,N){return I.concat($.filter(function(B){return B.phase===N}))},[])}function debounce$3(M){var $;return function(){return $||($=new Promise(function(I){Promise.resolve().then(function(){$=void 0,I(M())})})),$}}function mergeByName(M){var $=M.reduce(function(I,N){var B=I[N.name];return I[N.name]=B?Object.assign({},B,N,{options:Object.assign({},B.options,N.options),data:Object.assign({},B.data,N.data)}):N,I},{});return Object.keys($).map(function(I){return $[I]})}var DEFAULT_OPTIONS={placement:"bottom",modifiers:[],strategy:"absolute"};function areValidElements(){for(var M=arguments.length,$=new Array(M),I=0;I-1}function invokeWithArgsOrReturn(M,$){return typeof M=="function"?M.apply(void 0,$):M}function debounce$2(M,$){if($===0)return M;var I;return function(N){clearTimeout(I),I=setTimeout(function(){M(N)},$)}}function splitBySpaces(M){return M.split(/\s+/).filter(Boolean)}function normalizeToArray(M){return[].concat(M)}function pushIfUnique(M,$){M.indexOf($)===-1&&M.push($)}function unique(M){return M.filter(function($,I){return M.indexOf($)===I})}function getBasePlacement$1(M){return M.split("-")[0]}function arrayFrom(M){return[].slice.call(M)}function removeUndefinedProps(M){return Object.keys(M).reduce(function($,I){return M[I]!==void 0&&($[I]=M[I]),$},{})}function div(){return document.createElement("div")}function isElement$3(M){return["Element","Fragment"].some(function($){return isType(M,$)})}function isNodeList(M){return isType(M,"NodeList")}function isMouseEvent(M){return isType(M,"MouseEvent")}function isReferenceElement(M){return!!(M&&M._tippy&&M._tippy.reference===M)}function getArrayOfElements(M){return isElement$3(M)?[M]:isNodeList(M)?arrayFrom(M):Array.isArray(M)?M:arrayFrom(document.querySelectorAll(M))}function setTransitionDuration(M,$){M.forEach(function(I){I&&(I.style.transitionDuration=$+"ms")})}function setVisibilityState(M,$){M.forEach(function(I){I&&I.setAttribute("data-state",$)})}function getOwnerDocument(M){var $,I=normalizeToArray(M),N=I[0];return N!=null&&($=N.ownerDocument)!=null&&$.body?N.ownerDocument:document}function isCursorOutsideInteractiveBorder(M,$){var I=$.clientX,N=$.clientY;return M.every(function(B){var j=B.popperRect,U=B.popperState,q=B.props,Y=q.interactiveBorder,K=getBasePlacement$1(U.placement),G=U.modifiersData.offset;if(!G)return!0;var J=K==="bottom"?G.top.y:0,Z=K==="top"?G.bottom.y:0,ee=K==="right"?G.left.x:0,te=K==="left"?G.right.x:0,se=j.top-N+J>Y,re=N-j.bottom-Z>Y,ne=j.left-I+ee>Y,le=I-j.right-te>Y;return se||re||ne||le})}function updateTransitionEndListener(M,$,I){var N=$+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(B){M[N](B,I)})}function actualContains(M,$){for(var I=$;I;){var N;if(M.contains(I))return!0;I=I.getRootNode==null||(N=I.getRootNode())==null?void 0:N.host}return!1}var currentInput={isTouch:!1},lastMouseMoveTime=0;function onDocumentTouchStart(){currentInput.isTouch||(currentInput.isTouch=!0,window.performance&&document.addEventListener("mousemove",onDocumentMouseMove))}function onDocumentMouseMove(){var M=performance.now();M-lastMouseMoveTime<20&&(currentInput.isTouch=!1,document.removeEventListener("mousemove",onDocumentMouseMove)),lastMouseMoveTime=M}function onWindowBlur(){var M=document.activeElement;if(isReferenceElement(M)){var $=M._tippy;M.blur&&!$.state.isVisible&&M.blur()}}function bindGlobalEventListeners(){document.addEventListener("touchstart",onDocumentTouchStart,TOUCH_OPTIONS),window.addEventListener("blur",onWindowBlur)}var isBrowser$1=typeof window<"u"&&typeof document<"u",isIE11$1=isBrowser$1?!!window.msCrypto:!1,pluginProps={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},renderProps={allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999},defaultProps=Object.assign({appendTo:TIPPY_DEFAULT_APPEND_TO,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},pluginProps,renderProps),defaultKeys=Object.keys(defaultProps),setDefaultProps=function($){var I=Object.keys($);I.forEach(function(N){defaultProps[N]=$[N]})};function getExtendedPassedProps(M){var $=M.plugins||[],I=$.reduce(function(N,B){var j=B.name,U=B.defaultValue;if(j){var q;N[j]=M[j]!==void 0?M[j]:(q=defaultProps[j])!=null?q:U}return N},{});return Object.assign({},M,I)}function getDataAttributeProps(M,$){var I=$?Object.keys(getExtendedPassedProps(Object.assign({},defaultProps,{plugins:$}))):defaultKeys,N=I.reduce(function(B,j){var U=(M.getAttribute("data-tippy-"+j)||"").trim();if(!U)return B;if(j==="content")B[j]=U;else try{B[j]=JSON.parse(U)}catch{B[j]=U}return B},{});return N}function evaluateProps(M,$){var I=Object.assign({},$,{content:invokeWithArgsOrReturn($.content,[M])},$.ignoreAttributes?{}:getDataAttributeProps(M,$.plugins));return I.aria=Object.assign({},defaultProps.aria,I.aria),I.aria={expanded:I.aria.expanded==="auto"?$.interactive:I.aria.expanded,content:I.aria.content==="auto"?$.interactive?null:"describedby":I.aria.content},I}var innerHTML=function(){return"innerHTML"};function dangerouslySetInnerHTML(M,$){M[innerHTML()]=$}function createArrowElement(M){var $=div();return M===!0?$.className=ARROW_CLASS:($.className=SVG_ARROW_CLASS,isElement$3(M)?$.appendChild(M):dangerouslySetInnerHTML($,M)),$}function setContent(M,$){isElement$3($.content)?(dangerouslySetInnerHTML(M,""),M.appendChild($.content)):typeof $.content!="function"&&($.allowHTML?dangerouslySetInnerHTML(M,$.content):M.textContent=$.content)}function getChildren(M){var $=M.firstElementChild,I=arrayFrom($.children);return{box:$,content:I.find(function(N){return N.classList.contains(CONTENT_CLASS)}),arrow:I.find(function(N){return N.classList.contains(ARROW_CLASS)||N.classList.contains(SVG_ARROW_CLASS)}),backdrop:I.find(function(N){return N.classList.contains(BACKDROP_CLASS)})}}function render$3(M){var $=div(),I=div();I.className=BOX_CLASS,I.setAttribute("data-state","hidden"),I.setAttribute("tabindex","-1");var N=div();N.className=CONTENT_CLASS,N.setAttribute("data-state","hidden"),setContent(N,M.props),$.appendChild(I),I.appendChild(N),B(M.props,M.props);function B(j,U){var q=getChildren($),Y=q.box,K=q.content,G=q.arrow;U.theme?Y.setAttribute("data-theme",U.theme):Y.removeAttribute("data-theme"),typeof U.animation=="string"?Y.setAttribute("data-animation",U.animation):Y.removeAttribute("data-animation"),U.inertia?Y.setAttribute("data-inertia",""):Y.removeAttribute("data-inertia"),Y.style.maxWidth=typeof U.maxWidth=="number"?U.maxWidth+"px":U.maxWidth,U.role?Y.setAttribute("role",U.role):Y.removeAttribute("role"),(j.content!==U.content||j.allowHTML!==U.allowHTML)&&setContent(K,M.props),U.arrow?G?j.arrow!==U.arrow&&(Y.removeChild(G),Y.appendChild(createArrowElement(U.arrow))):Y.appendChild(createArrowElement(U.arrow)):G&&Y.removeChild(G)}return{popper:$,onUpdate:B}}render$3.$$tippy=!0;var idCounter$1=1,mouseMoveListeners=[],mountedInstances=[];function createTippy(M,$){var I=evaluateProps(M,Object.assign({},defaultProps,getExtendedPassedProps(removeUndefinedProps($)))),N,B,j,U=!1,q=!1,Y=!1,K=!1,G,J,Z,ee=[],te=debounce$2(Pn,I.interactiveDebounce),se,re=idCounter$1++,ne=null,le=unique(I.plugins),me={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},ue={id:re,reference:M,popper:div(),popperInstance:ne,props:I,state:me,plugins:le,clearDelayTimeouts:rt,setProps:dt,setContent:ut,show:it,hide:ot,hideWithInteractivity:Ot,enable:$e,disable:Ge,unmount:dn,destroy:Fn};if(!I.render)return ue;var _e=I.render(ue),fe=_e.popper,ge=_e.onUpdate;fe.setAttribute("data-tippy-root",""),fe.id="tippy-"+ue.id,ue.popper=fe,M._tippy=ue,fe._tippy=ue;var ye=le.map(function(en){return en.fn(ue)}),xe=M.hasAttribute("aria-expanded");return bn(),Ze(),Re(),Le("onCreate",[ue]),I.showOnCreate&&Oe(),fe.addEventListener("mouseenter",function(){ue.props.interactive&&ue.state.isVisible&&ue.clearDelayTimeouts()}),fe.addEventListener("mouseleave",function(){ue.props.interactive&&ue.props.trigger.indexOf("mouseenter")>=0&&Ae().addEventListener("mousemove",te)}),ue;function oe(){var en=ue.props.touch;return Array.isArray(en)?en:[en,0]}function be(){return oe()[0]==="hold"}function ve(){var en;return!!((en=ue.props.render)!=null&&en.$$tippy)}function we(){return se||M}function Ae(){var en=we().parentNode;return en?getOwnerDocument(en):document}function Se(){return getChildren(fe)}function Pe(en){return ue.state.isMounted&&!ue.state.isVisible||currentInput.isTouch||G&&G.type==="focus"?0:getValueAtIndexOrReturn(ue.props.delay,en?0:1,defaultProps.delay)}function Re(en){en===void 0&&(en=!1),fe.style.pointerEvents=ue.props.interactive&&!en?"":"none",fe.style.zIndex=""+ue.props.zIndex}function Le(en,yn,lt){if(lt===void 0&&(lt=!0),ye.forEach(function(Pt){Pt[en]&&Pt[en].apply(Pt,yn)}),lt){var pt;(pt=ue.props)[en].apply(pt,yn)}}function Fe(){var en=ue.props.aria;if(en.content){var yn="aria-"+en.content,lt=fe.id,pt=normalizeToArray(ue.props.triggerTarget||M);pt.forEach(function(Pt){var Yt=Pt.getAttribute(yn);if(ue.state.isVisible)Pt.setAttribute(yn,Yt?Yt+" "+lt:lt);else{var qt=Yt&&Yt.replace(lt,"").trim();qt?Pt.setAttribute(yn,qt):Pt.removeAttribute(yn)}})}}function Ze(){if(!(xe||!ue.props.aria.expanded)){var en=normalizeToArray(ue.props.triggerTarget||M);en.forEach(function(yn){ue.props.interactive?yn.setAttribute("aria-expanded",ue.state.isVisible&&yn===we()?"true":"false"):yn.removeAttribute("aria-expanded")})}}function ct(){Ae().removeEventListener("mousemove",te),mouseMoveListeners=mouseMoveListeners.filter(function(en){return en!==te})}function qe(en){if(!(currentInput.isTouch&&(Y||en.type==="mousedown"))){var yn=en.composedPath&&en.composedPath()[0]||en.target;if(!(ue.props.interactive&&actualContains(fe,yn))){if(normalizeToArray(ue.props.triggerTarget||M).some(function(lt){return actualContains(lt,yn)})){if(currentInput.isTouch||ue.state.isVisible&&ue.props.trigger.indexOf("click")>=0)return}else Le("onClickOutside",[ue,en]);ue.props.hideOnClick===!0&&(ue.clearDelayTimeouts(),ue.hide(),q=!0,setTimeout(function(){q=!1}),ue.state.isMounted||Lt())}}}function Ve(){Y=!0}function Rt(){Y=!1}function Nt(){var en=Ae();en.addEventListener("mousedown",qe,!0),en.addEventListener("touchend",qe,TOUCH_OPTIONS),en.addEventListener("touchstart",Rt,TOUCH_OPTIONS),en.addEventListener("touchmove",Ve,TOUCH_OPTIONS)}function Lt(){var en=Ae();en.removeEventListener("mousedown",qe,!0),en.removeEventListener("touchend",qe,TOUCH_OPTIONS),en.removeEventListener("touchstart",Rt,TOUCH_OPTIONS),en.removeEventListener("touchmove",Ve,TOUCH_OPTIONS)}function Ht(en,yn){Jt(en,function(){!ue.state.isVisible&&fe.parentNode&&fe.parentNode.contains(fe)&&yn()})}function Wt(en,yn){Jt(en,yn)}function Jt(en,yn){var lt=Se().box;function pt(Pt){Pt.target===lt&&(updateTransitionEndListener(lt,"remove",pt),yn())}if(en===0)return yn();updateTransitionEndListener(lt,"remove",J),updateTransitionEndListener(lt,"add",pt),J=pt}function Zt(en,yn,lt){lt===void 0&&(lt=!1);var pt=normalizeToArray(ue.props.triggerTarget||M);pt.forEach(function(Pt){Pt.addEventListener(en,yn,lt),ee.push({node:Pt,eventType:en,handler:yn,options:lt})})}function bn(){be()&&(Zt("touchstart",Hn,{passive:!0}),Zt("touchend",Bn,{passive:!0})),splitBySpaces(ue.props.trigger).forEach(function(en){if(en!=="manual")switch(Zt(en,Hn),en){case"mouseenter":Zt("mouseleave",Bn);break;case"focus":Zt(isIE11$1?"focusout":"blur",An);break;case"focusin":Zt("focusout",An);break}})}function gn(){ee.forEach(function(en){var yn=en.node,lt=en.eventType,pt=en.handler,Pt=en.options;yn.removeEventListener(lt,pt,Pt)}),ee=[]}function Hn(en){var yn,lt=!1;if(!(!ue.state.isEnabled||Dn(en)||q)){var pt=((yn=G)==null?void 0:yn.type)==="focus";G=en,se=en.currentTarget,Ze(),!ue.state.isVisible&&isMouseEvent(en)&&mouseMoveListeners.forEach(function(Pt){return Pt(en)}),en.type==="click"&&(ue.props.trigger.indexOf("mouseenter")<0||U)&&ue.props.hideOnClick!==!1&&ue.state.isVisible?lt=!0:Oe(en),en.type==="click"&&(U=!lt),lt&&!pt&&ke(en)}}function Pn(en){var yn=en.target,lt=we().contains(yn)||fe.contains(yn);if(!(en.type==="mousemove"&<)){var pt=Ue().concat(fe).map(function(Pt){var Yt,qt=Pt._tippy,mn=(Yt=qt.popperInstance)==null?void 0:Yt.state;return mn?{popperRect:Pt.getBoundingClientRect(),popperState:mn,props:I}:null}).filter(Boolean);isCursorOutsideInteractiveBorder(pt,en)&&(ct(),ke(en))}}function Bn(en){var yn=Dn(en)||ue.props.trigger.indexOf("click")>=0&&U;if(!yn){if(ue.props.interactive){ue.hideWithInteractivity(en);return}ke(en)}}function An(en){ue.props.trigger.indexOf("focusin")<0&&en.target!==we()||ue.props.interactive&&en.relatedTarget&&fe.contains(en.relatedTarget)||ke(en)}function Dn(en){return currentInput.isTouch?be()!==en.type.indexOf("touch")>=0:!1}function kt(){We();var en=ue.props,yn=en.popperOptions,lt=en.placement,pt=en.offset,Pt=en.getReferenceClientRect,Yt=en.moveTransition,qt=ve()?getChildren(fe).arrow:null,mn=Pt?{getBoundingClientRect:Pt,contextElement:Pt.contextElement||we()}:M,Kn={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(Tt){var Ft=Tt.state;if(ve()){var fn=Se(),hn=fn.box;["placement","reference-hidden","escaped"].forEach(function(Sn){Sn==="placement"?hn.setAttribute("data-placement",Ft.placement):Ft.attributes.popper["data-popper-"+Sn]?hn.setAttribute("data-"+Sn,""):hn.removeAttribute("data-"+Sn)}),Ft.attributes.popper={}}}},Ct=[{name:"offset",options:{offset:pt}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!Yt}},Kn];ve()&&qt&&Ct.push({name:"arrow",options:{element:qt,padding:3}}),Ct.push.apply(Ct,(yn==null?void 0:yn.modifiers)||[]),ue.popperInstance=createPopper(mn,fe,Object.assign({},yn,{placement:lt,onFirstUpdate:Z,modifiers:Ct}))}function We(){ue.popperInstance&&(ue.popperInstance.destroy(),ue.popperInstance=null)}function xt(){var en=ue.props.appendTo,yn,lt=we();ue.props.interactive&&en===TIPPY_DEFAULT_APPEND_TO||en==="parent"?yn=lt.parentNode:yn=invokeWithArgsOrReturn(en,[lt]),yn.contains(fe)||yn.appendChild(fe),ue.state.isMounted=!0,kt()}function Ue(){return arrayFrom(fe.querySelectorAll("[data-tippy-root]"))}function Oe(en){ue.clearDelayTimeouts(),en&&Le("onTrigger",[ue,en]),Nt();var yn=Pe(!0),lt=oe(),pt=lt[0],Pt=lt[1];currentInput.isTouch&&pt==="hold"&&Pt&&(yn=Pt),yn?N=setTimeout(function(){ue.show()},yn):ue.show()}function ke(en){if(ue.clearDelayTimeouts(),Le("onUntrigger",[ue,en]),!ue.state.isVisible){Lt();return}if(!(ue.props.trigger.indexOf("mouseenter")>=0&&ue.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(en.type)>=0&&U)){var yn=Pe(!1);yn?B=setTimeout(function(){ue.state.isVisible&&ue.hide()},yn):j=requestAnimationFrame(function(){ue.hide()})}}function $e(){ue.state.isEnabled=!0}function Ge(){ue.hide(),ue.state.isEnabled=!1}function rt(){clearTimeout(N),clearTimeout(B),cancelAnimationFrame(j)}function dt(en){if(!ue.state.isDestroyed){Le("onBeforeUpdate",[ue,en]),gn();var yn=ue.props,lt=evaluateProps(M,Object.assign({},yn,removeUndefinedProps(en),{ignoreAttributes:!0}));ue.props=lt,bn(),yn.interactiveDebounce!==lt.interactiveDebounce&&(ct(),te=debounce$2(Pn,lt.interactiveDebounce)),yn.triggerTarget&&!lt.triggerTarget?normalizeToArray(yn.triggerTarget).forEach(function(pt){pt.removeAttribute("aria-expanded")}):lt.triggerTarget&&M.removeAttribute("aria-expanded"),Ze(),Re(),ge&&ge(yn,lt),ue.popperInstance&&(kt(),Ue().forEach(function(pt){requestAnimationFrame(pt._tippy.popperInstance.forceUpdate)})),Le("onAfterUpdate",[ue,en])}}function ut(en){ue.setProps({content:en})}function it(){var en=ue.state.isVisible,yn=ue.state.isDestroyed,lt=!ue.state.isEnabled,pt=currentInput.isTouch&&!ue.props.touch,Pt=getValueAtIndexOrReturn(ue.props.duration,0,defaultProps.duration);if(!(en||yn||lt||pt)&&!we().hasAttribute("disabled")&&(Le("onShow",[ue],!1),ue.props.onShow(ue)!==!1)){if(ue.state.isVisible=!0,ve()&&(fe.style.visibility="visible"),Re(),Nt(),ue.state.isMounted||(fe.style.transition="none"),ve()){var Yt=Se(),qt=Yt.box,mn=Yt.content;setTransitionDuration([qt,mn],0)}Z=function(){var Ct;if(!(!ue.state.isVisible||K)){if(K=!0,fe.offsetHeight,fe.style.transition=ue.props.moveTransition,ve()&&ue.props.animation){var ht=Se(),Tt=ht.box,Ft=ht.content;setTransitionDuration([Tt,Ft],Pt),setVisibilityState([Tt,Ft],"visible")}Fe(),Ze(),pushIfUnique(mountedInstances,ue),(Ct=ue.popperInstance)==null||Ct.forceUpdate(),Le("onMount",[ue]),ue.props.animation&&ve()&&Wt(Pt,function(){ue.state.isShown=!0,Le("onShown",[ue])})}},xt()}}function ot(){var en=!ue.state.isVisible,yn=ue.state.isDestroyed,lt=!ue.state.isEnabled,pt=getValueAtIndexOrReturn(ue.props.duration,1,defaultProps.duration);if(!(en||yn||lt)&&(Le("onHide",[ue],!1),ue.props.onHide(ue)!==!1)){if(ue.state.isVisible=!1,ue.state.isShown=!1,K=!1,U=!1,ve()&&(fe.style.visibility="hidden"),ct(),Lt(),Re(!0),ve()){var Pt=Se(),Yt=Pt.box,qt=Pt.content;ue.props.animation&&(setTransitionDuration([Yt,qt],pt),setVisibilityState([Yt,qt],"hidden"))}Fe(),Ze(),ue.props.animation?ve()&&Ht(pt,ue.unmount):ue.unmount()}}function Ot(en){Ae().addEventListener("mousemove",te),pushIfUnique(mouseMoveListeners,te),te(en)}function dn(){ue.state.isVisible&&ue.hide(),ue.state.isMounted&&(We(),Ue().forEach(function(en){en._tippy.unmount()}),fe.parentNode&&fe.parentNode.removeChild(fe),mountedInstances=mountedInstances.filter(function(en){return en!==ue}),ue.state.isMounted=!1,Le("onHidden",[ue]))}function Fn(){ue.state.isDestroyed||(ue.clearDelayTimeouts(),ue.unmount(),gn(),delete M._tippy,ue.state.isDestroyed=!0,Le("onDestroy",[ue]))}}function tippy(M,$){$===void 0&&($={});var I=defaultProps.plugins.concat($.plugins||[]);bindGlobalEventListeners();var N=Object.assign({},$,{plugins:I}),B=getArrayOfElements(M),j=B.reduce(function(U,q){var Y=q&&createTippy(q,N);return Y&&U.push(Y),U},[]);return isElement$3(M)?j[0]:j}tippy.defaultProps=defaultProps;tippy.setDefaultProps=setDefaultProps;tippy.currentInput=currentInput;Object.assign({},applyStyles$1,{effect:function($){var I=$.state,N={popper:{position:I.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(I.elements.popper.style,N.popper),I.styles=N,I.elements.arrow&&Object.assign(I.elements.arrow.style,N.arrow)}});tippy.setDefaultProps({render:render$3});class BubbleMenuView{constructor({editor:$,element:I,view:N,tippyOptions:B={},updateDelay:j=250,shouldShow:U}){this.preventHide=!1,this.shouldShow=({view:q,state:Y,from:K,to:G})=>{const{doc:J,selection:Z}=Y,{empty:ee}=Z,te=!J.textBetween(K,G).length&&isTextSelection(Y.selection),se=this.element.contains(document.activeElement);return!(!(q.hasFocus()||se)||ee||te||!this.editor.isEditable)},this.mousedownHandler=()=>{this.preventHide=!0},this.dragstartHandler=()=>{this.hide()},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:q})=>{var Y;if(this.preventHide){this.preventHide=!1;return}q!=null&&q.relatedTarget&&(!((Y=this.element.parentNode)===null||Y===void 0)&&Y.contains(q.relatedTarget))||this.hide()},this.tippyBlurHandler=q=>{this.blurHandler({event:q})},this.handleDebouncedUpdate=(q,Y)=>{const K=!(Y!=null&&Y.selection.eq(q.state.selection)),G=!(Y!=null&&Y.doc.eq(q.state.doc));!K&&!G||(this.updateDebounceTimer&&clearTimeout(this.updateDebounceTimer),this.updateDebounceTimer=window.setTimeout(()=>{this.updateHandler(q,K,G,Y)},this.updateDelay))},this.updateHandler=(q,Y,K,G)=>{var J,Z,ee;const{state:te,composing:se}=q,{selection:re}=te;if(se||!Y&&!K)return;this.createTooltip();const{ranges:le}=re,me=Math.min(...le.map(fe=>fe.$from.pos)),ue=Math.max(...le.map(fe=>fe.$to.pos));if(!((J=this.shouldShow)===null||J===void 0?void 0:J.call(this,{editor:this.editor,view:q,state:te,oldState:G,from:me,to:ue}))){this.hide();return}(Z=this.tippy)===null||Z===void 0||Z.setProps({getReferenceClientRect:((ee=this.tippyOptions)===null||ee===void 0?void 0:ee.getReferenceClientRect)||(()=>{if(isNodeSelection(te.selection)){let fe=q.nodeDOM(me);const ge=fe.dataset.nodeViewWrapper?fe:fe.querySelector("[data-node-view-wrapper]");if(ge&&(fe=ge.firstChild),fe)return fe.getBoundingClientRect()}return posToDOMRect(q,me,ue)})}),this.show()},this.editor=$,this.element=I,this.view=N,this.updateDelay=j,U&&(this.shouldShow=U),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.addEventListener("dragstart",this.dragstartHandler),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.tippyOptions=B,this.element.remove(),this.element.style.visibility="visible"}createTooltip(){const{element:$}=this.editor.options,I=!!$.parentElement;this.tippy||!I||(this.tippy=tippy($,{duration:0,getReferenceClientRect:null,content:this.element,interactive:!0,trigger:"manual",placement:"top",hideOnClick:"toggle",...this.tippyOptions}),this.tippy.popper.firstChild&&this.tippy.popper.firstChild.addEventListener("blur",this.tippyBlurHandler))}update($,I){const{state:N}=$,B=N.selection.from!==N.selection.to;if(this.updateDelay>0&&B){this.handleDebouncedUpdate($,I);return}const j=!(I!=null&&I.selection.eq($.state.selection)),U=!(I!=null&&I.doc.eq($.state.doc));this.updateHandler($,j,U,I)}show(){var $;($=this.tippy)===null||$===void 0||$.show()}hide(){var $;($=this.tippy)===null||$===void 0||$.hide()}destroy(){var $,I;!(($=this.tippy)===null||$===void 0)&&$.popper.firstChild&&this.tippy.popper.firstChild.removeEventListener("blur",this.tippyBlurHandler),(I=this.tippy)===null||I===void 0||I.destroy(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.removeEventListener("dragstart",this.dragstartHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler)}}const BubbleMenuPlugin=M=>new Plugin({key:typeof M.pluginKey=="string"?new PluginKey(M.pluginKey):M.pluginKey,view:$=>new BubbleMenuView({view:$,...M})});Extension.create({name:"bubbleMenu",addOptions(){return{element:null,tippyOptions:{},pluginKey:"bubbleMenu",updateDelay:void 0,shouldShow:null}},addProseMirrorPlugins(){return this.options.element?[BubbleMenuPlugin({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,tippyOptions:this.options.tippyOptions,updateDelay:this.options.updateDelay,shouldShow:this.options.shouldShow})]:[]}});let FloatingMenuView$1=class{constructor({editor:$,element:I,view:N,tippyOptions:B={},shouldShow:j}){this.preventHide=!1,this.shouldShow=({view:U,state:q})=>{const{selection:Y}=q,{$anchor:K,empty:G}=Y,J=K.depth===1,Z=K.parent.isTextblock&&!K.parent.type.spec.code&&!K.parent.textContent;return!(!U.hasFocus()||!G||!J||!Z||!this.editor.isEditable)},this.mousedownHandler=()=>{this.preventHide=!0},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:U})=>{var q;if(this.preventHide){this.preventHide=!1;return}U!=null&&U.relatedTarget&&(!((q=this.element.parentNode)===null||q===void 0)&&q.contains(U.relatedTarget))||this.hide()},this.tippyBlurHandler=U=>{this.blurHandler({event:U})},this.editor=$,this.element=I,this.view=N,j&&(this.shouldShow=j),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.tippyOptions=B,this.element.remove(),this.element.style.visibility="visible"}createTooltip(){const{element:$}=this.editor.options,I=!!$.parentElement;this.tippy||!I||(this.tippy=tippy($,{duration:0,getReferenceClientRect:null,content:this.element,interactive:!0,trigger:"manual",placement:"right",hideOnClick:"toggle",...this.tippyOptions}),this.tippy.popper.firstChild&&this.tippy.popper.firstChild.addEventListener("blur",this.tippyBlurHandler))}update($,I){var N,B,j;const{state:U}=$,{doc:q,selection:Y}=U,{from:K,to:G}=Y;if(I&&I.doc.eq(q)&&I.selection.eq(Y))return;if(this.createTooltip(),!((N=this.shouldShow)===null||N===void 0?void 0:N.call(this,{editor:this.editor,view:$,state:U,oldState:I}))){this.hide();return}(B=this.tippy)===null||B===void 0||B.setProps({getReferenceClientRect:((j=this.tippyOptions)===null||j===void 0?void 0:j.getReferenceClientRect)||(()=>posToDOMRect($,K,G))}),this.show()}show(){var $;($=this.tippy)===null||$===void 0||$.show()}hide(){var $;($=this.tippy)===null||$===void 0||$.hide()}destroy(){var $,I;!(($=this.tippy)===null||$===void 0)&&$.popper.firstChild&&this.tippy.popper.firstChild.removeEventListener("blur",this.tippyBlurHandler),(I=this.tippy)===null||I===void 0||I.destroy(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler)}};const FloatingMenuPlugin$1=M=>new Plugin({key:typeof M.pluginKey=="string"?new PluginKey(M.pluginKey):M.pluginKey,view:$=>new FloatingMenuView$1({view:$,...M})});Extension.create({name:"floatingMenu",addOptions(){return{element:null,tippyOptions:{},pluginKey:"floatingMenu",shouldShow:null}},addProseMirrorPlugins(){return this.options.element?[FloatingMenuPlugin$1({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,tippyOptions:this.options.tippyOptions,shouldShow:this.options.shouldShow})]:[]}});var dist$1={},string={},util={},validators$2={};const require$$0$1=getAugmentedNamespace(vue_esm);var isInstanceOf$1={};Object.defineProperty(isInstanceOf$1,"__esModule",{value:!0});isInstanceOf$1.isInstanceOf=void 0;const isInstanceOf=M=>$=>{if(!($ instanceof M))return`value should be an instance of ${M.name}`};isInstanceOf$1.isInstanceOf=isInstanceOf;var isInteger$1={};Object.defineProperty(isInteger$1,"__esModule",{value:!0});isInteger$1.isInteger=void 0;const isInteger=M=>{if(typeof M!="number"||!Number.isInteger(M))return"value should be an integer"};isInteger$1.isInteger=isInteger;var isOneOf$1={};Object.defineProperty(isOneOf$1,"__esModule",{value:!0});isOneOf$1.isOneOf=void 0;const isOneOf=M=>$=>{if(!M.includes($))return`value should be one of "${M.join('", "')}"`};isOneOf$1.isOneOf=isOneOf;var isSymbol$4={};Object.defineProperty(isSymbol$4,"__esModule",{value:!0});isSymbol$4.isSymbol=void 0;const isSymbol$3=M=>{if(typeof M!="symbol")return"value should be a symbol"};isSymbol$4.isSymbol=isSymbol$3;(function(M){var $=commonjsGlobal&&commonjsGlobal.__importDefault||function(Y){return Y&&Y.__esModule?Y:{default:Y}};Object.defineProperty(M,"__esModule",{value:!0}),M.isSymbol=M.isOneOf=M.isInteger=M.isInstanceOf=M.vuePropValidator=void 0;const I=$(require$$0$1);function N(Y,...K){const G=Y?[...K,Y]:K;if(G.length!==0)return J=>{for(const Z of G){const ee=Z(J);if(ee)return typeof I.default=="object"&&"util"in I.default?I.default.util.warn(`${ee} (received: '${String(J)}')`):console.warn(`${ee} (received: '${String(J)}')`),!1}return!0}}M.vuePropValidator=N;var B=isInstanceOf$1;Object.defineProperty(M,"isInstanceOf",{enumerable:!0,get:function(){return B.isInstanceOf}});var j=isInteger$1;Object.defineProperty(M,"isInteger",{enumerable:!0,get:function(){return j.isInteger}});var U=isOneOf$1;Object.defineProperty(M,"isOneOf",{enumerable:!0,get:function(){return U.isOneOf}});var q=isSymbol$4;Object.defineProperty(M,"isSymbol",{enumerable:!0,get:function(){return q.isSymbol}})})(validators$2);Object.defineProperty(util,"__esModule",{value:!0});util.propOptionsGenerator=void 0;const validators_1$5=validators$2,propOptionsGenerator=(M,$,...I)=>({optional:{type:M,required:!1,default:void 0,validator:(0,validators_1$5.vuePropValidator)($,...I)},nullable:{type:M,required:!1,default:null,validator:(0,validators_1$5.vuePropValidator)($,...I)},withDefault:N=>({type:M,required:!1,default:N,validator:(0,validators_1$5.vuePropValidator)($,...I)}),required:{type:M,required:!0,validator:(0,validators_1$5.vuePropValidator)($,...I)}});util.propOptionsGenerator=propOptionsGenerator;Object.defineProperty(string,"__esModule",{value:!0});string.stringProp=void 0;const util_1$b=util,stringProp=M=>(0,util_1$b.propOptionsGenerator)(String,M);string.stringProp=stringProp;var boolean={};Object.defineProperty(boolean,"__esModule",{value:!0});boolean.booleanProp=void 0;const util_1$a=util,booleanProp=M=>(0,util_1$a.propOptionsGenerator)(Boolean,M);boolean.booleanProp=booleanProp;var number={};Object.defineProperty(number,"__esModule",{value:!0});number.numberProp=void 0;const util_1$9=util,numberProp=M=>(0,util_1$9.propOptionsGenerator)(Number,M);number.numberProp=numberProp;var integer={};Object.defineProperty(integer,"__esModule",{value:!0});integer.integerProp=void 0;const util_1$8=util,validators_1$4=validators$2,integerProp=M=>(0,util_1$8.propOptionsGenerator)(Number,M,validators_1$4.isInteger);integer.integerProp=integerProp;var symbol={};Object.defineProperty(symbol,"__esModule",{value:!0});symbol.symbolProp=void 0;const util_1$7=util,validators_1$3=validators$2,symbolProp=M=>(0,util_1$7.propOptionsGenerator)(void 0,M,validators_1$3.isSymbol);symbol.symbolProp=symbolProp;var vueComponent={};Object.defineProperty(vueComponent,"__esModule",{value:!0});vueComponent.vueComponentProp=void 0;const util_1$6=util,vueComponentProp=M=>(0,util_1$6.propOptionsGenerator)([Object,String],M);vueComponent.vueComponentProp=vueComponentProp;var any={};Object.defineProperty(any,"__esModule",{value:!0});any.anyProp=void 0;const util_1$5=util,anyProp=M=>(0,util_1$5.propOptionsGenerator)(void 0,M);any.anyProp=anyProp;var array={};Object.defineProperty(array,"__esModule",{value:!0});array.arrayProp=void 0;const util_1$4=util,arrayProp=M=>(0,util_1$4.propOptionsGenerator)(Array,M);array.arrayProp=arrayProp;var object$1={};Object.defineProperty(object$1,"__esModule",{value:!0});object$1.objectProp=void 0;const util_1$3=util,objectProp=M=>(0,util_1$3.propOptionsGenerator)(Object,M);object$1.objectProp=objectProp;var _function={};Object.defineProperty(_function,"__esModule",{value:!0});_function.functionProp=void 0;const validators_1$2=validators$2,functionProp=M=>({optional:{type:Function,required:!1,default:void 0,validator:(0,validators_1$2.vuePropValidator)(M)},nullable:{type:Function,required:!1,default:null,validator:(0,validators_1$2.vuePropValidator)(M)},required:{type:Function,required:!0,validator:(0,validators_1$2.vuePropValidator)(M)}});_function.functionProp=functionProp;var oneOf={};Object.defineProperty(oneOf,"__esModule",{value:!0});oneOf.oneOfProp=void 0;const util_1$2=util,validators_1$1=validators$2,getOneOfType=M=>{const $=[...new Set(M.flatMap(I=>{var N;return I==null?[]:(N=I.constructor)!==null&&N!==void 0?N:[]}))];if($.length!==0)return $.length===1?$[0]:$},oneOfProp=(M,$)=>(0,util_1$2.propOptionsGenerator)(getOneOfType(M),$,(0,validators_1$1.isOneOf)(M));oneOf.oneOfProp=oneOfProp;var oneOfObjectKeys={};Object.defineProperty(oneOfObjectKeys,"__esModule",{value:!0});oneOfObjectKeys.oneOfObjectKeysProp=void 0;const oneOf_1=oneOf,oneOfObjectKeysProp=(M,$)=>(0,oneOf_1.oneOfProp)(Object.keys(M),$);oneOfObjectKeys.oneOfObjectKeysProp=oneOfObjectKeysProp;var oneOfTypes={};Object.defineProperty(oneOfTypes,"__esModule",{value:!0});oneOfTypes.oneOfTypesProp=void 0;const util_1$1=util,oneOfTypesProp=(M,$)=>(0,util_1$1.propOptionsGenerator)(M,$);oneOfTypes.oneOfTypesProp=oneOfTypesProp;var instanceOf={};Object.defineProperty(instanceOf,"__esModule",{value:!0});instanceOf.instanceOfProp=void 0;const util_1=util,validators_1=validators$2,instanceOfProp=(M,$)=>(0,util_1.propOptionsGenerator)(M,$,(0,validators_1.isInstanceOf)(M));instanceOf.instanceOfProp=instanceOfProp;var isNegative$1={};Object.defineProperty(isNegative$1,"__esModule",{value:!0});isNegative$1.isNegative=void 0;const isNegative=M=>{if(typeof M!="number"||M>=0||Number.isNaN(M))return"value should be a negative number"};isNegative$1.isNegative=isNegative;var isPositive$1={};Object.defineProperty(isPositive$1,"__esModule",{value:!0});isPositive$1.isPositive=void 0;const isPositive=M=>{if(typeof M!="number"||M<=0||Number.isNaN(M))return"value should be a positive number"};isPositive$1.isPositive=isPositive;var isNonNegative$1={};Object.defineProperty(isNonNegative$1,"__esModule",{value:!0});isNonNegative$1.isNonNegative=void 0;const isNonNegative=M=>{if(typeof M!="number"||M<0||Number.isNaN(M))return"value should be a non-negative number"};isNonNegative$1.isNonNegative=isNonNegative;var isNonPositive$1={};Object.defineProperty(isNonPositive$1,"__esModule",{value:!0});isNonPositive$1.isNonPositive=void 0;const isNonPositive=M=>{if(typeof M!="number"||M>0||Number.isNaN(M))return"value should be a non-positive number"};isNonPositive$1.isNonPositive=isNonPositive;(function(M){Object.defineProperty(M,"__esModule",{value:!0}),M.isNonPositive=M.isNonNegative=M.isPositive=M.isNegative=M.instanceOfProp=M.oneOfTypesProp=M.oneOfObjectKeysProp=M.oneOfProp=M.functionProp=M.objectProp=M.arrayProp=M.anyProp=M.vueComponentProp=M.symbolProp=M.integerProp=M.numberProp=M.booleanProp=M.stringProp=void 0;var $=string;Object.defineProperty(M,"stringProp",{enumerable:!0,get:function(){return $.stringProp}});var I=boolean;Object.defineProperty(M,"booleanProp",{enumerable:!0,get:function(){return I.booleanProp}});var N=number;Object.defineProperty(M,"numberProp",{enumerable:!0,get:function(){return N.numberProp}});var B=integer;Object.defineProperty(M,"integerProp",{enumerable:!0,get:function(){return B.integerProp}});var j=symbol;Object.defineProperty(M,"symbolProp",{enumerable:!0,get:function(){return j.symbolProp}});var U=vueComponent;Object.defineProperty(M,"vueComponentProp",{enumerable:!0,get:function(){return U.vueComponentProp}});var q=any;Object.defineProperty(M,"anyProp",{enumerable:!0,get:function(){return q.anyProp}});var Y=array;Object.defineProperty(M,"arrayProp",{enumerable:!0,get:function(){return Y.arrayProp}});var K=object$1;Object.defineProperty(M,"objectProp",{enumerable:!0,get:function(){return K.objectProp}});var G=_function;Object.defineProperty(M,"functionProp",{enumerable:!0,get:function(){return G.functionProp}});var J=oneOf;Object.defineProperty(M,"oneOfProp",{enumerable:!0,get:function(){return J.oneOfProp}});var Z=oneOfObjectKeys;Object.defineProperty(M,"oneOfObjectKeysProp",{enumerable:!0,get:function(){return Z.oneOfObjectKeysProp}});var ee=oneOfTypes;Object.defineProperty(M,"oneOfTypesProp",{enumerable:!0,get:function(){return ee.oneOfTypesProp}});var te=instanceOf;Object.defineProperty(M,"instanceOfProp",{enumerable:!0,get:function(){return te.instanceOfProp}});var se=isNegative$1;Object.defineProperty(M,"isNegative",{enumerable:!0,get:function(){return se.isNegative}});var re=isPositive$1;Object.defineProperty(M,"isPositive",{enumerable:!0,get:function(){return re.isPositive}});var ne=isNonNegative$1;Object.defineProperty(M,"isNonNegative",{enumerable:!0,get:function(){return ne.isNonNegative}});var le=isNonPositive$1;Object.defineProperty(M,"isNonPositive",{enumerable:!0,get:function(){return le.isNonPositive}})})(dist$1);const BubbleMenu={name:"BubbleMenu",props:{pluginKey:{type:[String,Object],default:"bubbleMenu"},editor:{type:Object,required:!0},updateDelay:{type:Number},tippyOptions:{type:Object,default:()=>({})},shouldShow:{type:Function,default:null}},watch:{editor:{immediate:!0,handler(M){M&&this.$nextTick(()=>{M.registerPlugin(BubbleMenuPlugin({updateDelay:this.updateDelay,editor:M,element:this.$el,pluginKey:this.pluginKey,shouldShow:this.shouldShow,tippyOptions:this.tippyOptions}))})}}},render(M){return M("div",{style:{visibility:"hidden"}},this.$slots.default)},beforeDestroy(){this.editor.unregisterPlugin(this.pluginKey)}};class Editor extends Editor$1{constructor(){super(...arguments),this.contentComponent=null}}const EditorContent={name:"EditorContent",props:{editor:{default:null,type:Object}},watch:{editor:{immediate:!0,handler(M){M&&M.options.element&&this.$nextTick(()=>{const $=this.$el;!$||!M.options.element.firstChild||($.append(...M.options.element.childNodes),M.contentComponent=this,M.setOptions({element:$}),M.createNodeViews())})}}},render(M){return M("div")},beforeDestroy(){const{editor:M}=this;if(!M||(M.isDestroyed||M.view.setProps({nodeViews:{}}),M.contentComponent=null,!M.options.element.firstChild))return;const $=document.createElement("div");$.append(...M.options.element.childNodes),M.setOptions({element:$})}},FloatingMenu$1={name:"FloatingMenu",props:{pluginKey:{type:[String,Object],default:"floatingMenu"},editor:{type:Object,required:!0},tippyOptions:{type:Object,default:()=>({})},shouldShow:{type:Function,default:null}},watch:{editor:{immediate:!0,handler(M){M&&this.$nextTick(()=>{M.registerPlugin(FloatingMenuPlugin$1({pluginKey:this.pluginKey,editor:M,element:this.$el,tippyOptions:this.tippyOptions,shouldShow:this.shouldShow}))})}}},render(M){return M("div",{style:{visibility:"hidden"}},this.$slots.default)},beforeDestroy(){this.editor.unregisterPlugin(this.pluginKey)}},NodeViewContent={props:{as:{type:String,default:"div"}},render(M){return M(this.as,{style:{whiteSpace:"pre-wrap"},attrs:{"data-node-view-content":""}})}},NodeViewWrapper={props:{as:{type:String,default:"div"}},inject:["onDragStart","decorationClasses"],render(M){return M(this.as,{class:this.decorationClasses.value,style:{whiteSpace:"normal"},attrs:{"data-node-view-wrapper":""},on:{dragstart:this.onDragStart}},this.$slots.default)}};class VueRenderer{constructor($,I){const N=typeof $=="function"?$:Vue$3.extend($);this.ref=new N(I).$mount()}get element(){return this.ref.$el}updateProps($={}){var I,N,B;if(!this.ref.$props)return;const j=(B=(N=(I=this.ref.$props.editor)===null||I===void 0?void 0:I.contentComponent)===null||N===void 0?void 0:N.$options._base)!==null&&B!==void 0?B:Vue$3,U=j.config.silent;j.config.silent=!0,Object.entries($).forEach(([q,Y])=>{this.ref.$props[q]=Y}),j.config.silent=U}destroy(){this.ref.$destroy()}}const nodeViewProps={editor:dist$1.objectProp().required,node:dist$1.objectProp().required,decorations:dist$1.objectProp().required,selected:dist$1.booleanProp().required,extension:dist$1.objectProp().required,getPos:dist$1.functionProp().required,updateAttributes:dist$1.functionProp().required,deleteNode:dist$1.functionProp().required};class VueNodeView extends NodeView{mount(){var $,I;const N={editor:this.editor,node:this.node,decorations:this.decorations,innerDecorations:this.innerDecorations,view:this.view,selected:!1,extension:this.extension,HTMLAttributes:this.HTMLAttributes,getPos:()=>this.getPos(),updateAttributes:(q={})=>this.updateAttributes(q),deleteNode:()=>this.deleteNode()},B=this.onDragStart.bind(this);this.decorationClasses=Vue$3.observable({value:this.getDecorationClasses()});const U=((I=($=this.editor.contentComponent)===null||$===void 0?void 0:$.$options._base)!==null&&I!==void 0?I:Vue$3).extend(this.component).extend({props:Object.keys(N),provide:()=>({onDragStart:B,decorationClasses:this.decorationClasses})});this.handleSelectionUpdate=this.handleSelectionUpdate.bind(this),this.editor.on("selectionUpdate",this.handleSelectionUpdate),this.renderer=new VueRenderer(U,{parent:this.editor.contentComponent,propsData:N})}get dom(){if(!this.renderer.element.hasAttribute("data-node-view-wrapper"))throw Error("Please use the NodeViewWrapper component for your node view.");return this.renderer.element}get contentDOM(){return this.node.isLeaf?null:this.dom.querySelector("[data-node-view-content]")||this.dom}handleSelectionUpdate(){const{from:$,to:I}=this.editor.state.selection,N=this.getPos();if(typeof N=="number")if($<=N&&I>=N+this.node.nodeSize){if(this.renderer.ref.$props.selected)return;this.selectNode()}else{if(!this.renderer.ref.$props.selected)return;this.deselectNode()}}update($,I,N){const B=j=>{this.decorationClasses.value=this.getDecorationClasses(),this.renderer.updateProps(j)};if(typeof this.options.update=="function"){const j=this.node,U=this.decorations,q=this.innerDecorations;return this.node=$,this.decorations=I,this.innerDecorations=N,this.options.update({oldNode:j,oldDecorations:U,newNode:$,newDecorations:I,oldInnerDecorations:q,innerDecorations:N,updateProps:()=>B({node:$,decorations:I,innerDecorations:N})})}return $.type!==this.node.type?!1:($===this.node&&this.decorations===I&&this.innerDecorations===N||(this.node=$,this.decorations=I,this.innerDecorations=N,B({node:$,decorations:I,innerDecorations:N})),!0)}selectNode(){this.renderer.updateProps({selected:!0}),this.renderer.element.classList.add("ProseMirror-selectednode")}deselectNode(){this.renderer.updateProps({selected:!1}),this.renderer.element.classList.remove("ProseMirror-selectednode")}getDecorationClasses(){return this.decorations.map($=>$.type.attrs.class).flat().join(" ")}destroy(){this.renderer.destroy(),this.editor.off("selectionUpdate",this.handleSelectionUpdate)}}function VueNodeViewRenderer(M,$){return I=>I.editor.contentComponent?new VueNodeView(M,I,$):{}}const vue2=Object.freeze(Object.defineProperty({__proto__:null,BubbleMenu,CommandManager,Editor,EditorContent,Extension,FloatingMenu:FloatingMenu$1,InputRule,Mark,Node:Node$1,NodePos,NodeView,NodeViewContent,NodeViewWrapper,PasteRule,Tracker,VueNodeViewRenderer,VueRenderer,callOrReturn,combineTransactionSteps,createChainableState,createDocument,createNodeFromContent,createStyleTag,defaultBlockAt,deleteProps,elementFromString,escapeForRegEx,extensions:index$2,findChildren,findChildrenInRange,findDuplicates,findParentNode,findParentNodeClosestToPos,fromString,generateHTML,generateJSON,generateText,getAttributes,getAttributesFromExtensions,getChangedRanges,getDebugJSON,getExtensionField,getHTMLFromFragment,getMarkAttributes,getMarkRange,getMarkType,getMarksBetween,getNodeAtPosition,getNodeAttributes,getNodeType,getRenderedAttributes,getSchema,getSchemaByResolvedExtensions,getSchemaTypeByName,getSchemaTypeNameByName,getSplittedAttributes,getText,getTextBetween,getTextContentFromNodes,getTextSerializersFromSchema,injectExtensionAttributesToParseRule,inputRulesPlugin,isActive,isAtEndOfNode,isAtStartOfNode,isEmptyObject,isExtensionRulesEnabled,isFunction:isFunction$5,isList,isMacOS,isMarkActive,isNodeActive,isNodeEmpty,isNodeSelection,isNumber:isNumber$4,isPlainObject:isPlainObject$1,isRegExp:isRegExp$4,isString:isString$6,isTextSelection,isiOS,markInputRule,markPasteRule,mergeAttributes,mergeDeep,minMax,nodeInputRule,nodePasteRule,nodeViewProps,objectIncludes:objectIncludes$1,pasteRulesPlugin,posToDOMRect,removeDuplicates,resolveFocusPosition,selectionToInsertionEnd,splitExtensions,textInputRule,textPasteRule,textblockTypeInputRule,wrappingInputRule},Symbol.toStringTag,{value:"Module"}));class Bard{constructor($){this.instance=$,this.extensionCallbacks=[],this.extensionReplacementCallbacks=[],this.buttonCallbacks=[]}addExtension($){this.extensionCallbacks.push($)}replaceExtension($,I){this.extensionReplacementCallbacks.push({name:$,callback:I})}buttons($){this.buttonCallbacks.push($)}get tiptap(){return{core:core$2,vue2,pm:{state,model,view}}}}var mousetrap$1={exports:{}};(function(M){(function($,I,N){for(var B={8:"backspace",9:"tab",13:"enter",16:"shift",17:"ctrl",18:"alt",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"ins",46:"del",91:"meta",93:"meta",224:"meta"},j={106:"*",107:"+",109:"-",110:".",111:"/",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},U={"~":"`","!":"1","@":"2","#":"3",$:"4","%":"5","^":"6","&":"7","*":"8","(":"9",")":"0",_:"-","+":"=",":":";",'"':"'","<":",",">":".","?":"/","|":"\\"},q={option:"alt",command:"meta",return:"enter",escape:"esc",plus:"+",mod:/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"meta":"ctrl"},Y,K=1;K<20;++K)B[111+K]="f"+K;for(K=0;K<=9;++K)B[K+96]=K;function G(ge,ye,xe){if(ge.addEventListener){ge.addEventListener(ye,xe,!1);return}ge.attachEvent("on"+ye,xe)}function J(ge){if(ge.type=="keypress"){var ye=String.fromCharCode(ge.which);return ge.shiftKey||(ye=ye.toLowerCase()),ye}return B[ge.which]?B[ge.which]:j[ge.which]?j[ge.which]:String.fromCharCode(ge.which).toLowerCase()}function Z(ge,ye){return ge.sort().join(",")===ye.sort().join(",")}function ee(ge){var ye=[];return ge.shiftKey&&ye.push("shift"),ge.altKey&&ye.push("alt"),ge.ctrlKey&&ye.push("ctrl"),ge.metaKey&&ye.push("meta"),ye}function te(ge){if(ge.preventDefault){ge.preventDefault();return}ge.returnValue=!1}function se(ge){if(ge.stopPropagation){ge.stopPropagation();return}ge.cancelBubble=!0}function re(ge){return ge=="shift"||ge=="ctrl"||ge=="alt"||ge=="meta"}function ne(){if(!Y){Y={};for(var ge in B)ge>95&&ge<112||B.hasOwnProperty(ge)&&(Y[B[ge]]=ge)}return Y}function le(ge,ye,xe){return xe||(xe=ne()[ge]?"keydown":"keypress"),xe=="keypress"&&ye.length&&(xe="keydown"),xe}function me(ge){return ge==="+"?["+"]:(ge=ge.replace(/\+{2}/g,"+plus"),ge.split("+"))}function ue(ge,ye){var xe,oe,be,ve=[];for(xe=me(ge),be=0;be1){Fe(ct,Lt,qe,Ve);return}Ht=ue(ct,Ve),ye._callbacks[Ht.key]=ye._callbacks[Ht.key]||[],Se(Ht.key,Ht.modifiers,{type:Ht.action},Rt,ct,Nt),ye._callbacks[Ht.key][Rt?"unshift":"push"]({callback:qe,modifiers:Ht.modifiers,action:Ht.action,seq:Rt,level:Nt,combo:ct})}ye._bindMultiple=function(ct,qe,Ve){for(var Rt=0;Rt-1||_e(ye,xe.target)?!1:ye.tagName=="INPUT"||ye.tagName=="SELECT"||ye.tagName=="TEXTAREA"||ye.isContentEditable},fe.prototype.handleKey=function(){var ge=this;return ge._handleKey.apply(ge,arguments)},fe.init=function(){var ge=fe(I);for(var ye in ge)ye.charAt(0)!=="_"&&(fe[ye]=function(xe){return function(){return ge[xe].apply(ge,arguments)}}(ye))},fe.init(),$.Mousetrap=fe,M.exports&&(M.exports=fe),typeof N=="function"&&N.amd&&N(function(){return fe})})(window,document)})(mousetrap$1);var mousetrapExports=mousetrap$1.exports;const mousetrap=getDefaultExportFromCjs$1(mousetrapExports);class Binding{constructor($){this.bindings=$}bind($,I){return typeof $=="string"&&($=[$]),$.forEach(N=>{this.bindings[N]=this.bindings[N]||[],this.bindings[N].push(I),this.bindMousetrap(N,I)}),this.bound=$,this}destroy(){this.bound.forEach($=>{this.bindings[$].pop();const I=this.bindings[$].slice(-1)[0];I?mousetrap.bind($,I):mousetrap.unbind($)})}stop($){mousetrap.prototype.stopCallback=$}bindMousetrap($,I){mousetrap.bind($,I)}}(function(M){var $={},I=M.prototype.stopCallback;M.prototype.stopCallback=function(N,B,j,U){var q=this;return q.paused?!0:$[j]||$[U]?!1:I.call(q,N,B,j)},M.prototype.bindGlobal=function(N,B,j){var U=this;if(U.bind(N,B,j),N instanceof Array){for(var q=0;q{this.getCallbacks($).sort((j,U)=>U.priority-j.priority).map(j=>this.convertToPromiseCallback(j.callback,I)).reduce((j,U)=>j.then(q=>U().then(Array.prototype.concat.bind(q))),Promise.resolve([])).then(j=>N(j)).catch(j=>B(j))})}getCallbacks($){return this.hooks[$]||[]}convertToPromiseCallback($,I){return()=>new Promise((N,B)=>{$(N,B,I)})}};function getDefaults(){return{async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,hooks:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}let defaults$7=getDefaults();function changeDefaults(M){defaults$7=M}const escapeTest=/[&<>"']/,escapeReplace=new RegExp(escapeTest.source,"g"),escapeTestNoEncode=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode=new RegExp(escapeTestNoEncode.source,"g"),escapeReplacements={"&":"&","<":"<",">":">",'"':""","'":"'"},getEscapeReplacement=M=>escapeReplacements[M];function escape$4(M,$){if($){if(escapeTest.test(M))return M.replace(escapeReplace,getEscapeReplacement)}else if(escapeTestNoEncode.test(M))return M.replace(escapeReplaceNoEncode,getEscapeReplacement);return M}const unescapeTest=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function unescape$2(M){return M.replace(unescapeTest,($,I)=>(I=I.toLowerCase(),I==="colon"?":":I.charAt(0)==="#"?I.charAt(1)==="x"?String.fromCharCode(parseInt(I.substring(2),16)):String.fromCharCode(+I.substring(1)):""))}const caret=/(^|[^\[])\^/g;function edit(M,$){M=typeof M=="string"?M:M.source,$=$||"";const I={replace:(N,B)=>(B=B.source||B,B=B.replace(caret,"$1"),M=M.replace(N,B),I),getRegex:()=>new RegExp(M,$)};return I}const nonWordAndColonTest=/[^\w:]/g,originIndependentUrl=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function cleanUrl(M,$,I){if(M){let N;try{N=decodeURIComponent(unescape$2(I)).replace(nonWordAndColonTest,"").toLowerCase()}catch{return null}if(N.indexOf("javascript:")===0||N.indexOf("vbscript:")===0||N.indexOf("data:")===0)return null}$&&!originIndependentUrl.test(I)&&(I=resolveUrl($,I));try{I=encodeURI(I).replace(/%25/g,"%")}catch{return null}return I}const baseUrls={},justDomain=/^[^:]+:\/*[^/]*$/,protocol=/^([^:]+:)[\s\S]*$/,domain=/^([^:]+:\/*[^/]*)[\s\S]*$/;function resolveUrl(M,$){baseUrls[" "+M]||(justDomain.test(M)?baseUrls[" "+M]=M+"/":baseUrls[" "+M]=rtrim(M,"/",!0)),M=baseUrls[" "+M];const I=M.indexOf(":")===-1;return $.substring(0,2)==="//"?I?$:M.replace(protocol,"$1")+$:$.charAt(0)==="/"?I?$:M.replace(domain,"$1")+$:M+$}const noopTest={exec:function(){}};function splitCells(M,$){const I=M.replace(/\|/g,(j,U,q)=>{let Y=!1,K=U;for(;--K>=0&&q[K]==="\\";)Y=!Y;return Y?"|":" |"}),N=I.split(/ \|/);let B=0;if(N[0].trim()||N.shift(),N.length>0&&!N[N.length-1].trim()&&N.pop(),N.length>$)N.splice($);else for(;N.length<$;)N.push("");for(;B1;)$&1&&(I+=M),$>>=1,M+=M;return I+M}function outputLink(M,$,I,N){const B=$.href,j=$.title?escape$4($.title):null,U=M[1].replace(/\\([\[\]])/g,"$1");if(M[0].charAt(0)!=="!"){N.state.inLink=!0;const q={type:"link",raw:I,href:B,title:j,text:U,tokens:N.inlineTokens(U)};return N.state.inLink=!1,q}return{type:"image",raw:I,href:B,title:j,text:escape$4(U)}}function indentCodeCompensation(M,$){const I=M.match(/^(\s+)(?:```)/);if(I===null)return $;const N=I[1];return $.split(` +`).map(B=>{const j=B.match(/^\s+/);if(j===null)return B;const[U]=j;return U.length>=N.length?B.slice(N.length):B}).join(` +`)}class Tokenizer{constructor($){this.options=$||defaults$7}space($){const I=this.rules.block.newline.exec($);if(I&&I[0].length>0)return{type:"space",raw:I[0]}}code($){const I=this.rules.block.code.exec($);if(I){const N=I[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:I[0],codeBlockStyle:"indented",text:this.options.pedantic?N:rtrim(N,` +`)}}}fences($){const I=this.rules.block.fences.exec($);if(I){const N=I[0],B=indentCodeCompensation(N,I[3]||"");return{type:"code",raw:N,lang:I[2]?I[2].trim().replace(this.rules.inline._escapes,"$1"):I[2],text:B}}}heading($){const I=this.rules.block.heading.exec($);if(I){let N=I[2].trim();if(/#$/.test(N)){const B=rtrim(N,"#");(this.options.pedantic||!B||/ $/.test(B))&&(N=B.trim())}return{type:"heading",raw:I[0],depth:I[1].length,text:N,tokens:this.lexer.inline(N)}}}hr($){const I=this.rules.block.hr.exec($);if(I)return{type:"hr",raw:I[0]}}blockquote($){const I=this.rules.block.blockquote.exec($);if(I){const N=I[0].replace(/^ *>[ \t]?/gm,""),B=this.lexer.state.top;this.lexer.state.top=!0;const j=this.lexer.blockTokens(N);return this.lexer.state.top=B,{type:"blockquote",raw:I[0],tokens:j,text:N}}}list($){let I=this.rules.block.list.exec($);if(I){let N,B,j,U,q,Y,K,G,J,Z,ee,te,se=I[1].trim();const re=se.length>1,ne={type:"list",raw:"",ordered:re,start:re?+se.slice(0,-1):"",loose:!1,items:[]};se=re?`\\d{1,9}\\${se.slice(-1)}`:`\\${se}`,this.options.pedantic&&(se=re?se:"[*+-]");const le=new RegExp(`^( {0,3}${se})((?:[ ][^\\n]*)?(?:\\n|$))`);for(;$&&(te=!1,!(!(I=le.exec($))||this.rules.block.hr.test($)));){if(N=I[0],$=$.substring(N.length),G=I[2].split(` +`,1)[0].replace(/^\t+/,ue=>" ".repeat(3*ue.length)),J=$.split(` +`,1)[0],this.options.pedantic?(U=2,ee=G.trimLeft()):(U=I[2].search(/[^ ]/),U=U>4?1:U,ee=G.slice(U),U+=I[1].length),Y=!1,!G&&/^ *$/.test(J)&&(N+=J+` +`,$=$.substring(J.length+1),te=!0),!te){const ue=new RegExp(`^ {0,${Math.min(3,U-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),_e=new RegExp(`^ {0,${Math.min(3,U-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fe=new RegExp(`^ {0,${Math.min(3,U-1)}}(?:\`\`\`|~~~)`),ge=new RegExp(`^ {0,${Math.min(3,U-1)}}#`);for(;$&&(Z=$.split(` +`,1)[0],J=Z,this.options.pedantic&&(J=J.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!(fe.test(J)||ge.test(J)||ue.test(J)||_e.test($)));){if(J.search(/[^ ]/)>=U||!J.trim())ee+=` +`+J.slice(U);else{if(Y||G.search(/[^ ]/)>=4||fe.test(G)||ge.test(G)||_e.test(G))break;ee+=` +`+J}!Y&&!J.trim()&&(Y=!0),N+=Z+` +`,$=$.substring(Z.length+1),G=J.slice(U)}}ne.loose||(K?ne.loose=!0:/\n *\n *$/.test(N)&&(K=!0)),this.options.gfm&&(B=/^\[[ xX]\] /.exec(ee),B&&(j=B[0]!=="[ ] ",ee=ee.replace(/^\[[ xX]\] +/,""))),ne.items.push({type:"list_item",raw:N,task:!!B,checked:j,loose:!1,text:ee}),ne.raw+=N}ne.items[ne.items.length-1].raw=N.trimRight(),ne.items[ne.items.length-1].text=ee.trimRight(),ne.raw=ne.raw.trimRight();const me=ne.items.length;for(q=0;qfe.type==="space"),_e=ue.length>0&&ue.some(fe=>/\n.*\n/.test(fe.raw));ne.loose=_e}if(ne.loose)for(q=0;q$/,"$1").replace(this.rules.inline._escapes,"$1"):"",j=I[3]?I[3].substring(1,I[3].length-1).replace(this.rules.inline._escapes,"$1"):I[3];return{type:"def",tag:N,raw:I[0],href:B,title:j}}}table($){const I=this.rules.block.table.exec($);if(I){const N={type:"table",header:splitCells(I[1]).map(B=>({text:B})),align:I[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:I[3]&&I[3].trim()?I[3].replace(/\n[ \t]*$/,"").split(` +`):[]};if(N.header.length===N.align.length){N.raw=I[0];let B=N.align.length,j,U,q,Y;for(j=0;j({text:K}));for(B=N.header.length,U=0;U/i.test(I[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(I[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(I[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:I[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(I[0]):escape$4(I[0]):I[0]}}link($){const I=this.rules.inline.link.exec($);if(I){const N=I[2].trim();if(!this.options.pedantic&&/^$/.test(N))return;const U=rtrim(N.slice(0,-1),"\\");if((N.length-U.length)%2===0)return}else{const U=findClosingBracket(I[2],"()");if(U>-1){const Y=(I[0].indexOf("!")===0?5:4)+I[1].length+U;I[2]=I[2].substring(0,U),I[0]=I[0].substring(0,Y).trim(),I[3]=""}}let B=I[2],j="";if(this.options.pedantic){const U=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(B);U&&(B=U[1],j=U[3])}else j=I[3]?I[3].slice(1,-1):"";return B=B.trim(),/^$/.test(N)?B=B.slice(1):B=B.slice(1,-1)),outputLink(I,{href:B&&B.replace(this.rules.inline._escapes,"$1"),title:j&&j.replace(this.rules.inline._escapes,"$1")},I[0],this.lexer)}}reflink($,I){let N;if((N=this.rules.inline.reflink.exec($))||(N=this.rules.inline.nolink.exec($))){let B=(N[2]||N[1]).replace(/\s+/g," ");if(B=I[B.toLowerCase()],!B){const j=N[0].charAt(0);return{type:"text",raw:j,text:j}}return outputLink(N,B,N[0],this.lexer)}}emStrong($,I,N=""){let B=this.rules.inline.emStrong.lDelim.exec($);if(!B||B[3]&&N.match(/[\p{L}\p{N}]/u))return;const j=B[1]||B[2]||"";if(!j||j&&(N===""||this.rules.inline.punctuation.exec(N))){const U=B[0].length-1;let q,Y,K=U,G=0;const J=B[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(J.lastIndex=0,I=I.slice(-1*$.length+U);(B=J.exec(I))!=null;){if(q=B[1]||B[2]||B[3]||B[4]||B[5]||B[6],!q)continue;if(Y=q.length,B[3]||B[4]){K+=Y;continue}else if((B[5]||B[6])&&U%3&&!((U+Y)%3)){G+=Y;continue}if(K-=Y,K>0)continue;Y=Math.min(Y,Y+K+G);const Z=$.slice(0,U+B.index+(B[0].length-q.length)+Y);if(Math.min(U,Y)%2){const te=Z.slice(1,-1);return{type:"em",raw:Z,text:te,tokens:this.lexer.inlineTokens(te)}}const ee=Z.slice(2,-2);return{type:"strong",raw:Z,text:ee,tokens:this.lexer.inlineTokens(ee)}}}}codespan($){const I=this.rules.inline.code.exec($);if(I){let N=I[2].replace(/\n/g," ");const B=/[^ ]/.test(N),j=/^ /.test(N)&&/ $/.test(N);return B&&j&&(N=N.substring(1,N.length-1)),N=escape$4(N,!0),{type:"codespan",raw:I[0],text:N}}}br($){const I=this.rules.inline.br.exec($);if(I)return{type:"br",raw:I[0]}}del($){const I=this.rules.inline.del.exec($);if(I)return{type:"del",raw:I[0],text:I[2],tokens:this.lexer.inlineTokens(I[2])}}autolink($,I){const N=this.rules.inline.autolink.exec($);if(N){let B,j;return N[2]==="@"?(B=escape$4(this.options.mangle?I(N[1]):N[1]),j="mailto:"+B):(B=escape$4(N[1]),j=B),{type:"link",raw:N[0],text:B,href:j,tokens:[{type:"text",raw:B,text:B}]}}}url($,I){let N;if(N=this.rules.inline.url.exec($)){let B,j;if(N[2]==="@")B=escape$4(this.options.mangle?I(N[0]):N[0]),j="mailto:"+B;else{let U;do U=N[0],N[0]=this.rules.inline._backpedal.exec(N[0])[0];while(U!==N[0]);B=escape$4(N[0]),N[1]==="www."?j="http://"+N[0]:j=N[0]}return{type:"link",raw:N[0],text:B,href:j,tokens:[{type:"text",raw:B,text:B}]}}}inlineText($,I){const N=this.rules.inline.text.exec($);if(N){let B;return this.lexer.state.inRawBlock?B=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(N[0]):escape$4(N[0]):N[0]:B=escape$4(this.options.smartypants?I(N[0]):N[0]),{type:"text",raw:N[0],text:B}}}}const block={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:noopTest,lheading:/^((?:.|\n(?!\n))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/};block._label=/(?!\s*\])(?:\\.|[^\[\]\\])+/;block._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/;block.def=edit(block.def).replace("label",block._label).replace("title",block._title).getRegex();block.bullet=/(?:[*+-]|\d{1,9}[.)])/;block.listItemStart=edit(/^( *)(bull) */).replace("bull",block.bullet).getRegex();block.list=edit(block.list).replace(/bull/g,block.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+block.def.source+")").getRegex();block._tag="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|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul";block._comment=/|$)/;block.html=edit(block.html,"i").replace("comment",block._comment).replace("tag",block._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex();block.paragraph=edit(block._paragraph).replace("hr",block.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",block._tag).getRegex();block.blockquote=edit(block.blockquote).replace("paragraph",block.paragraph).getRegex();block.normal={...block};block.gfm={...block.normal,table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"};block.gfm.table=edit(block.gfm.table).replace("hr",block.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",block._tag).getRegex();block.gfm.paragraph=edit(block._paragraph).replace("hr",block.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",block.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",block._tag).getRegex();block.pedantic={...block.normal,html:edit(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",block._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:noopTest,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:edit(block.normal._paragraph).replace("hr",block.hr).replace("heading",` *#{1,6} *[^ +]`).replace("lheading",block.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()};const inline={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:noopTest,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^(?:[^_*\\]|\\.)*?\_\_(?:[^_*\\]|\\.)*?\*(?:[^_*\\]|\\.)*?(?=\_\_)|(?:[^*\\]|\\.)+(?=[^*])|[punct_](\*+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|(?:[^punct*_\s\\]|\\.)(\*+)(?=[^punct*_\s])/,rDelimUnd:/^(?:[^_*\\]|\\.)*?\*\*(?:[^_*\\]|\\.)*?\_(?:[^_*\\]|\\.)*?(?=\*\*)|(?:[^_\\]|\\.)+(?=[^_])|[punct*](\_+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:noopTest,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~";inline.punctuation=edit(inline.punctuation).replace(/punctuation/g,inline._punctuation).getRegex();inline.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g;inline.escapedEmSt=/(?:^|[^\\])(?:\\\\)*\\[*_]/g;inline._comment=edit(block._comment).replace("(?:-->|$)","-->").getRegex();inline.emStrong.lDelim=edit(inline.emStrong.lDelim).replace(/punct/g,inline._punctuation).getRegex();inline.emStrong.rDelimAst=edit(inline.emStrong.rDelimAst,"g").replace(/punct/g,inline._punctuation).getRegex();inline.emStrong.rDelimUnd=edit(inline.emStrong.rDelimUnd,"g").replace(/punct/g,inline._punctuation).getRegex();inline._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g;inline._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/;inline._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/;inline.autolink=edit(inline.autolink).replace("scheme",inline._scheme).replace("email",inline._email).getRegex();inline._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/;inline.tag=edit(inline.tag).replace("comment",inline._comment).replace("attribute",inline._attribute).getRegex();inline._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/;inline._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/;inline._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/;inline.link=edit(inline.link).replace("label",inline._label).replace("href",inline._href).replace("title",inline._title).getRegex();inline.reflink=edit(inline.reflink).replace("label",inline._label).replace("ref",block._label).getRegex();inline.nolink=edit(inline.nolink).replace("ref",block._label).getRegex();inline.reflinkSearch=edit(inline.reflinkSearch,"g").replace("reflink",inline.reflink).replace("nolink",inline.nolink).getRegex();inline.normal={...inline};inline.pedantic={...inline.normal,strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:edit(/^!?\[(label)\]\((.*?)\)/).replace("label",inline._label).getRegex(),reflink:edit(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",inline._label).getRegex()};inline.gfm={...inline.normal,escape:edit(inline.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\.5&&(N="x"+N.toString(16)),$+="&#"+N+";";return $}class Lexer{constructor($){this.tokens=[],this.tokens.links=Object.create(null),this.options=$||defaults$7,this.options.tokenizer=this.options.tokenizer||new Tokenizer,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const I={block:block.normal,inline:inline.normal};this.options.pedantic?(I.block=block.pedantic,I.inline=inline.pedantic):this.options.gfm&&(I.block=block.gfm,this.options.breaks?I.inline=inline.breaks:I.inline=inline.gfm),this.tokenizer.rules=I}static get rules(){return{block,inline}}static lex($,I){return new Lexer(I).lex($)}static lexInline($,I){return new Lexer(I).inlineTokens($)}lex($){$=$.replace(/\r\n|\r/g,` +`),this.blockTokens($,this.tokens);let I;for(;I=this.inlineQueue.shift();)this.inlineTokens(I.src,I.tokens);return this.tokens}blockTokens($,I=[]){this.options.pedantic?$=$.replace(/\t/g," ").replace(/^ +$/gm,""):$=$.replace(/^( *)(\t+)/gm,(q,Y,K)=>Y+" ".repeat(K.length));let N,B,j,U;for(;$;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(q=>(N=q.call({lexer:this},$,I))?($=$.substring(N.raw.length),I.push(N),!0):!1))){if(N=this.tokenizer.space($)){$=$.substring(N.raw.length),N.raw.length===1&&I.length>0?I[I.length-1].raw+=` +`:I.push(N);continue}if(N=this.tokenizer.code($)){$=$.substring(N.raw.length),B=I[I.length-1],B&&(B.type==="paragraph"||B.type==="text")?(B.raw+=` +`+N.raw,B.text+=` +`+N.text,this.inlineQueue[this.inlineQueue.length-1].src=B.text):I.push(N);continue}if(N=this.tokenizer.fences($)){$=$.substring(N.raw.length),I.push(N);continue}if(N=this.tokenizer.heading($)){$=$.substring(N.raw.length),I.push(N);continue}if(N=this.tokenizer.hr($)){$=$.substring(N.raw.length),I.push(N);continue}if(N=this.tokenizer.blockquote($)){$=$.substring(N.raw.length),I.push(N);continue}if(N=this.tokenizer.list($)){$=$.substring(N.raw.length),I.push(N);continue}if(N=this.tokenizer.html($)){$=$.substring(N.raw.length),I.push(N);continue}if(N=this.tokenizer.def($)){$=$.substring(N.raw.length),B=I[I.length-1],B&&(B.type==="paragraph"||B.type==="text")?(B.raw+=` +`+N.raw,B.text+=` +`+N.raw,this.inlineQueue[this.inlineQueue.length-1].src=B.text):this.tokens.links[N.tag]||(this.tokens.links[N.tag]={href:N.href,title:N.title});continue}if(N=this.tokenizer.table($)){$=$.substring(N.raw.length),I.push(N);continue}if(N=this.tokenizer.lheading($)){$=$.substring(N.raw.length),I.push(N);continue}if(j=$,this.options.extensions&&this.options.extensions.startBlock){let q=1/0;const Y=$.slice(1);let K;this.options.extensions.startBlock.forEach(function(G){K=G.call({lexer:this},Y),typeof K=="number"&&K>=0&&(q=Math.min(q,K))}),q<1/0&&q>=0&&(j=$.substring(0,q+1))}if(this.state.top&&(N=this.tokenizer.paragraph(j))){B=I[I.length-1],U&&B.type==="paragraph"?(B.raw+=` +`+N.raw,B.text+=` +`+N.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=B.text):I.push(N),U=j.length!==$.length,$=$.substring(N.raw.length);continue}if(N=this.tokenizer.text($)){$=$.substring(N.raw.length),B=I[I.length-1],B&&B.type==="text"?(B.raw+=` +`+N.raw,B.text+=` +`+N.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=B.text):I.push(N);continue}if($){const q="Infinite loop on byte: "+$.charCodeAt(0);if(this.options.silent){console.error(q);break}else throw new Error(q)}}return this.state.top=!0,I}inline($,I=[]){return this.inlineQueue.push({src:$,tokens:I}),I}inlineTokens($,I=[]){let N,B,j,U=$,q,Y,K;if(this.tokens.links){const G=Object.keys(this.tokens.links);if(G.length>0)for(;(q=this.tokenizer.rules.inline.reflinkSearch.exec(U))!=null;)G.includes(q[0].slice(q[0].lastIndexOf("[")+1,-1))&&(U=U.slice(0,q.index)+"["+repeatString("a",q[0].length-2)+"]"+U.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(q=this.tokenizer.rules.inline.blockSkip.exec(U))!=null;)U=U.slice(0,q.index)+"["+repeatString("a",q[0].length-2)+"]"+U.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(q=this.tokenizer.rules.inline.escapedEmSt.exec(U))!=null;)U=U.slice(0,q.index+q[0].length-2)+"++"+U.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex),this.tokenizer.rules.inline.escapedEmSt.lastIndex--;for(;$;)if(Y||(K=""),Y=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(G=>(N=G.call({lexer:this},$,I))?($=$.substring(N.raw.length),I.push(N),!0):!1))){if(N=this.tokenizer.escape($)){$=$.substring(N.raw.length),I.push(N);continue}if(N=this.tokenizer.tag($)){$=$.substring(N.raw.length),B=I[I.length-1],B&&N.type==="text"&&B.type==="text"?(B.raw+=N.raw,B.text+=N.text):I.push(N);continue}if(N=this.tokenizer.link($)){$=$.substring(N.raw.length),I.push(N);continue}if(N=this.tokenizer.reflink($,this.tokens.links)){$=$.substring(N.raw.length),B=I[I.length-1],B&&N.type==="text"&&B.type==="text"?(B.raw+=N.raw,B.text+=N.text):I.push(N);continue}if(N=this.tokenizer.emStrong($,U,K)){$=$.substring(N.raw.length),I.push(N);continue}if(N=this.tokenizer.codespan($)){$=$.substring(N.raw.length),I.push(N);continue}if(N=this.tokenizer.br($)){$=$.substring(N.raw.length),I.push(N);continue}if(N=this.tokenizer.del($)){$=$.substring(N.raw.length),I.push(N);continue}if(N=this.tokenizer.autolink($,mangle)){$=$.substring(N.raw.length),I.push(N);continue}if(!this.state.inLink&&(N=this.tokenizer.url($,mangle))){$=$.substring(N.raw.length),I.push(N);continue}if(j=$,this.options.extensions&&this.options.extensions.startInline){let G=1/0;const J=$.slice(1);let Z;this.options.extensions.startInline.forEach(function(ee){Z=ee.call({lexer:this},J),typeof Z=="number"&&Z>=0&&(G=Math.min(G,Z))}),G<1/0&&G>=0&&(j=$.substring(0,G+1))}if(N=this.tokenizer.inlineText(j,smartypants)){$=$.substring(N.raw.length),N.raw.slice(-1)!=="_"&&(K=N.raw.slice(-1)),Y=!0,B=I[I.length-1],B&&B.type==="text"?(B.raw+=N.raw,B.text+=N.text):I.push(N);continue}if($){const G="Infinite loop on byte: "+$.charCodeAt(0);if(this.options.silent){console.error(G);break}else throw new Error(G)}}return I}}let Renderer$1=class{constructor($){this.options=$||defaults$7}code($,I,N){const B=(I||"").match(/\S*/)[0];if(this.options.highlight){const j=this.options.highlight($,B);j!=null&&j!==$&&(N=!0,$=j)}return $=$.replace(/\n$/,"")+` +`,B?'
'+(N?$:escape$4($,!0))+`
+`:"
"+(N?$:escape$4($,!0))+`
+`}blockquote($){return`
+${$}
+`}html($){return $}heading($,I,N,B){if(this.options.headerIds){const j=this.options.headerPrefix+B.slug(N);return`${$} +`}return`${$} +`}hr(){return this.options.xhtml?`
+`:`
+`}list($,I,N){const B=I?"ol":"ul",j=I&&N!==1?' start="'+N+'"':"";return"<"+B+j+`> +`+$+" +`}listitem($){return`
  • ${$}
  • +`}checkbox($){return" "}paragraph($){return`

    ${$}

    +`}table($,I){return I&&(I=`${I}`),` + +`+$+` +`+I+`
    +`}tablerow($){return` +${$} +`}tablecell($,I){const N=I.header?"th":"td";return(I.align?`<${N} align="${I.align}">`:`<${N}>`)+$+` +`}strong($){return`${$}`}em($){return`${$}`}codespan($){return`${$}`}br(){return this.options.xhtml?"
    ":"
    "}del($){return`${$}`}link($,I,N){if($=cleanUrl(this.options.sanitize,this.options.baseUrl,$),$===null)return N;let B='",B}image($,I,N){if($=cleanUrl(this.options.sanitize,this.options.baseUrl,$),$===null)return N;let B=`${N}":">",B}text($){return $}};class TextRenderer{strong($){return $}em($){return $}codespan($){return $}del($){return $}html($){return $}text($){return $}link($,I,N){return""+N}image($,I,N){return""+N}br(){return""}}class Slugger{constructor(){this.seen={}}serialize($){return $.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")}getNextSafeSlug($,I){let N=$,B=0;if(this.seen.hasOwnProperty(N)){B=this.seen[$];do B++,N=$+"-"+B;while(this.seen.hasOwnProperty(N))}return I||(this.seen[$]=B,this.seen[N]=0),N}slug($,I={}){const N=this.serialize($);return this.getNextSafeSlug(N,I.dryrun)}}class Parser{constructor($){this.options=$||defaults$7,this.options.renderer=this.options.renderer||new Renderer$1,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new TextRenderer,this.slugger=new Slugger}static parse($,I){return new Parser(I).parse($)}static parseInline($,I){return new Parser(I).parseInline($)}parse($,I=!0){let N="",B,j,U,q,Y,K,G,J,Z,ee,te,se,re,ne,le,me,ue,_e,fe;const ge=$.length;for(B=0;B0&&le.tokens[0].type==="paragraph"?(le.tokens[0].text=_e+" "+le.tokens[0].text,le.tokens[0].tokens&&le.tokens[0].tokens.length>0&&le.tokens[0].tokens[0].type==="text"&&(le.tokens[0].tokens[0].text=_e+" "+le.tokens[0].tokens[0].text)):le.tokens.unshift({type:"text",text:_e}):ne+=_e),ne+=this.parse(le.tokens,re),Z+=this.renderer.listitem(ne,ue,me);N+=this.renderer.list(Z,te,se);continue}case"html":{N+=this.renderer.html(ee.text);continue}case"paragraph":{N+=this.renderer.paragraph(this.parseInline(ee.tokens));continue}case"text":{for(Z=ee.tokens?this.parseInline(ee.tokens):ee.text;B+1{if(N.message+=` +Please report this to https://github.com/markedjs/marked.`,M){const B="

    An error occurred:

    "+escape$4(N.message+"",!0)+"
    ";if($)return Promise.resolve(B);if(I){I(null,B);return}return B}if($)return Promise.reject(N);if(I){I(N);return}throw N}}function parseMarkdown(M,$){return(I,N,B)=>{typeof N=="function"&&(B=N,N=null);const j={...N};N={...marked.defaults,...j};const U=onError(N.silent,N.async,B);if(typeof I>"u"||I===null)return U(new Error("marked(): input parameter is undefined or null"));if(typeof I!="string")return U(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(I)+", string expected"));if(checkSanitizeDeprecation(N),N.hooks&&(N.hooks.options=N),B){const q=N.highlight;let Y;try{N.hooks&&(I=N.hooks.preprocess(I)),Y=M(I,N)}catch(J){return U(J)}const K=function(J){let Z;if(!J)try{N.walkTokens&&marked.walkTokens(Y,N.walkTokens),Z=$(Y,N),N.hooks&&(Z=N.hooks.postprocess(Z))}catch(ee){J=ee}return N.highlight=q,J?U(J):B(null,Z)};if(!q||q.length<3||(delete N.highlight,!Y.length))return K();let G=0;marked.walkTokens(Y,function(J){J.type==="code"&&(G++,setTimeout(()=>{q(J.text,J.lang,function(Z,ee){if(Z)return K(Z);ee!=null&&ee!==J.text&&(J.text=ee,J.escaped=!0),G--,G===0&&K()})},0))}),G===0&&K();return}if(N.async)return Promise.resolve(N.hooks?N.hooks.preprocess(I):I).then(q=>M(q,N)).then(q=>N.walkTokens?Promise.all(marked.walkTokens(q,N.walkTokens)).then(()=>q):q).then(q=>$(q,N)).then(q=>N.hooks?N.hooks.postprocess(q):q).catch(U);try{N.hooks&&(I=N.hooks.preprocess(I));const q=M(I,N);N.walkTokens&&marked.walkTokens(q,N.walkTokens);let Y=$(q,N);return N.hooks&&(Y=N.hooks.postprocess(Y)),Y}catch(q){return U(q)}}}function marked(M,$,I){return parseMarkdown(Lexer.lex,Parser.parse)(M,$,I)}marked.options=marked.setOptions=function(M){return marked.defaults={...marked.defaults,...M},changeDefaults(marked.defaults),marked};marked.getDefaults=getDefaults;marked.defaults=defaults$7;marked.use=function(...M){const $=marked.defaults.extensions||{renderers:{},childTokens:{}};M.forEach(I=>{const N={...I};if(N.async=marked.defaults.async||N.async||!1,I.extensions&&(I.extensions.forEach(B=>{if(!B.name)throw new Error("extension name required");if(B.renderer){const j=$.renderers[B.name];j?$.renderers[B.name]=function(...U){let q=B.renderer.apply(this,U);return q===!1&&(q=j.apply(this,U)),q}:$.renderers[B.name]=B.renderer}if(B.tokenizer){if(!B.level||B.level!=="block"&&B.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");$[B.level]?$[B.level].unshift(B.tokenizer):$[B.level]=[B.tokenizer],B.start&&(B.level==="block"?$.startBlock?$.startBlock.push(B.start):$.startBlock=[B.start]:B.level==="inline"&&($.startInline?$.startInline.push(B.start):$.startInline=[B.start]))}B.childTokens&&($.childTokens[B.name]=B.childTokens)}),N.extensions=$),I.renderer){const B=marked.defaults.renderer||new Renderer$1;for(const j in I.renderer){const U=B[j];B[j]=(...q)=>{let Y=I.renderer[j].apply(B,q);return Y===!1&&(Y=U.apply(B,q)),Y}}N.renderer=B}if(I.tokenizer){const B=marked.defaults.tokenizer||new Tokenizer;for(const j in I.tokenizer){const U=B[j];B[j]=(...q)=>{let Y=I.tokenizer[j].apply(B,q);return Y===!1&&(Y=U.apply(B,q)),Y}}N.tokenizer=B}if(I.hooks){const B=marked.defaults.hooks||new Hooks;for(const j in I.hooks){const U=B[j];Hooks.passThroughHooks.has(j)?B[j]=q=>{if(marked.defaults.async)return Promise.resolve(I.hooks[j].call(B,q)).then(K=>U.call(B,K));const Y=I.hooks[j].call(B,q);return U.call(B,Y)}:B[j]=(...q)=>{let Y=I.hooks[j].apply(B,q);return Y===!1&&(Y=U.apply(B,q)),Y}}N.hooks=B}if(I.walkTokens){const B=marked.defaults.walkTokens;N.walkTokens=function(j){let U=[];return U.push(I.walkTokens.call(this,j)),B&&(U=U.concat(B.call(this,j))),U}}marked.setOptions(N)})};marked.walkTokens=function(M,$){let I=[];for(const N of M)switch(I=I.concat($.call(marked,N)),N.type){case"table":{for(const B of N.header)I=I.concat(marked.walkTokens(B.tokens,$));for(const B of N.rows)for(const j of B)I=I.concat(marked.walkTokens(j.tokens,$));break}case"list":{I=I.concat(marked.walkTokens(N.items,$));break}default:marked.defaults.extensions&&marked.defaults.extensions.childTokens&&marked.defaults.extensions.childTokens[N.type]?marked.defaults.extensions.childTokens[N.type].forEach(function(B){I=I.concat(marked.walkTokens(N[B],$))}):N.tokens&&(I=I.concat(marked.walkTokens(N.tokens,$)))}return I};marked.parseInline=parseMarkdown(Lexer.lexInline,Parser.parseInline);marked.Parser=Parser;marked.parser=Parser.parse;marked.Renderer=Renderer$1;marked.TextRenderer=TextRenderer;marked.Lexer=Lexer;marked.lexer=Lexer.lex;marked.Tokenizer=Tokenizer;marked.Slugger=Slugger;marked.Hooks=Hooks;marked.parse=marked;marked.options;marked.setOptions;marked.use;marked.walkTokens;marked.parseInline;Parser.parse;Lexer.lex;const intervalRegexp=/^({\s*(\-?\d+(\.\d+)?[\s*,\s*\-?\d+(\.\d+)?]*)\s*})|([\[\]])\s*(-Inf|\*|\-?\d+(\.\d+)?)\s*,\s*(\+?Inf|\*|\-?\d+(\.\d+)?)\s*([\[\]])$/,anyIntervalRegexp=/({\s*(\-?\d+(\.\d+)?[\s*,\s*\-?\d+(\.\d+)?]*)\s*})|([\[\]])\s*(-Inf|\*|\-?\d+(\.\d+)?)\s*,\s*(\+?Inf|\*|\-?\d+(\.\d+)?)\s*([\[\]])/,testInterval=function(M,$){if(typeof $!="string")throw"Invalid interval: should be a string.";$=$.trim();var I=$.match(intervalRegexp);if(!I)throw"Invalid interval: "+$;if(I[2]){for(var N=I[2].split(","),B=0;B=U:M>U)&&(Y==="]"?M<=q:M=2&&M%10<=4&&(M%100<10||M%100>=20)?1:2;case"cs":case"sk":return M==1?0:M>=2&&M<=4?1:2;case"ga":return M==1?0:M==2?1:2;case"lt":return M%10==1&&M%100!=11?0:M%10>=2&&(M%100<10||M%100>=20)?1:2;case"sl":return M%100==1?0:M%100==2?1:M%100==3||M%100==4?2:3;case"mk":return M%10==1?0:1;case"mt":return M==1?0:M===0||M%100>1&&M%100<11?1:M%100>10&&M%100<20?2:3;case"lv":return M===0?0:M%10==1&&M%100!=11?1:2;case"pl":return M==1?0:M%10>=2&&M%10<=4&&(M%100<12||M%100>14)?1:2;case"cy":return M==1?0:M==2?1:M==8||M==11?2:3;case"ro":return M==1?0:M===0||M%100>0&&M%100<20?1:2;case"ar":return M===0?0:M==1?1:M==2?2:M%100>=3&&M%100<=10?3:M%100>=11&&M%100<=99?4:5;default:return 0}},translate=function(M,$){let I=getLine(M);for(let N in $)I=I.split(":"+N).join($[N]);return I},translateChoice=function(M,$,I){I=typeof I<"u"?I:{},$=Array.isArray($)?$.length:$,I.count=$;let N=translate(M,I);return choose(N,$,Statamic.$config.get("translationLocale"))},getLine=function(M){const $=Statamic.$config.get("translations");return $[`*.${M}`]||$[M]||$[`statamic::${M}`]||$[`statamic::messages.${M}`]||M};function commonjsRequire(M){throw new Error('Could not dynamically require "'+M+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var uniqid$2={exports:{}};const __viteBrowserExternal={},__viteBrowserExternal$1=Object.freeze(Object.defineProperty({__proto__:null,default:__viteBrowserExternal},Symbol.toStringTag,{value:"Module"})),require$$0=getAugmentedNamespace(__viteBrowserExternal$1);var pid=typeof process<"u"&&process.pid?process.pid.toString(36):"",address="";if(typeof __webpack_require__!="function"&&typeof commonjsRequire<"u"){var mac="",os$1=require$$0;if(os$1.networkInterfaces)var networkInterfaces=os$1.networkInterfaces();if(networkInterfaces){e:for(let M in networkInterfaces){const $=networkInterfaces[M],I=$.length;for(var i$2=0;i$2$?M:$+1}var uniqidExports=uniqid$2.exports;const uniqid$1=getDefaultExportFromCjs$1(uniqidExports);class PreviewHtml{constructor($){this.html=$}}function cp_url$1(M){return M=Statamic.$config.get("cpUrl")+"/"+M,tidy_url(M)}function docs_url$1(M){return tidy_url("https://statamic.dev/"+M)}function resource_url$1(M){return M=Statamic.$config.get("resourceUrl")+"/"+M,tidy_url(M)}function tidy_url(M){return M.replace(/([^:])(\/\/+)/g,"$1/")}function relative_url(M){return M.replace(/^(?:\/\/|[^/]+)*\//,"/")}function dd(M){console.log(M)}function data_get$1(M,$,I=null){var N=Array.isArray($)?$:$.split("."),B=N.reduce((j,U)=>j&&j[U],M);return B!==void 0?B:I}function data_set(M,$,I){for(var N=$.split(".");N.length-1;){var B=N.shift(),j=N.length?new RegExp("^[0-9]+$").test(N[0]):!1;B in M||(M[B]=j?[]:{}),M=M[B]}M[N[0]]=I}function clone$4(M){if(M!==void 0)return JSON.parse(JSON.stringify(M))}function tailwind_width_class$1(M){return`${{25:"w-full @lg:w-1/4",33:"w-full @lg:w-1/3",50:"w-full @lg:w-1/2",66:"w-full @lg:w-2/3",75:"w-full @lg:w-3/4",100:"w-full"}[M]||"w-full"}`}function markdown$4(M){return marked(M)}function __$1(M,$){return translate(M,$)}function __n$1(M,$,I){return translateChoice(M,$,I)}function utf8btoa$1(M){const $=encodeURIComponent(M).replace(/%([0-9A-F]{2})/g,(I,N)=>String.fromCharCode(`0x${N}`));return btoa($)}function utf8atob$1(M){const $=atob(M);return decodeURIComponent($.split("").map(I=>"%"+("00"+I.charCodeAt(0).toString(16)).slice(-2)).join(""))}function uniqid(){return uniqid$1()}function truncate$1(M,$,I="..."){return M.length<=$?M:M.substring(0,$-I.length)+I}function escapeHtml$1(M){return M.replaceAll("&","&").replaceAll("<","<").replaceAll(">",">").replaceAll('"',""").replaceAll("'","'")}function replicatorPreviewHtml$1(M){return new PreviewHtml(M)}function closestVm(M,$){let I=M;for(;I&&!I.__vue__;)I=I.parentElement;let N=I.__vue__;for(;N!==N.$root;){if(!$||$===N.$options.name)return N;N=N.$parent}}function str_slug(M){return Statamic.$slug.create(M)}function snake_case$1(M){return Statamic.$slug.separatedBy("_").create(M)}const Globals=Object.freeze(Object.defineProperty({__proto__:null,__:__$1,__n:__n$1,clone:clone$4,closestVm,cp_url:cp_url$1,data_get:data_get$1,data_set,dd,docs_url:docs_url$1,escapeHtml:escapeHtml$1,markdown:markdown$4,relative_url,replicatorPreviewHtml:replicatorPreviewHtml$1,resource_url:resource_url$1,snake_case:snake_case$1,str_slug,tailwind_width_class:tailwind_width_class$1,tidy_url,truncate:truncate$1,uniqid,utf8atob:utf8atob$1,utf8btoa:utf8btoa$1},Symbol.toStringTag,{value:"Module"}));class Reveal{element($){if(!$)return;let I=$;for(;I;)I.matches(".tab-panel")&&closestVm(I,"publish-tabs").setActive(I.dataset.tabHandle),I.matches(".replicator-set")&&closestVm(I,"replicator-fieldtype-set").expand(),I.matches(".bard-set")&&closestVm(I,"bard-fieldtype-set").expand(),I=I.parentElement;Vue$3.nextTick(()=>{$.scrollIntoView({block:"center"})})}invalid(){Vue$3.nextTick(()=>{const $=document.querySelector(".publish-field.has-error:not(:has(.publish-field.has-error))");$&&this.element($)})}}var VERSION$1="1.13.6",root=typeof self=="object"&&self.self===self&&self||typeof global=="object"&&global.global===global&&global||Function("return this")()||{},ArrayProto=Array.prototype,ObjProto=Object.prototype,SymbolProto=typeof Symbol<"u"?Symbol.prototype:null,push$1=ArrayProto.push,slice$1=ArrayProto.slice,toString$3=ObjProto.toString,hasOwnProperty$2=ObjProto.hasOwnProperty,supportsArrayBuffer=typeof ArrayBuffer<"u",supportsDataView=typeof DataView<"u",nativeIsArray=Array.isArray,nativeKeys=Object.keys,nativeCreate=Object.create,nativeIsView=supportsArrayBuffer&&ArrayBuffer.isView,_isNaN=isNaN,_isFinite=isFinite,hasEnumBug=!{toString:null}.propertyIsEnumerable("toString"),nonEnumerableProps=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],MAX_ARRAY_INDEX=Math.pow(2,53)-1;function restArguments(M,$){return $=$==null?M.length-1:+$,function(){for(var I=Math.max(arguments.length-$,0),N=Array(I),B=0;B=0&&I<=MAX_ARRAY_INDEX}}function shallowProperty(M){return function($){return $==null?void 0:$[M]}}const getByteLength=shallowProperty("byteLength"),isBufferLike=createSizePropertyCheck(getByteLength);var typedArrayPattern=/\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;function isTypedArray$1(M){return nativeIsView?nativeIsView(M)&&!isDataView$1(M):isBufferLike(M)&&typedArrayPattern.test(toString$3.call(M))}const isTypedArray$2=supportsArrayBuffer?isTypedArray$1:constant(!1),getLength=shallowProperty("length");function emulatedSet(M){for(var $={},I=M.length,N=0;N":">",'"':""","'":"'","`":"`"},escape$3=createEscaper(escapeMap),unescapeMap=invert(escapeMap),unescape$1=createEscaper(unescapeMap),templateSettings=_$1.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var noMatch=/(.)^/,escapes={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},escapeRegExp$1=/\\|'|\r|\n|\u2028|\u2029/g;function escapeChar(M){return"\\"+escapes[M]}var bareIdentifier=/^\s*(\w|\$)+\s*$/;function template(M,$,I){!$&&I&&($=I),$=defaults$6({},$,_$1.templateSettings);var N=RegExp([($.escape||noMatch).source,($.interpolate||noMatch).source,($.evaluate||noMatch).source].join("|")+"|$","g"),B=0,j="__p+='";M.replace(N,function(K,G,J,Z,ee){return j+=M.slice(B,ee).replace(escapeRegExp$1,escapeChar),B=ee+K.length,G?j+=`'+ +((__t=(`+G+`))==null?'':_.escape(__t))+ +'`:J?j+=`'+ +((__t=(`+J+`))==null?'':__t)+ +'`:Z&&(j+=`'; +`+Z+` +__p+='`),K}),j+=`'; +`;var U=$.variable;if(U){if(!bareIdentifier.test(U))throw new Error("variable is not a bare identifier: "+U)}else j=`with(obj||{}){ +`+j+`} +`,U="obj";j=`var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');}; +`+j+`return __p; +`;var q;try{q=new Function(U,"_",j)}catch(K){throw K.source=j,K}var Y=function(K){return q.call(this,K,_$1)};return Y.source="function("+U+`){ +`+j+"}",Y}function result(M,$,I){$=toPath($);var N=$.length;if(!N)return isFunction$4(I)?I.call(M):I;for(var B=0;B1)flatten$1(q,$-1,I,N),B=N.length;else for(var Y=0,K=q.length;Y$?(N&&(clearTimeout(N),N=null),q=G,U=M.apply(B,j),N||(B=j=null)):!N&&I.trailing!==!1&&(N=setTimeout(Y,J)),U};return K.cancel=function(){clearTimeout(N),q=0,N=B=j=null},K}function debounce$1(M,$,I){var N,B,j,U,q,Y=function(){var G=now$1()-B;$>G?N=setTimeout(Y,$-G):(N=null,I||(U=M.apply(q,j)),N||(j=q=null))},K=restArguments(function(G){return q=this,j=G,B=now$1(),N||(N=setTimeout(Y,$),I&&(U=M.apply(q,j))),U});return K.cancel=function(){clearTimeout(N),N=j=q=null},K}function wrap(M,$){return partial$1($,M)}function negate(M){return function(){return!M.apply(this,arguments)}}function compose(){var M=arguments,$=M.length-1;return function(){for(var I=$,N=M[$].apply(this,arguments);I--;)N=M[I].call(this,N);return N}}function after(M,$){return function(){if(--M<1)return $.apply(this,arguments)}}function before(M,$){var I;return function(){return--M>0&&(I=$.apply(this,arguments)),M<=1&&($=null),I}}const once$1=partial$1(before,2);function findKey$1(M,$,I){$=cb($,I);for(var N=keys$2(M),B,j=0,U=N.length;j0?0:B-1;j>=0&&j0?U=j>=0?j:Math.max(j+q,U):q=j>=0?Math.min(j+1,q):j+q+1;else if(I&&j&&q)return j=I(N,B),N[j]===B?j:-1;if(B!==B)return j=$(slice$1.call(N,U,q),isNaN$1),j>=0?j+U:-1;for(j=M>0?U:q-1;j>=0&&j0?0:q-1;for(j||(B=I[U?U[Y]:Y],Y+=M);Y>=0&&Y=3;return $(I,optimizeCb(N,j,4),B,U)}}const reduce=createReduce(1),reduceRight=createReduce(-1);function filter(M,$,I){var N=[];return $=cb($,I),each(M,function(B,j,U){$(B,j,U)&&N.push(B)}),N}function reject(M,$,I){return filter(M,negate(cb($)),I)}function every(M,$,I){$=cb($,I);for(var N=!isArrayLike(M)&&keys$2(M),B=(N||M).length,j=0;j=0}const invoke=restArguments(function(M,$,I){var N,B;return isFunction$4($)?B=$:($=toPath($),N=$.slice(0,-1),$=$[$.length-1]),map$1(M,function(j){var U=B;if(!U){if(N&&N.length&&(j=deepGet(j,N)),j==null)return;U=j[$]}return U==null?U:U.apply(j,I)})});function pluck$1(M,$){return map$1(M,property($))}function where(M,$){return filter(M,matcher($))}function max$3(M,$,I){var N=-1/0,B=-1/0,j,U;if($==null||typeof $=="number"&&typeof M[0]!="object"&&M!=null){M=isArrayLike(M)?M:values(M);for(var q=0,Y=M.length;qN&&(N=j)}else $=cb($,I),each(M,function(K,G,J){U=$(K,G,J),(U>B||U===-1/0&&N===-1/0)&&(N=K,B=U)});return N}function min$3(M,$,I){var N=1/0,B=1/0,j,U;if($==null||typeof $=="number"&&typeof M[0]!="object"&&M!=null){M=isArrayLike(M)?M:values(M);for(var q=0,Y=M.length;qq||U===void 0)return 1;if(U1&&(N=optimizeCb(N,$[1])),$=allKeys(M)):(N=keyInObj,$=flatten$1($,!1,!1),M=Object(M));for(var B=0,j=$.length;B1&&(N=$[1])):($=map$1(flatten$1($,!1,!1),String),I=function(B,j){return!contains$1($,j)}),pick(M,I,N)});function initial(M,$,I){return slice$1.call(M,0,Math.max(0,M.length-($==null||I?1:$)))}function first(M,$,I){return M==null||M.length<1?$==null||I?void 0:[]:$==null||I?M[0]:initial(M,M.length-$)}function rest(M,$,I){return slice$1.call(M,$==null||I?1:$)}function last(M,$,I){return M==null||M.length<1?$==null||I?void 0:[]:$==null||I?M[M.length-1]:rest(M,Math.max(0,M.length-$))}function compact$1(M){return filter(M,Boolean)}function flatten(M,$){return flatten$1(M,$,!1)}const difference=restArguments(function(M,$){return $=flatten$1($,!0,!0),filter(M,function(I){return!contains$1($,I)})}),without=restArguments(function(M,$){return difference(M,$)});function uniq(M,$,I,N){isBoolean$2($)||(N=I,I=$,$=!1),I!=null&&(I=cb(I,N));for(var B=[],j=[],U=0,q=getLength(M);U$=>{const I=toString$2.call($);return M[I]||(M[I]=I.slice(8,-1).toLowerCase())})(Object.create(null)),kindOfTest=M=>(M=M.toLowerCase(),$=>kindOf$1($)===M),typeOfTest=M=>$=>typeof $===M,{isArray:isArray$7}=Array,isUndefined$1=typeOfTest("undefined");function isBuffer$3(M){return M!==null&&!isUndefined$1(M)&&M.constructor!==null&&!isUndefined$1(M.constructor)&&isFunction$2(M.constructor.isBuffer)&&M.constructor.isBuffer(M)}const isArrayBuffer=kindOfTest("ArrayBuffer");function isArrayBufferView(M){let $;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?$=ArrayBuffer.isView(M):$=M&&M.buffer&&isArrayBuffer(M.buffer),$}const isString$4=typeOfTest("string"),isFunction$2=typeOfTest("function"),isNumber$2=typeOfTest("number"),isObject$4=M=>M!==null&&typeof M=="object",isBoolean$1=M=>M===!0||M===!1,isPlainObject=M=>{if(kindOf$1(M)!=="object")return!1;const $=getPrototypeOf(M);return($===null||$===Object.prototype||Object.getPrototypeOf($)===null)&&!(Symbol.toStringTag in M)&&!(Symbol.iterator in M)},isDate$2=kindOfTest("Date"),isFile=kindOfTest("File"),isBlob=kindOfTest("Blob"),isFileList=kindOfTest("FileList"),isStream=M=>isObject$4(M)&&isFunction$2(M.pipe),isFormData=M=>{let $;return M&&(typeof FormData=="function"&&M instanceof FormData||isFunction$2(M.append)&&(($=kindOf$1(M))==="formdata"||$==="object"&&isFunction$2(M.toString)&&M.toString()==="[object FormData]"))},isURLSearchParams=kindOfTest("URLSearchParams"),[isReadableStream,isRequest,isResponse,isHeaders]=["ReadableStream","Request","Response","Headers"].map(kindOfTest),trim=M=>M.trim?M.trim():M.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function forEach(M,$,{allOwnKeys:I=!1}={}){if(M===null||typeof M>"u")return;let N,B;if(typeof M!="object"&&(M=[M]),isArray$7(M))for(N=0,B=M.length;N0;)if(B=I[N],$===B.toLowerCase())return B;return null}const _global=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),isContextDefined=M=>!isUndefined$1(M)&&M!==_global;function merge$2(){const{caseless:M}=isContextDefined(this)&&this||{},$={},I=(N,B)=>{const j=M&&findKey($,B)||B;isPlainObject($[j])&&isPlainObject(N)?$[j]=merge$2($[j],N):isPlainObject(N)?$[j]=merge$2({},N):isArray$7(N)?$[j]=N.slice():$[j]=N};for(let N=0,B=arguments.length;N(forEach($,(B,j)=>{I&&isFunction$2(B)?M[j]=bind$5(B,I):M[j]=B},{allOwnKeys:N}),M),stripBOM=M=>(M.charCodeAt(0)===65279&&(M=M.slice(1)),M),inherits=(M,$,I,N)=>{M.prototype=Object.create($.prototype,N),M.prototype.constructor=M,Object.defineProperty(M,"super",{value:$.prototype}),I&&Object.assign(M.prototype,I)},toFlatObject=(M,$,I,N)=>{let B,j,U;const q={};if($=$||{},M==null)return $;do{for(B=Object.getOwnPropertyNames(M),j=B.length;j-- >0;)U=B[j],(!N||N(U,M,$))&&!q[U]&&($[U]=M[U],q[U]=!0);M=I!==!1&&getPrototypeOf(M)}while(M&&(!I||I(M,$))&&M!==Object.prototype);return $},endsWith=(M,$,I)=>{M=String(M),(I===void 0||I>M.length)&&(I=M.length),I-=$.length;const N=M.indexOf($,I);return N!==-1&&N===I},toArray$1=M=>{if(!M)return null;if(isArray$7(M))return M;let $=M.length;if(!isNumber$2($))return null;const I=new Array($);for(;$-- >0;)I[$]=M[$];return I},isTypedArray=(M=>$=>M&&$ instanceof M)(typeof Uint8Array<"u"&&getPrototypeOf(Uint8Array)),forEachEntry=(M,$)=>{const N=(M&&M[Symbol.iterator]).call(M);let B;for(;(B=N.next())&&!B.done;){const j=B.value;$.call(M,j[0],j[1])}},matchAll=(M,$)=>{let I;const N=[];for(;(I=M.exec($))!==null;)N.push(I);return N},isHTMLForm=kindOfTest("HTMLFormElement"),toCamelCase=M=>M.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(I,N,B){return N.toUpperCase()+B}),hasOwnProperty$1=(({hasOwnProperty:M})=>($,I)=>M.call($,I))(Object.prototype),isRegExp$2=kindOfTest("RegExp"),reduceDescriptors=(M,$)=>{const I=Object.getOwnPropertyDescriptors(M),N={};forEach(I,(B,j)=>{let U;(U=$(B,j,M))!==!1&&(N[j]=U||B)}),Object.defineProperties(M,N)},freezeMethods=M=>{reduceDescriptors(M,($,I)=>{if(isFunction$2(M)&&["arguments","caller","callee"].indexOf(I)!==-1)return!1;const N=M[I];if(isFunction$2(N)){if($.enumerable=!1,"writable"in $){$.writable=!1;return}$.set||($.set=()=>{throw Error("Can not rewrite read-only method '"+I+"'")})}})},toObjectSet=(M,$)=>{const I={},N=B=>{B.forEach(j=>{I[j]=!0})};return isArray$7(M)?N(M):N(String(M).split($)),I},noop=()=>{},toFiniteNumber=(M,$)=>M!=null&&Number.isFinite(M=+M)?M:$,ALPHA="abcdefghijklmnopqrstuvwxyz",DIGIT="0123456789",ALPHABET={DIGIT,ALPHA,ALPHA_DIGIT:ALPHA+ALPHA.toUpperCase()+DIGIT},generateString=(M=16,$=ALPHABET.ALPHA_DIGIT)=>{let I="";const{length:N}=$;for(;M--;)I+=$[Math.random()*N|0];return I};function isSpecCompliantForm(M){return!!(M&&isFunction$2(M.append)&&M[Symbol.toStringTag]==="FormData"&&M[Symbol.iterator])}const toJSONObject=M=>{const $=new Array(10),I=(N,B)=>{if(isObject$4(N)){if($.indexOf(N)>=0)return;if(!("toJSON"in N)){$[B]=N;const j=isArray$7(N)?[]:{};return forEach(N,(U,q)=>{const Y=I(U,B+1);!isUndefined$1(Y)&&(j[q]=Y)}),$[B]=void 0,j}}return N};return I(M,0)},isAsyncFn=kindOfTest("AsyncFunction"),isThenable=M=>M&&(isObject$4(M)||isFunction$2(M))&&isFunction$2(M.then)&&isFunction$2(M.catch),_setImmediate=((M,$)=>M?setImmediate:$?((I,N)=>(_global.addEventListener("message",({source:B,data:j})=>{B===_global&&j===I&&N.length&&N.shift()()},!1),B=>{N.push(B),_global.postMessage(I,"*")}))(`axios@${Math.random()}`,[]):I=>setTimeout(I))(typeof setImmediate=="function",isFunction$2(_global.postMessage)),asap=typeof queueMicrotask<"u"?queueMicrotask.bind(_global):typeof process<"u"&&process.nextTick||_setImmediate,utils$4={isArray:isArray$7,isArrayBuffer,isBuffer:isBuffer$3,isFormData,isArrayBufferView,isString:isString$4,isNumber:isNumber$2,isBoolean:isBoolean$1,isObject:isObject$4,isPlainObject,isReadableStream,isRequest,isResponse,isHeaders,isUndefined:isUndefined$1,isDate:isDate$2,isFile,isBlob,isRegExp:isRegExp$2,isFunction:isFunction$2,isStream,isURLSearchParams,isTypedArray,isFileList,forEach,merge:merge$2,extend:extend$4,trim,stripBOM,inherits,toFlatObject,kindOf:kindOf$1,kindOfTest,endsWith,toArray:toArray$1,forEachEntry,matchAll,isHTMLForm,hasOwnProperty:hasOwnProperty$1,hasOwnProp:hasOwnProperty$1,reduceDescriptors,freezeMethods,toObjectSet,toCamelCase,noop,toFiniteNumber,findKey,global:_global,isContextDefined,ALPHABET,generateString,isSpecCompliantForm,toJSONObject,isAsyncFn,isThenable,setImmediate:_setImmediate,asap};function AxiosError(M,$,I,N,B){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=M,this.name="AxiosError",$&&(this.code=$),I&&(this.config=I),N&&(this.request=N),B&&(this.response=B)}utils$4.inherits(AxiosError,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:utils$4.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const prototype$1=AxiosError.prototype,descriptors={};["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(M=>{descriptors[M]={value:M}});Object.defineProperties(AxiosError,descriptors);Object.defineProperty(prototype$1,"isAxiosError",{value:!0});AxiosError.from=(M,$,I,N,B,j)=>{const U=Object.create(prototype$1);return utils$4.toFlatObject(M,U,function(Y){return Y!==Error.prototype},q=>q!=="isAxiosError"),AxiosError.call(U,M.message,$,I,N,B),U.cause=M,U.name=M.name,j&&Object.assign(U,j),U};const httpAdapter=null;function isVisitable(M){return utils$4.isPlainObject(M)||utils$4.isArray(M)}function removeBrackets(M){return utils$4.endsWith(M,"[]")?M.slice(0,-2):M}function renderKey(M,$,I){return M?M.concat($).map(function(B,j){return B=removeBrackets(B),!I&&j?"["+B+"]":B}).join(I?".":""):$}function isFlatArray(M){return utils$4.isArray(M)&&!M.some(isVisitable)}const predicates=utils$4.toFlatObject(utils$4,{},null,function($){return/^is[A-Z]/.test($)});function toFormData(M,$,I){if(!utils$4.isObject(M))throw new TypeError("target must be an object");$=$||new FormData,I=utils$4.toFlatObject(I,{metaTokens:!0,dots:!1,indexes:!1},!1,function(se,re){return!utils$4.isUndefined(re[se])});const N=I.metaTokens,B=I.visitor||G,j=I.dots,U=I.indexes,Y=(I.Blob||typeof Blob<"u"&&Blob)&&utils$4.isSpecCompliantForm($);if(!utils$4.isFunction(B))throw new TypeError("visitor must be a function");function K(te){if(te===null)return"";if(utils$4.isDate(te))return te.toISOString();if(!Y&&utils$4.isBlob(te))throw new AxiosError("Blob is not supported. Use a Buffer instead.");return utils$4.isArrayBuffer(te)||utils$4.isTypedArray(te)?Y&&typeof Blob=="function"?new Blob([te]):Buffer.from(te):te}function G(te,se,re){let ne=te;if(te&&!re&&typeof te=="object"){if(utils$4.endsWith(se,"{}"))se=N?se:se.slice(0,-2),te=JSON.stringify(te);else if(utils$4.isArray(te)&&isFlatArray(te)||(utils$4.isFileList(te)||utils$4.endsWith(se,"[]"))&&(ne=utils$4.toArray(te)))return se=removeBrackets(se),ne.forEach(function(me,ue){!(utils$4.isUndefined(me)||me===null)&&$.append(U===!0?renderKey([se],ue,j):U===null?se:se+"[]",K(me))}),!1}return isVisitable(te)?!0:($.append(renderKey(re,se,j),K(te)),!1)}const J=[],Z=Object.assign(predicates,{defaultVisitor:G,convertValue:K,isVisitable});function ee(te,se){if(!utils$4.isUndefined(te)){if(J.indexOf(te)!==-1)throw Error("Circular reference detected in "+se.join("."));J.push(te),utils$4.forEach(te,function(ne,le){(!(utils$4.isUndefined(ne)||ne===null)&&B.call($,ne,utils$4.isString(le)?le.trim():le,se,Z))===!0&&ee(ne,se?se.concat(le):[le])}),J.pop()}}if(!utils$4.isObject(M))throw new TypeError("data must be an object");return ee(M),$}function encode$2(M){const $={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(M).replace(/[!'()~]|%20|%00/g,function(N){return $[N]})}function AxiosURLSearchParams(M,$){this._pairs=[],M&&toFormData(M,this,$)}const prototype=AxiosURLSearchParams.prototype;prototype.append=function($,I){this._pairs.push([$,I])};prototype.toString=function($){const I=$?function(N){return $.call(this,N,encode$2)}:encode$2;return this._pairs.map(function(B){return I(B[0])+"="+I(B[1])},"").join("&")};function encode$1(M){return encodeURIComponent(M).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function buildURL(M,$,I){if(!$)return M;const N=I&&I.encode||encode$1,B=I&&I.serialize;let j;if(B?j=B($,I):j=utils$4.isURLSearchParams($)?$.toString():new AxiosURLSearchParams($,I).toString(N),j){const U=M.indexOf("#");U!==-1&&(M=M.slice(0,U)),M+=(M.indexOf("?")===-1?"?":"&")+j}return M}class InterceptorManager{constructor(){this.handlers=[]}use($,I,N){return this.handlers.push({fulfilled:$,rejected:I,synchronous:N?N.synchronous:!1,runWhen:N?N.runWhen:null}),this.handlers.length-1}eject($){this.handlers[$]&&(this.handlers[$]=null)}clear(){this.handlers&&(this.handlers=[])}forEach($){utils$4.forEach(this.handlers,function(N){N!==null&&$(N)})}}const InterceptorManager$1=InterceptorManager,transitionalDefaults={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},URLSearchParams$1=typeof URLSearchParams<"u"?URLSearchParams:AxiosURLSearchParams,FormData$1=typeof FormData<"u"?FormData:null,Blob$1=typeof Blob<"u"?Blob:null,platform$2={isBrowser:!0,classes:{URLSearchParams:URLSearchParams$1,FormData:FormData$1,Blob:Blob$1},protocols:["http","https","file","blob","url","data"]},hasBrowserEnv=typeof window<"u"&&typeof document<"u",hasStandardBrowserEnv=(M=>hasBrowserEnv&&["ReactNative","NativeScript","NS"].indexOf(M)<0)(typeof navigator<"u"&&navigator.product),hasStandardBrowserWebWorkerEnv=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),origin=hasBrowserEnv&&window.location.href||"http://localhost",utils$3=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv,hasStandardBrowserEnv,hasStandardBrowserWebWorkerEnv,origin},Symbol.toStringTag,{value:"Module"})),platform$1={...utils$3,...platform$2};function toURLEncodedForm(M,$){return toFormData(M,new platform$1.classes.URLSearchParams,Object.assign({visitor:function(I,N,B,j){return platform$1.isNode&&utils$4.isBuffer(I)?(this.append(N,I.toString("base64")),!1):j.defaultVisitor.apply(this,arguments)}},$))}function parsePropPath(M){return utils$4.matchAll(/\w+|\[(\w*)]/g,M).map($=>$[0]==="[]"?"":$[1]||$[0])}function arrayToObject$1(M){const $={},I=Object.keys(M);let N;const B=I.length;let j;for(N=0;N=I.length;return U=!U&&utils$4.isArray(B)?B.length:U,Y?(utils$4.hasOwnProp(B,U)?B[U]=[B[U],N]:B[U]=N,!q):((!B[U]||!utils$4.isObject(B[U]))&&(B[U]=[]),$(I,N,B[U],j)&&utils$4.isArray(B[U])&&(B[U]=arrayToObject$1(B[U])),!q)}if(utils$4.isFormData(M)&&utils$4.isFunction(M.entries)){const I={};return utils$4.forEachEntry(M,(N,B)=>{$(parsePropPath(N),B,I,0)}),I}return null}function stringifySafely(M,$,I){if(utils$4.isString(M))try{return($||JSON.parse)(M),utils$4.trim(M)}catch(N){if(N.name!=="SyntaxError")throw N}return(I||JSON.stringify)(M)}const defaults$4={transitional:transitionalDefaults,adapter:["xhr","http","fetch"],transformRequest:[function($,I){const N=I.getContentType()||"",B=N.indexOf("application/json")>-1,j=utils$4.isObject($);if(j&&utils$4.isHTMLForm($)&&($=new FormData($)),utils$4.isFormData($))return B?JSON.stringify(formDataToJSON($)):$;if(utils$4.isArrayBuffer($)||utils$4.isBuffer($)||utils$4.isStream($)||utils$4.isFile($)||utils$4.isBlob($)||utils$4.isReadableStream($))return $;if(utils$4.isArrayBufferView($))return $.buffer;if(utils$4.isURLSearchParams($))return I.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),$.toString();let q;if(j){if(N.indexOf("application/x-www-form-urlencoded")>-1)return toURLEncodedForm($,this.formSerializer).toString();if((q=utils$4.isFileList($))||N.indexOf("multipart/form-data")>-1){const Y=this.env&&this.env.FormData;return toFormData(q?{"files[]":$}:$,Y&&new Y,this.formSerializer)}}return j||B?(I.setContentType("application/json",!1),stringifySafely($)):$}],transformResponse:[function($){const I=this.transitional||defaults$4.transitional,N=I&&I.forcedJSONParsing,B=this.responseType==="json";if(utils$4.isResponse($)||utils$4.isReadableStream($))return $;if($&&utils$4.isString($)&&(N&&!this.responseType||B)){const U=!(I&&I.silentJSONParsing)&&B;try{return JSON.parse($)}catch(q){if(U)throw q.name==="SyntaxError"?AxiosError.from(q,AxiosError.ERR_BAD_RESPONSE,this,null,this.response):q}}return $}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:platform$1.classes.FormData,Blob:platform$1.classes.Blob},validateStatus:function($){return $>=200&&$<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};utils$4.forEach(["delete","get","head","post","put","patch"],M=>{defaults$4.headers[M]={}});const defaults$5=defaults$4,ignoreDuplicateOf=utils$4.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"]),parseHeaders=M=>{const $={};let I,N,B;return M&&M.split(` +`).forEach(function(U){B=U.indexOf(":"),I=U.substring(0,B).trim().toLowerCase(),N=U.substring(B+1).trim(),!(!I||$[I]&&ignoreDuplicateOf[I])&&(I==="set-cookie"?$[I]?$[I].push(N):$[I]=[N]:$[I]=$[I]?$[I]+", "+N:N)}),$},$internals=Symbol("internals");function normalizeHeader(M){return M&&String(M).trim().toLowerCase()}function normalizeValue(M){return M===!1||M==null?M:utils$4.isArray(M)?M.map(normalizeValue):String(M)}function parseTokens(M){const $=Object.create(null),I=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let N;for(;N=I.exec(M);)$[N[1]]=N[2];return $}const isValidHeaderName=M=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(M.trim());function matchHeaderValue(M,$,I,N,B){if(utils$4.isFunction(N))return N.call(this,$,I);if(B&&($=I),!!utils$4.isString($)){if(utils$4.isString(N))return $.indexOf(N)!==-1;if(utils$4.isRegExp(N))return N.test($)}}function formatHeader(M){return M.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,($,I,N)=>I.toUpperCase()+N)}function buildAccessors(M,$){const I=utils$4.toCamelCase(" "+$);["get","set","has"].forEach(N=>{Object.defineProperty(M,N+I,{value:function(B,j,U){return this[N].call(this,$,B,j,U)},configurable:!0})})}class AxiosHeaders{constructor($){$&&this.set($)}set($,I,N){const B=this;function j(q,Y,K){const G=normalizeHeader(Y);if(!G)throw new Error("header name must be a non-empty string");const J=utils$4.findKey(B,G);(!J||B[J]===void 0||K===!0||K===void 0&&B[J]!==!1)&&(B[J||Y]=normalizeValue(q))}const U=(q,Y)=>utils$4.forEach(q,(K,G)=>j(K,G,Y));if(utils$4.isPlainObject($)||$ instanceof this.constructor)U($,I);else if(utils$4.isString($)&&($=$.trim())&&!isValidHeaderName($))U(parseHeaders($),I);else if(utils$4.isHeaders($))for(const[q,Y]of $.entries())j(Y,q,N);else $!=null&&j(I,$,N);return this}get($,I){if($=normalizeHeader($),$){const N=utils$4.findKey(this,$);if(N){const B=this[N];if(!I)return B;if(I===!0)return parseTokens(B);if(utils$4.isFunction(I))return I.call(this,B,N);if(utils$4.isRegExp(I))return I.exec(B);throw new TypeError("parser must be boolean|regexp|function")}}}has($,I){if($=normalizeHeader($),$){const N=utils$4.findKey(this,$);return!!(N&&this[N]!==void 0&&(!I||matchHeaderValue(this,this[N],N,I)))}return!1}delete($,I){const N=this;let B=!1;function j(U){if(U=normalizeHeader(U),U){const q=utils$4.findKey(N,U);q&&(!I||matchHeaderValue(N,N[q],q,I))&&(delete N[q],B=!0)}}return utils$4.isArray($)?$.forEach(j):j($),B}clear($){const I=Object.keys(this);let N=I.length,B=!1;for(;N--;){const j=I[N];(!$||matchHeaderValue(this,this[j],j,$,!0))&&(delete this[j],B=!0)}return B}normalize($){const I=this,N={};return utils$4.forEach(this,(B,j)=>{const U=utils$4.findKey(N,j);if(U){I[U]=normalizeValue(B),delete I[j];return}const q=$?formatHeader(j):String(j).trim();q!==j&&delete I[j],I[q]=normalizeValue(B),N[q]=!0}),this}concat(...$){return this.constructor.concat(this,...$)}toJSON($){const I=Object.create(null);return utils$4.forEach(this,(N,B)=>{N!=null&&N!==!1&&(I[B]=$&&utils$4.isArray(N)?N.join(", "):N)}),I}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([$,I])=>$+": "+I).join(` +`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from($){return $ instanceof this?$:new this($)}static concat($,...I){const N=new this($);return I.forEach(B=>N.set(B)),N}static accessor($){const N=(this[$internals]=this[$internals]={accessors:{}}).accessors,B=this.prototype;function j(U){const q=normalizeHeader(U);N[q]||(buildAccessors(B,U),N[q]=!0)}return utils$4.isArray($)?$.forEach(j):j($),this}}AxiosHeaders.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);utils$4.reduceDescriptors(AxiosHeaders.prototype,({value:M},$)=>{let I=$[0].toUpperCase()+$.slice(1);return{get:()=>M,set(N){this[I]=N}}});utils$4.freezeMethods(AxiosHeaders);const AxiosHeaders$1=AxiosHeaders;function transformData(M,$){const I=this||defaults$5,N=$||I,B=AxiosHeaders$1.from(N.headers);let j=N.data;return utils$4.forEach(M,function(q){j=q.call(I,j,B.normalize(),$?$.status:void 0)}),B.normalize(),j}function isCancel(M){return!!(M&&M.__CANCEL__)}function CanceledError(M,$,I){AxiosError.call(this,M??"canceled",AxiosError.ERR_CANCELED,$,I),this.name="CanceledError"}utils$4.inherits(CanceledError,AxiosError,{__CANCEL__:!0});function settle(M,$,I){const N=I.config.validateStatus;!I.status||!N||N(I.status)?M(I):$(new AxiosError("Request failed with status code "+I.status,[AxiosError.ERR_BAD_REQUEST,AxiosError.ERR_BAD_RESPONSE][Math.floor(I.status/100)-4],I.config,I.request,I))}function parseProtocol(M){const $=/^([-+\w]{1,25})(:?\/\/|:)/.exec(M);return $&&$[1]||""}function speedometer(M,$){M=M||10;const I=new Array(M),N=new Array(M);let B=0,j=0,U;return $=$!==void 0?$:1e3,function(Y){const K=Date.now(),G=N[j];U||(U=K),I[B]=Y,N[B]=K;let J=j,Z=0;for(;J!==B;)Z+=I[J++],J=J%M;if(B=(B+1)%M,B===j&&(j=(j+1)%M),K-U<$)return;const ee=G&&K-G;return ee?Math.round(Z*1e3/ee):void 0}}function throttle$2(M,$){let I=0,N=1e3/$,B,j;const U=(K,G=Date.now())=>{I=G,B=null,j&&(clearTimeout(j),j=null),M.apply(null,K)};return[(...K)=>{const G=Date.now(),J=G-I;J>=N?U(K,G):(B=K,j||(j=setTimeout(()=>{j=null,U(B)},N-J)))},()=>B&&U(B)]}const progressEventReducer=(M,$,I=3)=>{let N=0;const B=speedometer(50,250);return throttle$2(j=>{const U=j.loaded,q=j.lengthComputable?j.total:void 0,Y=U-N,K=B(Y),G=U<=q;N=U;const J={loaded:U,total:q,progress:q?U/q:void 0,bytes:Y,rate:K||void 0,estimated:K&&q&&G?(q-U)/K:void 0,event:j,lengthComputable:q!=null,[$?"download":"upload"]:!0};M(J)},I)},progressEventDecorator=(M,$)=>{const I=M!=null;return[N=>$[0]({lengthComputable:I,total:M,loaded:N}),$[1]]},asyncDecorator=M=>(...$)=>utils$4.asap(()=>M(...$)),isURLSameOrigin=platform$1.hasStandardBrowserEnv?function(){const $=/(msie|trident)/i.test(navigator.userAgent),I=document.createElement("a");let N;function B(j){let U=j;return $&&(I.setAttribute("href",U),U=I.href),I.setAttribute("href",U),{href:I.href,protocol:I.protocol?I.protocol.replace(/:$/,""):"",host:I.host,search:I.search?I.search.replace(/^\?/,""):"",hash:I.hash?I.hash.replace(/^#/,""):"",hostname:I.hostname,port:I.port,pathname:I.pathname.charAt(0)==="/"?I.pathname:"/"+I.pathname}}return N=B(window.location.href),function(U){const q=utils$4.isString(U)?B(U):U;return q.protocol===N.protocol&&q.host===N.host}}():function(){return function(){return!0}}(),cookies$1=platform$1.hasStandardBrowserEnv?{write(M,$,I,N,B,j){const U=[M+"="+encodeURIComponent($)];utils$4.isNumber(I)&&U.push("expires="+new Date(I).toGMTString()),utils$4.isString(N)&&U.push("path="+N),utils$4.isString(B)&&U.push("domain="+B),j===!0&&U.push("secure"),document.cookie=U.join("; ")},read(M){const $=document.cookie.match(new RegExp("(^|;\\s*)("+M+")=([^;]*)"));return $?decodeURIComponent($[3]):null},remove(M){this.write(M,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function isAbsoluteURL(M){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(M)}function combineURLs(M,$){return $?M.replace(/\/?\/$/,"")+"/"+$.replace(/^\/+/,""):M}function buildFullPath(M,$){return M&&!isAbsoluteURL($)?combineURLs(M,$):$}const headersToObject=M=>M instanceof AxiosHeaders$1?{...M}:M;function mergeConfig(M,$){$=$||{};const I={};function N(K,G,J){return utils$4.isPlainObject(K)&&utils$4.isPlainObject(G)?utils$4.merge.call({caseless:J},K,G):utils$4.isPlainObject(G)?utils$4.merge({},G):utils$4.isArray(G)?G.slice():G}function B(K,G,J){if(utils$4.isUndefined(G)){if(!utils$4.isUndefined(K))return N(void 0,K,J)}else return N(K,G,J)}function j(K,G){if(!utils$4.isUndefined(G))return N(void 0,G)}function U(K,G){if(utils$4.isUndefined(G)){if(!utils$4.isUndefined(K))return N(void 0,K)}else return N(void 0,G)}function q(K,G,J){if(J in $)return N(K,G);if(J in M)return N(void 0,K)}const Y={url:j,method:j,data:j,baseURL:U,transformRequest:U,transformResponse:U,paramsSerializer:U,timeout:U,timeoutMessage:U,withCredentials:U,withXSRFToken:U,adapter:U,responseType:U,xsrfCookieName:U,xsrfHeaderName:U,onUploadProgress:U,onDownloadProgress:U,decompress:U,maxContentLength:U,maxBodyLength:U,beforeRedirect:U,transport:U,httpAgent:U,httpsAgent:U,cancelToken:U,socketPath:U,responseEncoding:U,validateStatus:q,headers:(K,G)=>B(headersToObject(K),headersToObject(G),!0)};return utils$4.forEach(Object.keys(Object.assign({},M,$)),function(G){const J=Y[G]||B,Z=J(M[G],$[G],G);utils$4.isUndefined(Z)&&J!==q||(I[G]=Z)}),I}const resolveConfig=M=>{const $=mergeConfig({},M);let{data:I,withXSRFToken:N,xsrfHeaderName:B,xsrfCookieName:j,headers:U,auth:q}=$;$.headers=U=AxiosHeaders$1.from(U),$.url=buildURL(buildFullPath($.baseURL,$.url),M.params,M.paramsSerializer),q&&U.set("Authorization","Basic "+btoa((q.username||"")+":"+(q.password?unescape(encodeURIComponent(q.password)):"")));let Y;if(utils$4.isFormData(I)){if(platform$1.hasStandardBrowserEnv||platform$1.hasStandardBrowserWebWorkerEnv)U.setContentType(void 0);else if((Y=U.getContentType())!==!1){const[K,...G]=Y?Y.split(";").map(J=>J.trim()).filter(Boolean):[];U.setContentType([K||"multipart/form-data",...G].join("; "))}}if(platform$1.hasStandardBrowserEnv&&(N&&utils$4.isFunction(N)&&(N=N($)),N||N!==!1&&isURLSameOrigin($.url))){const K=B&&j&&cookies$1.read(j);K&&U.set(B,K)}return $},isXHRAdapterSupported=typeof XMLHttpRequest<"u",xhrAdapter=isXHRAdapterSupported&&function(M){return new Promise(function(I,N){const B=resolveConfig(M);let j=B.data;const U=AxiosHeaders$1.from(B.headers).normalize();let{responseType:q,onUploadProgress:Y,onDownloadProgress:K}=B,G,J,Z,ee,te;function se(){ee&&ee(),te&&te(),B.cancelToken&&B.cancelToken.unsubscribe(G),B.signal&&B.signal.removeEventListener("abort",G)}let re=new XMLHttpRequest;re.open(B.method.toUpperCase(),B.url,!0),re.timeout=B.timeout;function ne(){if(!re)return;const me=AxiosHeaders$1.from("getAllResponseHeaders"in re&&re.getAllResponseHeaders()),_e={data:!q||q==="text"||q==="json"?re.responseText:re.response,status:re.status,statusText:re.statusText,headers:me,config:M,request:re};settle(function(ge){I(ge),se()},function(ge){N(ge),se()},_e),re=null}"onloadend"in re?re.onloadend=ne:re.onreadystatechange=function(){!re||re.readyState!==4||re.status===0&&!(re.responseURL&&re.responseURL.indexOf("file:")===0)||setTimeout(ne)},re.onabort=function(){re&&(N(new AxiosError("Request aborted",AxiosError.ECONNABORTED,M,re)),re=null)},re.onerror=function(){N(new AxiosError("Network Error",AxiosError.ERR_NETWORK,M,re)),re=null},re.ontimeout=function(){let ue=B.timeout?"timeout of "+B.timeout+"ms exceeded":"timeout exceeded";const _e=B.transitional||transitionalDefaults;B.timeoutErrorMessage&&(ue=B.timeoutErrorMessage),N(new AxiosError(ue,_e.clarifyTimeoutError?AxiosError.ETIMEDOUT:AxiosError.ECONNABORTED,M,re)),re=null},j===void 0&&U.setContentType(null),"setRequestHeader"in re&&utils$4.forEach(U.toJSON(),function(ue,_e){re.setRequestHeader(_e,ue)}),utils$4.isUndefined(B.withCredentials)||(re.withCredentials=!!B.withCredentials),q&&q!=="json"&&(re.responseType=B.responseType),K&&([Z,te]=progressEventReducer(K,!0),re.addEventListener("progress",Z)),Y&&re.upload&&([J,ee]=progressEventReducer(Y),re.upload.addEventListener("progress",J),re.upload.addEventListener("loadend",ee)),(B.cancelToken||B.signal)&&(G=me=>{re&&(N(!me||me.type?new CanceledError(null,M,re):me),re.abort(),re=null)},B.cancelToken&&B.cancelToken.subscribe(G),B.signal&&(B.signal.aborted?G():B.signal.addEventListener("abort",G)));const le=parseProtocol(B.url);if(le&&platform$1.protocols.indexOf(le)===-1){N(new AxiosError("Unsupported protocol "+le+":",AxiosError.ERR_BAD_REQUEST,M));return}re.send(j||null)})},composeSignals=(M,$)=>{let I=new AbortController,N;const B=function(Y){if(!N){N=!0,U();const K=Y instanceof Error?Y:this.reason;I.abort(K instanceof AxiosError?K:new CanceledError(K instanceof Error?K.message:K))}};let j=$&&setTimeout(()=>{B(new AxiosError(`timeout ${$} of ms exceeded`,AxiosError.ETIMEDOUT))},$);const U=()=>{M&&(j&&clearTimeout(j),j=null,M.forEach(Y=>{Y&&(Y.removeEventListener?Y.removeEventListener("abort",B):Y.unsubscribe(B))}),M=null)};M.forEach(Y=>Y&&Y.addEventListener&&Y.addEventListener("abort",B));const{signal:q}=I;return q.unsubscribe=U,[q,()=>{j&&clearTimeout(j),j=null}]},composeSignals$1=composeSignals,streamChunk=function*(M,$){let I=M.byteLength;if(!$||I<$){yield M;return}let N=0,B;for(;N{const j=readBytes(M,$,B);let U=0,q,Y=K=>{q||(q=!0,N&&N(K))};return new ReadableStream({async pull(K){try{const{done:G,value:J}=await j.next();if(G){Y(),K.close();return}let Z=J.byteLength;if(I){let ee=U+=Z;I(ee)}K.enqueue(new Uint8Array(J))}catch(G){throw Y(G),G}},cancel(K){return Y(K),j.return()}},{highWaterMark:2})},isFetchSupported=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",isReadableStreamSupported=isFetchSupported&&typeof ReadableStream=="function",encodeText=isFetchSupported&&(typeof TextEncoder=="function"?(M=>$=>M.encode($))(new TextEncoder):async M=>new Uint8Array(await new Response(M).arrayBuffer())),test=(M,...$)=>{try{return!!M(...$)}catch{return!1}},supportsRequestStream=isReadableStreamSupported&&test(()=>{let M=!1;const $=new Request(platform$1.origin,{body:new ReadableStream,method:"POST",get duplex(){return M=!0,"half"}}).headers.has("Content-Type");return M&&!$}),DEFAULT_CHUNK_SIZE=64*1024,supportsResponseStream=isReadableStreamSupported&&test(()=>utils$4.isReadableStream(new Response("").body)),resolvers={stream:supportsResponseStream&&(M=>M.body)};isFetchSupported&&(M=>{["text","arrayBuffer","blob","formData","stream"].forEach($=>{!resolvers[$]&&(resolvers[$]=utils$4.isFunction(M[$])?I=>I[$]():(I,N)=>{throw new AxiosError(`Response type '${$}' is not supported`,AxiosError.ERR_NOT_SUPPORT,N)})})})(new Response);const getBodyLength=async M=>{if(M==null)return 0;if(utils$4.isBlob(M))return M.size;if(utils$4.isSpecCompliantForm(M))return(await new Request(M).arrayBuffer()).byteLength;if(utils$4.isArrayBufferView(M)||utils$4.isArrayBuffer(M))return M.byteLength;if(utils$4.isURLSearchParams(M)&&(M=M+""),utils$4.isString(M))return(await encodeText(M)).byteLength},resolveBodyLength=async(M,$)=>{const I=utils$4.toFiniteNumber(M.getContentLength());return I??getBodyLength($)},fetchAdapter=isFetchSupported&&(async M=>{let{url:$,method:I,data:N,signal:B,cancelToken:j,timeout:U,onDownloadProgress:q,onUploadProgress:Y,responseType:K,headers:G,withCredentials:J="same-origin",fetchOptions:Z}=resolveConfig(M);K=K?(K+"").toLowerCase():"text";let[ee,te]=B||j||U?composeSignals$1([B,j],U):[],se,re;const ne=()=>{!se&&setTimeout(()=>{ee&&ee.unsubscribe()}),se=!0};let le;try{if(Y&&supportsRequestStream&&I!=="get"&&I!=="head"&&(le=await resolveBodyLength(G,N))!==0){let fe=new Request($,{method:"POST",body:N,duplex:"half"}),ge;if(utils$4.isFormData(N)&&(ge=fe.headers.get("content-type"))&&G.setContentType(ge),fe.body){const[ye,xe]=progressEventDecorator(le,progressEventReducer(asyncDecorator(Y)));N=trackStream(fe.body,DEFAULT_CHUNK_SIZE,ye,xe,encodeText)}}utils$4.isString(J)||(J=J?"include":"omit"),re=new Request($,{...Z,signal:ee,method:I.toUpperCase(),headers:G.normalize().toJSON(),body:N,duplex:"half",credentials:J});let me=await fetch(re);const ue=supportsResponseStream&&(K==="stream"||K==="response");if(supportsResponseStream&&(q||ue)){const fe={};["status","statusText","headers"].forEach(oe=>{fe[oe]=me[oe]});const ge=utils$4.toFiniteNumber(me.headers.get("content-length")),[ye,xe]=q&&progressEventDecorator(ge,progressEventReducer(asyncDecorator(q),!0))||[];me=new Response(trackStream(me.body,DEFAULT_CHUNK_SIZE,ye,()=>{xe&&xe(),ue&&ne()},encodeText),fe)}K=K||"text";let _e=await resolvers[utils$4.findKey(resolvers,K)||"text"](me,M);return!ue&&ne(),te&&te(),await new Promise((fe,ge)=>{settle(fe,ge,{data:_e,headers:AxiosHeaders$1.from(me.headers),status:me.status,statusText:me.statusText,config:M,request:re})})}catch(me){throw ne(),me&&me.name==="TypeError"&&/fetch/i.test(me.message)?Object.assign(new AxiosError("Network Error",AxiosError.ERR_NETWORK,M,re),{cause:me.cause||me}):AxiosError.from(me,me&&me.code,M,re)}}),knownAdapters={http:httpAdapter,xhr:xhrAdapter,fetch:fetchAdapter};utils$4.forEach(knownAdapters,(M,$)=>{if(M){try{Object.defineProperty(M,"name",{value:$})}catch{}Object.defineProperty(M,"adapterName",{value:$})}});const renderReason=M=>`- ${M}`,isResolvedHandle=M=>utils$4.isFunction(M)||M===null||M===!1,adapters={getAdapter:M=>{M=utils$4.isArray(M)?M:[M];const{length:$}=M;let I,N;const B={};for(let j=0;j<$;j++){I=M[j];let U;if(N=I,!isResolvedHandle(I)&&(N=knownAdapters[(U=String(I)).toLowerCase()],N===void 0))throw new AxiosError(`Unknown adapter '${U}'`);if(N)break;B[U||"#"+j]=N}if(!N){const j=Object.entries(B).map(([q,Y])=>`adapter ${q} `+(Y===!1?"is not supported by the environment":"is not available in the build"));let U=$?j.length>1?`since : +`+j.map(renderReason).join(` +`):" "+renderReason(j[0]):"as no adapter specified";throw new AxiosError("There is no suitable adapter to dispatch the request "+U,"ERR_NOT_SUPPORT")}return N},adapters:knownAdapters};function throwIfCancellationRequested(M){if(M.cancelToken&&M.cancelToken.throwIfRequested(),M.signal&&M.signal.aborted)throw new CanceledError(null,M)}function dispatchRequest(M){return throwIfCancellationRequested(M),M.headers=AxiosHeaders$1.from(M.headers),M.data=transformData.call(M,M.transformRequest),["post","put","patch"].indexOf(M.method)!==-1&&M.headers.setContentType("application/x-www-form-urlencoded",!1),adapters.getAdapter(M.adapter||defaults$5.adapter)(M).then(function(N){return throwIfCancellationRequested(M),N.data=transformData.call(M,M.transformResponse,N),N.headers=AxiosHeaders$1.from(N.headers),N},function(N){return isCancel(N)||(throwIfCancellationRequested(M),N&&N.response&&(N.response.data=transformData.call(M,M.transformResponse,N.response),N.response.headers=AxiosHeaders$1.from(N.response.headers))),Promise.reject(N)})}const VERSION="1.7.4",validators$1={};["object","boolean","number","function","string","symbol"].forEach((M,$)=>{validators$1[M]=function(N){return typeof N===M||"a"+($<1?"n ":" ")+M}});const deprecatedWarnings={};validators$1.transitional=function($,I,N){function B(j,U){return"[Axios v"+VERSION+"] Transitional option '"+j+"'"+U+(N?". "+N:"")}return(j,U,q)=>{if($===!1)throw new AxiosError(B(U," has been removed"+(I?" in "+I:"")),AxiosError.ERR_DEPRECATED);return I&&!deprecatedWarnings[U]&&(deprecatedWarnings[U]=!0,console.warn(B(U," has been deprecated since v"+I+" and will be removed in the near future"))),$?$(j,U,q):!0}};function assertOptions(M,$,I){if(typeof M!="object")throw new AxiosError("options must be an object",AxiosError.ERR_BAD_OPTION_VALUE);const N=Object.keys(M);let B=N.length;for(;B-- >0;){const j=N[B],U=$[j];if(U){const q=M[j],Y=q===void 0||U(q,j,M);if(Y!==!0)throw new AxiosError("option "+j+" must be "+Y,AxiosError.ERR_BAD_OPTION_VALUE);continue}if(I!==!0)throw new AxiosError("Unknown option "+j,AxiosError.ERR_BAD_OPTION)}}const validator={assertOptions,validators:validators$1},validators=validator.validators;class Axios{constructor($){this.defaults=$,this.interceptors={request:new InterceptorManager$1,response:new InterceptorManager$1}}async request($,I){try{return await this._request($,I)}catch(N){if(N instanceof Error){let B;Error.captureStackTrace?Error.captureStackTrace(B={}):B=new Error;const j=B.stack?B.stack.replace(/^.+\n/,""):"";try{N.stack?j&&!String(N.stack).endsWith(j.replace(/^.+\n.+\n/,""))&&(N.stack+=` +`+j):N.stack=j}catch{}}throw N}}_request($,I){typeof $=="string"?(I=I||{},I.url=$):I=$||{},I=mergeConfig(this.defaults,I);const{transitional:N,paramsSerializer:B,headers:j}=I;N!==void 0&&validator.assertOptions(N,{silentJSONParsing:validators.transitional(validators.boolean),forcedJSONParsing:validators.transitional(validators.boolean),clarifyTimeoutError:validators.transitional(validators.boolean)},!1),B!=null&&(utils$4.isFunction(B)?I.paramsSerializer={serialize:B}:validator.assertOptions(B,{encode:validators.function,serialize:validators.function},!0)),I.method=(I.method||this.defaults.method||"get").toLowerCase();let U=j&&utils$4.merge(j.common,j[I.method]);j&&utils$4.forEach(["delete","get","head","post","put","patch","common"],te=>{delete j[te]}),I.headers=AxiosHeaders$1.concat(U,j);const q=[];let Y=!0;this.interceptors.request.forEach(function(se){typeof se.runWhen=="function"&&se.runWhen(I)===!1||(Y=Y&&se.synchronous,q.unshift(se.fulfilled,se.rejected))});const K=[];this.interceptors.response.forEach(function(se){K.push(se.fulfilled,se.rejected)});let G,J=0,Z;if(!Y){const te=[dispatchRequest.bind(this),void 0];for(te.unshift.apply(te,q),te.push.apply(te,K),Z=te.length,G=Promise.resolve(I);J{if(!N._listeners)return;let j=N._listeners.length;for(;j-- >0;)N._listeners[j](B);N._listeners=null}),this.promise.then=B=>{let j;const U=new Promise(q=>{N.subscribe(q),j=q}).then(B);return U.cancel=function(){N.unsubscribe(j)},U},$(function(j,U,q){N.reason||(N.reason=new CanceledError(j,U,q),I(N.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe($){if(this.reason){$(this.reason);return}this._listeners?this._listeners.push($):this._listeners=[$]}unsubscribe($){if(!this._listeners)return;const I=this._listeners.indexOf($);I!==-1&&this._listeners.splice(I,1)}static source(){let $;return{token:new CancelToken(function(B){$=B}),cancel:$}}}const CancelToken$1=CancelToken;function spread(M){return function(I){return M.apply(null,I)}}function isAxiosError(M){return utils$4.isObject(M)&&M.isAxiosError===!0}const HttpStatusCode={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(HttpStatusCode).forEach(([M,$])=>{HttpStatusCode[$]=M});const HttpStatusCode$1=HttpStatusCode;function createInstance(M){const $=new Axios$1(M),I=bind$5(Axios$1.prototype.request,$);return utils$4.extend(I,Axios$1.prototype,$,{allOwnKeys:!0}),utils$4.extend(I,$,null,{allOwnKeys:!0}),I.create=function(B){return createInstance(mergeConfig(M,B))},I}const axios$1=createInstance(defaults$5);axios$1.Axios=Axios$1;axios$1.CanceledError=CanceledError;axios$1.CancelToken=CancelToken$1;axios$1.isCancel=isCancel;axios$1.VERSION=VERSION;axios$1.toFormData=toFormData;axios$1.AxiosError=AxiosError;axios$1.Cancel=axios$1.CanceledError;axios$1.all=function($){return Promise.all($)};axios$1.spread=spread;axios$1.isAxiosError=isAxiosError;axios$1.mergeConfig=mergeConfig;axios$1.AxiosHeaders=AxiosHeaders$1;axios$1.formToJSON=M=>formDataToJSON(utils$4.isHTMLForm(M)?new FormData(M):M);axios$1.getAdapter=adapters.getAdapter;axios$1.HttpStatusCode=HttpStatusCode$1;axios$1.default=axios$1;const axios$2=axios$1;var speakingurl$1={exports:{}};(function(M){(function($){var I={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"Ae",Å:"A",Æ:"AE",Ç:"C",È:"E",É:"E",Ê:"E",Ë:"E",Ì:"I",Í:"I",Î:"I",Ï:"I",Ð:"D",Ñ:"N",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"Oe",Ő:"O",Ø:"O",Ù:"U",Ú:"U",Û:"U",Ü:"Ue",Ű:"U",Ý:"Y",Þ:"TH",ß:"ss",à:"a",á:"a",â:"a",ã:"a",ä:"ae",å:"a",æ:"ae",ç:"c",è:"e",é:"e",ê:"e",ë:"e",ì:"i",í:"i",î:"i",ï:"i",ð:"d",ñ:"n",ò:"o",ó:"o",ô:"o",õ:"o",ö:"oe",ő:"o",ø:"o",ù:"u",ú:"u",û:"u",ü:"ue",ű:"u",ý:"y",þ:"th",ÿ:"y","ẞ":"SS",ا:"a",أ:"a",إ:"i",آ:"aa",ؤ:"u",ئ:"e",ء:"a",ب:"b",ت:"t",ث:"th",ج:"j",ح:"h",خ:"kh",د:"d",ذ:"th",ر:"r",ز:"z",س:"s",ش:"sh",ص:"s",ض:"dh",ط:"t",ظ:"z",ع:"a",غ:"gh",ف:"f",ق:"q",ك:"k",ل:"l",م:"m",ن:"n",ه:"h",و:"w",ي:"y",ى:"a",ة:"h",ﻻ:"la",ﻷ:"laa",ﻹ:"lai",ﻵ:"laa",گ:"g",چ:"ch",پ:"p",ژ:"zh",ک:"k",ی:"y","َ":"a","ً":"an","ِ":"e","ٍ":"en","ُ":"u","ٌ":"on","ْ":"","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","۰":"0","۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9",က:"k",ခ:"kh",ဂ:"g",ဃ:"ga",င:"ng",စ:"s",ဆ:"sa",ဇ:"z","စျ":"za",ည:"ny",ဋ:"t",ဌ:"ta",ဍ:"d",ဎ:"da",ဏ:"na",တ:"t",ထ:"ta",ဒ:"d",ဓ:"da",န:"n",ပ:"p",ဖ:"pa",ဗ:"b",ဘ:"ba",မ:"m",ယ:"y",ရ:"ya",လ:"l",ဝ:"w",သ:"th",ဟ:"h",ဠ:"la",အ:"a","ြ":"y","ျ":"ya","ွ":"w","ြွ":"yw","ျွ":"ywa","ှ":"h",ဧ:"e","၏":"-e",ဣ:"i",ဤ:"-i",ဉ:"u",ဦ:"-u",ဩ:"aw","သြော":"aw",ဪ:"aw","၀":"0","၁":"1","၂":"2","၃":"3","၄":"4","၅":"5","၆":"6","၇":"7","၈":"8","၉":"9","္":"","့":"","း":"",č:"c",ď:"d",ě:"e",ň:"n",ř:"r",š:"s",ť:"t",ů:"u",ž:"z",Č:"C",Ď:"D",Ě:"E",Ň:"N",Ř:"R",Š:"S",Ť:"T",Ů:"U",Ž:"Z",ހ:"h",ށ:"sh",ނ:"n",ރ:"r",ބ:"b",ޅ:"lh",ކ:"k",އ:"a",ވ:"v",މ:"m",ފ:"f",ދ:"dh",ތ:"th",ލ:"l",ގ:"g",ޏ:"gn",ސ:"s",ޑ:"d",ޒ:"z",ޓ:"t",ޔ:"y",ޕ:"p",ޖ:"j",ޗ:"ch",ޘ:"tt",ޙ:"hh",ޚ:"kh",ޛ:"th",ޜ:"z",ޝ:"sh",ޞ:"s",ޟ:"d",ޠ:"t",ޡ:"z",ޢ:"a",ޣ:"gh",ޤ:"q",ޥ:"w","ަ":"a","ާ":"aa","ި":"i","ީ":"ee","ު":"u","ޫ":"oo","ެ":"e","ޭ":"ey","ޮ":"o","ޯ":"oa","ް":"",ა:"a",ბ:"b",გ:"g",დ:"d",ე:"e",ვ:"v",ზ:"z",თ:"t",ი:"i",კ:"k",ლ:"l",მ:"m",ნ:"n",ო:"o",პ:"p",ჟ:"zh",რ:"r",ს:"s",ტ:"t",უ:"u",ფ:"p",ქ:"k",ღ:"gh",ყ:"q",შ:"sh",ჩ:"ch",ც:"ts",ძ:"dz",წ:"ts",ჭ:"ch",ხ:"kh",ჯ:"j",ჰ:"h",α:"a",β:"v",γ:"g",δ:"d",ε:"e",ζ:"z",η:"i",θ:"th",ι:"i",κ:"k",λ:"l",μ:"m",ν:"n",ξ:"ks",ο:"o",π:"p",ρ:"r",σ:"s",τ:"t",υ:"y",φ:"f",χ:"x",ψ:"ps",ω:"o",ά:"a",έ:"e",ί:"i",ό:"o",ύ:"y",ή:"i",ώ:"o",ς:"s",ϊ:"i",ΰ:"y",ϋ:"y",ΐ:"i",Α:"A",Β:"B",Γ:"G",Δ:"D",Ε:"E",Ζ:"Z",Η:"I",Θ:"TH",Ι:"I",Κ:"K",Λ:"L",Μ:"M",Ν:"N",Ξ:"KS",Ο:"O",Π:"P",Ρ:"R",Σ:"S",Τ:"T",Υ:"Y",Φ:"F",Χ:"X",Ψ:"PS",Ω:"O",Ά:"A",Έ:"E",Ί:"I",Ό:"O",Ύ:"Y",Ή:"I",Ώ:"O",Ϊ:"I",Ϋ:"Y",ā:"a",ē:"e",ģ:"g",ī:"i",ķ:"k",ļ:"l",ņ:"n",ū:"u",Ā:"A",Ē:"E",Ģ:"G",Ī:"I",Ķ:"k",Ļ:"L",Ņ:"N",Ū:"U",Ќ:"Kj",ќ:"kj",Љ:"Lj",љ:"lj",Њ:"Nj",њ:"nj",Тс:"Ts",тс:"ts",ą:"a",ć:"c",ę:"e",ł:"l",ń:"n",ś:"s",ź:"z",ż:"z",Ą:"A",Ć:"C",Ę:"E",Ł:"L",Ń:"N",Ś:"S",Ź:"Z",Ż:"Z",Є:"Ye",І:"I",Ї:"Yi",Ґ:"G",є:"ye",і:"i",ї:"yi",ґ:"g",ă:"a",Ă:"A",ș:"s",Ș:"S",ț:"t",Ț:"T",ţ:"t",Ţ:"T",а:"a",б:"b",в:"v",г:"g",д:"d",е:"e",ё:"yo",ж:"zh",з:"z",и:"i",й:"i",к:"k",л:"l",м:"m",н:"n",о:"o",п:"p",р:"r",с:"s",т:"t",у:"u",ф:"f",х:"kh",ц:"c",ч:"ch",ш:"sh",щ:"sh",ъ:"",ы:"y",ь:"",э:"e",ю:"yu",я:"ya",А:"A",Б:"B",В:"V",Г:"G",Д:"D",Е:"E",Ё:"Yo",Ж:"Zh",З:"Z",И:"I",Й:"I",К:"K",Л:"L",М:"M",Н:"N",О:"O",П:"P",Р:"R",С:"S",Т:"T",У:"U",Ф:"F",Х:"Kh",Ц:"C",Ч:"Ch",Ш:"Sh",Щ:"Sh",Ъ:"",Ы:"Y",Ь:"",Э:"E",Ю:"Yu",Я:"Ya",ђ:"dj",ј:"j",ћ:"c",џ:"dz",Ђ:"Dj",Ј:"j",Ћ:"C",Џ:"Dz",ľ:"l",ĺ:"l",ŕ:"r",Ľ:"L",Ĺ:"L",Ŕ:"R",ş:"s",Ş:"S",ı:"i",İ:"I",ğ:"g",Ğ:"G",ả:"a",Ả:"A",ẳ:"a",Ẳ:"A",ẩ:"a",Ẩ:"A",đ:"d",Đ:"D",ẹ:"e",Ẹ:"E",ẽ:"e",Ẽ:"E",ẻ:"e",Ẻ:"E",ế:"e",Ế:"E",ề:"e",Ề:"E",ệ:"e",Ệ:"E",ễ:"e",Ễ:"E",ể:"e",Ể:"E",ỏ:"o",ọ:"o",Ọ:"o",ố:"o",Ố:"O",ồ:"o",Ồ:"O",ổ:"o",Ổ:"O",ộ:"o",Ộ:"O",ỗ:"o",Ỗ:"O",ơ:"o",Ơ:"O",ớ:"o",Ớ:"O",ờ:"o",Ờ:"O",ợ:"o",Ợ:"O",ỡ:"o",Ỡ:"O",Ở:"o",ở:"o",ị:"i",Ị:"I",ĩ:"i",Ĩ:"I",ỉ:"i",Ỉ:"i",ủ:"u",Ủ:"U",ụ:"u",Ụ:"U",ũ:"u",Ũ:"U",ư:"u",Ư:"U",ứ:"u",Ứ:"U",ừ:"u",Ừ:"U",ự:"u",Ự:"U",ữ:"u",Ữ:"U",ử:"u",Ử:"ư",ỷ:"y",Ỷ:"y",ỳ:"y",Ỳ:"Y",ỵ:"y",Ỵ:"Y",ỹ:"y",Ỹ:"Y",ạ:"a",Ạ:"A",ấ:"a",Ấ:"A",ầ:"a",Ầ:"A",ậ:"a",Ậ:"A",ẫ:"a",Ẫ:"A",ắ:"a",Ắ:"A",ằ:"a",Ằ:"A",ặ:"a",Ặ:"A",ẵ:"a",Ẵ:"A","⓪":"0","①":"1","②":"2","③":"3","④":"4","⑤":"5","⑥":"6","⑦":"7","⑧":"8","⑨":"9","⑩":"10","⑪":"11","⑫":"12","⑬":"13","⑭":"14","⑮":"15","⑯":"16","⑰":"17","⑱":"18","⑲":"18","⑳":"18","⓵":"1","⓶":"2","⓷":"3","⓸":"4","⓹":"5","⓺":"6","⓻":"7","⓼":"8","⓽":"9","⓾":"10","⓿":"0","⓫":"11","⓬":"12","⓭":"13","⓮":"14","⓯":"15","⓰":"16","⓱":"17","⓲":"18","⓳":"19","⓴":"20","Ⓐ":"A","Ⓑ":"B","Ⓒ":"C","Ⓓ":"D","Ⓔ":"E","Ⓕ":"F","Ⓖ":"G","Ⓗ":"H","Ⓘ":"I","Ⓙ":"J","Ⓚ":"K","Ⓛ":"L","Ⓜ":"M","Ⓝ":"N","Ⓞ":"O","Ⓟ":"P","Ⓠ":"Q","Ⓡ":"R","Ⓢ":"S","Ⓣ":"T","Ⓤ":"U","Ⓥ":"V","Ⓦ":"W","Ⓧ":"X","Ⓨ":"Y","Ⓩ":"Z","ⓐ":"a","ⓑ":"b","ⓒ":"c","ⓓ":"d","ⓔ":"e","ⓕ":"f","ⓖ":"g","ⓗ":"h","ⓘ":"i","ⓙ":"j","ⓚ":"k","ⓛ":"l","ⓜ":"m","ⓝ":"n","ⓞ":"o","ⓟ":"p","ⓠ":"q","ⓡ":"r","ⓢ":"s","ⓣ":"t","ⓤ":"u","ⓦ":"v","ⓥ":"w","ⓧ":"x","ⓨ":"y","ⓩ":"z","“":'"',"”":'"',"‘":"'","’":"'","∂":"d",ƒ:"f","™":"(TM)","©":"(C)",œ:"oe",Œ:"OE","®":"(R)","†":"+","℠":"(SM)","…":"...","˚":"o",º:"o",ª:"a","•":"*","၊":",","။":".",$:"USD","€":"EUR","₢":"BRN","₣":"FRF","£":"GBP","₤":"ITL","₦":"NGN","₧":"ESP","₩":"KRW","₪":"ILS","₫":"VND","₭":"LAK","₮":"MNT","₯":"GRD","₱":"ARS","₲":"PYG","₳":"ARA","₴":"UAH","₵":"GHS","¢":"cent","¥":"CNY",元:"CNY",円:"YEN","﷼":"IRR","₠":"EWE","฿":"THB","₨":"INR","₹":"INR","₰":"PF","₺":"TRY","؋":"AFN","₼":"AZN",лв:"BGN","៛":"KHR","₡":"CRC","₸":"KZT",ден:"MKD",zł:"PLN","₽":"RUB","₾":"GEL"},N=["်","ް"],B={"ာ":"a","ါ":"a","ေ":"e","ဲ":"e","ိ":"i","ီ":"i","ို":"o","ု":"u","ူ":"u","ေါင်":"aung","ော":"aw","ော်":"aw","ေါ":"aw","ေါ်":"aw","်":"်","က်":"et","ိုက်":"aik","ောက်":"auk","င်":"in","ိုင်":"aing","ောင်":"aung","စ်":"it","ည်":"i","တ်":"at","ိတ်":"eik","ုတ်":"ok","ွတ်":"ut","ေတ်":"it","ဒ်":"d","ိုဒ်":"ok","ုဒ်":"ait","န်":"an","ာန်":"an","ိန်":"ein","ုန်":"on","ွန်":"un","ပ်":"at","ိပ်":"eik","ုပ်":"ok","ွပ်":"ut","န်ုပ်":"nub","မ်":"an","ိမ်":"ein","ုမ်":"on","ွမ်":"un","ယ်":"e","ိုလ်":"ol","ဉ်":"in","ံ":"an","ိံ":"ein","ုံ":"on","ައް":"ah","ަށް":"ah"},j={en:{},az:{ç:"c",ə:"e",ğ:"g",ı:"i",ö:"o",ş:"s",ü:"u",Ç:"C",Ə:"E",Ğ:"G",İ:"I",Ö:"O",Ş:"S",Ü:"U"},cs:{č:"c",ď:"d",ě:"e",ň:"n",ř:"r",š:"s",ť:"t",ů:"u",ž:"z",Č:"C",Ď:"D",Ě:"E",Ň:"N",Ř:"R",Š:"S",Ť:"T",Ů:"U",Ž:"Z"},fi:{ä:"a",Ä:"A",ö:"o",Ö:"O"},hu:{ä:"a",Ä:"A",ö:"o",Ö:"O",ü:"u",Ü:"U",ű:"u",Ű:"U"},lt:{ą:"a",č:"c",ę:"e",ė:"e",į:"i",š:"s",ų:"u",ū:"u",ž:"z",Ą:"A",Č:"C",Ę:"E",Ė:"E",Į:"I",Š:"S",Ų:"U",Ū:"U"},lv:{ā:"a",č:"c",ē:"e",ģ:"g",ī:"i",ķ:"k",ļ:"l",ņ:"n",š:"s",ū:"u",ž:"z",Ā:"A",Č:"C",Ē:"E",Ģ:"G",Ī:"i",Ķ:"k",Ļ:"L",Ņ:"N",Š:"S",Ū:"u",Ž:"Z"},pl:{ą:"a",ć:"c",ę:"e",ł:"l",ń:"n",ó:"o",ś:"s",ź:"z",ż:"z",Ą:"A",Ć:"C",Ę:"e",Ł:"L",Ń:"N",Ó:"O",Ś:"S",Ź:"Z",Ż:"Z"},sv:{ä:"a",Ä:"A",ö:"o",Ö:"O"},sk:{ä:"a",Ä:"A"},sr:{љ:"lj",њ:"nj",Љ:"Lj",Њ:"Nj",đ:"dj",Đ:"Dj"},tr:{Ü:"U",Ö:"O",ü:"u",ö:"o"}},U={ar:{"∆":"delta","∞":"la-nihaya","♥":"hob","&":"wa","|":"aw","<":"aqal-men",">":"akbar-men","∑":"majmou","¤":"omla"},az:{},ca:{"∆":"delta","∞":"infinit","♥":"amor","&":"i","|":"o","<":"menys que",">":"mes que","∑":"suma dels","¤":"moneda"},cs:{"∆":"delta","∞":"nekonecno","♥":"laska","&":"a","|":"nebo","<":"mensi nez",">":"vetsi nez","∑":"soucet","¤":"mena"},de:{"∆":"delta","∞":"unendlich","♥":"Liebe","&":"und","|":"oder","<":"kleiner als",">":"groesser als","∑":"Summe von","¤":"Waehrung"},dv:{"∆":"delta","∞":"kolunulaa","♥":"loabi","&":"aai","|":"noonee","<":"ah vure kuda",">":"ah vure bodu","∑":"jumula","¤":"faisaa"},en:{"∆":"delta","∞":"infinity","♥":"love","&":"and","|":"or","<":"less than",">":"greater than","∑":"sum","¤":"currency"},es:{"∆":"delta","∞":"infinito","♥":"amor","&":"y","|":"u","<":"menos que",">":"mas que","∑":"suma de los","¤":"moneda"},fa:{"∆":"delta","∞":"bi-nahayat","♥":"eshgh","&":"va","|":"ya","<":"kamtar-az",">":"bishtar-az","∑":"majmooe","¤":"vahed"},fi:{"∆":"delta","∞":"aarettomyys","♥":"rakkaus","&":"ja","|":"tai","<":"pienempi kuin",">":"suurempi kuin","∑":"summa","¤":"valuutta"},fr:{"∆":"delta","∞":"infiniment","♥":"Amour","&":"et","|":"ou","<":"moins que",">":"superieure a","∑":"somme des","¤":"monnaie"},ge:{"∆":"delta","∞":"usasruloba","♥":"siqvaruli","&":"da","|":"an","<":"naklebi",">":"meti","∑":"jami","¤":"valuta"},gr:{},hu:{"∆":"delta","∞":"vegtelen","♥":"szerelem","&":"es","|":"vagy","<":"kisebb mint",">":"nagyobb mint","∑":"szumma","¤":"penznem"},it:{"∆":"delta","∞":"infinito","♥":"amore","&":"e","|":"o","<":"minore di",">":"maggiore di","∑":"somma","¤":"moneta"},lt:{"∆":"delta","∞":"begalybe","♥":"meile","&":"ir","|":"ar","<":"maziau nei",">":"daugiau nei","∑":"suma","¤":"valiuta"},lv:{"∆":"delta","∞":"bezgaliba","♥":"milestiba","&":"un","|":"vai","<":"mazak neka",">":"lielaks neka","∑":"summa","¤":"valuta"},my:{"∆":"kwahkhyaet","∞":"asaonasme","♥":"akhyait","&":"nhin","|":"tho","<":"ngethaw",">":"kyithaw","∑":"paungld","¤":"ngwekye"},mk:{},nl:{"∆":"delta","∞":"oneindig","♥":"liefde","&":"en","|":"of","<":"kleiner dan",">":"groter dan","∑":"som","¤":"valuta"},pl:{"∆":"delta","∞":"nieskonczonosc","♥":"milosc","&":"i","|":"lub","<":"mniejsze niz",">":"wieksze niz","∑":"suma","¤":"waluta"},pt:{"∆":"delta","∞":"infinito","♥":"amor","&":"e","|":"ou","<":"menor que",">":"maior que","∑":"soma","¤":"moeda"},ro:{"∆":"delta","∞":"infinit","♥":"dragoste","&":"si","|":"sau","<":"mai mic ca",">":"mai mare ca","∑":"suma","¤":"valuta"},ru:{"∆":"delta","∞":"beskonechno","♥":"lubov","&":"i","|":"ili","<":"menshe",">":"bolshe","∑":"summa","¤":"valjuta"},sk:{"∆":"delta","∞":"nekonecno","♥":"laska","&":"a","|":"alebo","<":"menej ako",">":"viac ako","∑":"sucet","¤":"mena"},sr:{},tr:{"∆":"delta","∞":"sonsuzluk","♥":"ask","&":"ve","|":"veya","<":"kucuktur",">":"buyuktur","∑":"toplam","¤":"para birimi"},uk:{"∆":"delta","∞":"bezkinechnist","♥":"lubov","&":"i","|":"abo","<":"menshe",">":"bilshe","∑":"suma","¤":"valjuta"},vn:{"∆":"delta","∞":"vo cuc","♥":"yeu","&":"va","|":"hoac","<":"nho hon",">":"lon hon","∑":"tong","¤":"tien te"}},q=[";","?",":","@","&","=","+","$",",","/"].join(""),Y=[";","?",":","@","&","=","+","$",","].join(""),K=[".","!","~","*","'","(",")"].join(""),G=function(se,re){var ne="-",le="",me="",ue=!0,_e={},fe,ge,ye,xe,oe,be,ve,we,Ae,Se,Pe,Re,Le,Fe,Ze="";if(typeof se!="string")return"";if(typeof re=="string"&&(ne=re),ve=U.en,we=j.en,typeof re=="object"){fe=re.maintainCase||!1,_e=re.custom&&typeof re.custom=="object"?re.custom:_e,ye=+re.truncate>1&&re.truncate||!1,xe=re.uric||!1,oe=re.uricNoSlash||!1,be=re.mark||!1,ue=!(re.symbols===!1||re.lang===!1),ne=re.separator||ne,xe&&(Ze+=q),oe&&(Ze+=Y),be&&(Ze+=K),ve=re.lang&&U[re.lang]&&ue?U[re.lang]:ue?U.en:{},we=re.lang&&j[re.lang]?j[re.lang]:re.lang===!1||re.lang===!0?{}:j.en,re.titleCase&&typeof re.titleCase.length=="number"&&Array.prototype.toString.call(re.titleCase)?(re.titleCase.forEach(function(ct){_e[ct+""]=ct+""}),ge=!0):ge=!!re.titleCase,re.custom&&typeof re.custom.length=="number"&&Array.prototype.toString.call(re.custom)&&re.custom.forEach(function(ct){_e[ct+""]=ct+""}),Object.keys(_e).forEach(function(ct){var qe;ct.length>1?qe=new RegExp("\\b"+Z(ct)+"\\b","gi"):qe=new RegExp(Z(ct),"gi"),se=se.replace(qe,_e[ct])});for(Pe in _e)Ze+=Pe}for(Ze+=ne,Ze=Z(Ze),se=se.replace(/(^\s+|\s+$)/g,""),Le=!1,Fe=!1,Se=0,Re=se.length;Se=0?(me+=Pe,Pe=""):Fe===!0?(Pe=B[me]+I[Pe],me=""):Pe=Le&&I[Pe].match(/[A-Za-z0-9]/)?" "+I[Pe]:I[Pe],Le=!1,Fe=!1):Pe in B?(me+=Pe,Pe="",Se===Re-1&&(Pe=B[me]),Fe=!0):ve[Pe]&&!(xe&&q.indexOf(Pe)!==-1)&&!(oe&&Y.indexOf(Pe)!==-1)?(Pe=Le||le.substr(-1).match(/[A-Za-z0-9]/)?ne+ve[Pe]:ve[Pe],Pe+=se[Se+1]!==void 0&&se[Se+1].match(/[A-Za-z0-9]/)?ne:"",Le=!0):(Fe===!0?(Pe=B[me]+Pe,me="",Fe=!1):Le&&(/[A-Za-z0-9]/.test(Pe)||le.substr(-1).match(/A-Za-z0-9]/))&&(Pe=" "+Pe),Le=!1),le+=Pe.replace(new RegExp("[^\\w\\s"+Ze+"_-]","g"),ne);return ge&&(le=le.replace(/(\w)(\S*)/g,function(ct,qe,Ve){var Rt=qe.toUpperCase()+(Ve!==null?Ve:"");return Object.keys(_e).indexOf(Rt.toLowerCase())<0?Rt:Rt.toLowerCase()})),le=le.replace(/\s+/g,ne).replace(new RegExp("\\"+ne+"+","g"),ne).replace(new RegExp("(^\\"+ne+"+|\\"+ne+"+$)","g"),""),ye&&le.length>ye&&(Ae=le.charAt(ye)===ne,le=le.slice(0,ye),Ae||(le=le.slice(0,le.lastIndexOf(ne)))),!fe&&!ge&&(le=le.toLowerCase()),le},J=function(se){return function(ne){return G(ne,se)}},Z=function(se){return se.replace(/[-\\^$*+?.()|[\]{}\/]/g,"\\$&")},ee=function(te,se){for(var re in se)if(se[re]===te)return!0};if(M.exports)M.exports=G,M.exports.createSlug=J;else try{if($.getSlug||$.createSlug)throw"speakingurl: globals exists /(getSlug|createSlug)/";$.getSlug=G,$.createSlug=J}catch{}})(commonjsGlobal)})(speakingurl$1);var speakingurlExports=speakingurl$1.exports,speakingurl=speakingurlExports;const speakingUrl=getDefaultExportFromCjs$1(speakingurl);var Qo,Po,Ao,ka,Ro,il,Ol,Hc,Pl,Wc,Al,qc,Rl,Yc,Dl,Kc,Ml,Gc;class Slug{constructor(){ks(this,Ol);ks(this,Pl);ks(this,Al);ks(this,Rl);ks(this,Dl);ks(this,Ml);$l(this,"busy",!1);ks(this,Qo,void 0);ks(this,Po,"-");ks(this,Ao,void 0);ks(this,ka,void 0);ks(this,Ro,void 0);ks(this,il,!1);Zo(this,Ol,Hc).call(this)}separatedBy($){return $&&Oo(this,Po,$),this}in($){return $&&Oo(this,Ao,$),this}async(){return Oo(this,il,!0),Oo(this,ka,_.debounce(function($,I){return Zo(this,Ml,Gc).call(this).then(N=>$(N)).catch(N=>I(N))},300)),this}create($){return Oo(this,Qo,($+"").trim()),Vi(this,il)?Zo(this,Dl,Kc).call(this):Zo(this,Pl,Wc).call(this)}}Qo=new WeakMap,Po=new WeakMap,Ao=new WeakMap,ka=new WeakMap,Ro=new WeakMap,il=new WeakMap,Ol=new WeakSet,Hc=function(){const $=Statamic.$config.get("selectedSite"),N=Statamic.$config.get("sites").find(B=>B.handle===$);Oo(this,Ao,(N==null?void 0:N.lang)??Statamic.$config.get("lang"))},Pl=new WeakSet,Wc=function(){const $=Statamic.$config.get("asciiReplaceExtraSymbols"),I=Statamic.$config.get("charmap");let N=I[Vi(this,Ao)]??{};return N["'"]="",N["’"]="",N[" - "]=" ",N["("]="",N[")"]="",N=$?Zo(this,Al,qc).call(this,N,I):Zo(this,Rl,Yc).call(this,N,I),Vi(this,Po)!=="-"&&(N["-"]=Vi(this,Po)),speakingUrl(Vi(this,Qo),{separator:Vi(this,Po),lang:Vi(this,Ao),custom:N,symbols:$})},Al=new WeakSet,qc=function($,I){return{...$,...I.currency}},Rl=new WeakSet,Yc=function($,I){for(const N in I.currency_short)$[N]="";return $},Dl=new WeakSet,Kc=function(){var $;return Vi(this,Qo)?(this.busy=!0,new Promise((I,N)=>Vi(this,ka).call(this,I,N))):(($=Vi(this,Ro))==null||$.abort(),Vi(this,ka).cancel(),this.busy=!1,Promise.resolve(""))},Ml=new WeakSet,Gc=function(){const $={string:Vi(this,Qo),separator:Vi(this,Po),language:Vi(this,Ao)};Vi(this,Ro)&&Vi(this,Ro).abort(),Oo(this,Ro,new AbortController);let I=!1;return axios$2.post(cp_url("slug"),$,{signal:Vi(this,Ro).signal}).then(N=>N.data).catch(N=>{if(axios$2.isCancel(N)){I=!0;return}throw N}).finally(()=>{I||(this.busy=!1)})};class Manager{make(){return new Slug}create($){return this.make().create($)}separatedBy($){return this.make().separatedBy($)}in($){return this.make().in($)}async(){return this.make().async()}}const echo=new Echo,bard=new Bard,keys$1=new Keys,hooks$1=new Hooks$1,reveal=new Reveal,components=new Components,conditions=new FieldConditions$1,callbacks=new Callbacks,slug=new Manager,Statamic$1=new Vue$3({data(){return{bootingCallbacks:[],bootedCallbacks:[],darkMode:null}},computed:{$callbacks(){return callbacks},$components(){return components},$request(){return this.$axios},$echo(){return echo},$bard(){return bard},$hooks(){return hooks$1},$reveal(){return reveal},$conditions(){return conditions},$keys(){return keys$1},$slug(){return slug},user(){return this.$config.get("user")}},methods:{booting(M){this.bootingCallbacks.push(M)},booted(M){this.bootedCallbacks.push(M)},app(M){this.$app=M},config(M){this.$store.commit("statamic/config",M)},start(){this.bootingCallbacks.forEach(M=>M(this)),this.bootingCallbacks=[],this.$app=new Vue$3(this.$app),this.$components.$root=this.$app,this.bootedCallbacks.forEach(M=>M(this)),this.bootedCallbacks=[]},component(M,$){Vue$3.component(M,$)}}});var flushPending=!1,flushing=!1,queue=[],lastFlushedIndex=-1;function scheduler(M){queueJob(M)}function queueJob(M){queue.includes(M)||queue.push(M),queueFlush()}function dequeueJob(M){let $=queue.indexOf(M);$!==-1&&$>lastFlushedIndex&&queue.splice($,1)}function queueFlush(){!flushing&&!flushPending&&(flushPending=!0,queueMicrotask(flushJobs))}function flushJobs(){flushPending=!1,flushing=!0;for(let M=0;MM.effect($,{scheduler:I=>{shouldSchedule?scheduler(I):I()}}),raw=M.raw}function overrideEffect(M){effect=M}function elementBoundEffect(M){let $=()=>{};return[N=>{let B=effect(N);return M._x_effects||(M._x_effects=new Set,M._x_runEffects=()=>{M._x_effects.forEach(j=>j())}),M._x_effects.add(B),$=()=>{B!==void 0&&(M._x_effects.delete(B),release(B))},B},()=>{$()}]}var onAttributeAddeds=[],onElRemoveds=[],onElAddeds=[];function onElAdded(M){onElAddeds.push(M)}function onElRemoved(M,$){typeof $=="function"?(M._x_cleanups||(M._x_cleanups=[]),M._x_cleanups.push($)):($=M,onElRemoveds.push($))}function onAttributesAdded(M){onAttributeAddeds.push(M)}function onAttributeRemoved(M,$,I){M._x_attributeCleanups||(M._x_attributeCleanups={}),M._x_attributeCleanups[$]||(M._x_attributeCleanups[$]=[]),M._x_attributeCleanups[$].push(I)}function cleanupAttributes(M,$){M._x_attributeCleanups&&Object.entries(M._x_attributeCleanups).forEach(([I,N])=>{($===void 0||$.includes(I))&&(N.forEach(B=>B()),delete M._x_attributeCleanups[I])})}var observer=new MutationObserver(onMutate),currentlyObserving=!1;function startObservingMutations(){observer.observe(document,{subtree:!0,childList:!0,attributes:!0,attributeOldValue:!0}),currentlyObserving=!0}function stopObservingMutations(){flushObserver(),observer.disconnect(),currentlyObserving=!1}var recordQueue=[],willProcessRecordQueue=!1;function flushObserver(){recordQueue=recordQueue.concat(observer.takeRecords()),recordQueue.length&&!willProcessRecordQueue&&(willProcessRecordQueue=!0,queueMicrotask(()=>{processRecordQueue(),willProcessRecordQueue=!1}))}function processRecordQueue(){onMutate(recordQueue),recordQueue.length=0}function mutateDom(M){if(!currentlyObserving)return M();stopObservingMutations();let $=M();return startObservingMutations(),$}var isCollecting=!1,deferredMutations=[];function deferMutations(){isCollecting=!0}function flushAndStopDeferringMutations(){isCollecting=!1,onMutate(deferredMutations),deferredMutations=[]}function onMutate(M){if(isCollecting){deferredMutations=deferredMutations.concat(M);return}let $=[],I=[],N=new Map,B=new Map;for(let j=0;jU.nodeType===1&&$.push(U)),M[j].removedNodes.forEach(U=>U.nodeType===1&&I.push(U))),M[j].type==="attributes")){let U=M[j].target,q=M[j].attributeName,Y=M[j].oldValue,K=()=>{N.has(U)||N.set(U,[]),N.get(U).push({name:q,value:U.getAttribute(q)})},G=()=>{B.has(U)||B.set(U,[]),B.get(U).push(q)};U.hasAttribute(q)&&Y===null?K():U.hasAttribute(q)?(G(),K()):G()}B.forEach((j,U)=>{cleanupAttributes(U,j)}),N.forEach((j,U)=>{onAttributeAddeds.forEach(q=>q(U,j))});for(let j of I)if(!$.includes(j)&&(onElRemoveds.forEach(U=>U(j)),j._x_cleanups))for(;j._x_cleanups.length;)j._x_cleanups.pop()();$.forEach(j=>{j._x_ignoreSelf=!0,j._x_ignore=!0});for(let j of $)I.includes(j)||j.isConnected&&(delete j._x_ignoreSelf,delete j._x_ignore,onElAddeds.forEach(U=>U(j)),j._x_ignore=!0,j._x_ignoreSelf=!0);$.forEach(j=>{delete j._x_ignoreSelf,delete j._x_ignore}),$=null,I=null,N=null,B=null}function scope(M){return mergeProxies(closestDataStack(M))}function addScopeToNode(M,$,I){return M._x_dataStack=[$,...closestDataStack(I||M)],()=>{M._x_dataStack=M._x_dataStack.filter(N=>N!==$)}}function refreshScope(M,$){let I=M._x_dataStack[0];Object.entries($).forEach(([N,B])=>{I[N]=B})}function closestDataStack(M){return M._x_dataStack?M._x_dataStack:typeof ShadowRoot=="function"&&M instanceof ShadowRoot?closestDataStack(M.host):M.parentNode?closestDataStack(M.parentNode):[]}function mergeProxies(M){let $=new Proxy({},{ownKeys:()=>Array.from(new Set(M.flatMap(I=>Object.keys(I)))),has:(I,N)=>M.some(B=>B.hasOwnProperty(N)),get:(I,N)=>(M.find(B=>{if(B.hasOwnProperty(N)){let j=Object.getOwnPropertyDescriptor(B,N);if(j.get&&j.get._x_alreadyBound||j.set&&j.set._x_alreadyBound)return!0;if((j.get||j.set)&&j.enumerable){let U=j.get,q=j.set,Y=j;U=U&&U.bind($),q=q&&q.bind($),U&&(U._x_alreadyBound=!0),q&&(q._x_alreadyBound=!0),Object.defineProperty(B,N,{...Y,get:U,set:q})}return!0}return!1})||{})[N],set:(I,N,B)=>{let j=M.find(U=>U.hasOwnProperty(N));return j?j[N]=B:M[M.length-1][N]=B,!0}});return $}function initInterceptors(M){let $=N=>typeof N=="object"&&!Array.isArray(N)&&N!==null,I=(N,B="")=>{Object.entries(Object.getOwnPropertyDescriptors(N)).forEach(([j,{value:U,enumerable:q}])=>{if(q===!1||U===void 0)return;let Y=B===""?j:`${B}.${j}`;typeof U=="object"&&U!==null&&U._x_interceptor?N[j]=U.initialize(M,Y,j):$(U)&&U!==N&&!(U instanceof Element)&&I(U,Y)})};return I(M)}function interceptor(M,$=()=>{}){let I={initialValue:void 0,_x_interceptor:!0,initialize(N,B,j){return M(this.initialValue,()=>get$3(N,B),U=>set$2(N,B,U),B,j)}};return $(I),N=>{if(typeof N=="object"&&N!==null&&N._x_interceptor){let B=I.initialize.bind(I);I.initialize=(j,U,q)=>{let Y=N.initialize(j,U,q);return I.initialValue=Y,B(j,U,q)}}else I.initialValue=N;return I}}function get$3(M,$){return $.split(".").reduce((I,N)=>I[N],M)}function set$2(M,$,I){if(typeof $=="string"&&($=$.split(".")),$.length===1)M[$[0]]=I;else{if($.length===0)throw error;return M[$[0]]||(M[$[0]]={}),set$2(M[$[0]],$.slice(1),I)}}var magics={};function magic(M,$){magics[M]=$}function injectMagics(M,$){return Object.entries(magics).forEach(([I,N])=>{Object.defineProperty(M,`$${I}`,{get(){let[B,j]=getElementBoundUtilities($);return B={interceptor,...B},onElRemoved($,j),N($,B)},enumerable:!1})}),M}function tryCatch(M,$,I,...N){try{return I(...N)}catch(B){handleError(B,M,$)}}function handleError(M,$,I=void 0){Object.assign(M,{el:$,expression:I}),console.warn(`Alpine Expression Error: ${M.message} + +${I?'Expression: "'+I+`" + +`:""}`,$),setTimeout(()=>{throw M},0)}var shouldAutoEvaluateFunctions=!0;function dontAutoEvaluateFunctions(M){let $=shouldAutoEvaluateFunctions;shouldAutoEvaluateFunctions=!1,M(),shouldAutoEvaluateFunctions=$}function evaluate(M,$,I={}){let N;return evaluateLater(M,$)(B=>N=B,I),N}function evaluateLater(...M){return theEvaluatorFunction(...M)}var theEvaluatorFunction=normalEvaluator;function setEvaluator(M){theEvaluatorFunction=M}function normalEvaluator(M,$){let I={};injectMagics(I,M);let N=[I,...closestDataStack(M)],B=typeof $=="function"?generateEvaluatorFromFunction(N,$):generateEvaluatorFromString(N,$,M);return tryCatch.bind(null,M,$,B)}function generateEvaluatorFromFunction(M,$){return(I=()=>{},{scope:N={},params:B=[]}={})=>{let j=$.apply(mergeProxies([N,...M]),B);runIfTypeOfFunction(I,j)}}var evaluatorMemo={};function generateFunctionFromString(M,$){if(evaluatorMemo[M])return evaluatorMemo[M];let I=Object.getPrototypeOf(async function(){}).constructor,N=/^[\n\s]*if.*\(.*\)/.test(M)||/^(let|const)\s/.test(M)?`(async()=>{ ${M} })()`:M,j=(()=>{try{return new I(["__self","scope"],`with (scope) { __self.result = ${N} }; __self.finished = true; return __self.result;`)}catch(U){return handleError(U,$,M),Promise.resolve()}})();return evaluatorMemo[M]=j,j}function generateEvaluatorFromString(M,$,I){let N=generateFunctionFromString($,I);return(B=()=>{},{scope:j={},params:U=[]}={})=>{N.result=void 0,N.finished=!1;let q=mergeProxies([j,...M]);if(typeof N=="function"){let Y=N(N,q).catch(K=>handleError(K,I,$));N.finished?(runIfTypeOfFunction(B,N.result,q,U,I),N.result=void 0):Y.then(K=>{runIfTypeOfFunction(B,K,q,U,I)}).catch(K=>handleError(K,I,$)).finally(()=>N.result=void 0)}}}function runIfTypeOfFunction(M,$,I,N,B){if(shouldAutoEvaluateFunctions&&typeof $=="function"){let j=$.apply(I,N);j instanceof Promise?j.then(U=>runIfTypeOfFunction(M,U,I,N)).catch(U=>handleError(U,B,$)):M(j)}else typeof $=="object"&&$ instanceof Promise?$.then(j=>M(j)):M($)}var prefixAsString="x-";function prefix(M=""){return prefixAsString+M}function setPrefix(M){prefixAsString=M}var directiveHandlers={};function directive$1(M,$){return directiveHandlers[M]=$,{before(I){if(!directiveHandlers[I]){console.warn("Cannot find directive `${directive}`. `${name}` will use the default order of execution");return}const N=directiveOrder.indexOf(I);directiveOrder.splice(N>=0?N:directiveOrder.indexOf("DEFAULT"),0,M)}}}function directives$1(M,$,I){if($=Array.from($),M._x_virtualDirectives){let j=Object.entries(M._x_virtualDirectives).map(([q,Y])=>({name:q,value:Y})),U=attributesOnly(j);j=j.map(q=>U.find(Y=>Y.name===q.name)?{name:`x-bind:${q.name}`,value:`"${q.value}"`}:q),$=$.concat(j)}let N={};return $.map(toTransformedAttributes((j,U)=>N[j]=U)).filter(outNonAlpineAttributes).map(toParsedDirectives(N,I)).sort(byPriority).map(j=>getDirectiveHandler(M,j))}function attributesOnly(M){return Array.from(M).map(toTransformedAttributes()).filter($=>!outNonAlpineAttributes($))}var isDeferringHandlers=!1,directiveHandlerStacks=new Map,currentHandlerStackKey=Symbol();function deferHandlingDirectives(M){isDeferringHandlers=!0;let $=Symbol();currentHandlerStackKey=$,directiveHandlerStacks.set($,[]);let I=()=>{for(;directiveHandlerStacks.get($).length;)directiveHandlerStacks.get($).shift()();directiveHandlerStacks.delete($)},N=()=>{isDeferringHandlers=!1,I()};M(I),N()}function getElementBoundUtilities(M){let $=[],I=q=>$.push(q),[N,B]=elementBoundEffect(M);return $.push(B),[{Alpine:alpine_default,effect:N,cleanup:I,evaluateLater:evaluateLater.bind(evaluateLater,M),evaluate:evaluate.bind(evaluate,M)},()=>$.forEach(q=>q())]}function getDirectiveHandler(M,$){let I=()=>{},N=directiveHandlers[$.type]||I,[B,j]=getElementBoundUtilities(M);onAttributeRemoved(M,$.original,j);let U=()=>{M._x_ignore||M._x_ignoreSelf||(N.inline&&N.inline(M,$,B),N=N.bind(N,M,$,B),isDeferringHandlers?directiveHandlerStacks.get(currentHandlerStackKey).push(N):N())};return U.runCleanups=j,U}var startingWith=(M,$)=>({name:I,value:N})=>(I.startsWith(M)&&(I=I.replace(M,$)),{name:I,value:N}),into=M=>M;function toTransformedAttributes(M=()=>{}){return({name:$,value:I})=>{let{name:N,value:B}=attributeTransformers.reduce((j,U)=>U(j),{name:$,value:I});return N!==$&&M(N,$),{name:N,value:B}}}var attributeTransformers=[];function mapAttributes(M){attributeTransformers.push(M)}function outNonAlpineAttributes({name:M}){return alpineAttributeRegex().test(M)}var alpineAttributeRegex=()=>new RegExp(`^${prefixAsString}([^:^.]+)\\b`);function toParsedDirectives(M,$){return({name:I,value:N})=>{let B=I.match(alpineAttributeRegex()),j=I.match(/:([a-zA-Z0-9\-:]+)/),U=I.match(/\.[^.\]]+(?=[^\]]*$)/g)||[],q=$||M[I]||I;return{type:B?B[1]:null,value:j?j[1]:null,modifiers:U.map(Y=>Y.replace(".","")),expression:N,original:q}}}var DEFAULT="DEFAULT",directiveOrder=["ignore","ref","data","id","bind","init","for","model","modelable","transition","show","if",DEFAULT,"teleport"];function byPriority(M,$){let I=directiveOrder.indexOf(M.type)===-1?DEFAULT:M.type,N=directiveOrder.indexOf($.type)===-1?DEFAULT:$.type;return directiveOrder.indexOf(I)-directiveOrder.indexOf(N)}function dispatch(M,$,I={}){M.dispatchEvent(new CustomEvent($,{detail:I,bubbles:!0,composed:!0,cancelable:!0}))}function walk(M,$){if(typeof ShadowRoot=="function"&&M instanceof ShadowRoot){Array.from(M.children).forEach(B=>walk(B,$));return}let I=!1;if($(M,()=>I=!0),I)return;let N=M.firstElementChild;for(;N;)walk(N,$),N=N.nextElementSibling}function warn$3(M,...$){console.warn(`Alpine Warning: ${M}`,...$)}function start(){document.body||warn$3("Unable to initialize. Trying to load Alpine before `` is available. Did you forget to add `defer` in Alpine's `