From 60cf15a482b9dc0ccd1555d94308759e6767c351 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=2E=20Nagy=20Gerg=C5=91?= Date: Fri, 10 May 2024 11:46:00 +0200 Subject: [PATCH] media improvements --- composer.lock | 376 +++++++++--------- .../{app-85a0d71c.js => app-274d084e.js} | 2 +- public/build/assets/app-2f30f4db.js | 1 - public/build/assets/app-a1ae10d8.js | 1 + public/build/assets/chart-92c4939f.js | 1 + public/build/assets/chart-b2b6bf5e.js | 1 - public/build/assets/dropdown-92c4939f.js | 1 + public/build/assets/dropdown-b2b6bf5e.js | 1 - public/build/assets/editor-92c4939f.js | 1 + public/build/assets/editor-b2b6bf5e.js | 1 - public/build/assets/media-manager-92c4939f.js | 1 + public/build/assets/media-manager-b2b6bf5e.js | 1 - public/build/assets/repeater-92c4939f.js | 1 + public/build/assets/repeater-b2b6bf5e.js | 1 - public/build/assets/table-92c4939f.js | 1 + public/build/assets/table-b2b6bf5e.js | 1 - public/build/manifest.json | 16 +- resources/js/media-manager.js | 19 + resources/views/filters/search.blade.php | 5 +- resources/views/media/manager.blade.php | 32 +- src/Fields/File.php | 20 +- src/Filters/Search.php | 2 +- src/Filters/SearchField.php | 2 +- src/Models/Medium.php | 13 +- src/Policies/MediumPolicy.php | 65 +++ src/Root.php | 2 +- src/RootServiceProvider.php | 4 + 27 files changed, 342 insertions(+), 230 deletions(-) rename public/build/assets/{app-85a0d71c.js => app-274d084e.js} (99%) delete mode 100644 public/build/assets/app-2f30f4db.js create mode 100644 public/build/assets/app-a1ae10d8.js create mode 100644 public/build/assets/chart-92c4939f.js delete mode 100644 public/build/assets/chart-b2b6bf5e.js create mode 100644 public/build/assets/dropdown-92c4939f.js delete mode 100644 public/build/assets/dropdown-b2b6bf5e.js create mode 100644 public/build/assets/editor-92c4939f.js delete mode 100644 public/build/assets/editor-b2b6bf5e.js create mode 100644 public/build/assets/media-manager-92c4939f.js delete mode 100644 public/build/assets/media-manager-b2b6bf5e.js create mode 100644 public/build/assets/repeater-92c4939f.js delete mode 100644 public/build/assets/repeater-b2b6bf5e.js create mode 100644 public/build/assets/table-92c4939f.js delete mode 100644 public/build/assets/table-b2b6bf5e.js create mode 100644 src/Policies/MediumPolicy.php diff --git a/composer.lock b/composer.lock index d38613f5..0307b711 100644 --- a/composer.lock +++ b/composer.lock @@ -8,25 +8,25 @@ "packages": [ { "name": "brick/math", - "version": "0.11.0", + "version": "0.12.1", "source": { "type": "git", "url": "https://github.com/brick/math.git", - "reference": "0ad82ce168c82ba30d1c01ec86116ab52f589478" + "reference": "f510c0a40911935b77b86859eb5223d58d660df1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/brick/math/zipball/0ad82ce168c82ba30d1c01ec86116ab52f589478", - "reference": "0ad82ce168c82ba30d1c01ec86116ab52f589478", + "url": "https://api.github.com/repos/brick/math/zipball/f510c0a40911935b77b86859eb5223d58d660df1", + "reference": "f510c0a40911935b77b86859eb5223d58d660df1", "shasum": "" }, "require": { - "php": "^8.0" + "php": "^8.1" }, "require-dev": { "php-coveralls/php-coveralls": "^2.2", - "phpunit/phpunit": "^9.0", - "vimeo/psalm": "5.0.0" + "phpunit/phpunit": "^10.1", + "vimeo/psalm": "5.16.0" }, "type": "library", "autoload": { @@ -46,12 +46,17 @@ "arithmetic", "bigdecimal", "bignum", + "bignumber", "brick", - "math" + "decimal", + "integer", + "math", + "mathematics", + "rational" ], "support": { "issues": "https://github.com/brick/math/issues", - "source": "https://github.com/brick/math/tree/0.11.0" + "source": "https://github.com/brick/math/tree/0.12.1" }, "funding": [ { @@ -59,7 +64,7 @@ "type": "github" } ], - "time": "2023-01-15T23:15:59+00:00" + "time": "2023-11-29T23:19:16+00:00" }, { "name": "carbonphp/carbon-doctrine-types", @@ -1047,16 +1052,16 @@ }, { "name": "laravel/framework", - "version": "v11.5.0", + "version": "v11.7.0", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "e3c24268f1404805e15099b9f035fe310cb30753" + "reference": "e5ac72f513f635f208024aa76b8a04efc1b47f93" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/e3c24268f1404805e15099b9f035fe310cb30753", - "reference": "e3c24268f1404805e15099b9f035fe310cb30753", + "url": "https://api.github.com/repos/laravel/framework/zipball/e5ac72f513f635f208024aa76b8a04efc1b47f93", + "reference": "e5ac72f513f635f208024aa76b8a04efc1b47f93", "shasum": "" }, "require": { @@ -1159,7 +1164,7 @@ "league/flysystem-sftp-v3": "^3.0", "mockery/mockery": "^1.6", "nyholm/psr7": "^1.2", - "orchestra/testbench-core": "^9.0.6", + "orchestra/testbench-core": "^9.0.15", "pda/pheanstalk": "^5.0", "phpstan/phpstan": "^1.4.7", "phpunit/phpunit": "^10.5|^11.0", @@ -1248,20 +1253,20 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2024-04-23T15:11:31+00:00" + "time": "2024-05-07T13:41:51+00:00" }, { "name": "laravel/prompts", - "version": "v0.1.20", + "version": "v0.1.21", "source": { "type": "git", "url": "https://github.com/laravel/prompts.git", - "reference": "bf9a360c484976692de0f3792f30066f4f4b34a2" + "reference": "23ea808e8a145653e0ab29e30d4385e49f40a920" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/prompts/zipball/bf9a360c484976692de0f3792f30066f4f4b34a2", - "reference": "bf9a360c484976692de0f3792f30066f4f4b34a2", + "url": "https://api.github.com/repos/laravel/prompts/zipball/23ea808e8a145653e0ab29e30d4385e49f40a920", + "reference": "23ea808e8a145653e0ab29e30d4385e49f40a920", "shasum": "" }, "require": { @@ -1301,11 +1306,12 @@ "license": [ "MIT" ], + "description": "Add beautiful and user-friendly forms to your command-line applications.", "support": { "issues": "https://github.com/laravel/prompts/issues", - "source": "https://github.com/laravel/prompts/tree/v0.1.20" + "source": "https://github.com/laravel/prompts/tree/v0.1.21" }, - "time": "2024-04-18T00:45:25+00:00" + "time": "2024-04-30T12:46:16+00:00" }, { "name": "laravel/serializable-closure", @@ -1863,16 +1869,16 @@ }, { "name": "nesbot/carbon", - "version": "3.3.0", + "version": "3.3.1", "source": { "type": "git", "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "7219739c4e01d4680c980545821733b6ed8ee880" + "reference": "8ff64b92c1b1ec84fcde9f8bb9ff2ca34cb8a77a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/7219739c4e01d4680c980545821733b6ed8ee880", - "reference": "7219739c4e01d4680c980545821733b6ed8ee880", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/8ff64b92c1b1ec84fcde9f8bb9ff2ca34cb8a77a", + "reference": "8ff64b92c1b1ec84fcde9f8bb9ff2ca34cb8a77a", "shasum": "" }, "require": { @@ -1965,7 +1971,7 @@ "type": "tidelift" } ], - "time": "2024-04-18T16:35:06+00:00" + "time": "2024-05-01T06:54:22+00:00" }, { "name": "nette/schema", @@ -2483,20 +2489,20 @@ }, { "name": "psr/http-factory", - "version": "1.0.2", + "version": "1.1.0", "source": { "type": "git", "url": "https://github.com/php-fig/http-factory.git", - "reference": "e616d01114759c4c489f93b099585439f795fe35" + "reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-factory/zipball/e616d01114759c4c489f93b099585439f795fe35", - "reference": "e616d01114759c4c489f93b099585439f795fe35", + "url": "https://api.github.com/repos/php-fig/http-factory/zipball/2b4765fddfe3b508ac62f829e852b1501d3f6e8a", + "reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a", "shasum": "" }, "require": { - "php": ">=7.0.0", + "php": ">=7.1", "psr/http-message": "^1.0 || ^2.0" }, "type": "library", @@ -2520,7 +2526,7 @@ "homepage": "https://www.php-fig.org/" } ], - "description": "Common interfaces for PSR-7 HTTP message factories", + "description": "PSR-17: Common interfaces for PSR-7 HTTP message factories", "keywords": [ "factory", "http", @@ -2532,9 +2538,9 @@ "response" ], "support": { - "source": "https://github.com/php-fig/http-factory/tree/1.0.2" + "source": "https://github.com/php-fig/http-factory" }, - "time": "2023-04-10T20:10:41+00:00" + "time": "2024-04-15T12:06:14+00:00" }, { "name": "psr/http-message", @@ -2825,20 +2831,20 @@ }, { "name": "ramsey/uuid", - "version": "4.7.5", + "version": "4.7.6", "source": { "type": "git", "url": "https://github.com/ramsey/uuid.git", - "reference": "5f0df49ae5ad6efb7afa69e6bfab4e5b1e080d8e" + "reference": "91039bc1faa45ba123c4328958e620d382ec7088" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ramsey/uuid/zipball/5f0df49ae5ad6efb7afa69e6bfab4e5b1e080d8e", - "reference": "5f0df49ae5ad6efb7afa69e6bfab4e5b1e080d8e", + "url": "https://api.github.com/repos/ramsey/uuid/zipball/91039bc1faa45ba123c4328958e620d382ec7088", + "reference": "91039bc1faa45ba123c4328958e620d382ec7088", "shasum": "" }, "require": { - "brick/math": "^0.8.8 || ^0.9 || ^0.10 || ^0.11", + "brick/math": "^0.8.8 || ^0.9 || ^0.10 || ^0.11 || ^0.12", "ext-json": "*", "php": "^8.0", "ramsey/collection": "^1.2 || ^2.0" @@ -2901,7 +2907,7 @@ ], "support": { "issues": "https://github.com/ramsey/uuid/issues", - "source": "https://github.com/ramsey/uuid/tree/4.7.5" + "source": "https://github.com/ramsey/uuid/tree/4.7.6" }, "funding": [ { @@ -2913,20 +2919,20 @@ "type": "tidelift" } ], - "time": "2023-11-08T05:53:05+00:00" + "time": "2024-04-27T21:32:50+00:00" }, { "name": "symfony/clock", - "version": "v7.0.5", + "version": "v7.0.7", "source": { "type": "git", "url": "https://github.com/symfony/clock.git", - "reference": "8b9d08887353d627d5f6c3bf3373b398b49051c2" + "reference": "2008671acb4a30b01c453de193cf9c80549ebda6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/clock/zipball/8b9d08887353d627d5f6c3bf3373b398b49051c2", - "reference": "8b9d08887353d627d5f6c3bf3373b398b49051c2", + "url": "https://api.github.com/repos/symfony/clock/zipball/2008671acb4a30b01c453de193cf9c80549ebda6", + "reference": "2008671acb4a30b01c453de193cf9c80549ebda6", "shasum": "" }, "require": { @@ -2971,7 +2977,7 @@ "time" ], "support": { - "source": "https://github.com/symfony/clock/tree/v7.0.5" + "source": "https://github.com/symfony/clock/tree/v7.0.7" }, "funding": [ { @@ -2987,20 +2993,20 @@ "type": "tidelift" } ], - "time": "2024-03-02T12:46:12+00:00" + "time": "2024-04-18T09:29:19+00:00" }, { "name": "symfony/console", - "version": "v7.0.6", + "version": "v7.0.7", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "fde915cd8e7eb99b3d531d3d5c09531429c3f9e5" + "reference": "c981e0e9380ce9f146416bde3150c79197ce9986" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/fde915cd8e7eb99b3d531d3d5c09531429c3f9e5", - "reference": "fde915cd8e7eb99b3d531d3d5c09531429c3f9e5", + "url": "https://api.github.com/repos/symfony/console/zipball/c981e0e9380ce9f146416bde3150c79197ce9986", + "reference": "c981e0e9380ce9f146416bde3150c79197ce9986", "shasum": "" }, "require": { @@ -3064,7 +3070,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v7.0.6" + "source": "https://github.com/symfony/console/tree/v7.0.7" }, "funding": [ { @@ -3080,20 +3086,20 @@ "type": "tidelift" } ], - "time": "2024-04-01T11:04:53+00:00" + "time": "2024-04-18T09:29:19+00:00" }, { "name": "symfony/css-selector", - "version": "v7.0.3", + "version": "v7.0.7", "source": { "type": "git", "url": "https://github.com/symfony/css-selector.git", - "reference": "ec60a4edf94e63b0556b6a0888548bb400a3a3be" + "reference": "b08a4ad89e84b29cec285b7b1f781a7ae51cf4bc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/css-selector/zipball/ec60a4edf94e63b0556b6a0888548bb400a3a3be", - "reference": "ec60a4edf94e63b0556b6a0888548bb400a3a3be", + "url": "https://api.github.com/repos/symfony/css-selector/zipball/b08a4ad89e84b29cec285b7b1f781a7ae51cf4bc", + "reference": "b08a4ad89e84b29cec285b7b1f781a7ae51cf4bc", "shasum": "" }, "require": { @@ -3129,7 +3135,7 @@ "description": "Converts CSS selectors to XPath expressions", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/css-selector/tree/v7.0.3" + "source": "https://github.com/symfony/css-selector/tree/v7.0.7" }, "funding": [ { @@ -3145,20 +3151,20 @@ "type": "tidelift" } ], - "time": "2024-01-23T15:02:46+00:00" + "time": "2024-04-18T09:29:19+00:00" }, { "name": "symfony/deprecation-contracts", - "version": "v3.4.0", + "version": "v3.5.0", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "7c3aff79d10325257a001fcf92d991f24fc967cf" + "reference": "0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/7c3aff79d10325257a001fcf92d991f24fc967cf", - "reference": "7c3aff79d10325257a001fcf92d991f24fc967cf", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1", + "reference": "0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1", "shasum": "" }, "require": { @@ -3167,7 +3173,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "3.4-dev" + "dev-main": "3.5-dev" }, "thanks": { "name": "symfony/contracts", @@ -3196,7 +3202,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v3.4.0" + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.5.0" }, "funding": [ { @@ -3212,20 +3218,20 @@ "type": "tidelift" } ], - "time": "2023-05-23T14:45:45+00:00" + "time": "2024-04-18T09:32:20+00:00" }, { "name": "symfony/error-handler", - "version": "v7.0.6", + "version": "v7.0.7", "source": { "type": "git", "url": "https://github.com/symfony/error-handler.git", - "reference": "46a4cc138f799886d4bd70477c55c699d3e9dfc8" + "reference": "cf97429887e40480c847bfeb6c3991e1e2c086ab" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/error-handler/zipball/46a4cc138f799886d4bd70477c55c699d3e9dfc8", - "reference": "46a4cc138f799886d4bd70477c55c699d3e9dfc8", + "url": "https://api.github.com/repos/symfony/error-handler/zipball/cf97429887e40480c847bfeb6c3991e1e2c086ab", + "reference": "cf97429887e40480c847bfeb6c3991e1e2c086ab", "shasum": "" }, "require": { @@ -3271,7 +3277,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.0.6" + "source": "https://github.com/symfony/error-handler/tree/v7.0.7" }, "funding": [ { @@ -3287,20 +3293,20 @@ "type": "tidelift" } ], - "time": "2024-03-19T11:57:22+00:00" + "time": "2024-04-18T09:29:19+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v7.0.3", + "version": "v7.0.7", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "834c28d533dd0636f910909d01b9ff45cc094b5e" + "reference": "db2a7fab994d67d92356bb39c367db115d9d30f9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/834c28d533dd0636f910909d01b9ff45cc094b5e", - "reference": "834c28d533dd0636f910909d01b9ff45cc094b5e", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/db2a7fab994d67d92356bb39c367db115d9d30f9", + "reference": "db2a7fab994d67d92356bb39c367db115d9d30f9", "shasum": "" }, "require": { @@ -3351,7 +3357,7 @@ "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/event-dispatcher/tree/v7.0.3" + "source": "https://github.com/symfony/event-dispatcher/tree/v7.0.7" }, "funding": [ { @@ -3367,20 +3373,20 @@ "type": "tidelift" } ], - "time": "2024-01-23T15:02:46+00:00" + "time": "2024-04-18T09:29:19+00:00" }, { "name": "symfony/event-dispatcher-contracts", - "version": "v3.4.2", + "version": "v3.5.0", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher-contracts.git", - "reference": "4e64b49bf370ade88e567de29465762e316e4224" + "reference": "8f93aec25d41b72493c6ddff14e916177c9efc50" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/4e64b49bf370ade88e567de29465762e316e4224", - "reference": "4e64b49bf370ade88e567de29465762e316e4224", + "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/8f93aec25d41b72493c6ddff14e916177c9efc50", + "reference": "8f93aec25d41b72493c6ddff14e916177c9efc50", "shasum": "" }, "require": { @@ -3390,7 +3396,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "3.4-dev" + "dev-main": "3.5-dev" }, "thanks": { "name": "symfony/contracts", @@ -3427,7 +3433,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.4.2" + "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.5.0" }, "funding": [ { @@ -3443,20 +3449,20 @@ "type": "tidelift" } ], - "time": "2024-01-23T14:51:35+00:00" + "time": "2024-04-18T09:32:20+00:00" }, { "name": "symfony/finder", - "version": "v7.0.0", + "version": "v7.0.7", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "6e5688d69f7cfc4ed4a511e96007e06c2d34ce56" + "reference": "4d58f0f4fe95a30d7b538d71197135483560b97c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/6e5688d69f7cfc4ed4a511e96007e06c2d34ce56", - "reference": "6e5688d69f7cfc4ed4a511e96007e06c2d34ce56", + "url": "https://api.github.com/repos/symfony/finder/zipball/4d58f0f4fe95a30d7b538d71197135483560b97c", + "reference": "4d58f0f4fe95a30d7b538d71197135483560b97c", "shasum": "" }, "require": { @@ -3491,7 +3497,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v7.0.0" + "source": "https://github.com/symfony/finder/tree/v7.0.7" }, "funding": [ { @@ -3507,20 +3513,20 @@ "type": "tidelift" } ], - "time": "2023-10-31T17:59:56+00:00" + "time": "2024-04-28T11:44:19+00:00" }, { "name": "symfony/http-foundation", - "version": "v7.0.6", + "version": "v7.0.7", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "8789625dcf36e5fbf753014678a1e090f1bc759c" + "reference": "0194e064b8bdc29381462f790bab04e1cac8fdc8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/8789625dcf36e5fbf753014678a1e090f1bc759c", - "reference": "8789625dcf36e5fbf753014678a1e090f1bc759c", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/0194e064b8bdc29381462f790bab04e1cac8fdc8", + "reference": "0194e064b8bdc29381462f790bab04e1cac8fdc8", "shasum": "" }, "require": { @@ -3568,7 +3574,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.0.6" + "source": "https://github.com/symfony/http-foundation/tree/v7.0.7" }, "funding": [ { @@ -3584,20 +3590,20 @@ "type": "tidelift" } ], - "time": "2024-03-19T11:46:48+00:00" + "time": "2024-04-18T09:29:19+00:00" }, { "name": "symfony/http-kernel", - "version": "v7.0.6", + "version": "v7.0.7", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "34c872391046d59af804af62d4573b829cfe4824" + "reference": "e07bb9bd86e7cd8ba2d3d9c618eec9d1bbe06d25" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/34c872391046d59af804af62d4573b829cfe4824", - "reference": "34c872391046d59af804af62d4573b829cfe4824", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/e07bb9bd86e7cd8ba2d3d9c618eec9d1bbe06d25", + "reference": "e07bb9bd86e7cd8ba2d3d9c618eec9d1bbe06d25", "shasum": "" }, "require": { @@ -3651,6 +3657,7 @@ "symfony/translation-contracts": "^2.5|^3", "symfony/uid": "^6.4|^7.0", "symfony/validator": "^6.4|^7.0", + "symfony/var-dumper": "^6.4|^7.0", "symfony/var-exporter": "^6.4|^7.0", "twig/twig": "^3.0.4" }, @@ -3680,7 +3687,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.0.6" + "source": "https://github.com/symfony/http-kernel/tree/v7.0.7" }, "funding": [ { @@ -3696,20 +3703,20 @@ "type": "tidelift" } ], - "time": "2024-04-03T06:12:25+00:00" + "time": "2024-04-29T12:20:25+00:00" }, { "name": "symfony/mailer", - "version": "v7.0.6", + "version": "v7.0.7", "source": { "type": "git", "url": "https://github.com/symfony/mailer.git", - "reference": "eb0c3187c7ddfde12d8aa0e1fa5fb29e730a41e0" + "reference": "4ff41a7c7998a88cfdc31b5841ef64d9246fc56a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mailer/zipball/eb0c3187c7ddfde12d8aa0e1fa5fb29e730a41e0", - "reference": "eb0c3187c7ddfde12d8aa0e1fa5fb29e730a41e0", + "url": "https://api.github.com/repos/symfony/mailer/zipball/4ff41a7c7998a88cfdc31b5841ef64d9246fc56a", + "reference": "4ff41a7c7998a88cfdc31b5841ef64d9246fc56a", "shasum": "" }, "require": { @@ -3760,7 +3767,7 @@ "description": "Helps sending emails", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/mailer/tree/v7.0.6" + "source": "https://github.com/symfony/mailer/tree/v7.0.7" }, "funding": [ { @@ -3776,20 +3783,20 @@ "type": "tidelift" } ], - "time": "2024-03-28T09:20:36+00:00" + "time": "2024-04-18T09:29:19+00:00" }, { "name": "symfony/mime", - "version": "v7.0.6", + "version": "v7.0.7", "source": { "type": "git", "url": "https://github.com/symfony/mime.git", - "reference": "99362408c9abdf8c7cadcf0529b6fc8b16f5ace2" + "reference": "3adbf110c306546f6f00337f421d2edca0e8d3c0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mime/zipball/99362408c9abdf8c7cadcf0529b6fc8b16f5ace2", - "reference": "99362408c9abdf8c7cadcf0529b6fc8b16f5ace2", + "url": "https://api.github.com/repos/symfony/mime/zipball/3adbf110c306546f6f00337f421d2edca0e8d3c0", + "reference": "3adbf110c306546f6f00337f421d2edca0e8d3c0", "shasum": "" }, "require": { @@ -3844,7 +3851,7 @@ "mime-type" ], "support": { - "source": "https://github.com/symfony/mime/tree/v7.0.6" + "source": "https://github.com/symfony/mime/tree/v7.0.7" }, "funding": [ { @@ -3860,7 +3867,7 @@ "type": "tidelift" } ], - "time": "2024-03-21T19:37:36+00:00" + "time": "2024-04-18T09:29:19+00:00" }, { "name": "symfony/polyfill-ctype", @@ -4575,16 +4582,16 @@ }, { "name": "symfony/process", - "version": "v7.0.4", + "version": "v7.0.7", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "0e7727191c3b71ebec6d529fa0e50a01ca5679e9" + "reference": "3839e56b94dd1dbd13235d27504e66baf23faba0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/0e7727191c3b71ebec6d529fa0e50a01ca5679e9", - "reference": "0e7727191c3b71ebec6d529fa0e50a01ca5679e9", + "url": "https://api.github.com/repos/symfony/process/zipball/3839e56b94dd1dbd13235d27504e66baf23faba0", + "reference": "3839e56b94dd1dbd13235d27504e66baf23faba0", "shasum": "" }, "require": { @@ -4616,7 +4623,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v7.0.4" + "source": "https://github.com/symfony/process/tree/v7.0.7" }, "funding": [ { @@ -4632,20 +4639,20 @@ "type": "tidelift" } ], - "time": "2024-02-22T20:27:20+00:00" + "time": "2024-04-18T09:29:19+00:00" }, { "name": "symfony/routing", - "version": "v7.0.6", + "version": "v7.0.7", "source": { "type": "git", "url": "https://github.com/symfony/routing.git", - "reference": "cded64e5bbf9f31786f1055fcc76718fdd77519c" + "reference": "9f82bf7766ccc9c22ab7aeb9bebb98351483fa5b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/cded64e5bbf9f31786f1055fcc76718fdd77519c", - "reference": "cded64e5bbf9f31786f1055fcc76718fdd77519c", + "url": "https://api.github.com/repos/symfony/routing/zipball/9f82bf7766ccc9c22ab7aeb9bebb98351483fa5b", + "reference": "9f82bf7766ccc9c22ab7aeb9bebb98351483fa5b", "shasum": "" }, "require": { @@ -4697,7 +4704,7 @@ "url" ], "support": { - "source": "https://github.com/symfony/routing/tree/v7.0.6" + "source": "https://github.com/symfony/routing/tree/v7.0.7" }, "funding": [ { @@ -4713,25 +4720,26 @@ "type": "tidelift" } ], - "time": "2024-03-28T21:02:11+00:00" + "time": "2024-04-18T09:29:19+00:00" }, { "name": "symfony/service-contracts", - "version": "v3.4.2", + "version": "v3.5.0", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "11bbf19a0fb7b36345861e85c5768844c552906e" + "reference": "bd1d9e59a81d8fa4acdcea3f617c581f7475a80f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/11bbf19a0fb7b36345861e85c5768844c552906e", - "reference": "11bbf19a0fb7b36345861e85c5768844c552906e", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/bd1d9e59a81d8fa4acdcea3f617c581f7475a80f", + "reference": "bd1d9e59a81d8fa4acdcea3f617c581f7475a80f", "shasum": "" }, "require": { "php": ">=8.1", - "psr/container": "^1.1|^2.0" + "psr/container": "^1.1|^2.0", + "symfony/deprecation-contracts": "^2.5|^3" }, "conflict": { "ext-psr": "<1.1|>=2" @@ -4739,7 +4747,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "3.4-dev" + "dev-main": "3.5-dev" }, "thanks": { "name": "symfony/contracts", @@ -4779,7 +4787,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v3.4.2" + "source": "https://github.com/symfony/service-contracts/tree/v3.5.0" }, "funding": [ { @@ -4795,20 +4803,20 @@ "type": "tidelift" } ], - "time": "2023-12-19T21:51:00+00:00" + "time": "2024-04-18T09:32:20+00:00" }, { "name": "symfony/string", - "version": "v7.0.4", + "version": "v7.0.7", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "f5832521b998b0bec40bee688ad5de98d4cf111b" + "reference": "e405b5424dc2528e02e31ba26b83a79fd4eb8f63" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/f5832521b998b0bec40bee688ad5de98d4cf111b", - "reference": "f5832521b998b0bec40bee688ad5de98d4cf111b", + "url": "https://api.github.com/repos/symfony/string/zipball/e405b5424dc2528e02e31ba26b83a79fd4eb8f63", + "reference": "e405b5424dc2528e02e31ba26b83a79fd4eb8f63", "shasum": "" }, "require": { @@ -4865,7 +4873,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v7.0.4" + "source": "https://github.com/symfony/string/tree/v7.0.7" }, "funding": [ { @@ -4881,20 +4889,20 @@ "type": "tidelift" } ], - "time": "2024-02-01T13:17:36+00:00" + "time": "2024-04-18T09:29:19+00:00" }, { "name": "symfony/translation", - "version": "v7.0.4", + "version": "v7.0.7", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "5b75e872f7d135d7abb4613809fadc8d9f3d30a0" + "reference": "1515e03afaa93e6419aba5d5c9d209159317100b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/5b75e872f7d135d7abb4613809fadc8d9f3d30a0", - "reference": "5b75e872f7d135d7abb4613809fadc8d9f3d30a0", + "url": "https://api.github.com/repos/symfony/translation/zipball/1515e03afaa93e6419aba5d5c9d209159317100b", + "reference": "1515e03afaa93e6419aba5d5c9d209159317100b", "shasum": "" }, "require": { @@ -4959,7 +4967,7 @@ "description": "Provides tools to internationalize your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/translation/tree/v7.0.4" + "source": "https://github.com/symfony/translation/tree/v7.0.7" }, "funding": [ { @@ -4975,20 +4983,20 @@ "type": "tidelift" } ], - "time": "2024-02-22T20:27:20+00:00" + "time": "2024-04-18T09:29:19+00:00" }, { "name": "symfony/translation-contracts", - "version": "v3.4.2", + "version": "v3.5.0", "source": { "type": "git", "url": "https://github.com/symfony/translation-contracts.git", - "reference": "43810bdb2ddb5400e5c5e778e27b210a0ca83b6b" + "reference": "b9d2189887bb6b2e0367a9fc7136c5239ab9b05a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/43810bdb2ddb5400e5c5e778e27b210a0ca83b6b", - "reference": "43810bdb2ddb5400e5c5e778e27b210a0ca83b6b", + "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/b9d2189887bb6b2e0367a9fc7136c5239ab9b05a", + "reference": "b9d2189887bb6b2e0367a9fc7136c5239ab9b05a", "shasum": "" }, "require": { @@ -4997,7 +5005,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "3.4-dev" + "dev-main": "3.5-dev" }, "thanks": { "name": "symfony/contracts", @@ -5037,7 +5045,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/translation-contracts/tree/v3.4.2" + "source": "https://github.com/symfony/translation-contracts/tree/v3.5.0" }, "funding": [ { @@ -5053,20 +5061,20 @@ "type": "tidelift" } ], - "time": "2024-01-23T14:51:35+00:00" + "time": "2024-04-18T09:32:20+00:00" }, { "name": "symfony/uid", - "version": "v7.0.3", + "version": "v7.0.7", "source": { "type": "git", "url": "https://github.com/symfony/uid.git", - "reference": "87cedaf3fabd7b733859d4d77aa4ca598259054b" + "reference": "4f3a5d181999e25918586c8369de09e7814e7be2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/uid/zipball/87cedaf3fabd7b733859d4d77aa4ca598259054b", - "reference": "87cedaf3fabd7b733859d4d77aa4ca598259054b", + "url": "https://api.github.com/repos/symfony/uid/zipball/4f3a5d181999e25918586c8369de09e7814e7be2", + "reference": "4f3a5d181999e25918586c8369de09e7814e7be2", "shasum": "" }, "require": { @@ -5111,7 +5119,7 @@ "uuid" ], "support": { - "source": "https://github.com/symfony/uid/tree/v7.0.3" + "source": "https://github.com/symfony/uid/tree/v7.0.7" }, "funding": [ { @@ -5127,20 +5135,20 @@ "type": "tidelift" } ], - "time": "2024-01-23T15:02:46+00:00" + "time": "2024-04-18T09:29:19+00:00" }, { "name": "symfony/var-dumper", - "version": "v7.0.6", + "version": "v7.0.7", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "66d13dc207d5dab6b4f4c2b5460efe1bea29dbfb" + "reference": "d1627b66fd87c8b4d90cabe5671c29d575690924" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/66d13dc207d5dab6b4f4c2b5460efe1bea29dbfb", - "reference": "66d13dc207d5dab6b4f4c2b5460efe1bea29dbfb", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/d1627b66fd87c8b4d90cabe5671c29d575690924", + "reference": "d1627b66fd87c8b4d90cabe5671c29d575690924", "shasum": "" }, "require": { @@ -5194,7 +5202,7 @@ "dump" ], "support": { - "source": "https://github.com/symfony/var-dumper/tree/v7.0.6" + "source": "https://github.com/symfony/var-dumper/tree/v7.0.7" }, "funding": [ { @@ -5210,7 +5218,7 @@ "type": "tidelift" } ], - "time": "2024-03-19T11:57:22+00:00" + "time": "2024-04-18T09:29:19+00:00" }, { "name": "tijsverkoyen/css-to-inline-styles", @@ -5599,16 +5607,16 @@ }, { "name": "larastan/larastan", - "version": "v2.9.5", + "version": "v2.9.6", "source": { "type": "git", "url": "https://github.com/larastan/larastan.git", - "reference": "101f1a4470f87326f4d3995411d28679d8800abe" + "reference": "93d5b95d2e29cdb8203363d44abfdbc0bc7ef57f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/larastan/larastan/zipball/101f1a4470f87326f4d3995411d28679d8800abe", - "reference": "101f1a4470f87326f4d3995411d28679d8800abe", + "url": "https://api.github.com/repos/larastan/larastan/zipball/93d5b95d2e29cdb8203363d44abfdbc0bc7ef57f", + "reference": "93d5b95d2e29cdb8203363d44abfdbc0bc7ef57f", "shasum": "" }, "require": { @@ -5677,7 +5685,7 @@ ], "support": { "issues": "https://github.com/larastan/larastan/issues", - "source": "https://github.com/larastan/larastan/tree/v2.9.5" + "source": "https://github.com/larastan/larastan/tree/v2.9.6" }, "funding": [ { @@ -5697,20 +5705,20 @@ "type": "patreon" } ], - "time": "2024-04-16T19:13:34+00:00" + "time": "2024-05-09T11:53:26+00:00" }, { "name": "laravel/laravel", - "version": "v11.0.6", + "version": "v11.0.7", "source": { "type": "git", "url": "https://github.com/laravel/laravel.git", - "reference": "3cb22426e1d78c69b7b6630b88a02d9934cac29d" + "reference": "4b1588713d05830f7cdf88159fa3739831d167cb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/laravel/zipball/3cb22426e1d78c69b7b6630b88a02d9934cac29d", - "reference": "3cb22426e1d78c69b7b6630b88a02d9934cac29d", + "url": "https://api.github.com/repos/laravel/laravel/zipball/4b1588713d05830f7cdf88159fa3739831d167cb", + "reference": "4b1588713d05830f7cdf88159fa3739831d167cb", "shasum": "" }, "require": { @@ -5750,22 +5758,22 @@ "laravel" ], "support": { - "source": "https://github.com/laravel/laravel/tree/v11.0.6" + "source": "https://github.com/laravel/laravel/tree/v11.0.7" }, - "time": "2024-04-09T14:13:45+00:00" + "time": "2024-05-03T17:16:26+00:00" }, { "name": "laravel/pint", - "version": "v1.15.2", + "version": "v1.15.3", "source": { "type": "git", "url": "https://github.com/laravel/pint.git", - "reference": "2c9f8004899815f3f0ee3cb28ef7281e2b589134" + "reference": "3600b5d17aff52f6100ea4921849deacbbeb8656" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/pint/zipball/2c9f8004899815f3f0ee3cb28ef7281e2b589134", - "reference": "2c9f8004899815f3f0ee3cb28ef7281e2b589134", + "url": "https://api.github.com/repos/laravel/pint/zipball/3600b5d17aff52f6100ea4921849deacbbeb8656", + "reference": "3600b5d17aff52f6100ea4921849deacbbeb8656", "shasum": "" }, "require": { @@ -5818,7 +5826,7 @@ "issues": "https://github.com/laravel/pint/issues", "source": "https://github.com/laravel/pint" }, - "time": "2024-04-23T15:42:34+00:00" + "time": "2024-04-30T15:02:26+00:00" }, { "name": "laravel/tinker", diff --git a/public/build/assets/app-85a0d71c.js b/public/build/assets/app-274d084e.js similarity index 99% rename from public/build/assets/app-85a0d71c.js rename to public/build/assets/app-274d084e.js index 52ce6dde..e1c06153 100644 --- a/public/build/assets/app-85a0d71c.js +++ b/public/build/assets/app-274d084e.js @@ -142,7 +142,7 @@ img.ProseMirror-separator { `);return!l||!d?!1:i.chain().command(({tr:p})=>(p.delete(r.pos-2,r.pos),!0)).exitCode().run()},ArrowDown:({editor:i})=>{if(!this.options.exitOnArrowDown)return!1;const{state:e}=i,{selection:t,doc:r}=e,{$from:a,empty:l}=t;if(!l||a.parent.type!==this.type||!(a.parentOffset===a.parent.nodeSize-2))return!1;const p=a.after();return p===void 0||r.nodeAt(p)?!1:i.commands.exitCode()}}},addInputRules(){return[Xc({find:fT,type:this.type,getAttributes:i=>({language:i[1]})}),Xc({find:pT,type:this.type,getAttributes:i=>({language:i[1]})})]},addProseMirrorPlugins(){return[new vt({key:new ei("codeBlockVSCodeHandler"),props:{handlePaste:(i,e)=>{if(!e.clipboardData||this.editor.isActive(this.type.name))return!1;const t=e.clipboardData.getData("text/plain"),r=e.clipboardData.getData("vscode-editor-data"),a=r?JSON.parse(r):void 0,l=a==null?void 0:a.mode;if(!t||!l)return!1;const{tr:d}=i.state;return d.replaceSelectionWith(this.type.create({language:l})),d.setSelection(ke.near(d.doc.resolve(Math.max(0,d.selection.from-2)))),d.insertText(t.replace(/\r\n?/g,` `)),d.setMeta("paste",!0),i.dispatch(d),!0}}})]}}),mT=wt.create({name:"doc",topNode:!0,content:"block+"});function xT(i={}){return new vt({view(e){return new bT(e,i)}})}class bT{constructor(e,t){var r;this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=(r=t.width)!==null&&r!==void 0?r:1,this.color=t.color===!1?void 0:t.color||"black",this.class=t.class,this.handlers=["dragover","dragend","drop","dragleave"].map(a=>{let l=d=>{this[a](d)};return e.dom.addEventListener(a,l),{name:a,handler:l}})}destroy(){this.handlers.forEach(({name:e,handler:t})=>this.editorView.dom.removeEventListener(e,t))}update(e,t){this.cursorPos!=null&&t.doc!=e.state.doc&&(this.cursorPos>e.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(e){e!=this.cursorPos&&(this.cursorPos=e,e==null?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let e=this.editorView.state.doc.resolve(this.cursorPos),t=!e.parent.inlineContent,r;if(t){let p=e.nodeBefore,b=e.nodeAfter;if(p||b){let k=this.editorView.nodeDOM(this.cursorPos-(p?p.nodeSize:0));if(k){let A=k.getBoundingClientRect(),L=p?A.bottom:A.top;p&&b&&(L=(L+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2),r={left:A.left,right:A.right,top:L-this.width/2,bottom:L+this.width/2}}}}if(!r){let p=this.editorView.coordsAtPos(this.cursorPos);r={left:p.left-this.width/2,right:p.left+this.width/2,top:p.top,bottom:p.bottom}}let a=this.editorView.dom.offsetParent;this.element||(this.element=a.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",t),this.element.classList.toggle("prosemirror-dropcursor-inline",!t);let l,d;if(!a||a==document.body&&getComputedStyle(a).position=="static")l=-pageXOffset,d=-pageYOffset;else{let p=a.getBoundingClientRect();l=p.left-a.scrollLeft,d=p.top-a.scrollTop}this.element.style.left=r.left-l+"px",this.element.style.top=r.top-d+"px",this.element.style.width=r.right-r.left+"px",this.element.style.height=r.bottom-r.top+"px"}scheduleRemoval(e){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),e)}dragover(e){if(!this.editorView.editable)return;let t=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),r=t&&t.inside>=0&&this.editorView.state.doc.nodeAt(t.inside),a=r&&r.type.spec.disableDropCursor,l=typeof a=="function"?a(this.editorView,t,e):a;if(t&&!l){let d=t.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let p=Tm(this.editorView.state.doc,d,this.editorView.dragging.slice);p!=null&&(d=p)}this.setCursor(d),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){(e.target==this.editorView.dom||!this.editorView.dom.contains(e.relatedTarget))&&this.setCursor(null)}}const yT=yt.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[xT(this.options)]}});class Ve extends Ce{constructor(e){super(e,e)}map(e,t){let r=e.resolve(t.map(this.head));return Ve.valid(r)?new Ve(r):Ce.near(r)}content(){return he.empty}eq(e){return e instanceof Ve&&e.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(e,t){if(typeof t.pos!="number")throw new RangeError("Invalid input for GapCursor.fromJSON");return new Ve(e.resolve(t.pos))}getBookmark(){return new od(this.anchor)}static valid(e){let t=e.parent;if(t.isTextblock||!vT(e)||!wT(e))return!1;let r=t.type.spec.allowGapCursor;if(r!=null)return r;let a=t.contentMatchAt(e.index()).defaultType;return a&&a.isTextblock}static findGapCursorFrom(e,t,r=!1){e:for(;;){if(!r&&Ve.valid(e))return e;let a=e.pos,l=null;for(let d=e.depth;;d--){let p=e.node(d);if(t>0?e.indexAfter(d)0){l=p.child(t>0?e.indexAfter(d):e.index(d)-1);break}else if(d==0)return null;a+=t;let b=e.doc.resolve(a);if(Ve.valid(b))return b}for(;;){let d=t>0?l.firstChild:l.lastChild;if(!d){if(l.isAtom&&!l.isText&&!we.isSelectable(l)){e=e.doc.resolve(a+l.nodeSize*t),r=!1;continue e}break}l=d,a+=t;let p=e.doc.resolve(a);if(Ve.valid(p))return p}return null}}}Ve.prototype.visible=!1;Ve.findFrom=Ve.findGapCursorFrom;Ce.jsonID("gapcursor",Ve);class od{constructor(e){this.pos=e}map(e){return new od(e.map(this.pos))}resolve(e){let t=e.resolve(this.pos);return Ve.valid(t)?new Ve(t):Ce.near(t)}}function vT(i){for(let e=i.depth;e>=0;e--){let t=i.index(e),r=i.node(e);if(t==0){if(r.type.spec.isolating)return!0;continue}for(let a=r.child(t-1);;a=a.lastChild){if(a.childCount==0&&!a.inlineContent||a.isAtom||a.type.spec.isolating)return!0;if(a.inlineContent)return!1}}return!0}function wT(i){for(let e=i.depth;e>=0;e--){let t=i.indexAfter(e),r=i.node(e);if(t==r.childCount){if(r.type.spec.isolating)return!0;continue}for(let a=r.child(t);;a=a.firstChild){if(a.childCount==0&&!a.inlineContent||a.isAtom||a.type.spec.isolating)return!0;if(a.inlineContent)return!1}}return!0}function ST(){return new vt({props:{decorations:ET,createSelectionBetween(i,e,t){return e.pos==t.pos&&Ve.valid(t)?new Ve(t):null},handleClick:AT,handleKeyDown:kT,handleDOMEvents:{beforeinput:CT}}})}const kT=ux({ArrowLeft:js("horiz",-1),ArrowRight:js("horiz",1),ArrowUp:js("vert",-1),ArrowDown:js("vert",1)});function js(i,e){const t=i=="vert"?e>0?"down":"up":e>0?"right":"left";return function(r,a,l){let d=r.selection,p=e>0?d.$to:d.$from,b=d.empty;if(d instanceof ke){if(!l.endOfTextblock(t)||p.depth==0)return!1;b=!1,p=r.doc.resolve(e>0?p.after():p.before())}let k=Ve.findGapCursorFrom(p,e,b);return k?(a&&a(r.tr.setSelection(new Ve(k))),!0):!1}}function AT(i,e,t){if(!i||!i.editable)return!1;let r=i.state.doc.resolve(e);if(!Ve.valid(r))return!1;let a=i.posAtCoords({left:t.clientX,top:t.clientY});return a&&a.inside>-1&&we.isSelectable(i.state.doc.nodeAt(a.inside))?!1:(i.dispatch(i.state.tr.setSelection(new Ve(r))),!0)}function CT(i,e){if(e.inputType!="insertCompositionText"||!(i.state.selection instanceof Ve))return!1;let{$from:t}=i.state.selection,r=t.parent.contentMatchAt(t.index()).findWrapping(i.state.schema.nodes.text);if(!r)return!1;let a=ie.empty;for(let d=r.length-1;d>=0;d--)a=ie.from(r[d].createAndFill(null,a));let l=i.state.tr.replace(t.pos,t.pos,new he(a,0,0));return l.setSelection(ke.near(l.doc.resolve(t.pos+1))),i.dispatch(l),!1}function ET(i){if(!(i.selection instanceof Ve))return null;let e=document.createElement("div");return e.className="ProseMirror-gapcursor",Ke.create(i.doc,[Mt.widget(i.selection.head,e,{key:"gapcursor"})])}const TT=yt.create({name:"gapCursor",addProseMirrorPlugins(){return[ST()]},extendNodeSchema(i){var e;const t={name:i.name,options:i.options,storage:i.storage};return{allowGapCursor:(e=Ae(fe(i,"allowGapCursor",t)))!==null&&e!==void 0?e:null}}}),MT=wt.create({name:"hardBreak",addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:i}){return["br",je(this.options.HTMLAttributes,i)]},renderText(){return` -`},addCommands(){return{setHardBreak:()=>({commands:i,chain:e,state:t,editor:r})=>i.first([()=>i.exitCode(),()=>i.command(()=>{const{selection:a,storedMarks:l}=t;if(a.$from.parent.type.spec.isolating)return!1;const{keepMarks:d}=this.options,{splittableMarks:p}=r.extensionManager,b=l||a.$to.parentOffset&&a.$from.marks();return e().insertContent({type:this.name}).command(({tr:k,dispatch:A})=>{if(A&&b&&d){const L=b.filter(O=>p.includes(O.type.name));k.ensureMarks(L)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),LT=wt.create({name:"heading",addOptions(){return{levels:[1,2,3,4,5,6],HTMLAttributes:{}}},content:"inline*",group:"block",defining:!0,addAttributes(){return{level:{default:1,rendered:!1}}},parseHTML(){return this.options.levels.map(i=>({tag:`h${i}`,attrs:{level:i}}))},renderHTML({node:i,HTMLAttributes:e}){return[`h${this.options.levels.includes(i.attrs.level)?i.attrs.level:this.options.levels[0]}`,je(this.options.HTMLAttributes,e),0]},addCommands(){return{setHeading:i=>({commands:e})=>this.options.levels.includes(i.level)?e.setNode(this.name,i):!1,toggleHeading:i=>({commands:e})=>this.options.levels.includes(i.level)?e.toggleNode(this.name,"paragraph",i):!1}},addKeyboardShortcuts(){return this.options.levels.reduce((i,e)=>({...i,[`Mod-Alt-${e}`]:()=>this.editor.commands.toggleHeading({level:e})}),{})},addInputRules(){return this.options.levels.map(i=>Xc({find:new RegExp(`^(#{1,${i}})\\s$`),type:this.type,getAttributes:{level:i}}))}});var Ua=200,tt=function(){};tt.prototype.append=function(e){return e.length?(e=tt.from(e),!this.length&&e||e.length=t?tt.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,t))};tt.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)};tt.prototype.forEach=function(e,t,r){t===void 0&&(t=0),r===void 0&&(r=this.length),t<=r?this.forEachInner(e,t,r,0):this.forEachInvertedInner(e,t,r,0)};tt.prototype.map=function(e,t,r){t===void 0&&(t=0),r===void 0&&(r=this.length);var a=[];return this.forEach(function(l,d){return a.push(e(l,d))},t,r),a};tt.from=function(e){return e instanceof tt?e:e&&e.length?new Ix(e):tt.empty};var Ix=function(i){function e(r){i.call(this),this.values=r}i&&(e.__proto__=i),e.prototype=Object.create(i&&i.prototype),e.prototype.constructor=e;var t={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(a,l){return a==0&&l==this.length?this:new e(this.values.slice(a,l))},e.prototype.getInner=function(a){return this.values[a]},e.prototype.forEachInner=function(a,l,d,p){for(var b=l;b=d;b--)if(a(this.values[b],p+b)===!1)return!1},e.prototype.leafAppend=function(a){if(this.length+a.length<=Ua)return new e(this.values.concat(a.flatten()))},e.prototype.leafPrepend=function(a){if(this.length+a.length<=Ua)return new e(a.flatten().concat(this.values))},t.length.get=function(){return this.values.length},t.depth.get=function(){return 0},Object.defineProperties(e.prototype,t),e}(tt);tt.empty=new Ix([]);var PT=function(i){function e(t,r){i.call(this),this.left=t,this.right=r,this.length=t.length+r.length,this.depth=Math.max(t.depth,r.depth)+1}return i&&(e.__proto__=i),e.prototype=Object.create(i&&i.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(r){return rp&&this.right.forEachInner(r,Math.max(a-p,0),Math.min(this.length,l)-p,d+p)===!1)return!1},e.prototype.forEachInvertedInner=function(r,a,l,d){var p=this.left.length;if(a>p&&this.right.forEachInvertedInner(r,a-p,Math.max(l,p)-p,d+p)===!1||l=l?this.right.slice(r-l,a-l):this.left.slice(r,l).append(this.right.slice(0,a-l))},e.prototype.leafAppend=function(r){var a=this.right.leafAppend(r);if(a)return new e(this.left,a)},e.prototype.leafPrepend=function(r){var a=this.left.leafPrepend(r);if(a)return new e(a,this.right)},e.prototype.appendInner=function(r){return this.left.depth>=Math.max(this.right.depth,r.depth)+1?new e(this.left,new e(this.right,r)):new e(this,r)},e}(tt);const OT=500;class Dt{constructor(e,t){this.items=e,this.eventCount=t}popEvent(e,t){if(this.eventCount==0)return null;let r=this.items.length;for(;;r--)if(this.items.get(r-1).selection){--r;break}let a,l;t&&(a=this.remapping(r,this.items.length),l=a.maps.length);let d=e.tr,p,b,k=[],A=[];return this.items.forEach((L,O)=>{if(!L.step){a||(a=this.remapping(r,O+1),l=a.maps.length),l--,A.push(L);return}if(a){A.push(new bi(L.map));let z=L.step.map(a.slice(l)),D;z&&d.maybeStep(z).doc&&(D=d.mapping.maps[d.mapping.maps.length-1],k.push(new bi(D,void 0,void 0,k.length+A.length))),l--,D&&a.appendMap(D,l)}else d.maybeStep(L.step);if(L.selection)return p=a?L.selection.map(a.slice(l)):L.selection,b=new Dt(this.items.slice(0,r).append(A.reverse().concat(k)),this.eventCount-1),!1},this.items.length,0),{remaining:b,transform:d,selection:p}}addTransform(e,t,r,a){let l=[],d=this.eventCount,p=this.items,b=!a&&p.length?p.get(p.length-1):null;for(let A=0;AIT&&(p=RT(p,k),d-=k),new Dt(p.append(l),d)}remapping(e,t){let r=new Un;return this.items.forEach((a,l)=>{let d=a.mirrorOffset!=null&&l-a.mirrorOffset>=e?r.maps.length-a.mirrorOffset:void 0;r.appendMap(a.map,d)},e,t),r}addMaps(e){return this.eventCount==0?this:new Dt(this.items.append(e.map(t=>new bi(t))),this.eventCount)}rebased(e,t){if(!this.eventCount)return this;let r=[],a=Math.max(0,this.items.length-t),l=e.mapping,d=e.steps.length,p=this.eventCount;this.items.forEach(O=>{O.selection&&p--},a);let b=t;this.items.forEach(O=>{let z=l.getMirror(--b);if(z==null)return;d=Math.min(d,z);let D=l.maps[z];if(O.step){let X=e.steps[z].invert(e.docs[z]),W=O.selection&&O.selection.map(l.slice(b+1,z));W&&p++,r.push(new bi(D,X,W))}else r.push(new bi(D))},a);let k=[];for(let O=t;OOT&&(L=L.compress(this.items.length-r.length)),L}emptyItemCount(){let e=0;return this.items.forEach(t=>{t.step||e++}),e}compress(e=this.items.length){let t=this.remapping(0,e),r=t.maps.length,a=[],l=0;return this.items.forEach((d,p)=>{if(p>=e)a.push(d),d.selection&&l++;else if(d.step){let b=d.step.map(t.slice(r)),k=b&&b.getMap();if(r--,k&&t.appendMap(k,r),b){let A=d.selection&&d.selection.map(t.slice(r));A&&l++;let L=new bi(k.invert(),b,A),O,z=a.length-1;(O=a.length&&a[z].merge(L))?a[z]=O:a.push(L)}}else d.map&&r--},this.items.length,0),new Dt(tt.from(a.reverse()),l)}}Dt.empty=new Dt(tt.empty,0);function RT(i,e){let t;return i.forEach((r,a)=>{if(r.selection&&e--==0)return t=a,!1}),i.slice(t)}let bi=class Nx{constructor(e,t,r,a){this.map=e,this.step=t,this.selection=r,this.mirrorOffset=a}merge(e){if(this.step&&e.step&&!e.selection){let t=e.step.merge(this.step);if(t)return new Nx(t.getMap().invert(),t,this.selection)}}};class wi{constructor(e,t,r,a,l){this.done=e,this.undone=t,this.prevRanges=r,this.prevTime=a,this.prevComposition=l}}const IT=20;function NT(i,e,t,r){let a=t.getMeta(Fi),l;if(a)return a.historyState;t.getMeta(FT)&&(i=new wi(i.done,i.undone,null,0,-1));let d=t.getMeta("appendedTransaction");if(t.steps.length==0)return i;if(d&&d.getMeta(Fi))return d.getMeta(Fi).redo?new wi(i.done.addTransform(t,void 0,r,oa(e)),i.undone,wf(t.mapping.maps[t.steps.length-1]),i.prevTime,i.prevComposition):new wi(i.done,i.undone.addTransform(t,void 0,r,oa(e)),null,i.prevTime,i.prevComposition);if(t.getMeta("addToHistory")!==!1&&!(d&&d.getMeta("addToHistory")===!1)){let p=t.getMeta("composition"),b=i.prevTime==0||!d&&i.prevComposition!=p&&(i.prevTime<(t.time||0)-r.newGroupDelay||!DT(t,i.prevRanges)),k=d?jl(i.prevRanges,t.mapping):wf(t.mapping.maps[t.steps.length-1]);return new wi(i.done.addTransform(t,b?e.selection.getBookmark():void 0,r,oa(e)),Dt.empty,k,t.time,p??i.prevComposition)}else return(l=t.getMeta("rebased"))?new wi(i.done.rebased(t,l),i.undone.rebased(t,l),jl(i.prevRanges,t.mapping),i.prevTime,i.prevComposition):new wi(i.done.addMaps(t.mapping.maps),i.undone.addMaps(t.mapping.maps),jl(i.prevRanges,t.mapping),i.prevTime,i.prevComposition)}function DT(i,e){if(!e)return!1;if(!i.docChanged)return!0;let t=!1;return i.mapping.maps[0].forEach((r,a)=>{for(let l=0;l=e[l]&&(t=!0)}),t}function wf(i){let e=[];return i.forEach((t,r,a,l)=>e.push(a,l)),e}function jl(i,e){if(!i)return null;let t=[];for(let r=0;r{let t=Fi.getState(i);return!t||t.done.eventCount==0?!1:(e&&Dx(t,i,e,!1),!0)},zx=(i,e)=>{let t=Fi.getState(i);return!t||t.undone.eventCount==0?!1:(e&&Dx(t,i,e,!0),!0)},BT=yt.create({name:"history",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:i,dispatch:e})=>Fx(i,e),redo:()=>({state:i,dispatch:e})=>zx(i,e)}},addProseMirrorPlugins(){return[zT(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Mod-Z":()=>this.editor.commands.undo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-Y":()=>this.editor.commands.redo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Shift-Mod-Z":()=>this.editor.commands.redo(),"Mod-я":()=>this.editor.commands.undo(),"Shift-Mod-я":()=>this.editor.commands.redo()}}}),HT=wt.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{}}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:i}){return["hr",je(this.options.HTMLAttributes,i)]},addCommands(){return{setHorizontalRule:()=>({chain:i,state:e})=>{const{$to:t}=e.selection,r=i();return t.parentOffset===0?r.insertContentAt(Math.max(t.pos-2,0),{type:this.name}):r.insertContent({type:this.name}),r.command(({tr:a,dispatch:l})=>{var d;if(l){const{$to:p}=a.selection,b=p.end();if(p.nodeAfter)p.nodeAfter.isTextblock?a.setSelection(ke.create(a.doc,p.pos+1)):p.nodeAfter.isBlock?a.setSelection(we.create(a.doc,p.pos)):a.setSelection(ke.create(a.doc,p.pos));else{const k=(d=p.parent.type.contentMatch.defaultType)===null||d===void 0?void 0:d.create();k&&(a.insert(b,k),a.setSelection(ke.create(a.doc,b+1)))}a.scrollIntoView()}return!0}).run()}}},addInputRules(){return[Ex({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}}),_T=/(?:^|\s)((?:\*)((?:[^*]+))(?:\*))$/,WT=/(?:^|\s)((?:\*)((?:[^*]+))(?:\*))/g,XT=/(?:^|\s)((?:_)((?:[^_]+))(?:_))$/,YT=/(?:^|\s)((?:_)((?:[^_]+))(?:_))/g,VT=Rt.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:i=>i.style.fontStyle!=="normal"&&null},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:i}){return["em",je(this.options.HTMLAttributes,i),0]},addCommands(){return{setItalic:()=>({commands:i})=>i.setMark(this.name),toggleItalic:()=>({commands:i})=>i.toggleMark(this.name),unsetItalic:()=>({commands:i})=>i.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[Mn({find:_T,type:this.type}),Mn({find:XT,type:this.type})]},addPasteRules(){return[Xi({find:WT,type:this.type}),Xi({find:YT,type:this.type})]}}),jT=wt.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:i}){return["li",je(this.options.HTMLAttributes,i),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),GT=wt.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:i}){return["li",je(this.options.HTMLAttributes,i),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),kf=Rt.create({name:"textStyle",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"span",getAttrs:i=>i.hasAttribute("style")?{}:!1}]},renderHTML({HTMLAttributes:i}){return["span",je(this.options.HTMLAttributes,i),0]},addCommands(){return{removeEmptyTextStyle:()=>({state:i,commands:e})=>{const t=Qo(i,this.type);return Object.entries(t).some(([,a])=>!!a)?!0:e.unsetMark(this.name)}}}}),Af=/^(\d+)\.\s$/,qT=wt.create({name:"orderedList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes(){return{start:{default:1,parseHTML:i=>i.hasAttribute("start")?parseInt(i.getAttribute("start")||"",10):1}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:i}){const{start:e,...t}=i;return e===1?["ol",je(this.options.HTMLAttributes,t),0]:["ol",je(this.options.HTMLAttributes,i),0]},addCommands(){return{toggleOrderedList:()=>({commands:i,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(GT.name,this.editor.getAttributes(kf.name)).run():i.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let i=es({find:Af,type:this.type,getAttributes:e=>({start:+e[1]}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(i=es({find:Af,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:e=>({start:+e[1],...this.editor.getAttributes(kf.name)}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1],editor:this.editor})),[i]}}),UT=wt.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:i}){return["p",je(this.options.HTMLAttributes,i),0]},addCommands(){return{setParagraph:()=>({commands:i})=>i.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),$T=/(?:^|\s)((?:~~)((?:[^~]+))(?:~~))$/,KT=/(?:^|\s)((?:~~)((?:[^~]+))(?:~~))/g,JT=Rt.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:i=>i.includes("line-through")?{}:!1}]},renderHTML({HTMLAttributes:i}){return["s",je(this.options.HTMLAttributes,i),0]},addCommands(){return{setStrike:()=>({commands:i})=>i.setMark(this.name),toggleStrike:()=>({commands:i})=>i.toggleMark(this.name),unsetStrike:()=>({commands:i})=>i.unsetMark(this.name)}},addKeyboardShortcuts(){const i={};return Jh()?i["Mod-Shift-s"]=()=>this.editor.commands.toggleStrike():i["Ctrl-Shift-s"]=()=>this.editor.commands.toggleStrike(),i},addInputRules(){return[Mn({find:$T,type:this.type})]},addPasteRules(){return[Xi({find:KT,type:this.type})]}}),ZT=wt.create({name:"text",group:"inline"}),QT=yt.create({name:"starterKit",addExtensions(){var i,e,t,r,a,l,d,p,b,k,A,L,O,z,D,X,W,U;const _=[];return this.options.blockquote!==!1&&_.push(iT.configure((i=this.options)===null||i===void 0?void 0:i.blockquote)),this.options.bold!==!1&&_.push(oT.configure((e=this.options)===null||e===void 0?void 0:e.bold)),this.options.bulletList!==!1&&_.push(cT.configure((t=this.options)===null||t===void 0?void 0:t.bulletList)),this.options.code!==!1&&_.push(uT.configure((r=this.options)===null||r===void 0?void 0:r.code)),this.options.codeBlock!==!1&&_.push(gT.configure((a=this.options)===null||a===void 0?void 0:a.codeBlock)),this.options.document!==!1&&_.push(mT.configure((l=this.options)===null||l===void 0?void 0:l.document)),this.options.dropcursor!==!1&&_.push(yT.configure((d=this.options)===null||d===void 0?void 0:d.dropcursor)),this.options.gapcursor!==!1&&_.push(TT.configure((p=this.options)===null||p===void 0?void 0:p.gapcursor)),this.options.hardBreak!==!1&&_.push(MT.configure((b=this.options)===null||b===void 0?void 0:b.hardBreak)),this.options.heading!==!1&&_.push(LT.configure((k=this.options)===null||k===void 0?void 0:k.heading)),this.options.history!==!1&&_.push(BT.configure((A=this.options)===null||A===void 0?void 0:A.history)),this.options.horizontalRule!==!1&&_.push(HT.configure((L=this.options)===null||L===void 0?void 0:L.horizontalRule)),this.options.italic!==!1&&_.push(VT.configure((O=this.options)===null||O===void 0?void 0:O.italic)),this.options.listItem!==!1&&_.push(jT.configure((z=this.options)===null||z===void 0?void 0:z.listItem)),this.options.orderedList!==!1&&_.push(qT.configure((D=this.options)===null||D===void 0?void 0:D.orderedList)),this.options.paragraph!==!1&&_.push(UT.configure((X=this.options)===null||X===void 0?void 0:X.paragraph)),this.options.strike!==!1&&_.push(JT.configure((W=this.options)===null||W===void 0?void 0:W.strike)),this.options.text!==!1&&_.push(ZT.configure((U=this.options)===null||U===void 0?void 0:U.text)),_}}),eM=yt.create({name:"textAlign",addOptions(){return{types:[],alignments:["left","center","right","justify"],defaultAlignment:"left"}},addGlobalAttributes(){return[{types:this.options.types,attributes:{textAlign:{default:this.options.defaultAlignment,parseHTML:i=>i.style.textAlign||this.options.defaultAlignment,renderHTML:i=>i.textAlign===this.options.defaultAlignment?{}:{style:`text-align: ${i.textAlign}`}}}}]},addCommands(){return{setTextAlign:i=>({commands:e})=>this.options.alignments.includes(i)?this.options.types.every(t=>e.updateAttributes(t,{textAlign:i})):!1,unsetTextAlign:()=>({commands:i})=>this.options.types.every(e=>i.resetAttributes(e,"textAlign"))}},addKeyboardShortcuts(){return{"Mod-Shift-l":()=>this.editor.commands.setTextAlign("left"),"Mod-Shift-e":()=>this.editor.commands.setTextAlign("center"),"Mod-Shift-r":()=>this.editor.commands.setTextAlign("right"),"Mod-Shift-j":()=>this.editor.commands.setTextAlign("justify")}}});document.addEventListener("alpine:init",()=>{window.Alpine.data("editor",(i={})=>{let e;return{updatedAt:Date.now(),init(){const t=this;e=new TE({content:this.$refs.input.value,element:this.$refs.editor,extensions:[QT,eT.configure({...i.link||{}}),PE.configure({...i.highlight||{}}),RE.configure({...i.image||{}}),eM.configure({...i.textAlign||{}})],editorProps:{attributes:{class:"focus:outline-none",style:"height: 100%; width: 100%; min-height: 100px;"}},onCreate(){t.updatedAt=Date.now()},onUpdate({editor:r}){t.$refs.input.value=r.isEmpty?"":r.getHTML(),t.updatedAt=Date.now()},onSelectionUpdate(){t.updatedAt=Date.now()}})},editor(){return e},isActive(t,r={},a){return e.isActive(t,r)}}})});class tM{constructor(e,t){this.file=e,this.error=null,this.failed=!1,this.progress=0,this.uploaded=0,this.config=t,this.hash=this._createHash(),this.chunks=this._createChunks()}handle(){return this.chunks.reduce((e,t,r)=>e.then(()=>this.upload(t,r+1)),Promise.resolve(null))}upload(e,t){const r=new FormData;return r.set("file",e,`${this.hash}${this.file.name}`),window.$http.post(this.config.url,r,{headers:{"X-Chunk-Hash":this.hash,"X-Chunk-Index":t,"X-Chunk-Total":this.chunks.length,"Content-Type":"multipart/form-data"},onUploadProgress:a=>{this.uploaded+=a.loaded,this.progress=Math.floor(this.uploaded*100/this.file.size)}}).then(a=>a.data).catch(a=>{throw this.error=a.response.data.message,this.failed=!0,new Error})}cancel(){}retry(){this.chunks=this._createChunks(),this.error=null,this.failed=!1,this.hash=this._createHash(),this.processing=!1,this.progress=0,this.uploaded=0}_createHash(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substring(0,10)}_createChunks(){let e=[];const t=this.config.chunkSize,r=Math.ceil(this.file.size/t);for(let a=0;a{let t,r;return function(){const a=arguments,l=this;r?(clearTimeout(t),t=setTimeout(function(){Date.now()-r>=e&&(i.apply(l,a),r=Date.now())},e-(Date.now()-r))):(i.apply(l,a),r=Date.now())}};document.addEventListener("alpine:init",()=>{window.Alpine.data("mediaManager",(i,e)=>({dragging:!1,processing:!1,working:!1,queue:[],items:[],nextPageUrl:i,query:e.query,init(){this.$root.querySelector(".modal__body").addEventListener("scroll",iM(t=>{this.shouldPaginate(t)&&this.paginate()})),this.$watch("query",()=>this.fetch())},fetch(){this.processing=!0,window.$http.get(i,{params:this.query}).then(t=>{this.items=t.data.data}).catch(t=>{}).finally(()=>{this.processing=!1})},paginate(){this.processing=!0,window.$http.get(this.nextPageUrl,{params:this.query}).then(t=>{this.items.push(...t.data.data),this.nextPageUrl=t.data.next_page_url}).catch(t=>{}).finally(()=>{this.processing=!1})},shouldPaginate(t){return!this.processing&&this.nextPageUrl!==null&&this.items.length>0&&Math.abs(t.target.scrollHeight-t.target.scrollTop-t.target.clientHeight)<75},queueFiles(t){for(let r=0;r!r.failed);t&&(this.working=!0,t.handle(i).then(r=>{this.queue.splice(this.queue.indexOf(t),1),this.items.unshift(r)}).catch(r=>{}).finally(()=>{this.working=!1,this.work()}))},retry(t){t.retry(),this.working||this.work()},select(t){e.multiple?this.selection.push(t):this.selection=[t]},deselect(t){this.selection.splice(this.selection.findIndex(r=>r.value===t.value),1)},toggle(t){this.selected(t)?this.deselect(t):this.select(t)},selected(t){return this.selection.findIndex(r=>r.value===t.value)>-1}}))});document.addEventListener("alpine:init",()=>{window.Alpine.data("repeater",(i,e=[])=>({processing:!1,options:e,add(){this.processing=!0,window.$http.post(i).then(t=>{this.options.push(t.data)}).catch(t=>{}).finally(()=>{this.processing=!1})},remove(t){this.options.splice(t,1)},swap(t,r){const a=this.options[r];this.options[r]=this.options[t],this.options[t]=a}}))});document.addEventListener("alpine:init",()=>{window.Alpine.data("dropdown",(i,e,t)=>({selection:e,options:i,search:null,open:!1,highlighted:0,highlight(r){this.open=!0,this.options.length===0?this.highlighted=null:r>=this.options.length?this.highlighted=0:r<0?this.highlighted=this.options.length-1:this.highlighted=r,this.$refs.listbox.children[this.highlighted+1].scrollIntoView({behavior:"smooth",block:"nearest"})},highlightNext(){this.highlight(this.highlighted+1)},highlightPrev(){this.highlight(this.highlighted-1)},select(r){t.multiple?this.selection.push(r):this.selection=[r]},deselect(r){this.selection.splice(this.selection.findIndex(a=>a.value===r.value),1)},toggle(r){this.selected(r)?this.deselect(r):this.select(r)},selected(r){return this.selection.findIndex(a=>a.value===r.value)>-1},filter(r){return r?this.options.filter(a=>a.value.includes(r)||a.label.replace(/<[^>]+>/g,"").includes(r)):this.options}}))});document.addEventListener("alpine:init",()=>{window.Alpine.data("table",i=>({models:i.models,selection:[],selectedAllMatchingQuery:!1,selectedAllModels:!1,init(){this.$watch("selection",()=>{this.$refs.selectCheckbox.indeterminate=this.selection.length>0&&this.selection.length0&&this.selection.length===this.models.length})}}))});function nM(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var Jc={exports:{}};/*! +`},addCommands(){return{setHardBreak:()=>({commands:i,chain:e,state:t,editor:r})=>i.first([()=>i.exitCode(),()=>i.command(()=>{const{selection:a,storedMarks:l}=t;if(a.$from.parent.type.spec.isolating)return!1;const{keepMarks:d}=this.options,{splittableMarks:p}=r.extensionManager,b=l||a.$to.parentOffset&&a.$from.marks();return e().insertContent({type:this.name}).command(({tr:k,dispatch:A})=>{if(A&&b&&d){const L=b.filter(O=>p.includes(O.type.name));k.ensureMarks(L)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),LT=wt.create({name:"heading",addOptions(){return{levels:[1,2,3,4,5,6],HTMLAttributes:{}}},content:"inline*",group:"block",defining:!0,addAttributes(){return{level:{default:1,rendered:!1}}},parseHTML(){return this.options.levels.map(i=>({tag:`h${i}`,attrs:{level:i}}))},renderHTML({node:i,HTMLAttributes:e}){return[`h${this.options.levels.includes(i.attrs.level)?i.attrs.level:this.options.levels[0]}`,je(this.options.HTMLAttributes,e),0]},addCommands(){return{setHeading:i=>({commands:e})=>this.options.levels.includes(i.level)?e.setNode(this.name,i):!1,toggleHeading:i=>({commands:e})=>this.options.levels.includes(i.level)?e.toggleNode(this.name,"paragraph",i):!1}},addKeyboardShortcuts(){return this.options.levels.reduce((i,e)=>({...i,[`Mod-Alt-${e}`]:()=>this.editor.commands.toggleHeading({level:e})}),{})},addInputRules(){return this.options.levels.map(i=>Xc({find:new RegExp(`^(#{1,${i}})\\s$`),type:this.type,getAttributes:{level:i}}))}});var Ua=200,tt=function(){};tt.prototype.append=function(e){return e.length?(e=tt.from(e),!this.length&&e||e.length=t?tt.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,t))};tt.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)};tt.prototype.forEach=function(e,t,r){t===void 0&&(t=0),r===void 0&&(r=this.length),t<=r?this.forEachInner(e,t,r,0):this.forEachInvertedInner(e,t,r,0)};tt.prototype.map=function(e,t,r){t===void 0&&(t=0),r===void 0&&(r=this.length);var a=[];return this.forEach(function(l,d){return a.push(e(l,d))},t,r),a};tt.from=function(e){return e instanceof tt?e:e&&e.length?new Ix(e):tt.empty};var Ix=function(i){function e(r){i.call(this),this.values=r}i&&(e.__proto__=i),e.prototype=Object.create(i&&i.prototype),e.prototype.constructor=e;var t={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(a,l){return a==0&&l==this.length?this:new e(this.values.slice(a,l))},e.prototype.getInner=function(a){return this.values[a]},e.prototype.forEachInner=function(a,l,d,p){for(var b=l;b=d;b--)if(a(this.values[b],p+b)===!1)return!1},e.prototype.leafAppend=function(a){if(this.length+a.length<=Ua)return new e(this.values.concat(a.flatten()))},e.prototype.leafPrepend=function(a){if(this.length+a.length<=Ua)return new e(a.flatten().concat(this.values))},t.length.get=function(){return this.values.length},t.depth.get=function(){return 0},Object.defineProperties(e.prototype,t),e}(tt);tt.empty=new Ix([]);var PT=function(i){function e(t,r){i.call(this),this.left=t,this.right=r,this.length=t.length+r.length,this.depth=Math.max(t.depth,r.depth)+1}return i&&(e.__proto__=i),e.prototype=Object.create(i&&i.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(r){return rp&&this.right.forEachInner(r,Math.max(a-p,0),Math.min(this.length,l)-p,d+p)===!1)return!1},e.prototype.forEachInvertedInner=function(r,a,l,d){var p=this.left.length;if(a>p&&this.right.forEachInvertedInner(r,a-p,Math.max(l,p)-p,d+p)===!1||l=l?this.right.slice(r-l,a-l):this.left.slice(r,l).append(this.right.slice(0,a-l))},e.prototype.leafAppend=function(r){var a=this.right.leafAppend(r);if(a)return new e(this.left,a)},e.prototype.leafPrepend=function(r){var a=this.left.leafPrepend(r);if(a)return new e(a,this.right)},e.prototype.appendInner=function(r){return this.left.depth>=Math.max(this.right.depth,r.depth)+1?new e(this.left,new e(this.right,r)):new e(this,r)},e}(tt);const OT=500;class Dt{constructor(e,t){this.items=e,this.eventCount=t}popEvent(e,t){if(this.eventCount==0)return null;let r=this.items.length;for(;;r--)if(this.items.get(r-1).selection){--r;break}let a,l;t&&(a=this.remapping(r,this.items.length),l=a.maps.length);let d=e.tr,p,b,k=[],A=[];return this.items.forEach((L,O)=>{if(!L.step){a||(a=this.remapping(r,O+1),l=a.maps.length),l--,A.push(L);return}if(a){A.push(new bi(L.map));let z=L.step.map(a.slice(l)),D;z&&d.maybeStep(z).doc&&(D=d.mapping.maps[d.mapping.maps.length-1],k.push(new bi(D,void 0,void 0,k.length+A.length))),l--,D&&a.appendMap(D,l)}else d.maybeStep(L.step);if(L.selection)return p=a?L.selection.map(a.slice(l)):L.selection,b=new Dt(this.items.slice(0,r).append(A.reverse().concat(k)),this.eventCount-1),!1},this.items.length,0),{remaining:b,transform:d,selection:p}}addTransform(e,t,r,a){let l=[],d=this.eventCount,p=this.items,b=!a&&p.length?p.get(p.length-1):null;for(let A=0;AIT&&(p=RT(p,k),d-=k),new Dt(p.append(l),d)}remapping(e,t){let r=new Un;return this.items.forEach((a,l)=>{let d=a.mirrorOffset!=null&&l-a.mirrorOffset>=e?r.maps.length-a.mirrorOffset:void 0;r.appendMap(a.map,d)},e,t),r}addMaps(e){return this.eventCount==0?this:new Dt(this.items.append(e.map(t=>new bi(t))),this.eventCount)}rebased(e,t){if(!this.eventCount)return this;let r=[],a=Math.max(0,this.items.length-t),l=e.mapping,d=e.steps.length,p=this.eventCount;this.items.forEach(O=>{O.selection&&p--},a);let b=t;this.items.forEach(O=>{let z=l.getMirror(--b);if(z==null)return;d=Math.min(d,z);let D=l.maps[z];if(O.step){let X=e.steps[z].invert(e.docs[z]),W=O.selection&&O.selection.map(l.slice(b+1,z));W&&p++,r.push(new bi(D,X,W))}else r.push(new bi(D))},a);let k=[];for(let O=t;OOT&&(L=L.compress(this.items.length-r.length)),L}emptyItemCount(){let e=0;return this.items.forEach(t=>{t.step||e++}),e}compress(e=this.items.length){let t=this.remapping(0,e),r=t.maps.length,a=[],l=0;return this.items.forEach((d,p)=>{if(p>=e)a.push(d),d.selection&&l++;else if(d.step){let b=d.step.map(t.slice(r)),k=b&&b.getMap();if(r--,k&&t.appendMap(k,r),b){let A=d.selection&&d.selection.map(t.slice(r));A&&l++;let L=new bi(k.invert(),b,A),O,z=a.length-1;(O=a.length&&a[z].merge(L))?a[z]=O:a.push(L)}}else d.map&&r--},this.items.length,0),new Dt(tt.from(a.reverse()),l)}}Dt.empty=new Dt(tt.empty,0);function RT(i,e){let t;return i.forEach((r,a)=>{if(r.selection&&e--==0)return t=a,!1}),i.slice(t)}let bi=class Nx{constructor(e,t,r,a){this.map=e,this.step=t,this.selection=r,this.mirrorOffset=a}merge(e){if(this.step&&e.step&&!e.selection){let t=e.step.merge(this.step);if(t)return new Nx(t.getMap().invert(),t,this.selection)}}};class wi{constructor(e,t,r,a,l){this.done=e,this.undone=t,this.prevRanges=r,this.prevTime=a,this.prevComposition=l}}const IT=20;function NT(i,e,t,r){let a=t.getMeta(Fi),l;if(a)return a.historyState;t.getMeta(FT)&&(i=new wi(i.done,i.undone,null,0,-1));let d=t.getMeta("appendedTransaction");if(t.steps.length==0)return i;if(d&&d.getMeta(Fi))return d.getMeta(Fi).redo?new wi(i.done.addTransform(t,void 0,r,oa(e)),i.undone,wf(t.mapping.maps[t.steps.length-1]),i.prevTime,i.prevComposition):new wi(i.done,i.undone.addTransform(t,void 0,r,oa(e)),null,i.prevTime,i.prevComposition);if(t.getMeta("addToHistory")!==!1&&!(d&&d.getMeta("addToHistory")===!1)){let p=t.getMeta("composition"),b=i.prevTime==0||!d&&i.prevComposition!=p&&(i.prevTime<(t.time||0)-r.newGroupDelay||!DT(t,i.prevRanges)),k=d?jl(i.prevRanges,t.mapping):wf(t.mapping.maps[t.steps.length-1]);return new wi(i.done.addTransform(t,b?e.selection.getBookmark():void 0,r,oa(e)),Dt.empty,k,t.time,p??i.prevComposition)}else return(l=t.getMeta("rebased"))?new wi(i.done.rebased(t,l),i.undone.rebased(t,l),jl(i.prevRanges,t.mapping),i.prevTime,i.prevComposition):new wi(i.done.addMaps(t.mapping.maps),i.undone.addMaps(t.mapping.maps),jl(i.prevRanges,t.mapping),i.prevTime,i.prevComposition)}function DT(i,e){if(!e)return!1;if(!i.docChanged)return!0;let t=!1;return i.mapping.maps[0].forEach((r,a)=>{for(let l=0;l=e[l]&&(t=!0)}),t}function wf(i){let e=[];return i.forEach((t,r,a,l)=>e.push(a,l)),e}function jl(i,e){if(!i)return null;let t=[];for(let r=0;r{let t=Fi.getState(i);return!t||t.done.eventCount==0?!1:(e&&Dx(t,i,e,!1),!0)},zx=(i,e)=>{let t=Fi.getState(i);return!t||t.undone.eventCount==0?!1:(e&&Dx(t,i,e,!0),!0)},BT=yt.create({name:"history",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:i,dispatch:e})=>Fx(i,e),redo:()=>({state:i,dispatch:e})=>zx(i,e)}},addProseMirrorPlugins(){return[zT(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Mod-Z":()=>this.editor.commands.undo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-Y":()=>this.editor.commands.redo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Shift-Mod-Z":()=>this.editor.commands.redo(),"Mod-я":()=>this.editor.commands.undo(),"Shift-Mod-я":()=>this.editor.commands.redo()}}}),HT=wt.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{}}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:i}){return["hr",je(this.options.HTMLAttributes,i)]},addCommands(){return{setHorizontalRule:()=>({chain:i,state:e})=>{const{$to:t}=e.selection,r=i();return t.parentOffset===0?r.insertContentAt(Math.max(t.pos-2,0),{type:this.name}):r.insertContent({type:this.name}),r.command(({tr:a,dispatch:l})=>{var d;if(l){const{$to:p}=a.selection,b=p.end();if(p.nodeAfter)p.nodeAfter.isTextblock?a.setSelection(ke.create(a.doc,p.pos+1)):p.nodeAfter.isBlock?a.setSelection(we.create(a.doc,p.pos)):a.setSelection(ke.create(a.doc,p.pos));else{const k=(d=p.parent.type.contentMatch.defaultType)===null||d===void 0?void 0:d.create();k&&(a.insert(b,k),a.setSelection(ke.create(a.doc,b+1)))}a.scrollIntoView()}return!0}).run()}}},addInputRules(){return[Ex({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}}),_T=/(?:^|\s)((?:\*)((?:[^*]+))(?:\*))$/,WT=/(?:^|\s)((?:\*)((?:[^*]+))(?:\*))/g,XT=/(?:^|\s)((?:_)((?:[^_]+))(?:_))$/,YT=/(?:^|\s)((?:_)((?:[^_]+))(?:_))/g,VT=Rt.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:i=>i.style.fontStyle!=="normal"&&null},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:i}){return["em",je(this.options.HTMLAttributes,i),0]},addCommands(){return{setItalic:()=>({commands:i})=>i.setMark(this.name),toggleItalic:()=>({commands:i})=>i.toggleMark(this.name),unsetItalic:()=>({commands:i})=>i.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[Mn({find:_T,type:this.type}),Mn({find:XT,type:this.type})]},addPasteRules(){return[Xi({find:WT,type:this.type}),Xi({find:YT,type:this.type})]}}),jT=wt.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:i}){return["li",je(this.options.HTMLAttributes,i),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),GT=wt.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:i}){return["li",je(this.options.HTMLAttributes,i),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),kf=Rt.create({name:"textStyle",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"span",getAttrs:i=>i.hasAttribute("style")?{}:!1}]},renderHTML({HTMLAttributes:i}){return["span",je(this.options.HTMLAttributes,i),0]},addCommands(){return{removeEmptyTextStyle:()=>({state:i,commands:e})=>{const t=Qo(i,this.type);return Object.entries(t).some(([,a])=>!!a)?!0:e.unsetMark(this.name)}}}}),Af=/^(\d+)\.\s$/,qT=wt.create({name:"orderedList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes(){return{start:{default:1,parseHTML:i=>i.hasAttribute("start")?parseInt(i.getAttribute("start")||"",10):1}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:i}){const{start:e,...t}=i;return e===1?["ol",je(this.options.HTMLAttributes,t),0]:["ol",je(this.options.HTMLAttributes,i),0]},addCommands(){return{toggleOrderedList:()=>({commands:i,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(GT.name,this.editor.getAttributes(kf.name)).run():i.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let i=es({find:Af,type:this.type,getAttributes:e=>({start:+e[1]}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(i=es({find:Af,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:e=>({start:+e[1],...this.editor.getAttributes(kf.name)}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1],editor:this.editor})),[i]}}),UT=wt.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:i}){return["p",je(this.options.HTMLAttributes,i),0]},addCommands(){return{setParagraph:()=>({commands:i})=>i.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),$T=/(?:^|\s)((?:~~)((?:[^~]+))(?:~~))$/,KT=/(?:^|\s)((?:~~)((?:[^~]+))(?:~~))/g,JT=Rt.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:i=>i.includes("line-through")?{}:!1}]},renderHTML({HTMLAttributes:i}){return["s",je(this.options.HTMLAttributes,i),0]},addCommands(){return{setStrike:()=>({commands:i})=>i.setMark(this.name),toggleStrike:()=>({commands:i})=>i.toggleMark(this.name),unsetStrike:()=>({commands:i})=>i.unsetMark(this.name)}},addKeyboardShortcuts(){const i={};return Jh()?i["Mod-Shift-s"]=()=>this.editor.commands.toggleStrike():i["Ctrl-Shift-s"]=()=>this.editor.commands.toggleStrike(),i},addInputRules(){return[Mn({find:$T,type:this.type})]},addPasteRules(){return[Xi({find:KT,type:this.type})]}}),ZT=wt.create({name:"text",group:"inline"}),QT=yt.create({name:"starterKit",addExtensions(){var i,e,t,r,a,l,d,p,b,k,A,L,O,z,D,X,W,U;const _=[];return this.options.blockquote!==!1&&_.push(iT.configure((i=this.options)===null||i===void 0?void 0:i.blockquote)),this.options.bold!==!1&&_.push(oT.configure((e=this.options)===null||e===void 0?void 0:e.bold)),this.options.bulletList!==!1&&_.push(cT.configure((t=this.options)===null||t===void 0?void 0:t.bulletList)),this.options.code!==!1&&_.push(uT.configure((r=this.options)===null||r===void 0?void 0:r.code)),this.options.codeBlock!==!1&&_.push(gT.configure((a=this.options)===null||a===void 0?void 0:a.codeBlock)),this.options.document!==!1&&_.push(mT.configure((l=this.options)===null||l===void 0?void 0:l.document)),this.options.dropcursor!==!1&&_.push(yT.configure((d=this.options)===null||d===void 0?void 0:d.dropcursor)),this.options.gapcursor!==!1&&_.push(TT.configure((p=this.options)===null||p===void 0?void 0:p.gapcursor)),this.options.hardBreak!==!1&&_.push(MT.configure((b=this.options)===null||b===void 0?void 0:b.hardBreak)),this.options.heading!==!1&&_.push(LT.configure((k=this.options)===null||k===void 0?void 0:k.heading)),this.options.history!==!1&&_.push(BT.configure((A=this.options)===null||A===void 0?void 0:A.history)),this.options.horizontalRule!==!1&&_.push(HT.configure((L=this.options)===null||L===void 0?void 0:L.horizontalRule)),this.options.italic!==!1&&_.push(VT.configure((O=this.options)===null||O===void 0?void 0:O.italic)),this.options.listItem!==!1&&_.push(jT.configure((z=this.options)===null||z===void 0?void 0:z.listItem)),this.options.orderedList!==!1&&_.push(qT.configure((D=this.options)===null||D===void 0?void 0:D.orderedList)),this.options.paragraph!==!1&&_.push(UT.configure((X=this.options)===null||X===void 0?void 0:X.paragraph)),this.options.strike!==!1&&_.push(JT.configure((W=this.options)===null||W===void 0?void 0:W.strike)),this.options.text!==!1&&_.push(ZT.configure((U=this.options)===null||U===void 0?void 0:U.text)),_}}),eM=yt.create({name:"textAlign",addOptions(){return{types:[],alignments:["left","center","right","justify"],defaultAlignment:"left"}},addGlobalAttributes(){return[{types:this.options.types,attributes:{textAlign:{default:this.options.defaultAlignment,parseHTML:i=>i.style.textAlign||this.options.defaultAlignment,renderHTML:i=>i.textAlign===this.options.defaultAlignment?{}:{style:`text-align: ${i.textAlign}`}}}}]},addCommands(){return{setTextAlign:i=>({commands:e})=>this.options.alignments.includes(i)?this.options.types.every(t=>e.updateAttributes(t,{textAlign:i})):!1,unsetTextAlign:()=>({commands:i})=>this.options.types.every(e=>i.resetAttributes(e,"textAlign"))}},addKeyboardShortcuts(){return{"Mod-Shift-l":()=>this.editor.commands.setTextAlign("left"),"Mod-Shift-e":()=>this.editor.commands.setTextAlign("center"),"Mod-Shift-r":()=>this.editor.commands.setTextAlign("right"),"Mod-Shift-j":()=>this.editor.commands.setTextAlign("justify")}}});document.addEventListener("alpine:init",()=>{window.Alpine.data("editor",(i={})=>{let e;return{updatedAt:Date.now(),init(){const t=this;e=new TE({content:this.$refs.input.value,element:this.$refs.editor,extensions:[QT,eT.configure({...i.link||{}}),PE.configure({...i.highlight||{}}),RE.configure({...i.image||{}}),eM.configure({...i.textAlign||{}})],editorProps:{attributes:{class:"focus:outline-none",style:"height: 100%; width: 100%; min-height: 100px;"}},onCreate(){t.updatedAt=Date.now()},onUpdate({editor:r}){t.$refs.input.value=r.isEmpty?"":r.getHTML(),t.updatedAt=Date.now()},onSelectionUpdate(){t.updatedAt=Date.now()}})},editor(){return e},isActive(t,r={},a){return e.isActive(t,r)}}})});class tM{constructor(e,t){this.file=e,this.error=null,this.failed=!1,this.progress=0,this.uploaded=0,this.config=t,this.hash=this._createHash(),this.chunks=this._createChunks()}handle(){return this.chunks.reduce((e,t,r)=>e.then(()=>this.upload(t,r+1)),Promise.resolve(null))}upload(e,t){const r=new FormData;return r.set("file",e,`${this.hash}${this.file.name}`),window.$http.post(this.config.url,r,{headers:{"X-Chunk-Hash":this.hash,"X-Chunk-Index":t,"X-Chunk-Total":this.chunks.length,"Content-Type":"multipart/form-data"},onUploadProgress:a=>{this.uploaded+=a.loaded,this.progress=Math.floor(this.uploaded*100/this.file.size)}}).then(a=>a.data).catch(a=>{throw this.error=a.response.data.message,this.failed=!0,new Error})}cancel(){}retry(){this.chunks=this._createChunks(),this.error=null,this.failed=!1,this.hash=this._createHash(),this.processing=!1,this.progress=0,this.uploaded=0}_createHash(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substring(0,10)}_createChunks(){let e=[];const t=this.config.chunkSize,r=Math.ceil(this.file.size/t);for(let a=0;a{let t,r;return function(){const a=arguments,l=this;r?(clearTimeout(t),t=setTimeout(function(){Date.now()-r>=e&&(i.apply(l,a),r=Date.now())},e-(Date.now()-r))):(i.apply(l,a),r=Date.now())}};document.addEventListener("alpine:init",()=>{window.Alpine.data("mediaManager",(i,e)=>({dragging:!1,processing:!1,working:!1,queue:[],items:[],nextPageUrl:i,query:e.query,init(){this.$root.querySelector(".modal__body").addEventListener("scroll",iM(t=>{this.shouldPaginate(t)&&this.paginate()})),this.$watch("query",()=>this.fetch())},fetch(){this.processing=!0,window.$http.get(i,{params:this.query}).then(t=>{this.items=t.data.data}).catch(t=>{}).finally(()=>{this.processing=!1})},paginate(){this.processing=!0,window.$http.get(this.nextPageUrl,{params:this.query}).then(t=>{this.items.push(...t.data.data),this.nextPageUrl=t.data.next_page_url}).catch(t=>{}).finally(()=>{this.processing=!1})},shouldPaginate(t){return!this.processing&&this.nextPageUrl!==null&&this.items.length>0&&Math.abs(t.target.scrollHeight-t.target.scrollTop-t.target.clientHeight)<75},queueFiles(t){for(let r=0;r!r.failed);t&&(this.working=!0,t.handle(i).then(r=>{this.queue.splice(this.queue.indexOf(t),1),this.items.unshift(r)}).catch(r=>{}).finally(()=>{this.working=!1,this.work()}))},retry(t){t.retry(),this.working||this.work()},select(t){e.multiple?this.selection.push(t):this.selection=[t]},deselect(t){this.selection.splice(this.selection.findIndex(r=>r.value===t.value),1)},toggle(t){this.selected(t)?this.deselect(t):this.select(t)},selected(t){return this.selection.findIndex(r=>r.value===t.value)>-1},destroy(){this.processing=!0;const t=this.selection.map(r=>r.value);window.$http.delete(i,{data:{ids:t}}).then(r=>{this.selection=[],r.data.deleted.forEach(a=>{let l=this.items.findIndex(d=>d.value===a);this.items.splice(l,1)})}).catch(r=>{}).finally(()=>{this.processing=!1})}}))});document.addEventListener("alpine:init",()=>{window.Alpine.data("repeater",(i,e=[])=>({processing:!1,options:e,add(){this.processing=!0,window.$http.post(i).then(t=>{this.options.push(t.data)}).catch(t=>{}).finally(()=>{this.processing=!1})},remove(t){this.options.splice(t,1)},swap(t,r){const a=this.options[r];this.options[r]=this.options[t],this.options[t]=a}}))});document.addEventListener("alpine:init",()=>{window.Alpine.data("dropdown",(i,e,t)=>({selection:e,options:i,search:null,open:!1,highlighted:0,highlight(r){this.open=!0,this.options.length===0?this.highlighted=null:r>=this.options.length?this.highlighted=0:r<0?this.highlighted=this.options.length-1:this.highlighted=r,this.$refs.listbox.children[this.highlighted+1].scrollIntoView({behavior:"smooth",block:"nearest"})},highlightNext(){this.highlight(this.highlighted+1)},highlightPrev(){this.highlight(this.highlighted-1)},select(r){t.multiple?this.selection.push(r):this.selection=[r]},deselect(r){this.selection.splice(this.selection.findIndex(a=>a.value===r.value),1)},toggle(r){this.selected(r)?this.deselect(r):this.select(r)},selected(r){return this.selection.findIndex(a=>a.value===r.value)>-1},filter(r){return r?this.options.filter(a=>a.value.includes(r)||a.label.replace(/<[^>]+>/g,"").includes(r)):this.options}}))});document.addEventListener("alpine:init",()=>{window.Alpine.data("table",i=>({models:i.models,selection:[],selectedAllMatchingQuery:!1,selectedAllModels:!1,init(){this.$watch("selection",()=>{this.$refs.selectCheckbox.indeterminate=this.selection.length>0&&this.selection.length0&&this.selection.length===this.models.length})}}))});function nM(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var Jc={exports:{}};/*! * ApexCharts v3.43.0 * (c) 2018-2023 ApexCharts * Released under the MIT License. diff --git a/public/build/assets/app-2f30f4db.js b/public/build/assets/app-2f30f4db.js deleted file mode 100644 index 817266e4..00000000 --- a/public/build/assets/app-2f30f4db.js +++ /dev/null @@ -1 +0,0 @@ -import{a as f}from"./app-85a0d71c.js";export{f as default}; diff --git a/public/build/assets/app-a1ae10d8.js b/public/build/assets/app-a1ae10d8.js new file mode 100644 index 00000000..caaf13cd --- /dev/null +++ b/public/build/assets/app-a1ae10d8.js @@ -0,0 +1 @@ +import{a as f}from"./app-274d084e.js";export{f as default}; diff --git a/public/build/assets/chart-92c4939f.js b/public/build/assets/chart-92c4939f.js new file mode 100644 index 00000000..e48b5f51 --- /dev/null +++ b/public/build/assets/chart-92c4939f.js @@ -0,0 +1 @@ +import"./app-274d084e.js"; diff --git a/public/build/assets/chart-b2b6bf5e.js b/public/build/assets/chart-b2b6bf5e.js deleted file mode 100644 index 2958d6ed..00000000 --- a/public/build/assets/chart-b2b6bf5e.js +++ /dev/null @@ -1 +0,0 @@ -import"./app-85a0d71c.js"; diff --git a/public/build/assets/dropdown-92c4939f.js b/public/build/assets/dropdown-92c4939f.js new file mode 100644 index 00000000..e48b5f51 --- /dev/null +++ b/public/build/assets/dropdown-92c4939f.js @@ -0,0 +1 @@ +import"./app-274d084e.js"; diff --git a/public/build/assets/dropdown-b2b6bf5e.js b/public/build/assets/dropdown-b2b6bf5e.js deleted file mode 100644 index 2958d6ed..00000000 --- a/public/build/assets/dropdown-b2b6bf5e.js +++ /dev/null @@ -1 +0,0 @@ -import"./app-85a0d71c.js"; diff --git a/public/build/assets/editor-92c4939f.js b/public/build/assets/editor-92c4939f.js new file mode 100644 index 00000000..e48b5f51 --- /dev/null +++ b/public/build/assets/editor-92c4939f.js @@ -0,0 +1 @@ +import"./app-274d084e.js"; diff --git a/public/build/assets/editor-b2b6bf5e.js b/public/build/assets/editor-b2b6bf5e.js deleted file mode 100644 index 2958d6ed..00000000 --- a/public/build/assets/editor-b2b6bf5e.js +++ /dev/null @@ -1 +0,0 @@ -import"./app-85a0d71c.js"; diff --git a/public/build/assets/media-manager-92c4939f.js b/public/build/assets/media-manager-92c4939f.js new file mode 100644 index 00000000..e48b5f51 --- /dev/null +++ b/public/build/assets/media-manager-92c4939f.js @@ -0,0 +1 @@ +import"./app-274d084e.js"; diff --git a/public/build/assets/media-manager-b2b6bf5e.js b/public/build/assets/media-manager-b2b6bf5e.js deleted file mode 100644 index 2958d6ed..00000000 --- a/public/build/assets/media-manager-b2b6bf5e.js +++ /dev/null @@ -1 +0,0 @@ -import"./app-85a0d71c.js"; diff --git a/public/build/assets/repeater-92c4939f.js b/public/build/assets/repeater-92c4939f.js new file mode 100644 index 00000000..e48b5f51 --- /dev/null +++ b/public/build/assets/repeater-92c4939f.js @@ -0,0 +1 @@ +import"./app-274d084e.js"; diff --git a/public/build/assets/repeater-b2b6bf5e.js b/public/build/assets/repeater-b2b6bf5e.js deleted file mode 100644 index 2958d6ed..00000000 --- a/public/build/assets/repeater-b2b6bf5e.js +++ /dev/null @@ -1 +0,0 @@ -import"./app-85a0d71c.js"; diff --git a/public/build/assets/table-92c4939f.js b/public/build/assets/table-92c4939f.js new file mode 100644 index 00000000..e48b5f51 --- /dev/null +++ b/public/build/assets/table-92c4939f.js @@ -0,0 +1 @@ +import"./app-274d084e.js"; diff --git a/public/build/assets/table-b2b6bf5e.js b/public/build/assets/table-b2b6bf5e.js deleted file mode 100644 index 2958d6ed..00000000 --- a/public/build/assets/table-b2b6bf5e.js +++ /dev/null @@ -1 +0,0 @@ -import"./app-85a0d71c.js"; diff --git a/public/build/manifest.json b/public/build/manifest.json index bfc6f0c4..256927ed 100644 --- a/public/build/manifest.json +++ b/public/build/manifest.json @@ -7,12 +7,12 @@ "css": [ "assets/app-69baab43.css" ], - "file": "assets/app-85a0d71c.js", + "file": "assets/app-274d084e.js", "isEntry": true, "src": "resources/js/app.js" }, "resources/js/chart.js": { - "file": "assets/chart-b2b6bf5e.js", + "file": "assets/chart-92c4939f.js", "imports": [ "resources/js/app.js" ], @@ -20,7 +20,7 @@ "src": "resources/js/chart.js" }, "resources/js/dropdown.js": { - "file": "assets/dropdown-b2b6bf5e.js", + "file": "assets/dropdown-92c4939f.js", "imports": [ "resources/js/app.js" ], @@ -28,7 +28,7 @@ "src": "resources/js/dropdown.js" }, "resources/js/editor.js": { - "file": "assets/editor-b2b6bf5e.js", + "file": "assets/editor-92c4939f.js", "imports": [ "resources/js/app.js" ], @@ -36,7 +36,7 @@ "src": "resources/js/editor.js" }, "resources/js/media-manager.js": { - "file": "assets/media-manager-b2b6bf5e.js", + "file": "assets/media-manager-92c4939f.js", "imports": [ "resources/js/app.js" ], @@ -44,7 +44,7 @@ "src": "resources/js/media-manager.js" }, "resources/js/repeater.js": { - "file": "assets/repeater-b2b6bf5e.js", + "file": "assets/repeater-92c4939f.js", "imports": [ "resources/js/app.js" ], @@ -52,7 +52,7 @@ "src": "resources/js/repeater.js" }, "resources/js/table.js": { - "file": "assets/table-b2b6bf5e.js", + "file": "assets/table-92c4939f.js", "imports": [ "resources/js/app.js" ], @@ -60,7 +60,7 @@ "src": "resources/js/table.js" }, "resources/sass/app.scss": { - "file": "assets/app-2f30f4db.js", + "file": "assets/app-a1ae10d8.js", "imports": [ "resources/js/app.js" ], diff --git a/resources/js/media-manager.js b/resources/js/media-manager.js index 33a38e4b..3b09a046 100644 --- a/resources/js/media-manager.js +++ b/resources/js/media-manager.js @@ -101,6 +101,25 @@ document.addEventListener('alpine:init', () => { selected(item) { return this.selection.findIndex((selected) => selected.value === item.value) > -1; }, + destroy() { + this.processing = true; + + const ids = this.selection.map((item) => item.value); + + window.$http.delete(url, { data: { ids } }).then((response) => { + this.selection = []; + + response.data.deleted.forEach((id) => { + let index = this.items.findIndex((item) => item.value === id); + + this.items.splice(index, 1); + }); + }).catch((error) => { + // + }).finally(() => { + this.processing = false; + }); + } }; }); }); diff --git a/resources/views/filters/search.blade.php b/resources/views/filters/search.blade.php index a4ac1aee..f11941e7 100644 --- a/resources/views/filters/search.blade.php +++ b/resources/views/filters/search.blade.php @@ -1,7 +1,4 @@
+ -
diff --git a/resources/views/media/manager.blade.php b/resources/views/media/manager.blade.php index bff45fd9..11dc6ba1 100644 --- a/resources/views/media/manager.blade.php +++ b/resources/views/media/manager.blade.php @@ -31,14 +31,30 @@ class="media-list" - +