From 122408000d99630d27320558f0adcd210faa0c09 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 22 Jun 2026 11:05:15 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=A6=EF=B8=8F=20Update=20Foundation=20t?= =?UTF-8?q?o=20Laravel=20v13.16.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Illuminate/Foundation/Application.php | 2 +- .../Foundation/ArrayMaintenanceMode.php | 65 + .../Foundation/Bootstrap/HandleExceptions.php | 5 + src/Illuminate/Foundation/Cloud.php | 2 + src/Illuminate/Foundation/Cloud/Events.php | 4 +- .../Foundation/Cloud/FailedJobProvider.php | 2 + .../Foundation/Cloud/JsonFormatter.php | 30 + src/Illuminate/Foundation/Cloud/Queue.php | 4 +- .../Foundation/Console/DevCommand.php | 90 ++ .../Foundation/Console/RouteListCommand.php | 2 + src/Illuminate/Foundation/DevCommand.php | 122 ++ src/Illuminate/Foundation/DevCommandColor.php | 13 + src/Illuminate/Foundation/DevCommands.php | 280 ++++ .../Foundation/Exceptions/Handler.php | 2 - .../Foundation/MaintenanceModeManager.php | 10 + .../Providers/ArtisanServiceProvider.php | 13 + .../Testing/LazilyRefreshDatabase.php | 6 +- .../exceptions/renderer/dist/scripts.js | 52 +- .../exceptions/renderer/dist/styles.css | 3 +- .../exceptions/renderer/package-lock.json | 1286 ++++++----------- .../exceptions/renderer/package.json | 4 +- .../Foundation/resources/health-up.blade.php | 2 +- 22 files changed, 1101 insertions(+), 898 deletions(-) create mode 100644 src/Illuminate/Foundation/ArrayMaintenanceMode.php create mode 100644 src/Illuminate/Foundation/Cloud/JsonFormatter.php create mode 100644 src/Illuminate/Foundation/Console/DevCommand.php create mode 100644 src/Illuminate/Foundation/DevCommand.php create mode 100644 src/Illuminate/Foundation/DevCommandColor.php create mode 100644 src/Illuminate/Foundation/DevCommands.php diff --git a/src/Illuminate/Foundation/Application.php b/src/Illuminate/Foundation/Application.php index f9331abe..eb0cb9d1 100755 --- a/src/Illuminate/Foundation/Application.php +++ b/src/Illuminate/Foundation/Application.php @@ -45,7 +45,7 @@ class Application extends Container implements ApplicationContract, CachesConfig * * @var string */ - const VERSION = '13.12.0'; + const VERSION = '13.16.1'; /** * The base path for the Laravel installation. diff --git a/src/Illuminate/Foundation/ArrayMaintenanceMode.php b/src/Illuminate/Foundation/ArrayMaintenanceMode.php new file mode 100644 index 00000000..b9f9065a --- /dev/null +++ b/src/Illuminate/Foundation/ArrayMaintenanceMode.php @@ -0,0 +1,65 @@ +active = true; + $this->payload = $payload; + } + + /** + * Take the application out of maintenance. + * + * @return void + */ + public function deactivate(): void + { + $this->active = false; + $this->payload = []; + } + + /** + * Determine if the application is currently down for maintenance. + * + * @return bool + */ + public function active(): bool + { + return $this->active; + } + + /** + * Get the data array which was provided when the application was placed into maintenance. + * + * @return array + */ + public function data(): array + { + return $this->payload; + } +} diff --git a/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php b/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php index a5588cf0..3608d962 100644 --- a/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php +++ b/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php @@ -92,6 +92,10 @@ public function handleDeprecationError($message, $file, $line, $level = E_DEPREC return; } + if (! static::$app->bound('config')) { + return; + } + try { $logger = static::$app->make(LogManager::class); } catch (Exception) { @@ -121,6 +125,7 @@ public function handleDeprecationError($message, $file, $line, $level = E_DEPREC protected function shouldIgnoreDeprecationErrors() { return ! class_exists(LogManager::class) + || is_null(static::$app) || ! static::$app->hasBeenBootstrapped() || (static::$app->runningUnitTests() && ! Env::get('LOG_DEPRECATIONS_WHILE_TESTING')); } diff --git a/src/Illuminate/Foundation/Cloud.php b/src/Illuminate/Foundation/Cloud.php index 7f9b98b5..fe9e5c72 100644 --- a/src/Illuminate/Foundation/Cloud.php +++ b/src/Illuminate/Foundation/Cloud.php @@ -132,6 +132,8 @@ public static function ensureMigrationsUseUnpooledConnection(Application $app): /** * Configure managed queues if applicable. + * + * @throws \JsonException */ public static function configureManagedQueues(Application $app): void { diff --git a/src/Illuminate/Foundation/Cloud/Events.php b/src/Illuminate/Foundation/Cloud/Events.php index 2d90ccad..ec865f99 100644 --- a/src/Illuminate/Foundation/Cloud/Events.php +++ b/src/Illuminate/Foundation/Cloud/Events.php @@ -55,8 +55,6 @@ public function emitMany(array $payloads): void /** * Write the payload to the socket. - * - * @param list> $payloads */ protected function write(string $payload): void { @@ -101,6 +99,8 @@ protected function write(string $payload): void * Format the payload. * * @param list> $payloads + * + * @throws \JsonException */ protected function format(array $payloads): string { diff --git a/src/Illuminate/Foundation/Cloud/FailedJobProvider.php b/src/Illuminate/Foundation/Cloud/FailedJobProvider.php index aa4133da..c28cd9d4 100644 --- a/src/Illuminate/Foundation/Cloud/FailedJobProvider.php +++ b/src/Illuminate/Foundation/Cloud/FailedJobProvider.php @@ -103,6 +103,8 @@ public function all() * * @param mixed $id * @return object|null + * + * @throws \JsonException */ public function find($id) { diff --git a/src/Illuminate/Foundation/Cloud/JsonFormatter.php b/src/Illuminate/Foundation/Cloud/JsonFormatter.php new file mode 100644 index 00000000..c56898a9 --- /dev/null +++ b/src/Illuminate/Foundation/Cloud/JsonFormatter.php @@ -0,0 +1,30 @@ +bound('request')) { + $requestId = $app->make('request')->header('Cloud-Request-ID'); + + if ($requestId !== null) { + $normalized['cloud_request_id'] = $requestId; + } + } + + return $normalized; + } +} diff --git a/src/Illuminate/Foundation/Cloud/Queue.php b/src/Illuminate/Foundation/Cloud/Queue.php index 6490a717..5ffdb823 100644 --- a/src/Illuminate/Foundation/Cloud/Queue.php +++ b/src/Illuminate/Foundation/Cloud/Queue.php @@ -366,7 +366,9 @@ public function normalizeQueue($queue) return Str::of($this->queue->getQueue($queue)) ->when($prefix, fn ($str) => $str->chopStart($prefix.'/')) - ->when($suffix, fn ($str) => $str->chopEnd($suffix)) + ->when($suffix, fn ($str) => $str->endsWith('.fifo') + ? $str->chopEnd('.fifo')->chopEnd($suffix)->append('.fifo') + : $str->chopEnd($suffix)) ->toString(); } diff --git a/src/Illuminate/Foundation/Console/DevCommand.php b/src/Illuminate/Foundation/Console/DevCommand.php new file mode 100644 index 00000000..fbbfabce --- /dev/null +++ b/src/Illuminate/Foundation/Console/DevCommand.php @@ -0,0 +1,90 @@ +isProhibited()) { + return self::FAILURE; + } + + $devCommands = DevCommands::commands(); + + $commands = array_column($devCommands, 'command'); + $colors = array_column($devCommands, 'color'); + $names = array_column($devCommands, 'name'); + + $longestName = max(array_map(strlen(...), $names)); + + $columns = getenv('COLUMNS'); + + putenv('COLUMNS='.max(terminal()->width() - $longestName - 4, 1)); + + $this->line(''); + + foreach ($devCommands as $devCommand) { + $this->line( + sprintf( + '[%s]%s%s', + $devCommand['color'], + $devCommand['name'], + str_repeat(' ', ($longestName - strlen($devCommand['name'])) + 1), + $devCommand['command'], + ), + ); + } + + $this->line(''); + + $command = $packageManager->getExecCommand(sprintf( + 'concurrently -c "%s" "%s" --names=%s --kill-others', + implode(',', $colors), + implode('" "', $commands), + implode(',', $names) + )); + + if (extension_loaded('pcntl')) { + pcntl_exec('/usr/bin/env', ['sh', '-c', $command]); + } + + passthru($command, $exitCode); + + $columns === false ? putenv('COLUMNS') : putenv("COLUMNS={$columns}"); + + return $exitCode; + } +} diff --git a/src/Illuminate/Foundation/Console/RouteListCommand.php b/src/Illuminate/Foundation/Console/RouteListCommand.php index 2c5f07c2..fa86f4a3 100644 --- a/src/Illuminate/Foundation/Console/RouteListCommand.php +++ b/src/Illuminate/Foundation/Console/RouteListCommand.php @@ -236,6 +236,8 @@ protected function getMiddleware($route) * * @param \Illuminate\Routing\Route $route * @return string|null + * + * @throws \ReflectionException */ protected function getClosurePath(Route $route) { diff --git a/src/Illuminate/Foundation/DevCommand.php b/src/Illuminate/Foundation/DevCommand.php new file mode 100644 index 00000000..b077d9a0 --- /dev/null +++ b/src/Illuminate/Foundation/DevCommand.php @@ -0,0 +1,122 @@ +name ??= strstr($command, ' ', true); + } + + /** + * Get the command name. + * + * @return string + */ + public function name(): string + { + return $this->name; + } + + /** + * Set the command color. + * + * @param string $color + * @return self + */ + public function color(string $color): self + { + $this->color = $color; + + return $this; + } + + /** + * Set the command color to blue. + * + * @return self + */ + public function blue(): self + { + return $this->color(DevCommandColor::BLUE->value); + } + + /** + * Set the command color to purple. + * + * @return self + */ + public function purple(): self + { + return $this->color(DevCommandColor::PURPLE->value); + } + + /** + * Set the command color to pink. + * + * @return self + */ + public function pink(): self + { + return $this->color(DevCommandColor::PINK->value); + } + + /** + * Set the command color to orange. + * + * @return self + */ + public function orange(): self + { + return $this->color(DevCommandColor::ORANGE->value); + } + + /** + * Set the command color to green. + * + * @return self + */ + public function green(): self + { + return $this->color(DevCommandColor::GREEN->value); + } + + /** + * Set the command color to yellow. + * + * @return self + */ + public function yellow(): self + { + return $this->color(DevCommandColor::YELLOW->value); + } + + /** + * Get the command as an array. + * + * @return array{command: string, name: string, color: string|null} + */ + public function toArray(): array + { + return [ + 'command' => $this->command, + 'name' => $this->name, + 'color' => $this->color, + ]; + } +} diff --git a/src/Illuminate/Foundation/DevCommandColor.php b/src/Illuminate/Foundation/DevCommandColor.php new file mode 100644 index 00000000..7a67b3ad --- /dev/null +++ b/src/Illuminate/Foundation/DevCommandColor.php @@ -0,0 +1,13 @@ + + */ + protected static $only = []; + + /** + * The names of commands that should be excluded when running the "dev" command. + * + * @var array + */ + protected static $except = []; + + /** + * Register the default development commands. + * + * @return void + */ + public static function registerDefaults() + { + if (! app()->runningInConsole()) { + return; + } + + foreach ([ + 'server' => 'php artisan serve --host=localhost', + 'queue' => 'php artisan queue:listen --tries=1 --timeout=0', + 'logs' => 'php artisan pail --timeout=0', + 'vite' => self::getPackageManager()->getRunCommand('dev'), + ] as $name => $command) { + self::$commands[$name] = new DevCommand($command, $name); + } + } + + /** + * Register a development command. + * + * @param string $command + * @param string|null $name + * @return DevCommand + */ + public static function register(string $command, ?string $name = null): DevCommand + { + if (! app()->runningInConsole()) { + return new DevCommand('', ''); + } + + self::preventVendorRegistration($name ?? $command); + + $devCommand = new DevCommand($command, $name); + + self::$commands[$devCommand->name()] = $devCommand; + + return $devCommand; + } + + /** + * Registers an Artisan command, automatically prefixing it with "php artisan". + * + * @param string $command + * @param string|null $name + * @return DevCommand + */ + public static function artisan(string $command, ?string $name = null): DevCommand + { + return self::register("php artisan {$command}", $name ?? self::nameFromCommand($command)); + } + + /** + * Registers a Node command, automatically prefixing it with the detected package manager's run command. + * + * @param string $command + * @param string|null $name + * @return DevCommand + */ + public static function node(string $command, ?string $name = null): DevCommand + { + return self::register(self::getPackageManager()->getRunCommand($command), $name ?? self::nameFromCommand($command)); + } + + /** + * Registers a Node command, automatically prefixing it with the detected package manager's exec command. + * + * @param string $command + * @param string|null $name + * @return DevCommand + */ + public static function nodeExec(string $command, ?string $name = null): DevCommand + { + return self::register(self::getPackageManager()->getExecCommand($command), $name ?? self::nameFromCommand($command)); + } + + /** + * Get the registered development commands. + * + * @return array + */ + public static function commands(): array + { + $commands = []; + + foreach (self::$commands as $command) { + $cmd = $command->toArray(); + + if ((! empty(self::$only) && ! in_array($cmd['name'], self::$only)) || in_array($cmd['name'], self::$except)) { + continue; + } + + $commands[] = $cmd; + } + + return self::fillInEmptyColors($commands); + } + + /** + * Fill in any empty colors in the given commands array, ensuring each command has a color assigned. + * + * @param array $commands + * @return array + */ + protected static function fillInEmptyColors(array $commands): array + { + foreach ($commands as &$command) { + if (empty($command['color'])) { + $command['color'] = self::getColor($commands); + } + } + + return $commands; + } + + /** + * Get a color for a command, ensuring that colors are reused only after all available colors have been used at least once. + * + * @param array $commands + * @return string + */ + protected static function getColor(array $commands): string + { + $available = array_values(array_diff( + $colors = array_map(fn ($color) => $color->value, DevCommandColor::cases()), + $existing = array_values(array_filter(array_column($commands, 'color'))) + )); + + return $available[0] ?? $colors[self::$colorCount++ % count($colors)]; + } + + /** + * Prevent automatic registration of DevCommands from within vendor packages. + * + * @param string $name + * @return void + * + * @throws Exception + */ + protected static function preventVendorRegistration(string $name) + { + $trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS); + + foreach ($trace as $frame) { + $file = $frame['file'] ?? null; + $class = $frame['class'] ?? null; + + if ($class === self::class) { + continue; + } + + if (! $file && $class) { + $file = (new ReflectionClass($class))->getFileName(); + } + + if ($file === base_path('artisan')) { + continue; + } + + if (! $file) { + continue; + } + + if (! str_contains($file, base_path('vendor'))) { + // We found at least one frame that came from userland code, we're good... + return; + } + } + + throw new Exception( + "DevCommands should be registered in application code, not within vendor packages. Attempted to register command: {$name}" + ); + } + + /** + * Set the commands that should be included when running the "dev" command. + * + * @param string ...$names + * @return void + */ + public static function only(...$names): void + { + self::$only = $names; + } + + /** + * Set the commands that should be excluded when running the "dev" command. + * + * @param string ...$names + * @return void + */ + public static function except(...$names): void + { + self::$except = $names; + } + + /** + * Derive a command name from the given command string by taking the first word. + * + * @param string $command + * @return string + */ + protected static function nameFromCommand(string $command): string + { + return strstr($command, ' ', true); + } + + /** + * Resolve and return the NodePackageManager instance. + * + * @return NodePackageManager + */ + protected static function getPackageManager(): NodePackageManager + { + return self::$packageManager ??= new NodePackageManager(); + } + + /** + * Clear all registered development commands and reset the state of the DevCommands class. + * + * @return void + */ + public static function clear(): void + { + self::$commands = []; + self::$except = []; + self::$only = []; + self::$colorCount = 0; + } +} diff --git a/src/Illuminate/Foundation/Exceptions/Handler.php b/src/Illuminate/Foundation/Exceptions/Handler.php index 811dc10b..fde694da 100644 --- a/src/Illuminate/Foundation/Exceptions/Handler.php +++ b/src/Illuminate/Foundation/Exceptions/Handler.php @@ -17,7 +17,6 @@ use Illuminate\Contracts\Foundation\ExceptionRenderer; use Illuminate\Contracts\Support\Responsable; use Illuminate\Database\Eloquent\ModelNotFoundException; -use Illuminate\Database\MultipleRecordsFoundException; use Illuminate\Database\RecordNotFoundException; use Illuminate\Database\RecordsNotFoundException; use Illuminate\Foundation\Exceptions\Renderer\Renderer; @@ -161,7 +160,6 @@ class Handler implements ExceptionHandlerContract HttpException::class, HttpResponseException::class, ModelNotFoundException::class, - MultipleRecordsFoundException::class, OriginMismatchException::class, RecordNotFoundException::class, RecordsNotFoundException::class, diff --git a/src/Illuminate/Foundation/MaintenanceModeManager.php b/src/Illuminate/Foundation/MaintenanceModeManager.php index 4d233f44..bd859f35 100644 --- a/src/Illuminate/Foundation/MaintenanceModeManager.php +++ b/src/Illuminate/Foundation/MaintenanceModeManager.php @@ -16,6 +16,16 @@ protected function createFileDriver(): FileBasedMaintenanceMode return new FileBasedMaintenanceMode(); } + /** + * Create an instance of the array based maintenance driver. + * + * @return \Illuminate\Foundation\ArrayMaintenanceMode + */ + protected function createArrayDriver(): ArrayMaintenanceMode + { + return new ArrayMaintenanceMode(); + } + /** * Create an instance of the cache based maintenance driver. * diff --git a/src/Illuminate/Foundation/Providers/ArtisanServiceProvider.php b/src/Illuminate/Foundation/Providers/ArtisanServiceProvider.php index 09397ac7..aa9ca545 100755 --- a/src/Illuminate/Foundation/Providers/ArtisanServiceProvider.php +++ b/src/Illuminate/Foundation/Providers/ArtisanServiceProvider.php @@ -45,6 +45,7 @@ use Illuminate\Foundation\Console\ConfigPublishCommand; use Illuminate\Foundation\Console\ConfigShowCommand; use Illuminate\Foundation\Console\ConsoleMakeCommand; +use Illuminate\Foundation\Console\DevCommand; use Illuminate\Foundation\Console\DocsCommand; use Illuminate\Foundation\Console\DownCommand; use Illuminate\Foundation\Console\EnumMakeCommand; @@ -91,6 +92,7 @@ use Illuminate\Foundation\Console\ViewCacheCommand; use Illuminate\Foundation\Console\ViewClearCommand; use Illuminate\Foundation\Console\ViewMakeCommand; +use Illuminate\Foundation\DevCommands; use Illuminate\Notifications\Console\NotificationTableCommand; use Illuminate\Queue\Console\BatchesTableCommand; use Illuminate\Queue\Console\ClearCommand as QueueClearCommand; @@ -204,6 +206,7 @@ class ArtisanServiceProvider extends ServiceProvider implements DeferrableProvid 'ConfigPublish' => ConfigPublishCommand::class, 'ConsoleMake' => ConsoleMakeCommand::class, 'ControllerMake' => ControllerMakeCommand::class, + 'Dev' => DevCommand::class, 'Docs' => DocsCommand::class, 'EnumMake' => EnumMakeCommand::class, 'EventGenerate' => EventGenerateCommand::class, @@ -259,6 +262,16 @@ public function register() }); } + /** + * Bootstrap the application services. + * + * @return void + */ + public function boot() + { + DevCommands::registerDefaults(); + } + /** * Register the given commands. * diff --git a/src/Illuminate/Foundation/Testing/LazilyRefreshDatabase.php b/src/Illuminate/Foundation/Testing/LazilyRefreshDatabase.php index 194fc3d8..6f785e73 100644 --- a/src/Illuminate/Foundation/Testing/LazilyRefreshDatabase.php +++ b/src/Illuminate/Foundation/Testing/LazilyRefreshDatabase.php @@ -37,8 +37,10 @@ public function refreshDatabase() } }; - $database->beforeStartingTransaction($callback); - $database->beforeExecuting($callback); + foreach ($this->connectionsToTransact() as $connection) { + $database->connection($connection)->beforeStartingTransaction($callback); + $database->connection($connection)->beforeExecuting($callback); + } $this->beforeApplicationDestroyed(function () { RefreshDatabaseState::$lazilyRefreshed = false; diff --git a/src/Illuminate/Foundation/resources/exceptions/renderer/dist/scripts.js b/src/Illuminate/Foundation/resources/exceptions/renderer/dist/scripts.js index 7569eff7..0c985350 100644 --- a/src/Illuminate/Foundation/resources/exceptions/renderer/dist/scripts.js +++ b/src/Illuminate/Foundation/resources/exceptions/renderer/dist/scripts.js @@ -1,21 +1,21 @@ -var lr=!1,ur=!1,ot=[],pr=-1,Wr=!1;function Ql(e){tu(e)}function Jl(){Wr=!0}function eu(){Wr=!1,io()}function tu(e){ot.includes(e)||ot.push(e),io()}function nu(e){let t=ot.indexOf(e);t!==-1&&t>pr&&ot.splice(t,1)}function io(){if(!ur&&!lr){if(Wr)return;lr=!0,queueMicrotask(au)}}function au(){lr=!1,ur=!0;for(let e=0;ee.effect(t,{scheduler:n=>{dr?Ql(n):n()}}),so=e.raw}function Mi(e){_t=e}function su(e){let t=()=>{};return[a=>{let r=_t(a);return e._x_effects||(e._x_effects=new Set,e._x_runEffects=()=>{e._x_effects.forEach(i=>i())}),e._x_effects.add(r),t=()=>{r!==void 0&&(e._x_effects.delete(r),Bt(r))},r},()=>{t()}]}function oo(e,t){let n=!0,a,r=_t(()=>{let i=e();if(JSON.stringify(i),!n&&(typeof i=="object"||i!==a)){let s=a;queueMicrotask(()=>{t(i,s)})}a=i,n=!1});return()=>Bt(r)}async function ou(e){Jl();try{await e(),await Promise.resolve()}finally{eu()}}var co=[],lo=[],uo=[];function cu(e){uo.push(e)}function Vr(e,t){typeof t=="function"?(e._x_cleanups||(e._x_cleanups=[]),e._x_cleanups.push(t)):(t=e,lo.push(t))}function po(e){co.push(e)}function mo(e,t,n){e._x_attributeCleanups||(e._x_attributeCleanups={}),e._x_attributeCleanups[t]||(e._x_attributeCleanups[t]=[]),e._x_attributeCleanups[t].push(n)}function ho(e,t){e._x_attributeCleanups&&Object.entries(e._x_attributeCleanups).forEach(([n,a])=>{(t===void 0||t.includes(n))&&(a.forEach(r=>r()),delete e._x_attributeCleanups[n])})}function lu(e){for(e._x_effects?.forEach(nu);e._x_cleanups?.length;)e._x_cleanups.pop()()}var Zr=new MutationObserver(Qr),Yr=!1;function Xr(){Zr.observe(document,{subtree:!0,childList:!0,attributes:!0,attributeOldValue:!0}),Yr=!0}function go(){uu(),Zr.disconnect(),Yr=!1}var tn=[];function uu(){let e=Zr.takeRecords();tn.push(()=>e.length>0&&Qr(e));let t=tn.length;queueMicrotask(()=>{if(tn.length===t)for(;tn.length>0;)tn.shift()()})}function z(e){if(!Yr)return e();go();let t=e();return Xr(),t}var Kr=!1,la=[];function pu(){Kr=!0}function du(){Kr=!1,Qr(la),la=[]}function Qr(e){if(Kr){la=la.concat(e);return}let t=[],n=new Set,a=new Map,r=new Map;for(let i=0;i{s.nodeType===1&&s._x_marker&&n.add(s)}),e[i].addedNodes.forEach(s=>{if(s.nodeType===1){if(n.has(s)){n.delete(s);return}s._x_marker||t.push(s)}})),e[i].type==="attributes")){let s=e[i].target,o=e[i].attributeName,c=e[i].oldValue,l=()=>{a.has(s)||a.set(s,[]),a.get(s).push({name:o,value:s.getAttribute(o)})},u=()=>{r.has(s)||r.set(s,[]),r.get(s).push(o)};s.hasAttribute(o)&&c===null?l():s.hasAttribute(o)?(u(),l()):u()}r.forEach((i,s)=>{ho(s,i)}),a.forEach((i,s)=>{co.forEach(o=>o(s,i))});for(let i of n)t.some(s=>s.contains(i))||lo.forEach(s=>s(i));for(let i of t)i.isConnected&&uo.forEach(s=>s(i));t=null,n=null,a=null,r=null}function fo(e){return mt(dt(e))}function Fn(e,t,n){return e._x_dataStack=[t,...dt(n||e)],()=>{e._x_dataStack=e._x_dataStack.filter(a=>a!==t)}}function dt(e){return e._x_dataStack?e._x_dataStack:typeof ShadowRoot=="function"&&e instanceof ShadowRoot?dt(e.host):e.parentNode?dt(e.parentNode):[]}function mt(e){return new Proxy({objects:e},mu)}var mu={ownKeys({objects:e}){return Array.from(new Set(e.flatMap(t=>Object.keys(t))))},has({objects:e},t){return t==Symbol.unscopables?!1:e.some(n=>Object.prototype.hasOwnProperty.call(n,t)||Reflect.has(n,t))},get({objects:e},t,n){return t=="toJSON"?hu:Reflect.get(e.find(a=>Reflect.has(a,t))||{},t,n)},set({objects:e},t,n,a){const r=e.find(s=>Object.prototype.hasOwnProperty.call(s,t))||e[e.length-1],i=Object.getOwnPropertyDescriptor(r,t);return i?.set&&i?.get?i.set.call(a,n)||!0:Reflect.set(r,t,n)}};function hu(){return Reflect.ownKeys(this).reduce((t,n)=>(t[n]=Reflect.get(this,n),t),{})}function Jr(e){let t=a=>typeof a=="object"&&!Array.isArray(a)&&a!==null,n=(a,r="")=>{Object.entries(Object.getOwnPropertyDescriptors(a)).forEach(([i,{value:s,enumerable:o}])=>{if(o===!1||s===void 0||typeof s=="object"&&s!==null&&s.__v_skip)return;let c=r===""?i:`${r}.${i}`;typeof s=="object"&&s!==null&&s._x_interceptor?a[i]=s.initialize(e,c,i):t(s)&&s!==a&&!(s instanceof Element)&&n(s,c)})};return n(e)}function bo(e,t=()=>{}){let n={initialValue:void 0,_x_interceptor:!0,initialize(a,r,i){return e(this.initialValue,()=>gu(a,r),s=>mr(a,r,s),r,i)}};return t(n),a=>{if(typeof a=="object"&&a!==null&&a._x_interceptor){let r=n.initialize.bind(n);n.initialize=(i,s,o)=>{let c=a.initialize(i,s,o);return n.initialValue=c,r(i,s,o)}}else n.initialValue=a;return n}}function gu(e,t){return t.split(".").reduce((n,a)=>n[a],e)}function mr(e,t,n){if(typeof t=="string"&&(t=t.split(".")),t.length===1)e[t[0]]=n;else{if(t.length===0)throw error;return e[t[0]]||(e[t[0]]={}),mr(e[t[0]],t.slice(1),n)}}var _o={};function ve(e,t){_o[e]=t}function fn(e,t){let n=fu(t);return Object.entries(_o).forEach(([a,r])=>{Object.defineProperty(e,`$${a}`,{get(){return r(t,n)},enumerable:!1})}),e}function fu(e){let[t,n]=Fo(e),a={interceptor:bo,...t};return Vr(e,n),a}function bu(e,t,n,...a){try{return n(...a)}catch(r){bn(r,e,t)}}function bn(...e){return yo(...e)}var yo=yu;function _u(e){yo=e}function yu(e,t,n=void 0){e=Object.assign(e??{message:"No error message given."},{el:t,expression:n}),console.warn(`Alpine Expression Error: ${e.message} +var e=Object.defineProperty,t=(t,n)=>{let r={};for(var i in t)e(r,i,{get:t[i],enumerable:!0});return n||e(r,Symbol.toStringTag,{value:`Module`}),r},n=!1,r=!1,i=[],a=-1,o=!1;function s(e){u(e)}function c(){o=!0}function l(){o=!1,f()}function u(e){i.includes(e)||i.push(e),f()}function d(e){let t=i.indexOf(e);t!==-1&&t>a&&i.splice(t,1)}function f(){if(!r&&!n){if(o)return;n=!0,queueMicrotask(p)}}function p(){n=!1,r=!0;for(let e=0;ee.effect(t,{scheduler:e=>{v?s(e):e()}}),_=e.raw}function x(e){h=e}function S(e){let t=()=>{};return[n=>{let r=h(n);return e._x_effects||(e._x_effects=new Set,e._x_runEffects=()=>{e._x_effects.forEach(e=>e())}),e._x_effects.add(r),t=()=>{r!==void 0&&(e._x_effects.delete(r),g(r))},r},()=>{t()}]}function C(e,t){let n=!0,r,i=h(()=>{let i=e();if(JSON.stringify(i),!n&&(typeof i==`object`||i!==r)){let e=r;queueMicrotask(()=>{t(i,e)})}r=i,n=!1});return()=>g(i)}async function w(e){c();try{await e(),await Promise.resolve()}finally{l()}}var T=[],E=[],D=[];function O(e){D.push(e)}function k(e,t){typeof t==`function`?(e._x_cleanups||=[],e._x_cleanups.push(t)):(t=e,E.push(t))}function ee(e){T.push(e)}function A(e,t,n){e._x_attributeCleanups||={},e._x_attributeCleanups[t]||(e._x_attributeCleanups[t]=[]),e._x_attributeCleanups[t].push(n)}function j(e,t){e._x_attributeCleanups&&Object.entries(e._x_attributeCleanups).forEach(([n,r])=>{(t===void 0||t.includes(n))&&(r.forEach(e=>e()),delete e._x_attributeCleanups[n])})}function M(e){for(e._x_effects?.forEach(d);e._x_cleanups?.length;)e._x_cleanups.pop()()}var te=new MutationObserver(de),ne=!1;function re(){te.observe(document,{subtree:!0,childList:!0,attributes:!0,attributeOldValue:!0}),ne=!0}function ie(){oe(),te.disconnect(),ne=!1}var ae=[];function oe(){let e=te.takeRecords();ae.push(()=>e.length>0&&de(e));let t=ae.length;queueMicrotask(()=>{if(ae.length===t)for(;ae.length>0;)ae.shift()()})}function N(e){if(!ne)return e();ie();let t=e();return re(),t}var se=!1,ce=[];function le(){se=!0}function ue(){se=!1,de(ce),ce=[]}function de(e){if(se){ce=ce.concat(e);return}let t=[],n=new Set,r=new Map,i=new Map;for(let a=0;a{e.nodeType===1&&e._x_marker&&n.add(e)}),e[a].addedNodes.forEach(e=>{if(e.nodeType===1){if(n.has(e)){n.delete(e);return}e._x_marker||t.push(e)}})),e[a].type===`attributes`)){let t=e[a].target,n=e[a].attributeName,o=e[a].oldValue,s=()=>{r.has(t)||r.set(t,[]),r.get(t).push({name:n,value:t.getAttribute(n)})},c=()=>{i.has(t)||i.set(t,[]),i.get(t).push(n)};t.hasAttribute(n)&&o===null?s():t.hasAttribute(n)?(c(),s()):c()}i.forEach((e,t)=>{j(t,e)}),r.forEach((e,t)=>{T.forEach(n=>n(t,e))});for(let e of n)t.some(t=>t.contains(e))||E.forEach(t=>t(e));for(let e of t)e.isConnected&&D.forEach(t=>t(e));t=null,n=null,r=null,i=null}function fe(e){return he(me(e))}function pe(e,t,n){return e._x_dataStack=[t,...me(n||e)],()=>{e._x_dataStack=e._x_dataStack.filter(e=>e!==t)}}function me(e){return e._x_dataStack?e._x_dataStack:typeof ShadowRoot==`function`&&e instanceof ShadowRoot?me(e.host):e.parentNode?me(e.parentNode):[]}function he(e){return new Proxy({objects:e},ge)}var ge={ownKeys({objects:e}){return Array.from(new Set(e.flatMap(e=>Object.keys(e))))},has({objects:e},t){return t==Symbol.unscopables?!1:e.some(e=>Object.prototype.hasOwnProperty.call(e,t)||Reflect.has(e,t))},get({objects:e},t,n){return t==`toJSON`?_e:Reflect.get(e.find(e=>Reflect.has(e,t))||{},t,n)},set({objects:e},t,n,r){let i=e.find(e=>Object.prototype.hasOwnProperty.call(e,t))||e[e.length-1],a=Object.getOwnPropertyDescriptor(i,t);return a?.set&&a?.get?a.set.call(r,n)||!0:Reflect.set(i,t,n)}};function _e(){return Reflect.ownKeys(this).reduce((e,t)=>(e[t]=Reflect.get(this,t),e),{})}function ve(e){let t=e=>typeof e==`object`&&!Array.isArray(e)&&e!==null,n=(r,i=``)=>{Object.entries(Object.getOwnPropertyDescriptors(r)).forEach(([a,{value:o,enumerable:s}])=>{if(s===!1||o===void 0||typeof o==`object`&&o&&o.__v_skip)return;let c=i===``?a:`${i}.${a}`;typeof o==`object`&&o&&o._x_interceptor?r[a]=o.initialize(e,c,a):t(o)&&o!==r&&!(o instanceof Element)&&n(o,c)})};return n(e)}function ye(e,t=()=>{}){let n={initialValue:void 0,_x_interceptor:!0,initialize(t,n,r){return e(this.initialValue,()=>be(t,n),e=>xe(t,n,e),n,r)}};return t(n),e=>{if(typeof e==`object`&&e&&e._x_interceptor){let t=n.initialize.bind(n);n.initialize=(r,i,a)=>(n.initialValue=e.initialize(r,i,a),t(r,i,a))}else n.initialValue=e;return n}}function be(e,t){return t.split(`.`).reduce((e,t)=>e[t],e)}function xe(e,t,n){if(typeof t==`string`&&(t=t.split(`.`)),t.length===1)e[t[0]]=n;else if(t.length===0)throw error;else if(e[t[0]])return xe(e[t[0]],t.slice(1),n);else return e[t[0]]={},xe(e[t[0]],t.slice(1),n)}var Se={};function P(e,t){Se[e]=t}function F(e,t){let n=Ce(t);return Object.entries(Se).forEach(([r,i])=>{Object.defineProperty(e,`$${r}`,{get(){return i(t,n)},enumerable:!1})}),e}function Ce(e){let[t,n]=tt(e),r={interceptor:ye,...t};return k(e,n),r}function we(e,t,n,...r){try{return n(...r)}catch(n){Te(n,e,t)}}function Te(...e){return Ee(...e)}var Ee=Oe;function De(e){Ee=e}function Oe(e,t,n=void 0){e=Object.assign(e??{message:`No error message given.`},{el:t,expression:n}),console.warn(`Alpine Expression Error: ${e.message} -${n?'Expression: "'+n+`" +${n?`Expression: "`+n+`" -`:""}`,t),setTimeout(()=>{throw e},0)}var Rt=!0;function vo(e){let t=Rt;Rt=!1;let n=e();return Rt=t,n}function ct(e,t,n={}){let a;return ne(e,t)(r=>a=r,n),a}function ne(...e){return wo(...e)}var wo=ko;function vu(e){wo=e}var xo;function wu(e){xo=e}function ko(e,t){let n={};fn(n,e);let a=[n,...dt(e)],r=typeof t=="function"?xu(a,t):Cu(a,t,e);return bu.bind(null,e,t,r)}function xu(e,t){return(n=()=>{},{scope:a={},params:r=[],context:i}={})=>{if(!Rt){_n(n,t,mt([a,...e]),r);return}let s=t.apply(mt([a,...e]),r);_n(n,s)}}var za={};function ku(e,t){if(za[e])return za[e];let n=Object.getPrototypeOf(async function(){}).constructor,a=/^[\n\s]*if.*\(.*\)/.test(e.trim())||/^(let|const)\s/.test(e.trim())?`(async()=>{ ${e} })()`:e,i=(()=>{try{let s=new n(["__self","scope"],`with (scope) { __self.result = ${a} }; __self.finished = true; return __self.result;`);return Object.defineProperty(s,"name",{value:`[Alpine] ${e}`}),s}catch(s){return bn(s,t,e),Promise.resolve()}})();return za[e]=i,i}function Cu(e,t,n){let a=ku(t,n);return(r=()=>{},{scope:i={},params:s=[],context:o}={})=>{a.result=void 0,a.finished=!1;let c=mt([i,...e]);if(typeof a=="function"){let l=a.call(o,a,c).catch(u=>bn(u,n,t));a.finished?(_n(r,a.result,c,s,n),a.result=void 0):l.then(u=>{_n(r,u,c,s,n)}).catch(u=>bn(u,n,t)).finally(()=>a.result=void 0)}}}function _n(e,t,n,a,r){if(Rt&&typeof t=="function"){let i=t.apply(n,a);i instanceof Promise?i.then(s=>_n(e,s,n,a)).catch(s=>bn(s,r,t)):e(i)}else typeof t=="object"&&t instanceof Promise?t.then(i=>e(i)):e(t)}function Eu(...e){return xo(...e)}function Fu(e,t,n={}){let a={};fn(a,e);let r=[a,...dt(e)],i=mt([n.scope??{},...r]),s=n.params??[];if(t.includes("await")){let o=Object.getPrototypeOf(async function(){}).constructor,c=/^[\n\s]*if.*\(.*\)/.test(t.trim())||/^(let|const)\s/.test(t.trim())?`(async()=>{ ${t} })()`:t;return new o(["scope"],`with (scope) { let __result = ${c}; return __result }`).call(n.context,i)}else{let o=/^[\n\s]*if.*\(.*\)/.test(t.trim())||/^(let|const)\s/.test(t.trim())?`(()=>{ ${t} })()`:t,l=new Function(["scope"],`with (scope) { let __result = ${o}; return __result }`).call(n.context,i);return typeof l=="function"&&Rt?l.apply(i,s):l}}var ei="x-";function Ut(e=""){return ei+e}function $u(e){ei=e}var ua={};function W(e,t){return ua[e]=t,{before(n){if(!ua[n]){console.warn(String.raw`Cannot find directive \`${n}\`. \`${e}\` will use the default order of execution`);return}const a=rt.indexOf(n);rt.splice(a>=0?a:rt.indexOf("DEFAULT"),0,e)}}}function ju(e){return Object.keys(ua).includes(e)}function ti(e,t,n){if(t=Array.from(t),e._x_virtualDirectives){let i=Object.entries(e._x_virtualDirectives).map(([o,c])=>({name:o,value:c})),s=Co(i);i=i.map(o=>s.find(c=>c.name===o.name)?{name:`x-bind:${o.name}`,value:`"${o.value}"`}:o),t=t.concat(i)}let a={};return t.map(So((i,s)=>a[i]=s)).filter(To).map(Tu(a,n)).sort(Ru).map(i=>Au(e,i))}function Co(e){return Array.from(e).map(So()).filter(t=>!To(t))}var hr=!1,on=new Map,Eo=Symbol();function Su(e){hr=!0;let t=Symbol();Eo=t,on.set(t,[]);let n=()=>{for(;on.get(t).length;)on.get(t).shift()();on.delete(t)},a=()=>{hr=!1,n()};e(n),a()}function Fo(e){let t=[],n=o=>t.push(o),[a,r]=su(e);return t.push(r),[{Alpine:Ht,effect:a,cleanup:n,evaluateLater:ne.bind(ne,e),evaluate:ct.bind(ct,e)},()=>t.forEach(o=>o())]}function Au(e,t){let n=()=>{},a=ua[t.type]||n,[r,i]=Fo(e);mo(e,t.original,i);let s=()=>{e._x_ignore||e._x_ignoreSelf||(a.inline&&a.inline(e,t,r),a=a.bind(a,e,t,r),hr?on.get(Eo).push(a):a())};return s.runCleanups=i,s}var $o=(e,t)=>({name:n,value:a})=>(n.startsWith(e)&&(n=n.replace(e,t)),{name:n,value:a}),jo=e=>e;function So(e=()=>{}){return({name:t,value:n})=>{let{name:a,value:r}=Ao.reduce((i,s)=>s(i),{name:t,value:n});return a!==t&&e(a,t),{name:a,value:r}}}var Ao=[];function ni(e){Ao.push(e)}function To({name:e}){return Ro().test(e)}var Ro=()=>new RegExp(`^${ei}([^:^.]+)\\b`);function Tu(e,t){return({name:n,value:a})=>{n===a&&(a="");let r=n.match(Ro()),i=n.match(/:([a-zA-Z0-9\-_:]+)/),s=n.match(/\.[^.\]]+(?=[^\]]*$)/g)||[],o=t||e[n]||n;return{type:r?r[1]:null,value:i?i[1]:null,modifiers:s.map(c=>c.replace(".","")),expression:a,original:o}}}var gr="DEFAULT",rt=["ignore","ref","data","id","anchor","bind","init","for","model","modelable","transition","show","if",gr,"teleport"];function Ru(e,t){let n=rt.indexOf(e.type)===-1?gr:e.type,a=rt.indexOf(t.type)===-1?gr:t.type;return rt.indexOf(n)-rt.indexOf(a)}function ln(e,t,n={}){e.dispatchEvent(new CustomEvent(t,{detail:n,bubbles:!0,composed:!0,cancelable:!0}))}function ht(e,t){if(typeof ShadowRoot=="function"&&e instanceof ShadowRoot){Array.from(e.children).forEach(r=>ht(r,t));return}let n=!1;if(t(e,()=>n=!0),n)return;let a=e.firstElementChild;for(;a;)ht(a,t),a=a.nextElementSibling}function pe(e,...t){console.warn(`Alpine Warning: ${e}`,...t)}var qi=!1;function Ou(){qi&&pe("Alpine has already been initialized on this page. Calling Alpine.start() more than once can cause problems."),qi=!0,document.body||pe("Unable to initialize. Trying to load Alpine before `` is available. Did you forget to add `defer` in Alpine's `