diff --git a/app/Console/Commands/SendRemindMail.php b/app/Console/Commands/SendRemindMail.php index 672c37a..996d148 100644 --- a/app/Console/Commands/SendRemindMail.php +++ b/app/Console/Commands/SendRemindMail.php @@ -39,11 +39,16 @@ class SendRemindMail extends Command */ public function handle() { + if (!(bool) admin_setting('remind_mail_enable', false)) { + return; + } $users = User::all(); $mailService = new MailService(); foreach ($users as $user) { - if ($user->remind_expire) $mailService->remindExpire($user); - if ($user->remind_traffic) $mailService->remindTraffic($user); + if ($user->remind_expire) + $mailService->remindExpire($user); + if ($user->remind_traffic) + $mailService->remindTraffic($user); } } } diff --git a/app/Http/Controllers/V1/Server/UniProxyController.php b/app/Http/Controllers/V1/Server/UniProxyController.php index 5075f6c..7deb417 100644 --- a/app/Http/Controllers/V1/Server/UniProxyController.php +++ b/app/Http/Controllers/V1/Server/UniProxyController.php @@ -88,7 +88,10 @@ class UniProxyController extends Controller 'network_settings' => $protocolSettings['network_settings'], 'tls' => $protocolSettings['tls'], 'flow' => $protocolSettings['flow'], - 'tls_settings' => $protocolSettings['tls_settings'] + 'tls_settings' => match ((int) $protocolSettings['tls']) { + 1 => $protocolSettings['tls_settings'], + 2 => $protocolSettings['reality_settings'] + } ], 'hysteria' => [ 'version' => $protocolSettings['version'], diff --git a/app/Http/Controllers/V2/Admin/ConfigController.php b/app/Http/Controllers/V2/Admin/ConfigController.php index 92d2d82..2e026ec 100644 --- a/app/Http/Controllers/V2/Admin/ConfigController.php +++ b/app/Http/Controllers/V2/Admin/ConfigController.php @@ -107,6 +107,7 @@ class ConfigController extends Controller 'show_protocol_to_server_enable' => (bool) admin_setting('show_protocol_to_server_enable', 0), 'default_remind_expire' => (bool) admin_setting('default_remind_expire', 1), 'default_remind_traffic' => (bool) admin_setting('default_remind_traffic', 1), + 'remind_mail_enable' => (bool) admin_setting('remind_mail_enable', false), ], 'frontend' => [ diff --git a/app/Http/Controllers/V2/Admin/Server/ManageController.php b/app/Http/Controllers/V2/Admin/Server/ManageController.php index a2fd836..d4b8ee9 100644 --- a/app/Http/Controllers/V2/Admin/Server/ManageController.php +++ b/app/Http/Controllers/V2/Admin/Server/ManageController.php @@ -114,6 +114,7 @@ class ManageController extends Controller { $server = Server::find($request->input('id')); $server->show = 0; + $server->code = null; if (!$server) { return $this->fail([400202, '服务器不存在']); } diff --git a/app/Http/Controllers/V2/Admin/StatController.php b/app/Http/Controllers/V2/Admin/StatController.php index 7f6148d..ed8229b 100644 --- a/app/Http/Controllers/V2/Admin/StatController.php +++ b/app/Http/Controllers/V2/Admin/StatController.php @@ -57,41 +57,131 @@ class StatController extends Controller ]; } + /** + * Get order statistics with filtering and pagination + * + * @param Request $request + * @return array + */ public function getOrder(Request $request) { - $statistics = Stat::where('record_type', 'd') - ->limit(31) - ->orderBy('record_at', 'DESC') + $request->validate([ + 'start_date' => 'nullable|date_format:Y-m-d', + 'end_date' => 'nullable|date_format:Y-m-d', + 'type' => 'nullable|in:paid_total,paid_count,commission_total,commission_count', + 'page' => 'nullable|integer|min:1', + 'page_size' => 'nullable|integer|min:1|max:100' + ]); + + $query = Stat::where('record_type', 'd'); + + // Apply date filters + if ($request->input('start_date')) { + $query->where('record_at', '>=', strtotime($request->input('start_date'))); + } + if ($request->input('end_date')) { + $query->where('record_at', '<=', strtotime($request->input('end_date') . ' 23:59:59')); + } + + // Get total count for pagination + $total = $query->count(); + + // Apply pagination + $pageSize = $request->input('page_size', 31); + $page = $request->input('page', 1); + + $statistics = $query->orderBy('record_at', 'DESC') + ->forPage($page, $pageSize) ->get() ->toArray(); - $result = []; - foreach ($statistics as $statistic) { - $date = date('m-d', $statistic['record_at']); - $result[] = [ - 'type' => '收款金额', - 'date' => $date, - 'value' => $statistic['paid_total'] / 100 - ]; - $result[] = [ - 'type' => '收款笔数', - 'date' => $date, - 'value' => $statistic['paid_count'] - ]; - $result[] = [ - 'type' => '佣金金额(已发放)', - 'date' => $date, - 'value' => $statistic['commission_total'] / 100 - ]; - $result[] = [ - 'type' => '佣金笔数(已发放)', - 'date' => $date, - 'value' => $statistic['commission_count'] - ]; - } - $result = array_reverse($result); - return [ - 'data' => $result + + $summary = [ + 'paid_total' => 0, + 'paid_count' => 0, + 'commission_total' => 0, + 'commission_count' => 0, + 'start_date' => $request->input('start_date', date('Y-m-d', strtotime('-30 days'))), + 'end_date' => $request->input('end_date', date('Y-m-d')), + 'avg_paid_amount' => 0, + 'avg_commission_amount' => 0 ]; + + $dailyStats = []; + foreach ($statistics as $statistic) { + $date = date('Y-m-d', $statistic['record_at']); + + // Update summary + $summary['paid_total'] += $statistic['paid_total']; + $summary['paid_count'] += $statistic['paid_count']; + $summary['commission_total'] += $statistic['commission_total']; + $summary['commission_count'] += $statistic['commission_count']; + + // Calculate daily stats + $dailyData = [ + 'date' => $date, + 'paid_total' => $statistic['paid_total'], + 'paid_count' => $statistic['paid_count'], + 'commission_total' => $statistic['commission_total'], + 'commission_count' => $statistic['commission_count'], + 'avg_order_amount' => $statistic['paid_count'] > 0 ? round($statistic['paid_total'] / $statistic['paid_count'], 2) : 0, + 'avg_commission_amount' => $statistic['commission_count'] > 0 ? round($statistic['commission_total'] / $statistic['commission_count'], 2) : 0 + ]; + + if ($request->input('type')) { + $dailyStats[] = [ + 'date' => $date, + 'value' => $statistic[$request->input('type')], + 'type' => $this->getTypeLabel($request->input('type')) + ]; + } else { + $dailyStats[] = $dailyData; + } + } + + // Calculate averages for summary + if ($summary['paid_count'] > 0) { + $summary['avg_paid_amount'] = round($summary['paid_total'] / $summary['paid_count'], 2); + } + if ($summary['commission_count'] > 0) { + $summary['avg_commission_amount'] = round($summary['commission_total'] / $summary['commission_count'], 2); + } + + // Add percentage calculations to summary + $summary['commission_rate'] = $summary['paid_total'] > 0 + ? round(($summary['commission_total'] / $summary['paid_total']) * 100, 2) + : 0; + + return [ + 'code' => 0, + 'message' => 'success', + 'data' => [ + 'list' => array_reverse($dailyStats), + 'summary' => $summary, + 'pagination' => [ + 'total' => $total, + 'current_page' => $page, + 'page_size' => $pageSize, + 'total_pages' => ceil($total / $pageSize) + ] + ] + ]; + } + + /** + * Get human readable label for statistic type + * + * @param string $type + * @return string + */ + private function getTypeLabel(string $type): string + { + return match ($type) { + 'paid_total' => '收款金额', + 'paid_count' => '收款笔数', + 'commission_total' => '佣金金额(已发放)', + 'commission_count' => '佣金笔数(已发放)', + default => $type + }; } // 获取当日实时流量排行 @@ -281,8 +371,8 @@ class StatController extends Controller $result[] = [ 'id' => (string) $data->id, 'name' => $name, - 'value' => round($data->value / (1024 * 1024 * 1024), 2), // Convert to GB - 'previousValue' => round($previousValue / (1024 * 1024 * 1024), 2), // Convert to GB + 'value' => $data->value, // Convert to GB + 'previousValue' => $previousValue, // Convert to GB 'change' => $change, 'timestamp' => date('c', $endDate) ]; diff --git a/app/Http/Requests/Admin/ConfigSave.php b/app/Http/Requests/Admin/ConfigSave.php index 7228c17..c28dae6 100755 --- a/app/Http/Requests/Admin/ConfigSave.php +++ b/app/Http/Requests/Admin/ConfigSave.php @@ -44,6 +44,7 @@ class ConfigSave extends FormRequest 'change_order_event_id' => '', 'show_info_to_server_enable' => '', 'show_protocol_to_server_enable' => '', + 'remind_mail_enable' => '', // server 'server_token' => 'nullable|min:16', 'server_pull_interval' => 'integer', @@ -91,8 +92,8 @@ class ConfigSave extends FormRequest 'password_limit_enable' => 'boolean', 'password_limit_count' => 'integer', 'password_limit_expire' => 'integer', - 'default_remind_expire' => 'integer|boolean', - 'default_remind_traffic' => 'integer|boolean' + 'default_remind_expire' => 'boolean', + 'default_remind_traffic' => 'boolean' ]; /** * Get the validation rules that apply to the request. diff --git a/app/Http/Requests/Admin/ServerSave.php b/app/Http/Requests/Admin/ServerSave.php index 616d92a..3b06801 100644 --- a/app/Http/Requests/Admin/ServerSave.php +++ b/app/Http/Requests/Admin/ServerSave.php @@ -72,7 +72,8 @@ class ServerSave extends FormRequest 'tls_settings.server_name' => 'nullable|string', 'tls_settings.allow_insecure' => 'nullable|boolean', 'reality_settings.allow_insecure' => 'nullable|boolean', - 'reality_settings.dest' => 'nullable|string', + 'reality_settings.server_name' => 'nullable|string', + 'reality_settings.server_port' => 'nullable|string', 'reality_settings.public_key' => 'nullable|string', 'reality_settings.private_key' => 'nullable|string', 'reality_settings.short_id' => 'nullable|string', diff --git a/app/Models/Server.php b/app/Models/Server.php index 690f854..0b89f1d 100644 --- a/app/Models/Server.php +++ b/app/Models/Server.php @@ -88,7 +88,14 @@ class Server extends Model 'flow' => null, 'network' => null, 'network_settings' => null, - 'reality_settings' => null + 'reality_settings' => [ + 'allow_insecure' => false, + 'server_port' => null, + 'server_name' => null, + 'public_key' => null, + 'private_key' => null, + 'short_id' => null + ] ], self::TYPE_SHADOWSOCKS => [ 'cipher' => null, @@ -165,6 +172,8 @@ class Server extends Model if (strpos($this->port, '-') !== false) { $this->ports = $this->port; $this->port = Helper::randomPort($this->port); + } else { + $this->port = (int) $this->port; } } diff --git a/app/Models/ServerHysteria.php b/app/Models/ServerHysteria.php deleted file mode 100755 index 35c7e90..0000000 --- a/app/Models/ServerHysteria.php +++ /dev/null @@ -1,35 +0,0 @@ - 'timestamp', - 'updated_at' => 'timestamp', - 'group_id' => 'array', - 'route_id' => 'array', - 'tags' => 'array', - 'ips' => 'array', - 'excludes' => 'array' - ]; - - // ALPN映射表 - public static $alpnMap = [ - 0 => 'hysteria', - 1 => 'http/1.1', - 2 => 'h2', - 3 => 'h3' - ]; - - public function parent(): BelongsTo - { - return $this->belongsTo(self::class, 'parent_id', 'id'); - } -} diff --git a/app/Models/ServerTrojan.php b/app/Models/ServerTrojan.php deleted file mode 100644 index 59e327b..0000000 --- a/app/Models/ServerTrojan.php +++ /dev/null @@ -1,28 +0,0 @@ - 'timestamp', - 'updated_at' => 'timestamp', - 'group_id' => 'array', - 'route_id' => 'array', - 'networkSettings' => 'array', - 'tags' => 'array', - 'excludes' => 'array', - 'ips' => 'array' - ]; - - public function parent(): BelongsTo - { - return $this->belongsTo(self::class, 'parent_id', 'id'); - } -} diff --git a/app/Models/ServerVless.php b/app/Models/ServerVless.php deleted file mode 100755 index a84b4a8..0000000 --- a/app/Models/ServerVless.php +++ /dev/null @@ -1,29 +0,0 @@ - 'timestamp', - 'updated_at' => 'timestamp', - 'group_id' => 'array', - 'route_id' => 'array', - 'tls_settings' => 'array', - 'network_settings' => 'array', - 'tags' => 'array', - 'excludes' => 'array', - 'ips' => 'array' - ]; - - public function parent(): BelongsTo - { - return $this->belongsTo(self::class, 'parent_id', 'id'); - } -} diff --git a/app/Models/ServerVmess.php b/app/Models/ServerVmess.php deleted file mode 100755 index 2aaba10..0000000 --- a/app/Models/ServerVmess.php +++ /dev/null @@ -1,31 +0,0 @@ - 'timestamp', - 'updated_at' => 'timestamp', - 'group_id' => 'array', - 'route_id' => 'array', - 'tlsSettings' => 'array', - 'networkSettings' => 'array', - 'dnsSettings' => 'array', - 'ruleSettings' => 'array', - 'tags' => 'array', - 'excludes' => 'array', - 'ips' => 'array' - ]; - - public function parent(): BelongsTo - { - return $this->belongsTo(self::class, 'parent_id', 'id'); - } -} diff --git a/app/Protocols/Clash.php b/app/Protocols/Clash.php index 2f2ad9f..271eda3 100644 --- a/app/Protocols/Clash.php +++ b/app/Protocols/Clash.php @@ -152,7 +152,7 @@ class Clash implements ProtocolInterface if (data_get($protocol_settings, 'tls')) { $array['tls'] = true; - $array['skip-cert-verify'] = data_get($protocol_settings, 'tls_settings.allow_insecure'); + $array['skip-cert-verify'] = (bool) data_get($protocol_settings, 'tls_settings.allow_insecure'); $array['servername'] = data_get($protocol_settings, 'tls_settings.server_name'); } @@ -192,7 +192,7 @@ class Clash implements ProtocolInterface $array['password'] = $password; $array['udp'] = true; $array['sni'] = data_get($protocol_settings, 'server_name'); - $array['skip-cert-verify'] = data_get($protocol_settings, 'allow_insecure'); + $array['skip-cert-verify'] = (bool) data_get($protocol_settings, 'allow_insecure'); switch (data_get($protocol_settings, 'network')) { case 'tcp': diff --git a/app/Protocols/ClashMeta.php b/app/Protocols/ClashMeta.php index 5d74771..271096a 100644 --- a/app/Protocols/ClashMeta.php +++ b/app/Protocols/ClashMeta.php @@ -151,7 +151,7 @@ class ClashMeta implements ProtocolInterface if (data_get($protocol_settings, 'tls')) { $array['tls'] = true; - $array['skip-cert-verify'] = data_get($protocol_settings, 'tls_settings.allow_insecure', false); + $array['skip-cert-verify'] = (bool) data_get($protocol_settings, 'tls_settings.allow_insecure', false); $array['servername'] = data_get($protocol_settings, 'tls_settings.server_name'); } @@ -195,18 +195,18 @@ class ClashMeta implements ProtocolInterface 'alterId' => 0, 'cipher' => 'auto', 'udp' => true, - 'flow' => data_get($server, 'flow') + 'flow' => data_get($protocol_settings, 'flow') ]; switch (data_get($protocol_settings, 'tls')) { case 1: $array['tls'] = true; - $array['skip-cert-verify'] = data_get($protocol_settings, 'tls_settings.allow_insecure', false); + $array['skip-cert-verify'] = (bool) data_get($protocol_settings, 'tls_settings.allow_insecure', false); $array['servername'] = data_get($protocol_settings, 'tls_settings.server_name'); break; case 2: $array['tls'] = true; - $array['skip-cert-verify'] = data_get($protocol_settings, 'reality_settings.allow_insecure', false); + $array['skip-cert-verify'] = (bool) data_get($protocol_settings, 'reality_settings.allow_insecure', false); $array['servername'] = data_get($protocol_settings, 'reality_settings.server_name'); $array['reality-opts'] = [ 'public-key' => data_get($protocol_settings, 'reality_settings.public_key'), @@ -257,7 +257,7 @@ class ClashMeta implements ProtocolInterface 'password' => $password, 'udp' => true, 'sni' => data_get($settings, 'server_name'), - 'skip-cert-verify' => data_get($settings, 'allow_insecure', false) + 'skip-cert-verify' => (bool) data_get($settings, 'allow_insecure', false) ]; switch (data_get($settings, 'network')) { @@ -291,7 +291,7 @@ class ClashMeta implements ProtocolInterface 'sni' => data_get($protocol_settings, 'tls.server_name'), 'up' => data_get($protocol_settings, 'bandwidth.up'), 'down' => data_get($protocol_settings, 'bandwidth.down'), - 'skip-cert-verify' => data_get($protocol_settings, 'tls.allow_insecure', false), + 'skip-cert-verify' => (bool) data_get($protocol_settings, 'tls.allow_insecure', false), ]; if (isset($server['ports'])) { $array['ports'] = $server['ports']; diff --git a/app/Protocols/SingBox.php b/app/Protocols/SingBox.php index abff1d4..4d7eacd 100644 --- a/app/Protocols/SingBox.php +++ b/app/Protocols/SingBox.php @@ -127,7 +127,7 @@ class SingBox implements ProtocolInterface 'transport' => [], 'tls' => $protocol_settings['tls'] ? [ 'enabled' => true, - 'insecure' => data_get($protocol_settings, 'tls_settings.allow_insecure'), + 'insecure' => (bool) data_get($protocol_settings, 'tls_settings.allow_insecure'), 'server_name' => data_get($protocol_settings, 'tls_settings.server_name') ] : null ]; @@ -166,14 +166,14 @@ class SingBox implements ProtocolInterface "server" => $server['host'], "server_port" => $server['port'], "uuid" => $password, - "packet_encoding" => "xudp" + "packet_encoding" => "xudp", + 'flow' => data_get($protocol_settings, 'flow', ''), ]; if ($protocol_settings['tls']) { $tlsConfig = [ 'enabled' => true, - 'flow' => data_get($protocol_settings, 'flow', ''), - 'insecure' => data_get($protocol_settings, 'tls_settings.allow_insecure'), + 'insecure' => (bool) data_get($protocol_settings, 'tls_settings.allow_insecure'), 'server_name' => data_get($protocol_settings, 'tls_settings.server_name'), 'utls' => [ 'enabled' => true, @@ -233,7 +233,7 @@ class SingBox implements ProtocolInterface 'password' => $password, 'tls' => [ 'enabled' => true, - 'insecure' => data_get($protocol_settings, 'allow_insecure', false), + 'insecure' => (bool) data_get($protocol_settings, 'allow_insecure', false), 'server_name' => data_get($protocol_settings, 'server_name') ] ]; @@ -255,7 +255,7 @@ class SingBox implements ProtocolInterface return $array; } - protected function buildHysteria($password, $server, $user): array + protected function buildHysteria($password, $server): array { $protocol_settings = $server['protocol_settings']; $baseConfig = [ @@ -264,7 +264,7 @@ class SingBox implements ProtocolInterface 'tag' => $server['name'], 'tls' => [ 'enabled' => true, - 'insecure' => $protocol_settings['tls']['allow_insecure'], + 'insecure' => (bool) $protocol_settings['tls']['allow_insecure'], 'server_name' => $protocol_settings['tls']['server_name'] ] ]; @@ -272,7 +272,7 @@ class SingBox implements ProtocolInterface 'up_mbps' => $protocol_settings['bandwidth']['up'], 'down_mbps' => $protocol_settings['bandwidth']['down'], ]; - $versionConfig = match ($server['version'] ?? 1) { + $versionConfig = match (data_get($protocol_settings, 'version', 1)) { 2 => [ 'type' => 'hysteria2', 'password' => $password, diff --git a/app/Utils/Helper.php b/app/Utils/Helper.php index 7f81d8c..9d5a6f6 100644 --- a/app/Utils/Helper.php +++ b/app/Utils/Helper.php @@ -119,9 +119,9 @@ class Helper return $subscribeUrl ? rtrim($subscribeUrl, '/') . $path : url($path); } - public static function randomPort($range) { + public static function randomPort($range): int { $portRange = explode('-', $range); - return rand($portRange[0], $portRange[1]); + return random_int($portRange[0], $portRange[1]); } public static function base64EncodeUrlSafe($data) diff --git a/composer.json b/composer.json index bcc858c..e5eba2c 100755 --- a/composer.json +++ b/composer.json @@ -29,7 +29,8 @@ "stripe/stripe-php": "^7.36.1", "symfony/http-client": "^6.4", "symfony/mailgun-mailer": "^6.4", - "symfony/yaml": "*" + "symfony/yaml": "*", + "zoujingli/ip2region": "^2.0" }, "require-dev": { "barryvdh/laravel-debugbar": "^3.9", diff --git a/config/database.php b/config/database.php index df5152c..7c0c3ab 100755 --- a/config/database.php +++ b/config/database.php @@ -59,8 +59,14 @@ return [ 'strict' => true, 'engine' => null, 'options' => (extension_loaded('pdo_mysql') ? array_filter([ - PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA') - ]) : []) + [ \PDO::ATTR_PERSISTENT => true ], + PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'), + PDO::ATTR_PERSISTENT => false, + ]) : []), + 'pool' => [ + 'min_connections' => 1, + 'max_connections' => 10, + 'idle_timeout' => 60, + ], ], 'pgsql' => [ diff --git a/database/migrations/2025_01_05_131425_create_v2_server_table.php b/database/migrations/2025_01_05_131425_create_v2_server_table.php index e6013f8..2fc3a39 100644 --- a/database/migrations/2025_01_05_131425_create_v2_server_table.php +++ b/database/migrations/2025_01_05_131425_create_v2_server_table.php @@ -23,7 +23,7 @@ return new class extends Migration { $table->integer('rate')->comment('Traffic Rate'); $table->json('tags')->nullable()->comment('Server Tags'); $table->string('host')->comment('Server Host'); - $table->integer('port')->comment('Client Port'); + $table->string('port')->comment('Client Port'); $table->integer('server_port')->comment('Server Port'); $table->json('protocol_settings')->nullable(); $table->boolean('show')->default(false)->comment('Show in List'); @@ -45,7 +45,7 @@ return new class extends Migration { 'rate' => (int) $server->rate, 'tags' => $server->tags ?: "[]", 'host' => $server->host, - 'port' => (int) $server->port, + 'port' => $server->port, 'server_port' => $server->server_port, 'protocol_settings' => json_encode([ 'allow_insecure' => $server->allow_insecure, @@ -73,7 +73,7 @@ return new class extends Migration { 'rate' => (int) $server->rate, 'tags' => $server->tags ?: "[]", 'host' => $server->host, - 'port' => (int) $server->port, + 'port' => $server->port, 'server_port' => $server->server_port, 'protocol_settings' => json_encode([ 'tls' => $server->tls, @@ -103,7 +103,7 @@ return new class extends Migration { 'rate' => (int) $server->rate, 'tags' => $server->tags ?: "[]", 'host' => $server->host, - 'port' => (int) $server->port, + 'port' => $server->port, 'server_port' => $server->server_port, 'protocol_settings' => json_encode([ 'tls' => $server->tls, @@ -114,7 +114,8 @@ return new class extends Migration { 'reality_settings' => ($tlsSettings && $tlsSettings->public_key && $tlsSettings->short_id && $tlsSettings->server_name) ? [ 'public_key' => $tlsSettings->public_key, 'short_id' => $tlsSettings->short_id, - 'dest' => $tlsSettings->server_name . ($tlsSettings->server_port ? ':' . $tlsSettings->server_port : ''), + 'server_name' => $tlsSettings->server_name, + 'server_port' => $tlsSettings->server_port, 'private_key' => $tlsSettings->private_key, ] : null ]), @@ -138,7 +139,7 @@ return new class extends Migration { 'rate' => (int) $server->rate, 'tags' => $server->tags ?: "[]", 'host' => $server->host, - 'port' => (int) $server->port, + 'port' => $server->port, 'server_port' => $server->server_port, 'protocol_settings' => json_encode([ 'cipher' => $server->cipher, @@ -153,7 +154,7 @@ return new class extends Migration { } // Migrate Hysteria servers - $hysteriaServers = DB::table('v2_server_hysteria')->get(); + $hysteriaServers = DB::table(table: 'v2_server_hysteria')->get(); foreach ($hysteriaServers as $server) { DB::table('v2_server')->insert([ 'type' => 'hysteria', @@ -312,7 +313,7 @@ return new class extends Migration { $table->string('rate', 11); $table->boolean('show')->default(false); $table->integer('sort')->nullable(); - $table->tinyInteger('version',false,true)->default(1)->comment('hysteria版本,Version:1\2'); + $table->tinyInteger('version', false, true)->default(1)->comment('hysteria版本,Version:1\2'); $table->boolean('is_obfs')->default(true)->comment('是否开启obfs'); $table->string('alpn')->nullable(); $table->integer('up_mbps'); @@ -445,8 +446,8 @@ return new class extends Migration { 'rate' => (string) $server->rate, 'show' => $server->show, 'sort' => $server->sort, - 'up' => $settings['bandwidth']['up'], - 'down' => $settings['bandwidth']['down'], + 'up_mbps' => $settings['bandwidth']['up'], + 'down_mbps' => $settings['bandwidth']['down'], 'server_name' => $settings['tls']['server_name'], 'insecure' => $settings['tls']['allow_insecure'], 'created_at' => $timestamp, diff --git a/public/assets/admin/assets/index.css b/public/assets/admin/assets/index.css index a82ff73..93d4d0b 100644 --- a/public/assets/admin/assets/index.css +++ b/public/assets/admin/assets/index.css @@ -1 +1 @@ -*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}:root{--header-height: 4rem;--background: 0 0% 100%;--foreground: 222.2 84% 4.9%;--card: 0 0% 100%;--card-foreground: 222.2 84% 4.9%;--popover: 0 0% 100%;--popover-foreground: 222.2 84% 4.9%;--primary: 222.2 47.4% 11.2%;--primary-foreground: 210 40% 98%;--secondary: 210 40% 96.1%;--secondary-foreground: 222.2 47.4% 11.2%;--muted: 210 40% 96.1%;--muted-foreground: 215.4 16.3% 46.9%;--accent: 210 40% 96.1%;--accent-foreground: 222.2 47.4% 11.2%;--destructive: 0 84.2% 60.2%;--destructive-foreground: 210 40% 98%;--border: 214.3 31.8% 91.4%;--input: 214.3 31.8% 91.4%;--ring: 222.2 84% 4.9%;--radius: .5rem}.dark{--background: 222.2 84% 4.9%;--foreground: 210 40% 98%;--card: 222.2 84% 4.9%;--card-foreground: 210 40% 98%;--popover: 222.2 84% 4.9%;--popover-foreground: 210 40% 98%;--primary: 210 40% 98%;--primary-foreground: 222.2 47.4% 11.2%;--secondary: 217.2 32.6% 17.5%;--secondary-foreground: 210 40% 98%;--muted: 217.2 32.6% 17.5%;--muted-foreground: 215 20.2% 65.1%;--accent: 217.2 32.6% 17.5%;--accent-foreground: 210 40% 98%;--destructive: 0 62.8% 30.6%;--destructive-foreground: 210 40% 98%;--border: 217.2 32.6% 17.5%;--input: 217.2 32.6% 17.5%;--ring: 212.7 26.8% 83.9%}.collapsibleDropdown{overflow:hidden}.collapsibleDropdown[data-state=open]{animation:slideDown .2s ease-out}.collapsibleDropdown[data-state=closed]{animation:slideUp .2s ease-out}@keyframes slideDown{0%{height:0}to{height:var(--radix-collapsible-content-height)}}@keyframes slideUp{0%{height:var(--radix-collapsible-content-height)}to{height:0}}*{border-color:hsl(var(--border))}body{min-height:100svh;width:100%;background-color:hsl(var(--background));color:hsl(var(--foreground))}.container{width:100%;margin-right:auto;margin-left:auto;padding-right:2rem;padding-left:2rem}@media (min-width: 1400px){.container{max-width:1400px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.visible{visibility:visible}.invisible{visibility:hidden}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{inset:0}.inset-x-0{left:0;right:0}.inset-y-0{top:0;bottom:0}.-left-1{left:-.25rem}.-right-1{right:-.25rem}.-right-5{right:-1.25rem}.-top-1\/2{top:-50%}.bottom-0{bottom:0}.bottom-5{bottom:1.25rem}.bottom-full{bottom:100%}.left-0{left:0}.left-1{left:.25rem}.left-1\/2{left:50%}.left-2{left:.5rem}.left-5{left:1.25rem}.left-\[50\%\]{left:50%}.right-0{right:0}.right-1{right:.25rem}.right-1\.5{right:.375rem}.right-2{right:.5rem}.right-3{right:.75rem}.right-4{right:1rem}.right-5{right:1.25rem}.top-0{top:0}.top-1{top:.25rem}.top-1\/2{top:50%}.top-2{top:.5rem}.top-2\.5{top:.625rem}.top-4{top:1rem}.top-\[1px\]{top:1px}.top-\[50\%\]{top:50%}.top-\[60\%\]{top:60%}.top-full{top:100%}.z-10{z-index:10}.z-20{z-index:20}.z-50{z-index:50}.z-\[-1\]{z-index:-1}.z-\[1\]{z-index:1}.col-span-2{grid-column:span 2 / span 2}.-m-0\.5{margin:-.125rem}.m-1{margin:.25rem}.m-auto{margin:auto}.-mx-1{margin-left:-.25rem;margin-right:-.25rem}.-mx-4{margin-left:-1rem;margin-right:-1rem}.mx-1{margin-left:.25rem;margin-right:.25rem}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-3{margin-left:.75rem;margin-right:.75rem}.mx-4{margin-left:1rem;margin-right:1rem}.mx-auto{margin-left:auto;margin-right:auto}.my-1{margin-top:.25rem;margin-bottom:.25rem}.my-2{margin-top:.5rem;margin-bottom:.5rem}.my-4{margin-top:1rem;margin-bottom:1rem}.my-6{margin-top:1.5rem;margin-bottom:1.5rem}.-ml-3{margin-left:-.75rem}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-4{margin-bottom:1rem}.mb-8{margin-bottom:2rem}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-4{margin-left:1rem}.ml-8{margin-left:2rem}.ml-auto{margin-left:auto}.mr-1{margin-right:.25rem}.mr-2{margin-right:.5rem}.mr-auto{margin-right:auto}.mt-1{margin-top:.25rem}.mt-1\.5{margin-top:.375rem}.mt-2{margin-top:.5rem}.mt-24{margin-top:6rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.mt-auto{margin-top:auto}.line-clamp-2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.\!table{display:table!important}.table{display:table}.grid{display:grid}.hidden{display:none}.aspect-square{aspect-ratio:1 / 1}.size-10{width:2.5rem;height:2.5rem}.size-2\.5{width:.625rem;height:.625rem}.size-3{width:.75rem;height:.75rem}.size-3\.5{width:.875rem;height:.875rem}.size-4{width:1rem;height:1rem}.size-5{width:1.25rem;height:1.25rem}.size-6{width:1.5rem;height:1.5rem}.h-0{height:0px}.h-1\.5{height:.375rem}.h-10{height:2.5rem}.h-11{height:2.75rem}.h-12{height:3rem}.h-14{height:3.5rem}.h-16{height:4rem}.h-2{height:.5rem}.h-2\.5{height:.625rem}.h-20{height:5rem}.h-24{height:6rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-4{height:1rem}.h-40{height:10rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-64{height:16rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-\[180px\]{height:180px}.h-\[1px\]{height:1px}.h-\[200px\]{height:200px}.h-\[300px\]{height:300px}.h-\[400px\]{height:400px}.h-\[90vh\]{height:90vh}.h-\[calc\(100\%-var\(--header-height\)\)\]{height:calc(100% - var(--header-height))}.h-\[var\(--header-height\)\]{height:var(--header-height)}.h-\[var\(--radix-navigation-menu-viewport-height\)\]{height:var(--radix-navigation-menu-viewport-height)}.h-\[var\(--radix-select-trigger-height\)\]{height:var(--radix-select-trigger-height)}.h-auto{height:auto}.h-full{height:100%}.h-px{height:1px}.h-svh{height:100svh}.max-h-0{max-height:0px}.max-h-12{max-height:3rem}.max-h-96{max-height:24rem}.max-h-\[300px\]{max-height:300px}.max-h-\[90vh\]{max-height:90vh}.max-h-\[95\%\]{max-height:95%}.max-h-screen{max-height:100vh}.min-h-10{min-height:2.5rem}.min-h-6{min-height:1.5rem}.min-h-\[120px\]{min-height:120px}.min-h-\[150px\]{min-height:150px}.min-h-\[200px\]{min-height:200px}.min-h-\[400px\]{min-height:400px}.min-h-\[60px\]{min-height:60px}.w-0{width:0px}.w-1\/2{width:50%}.w-10{width:2.5rem}.w-12{width:3rem}.w-14{width:3.5rem}.w-16{width:4rem}.w-2{width:.5rem}.w-2\.5{width:.625rem}.w-2\/3{width:66.666667%}.w-28{width:7rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-3\/4{width:75%}.w-32{width:8rem}.w-36{width:9rem}.w-4{width:1rem}.w-40{width:10rem}.w-5{width:1.25rem}.w-56{width:14rem}.w-6{width:1.5rem}.w-7{width:1.75rem}.w-72{width:18rem}.w-8{width:2rem}.w-9{width:2.25rem}.w-\[100px\]{width:100px}.w-\[120px\]{width:120px}.w-\[140px\]{width:140px}.w-\[150px\]{width:150px}.w-\[1px\]{width:1px}.w-\[200px\]{width:200px}.w-\[250px\]{width:250px}.w-\[300px\]{width:300px}.w-\[50px\]{width:50px}.w-\[70px\]{width:70px}.w-\[80px\]{width:80px}.w-auto{width:auto}.w-full{width:100%}.w-max{width:-moz-max-content;width:max-content}.min-w-0{min-width:0px}.min-w-20{min-width:5rem}.min-w-\[10em\]{min-width:10em}.min-w-\[40px\]{min-width:40px}.min-w-\[8rem\]{min-width:8rem}.min-w-\[var\(--radix-select-trigger-width\)\]{min-width:var(--radix-select-trigger-width)}.max-w-32{max-width:8rem}.max-w-4xl{max-width:56rem}.max-w-52{max-width:13rem}.max-w-80{max-width:20rem}.max-w-\[180px\]{max-width:180px}.max-w-\[200px\]{max-width:200px}.max-w-\[280px\]{max-width:280px}.max-w-\[300px\]{max-width:300px}.max-w-\[500px\]{max-width:500px}.max-w-\[60\%\]{max-width:60%}.max-w-\[600px\]{max-width:600px}.max-w-\[70\%\]{max-width:70%}.max-w-\[90\%\]{max-width:90%}.max-w-full{max-width:100%}.max-w-lg{max-width:32rem}.max-w-max{max-width:-moz-max-content;max-width:max-content}.max-w-none{max-width:none}.max-w-xl{max-width:36rem}.flex-1{flex:1 1 0%}.flex-\[1\.2\]{flex:1.2}.flex-\[1\]{flex:1}.flex-\[2\]{flex:2}.flex-\[4\]{flex:4}.flex-\[5\]{flex:5}.flex-none{flex:none}.flex-shrink-0,.shrink-0{flex-shrink:0}.flex-grow{flex-grow:1}.caption-bottom{caption-side:bottom}.border-collapse{border-collapse:collapse}.-translate-x-1\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-x-full{--tw-translate-x: -100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-\[-50\%\]{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-full{--tw-translate-x: 100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-0{--tw-translate-y: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-\[-50\%\]{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-rotate-180{--tw-rotate: -180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-rotate-90{--tw-rotate: -90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-180{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-45{--tw-rotate: 45deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-100{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-125{--tw-scale-x: 1.25;--tw-scale-y: 1.25;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes bounce{0%,to{transform:translateY(-25%);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;animation-timing-function:cubic-bezier(0,0,.2,1)}}.animate-bounce{animation:bounce 1s infinite}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-copy{cursor:copy}.cursor-default{cursor:default}.cursor-grab{cursor:grab}.cursor-grabbing{cursor:grabbing}.cursor-help{cursor:help}.cursor-move{cursor:move}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.cursor-text{cursor:text}.touch-none{touch-action:none}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize-none{resize:none}.resize{resize:both}.list-inside{list-style-position:inside}.list-disc{list-style-type:disc}.list-none{list-style-type:none}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-row{flex-direction:row}.flex-row-reverse{flex-direction:row-reverse}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.items-baseline{align-items:baseline}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-0{gap:0px}.gap-0\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-2\.5{gap:.625rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.gap-x-1{-moz-column-gap:.25rem;column-gap:.25rem}.gap-x-2{-moz-column-gap:.5rem;column-gap:.5rem}.gap-x-4{-moz-column-gap:1rem;column-gap:1rem}.gap-y-0\.5{row-gap:.125rem}.gap-y-2{row-gap:.5rem}.space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.25rem * var(--tw-space-x-reverse));margin-left:calc(.25rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-2\.5>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.625rem * var(--tw-space-x-reverse));margin-left:calc(.625rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.75rem * var(--tw-space-x-reverse));margin-left:calc(.75rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1rem * var(--tw-space-x-reverse));margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-6>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1.5rem * var(--tw-space-x-reverse));margin-left:calc(1.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-0>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(0px * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(0px * var(--tw-space-y-reverse))}.space-y-0\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.125rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.125rem * var(--tw-space-y-reverse))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.space-y-8>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(2rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2rem * var(--tw-space-y-reverse))}.self-start{align-self:flex-start}.self-end{align-self:flex-end}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-y-scroll{overflow-y:scroll}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-line{white-space:pre-line}.whitespace-pre-wrap{white-space:pre-wrap}.text-wrap{text-wrap:wrap}.text-nowrap{text-wrap:nowrap}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-\[inherit\]{border-radius:inherit}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-none{border-radius:0}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.rounded-xl{border-radius:.75rem}.rounded-l-lg{border-top-left-radius:var(--radius);border-bottom-left-radius:var(--radius)}.rounded-l-md{border-top-left-radius:calc(var(--radius) - 2px);border-bottom-left-radius:calc(var(--radius) - 2px)}.rounded-l-none{border-top-left-radius:0;border-bottom-left-radius:0}.rounded-r-lg{border-top-right-radius:var(--radius);border-bottom-right-radius:var(--radius)}.rounded-r-md{border-top-right-radius:calc(var(--radius) - 2px);border-bottom-right-radius:calc(var(--radius) - 2px)}.rounded-r-none{border-top-right-radius:0;border-bottom-right-radius:0}.rounded-t-\[10px\]{border-top-left-radius:10px;border-top-right-radius:10px}.rounded-bl-none{border-bottom-left-radius:0}.rounded-br-none{border-bottom-right-radius:0}.rounded-tl-lg{border-top-left-radius:var(--radius)}.rounded-tl-none{border-top-left-radius:0}.rounded-tl-sm{border-top-left-radius:calc(var(--radius) - 4px)}.rounded-tr-lg{border-top-right-radius:var(--radius)}.rounded-tr-none{border-top-right-radius:0}.border{border-width:1px}.border-0{border-width:0px}.border-2{border-width:2px}.border-x-0{border-left-width:0px;border-right-width:0px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-l{border-left-width:1px}.border-l-0{border-left-width:0px}.border-l-2{border-left-width:2px}.border-r{border-right-width:1px}.border-r-0{border-right-width:0px}.border-r-2{border-right-width:2px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.border-none{border-style:none}.border-blue-300{--tw-border-opacity: 1;border-color:rgb(147 197 253 / var(--tw-border-opacity, 1))}.border-blue-500\/50{border-color:#3b82f680}.border-border{border-color:hsl(var(--border))}.border-border\/50{border-color:hsl(var(--border) / .5)}.border-destructive\/50{border-color:hsl(var(--destructive) / .5)}.border-foreground\/10{border-color:hsl(var(--foreground) / .1)}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1))}.border-input{border-color:hsl(var(--input))}.border-muted{border-color:hsl(var(--muted))}.border-muted-foreground\/25{border-color:hsl(var(--muted-foreground) / .25)}.border-orange-500\/50{border-color:#f9731680}.border-primary{border-color:hsl(var(--primary))}.border-primary\/50{border-color:hsl(var(--primary) / .5)}.border-red-500{--tw-border-opacity: 1;border-color:rgb(239 68 68 / var(--tw-border-opacity, 1))}.border-transparent{border-color:transparent}.border-l-slate-500{--tw-border-opacity: 1;border-left-color:rgb(100 116 139 / var(--tw-border-opacity, 1))}.border-l-transparent{border-left-color:transparent}.border-r-muted{border-right-color:hsl(var(--muted))}.border-t-transparent{border-top-color:transparent}.bg-accent{background-color:hsl(var(--accent))}.bg-background{background-color:hsl(var(--background))}.bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity, 1))}.bg-black\/80{background-color:#000c}.bg-blue-50{--tw-bg-opacity: 1;background-color:rgb(239 246 255 / var(--tw-bg-opacity, 1))}.bg-border{background-color:hsl(var(--border))}.bg-card{background-color:hsl(var(--card))}.bg-destructive{background-color:hsl(var(--destructive))}.bg-destructive\/10{background-color:hsl(var(--destructive) / .1)}.bg-destructive\/15{background-color:hsl(var(--destructive) / .15)}.bg-destructive\/80{background-color:hsl(var(--destructive) / .8)}.bg-emerald-500\/80{background-color:#10b981cc}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.bg-gray-300{--tw-bg-opacity: 1;background-color:rgb(209 213 219 / var(--tw-bg-opacity, 1))}.bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.bg-green-100{--tw-bg-opacity: 1;background-color:rgb(220 252 231 / var(--tw-bg-opacity, 1))}.bg-green-50{--tw-bg-opacity: 1;background-color:rgb(240 253 244 / var(--tw-bg-opacity, 1))}.bg-green-500{--tw-bg-opacity: 1;background-color:rgb(34 197 94 / var(--tw-bg-opacity, 1))}.bg-inherit{background-color:inherit}.bg-muted{background-color:hsl(var(--muted))}.bg-muted\/30{background-color:hsl(var(--muted) / .3)}.bg-muted\/50{background-color:hsl(var(--muted) / .5)}.bg-popover{background-color:hsl(var(--popover))}.bg-primary{background-color:hsl(var(--primary))}.bg-primary-foreground{background-color:hsl(var(--primary-foreground))}.bg-primary\/10{background-color:hsl(var(--primary) / .1)}.bg-primary\/20{background-color:hsl(var(--primary) / .2)}.bg-red-100{--tw-bg-opacity: 1;background-color:rgb(254 226 226 / var(--tw-bg-opacity, 1))}.bg-red-50{--tw-bg-opacity: 1;background-color:rgb(254 242 242 / var(--tw-bg-opacity, 1))}.bg-secondary{background-color:hsl(var(--secondary))}.bg-secondary\/50{background-color:hsl(var(--secondary) / .5)}.bg-transparent{background-color:transparent}.bg-yellow-100{--tw-bg-opacity: 1;background-color:rgb(254 249 195 / var(--tw-bg-opacity, 1))}.bg-yellow-50{--tw-bg-opacity: 1;background-color:rgb(254 252 232 / var(--tw-bg-opacity, 1))}.bg-yellow-500\/80{background-color:#eab308cc}.fill-current{fill:currentColor}.fill-primary{fill:hsl(var(--primary))}.p-0{padding:0}.p-0\.5{padding:.125rem}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.p-\[1px\]{padding:1px}.px-0\.5{padding-left:.125rem;padding-right:.125rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-8{padding-left:2rem;padding-right:2rem}.py-0{padding-top:0;padding-bottom:0}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-10{padding-top:2.5rem;padding-bottom:2.5rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.pb-0\.5{padding-bottom:.125rem}.pb-16{padding-bottom:4rem}.pb-2{padding-bottom:.5rem}.pb-4{padding-bottom:1rem}.pb-6{padding-bottom:1.5rem}.pl-2{padding-left:.5rem}.pl-2\.5{padding-left:.625rem}.pl-3{padding-left:.75rem}.pl-6{padding-left:1.5rem}.pl-8{padding-left:2rem}.pr-12{padding-right:3rem}.pr-2{padding-right:.5rem}.pr-2\.5{padding-right:.625rem}.pr-4{padding-right:1rem}.pr-7{padding-right:1.75rem}.pr-8{padding-right:2rem}.pt-0{padding-top:0}.pt-1{padding-top:.25rem}.pt-1\.5{padding-top:.375rem}.pt-16{padding-top:4rem}.pt-2{padding-top:.5rem}.pt-4{padding-top:1rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.align-middle{vertical-align:middle}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-\[0\.625rem\]{font-size:.625rem}.text-\[0\.7rem\]{font-size:.7rem}.text-\[0\.8rem\]{font-size:.8rem}.text-\[10px\]{font-size:10px}.text-\[7rem\]{font-size:7rem}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.capitalize{text-transform:capitalize}.tabular-nums{--tw-numeric-spacing: tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.leading-10{line-height:2.5rem}.leading-loose{line-height:2}.leading-none{line-height:1}.leading-tight{line-height:1.25}.tracking-tight{letter-spacing:-.025em}.tracking-widest{letter-spacing:.1em}.text-accent-foreground{color:hsl(var(--accent-foreground))}.text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity, 1))}.text-card-foreground{color:hsl(var(--card-foreground))}.text-current{color:currentColor}.text-destructive{color:hsl(var(--destructive))}.text-destructive-foreground{color:hsl(var(--destructive-foreground))}.text-emerald-500{--tw-text-opacity: 1;color:rgb(16 185 129 / var(--tw-text-opacity, 1))}.text-foreground{color:hsl(var(--foreground))}.text-foreground\/70{color:hsl(var(--foreground) / .7)}.text-foreground\/90{color:hsl(var(--foreground) / .9)}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.text-gray-800{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity, 1))}.text-green-600{--tw-text-opacity: 1;color:rgb(22 163 74 / var(--tw-text-opacity, 1))}.text-green-800{--tw-text-opacity: 1;color:rgb(22 101 52 / var(--tw-text-opacity, 1))}.text-muted-foreground{color:hsl(var(--muted-foreground))}.text-muted-foreground\/30{color:hsl(var(--muted-foreground) / .3)}.text-muted-foreground\/40{color:hsl(var(--muted-foreground) / .4)}.text-muted-foreground\/50{color:hsl(var(--muted-foreground) / .5)}.text-muted-foreground\/70{color:hsl(var(--muted-foreground) / .7)}.text-orange-500{--tw-text-opacity: 1;color:rgb(249 115 22 / var(--tw-text-opacity, 1))}.text-popover-foreground{color:hsl(var(--popover-foreground))}.text-primary{color:hsl(var(--primary))}.text-primary-foreground{color:hsl(var(--primary-foreground))}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}.text-red-800{--tw-text-opacity: 1;color:rgb(153 27 27 / var(--tw-text-opacity, 1))}.text-secondary-foreground{color:hsl(var(--secondary-foreground))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-yellow-600{--tw-text-opacity: 1;color:rgb(202 138 4 / var(--tw-text-opacity, 1))}.text-yellow-800{--tw-text-opacity: 1;color:rgb(133 77 14 / var(--tw-text-opacity, 1))}.underline-offset-4{text-underline-offset:4px}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-30{opacity:.3}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-none{--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-destructive\/50{--tw-shadow-color: hsl(var(--destructive) / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-emerald-500\/50{--tw-shadow-color: rgb(16 185 129 / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-yellow-500\/50{--tw-shadow-color: rgb(234 179 8 / .5);--tw-shadow: var(--tw-shadow-colored)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring-0{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-2{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-gray-200{--tw-ring-opacity: 1;--tw-ring-color: rgb(229 231 235 / var(--tw-ring-opacity, 1))}.ring-gray-300\/20{--tw-ring-color: rgb(209 213 219 / .2)}.ring-green-500\/20{--tw-ring-color: rgb(34 197 94 / .2)}.ring-primary\/20{--tw-ring-color: hsl(var(--primary) / .2)}.ring-offset-2{--tw-ring-offset-width: 2px}.ring-offset-background{--tw-ring-offset-color: hsl(var(--background))}.ring-offset-white{--tw-ring-offset-color: #fff}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\[margin\]{transition-property:margin;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\[max-height\,padding\]{transition-property:max-height,padding;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\[opacity\]{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\[width\]{transition-property:width;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-shadow{transition-property:box-shadow;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.delay-100{transition-delay:.1s}.delay-150{transition-delay:.15s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.duration-500{transition-duration:.5s}.duration-700{transition-duration:.7s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}@keyframes enter{0%{opacity:var(--tw-enter-opacity, 1);transform:translate3d(var(--tw-enter-translate-x, 0),var(--tw-enter-translate-y, 0),0) scale3d(var(--tw-enter-scale, 1),var(--tw-enter-scale, 1),var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity, 1);transform:translate3d(var(--tw-exit-translate-x, 0),var(--tw-exit-translate-y, 0),0) scale3d(var(--tw-exit-scale, 1),var(--tw-exit-scale, 1),var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0))}}.animate-in{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.fade-in-0{--tw-enter-opacity: 0}.zoom-in-95{--tw-enter-scale: .95}.duration-200{animation-duration:.2s}.duration-300{animation-duration:.3s}.duration-500{animation-duration:.5s}.duration-700{animation-duration:.7s}.delay-100{animation-delay:.1s}.delay-150{animation-delay:.15s}.ease-in-out{animation-timing-function:cubic-bezier(.4,0,.2,1)}.ease-out{animation-timing-function:cubic-bezier(0,0,.2,1)}.no-scrollbar::-webkit-scrollbar{display:none}.no-scrollbar{-ms-overflow-style:none;scrollbar-width:none}html{overflow-y:scroll}.sticky{position:sticky!important;z-index:2;background-color:hsl(var(--card))}.sticky.before\:right-0:before,.sticky.before\:left-0:before{content:"";position:absolute;top:0;bottom:0;width:2px;background:linear-gradient(to right,rgba(0,0,0,.08),transparent);opacity:1;transition:opacity .3s ease}.sticky.before\:right-0:before{right:-1px;background:linear-gradient(to right,rgba(0,0,0,.08),transparent)}.sticky.before\:right-0:after{content:"";position:absolute;top:0;right:-8px;bottom:0;width:8px;pointer-events:none;background:linear-gradient(to right,rgba(0,0,0,.05),transparent)}.sticky.before\:left-0:before{left:-1px;background:linear-gradient(to left,rgba(0,0,0,.08),transparent)}.sticky.before\:left-0:after{content:"";position:absolute;top:0;left:-8px;bottom:0;width:8px;pointer-events:none;background:linear-gradient(to left,rgba(0,0,0,.05),transparent)}.sticky:hover:before{opacity:.8}.dark .sticky.before\:right-0:before,.dark .sticky.before\:left-0:before{background:linear-gradient(to right,rgba(255,255,255,.05),transparent)}.dark .sticky.before\:right-0:after,.dark .sticky.before\:left-0:after{background:linear-gradient(to right,rgba(255,255,255,.03),transparent)}.hover\:bg-muted\/50:hover .sticky:before{opacity:1}.\*\:\!inline-block>*{display:inline-block!important}.file\:border-0::file-selector-button{border-width:0px}.file\:bg-transparent::file-selector-button{background-color:transparent}.file\:text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\:font-medium::file-selector-button{font-weight:500}.placeholder\:text-muted-foreground::-moz-placeholder{color:hsl(var(--muted-foreground))}.placeholder\:text-muted-foreground::placeholder{color:hsl(var(--muted-foreground))}.before\:absolute:before{content:var(--tw-content);position:absolute}.before\:bottom-0:before{content:var(--tw-content);bottom:0}.before\:left-0:before{content:var(--tw-content);left:0}.before\:right-0:before{content:var(--tw-content);right:0}.before\:top-0:before{content:var(--tw-content);top:0}.before\:w-\[1px\]:before{content:var(--tw-content);width:1px}.before\:bg-border:before{content:var(--tw-content);background-color:hsl(var(--border))}.after\:pointer-events-none:after{content:var(--tw-content);pointer-events:none}.after\:absolute:after{content:var(--tw-content);position:absolute}.after\:bottom-0:after{content:var(--tw-content);bottom:0}.after\:left-0:after{content:var(--tw-content);left:0}.after\:hidden:after{content:var(--tw-content);display:none}.after\:h-32:after{content:var(--tw-content);height:8rem}.after\:w-full:after{content:var(--tw-content);width:100%}.after\:bg-\[linear-gradient\(180deg\,_transparent_10\%\,_hsl\(var\(--background\)\)_70\%\)\]:after{content:var(--tw-content);background-image:linear-gradient(180deg,transparent 10%,hsl(var(--background)) 70%)}.focus-within\:relative:focus-within{position:relative}.focus-within\:z-20:focus-within{z-index:20}.focus-within\:ring-1:focus-within{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-within\:ring-ring:focus-within{--tw-ring-color: hsl(var(--ring))}.hover\:-translate-y-1:hover{--tw-translate-y: -.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:scale-110:hover{--tw-scale-x: 1.1;--tw-scale-y: 1.1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:border-primary\/50:hover{border-color:hsl(var(--primary) / .5)}.hover\:bg-accent:hover{background-color:hsl(var(--accent))}.hover\:bg-blue-100:hover{--tw-bg-opacity: 1;background-color:rgb(219 234 254 / var(--tw-bg-opacity, 1))}.hover\:bg-card\/80:hover{background-color:hsl(var(--card) / .8)}.hover\:bg-destructive\/10:hover{background-color:hsl(var(--destructive) / .1)}.hover\:bg-destructive\/25:hover{background-color:hsl(var(--destructive) / .25)}.hover\:bg-destructive\/80:hover{background-color:hsl(var(--destructive) / .8)}.hover\:bg-destructive\/90:hover{background-color:hsl(var(--destructive) / .9)}.hover\:bg-gray-100:hover{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.hover\:bg-green-100:hover{--tw-bg-opacity: 1;background-color:rgb(220 252 231 / var(--tw-bg-opacity, 1))}.hover\:bg-inherit:hover{background-color:inherit}.hover\:bg-muted:hover{background-color:hsl(var(--muted))}.hover\:bg-muted\/40:hover{background-color:hsl(var(--muted) / .4)}.hover\:bg-muted\/50:hover{background-color:hsl(var(--muted) / .5)}.hover\:bg-muted\/60:hover{background-color:hsl(var(--muted) / .6)}.hover\:bg-primary:hover{background-color:hsl(var(--primary))}.hover\:bg-primary\/10:hover{background-color:hsl(var(--primary) / .1)}.hover\:bg-primary\/90:hover{background-color:hsl(var(--primary) / .9)}.hover\:bg-red-100:hover{--tw-bg-opacity: 1;background-color:rgb(254 226 226 / var(--tw-bg-opacity, 1))}.hover\:bg-secondary-foreground\/10:hover{background-color:hsl(var(--secondary-foreground) / .1)}.hover\:bg-secondary\/70:hover{background-color:hsl(var(--secondary) / .7)}.hover\:bg-secondary\/80:hover{background-color:hsl(var(--secondary) / .8)}.hover\:bg-transparent:hover{background-color:transparent}.hover\:bg-yellow-100:hover{--tw-bg-opacity: 1;background-color:rgb(254 249 195 / var(--tw-bg-opacity, 1))}.hover\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.hover\:text-destructive:hover{color:hsl(var(--destructive))}.hover\:text-foreground:hover{color:hsl(var(--foreground))}.hover\:text-foreground\/70:hover{color:hsl(var(--foreground) / .7)}.hover\:text-muted-foreground:hover{color:hsl(var(--muted-foreground))}.hover\:text-primary:hover{color:hsl(var(--primary))}.hover\:text-primary-foreground:hover{color:hsl(var(--primary-foreground))}.hover\:text-primary\/80:hover{color:hsl(var(--primary) / .8)}.hover\:text-red-600:hover{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-100:hover{opacity:1}.hover\:opacity-80:hover{opacity:.8}.hover\:shadow-lg:hover{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\:shadow-md:hover{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\:shadow-black\/30:hover{--tw-shadow-color: rgb(0 0 0 / .3);--tw-shadow: var(--tw-shadow-colored)}.hover\:ring-primary:hover{--tw-ring-color: hsl(var(--primary))}.focus\:z-10:focus{z-index:10}.focus\:bg-accent:focus{background-color:hsl(var(--accent))}.focus\:bg-primary:focus{background-color:hsl(var(--primary))}.focus\:text-accent-foreground:focus{color:hsl(var(--accent-foreground))}.focus\:text-destructive:focus{color:hsl(var(--destructive))}.focus\:text-primary-foreground:focus{color:hsl(var(--primary-foreground))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-1:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-ring:focus{--tw-ring-color: hsl(var(--ring))}.focus\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.focus-visible\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\:ring-1:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\:ring-2:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\:ring-primary:focus-visible{--tw-ring-color: hsl(var(--primary))}.focus-visible\:ring-red-500:focus-visible{--tw-ring-opacity: 1;--tw-ring-color: rgb(239 68 68 / var(--tw-ring-opacity, 1))}.focus-visible\:ring-ring:focus-visible{--tw-ring-color: hsl(var(--ring))}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}.focus-visible\:ring-offset-background:focus-visible{--tw-ring-offset-color: hsl(var(--background))}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.group\/id:hover .group-hover\/id\:opacity-100,.group:hover .group-hover\:opacity-100{opacity:1}.group[data-collapsed=true] .group-\[\[data-collapsed\=true\]\]\:justify-center{justify-content:center}.group[data-collapsed=true] .group-\[\[data-collapsed\=true\]\]\:px-2{padding-left:.5rem;padding-right:.5rem}.peer:disabled~.peer-disabled\:cursor-not-allowed{cursor:not-allowed}.peer:disabled~.peer-disabled\:opacity-70{opacity:.7}.has-\[\:focus-visible\]\:outline-none:has(:focus-visible){outline:2px solid transparent;outline-offset:2px}.has-\[\:focus-visible\]\:ring-1:has(:focus-visible){--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.has-\[\:focus-visible\]\:ring-neutral-950:has(:focus-visible){--tw-ring-opacity: 1;--tw-ring-color: rgb(10 10 10 / var(--tw-ring-opacity, 1))}.aria-selected\:bg-accent[aria-selected=true]{background-color:hsl(var(--accent))}.aria-selected\:bg-accent\/50[aria-selected=true]{background-color:hsl(var(--accent) / .5)}.aria-selected\:text-accent-foreground[aria-selected=true]{color:hsl(var(--accent-foreground))}.aria-selected\:text-muted-foreground[aria-selected=true]{color:hsl(var(--muted-foreground))}.aria-selected\:opacity-100[aria-selected=true]{opacity:1}.data-\[disabled\]\:pointer-events-none[data-disabled]{pointer-events:none}.data-\[side\=bottom\]\:translate-y-1[data-side=bottom]{--tw-translate-y: .25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[side\=left\]\:-translate-x-1[data-side=left]{--tw-translate-x: -.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[side\=right\]\:translate-x-1[data-side=right]{--tw-translate-x: .25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[side\=top\]\:-translate-y-1[data-side=top]{--tw-translate-y: -.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[state\=checked\]\:translate-x-4[data-state=checked]{--tw-translate-x: 1rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[state\=unchecked\]\:translate-x-0[data-state=unchecked]{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes accordion-up{0%{height:var(--radix-accordion-content-height)}to{height:0}}.data-\[state\=closed\]\:animate-accordion-up[data-state=closed]{animation:accordion-up .2s ease-out}@keyframes accordion-down{0%{height:0}to{height:var(--radix-accordion-content-height)}}.data-\[state\=open\]\:animate-accordion-down[data-state=open]{animation:accordion-down .2s ease-out}.data-\[state\=dragging\]\:cursor-grabbing[data-state=dragging]{cursor:grabbing}.data-\[active\]\:bg-accent\/50[data-active]{background-color:hsl(var(--accent) / .5)}.data-\[disabled\]\:bg-muted-foreground[data-disabled],.data-\[fixed\]\:bg-muted-foreground[data-fixed]{background-color:hsl(var(--muted-foreground))}.data-\[state\=active\]\:bg-background[data-state=active]{background-color:hsl(var(--background))}.data-\[state\=checked\]\:bg-primary[data-state=checked]{background-color:hsl(var(--primary))}.data-\[state\=open\]\:bg-accent[data-state=open]{background-color:hsl(var(--accent))}.data-\[state\=open\]\:bg-accent\/50[data-state=open]{background-color:hsl(var(--accent) / .5)}.data-\[state\=open\]\:bg-secondary[data-state=open]{background-color:hsl(var(--secondary))}.data-\[state\=selected\]\:bg-muted[data-state=selected]{background-color:hsl(var(--muted))}.data-\[state\=unchecked\]\:bg-input[data-state=unchecked]{background-color:hsl(var(--input))}.data-\[collapsed\=true\]\:py-2[data-collapsed=true]{padding-top:.5rem;padding-bottom:.5rem}.data-\[disabled\]\:text-muted[data-disabled],.data-\[fixed\]\:text-muted[data-fixed]{color:hsl(var(--muted))}.data-\[state\=active\]\:text-foreground[data-state=active]{color:hsl(var(--foreground))}.data-\[state\=checked\]\:text-primary-foreground[data-state=checked]{color:hsl(var(--primary-foreground))}.data-\[state\=open\]\:text-muted-foreground[data-state=open]{color:hsl(var(--muted-foreground))}.data-\[disabled\]\:opacity-50[data-disabled]{opacity:.5}.data-\[state\=active\]\:shadow[data-state=active]{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.data-\[state\=closed\]\:duration-300[data-state=closed],.data-\[state\=open\]\:duration-300[data-state=open]{transition-duration:.3s}.data-\[motion\^\=from-\]\:animate-in[data-motion^=from-],.data-\[state\=open\]\:animate-in[data-state=open],.data-\[state\=visible\]\:animate-in[data-state=visible]{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.data-\[motion\^\=to-\]\:animate-out[data-motion^=to-],.data-\[state\=closed\]\:animate-out[data-state=closed],.data-\[state\=hidden\]\:animate-out[data-state=hidden]{animation-name:exit;animation-duration:.15s;--tw-exit-opacity: initial;--tw-exit-scale: initial;--tw-exit-rotate: initial;--tw-exit-translate-x: initial;--tw-exit-translate-y: initial}.data-\[motion\^\=from-\]\:fade-in[data-motion^=from-]{--tw-enter-opacity: 0}.data-\[motion\^\=to-\]\:fade-out[data-motion^=to-],.data-\[state\=closed\]\:fade-out-0[data-state=closed],.data-\[state\=hidden\]\:fade-out[data-state=hidden]{--tw-exit-opacity: 0}.data-\[state\=open\]\:fade-in-0[data-state=open],.data-\[state\=visible\]\:fade-in[data-state=visible]{--tw-enter-opacity: 0}.data-\[state\=closed\]\:zoom-out-95[data-state=closed]{--tw-exit-scale: .95}.data-\[state\=open\]\:zoom-in-90[data-state=open]{--tw-enter-scale: .9}.data-\[state\=open\]\:zoom-in-95[data-state=open]{--tw-enter-scale: .95}.data-\[motion\=from-end\]\:slide-in-from-right-52[data-motion=from-end]{--tw-enter-translate-x: 13rem}.data-\[motion\=from-start\]\:slide-in-from-left-52[data-motion=from-start]{--tw-enter-translate-x: -13rem}.data-\[motion\=to-end\]\:slide-out-to-right-52[data-motion=to-end]{--tw-exit-translate-x: 13rem}.data-\[motion\=to-start\]\:slide-out-to-left-52[data-motion=to-start]{--tw-exit-translate-x: -13rem}.data-\[side\=bottom\]\:slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y: -.5rem}.data-\[side\=left\]\:slide-in-from-right-2[data-side=left]{--tw-enter-translate-x: .5rem}.data-\[side\=right\]\:slide-in-from-left-2[data-side=right]{--tw-enter-translate-x: -.5rem}.data-\[side\=top\]\:slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y: .5rem}.data-\[state\=closed\]\:slide-out-to-bottom[data-state=closed]{--tw-exit-translate-y: 100%}.data-\[state\=closed\]\:slide-out-to-left[data-state=closed]{--tw-exit-translate-x: -100%}.data-\[state\=closed\]\:slide-out-to-left-1\/2[data-state=closed]{--tw-exit-translate-x: -50%}.data-\[state\=closed\]\:slide-out-to-right[data-state=closed]{--tw-exit-translate-x: 100%}.data-\[state\=closed\]\:slide-out-to-top[data-state=closed]{--tw-exit-translate-y: -100%}.data-\[state\=closed\]\:slide-out-to-top-\[48\%\][data-state=closed]{--tw-exit-translate-y: -48%}.data-\[state\=open\]\:slide-in-from-bottom[data-state=open]{--tw-enter-translate-y: 100%}.data-\[state\=open\]\:slide-in-from-left[data-state=open]{--tw-enter-translate-x: -100%}.data-\[state\=open\]\:slide-in-from-left-1\/2[data-state=open]{--tw-enter-translate-x: -50%}.data-\[state\=open\]\:slide-in-from-right[data-state=open]{--tw-enter-translate-x: 100%}.data-\[state\=open\]\:slide-in-from-top[data-state=open]{--tw-enter-translate-y: -100%}.data-\[state\=open\]\:slide-in-from-top-\[48\%\][data-state=open]{--tw-enter-translate-y: -48%}.data-\[state\=closed\]\:duration-300[data-state=closed],.data-\[state\=open\]\:duration-300[data-state=open]{animation-duration:.3s}.data-\[disabled\]\:hover\:bg-muted-foreground:hover[data-disabled],.data-\[fixed\]\:hover\:bg-muted-foreground:hover[data-fixed]{background-color:hsl(var(--muted-foreground))}.group[data-state=open] .group-data-\[state\=\"open\"\]\:-rotate-180{--tw-rotate: -180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group[data-state=open] .group-data-\[state\=open\]\:rotate-180{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.dark\:border-blue-700:is(.dark *){--tw-border-opacity: 1;border-color:rgb(29 78 216 / var(--tw-border-opacity, 1))}.dark\:border-gray-700:is(.dark *){--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity, 1))}.dark\:bg-blue-950:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(23 37 84 / var(--tw-bg-opacity, 1))}.dark\:bg-gray-800\/50:is(.dark *){background-color:#1f293780}.dark\:bg-green-500\/10:is(.dark *){background-color:#22c55e1a}.dark\:bg-red-500\/10:is(.dark *){background-color:#ef44441a}.dark\:bg-yellow-500\/10:is(.dark *){background-color:#eab3081a}.dark\:text-gray-400:is(.dark *){--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.dark\:text-green-400:is(.dark *){--tw-text-opacity: 1;color:rgb(74 222 128 / var(--tw-text-opacity, 1))}.dark\:text-red-400:is(.dark *){--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.dark\:text-yellow-400:is(.dark *){--tw-text-opacity: 1;color:rgb(250 204 21 / var(--tw-text-opacity, 1))}.dark\:ring-gray-700:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(55 65 81 / var(--tw-ring-opacity, 1))}.dark\:ring-gray-800:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(31 41 55 / var(--tw-ring-opacity, 1))}.dark\:placeholder\:text-gray-500:is(.dark *)::-moz-placeholder{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.dark\:placeholder\:text-gray-500:is(.dark *)::placeholder{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.dark\:hover\:bg-blue-900:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(30 58 138 / var(--tw-bg-opacity, 1))}.dark\:hover\:bg-red-900:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(127 29 29 / var(--tw-bg-opacity, 1))}.dark\:hover\:text-red-400:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.dark\:has-\[\:focus-visible\]\:ring-neutral-300:has(:focus-visible):is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(212 212 212 / var(--tw-ring-opacity, 1))}@media (min-width: 640px){.sm\:absolute{position:absolute}.sm\:inset-auto{inset:auto}.sm\:bottom-\[calc\(100\%\+10px\)\]{bottom:calc(100% + 10px)}.sm\:left-0{left:0}.sm\:right-0{right:0}.sm\:my-0{margin-top:0;margin-bottom:0}.sm\:my-4{margin-top:1rem;margin-bottom:1rem}.sm\:mt-0{margin-top:0}.sm\:hidden{display:none}.sm\:h-\[80vh\]{height:80vh}.sm\:h-full{height:100%}.sm\:max-h-\[500px\]{max-height:500px}.sm\:max-h-\[600px\]{max-height:600px}.sm\:max-h-\[700px\]{max-height:700px}.sm\:max-h-\[800px\]{max-height:800px}.sm\:w-48{width:12rem}.sm\:w-\[480px\]{width:480px}.sm\:w-\[90vw\]{width:90vw}.sm\:w-full{width:100%}.sm\:max-w-72{max-width:18rem}.sm\:max-w-\[1025px\]{max-width:1025px}.sm\:max-w-\[425px\]{max-width:425px}.sm\:max-w-\[700px\]{max-width:700px}.sm\:max-w-lg{max-width:32rem}.sm\:max-w-md{max-width:28rem}.sm\:max-w-sm{max-width:24rem}.sm\:max-w-xl{max-width:36rem}.sm\:translate-y-5{--tw-translate-y: 1.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.sm\:grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}.sm\:items-center{align-items:center}.sm\:justify-end{justify-content:flex-end}.sm\:justify-between{justify-content:space-between}.sm\:gap-6{gap:1.5rem}.sm\:space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.sm\:space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1rem * var(--tw-space-x-reverse));margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))}.sm\:space-y-0>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(0px * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(0px * var(--tw-space-y-reverse))}.sm\:rounded-lg{border-radius:var(--radius)}.sm\:text-left{text-align:left}}@media (min-width: 768px){.md\:absolute{position:absolute}.md\:bottom-0{bottom:0}.md\:right-auto{right:auto}.md\:col-span-1{grid-column:span 1 / span 1}.md\:ml-14{margin-left:3.5rem}.md\:ml-64{margin-left:16rem}.md\:block{display:block}.md\:flex{display:flex}.md\:inline-flex{display:inline-flex}.md\:hidden{display:none}.md\:h-svh{height:100svh}.md\:max-h-screen{max-height:100vh}.md\:w-14{width:3.5rem}.md\:w-32{width:8rem}.md\:w-64{width:16rem}.md\:w-\[var\(--radix-navigation-menu-viewport-width\)\]{width:var(--radix-navigation-menu-viewport-width)}.md\:w-auto{width:auto}.md\:max-w-\[31rem\]{max-width:31rem}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:flex-row{flex-direction:row}.md\:items-center{align-items:center}.md\:justify-between{justify-content:space-between}.md\:overflow-y-hidden{overflow-y:hidden}.md\:border-none{border-style:none}.md\:px-4{padding-left:1rem;padding-right:1rem}.md\:px-8{padding-left:2rem;padding-right:2rem}.md\:py-2{padding-top:.5rem;padding-bottom:.5rem}.md\:pt-0{padding-top:0}.md\:text-3xl{font-size:1.875rem;line-height:2.25rem}.after\:md\:block:after{content:var(--tw-content);display:block}}@media (min-width: 1024px){.lg\:flex{display:flex}.lg\:hidden{display:none}.lg\:w-1\/5{width:20%}.lg\:w-\[250px\]{width:250px}.lg\:max-w-none{max-width:none}.lg\:max-w-xl{max-width:36rem}.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\:flex-row{flex-direction:row}.lg\:flex-col{flex-direction:column}.lg\:gap-8{gap:2rem}.lg\:space-x-0>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(0px * var(--tw-space-x-reverse));margin-left:calc(0px * calc(1 - var(--tw-space-x-reverse)))}.lg\:space-x-12>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(3rem * var(--tw-space-x-reverse));margin-left:calc(3rem * calc(1 - var(--tw-space-x-reverse)))}.lg\:space-x-6>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1.5rem * var(--tw-space-x-reverse));margin-left:calc(1.5rem * calc(1 - var(--tw-space-x-reverse)))}.lg\:space-y-0>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(0px * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(0px * var(--tw-space-y-reverse))}.lg\:space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.lg\:p-8{padding:2rem}.lg\:px-0{padding-left:0;padding-right:0}.lg\:px-3{padding-left:.75rem;padding-right:.75rem}}@media (min-width: 1280px){.xl\:mr-2{margin-right:.5rem}.xl\:flex{display:flex}.xl\:inline-flex{display:inline-flex}.xl\:h-10{height:2.5rem}.xl\:w-60{width:15rem}.xl\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.xl\:justify-start{justify-content:flex-start}.xl\:px-3{padding-left:.75rem;padding-right:.75rem}.xl\:py-2{padding-top:.5rem;padding-bottom:.5rem}}.\[\&\:\:-webkit-calendar-picker-indicator\]\:hidden::-webkit-calendar-picker-indicator{display:none}.\[\&\:has\(\>\.day-range-end\)\]\:rounded-r-md:has(>.day-range-end){border-top-right-radius:calc(var(--radius) - 2px);border-bottom-right-radius:calc(var(--radius) - 2px)}.\[\&\:has\(\>\.day-range-start\)\]\:rounded-l-md:has(>.day-range-start){border-top-left-radius:calc(var(--radius) - 2px);border-bottom-left-radius:calc(var(--radius) - 2px)}.\[\&\:has\(\[aria-selected\]\)\]\:rounded-md:has([aria-selected]){border-radius:calc(var(--radius) - 2px)}.\[\&\:has\(\[aria-selected\]\)\]\:bg-accent:has([aria-selected]){background-color:hsl(var(--accent))}.first\:\[\&\:has\(\[aria-selected\]\)\]\:rounded-l-md:has([aria-selected]):first-child{border-top-left-radius:calc(var(--radius) - 2px);border-bottom-left-radius:calc(var(--radius) - 2px)}.last\:\[\&\:has\(\[aria-selected\]\)\]\:rounded-r-md:has([aria-selected]):last-child{border-top-right-radius:calc(var(--radius) - 2px);border-bottom-right-radius:calc(var(--radius) - 2px)}.\[\&\:has\(\[aria-selected\]\.day-outside\)\]\:bg-accent\/50:has([aria-selected].day-outside){background-color:hsl(var(--accent) / .5)}.\[\&\:has\(\[aria-selected\]\.day-range-end\)\]\:rounded-r-md:has([aria-selected].day-range-end){border-top-right-radius:calc(var(--radius) - 2px);border-bottom-right-radius:calc(var(--radius) - 2px)}.\[\&\:has\(\[role\=checkbox\]\)\]\:pr-0:has([role=checkbox]){padding-right:0}.\[\&\>\[role\=checkbox\]\]\:translate-y-\[2px\]>[role=checkbox]{--tw-translate-y: 2px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.\[\&\>span\]\:line-clamp-1>span{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.\[\&\>tr\]\:last\:border-b-0:last-child>tr{border-bottom-width:0px}.\[\&\[data-state\=open\]\>svg\]\:rotate-180[data-state=open]>svg{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.\[\&_\[cmdk-group-heading\]\]\:px-2 [cmdk-group-heading]{padding-left:.5rem;padding-right:.5rem}.\[\&_\[cmdk-group-heading\]\]\:py-1\.5 [cmdk-group-heading]{padding-top:.375rem;padding-bottom:.375rem}.\[\&_\[cmdk-group-heading\]\]\:text-xs [cmdk-group-heading]{font-size:.75rem;line-height:1rem}.\[\&_\[cmdk-group-heading\]\]\:font-medium [cmdk-group-heading]{font-weight:500}.\[\&_\[cmdk-group-heading\]\]\:text-muted-foreground [cmdk-group-heading]{color:hsl(var(--muted-foreground))}.\[\&_\[cmdk-group\]\:not\(\[hidden\]\)_\~\[cmdk-group\]\]\:pt-0 [cmdk-group]:not([hidden])~[cmdk-group]{padding-top:0}.\[\&_\[cmdk-group\]\]\:px-2 [cmdk-group]{padding-left:.5rem;padding-right:.5rem}.\[\&_\[cmdk-input-wrapper\]_svg\]\:h-5 [cmdk-input-wrapper] svg{height:1.25rem}.\[\&_\[cmdk-input-wrapper\]_svg\]\:w-5 [cmdk-input-wrapper] svg{width:1.25rem}.\[\&_\[cmdk-input\]\]\:h-12 [cmdk-input]{height:3rem}.\[\&_\[cmdk-item\]\]\:px-2 [cmdk-item]{padding-left:.5rem;padding-right:.5rem}.\[\&_\[cmdk-item\]\]\:py-3 [cmdk-item]{padding-top:.75rem;padding-bottom:.75rem}.\[\&_\[cmdk-item\]_svg\]\:h-5 [cmdk-item] svg{height:1.25rem}.\[\&_\[cmdk-item\]_svg\]\:w-5 [cmdk-item] svg{width:1.25rem}.\[\&_svg\]\:invisible svg{visibility:hidden}.\[\&_tr\:last-child\]\:border-0 tr:last-child{border-width:0px}.\[\&_tr\]\:border-b tr{border-bottom-width:1px} +*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}:root{--header-height: 4rem;--background: 0 0% 100%;--foreground: 222.2 84% 4.9%;--card: 0 0% 100%;--card-foreground: 222.2 84% 4.9%;--popover: 0 0% 100%;--popover-foreground: 222.2 84% 4.9%;--primary: 222.2 47.4% 11.2%;--primary-foreground: 210 40% 98%;--secondary: 210 40% 96.1%;--secondary-foreground: 222.2 47.4% 11.2%;--muted: 210 40% 96.1%;--muted-foreground: 215.4 16.3% 46.9%;--accent: 210 40% 96.1%;--accent-foreground: 222.2 47.4% 11.2%;--destructive: 0 84.2% 60.2%;--destructive-foreground: 210 40% 98%;--border: 214.3 31.8% 91.4%;--input: 214.3 31.8% 91.4%;--ring: 222.2 84% 4.9%;--radius: .5rem}.dark{--background: 222.2 84% 4.9%;--foreground: 210 40% 98%;--card: 222.2 84% 4.9%;--card-foreground: 210 40% 98%;--popover: 222.2 84% 4.9%;--popover-foreground: 210 40% 98%;--primary: 210 40% 98%;--primary-foreground: 222.2 47.4% 11.2%;--secondary: 217.2 32.6% 17.5%;--secondary-foreground: 210 40% 98%;--muted: 217.2 32.6% 17.5%;--muted-foreground: 215 20.2% 65.1%;--accent: 217.2 32.6% 17.5%;--accent-foreground: 210 40% 98%;--destructive: 0 62.8% 30.6%;--destructive-foreground: 210 40% 98%;--border: 217.2 32.6% 17.5%;--input: 217.2 32.6% 17.5%;--ring: 212.7 26.8% 83.9%}.collapsibleDropdown{overflow:hidden}.collapsibleDropdown[data-state=open]{animation:slideDown .2s ease-out}.collapsibleDropdown[data-state=closed]{animation:slideUp .2s ease-out}@keyframes slideDown{0%{height:0}to{height:var(--radix-collapsible-content-height)}}@keyframes slideUp{0%{height:var(--radix-collapsible-content-height)}to{height:0}}*{border-color:hsl(var(--border))}body{min-height:100svh;width:100%;background-color:hsl(var(--background));color:hsl(var(--foreground))}.container{width:100%;margin-right:auto;margin-left:auto;padding-right:2rem;padding-left:2rem}@media (min-width: 1400px){.container{max-width:1400px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.visible{visibility:visible}.invisible{visibility:hidden}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{inset:0}.inset-x-0{left:0;right:0}.inset-y-0{top:0;bottom:0}.-left-1{left:-.25rem}.-right-1{right:-.25rem}.-right-5{right:-1.25rem}.-top-1\/2{top:-50%}.bottom-0{bottom:0}.bottom-5{bottom:1.25rem}.bottom-full{bottom:100%}.left-0{left:0}.left-1{left:.25rem}.left-1\/2{left:50%}.left-2{left:.5rem}.left-5{left:1.25rem}.left-\[50\%\]{left:50%}.right-0{right:0}.right-1{right:.25rem}.right-1\.5{right:.375rem}.right-2{right:.5rem}.right-3{right:.75rem}.right-4{right:1rem}.right-5{right:1.25rem}.top-0{top:0}.top-1{top:.25rem}.top-1\/2{top:50%}.top-2{top:.5rem}.top-2\.5{top:.625rem}.top-4{top:1rem}.top-\[1px\]{top:1px}.top-\[50\%\]{top:50%}.top-\[60\%\]{top:60%}.top-full{top:100%}.z-10{z-index:10}.z-20{z-index:20}.z-50{z-index:50}.z-\[-1\]{z-index:-1}.z-\[1\]{z-index:1}.col-span-2{grid-column:span 2 / span 2}.-m-0\.5{margin:-.125rem}.m-1{margin:.25rem}.m-auto{margin:auto}.-mx-1{margin-left:-.25rem;margin-right:-.25rem}.-mx-4{margin-left:-1rem;margin-right:-1rem}.mx-1{margin-left:.25rem;margin-right:.25rem}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-3{margin-left:.75rem;margin-right:.75rem}.mx-4{margin-left:1rem;margin-right:1rem}.mx-auto{margin-left:auto;margin-right:auto}.my-1{margin-top:.25rem;margin-bottom:.25rem}.my-2{margin-top:.5rem;margin-bottom:.5rem}.my-4{margin-top:1rem;margin-bottom:1rem}.my-6{margin-top:1.5rem;margin-bottom:1.5rem}.-ml-3{margin-left:-.75rem}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-4{margin-bottom:1rem}.mb-8{margin-bottom:2rem}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-4{margin-left:1rem}.ml-8{margin-left:2rem}.ml-auto{margin-left:auto}.mr-1{margin-right:.25rem}.mr-2{margin-right:.5rem}.mr-auto{margin-right:auto}.mt-1{margin-top:.25rem}.mt-1\.5{margin-top:.375rem}.mt-2{margin-top:.5rem}.mt-24{margin-top:6rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.mt-auto{margin-top:auto}.line-clamp-2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.\!table{display:table!important}.table{display:table}.grid{display:grid}.hidden{display:none}.aspect-square{aspect-ratio:1 / 1}.size-10{width:2.5rem;height:2.5rem}.size-2\.5{width:.625rem;height:.625rem}.size-3{width:.75rem;height:.75rem}.size-3\.5{width:.875rem;height:.875rem}.size-4{width:1rem;height:1rem}.size-5{width:1.25rem;height:1.25rem}.size-6{width:1.5rem;height:1.5rem}.h-0{height:0px}.h-1{height:.25rem}.h-1\.5{height:.375rem}.h-10{height:2.5rem}.h-11{height:2.75rem}.h-12{height:3rem}.h-14{height:3.5rem}.h-16{height:4rem}.h-2{height:.5rem}.h-2\.5{height:.625rem}.h-20{height:5rem}.h-24{height:6rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-4{height:1rem}.h-40{height:10rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-64{height:16rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-\[180px\]{height:180px}.h-\[1px\]{height:1px}.h-\[200px\]{height:200px}.h-\[300px\]{height:300px}.h-\[400px\]{height:400px}.h-\[90vh\]{height:90vh}.h-\[calc\(100\%-var\(--header-height\)\)\]{height:calc(100% - var(--header-height))}.h-\[var\(--header-height\)\]{height:var(--header-height)}.h-\[var\(--radix-navigation-menu-viewport-height\)\]{height:var(--radix-navigation-menu-viewport-height)}.h-\[var\(--radix-select-trigger-height\)\]{height:var(--radix-select-trigger-height)}.h-auto{height:auto}.h-full{height:100%}.h-px{height:1px}.h-svh{height:100svh}.max-h-0{max-height:0px}.max-h-12{max-height:3rem}.max-h-96{max-height:24rem}.max-h-\[300px\]{max-height:300px}.max-h-\[90vh\]{max-height:90vh}.max-h-\[95\%\]{max-height:95%}.max-h-screen{max-height:100vh}.min-h-10{min-height:2.5rem}.min-h-6{min-height:1.5rem}.min-h-\[120px\]{min-height:120px}.min-h-\[150px\]{min-height:150px}.min-h-\[200px\]{min-height:200px}.min-h-\[60px\]{min-height:60px}.w-0{width:0px}.w-1\/2{width:50%}.w-10{width:2.5rem}.w-12{width:3rem}.w-14{width:3.5rem}.w-16{width:4rem}.w-2{width:.5rem}.w-2\.5{width:.625rem}.w-2\/3{width:66.666667%}.w-28{width:7rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-3\/4{width:75%}.w-32{width:8rem}.w-36{width:9rem}.w-4{width:1rem}.w-40{width:10rem}.w-5{width:1.25rem}.w-56{width:14rem}.w-6{width:1.5rem}.w-7{width:1.75rem}.w-72{width:18rem}.w-8{width:2rem}.w-9{width:2.25rem}.w-\[100px\]{width:100px}.w-\[120px\]{width:120px}.w-\[140px\]{width:140px}.w-\[150px\]{width:150px}.w-\[1px\]{width:1px}.w-\[200px\]{width:200px}.w-\[250px\]{width:250px}.w-\[300px\]{width:300px}.w-\[50px\]{width:50px}.w-\[70px\]{width:70px}.w-\[80px\]{width:80px}.w-auto{width:auto}.w-full{width:100%}.w-max{width:-moz-max-content;width:max-content}.min-w-0{min-width:0px}.min-w-20{min-width:5rem}.min-w-\[10em\]{min-width:10em}.min-w-\[300px\]{min-width:300px}.min-w-\[40px\]{min-width:40px}.min-w-\[8rem\]{min-width:8rem}.min-w-\[var\(--radix-select-trigger-width\)\]{min-width:var(--radix-select-trigger-width)}.max-w-32{max-width:8rem}.max-w-4xl{max-width:56rem}.max-w-52{max-width:13rem}.max-w-80{max-width:20rem}.max-w-\[180px\]{max-width:180px}.max-w-\[200px\]{max-width:200px}.max-w-\[280px\]{max-width:280px}.max-w-\[300px\]{max-width:300px}.max-w-\[500px\]{max-width:500px}.max-w-\[60\%\]{max-width:60%}.max-w-\[600px\]{max-width:600px}.max-w-\[90\%\]{max-width:90%}.max-w-full{max-width:100%}.max-w-lg{max-width:32rem}.max-w-max{max-width:-moz-max-content;max-width:max-content}.max-w-none{max-width:none}.max-w-xl{max-width:36rem}.flex-1{flex:1 1 0%}.flex-\[1\.2\]{flex:1.2}.flex-\[1\]{flex:1}.flex-\[2\]{flex:2}.flex-\[4\]{flex:4}.flex-\[5\]{flex:5}.flex-none{flex:none}.flex-shrink-0,.shrink-0{flex-shrink:0}.flex-grow{flex-grow:1}.caption-bottom{caption-side:bottom}.border-collapse{border-collapse:collapse}.-translate-x-1\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-x-full{--tw-translate-x: -100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-\[-50\%\]{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-full{--tw-translate-x: 100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-0{--tw-translate-y: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-\[-50\%\]{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-rotate-180{--tw-rotate: -180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-rotate-90{--tw-rotate: -90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-180{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-45{--tw-rotate: 45deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-100{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-125{--tw-scale-x: 1.25;--tw-scale-y: 1.25;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes bounce{0%,to{transform:translateY(-25%);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;animation-timing-function:cubic-bezier(0,0,.2,1)}}.animate-bounce{animation:bounce 1s infinite}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-default{cursor:default}.cursor-grab{cursor:grab}.cursor-grabbing{cursor:grabbing}.cursor-help{cursor:help}.cursor-move{cursor:move}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.cursor-text{cursor:text}.touch-none{touch-action:none}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize-none{resize:none}.resize{resize:both}.list-inside{list-style-position:inside}.list-disc{list-style-type:disc}.list-none{list-style-type:none}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-row{flex-direction:row}.flex-row-reverse{flex-direction:row-reverse}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.items-baseline{align-items:baseline}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-0{gap:0px}.gap-0\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-2\.5{gap:.625rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.gap-x-1{-moz-column-gap:.25rem;column-gap:.25rem}.gap-x-2{-moz-column-gap:.5rem;column-gap:.5rem}.gap-x-4{-moz-column-gap:1rem;column-gap:1rem}.gap-y-0\.5{row-gap:.125rem}.gap-y-2{row-gap:.5rem}.space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.25rem * var(--tw-space-x-reverse));margin-left:calc(.25rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-2\.5>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.625rem * var(--tw-space-x-reverse));margin-left:calc(.625rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.75rem * var(--tw-space-x-reverse));margin-left:calc(.75rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1rem * var(--tw-space-x-reverse));margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-6>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1.5rem * var(--tw-space-x-reverse));margin-left:calc(1.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-0>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(0px * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(0px * var(--tw-space-y-reverse))}.space-y-0\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.125rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.125rem * var(--tw-space-y-reverse))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.space-y-8>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(2rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2rem * var(--tw-space-y-reverse))}.self-start{align-self:flex-start}.self-end{align-self:flex-end}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-y-scroll{overflow-y:scroll}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-line{white-space:pre-line}.whitespace-pre-wrap{white-space:pre-wrap}.text-wrap{text-wrap:wrap}.text-nowrap{text-wrap:nowrap}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-\[inherit\]{border-radius:inherit}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-none{border-radius:0}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.rounded-xl{border-radius:.75rem}.rounded-l-lg{border-top-left-radius:var(--radius);border-bottom-left-radius:var(--radius)}.rounded-l-md{border-top-left-radius:calc(var(--radius) - 2px);border-bottom-left-radius:calc(var(--radius) - 2px)}.rounded-l-none{border-top-left-radius:0;border-bottom-left-radius:0}.rounded-r-lg{border-top-right-radius:var(--radius);border-bottom-right-radius:var(--radius)}.rounded-r-md{border-top-right-radius:calc(var(--radius) - 2px);border-bottom-right-radius:calc(var(--radius) - 2px)}.rounded-r-none{border-top-right-radius:0;border-bottom-right-radius:0}.rounded-t-\[10px\]{border-top-left-radius:10px;border-top-right-radius:10px}.rounded-bl-none{border-bottom-left-radius:0}.rounded-br-none{border-bottom-right-radius:0}.rounded-tl-lg{border-top-left-radius:var(--radius)}.rounded-tl-none{border-top-left-radius:0}.rounded-tl-sm{border-top-left-radius:calc(var(--radius) - 4px)}.rounded-tr-lg{border-top-right-radius:var(--radius)}.rounded-tr-none{border-top-right-radius:0}.border{border-width:1px}.border-0{border-width:0px}.border-2{border-width:2px}.border-x-0{border-left-width:0px;border-right-width:0px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-l{border-left-width:1px}.border-l-0{border-left-width:0px}.border-l-2{border-left-width:2px}.border-r{border-right-width:1px}.border-r-0{border-right-width:0px}.border-r-2{border-right-width:2px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.border-none{border-style:none}.border-blue-300{--tw-border-opacity: 1;border-color:rgb(147 197 253 / var(--tw-border-opacity, 1))}.border-blue-500\/50{border-color:#3b82f680}.border-border{border-color:hsl(var(--border))}.border-border\/50{border-color:hsl(var(--border) / .5)}.border-destructive\/50{border-color:hsl(var(--destructive) / .5)}.border-foreground\/10{border-color:hsl(var(--foreground) / .1)}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1))}.border-input{border-color:hsl(var(--input))}.border-muted{border-color:hsl(var(--muted))}.border-muted-foreground\/25{border-color:hsl(var(--muted-foreground) / .25)}.border-orange-500\/50{border-color:#f9731680}.border-primary{border-color:hsl(var(--primary))}.border-primary\/50{border-color:hsl(var(--primary) / .5)}.border-red-500{--tw-border-opacity: 1;border-color:rgb(239 68 68 / var(--tw-border-opacity, 1))}.border-transparent{border-color:transparent}.border-l-slate-500{--tw-border-opacity: 1;border-left-color:rgb(100 116 139 / var(--tw-border-opacity, 1))}.border-l-transparent{border-left-color:transparent}.border-r-muted{border-right-color:hsl(var(--muted))}.border-t-transparent{border-top-color:transparent}.bg-accent{background-color:hsl(var(--accent))}.bg-background{background-color:hsl(var(--background))}.bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity, 1))}.bg-black\/80{background-color:#000c}.bg-blue-50{--tw-bg-opacity: 1;background-color:rgb(239 246 255 / var(--tw-bg-opacity, 1))}.bg-border{background-color:hsl(var(--border))}.bg-card{background-color:hsl(var(--card))}.bg-destructive{background-color:hsl(var(--destructive))}.bg-destructive\/10{background-color:hsl(var(--destructive) / .1)}.bg-destructive\/15{background-color:hsl(var(--destructive) / .15)}.bg-destructive\/80{background-color:hsl(var(--destructive) / .8)}.bg-emerald-500\/80{background-color:#10b981cc}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.bg-gray-300{--tw-bg-opacity: 1;background-color:rgb(209 213 219 / var(--tw-bg-opacity, 1))}.bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.bg-green-100{--tw-bg-opacity: 1;background-color:rgb(220 252 231 / var(--tw-bg-opacity, 1))}.bg-green-50{--tw-bg-opacity: 1;background-color:rgb(240 253 244 / var(--tw-bg-opacity, 1))}.bg-green-500{--tw-bg-opacity: 1;background-color:rgb(34 197 94 / var(--tw-bg-opacity, 1))}.bg-inherit{background-color:inherit}.bg-muted{background-color:hsl(var(--muted))}.bg-muted\/30{background-color:hsl(var(--muted) / .3)}.bg-muted\/50{background-color:hsl(var(--muted) / .5)}.bg-popover{background-color:hsl(var(--popover))}.bg-primary{background-color:hsl(var(--primary))}.bg-primary-foreground{background-color:hsl(var(--primary-foreground))}.bg-primary\/10{background-color:hsl(var(--primary) / .1)}.bg-primary\/20{background-color:hsl(var(--primary) / .2)}.bg-red-100{--tw-bg-opacity: 1;background-color:rgb(254 226 226 / var(--tw-bg-opacity, 1))}.bg-red-50{--tw-bg-opacity: 1;background-color:rgb(254 242 242 / var(--tw-bg-opacity, 1))}.bg-secondary{background-color:hsl(var(--secondary))}.bg-secondary\/50{background-color:hsl(var(--secondary) / .5)}.bg-transparent{background-color:transparent}.bg-yellow-100{--tw-bg-opacity: 1;background-color:rgb(254 249 195 / var(--tw-bg-opacity, 1))}.bg-yellow-50{--tw-bg-opacity: 1;background-color:rgb(254 252 232 / var(--tw-bg-opacity, 1))}.bg-yellow-500\/80{background-color:#eab308cc}.fill-current{fill:currentColor}.fill-primary{fill:hsl(var(--primary))}.p-0{padding:0}.p-0\.5{padding:.125rem}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.p-\[1px\]{padding:1px}.px-0\.5{padding-left:.125rem;padding-right:.125rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-8{padding-left:2rem;padding-right:2rem}.py-0{padding-top:0;padding-bottom:0}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-10{padding-top:2.5rem;padding-bottom:2.5rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.pb-0\.5{padding-bottom:.125rem}.pb-16{padding-bottom:4rem}.pb-2{padding-bottom:.5rem}.pb-4{padding-bottom:1rem}.pb-6{padding-bottom:1.5rem}.pl-2{padding-left:.5rem}.pl-2\.5{padding-left:.625rem}.pl-3{padding-left:.75rem}.pl-6{padding-left:1.5rem}.pl-8{padding-left:2rem}.pr-12{padding-right:3rem}.pr-2{padding-right:.5rem}.pr-2\.5{padding-right:.625rem}.pr-4{padding-right:1rem}.pr-7{padding-right:1.75rem}.pr-8{padding-right:2rem}.pt-0{padding-top:0}.pt-1{padding-top:.25rem}.pt-1\.5{padding-top:.375rem}.pt-16{padding-top:4rem}.pt-2{padding-top:.5rem}.pt-4{padding-top:1rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.align-middle{vertical-align:middle}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-\[0\.625rem\]{font-size:.625rem}.text-\[0\.7rem\]{font-size:.7rem}.text-\[0\.8rem\]{font-size:.8rem}.text-\[10px\]{font-size:10px}.text-\[7rem\]{font-size:7rem}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.capitalize{text-transform:capitalize}.tabular-nums{--tw-numeric-spacing: tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.leading-10{line-height:2.5rem}.leading-none{line-height:1}.leading-tight{line-height:1.25}.tracking-tight{letter-spacing:-.025em}.tracking-widest{letter-spacing:.1em}.text-accent-foreground{color:hsl(var(--accent-foreground))}.text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity, 1))}.text-card-foreground{color:hsl(var(--card-foreground))}.text-current{color:currentColor}.text-destructive{color:hsl(var(--destructive))}.text-destructive-foreground{color:hsl(var(--destructive-foreground))}.text-emerald-500{--tw-text-opacity: 1;color:rgb(16 185 129 / var(--tw-text-opacity, 1))}.text-foreground{color:hsl(var(--foreground))}.text-foreground\/70{color:hsl(var(--foreground) / .7)}.text-foreground\/90{color:hsl(var(--foreground) / .9)}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.text-gray-800{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity, 1))}.text-green-500{--tw-text-opacity: 1;color:rgb(34 197 94 / var(--tw-text-opacity, 1))}.text-green-600{--tw-text-opacity: 1;color:rgb(22 163 74 / var(--tw-text-opacity, 1))}.text-green-800{--tw-text-opacity: 1;color:rgb(22 101 52 / var(--tw-text-opacity, 1))}.text-muted-foreground{color:hsl(var(--muted-foreground))}.text-muted-foreground\/30{color:hsl(var(--muted-foreground) / .3)}.text-muted-foreground\/40{color:hsl(var(--muted-foreground) / .4)}.text-muted-foreground\/50{color:hsl(var(--muted-foreground) / .5)}.text-muted-foreground\/70{color:hsl(var(--muted-foreground) / .7)}.text-orange-500{--tw-text-opacity: 1;color:rgb(249 115 22 / var(--tw-text-opacity, 1))}.text-popover-foreground{color:hsl(var(--popover-foreground))}.text-primary{color:hsl(var(--primary))}.text-primary-foreground{color:hsl(var(--primary-foreground))}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}.text-red-800{--tw-text-opacity: 1;color:rgb(153 27 27 / var(--tw-text-opacity, 1))}.text-secondary-foreground{color:hsl(var(--secondary-foreground))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-yellow-600{--tw-text-opacity: 1;color:rgb(202 138 4 / var(--tw-text-opacity, 1))}.text-yellow-800{--tw-text-opacity: 1;color:rgb(133 77 14 / var(--tw-text-opacity, 1))}.underline-offset-4{text-underline-offset:4px}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-30{opacity:.3}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-none{--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-destructive\/50{--tw-shadow-color: hsl(var(--destructive) / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-emerald-500\/50{--tw-shadow-color: rgb(16 185 129 / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-yellow-500\/50{--tw-shadow-color: rgb(234 179 8 / .5);--tw-shadow: var(--tw-shadow-colored)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring-0{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-2{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-gray-200{--tw-ring-opacity: 1;--tw-ring-color: rgb(229 231 235 / var(--tw-ring-opacity, 1))}.ring-gray-300\/20{--tw-ring-color: rgb(209 213 219 / .2)}.ring-green-500\/20{--tw-ring-color: rgb(34 197 94 / .2)}.ring-primary\/20{--tw-ring-color: hsl(var(--primary) / .2)}.ring-offset-2{--tw-ring-offset-width: 2px}.ring-offset-background{--tw-ring-offset-color: hsl(var(--background))}.ring-offset-white{--tw-ring-offset-color: #fff}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\[margin\]{transition-property:margin;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\[max-height\,padding\]{transition-property:max-height,padding;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\[opacity\]{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\[width\]{transition-property:width;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-shadow{transition-property:box-shadow;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.delay-100{transition-delay:.1s}.delay-150{transition-delay:.15s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.duration-500{transition-duration:.5s}.duration-700{transition-duration:.7s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}@keyframes enter{0%{opacity:var(--tw-enter-opacity, 1);transform:translate3d(var(--tw-enter-translate-x, 0),var(--tw-enter-translate-y, 0),0) scale3d(var(--tw-enter-scale, 1),var(--tw-enter-scale, 1),var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity, 1);transform:translate3d(var(--tw-exit-translate-x, 0),var(--tw-exit-translate-y, 0),0) scale3d(var(--tw-exit-scale, 1),var(--tw-exit-scale, 1),var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0))}}.animate-in{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.fade-in-0{--tw-enter-opacity: 0}.zoom-in-95{--tw-enter-scale: .95}.duration-200{animation-duration:.2s}.duration-300{animation-duration:.3s}.duration-500{animation-duration:.5s}.duration-700{animation-duration:.7s}.delay-100{animation-delay:.1s}.delay-150{animation-delay:.15s}.ease-in-out{animation-timing-function:cubic-bezier(.4,0,.2,1)}.ease-out{animation-timing-function:cubic-bezier(0,0,.2,1)}.no-scrollbar::-webkit-scrollbar{display:none}.no-scrollbar{-ms-overflow-style:none;scrollbar-width:none}html{overflow-y:scroll}.sticky{position:sticky!important;z-index:2;background-color:hsl(var(--card))}.sticky.before\:right-0:before,.sticky.before\:left-0:before{content:"";position:absolute;top:0;bottom:0;width:2px;background:linear-gradient(to right,rgba(0,0,0,.08),transparent);opacity:1;transition:opacity .3s ease}.sticky.before\:right-0:before{right:-1px;background:linear-gradient(to right,rgba(0,0,0,.08),transparent)}.sticky.before\:right-0:after{content:"";position:absolute;top:0;right:-8px;bottom:0;width:8px;pointer-events:none;background:linear-gradient(to right,rgba(0,0,0,.05),transparent)}.sticky.before\:left-0:before{left:-1px;background:linear-gradient(to left,rgba(0,0,0,.08),transparent)}.sticky.before\:left-0:after{content:"";position:absolute;top:0;left:-8px;bottom:0;width:8px;pointer-events:none;background:linear-gradient(to left,rgba(0,0,0,.05),transparent)}.sticky:hover:before{opacity:.8}.dark .sticky.before\:right-0:before,.dark .sticky.before\:left-0:before{background:linear-gradient(to right,rgba(255,255,255,.05),transparent)}.dark .sticky.before\:right-0:after,.dark .sticky.before\:left-0:after{background:linear-gradient(to right,rgba(255,255,255,.03),transparent)}.hover\:bg-muted\/50:hover .sticky:before{opacity:1}.\*\:\!inline-block>*{display:inline-block!important}.file\:border-0::file-selector-button{border-width:0px}.file\:bg-transparent::file-selector-button{background-color:transparent}.file\:text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\:font-medium::file-selector-button{font-weight:500}.placeholder\:text-muted-foreground::-moz-placeholder{color:hsl(var(--muted-foreground))}.placeholder\:text-muted-foreground::placeholder{color:hsl(var(--muted-foreground))}.before\:absolute:before{content:var(--tw-content);position:absolute}.before\:bottom-0:before{content:var(--tw-content);bottom:0}.before\:left-0:before{content:var(--tw-content);left:0}.before\:right-0:before{content:var(--tw-content);right:0}.before\:top-0:before{content:var(--tw-content);top:0}.before\:w-\[1px\]:before{content:var(--tw-content);width:1px}.before\:bg-border:before{content:var(--tw-content);background-color:hsl(var(--border))}.after\:pointer-events-none:after{content:var(--tw-content);pointer-events:none}.after\:absolute:after{content:var(--tw-content);position:absolute}.after\:bottom-0:after{content:var(--tw-content);bottom:0}.after\:left-0:after{content:var(--tw-content);left:0}.after\:hidden:after{content:var(--tw-content);display:none}.after\:h-32:after{content:var(--tw-content);height:8rem}.after\:w-full:after{content:var(--tw-content);width:100%}.after\:bg-\[linear-gradient\(180deg\,_transparent_10\%\,_hsl\(var\(--background\)\)_70\%\)\]:after{content:var(--tw-content);background-image:linear-gradient(180deg,transparent 10%,hsl(var(--background)) 70%)}.focus-within\:relative:focus-within{position:relative}.focus-within\:z-20:focus-within{z-index:20}.focus-within\:ring-1:focus-within{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-within\:ring-ring:focus-within{--tw-ring-color: hsl(var(--ring))}.hover\:-translate-y-1:hover{--tw-translate-y: -.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:scale-110:hover{--tw-scale-x: 1.1;--tw-scale-y: 1.1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:border-primary\/50:hover{border-color:hsl(var(--primary) / .5)}.hover\:bg-accent:hover{background-color:hsl(var(--accent))}.hover\:bg-blue-100:hover{--tw-bg-opacity: 1;background-color:rgb(219 234 254 / var(--tw-bg-opacity, 1))}.hover\:bg-card\/80:hover{background-color:hsl(var(--card) / .8)}.hover\:bg-destructive\/10:hover{background-color:hsl(var(--destructive) / .1)}.hover\:bg-destructive\/25:hover{background-color:hsl(var(--destructive) / .25)}.hover\:bg-destructive\/80:hover{background-color:hsl(var(--destructive) / .8)}.hover\:bg-destructive\/90:hover{background-color:hsl(var(--destructive) / .9)}.hover\:bg-gray-100:hover{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.hover\:bg-green-100:hover{--tw-bg-opacity: 1;background-color:rgb(220 252 231 / var(--tw-bg-opacity, 1))}.hover\:bg-inherit:hover{background-color:inherit}.hover\:bg-muted:hover{background-color:hsl(var(--muted))}.hover\:bg-muted\/40:hover{background-color:hsl(var(--muted) / .4)}.hover\:bg-muted\/50:hover{background-color:hsl(var(--muted) / .5)}.hover\:bg-muted\/60:hover{background-color:hsl(var(--muted) / .6)}.hover\:bg-primary:hover{background-color:hsl(var(--primary))}.hover\:bg-primary\/10:hover{background-color:hsl(var(--primary) / .1)}.hover\:bg-primary\/90:hover{background-color:hsl(var(--primary) / .9)}.hover\:bg-red-100:hover{--tw-bg-opacity: 1;background-color:rgb(254 226 226 / var(--tw-bg-opacity, 1))}.hover\:bg-secondary-foreground\/10:hover{background-color:hsl(var(--secondary-foreground) / .1)}.hover\:bg-secondary\/70:hover{background-color:hsl(var(--secondary) / .7)}.hover\:bg-secondary\/80:hover{background-color:hsl(var(--secondary) / .8)}.hover\:bg-transparent:hover{background-color:transparent}.hover\:bg-yellow-100:hover{--tw-bg-opacity: 1;background-color:rgb(254 249 195 / var(--tw-bg-opacity, 1))}.hover\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.hover\:text-destructive:hover{color:hsl(var(--destructive))}.hover\:text-foreground:hover{color:hsl(var(--foreground))}.hover\:text-foreground\/70:hover{color:hsl(var(--foreground) / .7)}.hover\:text-muted-foreground:hover{color:hsl(var(--muted-foreground))}.hover\:text-primary:hover{color:hsl(var(--primary))}.hover\:text-primary-foreground:hover{color:hsl(var(--primary-foreground))}.hover\:text-primary\/80:hover{color:hsl(var(--primary) / .8)}.hover\:text-red-600:hover{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-100:hover{opacity:1}.hover\:opacity-80:hover{opacity:.8}.hover\:shadow-lg:hover{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\:shadow-md:hover{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\:shadow-black\/30:hover{--tw-shadow-color: rgb(0 0 0 / .3);--tw-shadow: var(--tw-shadow-colored)}.hover\:ring-primary:hover{--tw-ring-color: hsl(var(--primary))}.focus\:z-10:focus{z-index:10}.focus\:bg-accent:focus{background-color:hsl(var(--accent))}.focus\:bg-primary:focus{background-color:hsl(var(--primary))}.focus\:text-accent-foreground:focus{color:hsl(var(--accent-foreground))}.focus\:text-destructive:focus{color:hsl(var(--destructive))}.focus\:text-primary-foreground:focus{color:hsl(var(--primary-foreground))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-1:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-ring:focus{--tw-ring-color: hsl(var(--ring))}.focus\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.focus-visible\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\:ring-1:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\:ring-2:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\:ring-primary:focus-visible{--tw-ring-color: hsl(var(--primary))}.focus-visible\:ring-red-500:focus-visible{--tw-ring-opacity: 1;--tw-ring-color: rgb(239 68 68 / var(--tw-ring-opacity, 1))}.focus-visible\:ring-ring:focus-visible{--tw-ring-color: hsl(var(--ring))}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}.focus-visible\:ring-offset-background:focus-visible{--tw-ring-offset-color: hsl(var(--background))}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.group\/id:hover .group-hover\/id\:opacity-100,.group:hover .group-hover\:opacity-100{opacity:1}.group[data-collapsed=true] .group-\[\[data-collapsed\=true\]\]\:justify-center{justify-content:center}.group[data-collapsed=true] .group-\[\[data-collapsed\=true\]\]\:px-2{padding-left:.5rem;padding-right:.5rem}.peer:disabled~.peer-disabled\:cursor-not-allowed{cursor:not-allowed}.peer:disabled~.peer-disabled\:opacity-70{opacity:.7}.has-\[\:focus-visible\]\:outline-none:has(:focus-visible){outline:2px solid transparent;outline-offset:2px}.has-\[\:focus-visible\]\:ring-1:has(:focus-visible){--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.has-\[\:focus-visible\]\:ring-neutral-950:has(:focus-visible){--tw-ring-opacity: 1;--tw-ring-color: rgb(10 10 10 / var(--tw-ring-opacity, 1))}.aria-selected\:bg-accent[aria-selected=true]{background-color:hsl(var(--accent))}.aria-selected\:bg-accent\/50[aria-selected=true]{background-color:hsl(var(--accent) / .5)}.aria-selected\:text-accent-foreground[aria-selected=true]{color:hsl(var(--accent-foreground))}.aria-selected\:text-muted-foreground[aria-selected=true]{color:hsl(var(--muted-foreground))}.aria-selected\:opacity-100[aria-selected=true]{opacity:1}.data-\[disabled\]\:pointer-events-none[data-disabled]{pointer-events:none}.data-\[side\=bottom\]\:translate-y-1[data-side=bottom]{--tw-translate-y: .25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[side\=left\]\:-translate-x-1[data-side=left]{--tw-translate-x: -.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[side\=right\]\:translate-x-1[data-side=right]{--tw-translate-x: .25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[side\=top\]\:-translate-y-1[data-side=top]{--tw-translate-y: -.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[state\=checked\]\:translate-x-4[data-state=checked]{--tw-translate-x: 1rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[state\=unchecked\]\:translate-x-0[data-state=unchecked]{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes accordion-up{0%{height:var(--radix-accordion-content-height)}to{height:0}}.data-\[state\=closed\]\:animate-accordion-up[data-state=closed]{animation:accordion-up .2s ease-out}@keyframes accordion-down{0%{height:0}to{height:var(--radix-accordion-content-height)}}.data-\[state\=open\]\:animate-accordion-down[data-state=open]{animation:accordion-down .2s ease-out}.data-\[state\=dragging\]\:cursor-grabbing[data-state=dragging]{cursor:grabbing}.data-\[active\]\:bg-accent\/50[data-active]{background-color:hsl(var(--accent) / .5)}.data-\[disabled\]\:bg-muted-foreground[data-disabled],.data-\[fixed\]\:bg-muted-foreground[data-fixed]{background-color:hsl(var(--muted-foreground))}.data-\[state\=active\]\:bg-background[data-state=active]{background-color:hsl(var(--background))}.data-\[state\=checked\]\:bg-primary[data-state=checked]{background-color:hsl(var(--primary))}.data-\[state\=open\]\:bg-accent[data-state=open]{background-color:hsl(var(--accent))}.data-\[state\=open\]\:bg-accent\/50[data-state=open]{background-color:hsl(var(--accent) / .5)}.data-\[state\=open\]\:bg-secondary[data-state=open]{background-color:hsl(var(--secondary))}.data-\[state\=selected\]\:bg-muted[data-state=selected]{background-color:hsl(var(--muted))}.data-\[state\=unchecked\]\:bg-input[data-state=unchecked]{background-color:hsl(var(--input))}.data-\[collapsed\=true\]\:py-2[data-collapsed=true]{padding-top:.5rem;padding-bottom:.5rem}.data-\[disabled\]\:text-muted[data-disabled],.data-\[fixed\]\:text-muted[data-fixed]{color:hsl(var(--muted))}.data-\[state\=active\]\:text-foreground[data-state=active]{color:hsl(var(--foreground))}.data-\[state\=checked\]\:text-primary-foreground[data-state=checked]{color:hsl(var(--primary-foreground))}.data-\[state\=open\]\:text-muted-foreground[data-state=open]{color:hsl(var(--muted-foreground))}.data-\[disabled\]\:opacity-50[data-disabled]{opacity:.5}.data-\[state\=active\]\:shadow[data-state=active]{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.data-\[state\=closed\]\:duration-300[data-state=closed],.data-\[state\=open\]\:duration-300[data-state=open]{transition-duration:.3s}.data-\[motion\^\=from-\]\:animate-in[data-motion^=from-],.data-\[state\=open\]\:animate-in[data-state=open],.data-\[state\=visible\]\:animate-in[data-state=visible]{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.data-\[motion\^\=to-\]\:animate-out[data-motion^=to-],.data-\[state\=closed\]\:animate-out[data-state=closed],.data-\[state\=hidden\]\:animate-out[data-state=hidden]{animation-name:exit;animation-duration:.15s;--tw-exit-opacity: initial;--tw-exit-scale: initial;--tw-exit-rotate: initial;--tw-exit-translate-x: initial;--tw-exit-translate-y: initial}.data-\[motion\^\=from-\]\:fade-in[data-motion^=from-]{--tw-enter-opacity: 0}.data-\[motion\^\=to-\]\:fade-out[data-motion^=to-],.data-\[state\=closed\]\:fade-out-0[data-state=closed],.data-\[state\=hidden\]\:fade-out[data-state=hidden]{--tw-exit-opacity: 0}.data-\[state\=open\]\:fade-in-0[data-state=open],.data-\[state\=visible\]\:fade-in[data-state=visible]{--tw-enter-opacity: 0}.data-\[state\=closed\]\:zoom-out-95[data-state=closed]{--tw-exit-scale: .95}.data-\[state\=open\]\:zoom-in-90[data-state=open]{--tw-enter-scale: .9}.data-\[state\=open\]\:zoom-in-95[data-state=open]{--tw-enter-scale: .95}.data-\[motion\=from-end\]\:slide-in-from-right-52[data-motion=from-end]{--tw-enter-translate-x: 13rem}.data-\[motion\=from-start\]\:slide-in-from-left-52[data-motion=from-start]{--tw-enter-translate-x: -13rem}.data-\[motion\=to-end\]\:slide-out-to-right-52[data-motion=to-end]{--tw-exit-translate-x: 13rem}.data-\[motion\=to-start\]\:slide-out-to-left-52[data-motion=to-start]{--tw-exit-translate-x: -13rem}.data-\[side\=bottom\]\:slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y: -.5rem}.data-\[side\=left\]\:slide-in-from-right-2[data-side=left]{--tw-enter-translate-x: .5rem}.data-\[side\=right\]\:slide-in-from-left-2[data-side=right]{--tw-enter-translate-x: -.5rem}.data-\[side\=top\]\:slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y: .5rem}.data-\[state\=closed\]\:slide-out-to-bottom[data-state=closed]{--tw-exit-translate-y: 100%}.data-\[state\=closed\]\:slide-out-to-left[data-state=closed]{--tw-exit-translate-x: -100%}.data-\[state\=closed\]\:slide-out-to-left-1\/2[data-state=closed]{--tw-exit-translate-x: -50%}.data-\[state\=closed\]\:slide-out-to-right[data-state=closed]{--tw-exit-translate-x: 100%}.data-\[state\=closed\]\:slide-out-to-top[data-state=closed]{--tw-exit-translate-y: -100%}.data-\[state\=closed\]\:slide-out-to-top-\[48\%\][data-state=closed]{--tw-exit-translate-y: -48%}.data-\[state\=open\]\:slide-in-from-bottom[data-state=open]{--tw-enter-translate-y: 100%}.data-\[state\=open\]\:slide-in-from-left[data-state=open]{--tw-enter-translate-x: -100%}.data-\[state\=open\]\:slide-in-from-left-1\/2[data-state=open]{--tw-enter-translate-x: -50%}.data-\[state\=open\]\:slide-in-from-right[data-state=open]{--tw-enter-translate-x: 100%}.data-\[state\=open\]\:slide-in-from-top[data-state=open]{--tw-enter-translate-y: -100%}.data-\[state\=open\]\:slide-in-from-top-\[48\%\][data-state=open]{--tw-enter-translate-y: -48%}.data-\[state\=closed\]\:duration-300[data-state=closed],.data-\[state\=open\]\:duration-300[data-state=open]{animation-duration:.3s}.data-\[disabled\]\:hover\:bg-muted-foreground:hover[data-disabled],.data-\[fixed\]\:hover\:bg-muted-foreground:hover[data-fixed]{background-color:hsl(var(--muted-foreground))}.group[data-state=open] .group-data-\[state\=\"open\"\]\:-rotate-180{--tw-rotate: -180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group[data-state=open] .group-data-\[state\=open\]\:rotate-180{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.dark\:border-blue-700:is(.dark *){--tw-border-opacity: 1;border-color:rgb(29 78 216 / var(--tw-border-opacity, 1))}.dark\:border-gray-700:is(.dark *){--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity, 1))}.dark\:bg-blue-950:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(23 37 84 / var(--tw-bg-opacity, 1))}.dark\:bg-gray-800\/50:is(.dark *){background-color:#1f293780}.dark\:bg-green-500\/10:is(.dark *){background-color:#22c55e1a}.dark\:bg-red-500\/10:is(.dark *){background-color:#ef44441a}.dark\:bg-yellow-500\/10:is(.dark *){background-color:#eab3081a}.dark\:text-gray-400:is(.dark *){--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.dark\:text-green-400:is(.dark *){--tw-text-opacity: 1;color:rgb(74 222 128 / var(--tw-text-opacity, 1))}.dark\:text-red-400:is(.dark *){--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.dark\:text-yellow-400:is(.dark *){--tw-text-opacity: 1;color:rgb(250 204 21 / var(--tw-text-opacity, 1))}.dark\:ring-gray-700:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(55 65 81 / var(--tw-ring-opacity, 1))}.dark\:ring-gray-800:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(31 41 55 / var(--tw-ring-opacity, 1))}.dark\:placeholder\:text-gray-500:is(.dark *)::-moz-placeholder{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.dark\:placeholder\:text-gray-500:is(.dark *)::placeholder{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.dark\:hover\:bg-blue-900:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(30 58 138 / var(--tw-bg-opacity, 1))}.dark\:hover\:bg-red-900:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(127 29 29 / var(--tw-bg-opacity, 1))}.dark\:hover\:text-red-400:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.dark\:has-\[\:focus-visible\]\:ring-neutral-300:has(:focus-visible):is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(212 212 212 / var(--tw-ring-opacity, 1))}@media (min-width: 640px){.sm\:absolute{position:absolute}.sm\:inset-auto{inset:auto}.sm\:bottom-\[calc\(100\%\+10px\)\]{bottom:calc(100% + 10px)}.sm\:left-0{left:0}.sm\:right-0{right:0}.sm\:my-0{margin-top:0;margin-bottom:0}.sm\:my-4{margin-top:1rem;margin-bottom:1rem}.sm\:mt-0{margin-top:0}.sm\:hidden{display:none}.sm\:h-\[80vh\]{height:80vh}.sm\:h-full{height:100%}.sm\:max-h-\[500px\]{max-height:500px}.sm\:max-h-\[600px\]{max-height:600px}.sm\:max-h-\[700px\]{max-height:700px}.sm\:max-h-\[800px\]{max-height:800px}.sm\:w-48{width:12rem}.sm\:w-\[480px\]{width:480px}.sm\:w-\[90vw\]{width:90vw}.sm\:w-full{width:100%}.sm\:max-w-72{max-width:18rem}.sm\:max-w-\[1025px\]{max-width:1025px}.sm\:max-w-\[425px\]{max-width:425px}.sm\:max-w-\[700px\]{max-width:700px}.sm\:max-w-lg{max-width:32rem}.sm\:max-w-md{max-width:28rem}.sm\:max-w-sm{max-width:24rem}.sm\:max-w-xl{max-width:36rem}.sm\:translate-y-5{--tw-translate-y: 1.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.sm\:grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}.sm\:items-center{align-items:center}.sm\:justify-end{justify-content:flex-end}.sm\:justify-between{justify-content:space-between}.sm\:gap-6{gap:1.5rem}.sm\:space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.sm\:space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1rem * var(--tw-space-x-reverse));margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))}.sm\:space-y-0>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(0px * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(0px * var(--tw-space-y-reverse))}.sm\:rounded-lg{border-radius:var(--radius)}.sm\:text-left{text-align:left}}@media (min-width: 768px){.md\:absolute{position:absolute}.md\:bottom-0{bottom:0}.md\:right-auto{right:auto}.md\:col-span-1{grid-column:span 1 / span 1}.md\:ml-14{margin-left:3.5rem}.md\:ml-64{margin-left:16rem}.md\:block{display:block}.md\:flex{display:flex}.md\:inline-flex{display:inline-flex}.md\:hidden{display:none}.md\:h-svh{height:100svh}.md\:max-h-screen{max-height:100vh}.md\:w-14{width:3.5rem}.md\:w-32{width:8rem}.md\:w-64{width:16rem}.md\:w-\[var\(--radix-navigation-menu-viewport-width\)\]{width:var(--radix-navigation-menu-viewport-width)}.md\:w-auto{width:auto}.md\:max-w-\[31rem\]{max-width:31rem}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:flex-row{flex-direction:row}.md\:items-center{align-items:center}.md\:justify-between{justify-content:space-between}.md\:overflow-y-hidden{overflow-y:hidden}.md\:border-none{border-style:none}.md\:px-4{padding-left:1rem;padding-right:1rem}.md\:px-8{padding-left:2rem;padding-right:2rem}.md\:py-2{padding-top:.5rem;padding-bottom:.5rem}.md\:pt-0{padding-top:0}.md\:text-3xl{font-size:1.875rem;line-height:2.25rem}.after\:md\:block:after{content:var(--tw-content);display:block}}@media (min-width: 1024px){.lg\:flex{display:flex}.lg\:hidden{display:none}.lg\:w-1\/5{width:20%}.lg\:w-\[250px\]{width:250px}.lg\:max-w-none{max-width:none}.lg\:max-w-xl{max-width:36rem}.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\:flex-row{flex-direction:row}.lg\:flex-col{flex-direction:column}.lg\:gap-8{gap:2rem}.lg\:space-x-0>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(0px * var(--tw-space-x-reverse));margin-left:calc(0px * calc(1 - var(--tw-space-x-reverse)))}.lg\:space-x-12>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(3rem * var(--tw-space-x-reverse));margin-left:calc(3rem * calc(1 - var(--tw-space-x-reverse)))}.lg\:space-x-6>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1.5rem * var(--tw-space-x-reverse));margin-left:calc(1.5rem * calc(1 - var(--tw-space-x-reverse)))}.lg\:space-y-0>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(0px * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(0px * var(--tw-space-y-reverse))}.lg\:space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.lg\:p-8{padding:2rem}.lg\:px-0{padding-left:0;padding-right:0}.lg\:px-3{padding-left:.75rem;padding-right:.75rem}}@media (min-width: 1280px){.xl\:mr-2{margin-right:.5rem}.xl\:flex{display:flex}.xl\:inline-flex{display:inline-flex}.xl\:h-10{height:2.5rem}.xl\:w-60{width:15rem}.xl\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.xl\:justify-start{justify-content:flex-start}.xl\:px-3{padding-left:.75rem;padding-right:.75rem}.xl\:py-2{padding-top:.5rem;padding-bottom:.5rem}}.\[\&\:\:-webkit-calendar-picker-indicator\]\:hidden::-webkit-calendar-picker-indicator{display:none}.\[\&\:has\(\>\.day-range-end\)\]\:rounded-r-md:has(>.day-range-end){border-top-right-radius:calc(var(--radius) - 2px);border-bottom-right-radius:calc(var(--radius) - 2px)}.\[\&\:has\(\>\.day-range-start\)\]\:rounded-l-md:has(>.day-range-start){border-top-left-radius:calc(var(--radius) - 2px);border-bottom-left-radius:calc(var(--radius) - 2px)}.\[\&\:has\(\[aria-selected\]\)\]\:rounded-md:has([aria-selected]){border-radius:calc(var(--radius) - 2px)}.\[\&\:has\(\[aria-selected\]\)\]\:bg-accent:has([aria-selected]){background-color:hsl(var(--accent))}.first\:\[\&\:has\(\[aria-selected\]\)\]\:rounded-l-md:has([aria-selected]):first-child{border-top-left-radius:calc(var(--radius) - 2px);border-bottom-left-radius:calc(var(--radius) - 2px)}.last\:\[\&\:has\(\[aria-selected\]\)\]\:rounded-r-md:has([aria-selected]):last-child{border-top-right-radius:calc(var(--radius) - 2px);border-bottom-right-radius:calc(var(--radius) - 2px)}.\[\&\:has\(\[aria-selected\]\.day-outside\)\]\:bg-accent\/50:has([aria-selected].day-outside){background-color:hsl(var(--accent) / .5)}.\[\&\:has\(\[aria-selected\]\.day-range-end\)\]\:rounded-r-md:has([aria-selected].day-range-end){border-top-right-radius:calc(var(--radius) - 2px);border-bottom-right-radius:calc(var(--radius) - 2px)}.\[\&\:has\(\[role\=checkbox\]\)\]\:pr-0:has([role=checkbox]){padding-right:0}.\[\&\>\[role\=checkbox\]\]\:translate-y-\[2px\]>[role=checkbox]{--tw-translate-y: 2px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.\[\&\>span\]\:line-clamp-1>span{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.\[\&\>tr\]\:last\:border-b-0:last-child>tr{border-bottom-width:0px}.\[\&\[data-state\=open\]\>svg\]\:rotate-180[data-state=open]>svg{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.\[\&_\[cmdk-group-heading\]\]\:px-2 [cmdk-group-heading]{padding-left:.5rem;padding-right:.5rem}.\[\&_\[cmdk-group-heading\]\]\:py-1\.5 [cmdk-group-heading]{padding-top:.375rem;padding-bottom:.375rem}.\[\&_\[cmdk-group-heading\]\]\:text-xs [cmdk-group-heading]{font-size:.75rem;line-height:1rem}.\[\&_\[cmdk-group-heading\]\]\:font-medium [cmdk-group-heading]{font-weight:500}.\[\&_\[cmdk-group-heading\]\]\:text-muted-foreground [cmdk-group-heading]{color:hsl(var(--muted-foreground))}.\[\&_\[cmdk-group\]\:not\(\[hidden\]\)_\~\[cmdk-group\]\]\:pt-0 [cmdk-group]:not([hidden])~[cmdk-group]{padding-top:0}.\[\&_\[cmdk-group\]\]\:px-2 [cmdk-group]{padding-left:.5rem;padding-right:.5rem}.\[\&_\[cmdk-input-wrapper\]_svg\]\:h-5 [cmdk-input-wrapper] svg{height:1.25rem}.\[\&_\[cmdk-input-wrapper\]_svg\]\:w-5 [cmdk-input-wrapper] svg{width:1.25rem}.\[\&_\[cmdk-input\]\]\:h-12 [cmdk-input]{height:3rem}.\[\&_\[cmdk-item\]\]\:px-2 [cmdk-item]{padding-left:.5rem;padding-right:.5rem}.\[\&_\[cmdk-item\]\]\:py-3 [cmdk-item]{padding-top:.75rem;padding-bottom:.75rem}.\[\&_\[cmdk-item\]_svg\]\:h-5 [cmdk-item] svg{height:1.25rem}.\[\&_\[cmdk-item\]_svg\]\:w-5 [cmdk-item] svg{width:1.25rem}.\[\&_svg\]\:invisible svg{visibility:hidden}.\[\&_tr\:last-child\]\:border-0 tr:last-child{border-width:0px}.\[\&_tr\]\:border-b tr{border-bottom-width:1px} diff --git a/public/assets/admin/assets/index.js b/public/assets/admin/assets/index.js index b2beb30..8f4a937 100644 --- a/public/assets/admin/assets/index.js +++ b/public/assets/admin/assets/index.js @@ -1,7 +1,7 @@ -import{r as o,j as e,t as Zr,c as Xr,I as ra,a as ps,S as Kt,u as We,b as ot,d as Qr,O as Gt,e as el,f as z,g as sl,h as tl,i as al,Q as nl,k as rl,R as ll,l as il,P as ol,m as cl,B as dl,n as Da,F as xl,C as ml,o as ul,p as hl,q as jl,s as gl,v as fl,z as i,w as Ta,x as Z,y as Q,A as Fa,D as ct,E as dt,G as Ut,H as Re,T as xt,J as mt,K as Pa,L as Va,M as pl,N as vl,U as bl,V as yl,W as Ia,X as qt,Y as za,Z as Nl,_ as Ra,$ as Ea,a0 as Ma,a1 as Oa,a2 as ds,a3 as La,a4 as wl,a5 as $a,a6 as Aa,a7 as _l,a8 as Cl,a9 as Sl,aa as kl,ab as Ha,ac as Dl,ad as Tl,ae as vs,af as Ka,ag as Fl,ah as Pl,ai as Ga,aj as Vl,ak as Il,al as la,am as zl,an as Ua,ao as Rl,ap as qa,aq as El,ar as Ml,as as Ol,at as Ll,au as $l,av as Al,aw as Ba,ax as Hl,ay as Kl,az as Gl,aA as ve,aB as Ul,aC as ql,aD as Bl,aE as Yl,aF as Ya,aG as Wa,aH as Ja,aI as Wl,aJ as Ft,aK as Jl,aL as Pt,aM as at,aN as Vt,aO as It,aP as Zl,aQ as ia,aR as oa,aS as G,aT as Xl,aU as Ql,aV as ei,aW as si,aX as ti,aY as Za,aZ as ai,a_ as ni,a$ as ri,b0 as Xa,b1 as li,b2 as Ye,b3 as Qa,b4 as ii,b5 as en,b6 as oi,b7 as sn,b8 as ci,b9 as tn,ba as an,bb as di,bc as xi,bd as nn,be as mi,bf as ui,bg as rn,bh as hi,bi as ln,bj as ji,bk as gi,bl as nt,bm as Bs,bn as fi,bo as ca,bp as zt,bq as Rt,br as da,bs as xa,bt as pi,bu as ut,bv as wt,bw as on,bx as vi,by as bi,bz as yi,bA as Ni,bB as cn,bC as wi,bD as Et,bE as _i,bF as Ci,bG as rt,bH as Ce,bI as ma,bJ as Si,bK as dn,bL as xn,bM as mn,bN as un,bO as hn,bP as jn,bQ as ki,bR as Di,bS as Ti,bT as ht,bU as bs,bV as Je,bW as Fe,bX as Pe,bY as Ee,bZ as Me,b_ as Oe,b$ as gn,c0 as ua,c1 as Mt,c2 as Ze,c3 as Xe,c4 as fn,c5 as pn,c6 as Fs,c7 as Fi,c8 as Pi,c9 as Vi,ca as vn,cb as ha,cc as lt,cd as Ii,ce as zi,cf as bn,cg as Ri,ch as Ei,ci as yn,cj as Ot,ck as Nn,cl as Mi,cm as wn,cn as Oi,co as Li,cp as $i,cq as _n,cr as Cn,cs as Sn,ct as Ai,cu as Hi,cv as Ki}from"./vendor.js";import"./index.js";var gu=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function fu(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}const Gi={theme:"system",setTheme:()=>null},kn=o.createContext(Gi);function Ui({children:s,defaultTheme:t="system",storageKey:a="vite-ui-theme",...n}){const[r,l]=o.useState(()=>localStorage.getItem(a)||t);o.useEffect(()=>{const x=window.document.documentElement;if(x.classList.remove("light","dark"),r==="system"){const u=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";x.classList.add(u);return}x.classList.add(r)},[r]);const c={theme:r,setTheme:x=>{localStorage.setItem(a,x),l(x)}};return e.jsx(kn.Provider,{...n,value:c,children:s})}const qi=()=>{const s=o.useContext(kn);if(s===void 0)throw new Error("useTheme must be used within a ThemeProvider");return s},Bi=function(){const t=typeof document<"u"&&document.createElement("link").relList;return t&&t.supports&&t.supports("modulepreload")?"modulepreload":"preload"}(),Yi=function(s,t){return new URL(s,t).href},ja={},J=function(t,a,n){let r=Promise.resolve();if(a&&a.length>0){const c=document.getElementsByTagName("link"),x=document.querySelector("meta[property=csp-nonce]"),u=x?.nonce||x?.getAttribute("nonce");r=Promise.allSettled(a.map(b=>{if(b=Yi(b,n),b in ja)return;ja[b]=!0;const p=b.endsWith(".css"),y=p?'[rel="stylesheet"]':"";if(!!n)for(let F=c.length-1;F>=0;F--){const T=c[F];if(T.href===b&&(!p||T.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${b}"]${y}`))return;const D=document.createElement("link");if(D.rel=p?"stylesheet":Bi,p||(D.as="script"),D.crossOrigin="",D.href=b,u&&D.setAttribute("nonce",u),document.head.appendChild(D),p)return new Promise((F,T)=>{D.addEventListener("load",F),D.addEventListener("error",()=>T(new Error(`Unable to preload CSS for ${b}`)))})}))}function l(c){const x=new Event("vite:preloadError",{cancelable:!0});if(x.payload=c,window.dispatchEvent(x),!x.defaultPrevented)throw c}return r.then(c=>{for(const x of c||[])x.status==="rejected"&&l(x.reason);return t().catch(l)})};function f(...s){return Zr(Xr(s))}const De=ps("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),k=o.forwardRef(({className:s,variant:t,size:a,asChild:n=!1,children:r,disabled:l,loading:c=!1,leftSection:x,rightSection:u,...b},p)=>{const y=n?Kt:"button";return e.jsxs(y,{className:f(De({variant:t,size:a,className:s})),disabled:c||l,ref:p,...b,children:[(x&&c||!x&&!u&&c)&&e.jsx(ra,{className:"mr-2 h-4 w-4 animate-spin"}),!c&&x&&e.jsx("div",{className:"mr-2",children:x}),r,!c&&u&&e.jsx("div",{className:"ml-2",children:u}),u&&c&&e.jsx(ra,{className:"ml-2 h-4 w-4 animate-spin"})]})});k.displayName="Button";function Ns({className:s,minimal:t=!1}){const a=We();return e.jsx("div",{className:f("h-svh w-full",s),children:e.jsxs("div",{className:"m-auto flex h-full w-full flex-col items-center justify-center gap-2",children:[!t&&e.jsx("h1",{className:"text-[7rem] font-bold leading-tight",children:"500"}),e.jsxs("span",{className:"font-medium",children:["Oops! Something went wrong ",":')"]}),e.jsxs("p",{className:"text-center text-muted-foreground",children:["We apologize for the inconvenience. ",e.jsx("br",{})," Please try again later."]}),!t&&e.jsxs("div",{className:"mt-6 flex gap-4",children:[e.jsx(k,{variant:"outline",onClick:()=>a(-1),children:"Go Back"}),e.jsx(k,{onClick:()=>a("/"),children:"Back to Home"})]})]})})}function ga(){const s=We();return e.jsx("div",{className:"h-svh",children:e.jsxs("div",{className:"m-auto flex h-full w-full flex-col items-center justify-center gap-2",children:[e.jsx("h1",{className:"text-[7rem] font-bold leading-tight",children:"404"}),e.jsx("span",{className:"font-medium",children:"Oops! Page Not Found!"}),e.jsxs("p",{className:"text-center text-muted-foreground",children:["It seems like the page you're looking for ",e.jsx("br",{}),"does not exist or might have been removed."]}),e.jsxs("div",{className:"mt-6 flex gap-4",children:[e.jsx(k,{variant:"outline",onClick:()=>s(-1),children:"Go Back"}),e.jsx(k,{onClick:()=>s("/"),children:"Back to Home"})]})]})})}function Wi(){return e.jsx("div",{className:"h-svh",children:e.jsxs("div",{className:"m-auto flex h-full w-full flex-col items-center justify-center gap-2",children:[e.jsx("h1",{className:"text-[7rem] font-bold leading-tight",children:"503"}),e.jsx("span",{className:"font-medium",children:"Website is under maintenance!"}),e.jsxs("p",{className:"text-center text-muted-foreground",children:["The site is not available at the moment. ",e.jsx("br",{}),"We'll be back online shortly."]}),e.jsx("div",{className:"mt-6 flex gap-4",children:e.jsx(k,{variant:"outline",children:"Learn more"})})]})})}function Ji(s){return typeof s>"u"}function Zi(s){return s===null}function Xi(s){return Zi(s)||Ji(s)}class Qi{storage;prefixKey;constructor(t){this.storage=t.storage,this.prefixKey=t.prefixKey}getKey(t){return`${this.prefixKey}${t}`.toUpperCase()}set(t,a,n=null){const r=JSON.stringify({value:a,time:Date.now(),expire:n!==null?new Date().getTime()+n*1e3:null});this.storage.setItem(this.getKey(t),r)}get(t,a=null){const n=this.storage.getItem(this.getKey(t));if(!n)return{value:a,time:0};try{const r=JSON.parse(n),{value:l,time:c,expire:x}=r;return Xi(x)||x>new Date().getTime()?{value:l,time:c}:(this.remove(t),{value:a,time:0})}catch{return this.remove(t),{value:a,time:0}}}remove(t){this.storage.removeItem(this.getKey(t))}clear(){this.storage.clear()}}function Dn({prefixKey:s="",storage:t=sessionStorage}){return new Qi({prefixKey:s,storage:t})}const Tn="Xboard_",eo=function(s={}){return Dn({prefixKey:s.prefixKey||"",storage:localStorage})},so=function(s={}){return Dn({prefixKey:s.prefixKey||"",storage:sessionStorage})},jt=eo({prefixKey:Tn});so({prefixKey:Tn});const Fn="access_token";function $s(){return jt.get(Fn)}function Pn(){jt.remove(Fn)}const fa=["/sign-in","/sign-in-2","/sign-up","/forgot-password","/otp"];function to({children:s}){const t=We(),a=ot(),n=$s();return o.useEffect(()=>{if(!n.value&&!fa.includes(a.pathname)){const r=encodeURIComponent(a.pathname+a.search);t(`/sign-in?redirect=${r}`)}},[n.value,a.pathname,a.search,t]),fa.includes(a.pathname)||n.value?e.jsx(e.Fragment,{children:s}):null}const ao=()=>e.jsx(to,{children:e.jsx(Gt,{})}),no=Qr([{path:"/sign-in",lazy:async()=>({Component:(await J(async()=>{const{default:s}=await Promise.resolve().then(()=>So);return{default:s}},void 0,import.meta.url)).default})},{element:e.jsx(ao,{}),children:[{path:"/",lazy:async()=>({Component:(await J(()=>Promise.resolve().then(()=>$o),void 0,import.meta.url)).default}),errorElement:e.jsx(Ns,{}),children:[{index:!0,lazy:async()=>({Component:(await J(async()=>{const{default:s}=await Promise.resolve().then(()=>ad);return{default:s}},void 0,import.meta.url)).default})},{path:"config",errorElement:e.jsx(Ns,{}),children:[{path:"system",lazy:async()=>({Component:(await J(async()=>{const{default:s}=await Promise.resolve().then(()=>ld);return{default:s}},void 0,import.meta.url)).default}),children:[{index:!0,lazy:async()=>({Component:(await J(async()=>{const{default:s}=await Promise.resolve().then(()=>md);return{default:s}},void 0,import.meta.url)).default})},{path:"safe",lazy:async()=>({Component:(await J(async()=>{const{default:s}=await Promise.resolve().then(()=>fd);return{default:s}},void 0,import.meta.url)).default})},{path:"subscribe",lazy:async()=>({Component:(await J(async()=>{const{default:s}=await Promise.resolve().then(()=>Nd);return{default:s}},void 0,import.meta.url)).default})},{path:"invite",lazy:async()=>({Component:(await J(async()=>{const{default:s}=await Promise.resolve().then(()=>kd);return{default:s}},void 0,import.meta.url)).default})},{path:"frontend",lazy:async()=>({Component:(await J(async()=>{const{default:s}=await Promise.resolve().then(()=>Vd);return{default:s}},void 0,import.meta.url)).default})},{path:"server",lazy:async()=>({Component:(await J(async()=>{const{default:s}=await Promise.resolve().then(()=>Md);return{default:s}},void 0,import.meta.url)).default})},{path:"email",lazy:async()=>({Component:(await J(async()=>{const{default:s}=await Promise.resolve().then(()=>Hd);return{default:s}},void 0,import.meta.url)).default})},{path:"telegram",lazy:async()=>({Component:(await J(async()=>{const{default:s}=await Promise.resolve().then(()=>Bd);return{default:s}},void 0,import.meta.url)).default})},{path:"APP",lazy:async()=>({Component:(await J(async()=>{const{default:s}=await Promise.resolve().then(()=>Xd);return{default:s}},void 0,import.meta.url)).default})}]},{path:"payment",lazy:async()=>({Component:(await J(async()=>{const{default:s}=await Promise.resolve().then(()=>xx);return{default:s}},void 0,import.meta.url)).default})},{path:"theme",lazy:async()=>({Component:(await J(async()=>{const{default:s}=await Promise.resolve().then(()=>hx);return{default:s}},void 0,import.meta.url)).default})},{path:"notice",lazy:async()=>({Component:(await J(async()=>{const{default:s}=await Promise.resolve().then(()=>yx);return{default:s}},void 0,import.meta.url)).default})},{path:"knowledge",lazy:async()=>({Component:(await J(async()=>{const{default:s}=await Promise.resolve().then(()=>Tx);return{default:s}},void 0,import.meta.url)).default})}]},{path:"server",errorElement:e.jsx(Ns,{}),children:[{path:"manage",lazy:async()=>({Component:(await J(async()=>{const{default:s}=await Promise.resolve().then(()=>Hx);return{default:s}},void 0,import.meta.url)).default})},{path:"group",lazy:async()=>({Component:(await J(async()=>{const{default:s}=await Promise.resolve().then(()=>Bx);return{default:s}},void 0,import.meta.url)).default})},{path:"route",lazy:async()=>({Component:(await J(async()=>{const{default:s}=await Promise.resolve().then(()=>Qx);return{default:s}},void 0,import.meta.url)).default})}]},{path:"finance",errorElement:e.jsx(Ns,{}),children:[{path:"plan",lazy:async()=>({Component:(await J(async()=>{const{default:s}=await Promise.resolve().then(()=>om);return{default:s}},void 0,import.meta.url)).default})},{path:"order",lazy:async()=>({Component:(await J(async()=>{const{default:s}=await Promise.resolve().then(()=>fm);return{default:s}},void 0,import.meta.url)).default})},{path:"coupon",lazy:async()=>({Component:(await J(async()=>{const{default:s}=await Promise.resolve().then(()=>Sm);return{default:s}},void 0,import.meta.url)).default})}]},{path:"user",errorElement:e.jsx(Ns,{}),children:[{path:"manage",lazy:async()=>({Component:(await J(async()=>{const{default:s}=await Promise.resolve().then(()=>Ym);return{default:s}},void 0,import.meta.url)).default})},{path:"ticket",lazy:async()=>({Component:(await J(async()=>{const{default:s}=await Promise.resolve().then(()=>uu);return{default:s}},void 0,import.meta.url)).default})}]}]}]},{path:"/500",Component:Ns},{path:"/404",Component:ga},{path:"/503",Component:Wi},{path:"*",Component:ga}]),ro="locale";function lo(){return jt.get(ro)}function Vn(){Pn();const s=window.location.pathname,t=s&&!["/404","/sign-in"].includes(s);window.location.href="/sign-in"+(t?`?redirect=${s}`:"")}const io=["/passport/auth/login","/passport/auth/token2Login","/passport/auth/register","/guest/comm/config","/passport/comm/sendEmailVerify","/passport/auth/forget"];function oo(){const s=window.settings?.base_url||"/";return s.endsWith("/")?s+"api/v2":s+"/api/v2"}const I=el.create({baseURL:oo(),timeout:12e3,headers:{"Content-Type":"application/json"}});I.interceptors.request.use(s=>{s.method?.toLowerCase()==="get"&&(s.params={...s.params,t:Date.now()});const t=$s();if(!io.includes(s.url?.split("?")[0]||"")){if(!t.value)return Vn(),Promise.reject({code:-1,message:"未登录"});s.headers.Authorization=t.value}return s.headers["Content-Language"]=lo().value||"zh-CN",s},s=>Promise.reject(s));I.interceptors.response.use(s=>{const t=s?.data||{code:-1,message:"未知错误"};return Promise.resolve(t)},s=>{const t=s.response?.data||{data:null,code:-1,message:"未知错误"},a=s.response?.status;let n=t.message;return a===401||a===403?(Vn(),n=a===401?n||"登录已过期":n||"没有权限"):a===404?n=n||"资源或接口不存在":n=n||"未知异常",z.error(n),Promise.resolve(t)});function co(){return I.get("/user/info")}const _t={token:$s()?.value||"",userInfo:null,isLoggedIn:!!$s()?.value,loading:!1,error:null},Os=sl("user/fetchUserInfo",async()=>(await co()).data,{condition:(s,{getState:t})=>{const{user:a}=t();return!!a.token&&!a.loading}}),In=tl({name:"user",initialState:_t,reducers:{setToken(s,t){s.token=t.payload,s.isLoggedIn=!!t.payload},resetUserState:()=>_t},extraReducers:s=>{s.addCase(Os.pending,t=>{t.loading=!0,t.error=null}).addCase(Os.fulfilled,(t,a)=>{t.loading=!1,t.userInfo=a.payload,t.error=null}).addCase(Os.rejected,(t,a)=>{if(t.loading=!1,t.error=a.error.message||"Failed to fetch user info",!t.token)return _t})}}),{setToken:xo,resetUserState:mo}=In.actions,uo=s=>s.user.userInfo,ho=In.reducer,zn=al({reducer:{user:ho}});$s()?.value&&zn.dispatch(Os());const jo=new nl;rl.createRoot(document.getElementById("root")).render(e.jsx(ll.StrictMode,{children:e.jsx(il,{client:jo,children:e.jsx(ol,{store:zn,children:e.jsxs(Ui,{defaultTheme:"light",storageKey:"vite-ui-theme",children:[e.jsx(cl,{router:no}),e.jsx(dl,{richColors:!0,position:"top-right"})]})})})}));const ze=o.forwardRef(({className:s,...t},a)=>e.jsx("div",{ref:a,className:f("rounded-xl border bg-card text-card-foreground shadow",s),...t}));ze.displayName="Card";const Ke=o.forwardRef(({className:s,...t},a)=>e.jsx("div",{ref:a,className:f("flex flex-col space-y-1.5 p-6",s),...t}));Ke.displayName="CardHeader";const os=o.forwardRef(({className:s,...t},a)=>e.jsx("h3",{ref:a,className:f("font-semibold leading-none tracking-tight",s),...t}));os.displayName="CardTitle";const Rn=o.forwardRef(({className:s,...t},a)=>e.jsx("p",{ref:a,className:f("text-sm text-muted-foreground",s),...t}));Rn.displayName="CardDescription";const Ge=o.forwardRef(({className:s,...t},a)=>e.jsx("div",{ref:a,className:f("p-6 pt-0",s),...t}));Ge.displayName="CardContent";const go=o.forwardRef(({className:s,...t},a)=>e.jsx("div",{ref:a,className:f("flex items-center p-6 pt-0",s),...t}));go.displayName="CardFooter";const fo=ps("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),En=o.forwardRef(({className:s,...t},a)=>e.jsx(Da,{ref:a,className:f(fo(),s),...t}));En.displayName=Da.displayName;const ee=xl,Mn=o.createContext({}),j=({...s})=>e.jsx(Mn.Provider,{value:{name:s.name},children:e.jsx(ml,{...s})}),gt=()=>{const s=o.useContext(Mn),t=o.useContext(On),{getFieldState:a,formState:n}=ul(),r=a(s.name,n);if(!s)throw new Error("useFormField should be used within ");const{id:l}=t;return{id:l,name:s.name,formItemId:`${l}-form-item`,formDescriptionId:`${l}-form-item-description`,formMessageId:`${l}-form-item-message`,...r}},On=o.createContext({}),h=o.forwardRef(({className:s,...t},a)=>{const n=o.useId();return e.jsx(On.Provider,{value:{id:n},children:e.jsx("div",{ref:a,className:f("space-y-2",s),...t})})});h.displayName="FormItem";const g=o.forwardRef(({className:s,...t},a)=>{const{error:n,formItemId:r}=gt();return e.jsx(En,{ref:a,className:f(n&&"text-destructive",s),htmlFor:r,...t})});g.displayName="FormLabel";const v=o.forwardRef(({...s},t)=>{const{error:a,formItemId:n,formDescriptionId:r,formMessageId:l}=gt();return e.jsx(Kt,{ref:t,id:n,"aria-describedby":a?`${r} ${l}`:`${r}`,"aria-invalid":!!a,...s})});v.displayName="FormControl";const P=o.forwardRef(({className:s,...t},a)=>{const{formDescriptionId:n}=gt();return e.jsx("p",{ref:a,id:n,className:f("text-[0.8rem] text-muted-foreground",s),...t})});P.displayName="FormDescription";const S=o.forwardRef(({className:s,children:t,...a},n)=>{const{error:r,formMessageId:l}=gt(),c=r?String(r?.message):t;return c?e.jsx("p",{ref:n,id:l,className:f("text-[0.8rem] font-medium text-destructive",s),...a,children:c}):null});S.displayName="FormMessage";const C=o.forwardRef(({className:s,type:t,...a},n)=>e.jsx("input",{type:t,className:f("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",s),ref:n,...a}));C.displayName="Input";const Ln=o.forwardRef(({className:s,...t},a)=>{const[n,r]=o.useState(!1);return e.jsxs("div",{className:"relative rounded-md",children:[e.jsx("input",{type:n?"text":"password",className:f("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",s),ref:a,...t}),e.jsx(k,{type:"button",size:"icon",variant:"ghost",className:"absolute right-1 top-1/2 h-6 w-6 -translate-y-1/2 rounded-md text-muted-foreground",onClick:()=>r(l=>!l),children:n?e.jsx(hl,{size:18}):e.jsx(jl,{size:18})})]})});Ln.displayName="PasswordInput";const po=s=>I({url:"/passport/auth/login",method:"post",data:s}),Lt=s=>s;function X(s=void 0,t="YYYY-MM-DD HH:mm:ss"){return s==null?"":(Math.floor(s).toString().length===10&&(s=s*1e3),gl(s).format(t))}function vo(s=void 0,t="YYYY-MM-DD"){return X(s,t)}function _s(s){const t=typeof s=="string"?parseFloat(s):s;return isNaN(t)?"0.00":t.toFixed(2)}function Es(s){const t=typeof s=="string"?parseFloat(s):s;return isNaN(t)?"0.00":(t/100).toFixed(2)}function tt(s){navigator.clipboard?navigator.clipboard.writeText(s).then(()=>{z.success(Lt("复制成功"))}).catch(t=>{console.error("复制到剪贴板时出错:",t),pa(s)}):pa(s)}function pa(s){const t=document.createElement("button"),a=new fl(t,{text:()=>s});a.on("success",()=>{z.success(Lt("复制成功")),a.destroy()}),a.on("error",()=>{z.error(Lt("复制失败")),a.destroy()}),t.click()}function ks(s){const t=s/1024,a=t/1024,n=a/1024,r=n/1024;return r>=1?_s(r)+" TB":n>=1?_s(n)+" GB":a>=1?_s(a)+" MB":_s(t)+" KB"}const bo="access_token";function yo(s){jt.set(bo,s)}const No=i.object({email:i.string().min(1,{message:"请输入邮箱地址"}).email({message:"邮箱地址格式不正确"}),password:i.string().min(1,{message:"请输入密码"}).min(7,{message:"密码长度至少为7个字符"})});function wo({className:s,onForgotPassword:t,...a}){const n=We(),r=Ta(),l=Z({resolver:Q(No),defaultValues:{email:"",password:""}});async function c(x){try{const{data:u}=await po(x);u&&(yo(u.auth_data),r(xo(u.auth_data)),await r(Os()).unwrap(),n("/"))}catch(u){const b=u instanceof Error?u.message:"登录失败";z.error(b)}}return e.jsx("div",{className:f("grid gap-6",s),...a,children:e.jsx(ee,{...l,children:e.jsx("form",{onSubmit:l.handleSubmit(c),children:e.jsxs("div",{className:"grid gap-2",children:[e.jsx(j,{control:l.control,name:"email",render:({field:x})=>e.jsxs(h,{className:"space-y-1",children:[e.jsx(g,{children:"邮箱地址"}),e.jsx(v,{children:e.jsx(C,{placeholder:"name@example.com",...x})}),e.jsx(S,{})]})}),e.jsx(j,{control:l.control,name:"password",render:({field:x})=>e.jsxs(h,{className:"space-y-1",children:[e.jsx(g,{children:"密码"}),e.jsx(v,{children:e.jsx(Ln,{placeholder:"请输入密码",...x})}),e.jsx(S,{})]})}),e.jsx(k,{className:"mt-2",loading:l.formState.isSubmitting,children:"登录"}),e.jsx(k,{variant:"link",type:"button",className:"mt-1 text-sm text-muted-foreground hover:text-primary",onClick:t,children:"忘记密码?"})]})})})})}const de=Fa,Se=Pa,_o=Va,Gs=Ut,$n=o.forwardRef(({className:s,...t},a)=>e.jsx(ct,{ref:a,className:f("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",s),...t}));$n.displayName=ct.displayName;const re=o.forwardRef(({className:s,children:t,...a},n)=>e.jsxs(_o,{children:[e.jsx($n,{}),e.jsxs(dt,{ref:n,className:f("max-h-[95%] overflow-auto fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",s),...a,children:[t,e.jsxs(Ut,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[e.jsx(Re,{className:"h-4 w-4"}),e.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));re.displayName=dt.displayName;const he=({className:s,...t})=>e.jsx("div",{className:f("flex flex-col space-y-1.5 text-center sm:text-left",s),...t});he.displayName="DialogHeader";const ke=({className:s,...t})=>e.jsx("div",{className:f("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",s),...t});ke.displayName="DialogFooter";const xe=o.forwardRef(({className:s,...t},a)=>e.jsx(xt,{ref:a,className:f("text-lg font-semibold leading-none tracking-tight",s),...t}));xe.displayName=xt.displayName;const Ve=o.forwardRef(({className:s,...t},a)=>e.jsx(mt,{ref:a,className:f("text-sm text-muted-foreground",s),...t}));Ve.displayName=mt.displayName;const Ts=ps("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),A=o.forwardRef(({className:s,variant:t,size:a,asChild:n=!1,...r},l)=>{const c=n?Kt:"button";return e.jsx(c,{className:f(Ts({variant:t,size:a,className:s})),ref:l,...r})});A.displayName="Button";function Co(){const[s,t]=o.useState(!1),a=async r=>{try{await navigator.clipboard.writeText(r),z.success("命令已复制到剪贴板")}catch{z.error("复制失败,请手动复制")}},n="php artisan reset:password 管理员邮箱";return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"container grid h-svh flex-col items-center justify-center bg-primary-foreground lg:max-w-none lg:px-0",children:e.jsxs("div",{className:"mx-auto flex w-full flex-col justify-center space-y-2 sm:w-[480px] lg:p-8",children:[e.jsx("div",{className:"mb-4 flex items-center justify-center",children:e.jsx("h1",{className:"text-3xl font-medium",children:window?.settings?.title})}),e.jsxs(ze,{className:"p-6",children:[e.jsxs("div",{className:"flex flex-col space-y-2 text-left",children:[e.jsx("h1",{className:"text-2xl font-semibold tracking-tight",children:"登录"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"请输入您的邮箱和密码登录系统"})]}),e.jsx(wo,{onForgotPassword:()=>t(!0)})]})]})}),e.jsx(de,{open:s,onOpenChange:t,children:e.jsx(re,{children:e.jsxs(he,{children:[e.jsx(xe,{children:"忘记密码"}),e.jsx(Ve,{children:"在站点目录下执行以下命令找回密码"}),e.jsx("div",{className:"mt-2",children:e.jsxs("div",{className:"relative",children:[e.jsx("pre",{className:"rounded-md bg-secondary p-4 pr-12",children:n}),e.jsx(A,{variant:"ghost",size:"icon",className:"absolute right-2 top-2 h-8 w-8 hover:bg-secondary-foreground/10",onClick:()=>a(n),children:e.jsx(pl,{className:"h-4 w-4"})})]})})]})})})]})}const So=Object.freeze(Object.defineProperty({__proto__:null,default:Co},Symbol.toStringTag,{value:"Module"})),ge=o.forwardRef(({className:s,fadedBelow:t=!1,fixedHeight:a=!1,...n},r)=>e.jsx("div",{ref:r,className:f("relative flex h-full w-full flex-col",t&&"after:pointer-events-none after:absolute after:bottom-0 after:left-0 after:hidden after:h-32 after:w-full after:bg-[linear-gradient(180deg,_transparent_10%,_hsl(var(--background))_70%)] after:md:block",a&&"md:h-svh",s),...n}));ge.displayName="Layout";const fe=o.forwardRef(({className:s,...t},a)=>e.jsx("div",{ref:a,className:f("flex h-[var(--header-height)] flex-none items-center gap-4 bg-background p-4 md:px-8",s),...t}));fe.displayName="LayoutHeader";const be=o.forwardRef(({className:s,fixedHeight:t,...a},n)=>e.jsx("div",{ref:n,className:f("flex-1 overflow-hidden px-4 py-6 md:px-8",t&&"h-[calc(100%-var(--header-height))]",s),...a}));be.displayName="LayoutBody";const An=vl,Hn=bl,Kn=yl,gs=_l,fs=Cl,ko=Sl,Do=o.forwardRef(({className:s,inset:t,children:a,...n},r)=>e.jsxs(Ia,{ref:r,className:f("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",t&&"pl-8",s),...n,children:[a,e.jsx(qt,{className:"ml-auto h-4 w-4"})]}));Do.displayName=Ia.displayName;const To=o.forwardRef(({className:s,...t},a)=>e.jsx(za,{ref:a,className:f("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",s),...t}));To.displayName=za.displayName;const cs=o.forwardRef(({className:s,sideOffset:t=4,...a},n)=>e.jsx(Nl,{children:e.jsx(Ra,{ref:n,sideOffset:t,className:f("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",s),...a})}));cs.displayName=Ra.displayName;const ae=o.forwardRef(({className:s,inset:t,...a},n)=>e.jsx(Ea,{ref:n,className:f("relative flex cursor-default cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-8",s),...a}));ae.displayName=Ea.displayName;const Fo=o.forwardRef(({className:s,children:t,checked:a,...n},r)=>e.jsxs(Ma,{ref:r,className:f("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",s),checked:a,...n,children:[e.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:e.jsx(Oa,{children:e.jsx(ds,{className:"h-4 w-4"})})}),t]}));Fo.displayName=Ma.displayName;const Po=o.forwardRef(({className:s,children:t,...a},n)=>e.jsxs(La,{ref:n,className:f("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",s),...a,children:[e.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:e.jsx(Oa,{children:e.jsx(wl,{className:"h-4 w-4 fill-current"})})}),t]}));Po.displayName=La.displayName;const Bt=o.forwardRef(({className:s,inset:t,...a},n)=>e.jsx($a,{ref:n,className:f("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",s),...a}));Bt.displayName=$a.displayName;const As=o.forwardRef(({className:s,...t},a)=>e.jsx(Aa,{ref:a,className:f("-mx-1 my-1 h-px bg-muted",s),...t}));As.displayName=Aa.displayName;const $t=({className:s,...t})=>e.jsx("span",{className:f("ml-auto text-xs tracking-widest opacity-60",s),...t});$t.displayName="DropdownMenuShortcut";const ue=kl,oe=Dl,ce=Tl,ne=o.forwardRef(({className:s,sideOffset:t=4,...a},n)=>e.jsx(Ha,{ref:n,sideOffset:t,className:f("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",s),...a}));ne.displayName=Ha.displayName;function ft(){const{pathname:s}=ot();return{checkActiveNav:a=>{if(a==="/"&&s==="/")return!0;const n=a.replace(/^\//,""),r=s.replace(/^\//,"");return n?r.startsWith(n):!1}}}function Gn({key:s,defaultValue:t}){const[a,n]=o.useState(()=>{const r=localStorage.getItem(s);return r!==null?JSON.parse(r):t});return o.useEffect(()=>{localStorage.setItem(s,JSON.stringify(a))},[a,s]),[a,n]}function Vo(){const[s,t]=Gn({key:"expanded-sidebar-items",defaultValue:["仪表盘","系统管理","节点管理","订阅管理","用户管理"]});return{expandedItems:s,toggleItem:n=>{t(r=>r.includes(n)?r.filter(l=>l!==n):[...r,n])},isExpanded:n=>s.includes(n)}}function Io({links:s,isCollapsed:t,className:a,closeNav:n}){const r=({sub:l,...c})=>{const x=`${c.title}-${c.href}`;return t&&l?o.createElement(Eo,{...c,sub:l,key:x,closeNav:n}):t?o.createElement(Ro,{...c,key:x,closeNav:n}):l?o.createElement(zo,{...c,sub:l,key:x,closeNav:n}):o.createElement(Un,{...c,key:x,closeNav:n})};return e.jsx("div",{"data-collapsed":t,className:f("group border-b bg-background py-2 transition-[max-height,padding] duration-500 data-[collapsed=true]:py-2 md:border-none",a),children:e.jsx(ue,{delayDuration:0,children:e.jsx("nav",{className:"grid gap-1 group-[[data-collapsed=true]]:justify-center group-[[data-collapsed=true]]:px-2",children:s.map(r)})})})}function Un({title:s,icon:t,label:a,href:n,closeNav:r,subLink:l=!1}){const{checkActiveNav:c}=ft();return e.jsxs(vs,{to:n,onClick:r,className:f(De({variant:c(n)?"secondary":"ghost",size:"sm"}),"h-12 justify-start text-wrap rounded-none px-6",l&&"h-10 w-full border-l border-l-slate-500 px-2"),"aria-current":c(n)?"page":void 0,children:[e.jsx("div",{className:"mr-2",children:t}),s,a&&e.jsx("div",{className:"ml-2 rounded-lg bg-primary px-1 text-[0.625rem] text-primary-foreground",children:a})]})}function zo({title:s,icon:t,label:a,sub:n,closeNav:r}){const{checkActiveNav:l}=ft(),{isExpanded:c,toggleItem:x}=Vo(),u=!!n?.find(p=>l(p.href)),b=c(s)||u;return e.jsxs(An,{open:b,onOpenChange:()=>x(s),children:[e.jsxs(Hn,{className:f(De({variant:"ghost",size:"sm"}),"group h-12 w-full justify-start rounded-none px-6"),children:[e.jsx("div",{className:"mr-2",children:t}),s,a&&e.jsx("div",{className:"ml-2 rounded-lg bg-primary px-1 text-[0.625rem] text-primary-foreground",children:a}),e.jsx("span",{className:f('ml-auto transition-all group-data-[state="open"]:-rotate-180'),children:e.jsx(Ka,{stroke:1})})]}),e.jsx(Kn,{className:"collapsibleDropdown",asChild:!0,children:e.jsx("ul",{children:n.map(p=>e.jsx("li",{className:"my-1 ml-8",children:e.jsx(Un,{...p,subLink:!0,closeNav:r})},p.title))})})]})}function Ro({title:s,icon:t,label:a,href:n}){const{checkActiveNav:r}=ft();return e.jsxs(oe,{delayDuration:0,children:[e.jsx(ce,{asChild:!0,children:e.jsxs(vs,{to:n,className:f(De({variant:r(n)?"secondary":"ghost",size:"icon"}),"h-12 w-12"),children:[t,e.jsx("span",{className:"sr-only",children:s})]})}),e.jsxs(ne,{side:"right",className:"flex items-center gap-4",children:[s,a&&e.jsx("span",{className:"ml-auto text-muted-foreground",children:a})]})]})}function Eo({title:s,icon:t,label:a,sub:n}){const{checkActiveNav:r}=ft(),l=!!n?.find(c=>r(c.href));return e.jsxs(gs,{children:[e.jsxs(oe,{delayDuration:0,children:[e.jsx(ce,{asChild:!0,children:e.jsx(fs,{asChild:!0,children:e.jsx(k,{variant:l?"secondary":"ghost",size:"icon",className:"h-12 w-12",children:t})})}),e.jsxs(ne,{side:"right",className:"flex items-center gap-4",children:[s," ",a&&e.jsx("span",{className:"ml-auto text-muted-foreground",children:a}),e.jsx(Ka,{size:18,className:"-rotate-90 text-muted-foreground"})]})]}),e.jsxs(cs,{side:"right",align:"start",sideOffset:4,children:[e.jsxs(Bt,{children:[s," ",a?`(${a})`:""]}),e.jsx(As,{}),n.map(({title:c,icon:x,label:u,href:b})=>e.jsx(ae,{asChild:!0,children:e.jsxs(vs,{to:b,className:`${r(b)?"bg-secondary":""}`,children:[x," ",e.jsx("span",{className:"ml-2 max-w-52 text-wrap",children:c}),u&&e.jsx("span",{className:"ml-auto text-xs",children:u})]})},`${c}-${b}`))]})]})}const qn=[{title:"仪表盘",label:"",href:"/",icon:e.jsx(Fl,{size:18})},{title:"系统管理",label:"",href:"",icon:e.jsx(Pl,{size:18}),sub:[{title:"系统配置",label:"",href:"/config/system",icon:e.jsx(Ga,{size:18})},{title:"主题配置",label:"",href:"/config/theme",icon:e.jsx(Vl,{size:18})},{title:"公告管理",label:"",href:"/config/notice",icon:e.jsx(Il,{size:18})},{title:"支付配置",label:"",href:"/config/payment",icon:e.jsx(la,{size:18})},{title:"知识库管理",label:"",href:"/config/knowledge",icon:e.jsx(zl,{size:18})}]},{title:"节点管理",label:"",href:"",icon:e.jsx(Ua,{size:18}),sub:[{title:"节点管理",label:"",href:"/server/manage",icon:e.jsx(Rl,{size:18})},{title:"权限组管理",label:"",href:"/server/group",icon:e.jsx(qa,{size:18})},{title:"路由管理",label:"",href:"/server/route",icon:e.jsx(El,{size:18})}]},{title:"订阅管理",label:"",href:"",icon:e.jsx(Ml,{size:18}),sub:[{title:"套餐管理",label:"",href:"/finance/plan",icon:e.jsx(Ol,{size:18})},{title:"订单管理",label:"",href:"/finance/order",icon:e.jsx(la,{size:18})},{title:"优惠券管理",label:"",href:"/finance/coupon",icon:e.jsx(Ll,{size:18})}]},{title:"用户管理",label:"",href:"",icon:e.jsx($l,{size:18}),sub:[{title:"用户管理",label:"",href:"/user/manage",icon:e.jsx(Al,{size:18})},{title:"工单管理",label:"",href:"/user/ticket",icon:e.jsx(Ba,{size:18})}]}];function Mo({className:s,isCollapsed:t,setIsCollapsed:a}){const[n,r]=o.useState(!1);return o.useEffect(()=>{n?document.body.classList.add("overflow-hidden"):document.body.classList.remove("overflow-hidden")},[n]),e.jsxs("aside",{className:f(`fixed left-0 right-0 top-0 z-50 w-full border-r-2 border-r-muted transition-[width] md:bottom-0 md:right-auto md:h-svh ${t?"md:w-14":"md:w-64"}`,s),children:[e.jsx("div",{onClick:()=>r(!1),className:`absolute inset-0 transition-[opacity] delay-100 duration-700 ${n?"h-svh opacity-50":"h-0 opacity-0"} w-full bg-black md:hidden`}),e.jsxs(ge,{children:[e.jsxs(fe,{className:"sticky top-0 justify-between px-4 py-3 shadow md:px-4",children:[e.jsxs("div",{className:`flex items-center ${t?"":"gap-2"}`,children:[e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 256 256",className:`transition-all ${t?"h-6 w-6":"h-8 w-8"}`,children:[e.jsx("rect",{width:"256",height:"256",fill:"none"}),e.jsx("line",{x1:"208",y1:"128",x2:"128",y2:"208",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}),e.jsx("line",{x1:"192",y1:"40",x2:"40",y2:"192",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}),e.jsx("span",{className:"sr-only",children:"Website Name"})]}),e.jsx("div",{className:`flex flex-col justify-end truncate ${t?"invisible w-0":"visible w-auto"}`,children:e.jsx("span",{className:"font-medium",children:window?.settings?.title})})]}),e.jsx(k,{variant:"ghost",size:"icon",className:"md:hidden","aria-label":"Toggle Navigation","aria-controls":"sidebar-menu","aria-expanded":n,onClick:()=>r(l=>!l),children:n?e.jsx(Hl,{}):e.jsx(Kl,{})})]}),e.jsx(Io,{id:"sidebar-menu",className:`h-full flex-1 overflow-auto ${n?"max-h-screen":"max-h-0 py-0 md:max-h-screen md:py-2"}`,closeNav:()=>r(!1),isCollapsed:t,links:qn}),e.jsx(k,{onClick:()=>a(l=>!l),size:"icon",variant:"outline",className:"absolute -right-5 top-1/2 hidden rounded-full md:inline-flex",children:e.jsx(Gl,{stroke:1.5,className:`h-5 w-5 ${t?"rotate-180":""}`})})]})]})}function Oo(){const[s,t]=Gn({key:"collapsed-sidebar",defaultValue:!1});return o.useEffect(()=>{const a=()=>{t(window.innerWidth<768?!1:s)};return a(),window.addEventListener("resize",a),()=>{window.removeEventListener("resize",a)}},[s,t]),[s,t]}function Lo(){const[s,t]=Oo();return e.jsxs("div",{className:"relative h-full overflow-hidden bg-background",children:[e.jsx(Mo,{isCollapsed:s,setIsCollapsed:t}),e.jsx("main",{id:"content",className:`overflow-x-hidden pt-16 transition-[margin] md:overflow-y-hidden md:pt-0 ${s?"md:ml-14":"md:ml-64"} h-full`,children:e.jsx(Gt,{})})]})}const $o=Object.freeze(Object.defineProperty({__proto__:null,default:Lo},Symbol.toStringTag,{value:"Module"})),Qe=o.forwardRef(({className:s,...t},a)=>e.jsx(ve,{ref:a,className:f("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",s),...t}));Qe.displayName=ve.displayName;const Ao=({children:s,...t})=>e.jsx(de,{...t,children:e.jsx(re,{className:"overflow-hidden p-0",children:e.jsx(Qe,{className:"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:s})})}),xs=o.forwardRef(({className:s,...t},a)=>e.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[e.jsx(Ul,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),e.jsx(ve.Input,{ref:a,className:f("flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",s),...t})]}));xs.displayName=ve.Input.displayName;const es=o.forwardRef(({className:s,...t},a)=>e.jsx(ve.List,{ref:a,className:f("max-h-[300px] overflow-y-auto overflow-x-hidden",s),...t}));es.displayName=ve.List.displayName;const ms=o.forwardRef((s,t)=>e.jsx(ve.Empty,{ref:t,className:"py-6 text-center text-sm",...s}));ms.displayName=ve.Empty.displayName;const pe=o.forwardRef(({className:s,...t},a)=>e.jsx(ve.Group,{ref:a,className:f("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",s),...t}));pe.displayName=ve.Group.displayName;const ys=o.forwardRef(({className:s,...t},a)=>e.jsx(ve.Separator,{ref:a,className:f("-mx-1 h-px bg-border",s),...t}));ys.displayName=ve.Separator.displayName;const ie=o.forwardRef(({className:s,...t},a)=>e.jsx(ve.Item,{ref:a,className:f("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none aria-selected:bg-accent aria-selected:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",s),...t}));ie.displayName=ve.Item.displayName;function Ho(){const s=[];for(const t of qn)if(t.href&&s.push(t),t.sub)for(const a of t.sub)s.push({...a,parent:t.title});return s}function Ne(){const[s,t]=o.useState(!1),a=We(),n=Ho();o.useEffect(()=>{const l=c=>{c.key==="k"&&(c.metaKey||c.ctrlKey)&&(c.preventDefault(),t(x=>!x))};return document.addEventListener("keydown",l),()=>document.removeEventListener("keydown",l)},[]);const r=o.useCallback(l=>{t(!1),a(l)},[a]);return e.jsxs(e.Fragment,{children:[e.jsxs(A,{variant:"outline",className:"relative h-9 w-9 p-0 xl:h-10 xl:w-60 xl:justify-start xl:px-3 xl:py-2",onClick:()=>t(!0),children:[e.jsx(ql,{className:"h-4 w-4 xl:mr-2"}),e.jsx("span",{className:"hidden xl:inline-flex",children:"搜索..."}),e.jsx("span",{className:"sr-only",children:"搜索"}),e.jsxs("kbd",{className:"pointer-events-none absolute right-1.5 top-2 hidden h-6 select-none items-center gap-1 rounded border bg-muted px-1.5 font-mono text-[10px] font-medium opacity-100 xl:flex",children:[e.jsx("span",{className:"text-xs",children:"⌘"}),"K"]})]}),e.jsxs(Ao,{open:s,onOpenChange:t,children:[e.jsx(xs,{placeholder:"搜索所有菜单和功能..."}),e.jsxs(es,{children:[e.jsx(ms,{children:"未找到相关结果"}),e.jsx(pe,{heading:"菜单导航",children:n.map(l=>e.jsxs(ie,{value:`${l.parent?l.parent+" ":""}${l.title}`,onSelect:()=>r(l.href),children:[e.jsx("div",{className:"mr-2",children:l.icon}),e.jsx("span",{children:l.title}),l.parent&&e.jsx("span",{className:"ml-2 text-xs text-muted-foreground",children:l.parent})]},l.href))})]})]})]})}function we(){const{theme:s,setTheme:t}=qi();return o.useEffect(()=>{const a=s==="dark"?"#020817":"#fff",n=document.querySelector("meta[name='theme-color']");n&&n.setAttribute("content",a)},[s]),e.jsx(k,{size:"icon",variant:"ghost",className:"rounded-full",onClick:()=>t(s==="light"?"dark":"light"),children:s==="light"?e.jsx(Bl,{size:20}):e.jsx(Yl,{size:20})})}const Bn=o.forwardRef(({className:s,...t},a)=>e.jsx(Ya,{ref:a,className:f("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",s),...t}));Bn.displayName=Ya.displayName;const Yn=o.forwardRef(({className:s,...t},a)=>e.jsx(Wa,{ref:a,className:f("aspect-square h-full w-full",s),...t}));Yn.displayName=Wa.displayName;const Wn=o.forwardRef(({className:s,...t},a)=>e.jsx(Ja,{ref:a,className:f("flex h-full w-full items-center justify-center rounded-full bg-muted",s),...t}));Wn.displayName=Ja.displayName;function _e(){const s=We(),t=Ta(),a=Wl(uo),n=()=>{Pn(),t(mo()),s("/sign-in")},r=a?.email?.split("@")[0]||"User",l=r.substring(0,2).toUpperCase();return e.jsxs(gs,{children:[e.jsx(fs,{asChild:!0,children:e.jsx(k,{variant:"ghost",className:"relative h-8 w-8 rounded-full",children:e.jsxs(Bn,{className:"h-8 w-8",children:[e.jsx(Yn,{src:a?.avatar_url,alt:r}),e.jsx(Wn,{children:l})]})})}),e.jsxs(cs,{className:"w-56",align:"end",forceMount:!0,children:[e.jsx(Bt,{className:"font-normal",children:e.jsxs("div",{className:"flex flex-col space-y-1",children:[e.jsx("p",{className:"text-sm font-medium leading-none",children:r}),e.jsx("p",{className:"text-xs leading-none text-muted-foreground",children:a?.email||"user@example.com"})]})}),e.jsx(As,{}),e.jsx(ae,{asChild:!0,children:e.jsxs(vs,{to:"/config/system",children:["设置",e.jsx($t,{children:"⌘S"})]})}),e.jsx(As,{}),e.jsxs(ae,{onClick:n,children:["退出登录",e.jsx($t,{children:"⇧⌘Q"})]})]})]})}const R=window?.settings?.secure_path,Ko=()=>I.get(R+"/stat/getOrder"),Go=()=>I.get(R+"/stat/getStats"),va=s=>I.get(R+"/stat/getTrafficRank",{params:s}),Uo=()=>I.get(R+"/theme/getThemes"),qo=s=>I.post(R+"/theme/getThemeConfig",{name:s}),Bo=(s,t)=>I.post(R+"/theme/saveThemeConfig",{name:s,config:t}),Yo=s=>{const t=new FormData;return t.append("file",s),I.post(R+"/theme/upload",t,{headers:{"Content-Type":"multipart/form-data"}})},Wo=s=>I.post(R+"/theme/delete",{name:s}),Jo=s=>I.post(R+"/config/save",s),Jn=()=>I.get(R+"/server/manage/getNodes"),Zo=s=>I.post(R+"/server/manage/save",s),Xo=s=>I.post(R+"/server/manage/drop",s),Qo=s=>I.post(R+"/server/manage/copy",s),ec=s=>I.post(R+"/server/manage/update",s),sc=s=>I.post(R+"/server/manage/sort",s),pt=()=>I.get(R+"/server/group/fetch"),tc=s=>I.post(R+"/server/group/save",s),ac=s=>I.post(R+"/server/group/drop",s),Zn=()=>I.get(R+"/server/route/fetch"),nc=s=>I.post(R+"/server/route/save",s),rc=s=>I.post(R+"/server/route/drop",s),lc=()=>I.get(R+"/payment/fetch"),ic=()=>I.get(R+"/payment/getPaymentMethods"),oc=s=>I.post(R+"/payment/getPaymentForm",s),cc=s=>I.post(R+"/payment/save",s),dc=s=>I.post(R+"/payment/drop",s),xc=s=>I.post(R+"/payment/show",s),mc=s=>I.post(R+"/payment/sort",s),uc=()=>I.get(R+"/notice/fetch"),hc=s=>I.post(R+"/notice/save",s),jc=s=>I.post(R+"/notice/drop",s),gc=s=>I.post(R+"/notice/show",s),fc=()=>I.get(R+"/knowledge/fetch"),pc=s=>I.get(R+"/knowledge/fetch?id="+s),vc=s=>I.post(R+"/knowledge/save",s),bc=s=>I.post(R+"/knowledge/drop",s),yc=s=>I.post(R+"/knowledge/show",s),Nc=s=>I.post(R+"/knowledge/sort",s),Ps=()=>I.get(R+"/plan/fetch"),wc=s=>I.post(R+"/plan/save",s),Ct=s=>I.post(R+"/plan/update",s),_c=s=>I.post(R+"/plan/drop",s),Cc=s=>I.post(R+"/plan/sort",{ids:s}),Xn=async s=>I.post(R+"/order/fetch",s),Sc=s=>I.post(R+"/order/detail",s),kc=s=>I.post(R+"/order/paid",s),Dc=s=>I.post(R+"/order/cancel",s),ba=s=>I.post(R+"/order/update",s),Tc=s=>I.post(R+"/order/assign",s),Fc=s=>I.post(R+"/coupon/fetch",s),Pc=s=>I.post(R+"/coupon/generate",s),Vc=s=>I.post(R+"/coupon/drop",s),Ic=s=>I.post(R+"/coupon/update",s),zc=s=>I.post(R+"/user/fetch",s),Rc=s=>I.post(R+"/user/update",s),Ec=s=>I.post(R+"/user/resetSecret",s),Mc=s=>I.post(R+"/user/generate",s),Oc=s=>I.post(R+"/stat/getStatUser",s),Qn=s=>I.post(R+"/ticket/fetch",s),Lc=s=>I.get(R+"/ticket/fetch?id= "+s),$c=s=>I.post(R+"/ticket/reply",s),er=s=>I.post(R+"/ticket/close",{id:s}),ss=(s="")=>I.get(R+"/config/fetch?key="+s),ts=s=>I.post(R+"/config/save",s),Ac=()=>I.get(R+"/config/getEmailTemplate"),Hc=()=>I.post(R+"/config/testSendMail"),Kc=()=>I.post(R+"/config/setTelegramWebhook"),ns={income:{main:"hsl(var(--primary))",gradient:{start:"hsl(var(--primary))",end:"hsl(var(--primary))"}},commission:{main:"hsl(280, 65%, 50%)",gradient:{start:"hsl(280, 65%, 50%)",end:"hsl(280, 65%, 50%)"}},income_count:"hsl(217, 91%, 60%)",commission_count:"hsl(262, 83%, 58%)"};function Gc(s){const t=new Map;return s.forEach(a=>{t.has(a.date)||t.set(a.date,{date:a.date,income:0,income_count:0,commission:0,commission_count:0});const n=t.get(a.date);switch(a.type){case"收款金额":n.income=a.value;break;case"收款笔数":n.income_count=a.value;break;case"佣金金额(已发放)":n.commission=a.value;break;case"佣金笔数(已发放)":n.commission_count=a.value;break}}),Array.from(t.values()).sort((a,n)=>a.date.localeCompare(n.date))}function Uc(){const[s,t]=o.useState([]);return o.useEffect(()=>{async function a(){const{data:n}=await Ko();t(Gc(n))}a()},[]),e.jsxs(ze,{children:[e.jsx(Ke,{children:e.jsx(os,{children:"收入趋势"})}),e.jsx(Ge,{children:e.jsx("div",{className:"h-[400px] w-full pt-4",children:e.jsx(Ft,{width:"100%",height:"100%",children:e.jsxs(Jl,{data:s,margin:{top:20,right:30,left:0,bottom:0},children:[e.jsxs("defs",{children:[e.jsxs("linearGradient",{id:"incomeGradient",x1:"0",y1:"0",x2:"0",y2:"1",children:[e.jsx("stop",{offset:"5%",stopColor:ns.income.gradient.start,stopOpacity:.3}),e.jsx("stop",{offset:"95%",stopColor:ns.income.gradient.end,stopOpacity:.05})]}),e.jsxs("linearGradient",{id:"commissionGradient",x1:"0",y1:"0",x2:"0",y2:"1",children:[e.jsx("stop",{offset:"5%",stopColor:ns.commission.gradient.start,stopOpacity:.3}),e.jsx("stop",{offset:"95%",stopColor:ns.commission.gradient.end,stopOpacity:.05})]})]}),e.jsx(Pt,{dataKey:"date",axisLine:!1,tickLine:!1,tick:{fill:"hsl(var(--muted-foreground))",fontSize:12},dy:10}),e.jsx(at,{yAxisId:"left",axisLine:!1,tickLine:!1,tick:{fill:"hsl(var(--muted-foreground))",fontSize:12},tickFormatter:a=>`¥${(a/100).toFixed(2)}`}),e.jsx(at,{yAxisId:"right",orientation:"right",axisLine:!1,tickLine:!1,tick:{fill:"hsl(var(--muted-foreground))",fontSize:12},tickFormatter:a=>`${a}笔`}),e.jsx(Vt,{strokeDasharray:"3 3",vertical:!1,stroke:"hsl(var(--border))",opacity:.3}),e.jsx(It,{contentStyle:{backgroundColor:"hsl(var(--background))",border:"1px solid hsl(var(--border))",borderRadius:"6px",fontSize:"12px",padding:"8px 12px",boxShadow:"0 2px 4px rgba(0,0,0,0.1)"},formatter:(a,n)=>n.includes("金额")?[`¥${(a/100).toFixed(2)}`,n]:[`${a}笔`,n],labelStyle:{color:"hsl(var(--foreground))"},cursor:{stroke:"hsl(var(--muted))"}}),e.jsx(Zl,{verticalAlign:"top",height:36,iconType:"circle",iconSize:8,wrapperStyle:{paddingBottom:"12px"}}),e.jsx(ia,{yAxisId:"left",type:"monotone",dataKey:"income",name:"收款金额",stroke:ns.income.main,strokeWidth:2,fillOpacity:1,fill:"url(#incomeGradient)"}),e.jsx(ia,{yAxisId:"left",type:"monotone",dataKey:"commission",name:"佣金金额",stroke:ns.commission.main,strokeWidth:2,fillOpacity:1,fill:"url(#commissionGradient)"}),e.jsx(oa,{yAxisId:"right",type:"monotone",dataKey:"income_count",name:"收款笔数",stroke:ns.income_count,strokeWidth:3,dot:!1}),e.jsx(oa,{yAxisId:"right",type:"monotone",dataKey:"commission_count",name:"佣金笔数",stroke:ns.commission_count,strokeWidth:3,dot:!1})]})})})})]})}var te=(s=>(s[s.PENDING=0]="PENDING",s[s.PROCESSING=1]="PROCESSING",s[s.CANCELLED=2]="CANCELLED",s[s.COMPLETED=3]="COMPLETED",s[s.DISCOUNTED=4]="DISCOUNTED",s))(te||{});const ws={0:"待支付",1:"开通中",2:"已取消",3:"已完成",4:"已折抵"},Ms={0:"yellow-500",1:"blue-500",2:"red-500",3:"green-500",4:"green-500"},qc={1:"新购",2:"续费",3:"升级",5:"流量重置"};var le=(s=>(s[s.PENDING=0]="PENDING",s[s.PROCESSING=1]="PROCESSING",s[s.VALID=2]="VALID",s[s.INVALID=3]="INVALID",s))(le||{});const Ys={0:"待确认",1:"发放中",2:"有效",3:"无效"},Ws={0:"yellow-500",1:"blue-500",2:"green-500",3:"red-500"};var Cs=(s=>(s.MONTH_PRICE="month_price",s.QUARTER_PRICE="quarter_price",s.HALF_YEAR_PRICE="half_year_price",s.YEAR_PRICE="year_price",s.TWO_YEAR_PRICE="two_year_price",s.THREE_YEAR_PRICE="three_year_price",s.ONETIME_PRICE="onetime_price",s.RESET_PRICE="reset_price",s))(Cs||{});const it={month_price:"月付",quarter_price:"季付",half_year_price:"半年付",year_price:"年付",two_year_price:"两年付",three_year_price:"三年付",onetime_price:"一次性",reset_price:"流量重置包"};var me=(s=>(s.Shadowsocks="shadowsocks",s.Vmess="vmess",s.Trojan="trojan",s.Hysteria="hysteria",s.Vless="vless",s))(me||{});const js=[{type:"shadowsocks",label:"Shadowsocks"},{type:"vmess",label:"VMess"},{type:"trojan",label:"Trojan"},{type:"hysteria",label:"Hysteria"},{type:"vless",label:"VLess"}],ls={shadowsocks:"#489851",vmess:"#CB3180",trojan:"#EBB749",hysteria:"#5684e6",vless:"#1a1a1a"};var vt=(s=>(s[s.AMOUNT=1]="AMOUNT",s[s.PERCENTAGE=2]="PERCENTAGE",s))(vt||{});const Yt={1:"按金额优惠",2:"按比例优惠"},Bc={0:"正常",1:"锁定"};var Ss=(s=>(s[s.OPENING=0]="OPENING",s[s.CLOSED=1]="CLOSED",s))(Ss||{});const Yc={0:"开启",1:"已关闭"};var Be=(s=>(s[s.LOW=0]="LOW",s[s.MIDDLE=1]="MIDDLE",s[s.HIGH=2]="HIGH",s))(Be||{});const Ls={0:"低",1:"中",2:"高"};function Wc(){const s=We(),{data:t}=G({queryKey:["pendingTickets"],queryFn:()=>Qn({filter:[{id:"status",value:0}]}),staleTime:1e3*30,refetchInterval:1e3*30}),{data:a}=G({queryKey:["pendingCommissions"],queryFn:()=>Xn({filter:[{id:"commission_status",value:le.PENDING},{id:"status",value:te.COMPLETED}]}),staleTime:1e3*30,refetchInterval:1e3*30}),n=t?.data||[],r=a?.data||[],l=()=>{s("/finance/order",{state:{filters:[{id:"commission_status",value:le.PENDING},{id:"status",value:te.COMPLETED}]}})};return e.jsxs("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-4",children:[e.jsxs(ze,{className:`cursor-pointer transition-colors hover:bg-muted/50 ${n.length>0?"border-orange-500/50":""}`,onClick:()=>s("/user/ticket"),children:[e.jsxs(Ke,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[e.jsx(os,{className:"text-sm font-medium",children:"待处理工单"}),e.jsx(Xl,{className:`h-4 w-4 ${n.length>0?"text-orange-500":"text-muted-foreground"}`})]}),e.jsxs(Ge,{children:[e.jsx("div",{className:"text-2xl font-bold",children:n.length}),e.jsx("p",{className:"text-xs text-muted-foreground",children:n.length>0?"有待处理的工单需要关注":"暂无待处理工单"})]})]}),e.jsxs(ze,{className:`cursor-pointer transition-colors hover:bg-muted/50 ${r.length>0?"border-blue-500/50":""}`,onClick:l,children:[e.jsxs(Ke,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[e.jsx(os,{className:"text-sm font-medium",children:"待处理佣金"}),e.jsx(Ql,{className:`h-4 w-4 ${r.length>0?"text-blue-500":"text-muted-foreground"}`})]}),e.jsxs(Ge,{children:[e.jsx("div",{className:"text-2xl font-bold",children:r.length}),e.jsx("p",{className:"text-xs text-muted-foreground",children:r.length>0?"有待处理的佣金需要确认":"暂无待处理佣金"})]})]})]})}function Te({className:s,...t}){return e.jsx("div",{className:f("animate-pulse rounded-md bg-primary/10",s),...t})}function Jc(){return e.jsxs(ze,{children:[e.jsxs(Ke,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[e.jsx(Te,{className:"h-4 w-[100px]"}),e.jsx(Te,{className:"h-4 w-4"})]}),e.jsxs(Ge,{children:[e.jsx(Te,{className:"h-8 w-[120px]"}),e.jsx("div",{className:"flex items-center pt-1",children:e.jsx(Te,{className:"h-4 w-[100px]"})})]})]})}function Zc(){return e.jsx("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-4",children:Array.from({length:4}).map((s,t)=>e.jsx(Jc,{},t))})}function Js({title:s,value:t,icon:a,trend:n,className:r}){return e.jsxs(ze,{className:f("transition-colors hover:border-primary/50",r),children:[e.jsxs(Ke,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[e.jsx(os,{className:"text-sm font-medium",children:s}),a]}),e.jsxs(Ge,{children:[e.jsx("div",{className:"text-2xl font-bold",children:t}),e.jsxs("div",{className:"flex items-center pt-1",children:[e.jsx(ai,{className:f("h-4 w-4",n.isPositive?"text-emerald-500":"text-red-500")}),e.jsxs("span",{className:f("ml-1 text-xs",n.isPositive?"text-emerald-500":"text-red-500"),children:[n.isPositive?"+":"-",Math.abs(n.value),"%"]}),e.jsx("span",{className:"ml-1 text-xs text-muted-foreground",children:n.label})]})]})]})}function Xc({className:s}){const{data:t,isLoading:a}=G({queryKey:["dashboardStats"],queryFn:async()=>(await Go()).data,refetchInterval:3e5});return a||!t?e.jsx(Zc,{}):e.jsxs("div",{className:f("grid gap-4 md:grid-cols-2 lg:grid-cols-4",s),children:[e.jsx(Js,{title:"本月收入",value:`¥${t.currentMonthIncome/100}`,icon:e.jsx(ei,{className:"h-4 w-4 text-emerald-500"}),trend:{value:t.monthIncomeGrowth,label:"vs 上月",isPositive:t.monthIncomeGrowth>0}}),e.jsx(Js,{title:"上月收入",value:`¥${t.lastMonthIncome/100}`,icon:e.jsx(si,{className:"h-4 w-4 text-muted-foreground"}),trend:{value:t.lastMonthIncomeGrowth,label:"vs 上上月",isPositive:t.lastMonthIncomeGrowth>0}}),e.jsx(Js,{title:"上月佣金支出",value:`¥${t.lastMonthCommissionPayout/100}`,icon:e.jsx(ti,{className:"h-4 w-4 text-destructive"}),trend:{value:t.commissionGrowth,label:"vs 上上月",isPositive:t.commissionGrowth>0}}),e.jsx(Js,{title:"本月新增用户",value:t.currentMonthNewUsers,icon:e.jsx(Za,{className:"h-4 w-4 text-blue-500"}),trend:{value:t.userGrowth,label:"vs 上月",isPositive:t.userGrowth>0}})]})}const B=ni,rs=mi,Y=ri,U=o.forwardRef(({className:s,children:t,...a},n)=>e.jsxs(Xa,{ref:n,className:f("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",s),...a,children:[t,e.jsx(li,{asChild:!0,children:e.jsx(Ye,{className:"h-4 w-4 opacity-50"})})]}));U.displayName=Xa.displayName;const sr=o.forwardRef(({className:s,...t},a)=>e.jsx(Qa,{ref:a,className:f("flex cursor-default items-center justify-center py-1",s),...t,children:e.jsx(ii,{className:"h-4 w-4"})}));sr.displayName=Qa.displayName;const tr=o.forwardRef(({className:s,...t},a)=>e.jsx(en,{ref:a,className:f("flex cursor-default items-center justify-center py-1",s),...t,children:e.jsx(Ye,{className:"h-4 w-4"})}));tr.displayName=en.displayName;const q=o.forwardRef(({className:s,children:t,position:a="popper",...n},r)=>e.jsx(oi,{children:e.jsxs(sn,{ref:r,className:f("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",a==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",s),position:a,...n,children:[e.jsx(sr,{}),e.jsx(ci,{className:f("p-1",a==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),e.jsx(tr,{})]})}));q.displayName=sn.displayName;const Qc=o.forwardRef(({className:s,...t},a)=>e.jsx(tn,{ref:a,className:f("px-2 py-1.5 text-sm font-semibold",s),...t}));Qc.displayName=tn.displayName;const O=o.forwardRef(({className:s,children:t,...a},n)=>e.jsxs(an,{ref:n,className:f("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",s),...a,children:[e.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:e.jsx(di,{children:e.jsx(ds,{className:"h-4 w-4"})})}),e.jsx(xi,{children:t})]}));O.displayName=an.displayName;const ed=o.forwardRef(({className:s,...t},a)=>e.jsx(nn,{ref:a,className:f("-mx-1 my-1 h-px bg-muted",s),...t}));ed.displayName=nn.displayName;function Us({className:s,classNames:t,showOutsideDays:a=!0,...n}){return e.jsx(ui,{showOutsideDays:a,className:f("p-3",s),classNames:{months:"flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",month:"space-y-4",caption:"flex justify-center pt-1 relative items-center",caption_label:"text-sm font-medium",nav:"space-x-1 flex items-center",nav_button:f(Ts({variant:"outline"}),"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"),nav_button_previous:"absolute left-1",nav_button_next:"absolute right-1",table:"w-full border-collapse space-y-1",head_row:"flex",head_cell:"text-muted-foreground rounded-md w-8 font-normal text-[0.8rem]",row:"flex w-full mt-2",cell:f("relative p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-accent [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected].day-range-end)]:rounded-r-md",n.mode==="range"?"[&:has(>.day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md":"[&:has([aria-selected])]:rounded-md"),day:f(Ts({variant:"ghost"}),"h-8 w-8 p-0 font-normal aria-selected:opacity-100"),day_range_start:"day-range-start",day_range_end:"day-range-end",day_selected:"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",day_today:"bg-accent text-accent-foreground",day_outside:"day-outside text-muted-foreground aria-selected:bg-accent/50 aria-selected:text-muted-foreground",day_disabled:"text-muted-foreground opacity-50",day_range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",day_hidden:"invisible",...t},components:{IconLeft:({className:r,...l})=>e.jsx(rn,{className:f("h-4 w-4",r),...l}),IconRight:({className:r,...l})=>e.jsx(qt,{className:f("h-4 w-4",r),...l})},...n})}Us.displayName="Calendar";const Ue=ji,qe=gi,Le=o.forwardRef(({className:s,align:t="center",sideOffset:a=4,...n},r)=>e.jsx(hi,{children:e.jsx(ln,{ref:r,align:t,sideOffset:a,className:f("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",s),...n})}));Le.displayName=ln.displayName;const At={today:{label:"今天",getValue:()=>({start:pi(),end:new Date})},last7days:{label:"最近7天",getValue:()=>({start:nt(new Date,7),end:new Date})},last30days:{label:"最近30天",getValue:()=>({start:nt(new Date,30),end:new Date})},custom:{label:"自定义范围",getValue:()=>null}};function ya({selectedRange:s,customDateRange:t,onRangeChange:a,onCustomRangeChange:n}){return e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsxs(B,{value:s,onValueChange:a,children:[e.jsx(U,{className:"w-[140px]",children:e.jsx(Y,{placeholder:"选择时间范围"})}),e.jsx(q,{position:"popper",className:"z-50",children:Object.entries(At).map(([r,{label:l}])=>e.jsx(O,{value:r,children:l},r))})]}),s==="custom"&&e.jsxs(Ue,{children:[e.jsx(qe,{asChild:!0,children:e.jsxs(A,{variant:"outline",className:f("justify-start text-left font-normal",!t&&"text-muted-foreground"),children:[e.jsx(ut,{className:"mr-2 h-4 w-4"}),t?.from?t.to?e.jsxs(e.Fragment,{children:[wt(t.from,"yyyy-MM-dd")," -"," ",wt(t.to,"yyyy-MM-dd")]}):wt(t.from,"yyyy-MM-dd"):e.jsx("span",{children:"选择日期范围"})]})}),e.jsx(Le,{className:"w-auto p-0",align:"end",children:e.jsx(Us,{initialFocus:!0,mode:"range",defaultMonth:t?.from,selected:{from:t?.from,to:t?.to},onSelect:r=>{r?.from&&r?.to&&n({from:r.from,to:r.to})},numberOfMonths:2})})]})]})}function sd({className:s}){const[t,a]=o.useState("today"),[n,r]=o.useState({from:nt(new Date,7),to:new Date}),[l,c]=o.useState("today"),[x,u]=o.useState({from:nt(new Date,7),to:new Date}),b=o.useMemo(()=>t==="custom"?{start:n.from,end:n.to}:At[t].getValue(),[t,n]),p=o.useMemo(()=>l==="custom"?{start:x.from,end:x.to}:At[l].getValue(),[l,x]),{data:y}=G({queryKey:["nodeTrafficRank",b.start,b.end],queryFn:()=>va({type:"node",start_time:Bs.round(b.start.getTime()/1e3),end_time:Bs.round(b.end.getTime()/1e3)}),refetchInterval:2e3}),{data:_}=G({queryKey:["userTrafficRank",p.start,p.end],queryFn:()=>va({type:"user",start_time:Bs.round(p.start.getTime()/1e3),end_time:Bs.round(p.end.getTime()/1e3)}),refetchInterval:2e3});return e.jsx("div",{className:f("min-h-[400px]",s),children:e.jsxs("div",{className:"grid grid-cols-1 gap-6 md:grid-cols-2",children:[e.jsxs(ze,{className:"min-h-[400px] flex-1",children:[e.jsx(Ke,{className:"flex-none",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(os,{children:e.jsxs("div",{className:"flex items-center",children:[e.jsx(fi,{className:"mr-2 h-4 w-4"}),"节点流量排行"]})}),e.jsx(ca,{className:"h-4 w-4 text-muted-foreground"})]}),e.jsx("div",{className:"flex items-center gap-2",children:e.jsx(ya,{selectedRange:t,customDateRange:n,onRangeChange:a,onCustomRangeChange:r})})]})}),e.jsx(Ge,{className:"flex-1",children:y?.data?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"grid min-h-[200px] grid-cols-1 gap-4 md:grid-cols-2",children:y.data.slice(0,4).map(D=>e.jsxs("div",{className:"flex flex-col justify-between rounded-lg bg-muted/50 p-4",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-sm font-medium truncate max-w-[70%]",children:D.name}),e.jsxs("span",{className:f("text-xs font-medium",D.change>=0?"text-green-600":"text-red-600"),children:[D.change>=0?e.jsx(zt,{className:"mr-1 inline h-3 w-3"}):e.jsx(Rt,{className:"mr-1 inline h-3 w-3"}),Math.abs(D.change),"%"]})]}),e.jsxs("div",{className:"text-2xl font-bold",children:[D.value,"GB"]})]}),e.jsxs("div",{className:"mt-2 text-xs text-muted-foreground",children:["上期:",D.previousValue,"GB"]})]},D.name))}),e.jsx("div",{className:"mt-6 h-[300px] w-full",children:e.jsx(Ft,{width:"100%",height:"100%",children:e.jsxs(da,{data:y.data,margin:{top:10,right:10,left:0,bottom:0},barSize:24,children:[e.jsx(Pt,{dataKey:"name",axisLine:!1,tickLine:!1,tick:{fill:"hsl(var(--muted-foreground))",fontSize:12},interval:0,angle:-45,textAnchor:"end",height:60,dy:20}),e.jsx(at,{axisLine:!1,tickLine:!1,tick:{fill:"hsl(var(--muted-foreground))",fontSize:12},tickFormatter:D=>`${D}GB`}),e.jsx(Vt,{strokeDasharray:"3 3",vertical:!1,stroke:"hsl(var(--border))",opacity:.3}),e.jsx(It,{cursor:{fill:"hsl(var(--muted))",opacity:.1},contentStyle:{backgroundColor:"hsl(var(--background))",border:"1px solid hsl(var(--border))",borderRadius:"6px",fontSize:"12px",padding:"8px 12px",boxShadow:"0 2px 4px rgba(0,0,0,0.1)"},formatter:(D,F,T)=>{const m=T.payload;return[`${D}GB`,e.jsxs(e.Fragment,{children:[e.jsx("div",{children:"流量"}),e.jsxs("div",{className:"text-xs text-muted-foreground",children:["较上期:",e.jsxs("span",{className:f(m.change>=0?"text-green-600":"text-red-600"),children:[m.change>=0?"+":"",m.change,"%"]})]})]})]},labelStyle:{color:"hsl(var(--foreground))"}}),e.jsx(xa,{dataKey:"value",fill:"hsl(var(--primary))",radius:[4,4,0,0]})]})})})]}):e.jsx("div",{className:"flex h-full items-center justify-center",children:e.jsx("div",{className:"animate-pulse",children:"Loading..."})})})]}),e.jsxs(ze,{className:"min-h-[400px] flex-1",children:[e.jsx(Ke,{className:"flex-none",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(os,{children:e.jsxs("div",{className:"flex items-center",children:[e.jsx(Za,{className:"mr-2 h-4 w-4"}),"用户流量排行"]})}),e.jsx(ca,{className:"h-4 w-4 text-muted-foreground"})]}),e.jsx("div",{className:"flex items-center gap-2",children:e.jsx(ya,{selectedRange:l,customDateRange:x,onRangeChange:c,onCustomRangeChange:u})})]})}),e.jsx(Ge,{className:"flex-1",children:_?.data?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"grid min-h-[200px] grid-cols-1 gap-4 md:grid-cols-2",children:_.data.slice(0,4).map(D=>e.jsxs("div",{className:"flex flex-col justify-between rounded-lg bg-muted/50 p-4",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-sm font-medium truncate max-w-[70%]",children:D.name}),e.jsxs("span",{className:f("text-xs font-medium",D.change>=0?"text-green-600":"text-red-600"),children:[D.change>=0?e.jsx(zt,{className:"mr-1 inline h-3 w-3"}):e.jsx(Rt,{className:"mr-1 inline h-3 w-3"}),Math.abs(D.change),"%"]})]}),e.jsxs("div",{className:"text-2xl font-bold",children:[D.value,"GB"]})]}),e.jsxs("div",{className:"mt-2 text-xs text-muted-foreground",children:["上期:",D.previousValue,"GB"]})]},D.name))}),e.jsx("div",{className:"mt-6 h-[300px] w-full",children:e.jsx(Ft,{width:"100%",height:"100%",children:e.jsxs(da,{data:_.data,margin:{top:10,right:10,left:0,bottom:0},barSize:24,children:[e.jsx(Pt,{dataKey:"name",axisLine:!1,tickLine:!1,tick:{fill:"hsl(var(--muted-foreground))",fontSize:12},interval:0,angle:-45,textAnchor:"end",height:60,dy:20}),e.jsx(at,{axisLine:!1,tickLine:!1,tick:{fill:"hsl(var(--muted-foreground))",fontSize:12},tickFormatter:D=>`${D}GB`}),e.jsx(Vt,{strokeDasharray:"3 3",vertical:!1,stroke:"hsl(var(--border))",opacity:.3}),e.jsx(It,{cursor:{fill:"hsl(var(--muted))",opacity:.1},contentStyle:{backgroundColor:"hsl(var(--background))",border:"1px solid hsl(var(--border))",borderRadius:"6px",fontSize:"12px",padding:"8px 12px",boxShadow:"0 2px 4px rgba(0,0,0,0.1)"},formatter:(D,F,T)=>{const m=T.payload;return[`${D}GB`,e.jsxs(e.Fragment,{children:[e.jsx("div",{children:"流量"}),e.jsxs("div",{className:"text-xs text-muted-foreground",children:["较上期:",e.jsxs("span",{className:f(m.change>=0?"text-green-600":"text-red-600"),children:[m.change>=0?"+":"",m.change,"%"]})]})]})]},labelStyle:{color:"hsl(var(--foreground))"}}),e.jsx(xa,{dataKey:"value",fill:"hsl(var(--primary))",radius:[4,4,0,0]})]})})})]}):e.jsx("div",{className:"flex h-full items-center justify-center",children:e.jsx("div",{className:"animate-pulse",children:"Loading..."})})})]})]})})}function td(){return e.jsxs(ge,{children:[e.jsxs(fe,{children:[e.jsx("div",{className:"flex items-center",children:e.jsx("h1",{className:"text-2xl font-bold tracking-tight md:text-3xl",children:"仪表盘"})}),e.jsxs("div",{className:"ml-auto flex items-center space-x-4",children:[e.jsx(Ne,{}),e.jsx(we,{}),e.jsx(_e,{})]})]}),e.jsx(be,{children:e.jsxs("div",{className:"space-y-6",children:[e.jsx("div",{className:"border-b pb-6",children:e.jsx(Wc,{})}),e.jsxs("div",{className:"grid gap-6",children:[e.jsx(Xc,{}),e.jsx(Uc,{}),e.jsx(sd,{})]})]})})]})}const ad=Object.freeze(Object.defineProperty({__proto__:null,default:td},Symbol.toStringTag,{value:"Module"})),se=o.forwardRef(({className:s,orientation:t="horizontal",decorative:a=!0,...n},r)=>e.jsx(on,{ref:r,decorative:a,orientation:t,className:f("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",s),...n}));se.displayName=on.displayName;function nd({className:s,items:t,...a}){const{pathname:n}=ot(),r=We(),[l,c]=o.useState(n??"/settings"),x=u=>{c(u),r(u)};return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"p-1 md:hidden",children:e.jsxs(B,{value:l,onValueChange:x,children:[e.jsx(U,{className:"h-12 sm:w-48",children:e.jsx(Y,{placeholder:"Theme"})}),e.jsx(q,{children:t.map(u=>e.jsx(O,{value:u.href,children:e.jsxs("div",{className:"flex gap-x-4 px-2 py-1",children:[e.jsx("span",{className:"scale-125",children:u.icon}),e.jsx("span",{className:"text-md",children:u.title})]})},u.href))})]})}),e.jsx("div",{className:"hidden w-full overflow-x-auto bg-background px-1 py-2 md:block",children:e.jsx("nav",{className:f("flex space-x-2 lg:flex-col lg:space-x-0 lg:space-y-1",s),...a,children:t.map(u=>e.jsxs(vs,{to:u.href,className:f(De({variant:"ghost"}),n===u.href?"bg-muted hover:bg-muted":"hover:bg-transparent hover:underline","justify-start"),children:[e.jsx("span",{className:"mr-2",children:u.icon}),u.title]},u.href))})})]})}const ar=[{title:"站点设置",key:"site",icon:e.jsx(vi,{size:18}),href:"/config/system",description:"配置站点基本信息,包括站点名称、描述、货币单位等核心设置。"},{title:"安全设置",key:"safe",icon:e.jsx(qa,{size:18}),href:"/config/system/safe",description:"配置系统安全相关选项,包括登录验证、密码策略、API访问等安全设置。"},{title:"订阅设置",key:"subscribe",icon:e.jsx(Ba,{size:18}),href:"/config/system/subscribe",description:"管理用户订阅相关配置,包括订阅链接格式、更新频率、流量统计等设置。"},{title:"邀请&佣金",key:"invite",icon:e.jsx(bi,{size:18}),href:"/config/system/invite",description:"管理用户邀请和佣金系统,配置邀请奖励、分销规则等。"},{title:"节点配置",key:"server",icon:e.jsx(Ua,{size:18}),href:"/config/system/server",description:"配置节点通信和同步设置,包括通信密钥、轮询间隔、负载均衡等高级选项。"},{title:"邮件设置",key:"email",icon:e.jsx(yi,{size:18}),href:"/config/system/email",description:"配置系统邮件服务,用于发送验证码、密码重置、通知等邮件,支持多种SMTP服务商。"},{title:"Telegram设置",key:"telegram",icon:e.jsx(Ni,{size:18}),href:"/config/system/telegram",description:"配置Telegram机器人功能,实现用户通知、账户绑定、指令交互等自动化服务。"},{title:"APP设置",key:"app",icon:e.jsx(Ga,{size:18}),href:"/config/system/app",description:"管理移动应用程序相关配置,包括API接口、版本控制、推送通知等功能设置。"}];function rd(){return e.jsxs(ge,{fadedBelow:!0,fixedHeight:!0,children:[e.jsxs(fe,{children:[e.jsx(Ne,{}),e.jsxs("div",{className:"ml-auto flex items-center space-x-4",children:[e.jsx(we,{}),e.jsx(_e,{})]})]}),e.jsxs(be,{className:"flex flex-col",fixedHeight:!0,children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx("h1",{className:"text-2xl font-bold tracking-tight md:text-3xl",children:"系统设置"}),e.jsx("div",{className:"text-muted-foreground",children:"管理系统核心配置,包括站点、安全、订阅、邀请佣金、节点、邮件和通知等设置"})]}),e.jsx(se,{className:"my-6"}),e.jsxs("div",{className:"flex flex-1 flex-col space-y-8 overflow-auto lg:flex-row lg:space-x-12 lg:space-y-0",children:[e.jsx("aside",{className:"sticky top-0 lg:w-1/5",children:e.jsx(nd,{items:ar})}),e.jsx("div",{className:"w-full p-1 pr-4 lg:max-w-xl",children:e.jsx("div",{className:"pb-16",children:e.jsx(Gt,{})})})]})]})]})}const ld=Object.freeze(Object.defineProperty({__proto__:null,default:rd},Symbol.toStringTag,{value:"Module"}));function id({title:s,description:t,children:a}){return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-medium",children:s}),e.jsx("p",{className:"text-sm text-muted-foreground",children:t})]}),e.jsx(se,{}),a]})}const L=o.forwardRef(({className:s,...t},a)=>e.jsx(cn,{className:f("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",s),...t,ref:a,children:e.jsx(wi,{className:f("pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0")})}));L.displayName=cn.displayName;const od=i.object({logo:i.string().nullable().nullable(),force_https:i.number().nullable(),stop_register:i.number().nullable(),app_name:i.string().nullable(),app_description:i.string().nullable(),app_url:i.string().nullable(),subscribe_url:i.string().nullable(),try_out_plan_id:i.number().nullable(),try_out_hour:i.number().nullable(),tos_url:i.string().nullable(),currency:i.string().nullable(),currency_symbol:i.string().nullable()}),cd={logo:"",force_https:0,stop_register:0,app_name:"",app_description:"",app_url:"",subscribe_url:"",try_out_plan_id:0,try_out_hour:0,tos_url:"",currency:"USD",currency_symbol:"$"};function dd(){const{data:s}=G({queryKey:["settings","site"],queryFn:()=>ss("site")}),{data:t}=G({queryKey:["plans"],queryFn:()=>Ps()}),a=Z({resolver:Q(od),defaultValues:cd,mode:"onChange"});o.useEffect(()=>{if(s?.data?.site){const r=s?.data?.site;Object.entries(r).forEach(([l,c])=>{a.setValue(l,c)})}},[s]);function n(r){ts(r).then(({data:l})=>{l&&z.success("更新成功")})}return e.jsx(ee,{...a,children:e.jsxs("form",{onSubmit:a.handleSubmit(n),className:"space-y-8",children:[e.jsx(j,{control:a.control,name:"app_name",render:({field:r})=>e.jsxs(h,{children:[e.jsx(g,{children:"站点名称"}),e.jsx(v,{children:e.jsx(C,{placeholder:"请输入站点名称",...r})}),e.jsx(P,{children:"用于显示需要站点名称的地方。"}),e.jsx(S,{})]})}),e.jsx(j,{control:a.control,name:"app_description",render:({field:r})=>e.jsxs(h,{children:[e.jsx(g,{children:"站点描述"}),e.jsx(v,{children:e.jsx(C,{placeholder:"请输入站点描述",...r})}),e.jsx(P,{children:"用于显示需要站点名称的地方。"}),e.jsx(S,{})]})}),e.jsx(j,{control:a.control,name:"app_url",render:({field:r})=>e.jsxs(h,{children:[e.jsx(g,{children:"站点网址"}),e.jsx(v,{children:e.jsx(C,{placeholder:"请输入站点URL,末尾不要/",...r})}),e.jsx(P,{children:"当前网站最新网址,将会在邮件等需要用于网址处体现。"}),e.jsx(S,{})]})}),e.jsx(j,{control:a.control,name:"force_https",render:({field:r})=>e.jsxs(h,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(g,{className:"text-base",children:"强制HTTPS"}),e.jsx(P,{children:"当站点没有使用HTTPS,CDN或反代开启强制HTTPS时需要开启。"})]}),e.jsx(v,{children:e.jsx(L,{checked:r.value,onCheckedChange:r.onChange})})]})}),e.jsx(j,{control:a.control,name:"logo",render:({field:r})=>e.jsxs(h,{children:[e.jsx(g,{children:"LOGO"}),e.jsx(v,{children:e.jsx(C,{placeholder:"请输入LOGO URL,末尾不要/",...r})}),e.jsx(P,{children:"用于显示需要LOGO的地方。"}),e.jsx(S,{})]})}),e.jsx(j,{control:a.control,name:"subscribe_url",render:({field:r})=>e.jsxs(h,{children:[e.jsx(g,{children:"订阅URL"}),e.jsx(v,{children:e.jsx(C,{placeholder:'用于订阅所使用,多个订阅地址用","隔开.留空则为站点URL。',...r})}),e.jsx(P,{children:"用于订阅所使用,留空则为站点URL。"}),e.jsx(S,{})]})}),e.jsx(j,{control:a.control,name:"tos_url",render:({field:r})=>e.jsxs(h,{children:[e.jsx(g,{children:"用户条款(TOS)URL"}),e.jsx(v,{children:e.jsx(C,{placeholder:"请输入用户条款URL,末尾不要/",...r})}),e.jsx(P,{children:"用于跳转到用户条款(TOS)"}),e.jsx(S,{})]})}),e.jsx(j,{control:a.control,name:"stop_register",render:({field:r})=>e.jsxs(h,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(g,{className:"text-base",children:"停止新用户注册"}),e.jsx(P,{children:"开启后任何人都将无法进行注册。"})]}),e.jsx(v,{children:e.jsx(L,{checked:r.value,onCheckedChange:r.onChange})})]})}),e.jsx(j,{control:a.control,name:"try_out_plan_id",render:({field:r})=>e.jsxs(h,{children:[e.jsx(g,{children:"注册试用"}),e.jsxs("div",{className:"relative w-max",children:[e.jsx(v,{children:e.jsxs("select",{className:f(De({variant:"outline"}),"w-[200px] appearance-none font-normal"),...r,value:r.value||0,onChange:l=>r.onChange(Number(l.target.value)),children:[e.jsx("option",{value:0,children:"关闭"}),t?.data?.map(l=>e.jsx("option",{value:l.id,children:l.name},l.id))]})}),e.jsx(Ye,{className:"absolute right-3 top-2.5 h-4 w-4 opacity-50"})]}),e.jsx(P,{children:"选择需要试用的订阅,如果没有选项请先前往订阅管理添加。"}),e.jsx(S,{})]})}),e.jsx(j,{control:a.control,name:"currency",render:({field:r})=>e.jsxs(h,{children:[e.jsx(g,{children:"货币单位"}),e.jsx(v,{children:e.jsx(C,{placeholder:"CNY",...r})}),e.jsx(P,{children:"仅用于展示使用,更改后系统中所有的货币单位都将发生变更。"}),e.jsx(S,{})]})}),e.jsx(j,{control:a.control,name:"currency_symbol",render:({field:r})=>e.jsxs(h,{children:[e.jsx(g,{children:"货币符号"}),e.jsx(v,{children:e.jsx(C,{placeholder:"¥",...r})}),e.jsx(P,{children:"仅用于展示使用,更改后系统中所有的货币单位都将发生变更。"}),e.jsx(S,{})]})}),e.jsx(k,{type:"submit",children:"更新配置"})]})})}function xd(){const s=ar.find(t=>t.key==="site");return e.jsx(id,{title:s.title,description:s.description,children:e.jsx(dd,{})})}const md=Object.freeze(Object.defineProperty({__proto__:null,default:xd},Symbol.toStringTag,{value:"Module"})),us=o.forwardRef(({className:s,...t},a)=>e.jsx("textarea",{className:f("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",s),ref:a,...t}));us.displayName="Textarea";const ud=i.object({email_verify:i.boolean().nullable(),safe_mode_enable:i.boolean().nullable(),secure_path:i.string().nullable(),email_whitelist_enable:i.boolean().nullable(),email_whitelist_suffix:i.array(i.string().nullable()).nullable(),email_gmail_limit_enable:i.boolean().nullable(),recaptcha_enable:i.boolean().nullable(),recaptcha_key:i.string().nullable(),recaptcha_site_key:i.string().nullable(),register_limit_by_ip_enable:i.boolean().nullable(),register_limit_count:i.coerce.string().transform(s=>s===""?null:s).nullable(),register_limit_expire:i.coerce.string().transform(s=>s===""?null:s).nullable(),password_limit_enable:i.boolean().nullable(),password_limit_count:i.coerce.string().transform(s=>s===""?null:s).nullable(),password_limit_expire:i.coerce.string().transform(s=>s===""?null:s).nullable()}),hd={email_verify:!1,safe_mode_enable:!1,secure_path:"",email_whitelist_enable:!1,email_whitelist_suffix:[],email_gmail_limit_enable:!1,recaptcha_enable:!1,recaptcha_key:"",recaptcha_site_key:"",register_limit_by_ip_enable:!1,register_limit_count:"",register_limit_expire:"",password_limit_enable:!1,password_limit_count:"",password_limit_expire:""};function jd(){const s=Z({resolver:Q(ud),defaultValues:hd,mode:"onChange"}),{data:t}=G({queryKey:["settings","safe"],queryFn:()=>ss("safe")});o.useEffect(()=>{if(t?.data.safe){const n=t.data.safe;Object.entries(n).forEach(([r,l])=>{typeof l=="number"?s.setValue(r,String(l)):s.setValue(r,l)})}},[t,s]);function a(n){ts(n).then(({data:r})=>{r&&z.success("保存成功")})}return e.jsx(ee,{...s,children:e.jsxs("form",{onSubmit:s.handleSubmit(a),className:"space-y-8",children:[e.jsx(j,{control:s.control,name:"email_verify",render:({field:n})=>e.jsxs(h,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(g,{className:"text-base",children:"邮箱验证"}),e.jsx(P,{children:"开启后将会强制要求用户进行邮箱验证。"})]}),e.jsx(v,{children:e.jsx(L,{checked:n.value,onCheckedChange:n.onChange})})]})}),e.jsx(j,{control:s.control,name:"email_gmail_limit_enable",render:({field:n})=>e.jsxs(h,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(g,{className:"text-base",children:"禁止使用Gmail多别名"}),e.jsx(P,{children:"开启后Gmail多别名将无法注册。"})]}),e.jsx(v,{children:e.jsx(L,{checked:n.value,onCheckedChange:n.onChange})})]})}),e.jsx(j,{control:s.control,name:"safe_mode_enable",render:({field:n})=>e.jsxs(h,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(g,{className:"text-base",children:"安全模式"}),e.jsx(P,{children:"开启后除了站点URL以外的绑定本站点的域名访问都将会被403。"})]}),e.jsx(v,{children:e.jsx(L,{checked:n.value,onCheckedChange:n.onChange})})]})}),e.jsx(j,{control:s.control,name:"secure_path",render:({field:n})=>e.jsxs(h,{children:[e.jsx(g,{children:"后台路径"}),e.jsx(v,{children:e.jsx(C,{placeholder:"admin",...n})}),e.jsx(P,{children:"后台管理路径,修改后将会改变原有的admin路径"}),e.jsx(S,{})]})}),e.jsx(j,{control:s.control,name:"email_whitelist_enable",render:({field:n})=>e.jsxs(h,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(g,{className:"text-base",children:"邮箱后缀白名单"}),e.jsx(P,{children:"开启后在名单中的邮箱后缀才允许进行注册。"})]}),e.jsx(v,{children:e.jsx(L,{checked:n.value,onCheckedChange:n.onChange})})]})}),s.watch("email_whitelist_enable")&&e.jsx(j,{control:s.control,name:"email_whitelist_suffix",render:({field:n})=>e.jsxs(h,{children:[e.jsx(g,{children:"白名单后缀"}),e.jsx(v,{children:e.jsx(us,{placeholder:"请输入后缀域名,逗号分割 如:qq.com,gmail.com",value:n.value?.length&&n.value.join(","),onChange:r=>{r.target.value&&n.onChange(r.target.value.split(","))}})}),e.jsx(P,{children:"请使用逗号进行分割,如:qq.com,gmail.com。"}),e.jsx(S,{})]})}),e.jsx(j,{control:s.control,name:"recaptcha_enable",render:({field:n})=>e.jsxs(h,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(g,{className:"text-base",children:"防机器人"}),e.jsx(P,{children:"开启后将会使用Google reCAPTCHA防止机器人。"})]}),e.jsx(v,{children:e.jsx(L,{checked:n.value,onCheckedChange:n.onChange})})]})}),s.watch("recaptcha_enable")&&e.jsx(j,{control:s.control,name:"recaptcha_key",render:({field:n})=>e.jsxs(h,{children:[e.jsx(g,{children:"密钥"}),e.jsx(v,{children:e.jsx(C,{placeholder:"请输入",...n})}),e.jsx(P,{children:"在Google reCAPTCHA申请的密钥。"}),e.jsx(S,{})]})}),s.watch("recaptcha_enable")&&e.jsx(j,{control:s.control,name:"recaptcha_site_key",render:({field:n})=>e.jsxs(h,{children:[e.jsx(g,{children:"网站密钥"}),e.jsx(v,{children:e.jsx(C,{placeholder:"请输入",...n})}),e.jsx(P,{children:"在Google reCAPTCH申请的网站密钥。"}),e.jsx(S,{})]})}),e.jsx(j,{control:s.control,name:"register_limit_by_ip_enable",render:({field:n})=>e.jsxs(h,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(g,{className:"text-base",children:"IP注册限制"}),e.jsx(P,{children:"开启后如果IP注册账户达到规则要求将会被限制注册,请注意IP判断可能因为CDN或前置代理导致问题。"})]}),e.jsx(v,{children:e.jsx(L,{checked:n.value,onCheckedChange:n.onChange})})]})}),s.watch("register_limit_by_ip_enable")&&e.jsx(j,{control:s.control,name:"register_limit_count",render:({field:n})=>e.jsxs(h,{children:[e.jsx(g,{children:"次数"}),e.jsx(v,{children:e.jsx(C,{placeholder:"请输入",...n})}),e.jsx(P,{children:"达到注册次数后开启惩罚。"}),e.jsx(S,{})]})}),s.watch("register_limit_by_ip_enable")&&e.jsx(j,{control:s.control,name:"register_limit_expire",render:({field:n})=>e.jsxs(h,{children:[e.jsx(g,{children:"惩罚时间(分钟)"}),e.jsx(v,{children:e.jsx(C,{placeholder:"请输入",...n})}),e.jsx(P,{children:"需要等待惩罚时间过后才可以再次注册。"}),e.jsx(S,{})]})}),e.jsx(j,{control:s.control,name:"password_limit_enable",render:({field:n})=>e.jsxs(h,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(g,{className:"text-base",children:"IP注册限制"}),e.jsx(P,{children:"开启后如果IP注册账户达到规则要求将会被限制注册,请注意IP判断可能因为CDN或前置代理导致问题。"})]}),e.jsx(v,{children:e.jsx(L,{checked:n.value,onCheckedChange:n.onChange})})]})}),s.watch("password_limit_enable")&&e.jsx(j,{control:s.control,name:"password_limit_count",render:({field:n})=>e.jsxs(h,{children:[e.jsx(g,{children:"次数"}),e.jsx(v,{children:e.jsx(C,{placeholder:"请输入",...n})}),e.jsx(P,{children:"达到注册次数后开启惩罚。"}),e.jsx(S,{})]})}),s.watch("password_limit_enable")&&e.jsx(j,{control:s.control,name:"password_limit_expire",render:({field:n})=>e.jsxs(h,{children:[e.jsx(g,{children:"惩罚时间(分钟)"}),e.jsx(v,{children:e.jsx(C,{placeholder:"请输入",...n})}),e.jsx(P,{children:"需要等待惩罚时间过后才可以再次登陆。"}),e.jsx(S,{})]})}),e.jsx(k,{type:"submit",children:"保存配置"})]})})}function gd(){return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-medium",children:"安全设置"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"配置系统安全相关选项,包括登录验证、密码策略、API访问等安全设置。"})]}),e.jsx(se,{}),e.jsx(jd,{})]})}const fd=Object.freeze(Object.defineProperty({__proto__:null,default:gd},Symbol.toStringTag,{value:"Module"})),pd=i.object({plan_change_enable:i.boolean().nullable(),reset_traffic_method:i.coerce.number().nullable(),surplus_enable:i.boolean().nullable(),new_order_event_id:i.coerce.number().nullable(),renew_order_event_id:i.coerce.number().nullable(),change_order_event_id:i.coerce.number().nullable(),show_info_to_server_enable:i.boolean().nullable(),show_protocol_to_server_enable:i.boolean().nullable(),default_remind_expire:i.boolean().nullable(),default_remind_traffic:i.boolean().nullable()}),vd={plan_change_enable:!1,reset_traffic_method:0,surplus_enable:!1,new_order_event_id:0,renew_order_event_id:0,change_order_event_id:0,show_info_to_server_enable:!1,show_protocol_to_server_enable:!1,default_remind_expire:!1,default_remind_traffic:!1};function bd(){const{data:s}=G({queryKey:["settings","subscribe"],queryFn:()=>ss("subscribe")}),t=Z({resolver:Q(pd),defaultValues:vd,mode:"onChange"});o.useEffect(()=>{if(s?.data?.subscribe){const n=s?.data?.subscribe;Object.entries(n).forEach(([r,l])=>{t.setValue(r,l)})}},[s]);function a(n){ts(n).then(({data:r})=>{r&&z.success("更新成功")})}return e.jsx(ee,{...t,children:e.jsxs("form",{onSubmit:t.handleSubmit(a),className:"space-y-8",children:[e.jsx(j,{control:t.control,name:"plan_change_enable",render:({field:n})=>e.jsxs(h,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(g,{className:"text-base",children:"允许用户更改订阅"}),e.jsx(P,{children:"开启后用户将会可以对订阅计划进行变更。"})]}),e.jsx(v,{children:e.jsx(L,{checked:n.value,onCheckedChange:n.onChange})})]})}),e.jsx(j,{control:t.control,name:"reset_traffic_method",render:({field:n})=>e.jsxs(h,{children:[e.jsx(g,{children:"月流量重置方式"}),e.jsxs("div",{className:"relative w-max",children:[e.jsx(v,{children:e.jsxs("select",{className:f(De({variant:"outline"}),"w-[200px] appearance-none font-normal"),...n,children:[e.jsx("option",{value:"0",children:"每月1号"}),e.jsx("option",{value:"1",children:"按月重置"}),e.jsx("option",{value:"2",children:"不重置"}),e.jsx("option",{value:"3",children:"每年1月1号"}),e.jsx("option",{value:"4",children:"按年重置"})]})}),e.jsx(Ye,{className:"absolute right-3 top-2.5 h-4 w-4 opacity-50"})]}),e.jsx(P,{children:"全局流量重置方式,默认每月1号。可以在订阅管理为订阅单独设置。"}),e.jsx(S,{})]})}),e.jsx(j,{control:t.control,name:"surplus_enable",render:({field:n})=>e.jsxs(h,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(g,{className:"text-base",children:"开启折抵方案"}),e.jsx(P,{children:"开启后用户更换订阅将会由系统对原有订阅进行折抵,方案参考文档。"})]}),e.jsx(v,{children:e.jsx(L,{checked:n.value,onCheckedChange:n.onChange})})]})}),e.jsx(j,{control:t.control,name:"new_order_event_id",render:({field:n})=>e.jsxs(h,{children:[e.jsx(g,{children:"当订阅新购时触发事件"}),e.jsxs("div",{className:"relative w-max",children:[e.jsx(v,{children:e.jsxs("select",{className:f(De({variant:"outline"}),"w-[200px] appearance-none font-normal"),...n,children:[e.jsx("option",{value:"0",children:"不执行任何动作"}),e.jsx("option",{value:"1",children:"重置用户流量"})]})}),e.jsx(Ye,{className:"absolute right-3 top-2.5 h-4 w-4 opacity-50"})]}),e.jsx(P,{children:"新购订阅完成时将触发该任务。"}),e.jsx(S,{})]})}),e.jsx(j,{control:t.control,name:"renew_order_event_id",render:({field:n})=>e.jsxs(h,{children:[e.jsx(g,{children:"当订阅续费时触发事件"}),e.jsxs("div",{className:"relative w-max",children:[e.jsx(v,{children:e.jsxs("select",{className:f(De({variant:"outline"}),"w-[200px] appearance-none font-normal"),...n,children:[e.jsx("option",{value:"0",children:"不执行任何动作"}),e.jsx("option",{value:"1",children:"重置用户流量"})]})}),e.jsx(Ye,{className:"absolute right-3 top-2.5 h-4 w-4 opacity-50"})]}),e.jsx(P,{children:"续费订阅完成时将触发该任务。"}),e.jsx(S,{})]})}),e.jsx(j,{control:t.control,name:"change_order_event_id",render:({field:n})=>e.jsxs(h,{children:[e.jsx(g,{children:"当订阅变更时触发事件"}),e.jsxs("div",{className:"relative w-max",children:[e.jsx(v,{children:e.jsxs("select",{className:f(De({variant:"outline"}),"w-[200px] appearance-none font-normal"),...n,children:[e.jsx("option",{value:"0",children:"不执行任何动作"}),e.jsx("option",{value:"1",children:"重置用户流量"})]})}),e.jsx(Ye,{className:"absolute right-3 top-2.5 h-4 w-4 opacity-50"})]}),e.jsx(P,{children:"变更订阅完成时将触发该任务。"}),e.jsx(S,{})]})}),e.jsx(j,{control:t.control,name:"show_info_to_server_enable",render:({field:n})=>e.jsxs(h,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(g,{className:"text-base",children:"在订阅中展示订阅信息"}),e.jsx(P,{children:"开启后将会在用户订阅节点时输出订阅信息。"})]}),e.jsx(v,{children:e.jsx(L,{checked:n.value,onCheckedChange:n.onChange})})]})}),e.jsx(j,{control:t.control,name:"show_protocol_to_server_enable",render:({field:n})=>e.jsxs(h,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(g,{className:"text-base",children:"在订阅中线路名称中显示协议名称"}),e.jsx(P,{children:"开启后订阅线路会附带协议名称(例如: [Hy2]香港)"})]}),e.jsx(v,{children:e.jsx(L,{checked:n.value,onCheckedChange:n.onChange})})]})}),e.jsx(j,{control:t.control,name:"default_remind_expire",render:({field:n})=>e.jsxs(h,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(g,{className:"text-base",children:"用户订阅到期提醒的默认设置"}),e.jsx(P,{children:"开启后新注册用户将默认接收订阅到期提醒。"})]}),e.jsx(v,{children:e.jsx(L,{checked:n.value,onCheckedChange:n.onChange})})]})}),e.jsx(j,{control:t.control,name:"default_remind_traffic",render:({field:n})=>e.jsxs(h,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(g,{className:"text-base",children:"用户流量告急提醒的默认设置"}),e.jsx(P,{children:"开启后新注册用户将默认接收流量告急提醒。"})]}),e.jsx(v,{children:e.jsx(L,{checked:n.value,onCheckedChange:n.onChange})})]})}),e.jsx(k,{type:"submit",children:"保存设置"})]})})}function yd(){return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-medium",children:"订阅设置"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"管理用户订阅相关配置,包括订阅链接格式、更新频率、流量统计等设置。"})]}),e.jsx(se,{}),e.jsx(bd,{})]})}const Nd=Object.freeze(Object.defineProperty({__proto__:null,default:yd},Symbol.toStringTag,{value:"Module"})),wd=i.object({invite_force:i.boolean().default(!1),invite_commission:i.coerce.string().default("0"),invite_gen_limit:i.coerce.string().default("0"),invite_never_expire:i.boolean().default(!1),commission_first_time_enable:i.boolean().default(!1),commission_auto_check_enable:i.boolean().default(!1),commission_withdraw_limit:i.coerce.string().default("0"),commission_withdraw_method:i.array(i.string()).default(["支付宝","USDT","Paypal"]),withdraw_close_enable:i.boolean().default(!1),commission_distribution_enable:i.boolean().default(!1),commission_distribution_l1:i.coerce.number().default(0),commission_distribution_l2:i.coerce.number().default(0),commission_distribution_l3:i.coerce.number().default(0)}),_d={invite_force:!1,invite_commission:"0",invite_gen_limit:"0",invite_never_expire:!1,commission_first_time_enable:!1,commission_auto_check_enable:!1,commission_withdraw_limit:"0",commission_withdraw_method:["支付宝","USDT","Paypal"],withdraw_close_enable:!1,commission_distribution_enable:!1,commission_distribution_l1:0,commission_distribution_l2:0,commission_distribution_l3:0};function Cd(){const{data:s}=G({queryKey:["settings","invite"],queryFn:()=>ss("invite")}),t=Z({resolver:Q(wd),defaultValues:_d,mode:"onChange"});o.useEffect(()=>{if(s?.data?.invite){const n=s?.data?.invite;Object.entries(n).forEach(([r,l])=>{typeof l=="number"?t.setValue(r,String(l)):t.setValue(r,l)})}},[s,t]);function a(n){ts(n).then(r=>{r.data&&z.success("更新成功")})}return e.jsx(ee,{...t,children:e.jsxs("form",{onSubmit:t.handleSubmit(a),className:"space-y-8",children:[e.jsx(j,{control:t.control,name:"invite_force",render:({field:n})=>e.jsxs(h,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(g,{className:"text-base",children:"开启强制邀请"}),e.jsx(P,{children:"开启后只有被邀请的用户才可以进行注册。"})]}),e.jsx(v,{children:e.jsx(L,{checked:n.value,onCheckedChange:n.onChange})})]})}),e.jsx(j,{control:t.control,name:"invite_commission",render:({field:n})=>e.jsxs(h,{children:[e.jsx(g,{children:"邀请佣金百分比"}),e.jsx(v,{children:e.jsx(C,{placeholder:"请输入",...n})}),e.jsx(P,{children:"默认全局的佣金分配比例,你可以在用户管理单独配置单个比例。"}),e.jsx(S,{})]})}),e.jsx(j,{control:t.control,name:"invite_gen_limit",render:({field:n})=>e.jsxs(h,{children:[e.jsx(g,{children:"用户可创建邀请码上限"}),e.jsx(v,{children:e.jsx(C,{placeholder:"请输入",...n})}),e.jsx(P,{children:"用户可创建邀请码上限"}),e.jsx(S,{})]})}),e.jsx(j,{control:t.control,name:"invite_never_expire",render:({field:n})=>e.jsxs(h,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(g,{className:"text-base",children:"邀请码永不失效"}),e.jsx(P,{children:"开启后邀请码被使用后将不会失效,否则使用过后即失效。"})]}),e.jsx(v,{children:e.jsx(L,{checked:n.value,onCheckedChange:n.onChange})})]})}),e.jsx(j,{control:t.control,name:"commission_first_time_enable",render:({field:n})=>e.jsxs(h,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(g,{className:"text-base",children:"佣金仅首次发放"}),e.jsx(P,{children:"开启后被邀请人首次支付时才会产生佣金,可以在用户管理对用户进行单独配置。"})]}),e.jsx(v,{children:e.jsx(L,{checked:n.value,onCheckedChange:n.onChange})})]})}),e.jsx(j,{control:t.control,name:"commission_auto_check_enable",render:({field:n})=>e.jsxs(h,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(g,{className:"text-base",children:"佣金自动确认"}),e.jsx(P,{children:"开启后佣金将会在订单完成3日后自动进行确认。"})]}),e.jsx(v,{children:e.jsx(L,{checked:n.value,onCheckedChange:n.onChange})})]})}),e.jsx(j,{control:t.control,name:"commission_withdraw_limit",render:({field:n})=>e.jsxs(h,{children:[e.jsx(g,{children:"提现单申请门槛(元)"}),e.jsx(v,{children:e.jsx(C,{placeholder:"请输入",...n})}),e.jsx(P,{children:"小于门槛金额的提现单将不会被提交。"}),e.jsx(S,{})]})}),e.jsx(j,{control:t.control,name:"commission_withdraw_method",render:({field:n})=>e.jsxs(h,{children:[e.jsx(g,{children:"提现方式"}),e.jsx(v,{children:e.jsx(C,{placeholder:"请输入",...n})}),e.jsx(P,{children:"可以支持的提现方式。"}),e.jsx(S,{})]})}),e.jsx(j,{control:t.control,name:"withdraw_close_enable",render:({field:n})=>e.jsxs(h,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(g,{className:"text-base",children:"关闭提现"}),e.jsx(P,{children:"关闭后将禁止用户申请提现,且邀请佣金将会直接进入用户余额。"})]}),e.jsx(v,{children:e.jsx(L,{checked:n.value,onCheckedChange:n.onChange})})]})}),e.jsx(j,{control:t.control,name:"commission_distribution_enable",render:({field:n})=>e.jsxs(h,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(g,{className:"text-base",children:"三级分销"}),e.jsxs(P,{children:["开启后将佣金将按照设置的3成比例进行分成,三成比例合计请不要",">","100%。"]})]}),e.jsx(v,{children:e.jsx(L,{checked:n.value,onCheckedChange:n.onChange})})]})}),t.watch("commission_distribution_enable")&&e.jsxs(e.Fragment,{children:[e.jsx(j,{control:t.control,name:"commission_distribution_l1",render:({field:n})=>e.jsxs(h,{children:[e.jsx(g,{children:"一级邀请人比例"}),e.jsx(v,{children:e.jsx(C,{placeholder:"请输入比例如:50",...n})}),e.jsx(S,{})]})}),e.jsx(j,{control:t.control,name:"commission_distribution_l2",render:({field:n})=>e.jsxs(h,{children:[e.jsx(g,{children:"二级邀请人比例"}),e.jsx(v,{children:e.jsx(C,{placeholder:"请输入比例如:50",...n})}),e.jsx(S,{})]})}),e.jsx(j,{control:t.control,name:"commission_distribution_l3",render:({field:n})=>e.jsxs(h,{children:[e.jsx(g,{children:"三级邀请人比例"}),e.jsx(v,{children:e.jsx(C,{placeholder:"请输入比例如:50",...n})}),e.jsx(S,{})]})})]}),e.jsx(k,{type:"submit",children:"保存设置"})]})})}function Sd(){return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-medium",children:"邀请&佣金设置"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"邀请注册、佣金相关设置。"})]}),e.jsx(se,{}),e.jsx(Cd,{})]})}const kd=Object.freeze(Object.defineProperty({__proto__:null,default:Sd},Symbol.toStringTag,{value:"Module"})),Dd=i.object({frontend_theme:i.string().nullable(),frontend_theme_sidebar:i.string().nullable(),frontend_theme_header:i.string().nullable(),frontend_theme_color:i.string().nullable(),frontend_background_url:i.string().url().nullable()}),Td={frontend_theme:"",frontend_theme_sidebar:"",frontend_theme_header:"",frontend_theme_color:"",frontend_background_url:""};function Fd(){const{data:s}=G({queryKey:["settings","frontend"],queryFn:()=>ss("frontend")}),t=Z({resolver:Q(Dd),defaultValues:Td,mode:"onChange"});o.useEffect(()=>{if(s?.data?.frontend){const n=s?.data?.frontend;Object.entries(n).forEach(([r,l])=>{t.setValue(r,l)})}},[s]);function a(n){ts(n).then(({data:r})=>{r&&z.success("更新成功")})}return e.jsx(ee,{...t,children:e.jsxs("form",{onSubmit:t.handleSubmit(a),className:"space-y-8",children:[e.jsx(j,{control:t.control,name:"frontend_theme_sidebar",render:({field:n})=>e.jsxs(h,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(g,{className:"text-base",children:"边栏风格"}),e.jsx(P,{children:"边栏风格"})]}),e.jsx(v,{children:e.jsx(L,{checked:n.value,onCheckedChange:n.onChange})})]})}),e.jsx(j,{control:t.control,name:"frontend_theme_header",render:({field:n})=>e.jsxs(h,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(g,{className:"text-base",children:"头部风格"}),e.jsx(P,{children:"边栏风格"})]}),e.jsx(v,{children:e.jsx(L,{checked:n.value,onCheckedChange:n.onChange})})]})}),e.jsx(j,{control:t.control,name:"frontend_theme_color",render:({field:n})=>e.jsxs(h,{children:[e.jsx(g,{children:"主题色"}),e.jsxs("div",{className:"relative w-max",children:[e.jsx(v,{children:e.jsxs("select",{className:f(De({variant:"outline"}),"w-[200px] appearance-none font-normal"),...n,children:[e.jsx("option",{value:"default",children:"默认"}),e.jsx("option",{value:"black",children:"黑色"}),e.jsx("option",{value:"blackblue",children:"暗蓝色"}),e.jsx("option",{value:"green",children:"奶绿色"})]})}),e.jsx(Ye,{className:"absolute right-3 top-2.5 h-4 w-4 opacity-50"})]}),e.jsx(P,{children:"主题色"}),e.jsx(S,{})]})}),e.jsx(j,{control:t.control,name:"frontend_background_url",render:({field:n})=>e.jsxs(h,{children:[e.jsx(g,{children:"背景"}),e.jsx(v,{children:e.jsx(C,{placeholder:"请输入图片地址",...n})}),e.jsx(P,{children:"将会在后台登录页面进行展示。"}),e.jsx(S,{})]})}),e.jsx(k,{type:"submit",children:"保存设置"})]})})}function Pd(){return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-medium",children:"个性化设置"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"自定义系统界面外观,包括主题风格、布局、颜色方案、背景图等个性化选项。"})]}),e.jsx(se,{}),e.jsx(Fd,{})]})}const Vd=Object.freeze(Object.defineProperty({__proto__:null,default:Pd},Symbol.toStringTag,{value:"Module"})),Id=i.object({server_pull_interval:i.coerce.number().nullable(),server_push_interval:i.coerce.number().nullable(),server_token:i.string().nullable()}),zd={server_pull_interval:0,server_push_interval:0,server_token:""};function Rd(){const s=Z({resolver:Q(Id),defaultValues:zd,mode:"onChange"}),{data:t}=G({queryKey:["settings","server"],queryFn:()=>ss("server")});o.useEffect(()=>{if(t?.data.server){const n=t.data.server;Object.entries(n).forEach(([r,l])=>{s.setValue(r,l)})}},[t]);function a(n){ts(n).then(({data:r})=>{r&&z.success("保存成功")})}return e.jsx(ee,{...s,children:e.jsxs("form",{onSubmit:s.handleSubmit(a),className:"space-y-8",children:[e.jsx(j,{control:s.control,name:"server_token",render:({field:n})=>e.jsxs(h,{children:[e.jsx(g,{children:"通讯密钥"}),e.jsx(v,{children:e.jsx(C,{placeholder:"请输入",...n})}),e.jsx(P,{children:"Xboard与节点通讯的密钥,以便数据不会被他人获取。"}),e.jsx(S,{})]})}),e.jsx(j,{control:s.control,name:"server_pull_interval",render:({field:n})=>e.jsxs(h,{children:[e.jsx(g,{children:"节点拉取动作轮询间隔"}),e.jsx(v,{children:e.jsx(C,{placeholder:"请输入",...n})}),e.jsx(P,{children:"节点从面板获取数据的间隔频率。"}),e.jsx(S,{})]})}),e.jsx(j,{control:s.control,name:"server_push_interval",render:({field:n})=>e.jsxs(h,{children:[e.jsx(g,{children:"节点推送动作轮询间隔"}),e.jsx(v,{children:e.jsx(C,{placeholder:"请输入",...n})}),e.jsx(P,{children:"节点推送数据到面板的间隔频率。"}),e.jsx(S,{})]})}),e.jsx(k,{type:"submit",children:"保存设置"})]})})}function Ed(){return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-medium",children:"节点配置"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"配置节点通信和同步设置,包括通信密钥、轮询间隔、负载均衡等高级选项。"})]}),e.jsx(se,{}),e.jsx(Rd,{})]})}const Md=Object.freeze(Object.defineProperty({__proto__:null,default:Ed},Symbol.toStringTag,{value:"Module"})),Od=i.object({email_template:i.string().nullable(),email_host:i.string().nullable(),email_port:i.string().regex(/^\d+$/).nullable(),email_username:i.string().nullable(),email_password:i.string().nullable(),email_encryption:i.string().nullable(),email_from_address:i.string().email().nullable()}),Ld={email_template:"classic",email_host:"",email_port:"465",email_username:"",email_password:"",email_encryption:"",email_from_address:""};function $d(){const s=Z({resolver:Q(Od),defaultValues:Ld,mode:"onChange"}),{data:t}=G({queryKey:["settings","email"],queryFn:()=>ss("email")}),{data:a}=G({queryKey:["emailTemplate"],queryFn:()=>Ac()});o.useEffect(()=>{if(t?.data.email){const l=t.data.email;Object.entries(l).forEach(([c,x])=>{s.setValue(c,x)})}},[t]);const{isLoading:n,refetch:r}=G({queryKey:["sendTestMail"],queryFn:()=>Hc().then(()=>z.success("发送成功")),enabled:!1});return e.jsxs(ee,{...s,children:[e.jsx(j,{control:s.control,name:"email_host",render:({field:l})=>e.jsxs(h,{children:[e.jsx(g,{children:"SMTP服务器地址"}),e.jsx(v,{children:e.jsx(C,{placeholder:"请输入",...l})}),e.jsx(P,{children:"由邮件服务商提供的服务地址"}),e.jsx(S,{})]})}),e.jsx(j,{control:s.control,name:"email_port",render:({field:l})=>e.jsxs(h,{children:[e.jsx(g,{children:"SMTP服务端口"}),e.jsx(v,{children:e.jsx(C,{placeholder:"请输入",...l})}),e.jsx(P,{children:"常见的端口有25, 465, 587"}),e.jsx(S,{})]})}),e.jsx(j,{control:s.control,name:"email_encryption",render:({field:l})=>e.jsxs(h,{children:[e.jsx(g,{children:"SMTP加密方式"}),e.jsx(v,{children:e.jsx(C,{placeholder:"请输入",...l})}),e.jsx(P,{children:"465端口加密方式一般为SSL,587端口加密方式一般为TLS"}),e.jsx(S,{})]})}),e.jsx(j,{control:s.control,name:"email_username",render:({field:l})=>e.jsxs(h,{children:[e.jsx(g,{children:"SMTP账号"}),e.jsx(v,{children:e.jsx(C,{placeholder:"请输入",...l})}),e.jsx(P,{children:"由邮件服务商提供的账号"}),e.jsx(S,{})]})}),e.jsx(j,{control:s.control,name:"email_password",render:({field:l})=>e.jsxs(h,{children:[e.jsx(g,{children:"SMTP密码"}),e.jsx(v,{children:e.jsx(C,{placeholder:"请输入",...l})}),e.jsx(P,{children:"由邮件服务商提供的密码"}),e.jsx(S,{})]})}),e.jsx(j,{control:s.control,name:"email_from_address",render:({field:l})=>e.jsxs(h,{children:[e.jsx(g,{children:"发件地址"}),e.jsx(v,{children:e.jsx(C,{placeholder:"请输入",...l})}),e.jsx(P,{children:"由邮件服务商提供的发件地址"}),e.jsx(S,{})]})}),e.jsx(j,{control:s.control,name:"email_template",render:({field:l})=>e.jsxs(h,{children:[e.jsx(g,{children:"邮件模板"}),e.jsxs("div",{className:"relative w-max",children:[e.jsx(v,{children:e.jsx("select",{className:f(De({variant:"outline"}),"w-[200px] appearance-none font-normal"),...l,children:a?.data?.map(c=>e.jsx("option",{value:c,children:c},c))})}),e.jsx(Ye,{className:"absolute right-3 top-2.5 h-4 w-4 opacity-50"})]}),e.jsx(P,{children:"你可以在文档查看如何自定义邮件模板"}),e.jsx(S,{})]})}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx(k,{type:"submit",onClick:()=>{s.handleSubmit(l=>{console.log(l),ts(l).then(({data:c})=>{c&&z.success("保存成功")})})()},children:"保存设置"}),e.jsx(k,{loading:n,onClick:()=>{r()},children:"发送测试邮件"})]})]})}function Ad(){return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-medium",children:"邮件设置"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"配置系统邮件服务,用于发送验证码、密码重置、通知等邮件,支持多种SMTP服务商。"})]}),e.jsx(se,{}),e.jsx($d,{})]})}const Hd=Object.freeze(Object.defineProperty({__proto__:null,default:Ad},Symbol.toStringTag,{value:"Module"})),Kd=i.object({telegram_bot_enable:i.boolean().nullable(),telegram_bot_token:i.string().nullable(),telegram_discuss_link:i.string().nullable()}),Gd={telegram_bot_enable:!1,telegram_bot_token:"",telegram_discuss_link:""};function Ud(){const s=Z({resolver:Q(Kd),defaultValues:Gd,mode:"onChange"}),{data:t}=G({queryKey:["settings","telegram"],queryFn:()=>ss("telegram")});o.useEffect(()=>{if(t?.data.telegram){const c=t.data.telegram;Object.entries(c).forEach(([x,u])=>{s.setValue(x,u)})}},[t]);const{mutate:a,status:n}=Et({mutationFn:c=>ts(c).then(({data:x})=>x&&z.success("保存成功")),mutationKey:["settings","telegram"]}),{mutate:r,status:l}=Et({mutationFn:c=>Kc().then(({data:x})=>x&&z.success("保存成功")),mutationKey:["settings","settelegramWebhook"]});return e.jsxs(ee,{...s,children:[e.jsx(j,{control:s.control,name:"telegram_bot_token",render:({field:c})=>e.jsxs(h,{children:[e.jsx(g,{children:"机器人Token"}),e.jsx(v,{children:e.jsx(C,{placeholder:"0000000000:xxxxxxxxx_xxxxxxxxxxxxxxx",...c})}),e.jsx(P,{children:"请输入由Botfather提供的token。"}),e.jsx(S,{})]})}),s.watch("telegram_bot_token")&&e.jsxs(h,{children:[e.jsx(g,{children:"设置Webhook"}),e.jsx("div",{children:e.jsx(k,{loading:l=="pending",onClick:()=>{r()},children:"一键设置"})}),e.jsx(P,{children:"对机器人进行Webhook设置,不设置将无法收到Telegram通知。"}),e.jsx(S,{})]}),e.jsx(j,{control:s.control,name:"telegram_bot_enable",render:({field:c})=>e.jsxs(h,{children:[e.jsx(g,{children:"开启机器人通知"}),e.jsx(P,{children:"开启后bot将会对绑定了telegram的管理员和用户进行基础通知。"}),e.jsx(v,{children:e.jsx(L,{checked:c.value,onCheckedChange:c.onChange})}),e.jsx(S,{})]})}),e.jsx(j,{control:s.control,name:"telegram_discuss_link",render:({field:c})=>e.jsxs(h,{children:[e.jsx(g,{children:"群组地址"}),e.jsx(v,{children:e.jsx(C,{placeholder:"https://t.me/xxxxxx",...c})}),e.jsx(P,{children:"填写后将会在用户端展示,或者被用于需要的地方。"}),e.jsx(S,{})]})}),e.jsx(k,{type:"submit",loading:n==="pending",onClick:()=>{s.handleSubmit(c=>{console.log(c),a(c)})()},children:"保存设置"})]})}function qd(){return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-medium",children:"Telegram设置"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"配置Telegram机器人功能,实现用户通知、账户绑定、指令交互等自动化服务。"})]}),e.jsx(se,{}),e.jsx(Ud,{})]})}const Bd=Object.freeze(Object.defineProperty({__proto__:null,default:qd},Symbol.toStringTag,{value:"Module"})),Yd=i.object({windows_version:i.string().nullable(),windows_download_url:i.string().nullable(),macos_version:i.string().nullable(),macos_download_url:i.string().nullable(),android_version:i.string().nullable(),android_download_url:i.string().nullable()}),Wd={windows_version:"",windows_download_url:"",macos_version:"",macos_download_url:"",android_version:"",android_download_url:""};function Jd(){const s=Z({resolver:Q(Yd),defaultValues:Wd,mode:"onChange"}),{data:t}=G({queryKey:["settings","app"],queryFn:()=>ss("app")});o.useEffect(()=>{if(t?.data.app){const r=t.data.app;Object.entries(r).forEach(([l,c])=>{s.setValue(l,c)})}},[t]);const{mutate:a,status:n}=Et({mutationFn:r=>ts(r).then(({data:l})=>l&&z.success("保存成功")),mutationKey:["settings","app","update"]});return e.jsxs(ee,{...s,children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:"Windows"}),e.jsx("div",{className:"text-[0.8rem] text-muted-foreground",children:"Windows端版本号及下载地址"}),e.jsxs("div",{children:[e.jsx("div",{className:"mb-1",children:e.jsx(j,{control:s.control,name:"windows_version",render:({field:r})=>e.jsxs(h,{children:[e.jsx(v,{children:e.jsx(C,{placeholder:"1.0.0",...r})}),e.jsx(S,{})]})})}),e.jsx("div",{children:e.jsx(j,{control:s.control,name:"windows_download_url",render:({field:r})=>e.jsxs(h,{children:[e.jsx(v,{children:e.jsx(C,{placeholder:"https://xxx.com/xxx.exe",...r})}),e.jsx(S,{})]})})})]})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:"macOS"}),e.jsx("div",{className:"text-[0.8rem] text-muted-foreground",children:"macOS端版本号及下载地址"}),e.jsxs("div",{children:[e.jsx("div",{className:"mb-1",children:e.jsx(j,{control:s.control,name:"mac_version",render:({field:r})=>e.jsxs(h,{children:[e.jsx(v,{children:e.jsx(C,{placeholder:"1.0.0",...r})}),e.jsx(S,{})]})})}),e.jsx("div",{children:e.jsx(j,{control:s.control,name:"mac_download_url",render:({field:r})=>e.jsxs(h,{children:[e.jsx(v,{children:e.jsx(C,{placeholder:"https://xxx.com/xxx.dmg",...r})}),e.jsx(S,{})]})})})]})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:"Android"}),e.jsx("div",{className:"text-[0.8rem] text-muted-foreground",children:"Android端版本号及下载地址"}),e.jsxs("div",{children:[e.jsx("div",{className:"mb-1",children:e.jsx(j,{control:s.control,name:"android_version",render:({field:r})=>e.jsxs(h,{children:[e.jsx(v,{children:e.jsx(C,{placeholder:"1.0.0",...r})}),e.jsx(S,{})]})})}),e.jsx("div",{children:e.jsx(j,{control:s.control,name:"android_download_url",render:({field:r})=>e.jsxs(h,{children:[e.jsx(v,{children:e.jsx(C,{placeholder:"https://xxx.com/xxx.apk",...r})}),e.jsx(S,{})]})})})]})]}),e.jsx(k,{type:"submit",loading:n=="pending",onClick:()=>{s.handleSubmit(r=>{a(r)})()},children:"保存设置"})]})}function Zd(){return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-medium",children:"APP设置"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"管理移动应用程序相关配置,包括API接口、版本控制、推送通知等功能设置。"})]}),e.jsx(se,{}),e.jsx(Jd,{})]})}const Xd=Object.freeze(Object.defineProperty({__proto__:null,default:Zd},Symbol.toStringTag,{value:"Module"})),Wt=o.forwardRef(({className:s,...t},a)=>e.jsx("div",{className:"relative w-full overflow-auto",children:e.jsx("table",{ref:a,className:f("w-full caption-bottom text-sm",s),...t})}));Wt.displayName="Table";const Jt=o.forwardRef(({className:s,...t},a)=>e.jsx("thead",{ref:a,className:f("[&_tr]:border-b",s),...t}));Jt.displayName="TableHeader";const Zt=o.forwardRef(({className:s,...t},a)=>e.jsx("tbody",{ref:a,className:f("[&_tr:last-child]:border-0",s),...t}));Zt.displayName="TableBody";const Qd=o.forwardRef(({className:s,...t},a)=>e.jsx("tfoot",{ref:a,className:f("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",s),...t}));Qd.displayName="TableFooter";const is=o.forwardRef(({className:s,...t},a)=>e.jsx("tr",{ref:a,className:f("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",s),...t}));is.displayName="TableRow";const Xt=o.forwardRef(({className:s,...t},a)=>e.jsx("th",{ref:a,className:f("h-10 px-2 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",s),...t}));Xt.displayName="TableHead";const Ds=o.forwardRef(({className:s,...t},a)=>e.jsx("td",{ref:a,className:f("p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",s),...t}));Ds.displayName="TableCell";const ex=o.forwardRef(({className:s,...t},a)=>e.jsx("caption",{ref:a,className:f("mt-4 text-sm text-muted-foreground",s),...t}));ex.displayName="TableCaption";function sx({table:s}){const[t,a]=o.useState("");o.useEffect(()=>{a((s.getState().pagination.pageIndex+1).toString())},[s.getState().pagination.pageIndex]);const n=r=>{const l=parseInt(r);!isNaN(l)&&l>=1&&l<=s.getPageCount()?s.setPageIndex(l-1):a((s.getState().pagination.pageIndex+1).toString())};return e.jsxs("div",{className:"flex flex-col-reverse gap-4 px-2 py-4 sm:flex-row sm:items-center sm:justify-between",children:[e.jsxs("div",{className:"flex-1 text-sm text-muted-foreground",children:["已选择 ",s.getFilteredSelectedRowModel().rows.length," 项, 共"," ",s.getFilteredRowModel().rows.length," 项"]}),e.jsxs("div",{className:"flex flex-col-reverse items-center gap-4 sm:flex-row sm:gap-6 lg:gap-8",children:[e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx("p",{className:"text-sm font-medium",children:"每页显示"}),e.jsxs(B,{value:`${s.getState().pagination.pageSize}`,onValueChange:r=>{s.setPageSize(Number(r))},children:[e.jsx(U,{className:"h-8 w-[70px]",children:e.jsx(Y,{placeholder:s.getState().pagination.pageSize})}),e.jsx(q,{side:"top",children:[10,20,30,40,50].map(r=>e.jsx(O,{value:`${r}`,children:r},r))})]})]}),e.jsxs("div",{className:"flex items-center justify-center space-x-2 text-sm font-medium",children:[e.jsx("span",{children:"第"}),e.jsx(C,{type:"text",value:t,onChange:r=>a(r.target.value),onBlur:r=>n(r.target.value),onKeyDown:r=>{r.key==="Enter"&&n(r.currentTarget.value)},className:"h-8 w-[50px] text-center"}),e.jsxs("span",{children:["页,共 ",s.getPageCount()," 页"]})]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsxs(k,{variant:"outline",className:"hidden h-8 w-8 p-0 lg:flex",onClick:()=>s.setPageIndex(0),disabled:!s.getCanPreviousPage(),children:[e.jsx("span",{className:"sr-only",children:"跳转到第一页"}),e.jsx(_i,{className:"h-4 w-4"})]}),e.jsxs(k,{variant:"outline",className:"h-8 w-8 p-0",onClick:()=>s.previousPage(),disabled:!s.getCanPreviousPage(),children:[e.jsx("span",{className:"sr-only",children:"上一页"}),e.jsx(rn,{className:"h-4 w-4"})]}),e.jsxs(k,{variant:"outline",className:"h-8 w-8 p-0",onClick:()=>s.nextPage(),disabled:!s.getCanNextPage(),children:[e.jsx("span",{className:"sr-only",children:"下一页"}),e.jsx(qt,{className:"h-4 w-4"})]}),e.jsxs(k,{variant:"outline",className:"hidden h-8 w-8 p-0 lg:flex",onClick:()=>s.setPageIndex(s.getPageCount()-1),disabled:!s.getCanNextPage(),children:[e.jsx("span",{className:"sr-only",children:"跳转到最后一页"}),e.jsx(Ci,{className:"h-4 w-4"})]})]})]})]})}function $e({table:s,toolbar:t,draggable:a=!1,onDragStart:n,onDragEnd:r,onDragOver:l,onDragLeave:c,onDrop:x,showPagination:u=!0,isLoading:b=!1}){const[p,y]=o.useState(0),_=o.useRef(null);o.useEffect(()=>{_.current&&y(_.current.offsetWidth)},[]);const D=s.getAllColumns().filter(d=>d.getIsPinned()==="left"),F=s.getAllColumns().filter(d=>d.getIsPinned()==="right");s.getAllColumns().filter(d=>!d.getIsPinned());const T=d=>D.slice(0,d).reduce((N,w)=>N+(w.getSize()??0),0),m=d=>F.slice(d+1).reduce((N,w)=>N+(w.getSize()??0),0);return e.jsxs("div",{className:"space-y-4",children:[typeof t=="function"?t(s):t,e.jsx("div",{ref:_,className:"rounded-md border bg-card relative overflow-auto",children:e.jsx("div",{className:"overflow-auto",children:e.jsxs(Wt,{children:[e.jsx(Jt,{children:s.getHeaderGroups().map(d=>e.jsx(is,{className:"hover:bg-transparent",children:d.headers.map((N,w)=>{const E=N.column.getIsPinned()==="left",H=N.column.getIsPinned()==="right",je=E?T(D.indexOf(N.column)):void 0,He=H?m(F.indexOf(N.column)):void 0;return e.jsx(Xt,{colSpan:N.colSpan,style:{width:N.getSize(),...E&&{left:je},...H&&{right:He}},className:f("h-11 px-4 text-muted-foreground bg-card",(E||H)&&["sticky z-20","before:absolute before:top-0 before:w-[1px] before:bottom-0 before:bg-border",E&&"before:right-0",H&&"before:left-0"]),children:N.isPlaceholder?null:rt(N.column.columnDef.header,N.getContext())},N.id)})},d.id))}),e.jsx(Zt,{children:s.getRowModel().rows?.length?s.getRowModel().rows.map((d,N)=>e.jsx(is,{"data-state":d.getIsSelected()&&"selected",className:"hover:bg-muted/50",draggable:a,onDragStart:w=>n?.(w,N),onDragEnd:r,onDragOver:l,onDragLeave:c,onDrop:w=>x?.(w,N),children:d.getVisibleCells().map((w,E)=>{const H=w.column.getIsPinned()==="left",je=w.column.getIsPinned()==="right",He=H?T(D.indexOf(w.column)):void 0,Vs=je?m(F.indexOf(w.column)):void 0;return e.jsx(Ds,{style:{width:w.column.getSize(),...H&&{left:He},...je&&{right:Vs}},className:f("bg-card",(H||je)&&["sticky z-20","before:absolute before:top-0 before:w-[1px] before:bottom-0 before:bg-border",H&&"before:right-0",je&&"before:left-0"]),children:rt(w.column.columnDef.cell,w.getContext())},w.id)})},d.id)):e.jsx(is,{children:e.jsx(Ds,{colSpan:s.getAllColumns().length,className:"h-24 text-center",children:"暂无数据"})})})]})})}),u&&e.jsx(sx,{table:s})]})}const tx=ps("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/10",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function M({className:s,variant:t,...a}){return e.jsx("div",{className:f(tx({variant:t}),s),...a})}const nr=(s,t)=>{let a=null;switch(s.field_type){case"input":a=e.jsx(C,{placeholder:s.placeholder,...t});break;case"textarea":a=e.jsx(us,{placeholder:s.placeholder,...t});break;case"select":a=e.jsx("select",{className:f(Ts({variant:"outline"}),"w-full appearance-none font-normal"),...t,children:s.select_options&&Object.keys(s.select_options).map(n=>e.jsx("option",{value:n,children:s.select_options?.[n]},n))});break;default:a=null;break}return a},ax=i.object({id:i.number().nullable(),name:i.string().min(2,"名称至少需要2个字符").max(30,"名称不能超过30个字符"),icon:i.string().optional().nullable(),notify_domain:i.string().refine(s=>!s||/^https?:\/\/\S+/.test(s),"请输入有效的URL").optional().nullable(),handling_fee_fixed:i.coerce.number().min(0).optional().nullable(),handling_fee_percent:i.coerce.number().min(0).max(100).optional().nullable(),payment:i.string().min(1,"请选择支付接口"),config:i.record(i.string(),i.string())}),Na={id:null,name:"",icon:"",notify_domain:"",handling_fee_fixed:0,handling_fee_percent:0,payment:"",config:{}};function rr({refetch:s,dialogTrigger:t,type:a="add",defaultFormValues:n=Na}){const[r,l]=o.useState(!1),[c,x]=o.useState(!1),[u,b]=o.useState([]),[p,y]=o.useState([]),_=Z({resolver:Q(ax),defaultValues:n,mode:"onChange"}),D=_.watch("payment");o.useEffect(()=>{r&&(async()=>{const{data:m}=await ic();b(m)})()},[r]),o.useEffect(()=>{if(!D||!r)return;(async()=>{try{const m={payment:D,...a==="edit"&&{id:Number(_.getValues("id"))}},{data:d}=await oc(m);y(d);const N=d.reduce((w,E)=>(E.field_name&&(w[E.field_name]=E.value??""),w),{});_.setValue("config",N)}catch{z.error("获取支付方式表单失败")}})()},[D,r,_,a]);const F=async T=>{x(!0),(await cc(T)).data&&(z.success("保存成功"),_.reset(Na),s(),l(!1)),x(!1)};return e.jsxs(de,{open:r,onOpenChange:l,children:[e.jsx(Se,{asChild:!0,children:t||e.jsxs(k,{variant:"outline",size:"sm",className:"space-x-2",children:[e.jsx(Ce,{icon:"ion:add"})," ",e.jsx("div",{children:"添加支付方式"})]})}),e.jsxs(re,{className:"sm:max-w-[425px]",children:[e.jsx(he,{children:e.jsx(xe,{children:a==="add"?"添加支付方式":"编辑支付方式"})}),e.jsx(ee,{..._,children:e.jsxs("form",{onSubmit:_.handleSubmit(F),className:"space-y-4",children:[e.jsx(j,{control:_.control,name:"name",render:({field:T})=>e.jsxs(h,{children:[e.jsx(g,{children:"显示名称"}),e.jsx(v,{children:e.jsx(C,{placeholder:"请输入支付名称",...T})}),e.jsx(P,{children:"用于前端显示"}),e.jsx(S,{})]})}),e.jsx(j,{control:_.control,name:"icon",render:({field:T})=>e.jsxs(h,{children:[e.jsx(g,{children:"图标URL"}),e.jsx(v,{children:e.jsx(C,{placeholder:"https://example.com/icon.svg",...T})}),e.jsx(P,{children:"用于前端显示的图标地址"}),e.jsx(S,{})]})}),e.jsx(j,{control:_.control,name:"notify_domain",render:({field:T})=>e.jsxs(h,{children:[e.jsx(g,{children:"通知域名"}),e.jsx(v,{children:e.jsx(C,{placeholder:"https://example.com",...T})}),e.jsx(P,{children:"网关通知将发送到该域名"}),e.jsx(S,{})]})}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsx(j,{control:_.control,name:"handling_fee_percent",render:({field:T})=>e.jsxs(h,{children:[e.jsx(g,{children:"百分比手续费(%)"}),e.jsx(v,{children:e.jsx(C,{type:"number",placeholder:"0-100",...T})}),e.jsx(S,{})]})}),e.jsx(j,{control:_.control,name:"handling_fee_fixed",render:({field:T})=>e.jsxs(h,{children:[e.jsx(g,{children:"固定手续费"}),e.jsx(v,{children:e.jsx(C,{type:"number",placeholder:"0",...T})}),e.jsx(S,{})]})})]}),e.jsx(j,{control:_.control,name:"payment",render:({field:T})=>e.jsxs(h,{children:[e.jsx(g,{children:"支付接口"}),e.jsxs(B,{value:T.value,onValueChange:T.onChange,children:[e.jsx(v,{children:e.jsx(U,{children:e.jsx(Y,{placeholder:"请选择支付接口"})})}),e.jsx(q,{children:u.map(m=>e.jsx(O,{value:m,children:m},m))})]}),e.jsx(S,{})]})}),p.map(T=>e.jsx(j,{control:_.control,name:`config.${T.field_name}`,render:({field:m})=>e.jsxs(h,{children:[e.jsx(g,{children:T.label}),e.jsx(v,{children:nr(T,m)}),e.jsx(S,{})]})},T.field_name)),e.jsxs(ke,{className:"gap-2",children:[e.jsx(Gs,{asChild:!0,children:e.jsx(k,{type:"button",variant:"outline",children:"取消"})}),e.jsx(k,{type:"submit",disabled:c,className:f(c&&"cursor-not-allowed opacity-50"),children:c?"保存中...":"提交"})]})]})})]})]})}function V({column:s,title:t,tooltip:a,className:n}){return s.getCanSort()?e.jsx("div",{className:"flex items-center gap-1",children:e.jsx("div",{className:"flex items-center gap-2",children:e.jsxs(k,{variant:"ghost",size:"default",className:f("-ml-3 flex h-8 items-center gap-2 text-nowrap font-medium hover:bg-muted/60",n),onClick:()=>s.toggleSorting(s.getIsSorted()==="asc"),children:[e.jsx("span",{children:t}),a&&e.jsx(ue,{delayDuration:100,children:e.jsxs(oe,{children:[e.jsx(ce,{asChild:!0,children:e.jsx(ma,{className:"h-4 w-4 cursor-pointer text-muted-foreground"})}),e.jsx(ne,{children:a})]})}),s.getIsSorted()==="asc"?e.jsx(zt,{className:"h-4 w-4 text-foreground/70"}):s.getIsSorted()==="desc"?e.jsx(Rt,{className:"h-4 w-4 text-foreground/70"}):e.jsx(Si,{className:"h-4 w-4 text-muted-foreground/70 transition-colors hover:text-foreground/70"})]})})}):e.jsxs("div",{className:f("flex items-center space-x-1 text-nowrap py-2 font-medium text-muted-foreground",n),children:[e.jsx("span",{children:t}),a&&e.jsx(ue,{delayDuration:100,children:e.jsxs(oe,{children:[e.jsx(ce,{children:e.jsx(ma,{className:"h-4 w-4 text-muted-foreground"})}),e.jsx(ne,{children:a})]})})]})}const nx=ki,rx=Di,lx=Ti,lr=o.forwardRef(({className:s,...t},a)=>e.jsx(dn,{className:f("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",s),...t,ref:a}));lr.displayName=dn.displayName;const ir=o.forwardRef(({className:s,...t},a)=>e.jsxs(lx,{children:[e.jsx(lr,{}),e.jsx(xn,{ref:a,className:f("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",s),...t})]}));ir.displayName=xn.displayName;const or=({className:s,...t})=>e.jsx("div",{className:f("flex flex-col space-y-2 text-center sm:text-left",s),...t});or.displayName="AlertDialogHeader";const cr=({className:s,...t})=>e.jsx("div",{className:f("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",s),...t});cr.displayName="AlertDialogFooter";const dr=o.forwardRef(({className:s,...t},a)=>e.jsx(mn,{ref:a,className:f("text-lg font-semibold",s),...t}));dr.displayName=mn.displayName;const xr=o.forwardRef(({className:s,...t},a)=>e.jsx(un,{ref:a,className:f("text-sm text-muted-foreground",s),...t}));xr.displayName=un.displayName;const mr=o.forwardRef(({className:s,...t},a)=>e.jsx(hn,{ref:a,className:f(Ts(),s),...t}));mr.displayName=hn.displayName;const ur=o.forwardRef(({className:s,...t},a)=>e.jsx(jn,{ref:a,className:f(Ts({variant:"outline"}),"mt-2 sm:mt-0",s),...t}));ur.displayName=jn.displayName;function Ae({onConfirm:s,children:t,title:a="确认操作",description:n="确定要执行此操作吗?",cancelText:r="取消",confirmText:l="确认",variant:c="default",className:x}){return e.jsxs(nx,{children:[e.jsx(rx,{asChild:!0,children:t}),e.jsxs(ir,{className:f("sm:max-w-[425px]",x),children:[e.jsxs(or,{children:[e.jsx(dr,{children:a}),e.jsx(xr,{children:n})]}),e.jsxs(cr,{children:[e.jsx(ur,{asChild:!0,children:e.jsx(k,{variant:"outline",children:r})}),e.jsx(mr,{asChild:!0,children:e.jsx(k,{variant:c,onClick:s,children:l})})]})]})]})}const hr=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M11.29 15.29a2 2 0 0 0-.12.15a.8.8 0 0 0-.09.18a.6.6 0 0 0-.06.18a1.4 1.4 0 0 0 0 .2a.84.84 0 0 0 .08.38a.9.9 0 0 0 .54.54a.94.94 0 0 0 .76 0a.9.9 0 0 0 .54-.54A1 1 0 0 0 13 16a1 1 0 0 0-.29-.71a1 1 0 0 0-1.42 0M12 2a10 10 0 1 0 10 10A10 10 0 0 0 12 2m0 18a8 8 0 1 1 8-8a8 8 0 0 1-8 8m0-13a3 3 0 0 0-2.6 1.5a1 1 0 1 0 1.73 1A1 1 0 0 1 12 9a1 1 0 0 1 0 2a1 1 0 0 0-1 1v1a1 1 0 0 0 2 0v-.18A3 3 0 0 0 12 7"})}),ix=({refetch:s,isSortMode:t=!1})=>[{id:"drag-handle",header:()=>null,cell:()=>e.jsx("div",{className:t?"cursor-move":"opacity-0",children:e.jsx(ht,{className:"size-4"})}),size:40,enableSorting:!1},{accessorKey:"id",header:({column:a})=>e.jsx(V,{column:a,title:"ID"}),cell:({row:a})=>e.jsx(M,{variant:"outline",children:a.getValue("id")}),enableSorting:!0,size:60},{accessorKey:"enable",header:({column:a})=>e.jsx(V,{column:a,title:"启用"}),cell:({row:a})=>e.jsx(L,{defaultChecked:a.getValue("enable"),onCheckedChange:async()=>{const{data:n}=await xc({id:a.original.id});n||s()}}),enableSorting:!1,size:100},{accessorKey:"name",header:({column:a})=>e.jsx(V,{column:a,title:"显示名称"}),cell:({row:a})=>e.jsx("div",{className:"flex items-center",children:e.jsx("span",{className:"max-w-[200px] truncate font-medium",children:a.getValue("name")})}),enableSorting:!1,size:200},{accessorKey:"payment",header:({column:a})=>e.jsx(V,{column:a,title:"支付接口"}),cell:({row:a})=>e.jsx("div",{className:"flex items-center",children:e.jsx("span",{className:"max-w-[200px] truncate font-medium",children:a.getValue("payment")})}),enableSorting:!1,size:200},{accessorKey:"notify_url",header:({column:a})=>e.jsxs("div",{className:"flex items-center",children:[e.jsx(V,{column:a,title:"通知地址"}),e.jsx(ue,{delayDuration:100,children:e.jsxs(oe,{children:[e.jsx(ce,{className:"ml-1",children:e.jsx(hr,{className:"h-4 w-4"})}),e.jsx(ne,{children:"支付网关将会把数据通知到本地址,请通过防火墙放行本地址。"})]})})]}),cell:({row:a})=>e.jsx("div",{className:"flex items-center",children:e.jsx("span",{className:"max-w-[300px] truncate font-medium",children:a.getValue("notify_url")})}),enableSorting:!1,size:3e3},{id:"actions",header:({column:a})=>e.jsx(V,{className:"justify-end",column:a,title:"操作"}),cell:({row:a})=>e.jsxs("div",{className:"flex items-center justify-end space-x-2",children:[e.jsx(rr,{refetch:s,dialogTrigger:e.jsxs(k,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-muted",children:[e.jsx(bs,{className:"h-4 w-4 text-muted-foreground hover:text-foreground"}),e.jsx("span",{className:"sr-only",children:"编辑"})]}),type:"edit",defaultFormValues:a.original}),e.jsx(Ae,{title:"删除确认",description:"确定要删除该支付方式吗?此操作无法撤销。",onConfirm:async()=>{const{data:n}=await dc({id:a.original.id});n&&s()},children:e.jsxs(k,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-destructive/10",children:[e.jsx(Je,{className:"h-4 w-4 text-muted-foreground hover:text-destructive"}),e.jsx("span",{className:"sr-only",children:"删除"})]})})]}),size:100}];function ox({table:s,refetch:t,saveOrder:a,isSortMode:n}){const r=s.getState().columnFilters.length>0;return e.jsxs("div",{className:"flex items-center justify-between",children:[n?e.jsx("p",{className:"text-sm text-muted-foreground",children:"拖拽支付方式进行排序,完成后点击保存"}):e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(rr,{refetch:t}),e.jsx(C,{placeholder:"搜索支付方式...",value:s.getColumn("name")?.getFilterValue()??"",onChange:l=>s.getColumn("name")?.setFilterValue(l.target.value),className:"h-8 w-[250px]"}),r&&e.jsxs(k,{variant:"ghost",onClick:()=>s.resetColumnFilters(),children:["重置",e.jsx(Re,{className:"ml-2 h-4 w-4"})]})]}),e.jsx("div",{className:"flex items-center gap-2",children:e.jsx(k,{size:"sm",variant:n?"default":"outline",onClick:a,children:n?"保存排序":"编辑排序"})})]})}function cx(){const[s,t]=o.useState([]),[a,n]=o.useState([]),[r,l]=o.useState(!1),[c,x]=o.useState([]),[u,b]=o.useState({"drag-handle":!1}),{refetch:p}=G({queryKey:["paymentList"],queryFn:async()=>{const{data:T}=await lc();return x(T?.map(m=>({...m,enable:!!m.enable}))||[]),T}});o.useEffect(()=>{b({"drag-handle":r})},[r]);const y=(T,m)=>{r&&(T.dataTransfer.setData("text/plain",m.toString()),T.currentTarget.classList.add("opacity-50"))},_=(T,m)=>{if(!r)return;T.preventDefault(),T.currentTarget.classList.remove("bg-muted");const d=parseInt(T.dataTransfer.getData("text/plain"));if(d===m)return;const N=[...c],[w]=N.splice(d,1);N.splice(m,0,w),x(N)},D=async()=>{if(r)try{await mc({ids:c.map(T=>T.id)}),await p(),l(!1),z.success("排序保存成功")}catch{z.error("排序保存失败")}else l(!0)},F=Fe({data:c,columns:ix({refetch:p,isSortMode:r}),state:{sorting:a,columnFilters:s,columnVisibility:u},onSortingChange:n,onColumnFiltersChange:t,onColumnVisibilityChange:b,getCoreRowModel:Pe(),getFilteredRowModel:Ee(),getPaginationRowModel:Me(),getSortedRowModel:Oe(),initialState:{pagination:{pageSize:10},columnPinning:{right:["actions"]}},pageCount:r?1:void 0});return e.jsx($e,{table:F,toolbar:T=>e.jsx(ox,{table:T,refetch:p,saveOrder:D,isSortMode:r}),draggable:r,onDragStart:y,onDragEnd:T=>T.currentTarget.classList.remove("opacity-50"),onDragOver:T=>{T.preventDefault(),T.currentTarget.classList.add("bg-muted")},onDragLeave:T=>T.currentTarget.classList.remove("bg-muted"),onDrop:_,showPagination:!r})}function dx(){return e.jsxs(ge,{children:[e.jsxs(fe,{className:"flex items-center justify-between",children:[e.jsx(Ne,{}),e.jsxs("div",{className:"flex items-center space-x-4",children:[e.jsx(we,{}),e.jsx(_e,{})]})]}),e.jsxs(be,{children:[e.jsx("header",{className:"mb-2 flex items-center justify-between space-y-2",children:e.jsxs("div",{children:[e.jsx("div",{className:"mb-2",children:e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:"支付配置"})}),e.jsx("p",{className:"text-muted-foreground",children:"在这里可以配置支付方式,包括支付宝、微信等。"})]})}),e.jsx("section",{className:"-mx-4 flex-1 overflow-auto px-4 py-1 lg:flex-row lg:space-x-12 lg:space-y-0",children:e.jsx(cx,{})})]})]})}const xx=Object.freeze(Object.defineProperty({__proto__:null,default:dx},Symbol.toStringTag,{value:"Module"}));function mx({themeKey:s,themeInfo:t}){const[a,n]=o.useState(!1),[r,l]=o.useState(!1),[c,x]=o.useState(!1),u=Z({defaultValues:t.configs.reduce((y,_)=>(y[_.field_name]="",y),{})}),b=async()=>{try{l(!0);const{data:y}=await qo(s);Object.entries(y).forEach(([_,D])=>{u.setValue(_,D)})}catch{z.error("加载主题配置失败"),n(!1)}finally{l(!1)}},p=async y=>{try{x(!0),Bo(s,y).then(()=>{z.success("保存成功"),n(!1)})}catch{z.error("保存失败")}finally{x(!1)}};return e.jsxs(de,{open:a,onOpenChange:y=>{n(y),y?b():u.reset()},children:[e.jsx(Se,{asChild:!0,children:e.jsx(k,{variant:"outline",children:"主题设置"})}),e.jsxs(re,{className:"max-h-[90vh] overflow-auto sm:max-w-[425px]",children:[e.jsxs(he,{children:[e.jsxs(xe,{children:["配置",t.name,"主题"]}),e.jsx(Ve,{children:"修改主题的样式、布局和其他显示选项。"})]}),r?e.jsx("div",{className:"flex h-40 items-center justify-center",children:e.jsx(gn,{className:"h-6 w-6 animate-spin"})}):e.jsx(ee,{...u,children:e.jsxs("form",{onSubmit:u.handleSubmit(p),className:"space-y-4",children:[t.configs.map(y=>e.jsx(j,{control:u.control,name:y.field_name,render:({field:_})=>e.jsxs(h,{children:[e.jsx(g,{children:y.label}),e.jsx(v,{children:nr(y,_)}),e.jsx(S,{})]})},y.field_name)),e.jsxs(ke,{className:"mt-6 gap-2",children:[e.jsx(k,{type:"button",variant:"secondary",onClick:()=>n(!1),children:"取消"}),e.jsx(k,{type:"submit",loading:c,children:"保存"})]})]})})]})]})}function ux(){const[s,t]=o.useState(null),[a,n]=o.useState(!1),[r,l]=o.useState(!1),[c,x]=o.useState(!1),u=o.useRef(null),{data:b,isLoading:p,refetch:y}=G({queryKey:["themeList"],queryFn:async()=>{const{data:m}=await Uo();return m}}),_=async m=>{try{t(m),await Jo({frontend_theme:m}),z.success("主题切换成功"),y()}catch{z.error("主题切换失败")}finally{t(null)}},D=async m=>{if(!m.name.endsWith(".zip")){z.error("只支持上传 ZIP 格式的主题文件");return}try{n(!0),await Yo(m),z.success("主题上传成功"),l(!1),y()}catch{z.error("主题上传失败")}finally{n(!1),u.current&&(u.current.value="")}},F=m=>{m.preventDefault(),m.stopPropagation(),m.type==="dragenter"||m.type==="dragover"?x(!0):m.type==="dragleave"&&x(!1)},T=m=>{m.preventDefault(),m.stopPropagation(),x(!1),m.dataTransfer.files&&m.dataTransfer.files[0]&&D(m.dataTransfer.files[0])};return e.jsxs(ge,{children:[e.jsxs(fe,{className:"flex items-center justify-between",children:[e.jsx(Ne,{}),e.jsxs("div",{className:"flex items-center space-x-4",children:[e.jsx(we,{}),e.jsx(_e,{})]})]}),e.jsxs(be,{className:"",children:[e.jsxs("header",{className:"mb-8",children:[e.jsx("div",{className:"mb-2",children:e.jsx("h1",{className:"text-2xl font-bold tracking-tight",children:"主题配置"})}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("p",{className:"text-muted-foreground",children:"主题配置,包括主题色、字体大小等。如果你采用前后分离的方式部署V2board,那么主题配置将不会生效。"}),e.jsxs(k,{onClick:()=>l(!0),variant:"outline",className:"ml-4 shrink-0",size:"sm",children:[e.jsx(ua,{className:"mr-2 h-4 w-4"}),"上传主题"]})]})]}),e.jsx("section",{className:"grid gap-6 sm:grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4",children:p?e.jsxs(e.Fragment,{children:[e.jsx(wa,{}),e.jsx(wa,{})]}):b?.themes&&Object.entries(b.themes).map(([m,d])=>e.jsxs(ze,{className:"relative transition-shadow hover:shadow-md",children:[m!==b.active&&e.jsx("div",{className:"absolute right-2 top-2",children:e.jsx(Ae,{title:"删除主题",description:"确定要删除该主题吗?删除后无法恢复。",confirmText:"删除",variant:"destructive",onConfirm:async()=>{if(m===b?.active){z.error("不能删除当前使用的主题");return}t(m),Wo(m).then(()=>{z.success("主题删除成功"),y()}).catch(()=>{z.error("主题删除失败")}).finally(()=>{t(null)})},children:e.jsx(k,{disabled:s===m,loading:s===m,variant:"ghost",size:"icon",className:"h-8 w-8 text-muted-foreground hover:text-destructive",children:e.jsx(Je,{className:"h-4 w-4"})})})}),e.jsxs(Ke,{children:[e.jsx(os,{children:d.name}),e.jsx(Rn,{children:d.description})]}),e.jsxs(Ge,{className:"flex items-center justify-end space-x-3",children:[e.jsx(mx,{themeKey:m,themeInfo:d}),e.jsx(k,{onClick:()=>_(m),disabled:s===m||m===b.active,loading:s===m,variant:m===b.active?"secondary":"default",children:m===b.active?"当前主题":"激活主题"})]})]},m))}),e.jsx(de,{open:r,onOpenChange:l,children:e.jsxs(re,{className:"sm:max-w-md",children:[e.jsxs(he,{children:[e.jsx(xe,{children:"上传主题"}),e.jsx(Ve,{children:"请上传一个有效的主题压缩包(.zip 格式)。主题包应包含完整的主题文件结构。"})]}),e.jsxs("div",{className:f("relative mt-4 flex h-64 flex-col items-center justify-center rounded-lg border-2 border-dashed border-muted-foreground/25 px-5 py-10 text-center transition-colors",c&&"border-primary/50 bg-muted/50"),onDragEnter:F,onDragLeave:F,onDragOver:F,onDrop:T,children:[e.jsx("input",{type:"file",ref:u,className:"hidden",accept:".zip",onChange:m=>{const d=m.target.files?.[0];d&&D(d)}}),a?e.jsxs("div",{className:"flex flex-col items-center space-y-2",children:[e.jsx("div",{className:"h-10 w-10 animate-spin rounded-full border-b-2 border-primary"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"正在上传..."})]}):e.jsx(e.Fragment,{children:e.jsxs("div",{className:"flex flex-col items-center space-y-4",children:[e.jsx("div",{className:"rounded-full border-2 border-muted-foreground/25 p-3",children:e.jsx(ua,{className:"h-6 w-6 text-muted-foreground/50"})}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("p",{className:"text-sm font-medium",children:["将主题文件拖放到此处,或者",e.jsx("button",{type:"button",onClick:()=>u.current?.click(),className:"mx-1 text-primary hover:underline",children:"点击选择"})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"支持 .zip 格式的主题包"})]})]})})]})]})})]})]})}function wa(){return e.jsxs(ze,{children:[e.jsxs(Ke,{children:[e.jsx(Te,{className:"h-6 w-[200px]"}),e.jsx(Te,{className:"h-4 w-[300px]"})]}),e.jsxs(Ge,{className:"flex items-center justify-end space-x-3",children:[e.jsx(Te,{className:"h-10 w-[100px]"}),e.jsx(Te,{className:"h-10 w-[100px]"})]})]})}const hx=Object.freeze(Object.defineProperty({__proto__:null,default:ux},Symbol.toStringTag,{value:"Module"})),Qt=o.forwardRef(({className:s,value:t,onChange:a,...n},r)=>{const[l,c]=o.useState("");o.useEffect(()=>{if(l.includes(",")){const u=new Set([...t,...l.split(",").map(b=>b.trim())]);a(Array.from(u)),c("")}},[l,a,t]);const x=()=>{if(l){const u=new Set([...t,l]);a(Array.from(u)),c("")}};return e.jsxs("div",{className:f(" has-[:focus-visible]:outline-none has-[:focus-visible]:ring-1 has-[:focus-visible]:ring-neutral-950 dark:has-[:focus-visible]:ring-neutral-300 flex w-full flex-wrap gap-2 rounded-md border border-input shadow-sm px-3 py-2 text-sm ring-offset-white disabled:cursor-not-allowed disabled:opacity-50",s),children:[t.map(u=>e.jsxs(M,{variant:"secondary",children:[u,e.jsx(A,{variant:"ghost",size:"icon",className:"ml-2 h-3 w-3",onClick:()=>{a(t.filter(b=>b!==u))},children:e.jsx(Mt,{className:"w-3"})})]},u)),e.jsx("input",{className:"flex-1 outline-none placeholder:text-muted-foreground bg-transparent",value:l,onChange:u=>c(u.target.value),onKeyDown:u=>{u.key==="Enter"||u.key===","?(u.preventDefault(),x()):u.key==="Backspace"&&l.length===0&&t.length>0&&(u.preventDefault(),a(t.slice(0,-1)))},...n,ref:r})]})});Qt.displayName="InputTags";const jx=i.object({id:i.number().nullable(),title:i.string().min(1).max(250),content:i.string().min(1),show:i.boolean(),tags:i.array(i.string()),img_url:i.string().nullable()}),gx={id:null,show:!1,tags:[],img_url:"",title:"",content:""};function jr({refetch:s,dialogTrigger:t,type:a="add",defaultFormValues:n=gx}){const[r,l]=o.useState(!1),c=Z({resolver:Q(jx),defaultValues:n,mode:"onChange",shouldFocusError:!0});return e.jsx(ee,{...c,children:e.jsxs(de,{onOpenChange:l,open:r,children:[e.jsx(Se,{asChild:!0,children:t||e.jsxs(k,{variant:"outline",size:"sm",className:"space-x-2",children:[e.jsx(Ce,{icon:"ion:add"})," ",e.jsx("div",{children:"添加公告"})]})}),e.jsxs(re,{className:"sm:max-w-[425px]",children:[e.jsxs(he,{children:[e.jsx(xe,{children:a==="add"?"添加公告":"编辑公告"}),e.jsx(Ve,{})]}),e.jsx(j,{control:c.control,name:"title",render:({field:x})=>e.jsxs(h,{children:[e.jsx(g,{children:"标题"}),e.jsx("div",{className:"relative ",children:e.jsx(v,{children:e.jsx(C,{placeholder:"请输入公告标题",...x})})}),e.jsx(S,{})]})}),e.jsx(j,{control:c.control,name:"content",render:({field:x})=>e.jsxs(h,{children:[e.jsx(g,{children:"公告内容"}),e.jsx("div",{className:"relative",children:e.jsx(v,{children:e.jsx(us,{className:"min-h-[150px]",placeholder:"请输入公告内容,支持HTML",...x})})}),e.jsx(S,{})]})}),e.jsx(j,{control:c.control,name:"img_url",render:({field:x})=>e.jsxs(h,{children:[e.jsx(g,{children:"公告背景"}),e.jsx("div",{className:"relative",children:e.jsx(v,{children:e.jsx(C,{type:"text",placeholder:"请输入公告背景图片URL",...x,value:x.value||""})})}),e.jsx(S,{})]})}),e.jsx(j,{control:c.control,name:"show",render:({field:x})=>e.jsxs(h,{children:[e.jsx(g,{children:"显示"}),e.jsx("div",{className:"relative py-2",children:e.jsx(v,{children:e.jsx(L,{checked:x.value,onCheckedChange:x.onChange})})}),e.jsx(S,{})]})}),e.jsx(j,{control:c.control,name:"tags",render:({field:x})=>e.jsxs(h,{children:[e.jsx(g,{children:"节点标签"}),e.jsx(v,{children:e.jsx(Qt,{value:x.value,onChange:x.onChange,placeholder:"输入后回车添加标签",className:"w-full"})}),e.jsx(S,{})]})}),e.jsxs(ke,{children:[e.jsx(Gs,{asChild:!0,children:e.jsx(k,{type:"button",variant:"outline",children:"取消"})}),e.jsx(k,{type:"submit",onClick:x=>{x.preventDefault(),c.handleSubmit(async u=>{try{(await hc(u)).data&&(await s(),l(!1))}catch(b){console.error("Failed to save notice:",b)}})()},children:"提交"})]})]})]})})}function fx({table:s,refetch:t}){const a=s.getState().columnFilters.length>0;return e.jsxs("div",{className:"flex items-center justify-between space-x-2 ",children:[e.jsxs("div",{className:"flex flex-1 items-center space-x-2",children:[e.jsx(jr,{refetch:t}),e.jsx(C,{placeholder:"搜索公告标题...",value:s.getColumn("title")?.getFilterValue()??"",onChange:n=>s.getColumn("title")?.setFilterValue(n.target.value),className:"h-8 w-[150px] lg:w-[250px]"}),a&&e.jsxs(k,{variant:"ghost",onClick:()=>s.resetColumnFilters(),className:"h-9 px-2 lg:px-3",children:["重置",e.jsx(Re,{className:"ml-2 h-4 w-4"})]})]}),e.jsx("div",{className:"flex items-center space-x-2"})]})}const px=s=>[{accessorKey:"id",header:({column:t})=>e.jsx(V,{column:t,title:"ID"}),cell:({row:t})=>e.jsx(M,{variant:"outline",className:"font-mono",children:t.getValue("id")}),enableSorting:!0,size:60},{accessorKey:"show",header:({column:t})=>e.jsx(V,{column:t,title:"显示状态"}),cell:({row:t})=>e.jsx("div",{className:"flex items-center",children:e.jsx(L,{defaultChecked:t.getValue("show"),onCheckedChange:async()=>{const{data:a}=await gc({id:t.original.id});a||s()}})}),enableSorting:!1,size:100},{accessorKey:"title",header:({column:t})=>e.jsx(V,{column:t,title:"标题"}),cell:({row:t})=>e.jsx("div",{className:"flex max-w-[500px] items-center",children:e.jsx("span",{className:"truncate font-medium",children:t.getValue("title")})}),enableSorting:!1,size:6e3},{id:"actions",header:({column:t})=>e.jsx(V,{className:"justify-end",column:t,title:"操作"}),cell:({row:t})=>e.jsxs("div",{className:"flex items-center justify-end space-x-2",children:[e.jsx(jr,{refetch:s,dialogTrigger:e.jsxs(k,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-muted",children:[e.jsx(bs,{className:"h-4 w-4 text-muted-foreground hover:text-foreground"}),e.jsx("span",{className:"sr-only",children:"编辑"})]}),type:"edit",defaultFormValues:t.original}),e.jsx(Ae,{title:"删除确认",description:"确定要删除该条公告吗?此操作无法撤销。",onConfirm:async()=>{jc({id:t.original.id}).then(()=>{z.success("删除成功"),s()})},children:e.jsxs(k,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-red-100 dark:hover:bg-red-900",children:[e.jsx(Je,{className:"h-4 w-4 text-muted-foreground hover:text-red-600 dark:hover:text-red-400"}),e.jsx("span",{className:"sr-only",children:"删除"})]})})]}),size:100}];function vx(){const[s,t]=o.useState({}),[a,n]=o.useState({}),[r,l]=o.useState([]),[c,x]=o.useState([]),{data:u,isLoading:b,refetch:p}=G({queryKey:["notices"],queryFn:async()=>{const{data:_}=await uc();return _}}),y=Fe({data:u??[],columns:px(p),state:{sorting:c,columnVisibility:a,rowSelection:s,columnFilters:r},enableRowSelection:!0,onRowSelectionChange:t,onSortingChange:x,onColumnFiltersChange:l,onColumnVisibilityChange:n,getCoreRowModel:Pe(),getFilteredRowModel:Ee(),getPaginationRowModel:Me(),getSortedRowModel:Oe(),getFacetedRowModel:Ze(),getFacetedUniqueValues:Xe(),initialState:{columnPinning:{right:["actions"]}}});return e.jsx($e,{table:y,toolbar:_=>e.jsx(fx,{table:_,refetch:p})})}function bx(){return e.jsxs(ge,{children:[e.jsxs(fe,{className:"flex items-center justify-between",children:[e.jsx(Ne,{}),e.jsxs("div",{className:"flex items-center space-x-4",children:[e.jsx(we,{}),e.jsx(_e,{})]})]}),e.jsxs(be,{className:"flex flex-col",fixedHeight:!0,children:[e.jsx("div",{className:"mb-2 flex items-center justify-between space-y-2",children:e.jsxs("div",{children:[e.jsx("div",{className:"mb-2",children:e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:"公告管理"})}),e.jsx("p",{className:"text-muted-foreground",children:"在这里可以配置公告,包括添加、删除、编辑等操作。"})]})}),e.jsx("div",{className:"-mx-4 flex-1 overflow-auto px-4 py-1 lg:flex-row lg:space-x-12 lg:space-y-0",children:e.jsx(vx,{})})]})]})}const yx=Object.freeze(Object.defineProperty({__proto__:null,default:bx},Symbol.toStringTag,{value:"Module"})),Nx=i.object({id:i.number().nullable(),language:i.string().max(250),category:i.string().max(250),title:i.string().min(1).max(250),body:i.string().min(1),show:i.boolean()}),wx={id:null,language:"zh-CN",category:"",title:"",body:"",show:!1};function gr({refreshData:s,dialogTrigger:t,type:a="add",defaultFormValues:n=wx}){const[r,l]=o.useState(!1),c=Z({resolver:Q(Nx),defaultValues:n,mode:"onChange",shouldFocusError:!0}),x=new fn({html:!0});return o.useEffect(()=>{r&&n.id&&pc(n.id).then(({data:u})=>{c.reset(u)})},[n.id,c,r]),e.jsxs(de,{onOpenChange:l,open:r,children:[e.jsx(Se,{asChild:!0,children:t||e.jsxs(k,{variant:"outline",size:"sm",className:"space-x-2",children:[e.jsx(Ce,{icon:"ion:add"})," ",e.jsx("div",{children:"添加知识"})]})}),e.jsxs(re,{className:"sm:max-w-[1025px]",children:[e.jsxs(he,{children:[e.jsx(xe,{children:a==="add"?"添加知识":"编辑知识"}),e.jsx(Ve,{})]}),e.jsxs(ee,{...c,children:[e.jsx(j,{control:c.control,name:"title",render:({field:u})=>e.jsxs(h,{children:[e.jsx(g,{children:"标题"}),e.jsx("div",{className:"relative ",children:e.jsx(v,{children:e.jsx(C,{placeholder:"请输入知识标题",...u})})}),e.jsx(S,{})]})}),e.jsx(j,{control:c.control,name:"category",render:({field:u})=>e.jsxs(h,{children:[e.jsx(g,{children:"分类"}),e.jsx("div",{className:"relative ",children:e.jsx(v,{children:e.jsx(C,{placeholder:"请输入分类,分类将会自动归类",...u})})}),e.jsx(S,{})]})}),e.jsx(j,{control:c.control,name:"language",render:({field:u})=>e.jsxs(h,{children:[e.jsx(g,{children:"语言"}),e.jsx(v,{children:e.jsxs(B,{value:u.value,onValueChange:u.onChange,children:[e.jsx(U,{children:e.jsx(Y,{placeholder:"请选择语言"})}),e.jsx(q,{children:[{field:"English",value:"en-US"},{field:"日本語",value:"ja-JP"},{field:"한국어",value:"ko-KR"},{field:"Tiếng Việt",value:"vi-VN"},{field:"简体中文",value:"zh-CN"},{field:"繁體中文",value:"zh-TW"}].map(b=>e.jsx(O,{value:b.value,className:"cursor-pointer",children:b.field},b.value))})]})})]})}),e.jsx(j,{control:c.control,name:"body",render:({field:u})=>e.jsxs(h,{children:[e.jsx(g,{children:"内容"}),e.jsx(v,{children:e.jsx(pn,{style:{height:"500px"},value:u.value,renderHTML:b=>x.render(b),onChange:({text:b})=>{u.onChange(b)}})}),e.jsx(S,{})]})}),e.jsx(j,{control:c.control,name:"show",render:({field:u})=>e.jsxs(h,{children:[e.jsx(g,{children:"显示"}),e.jsx("div",{className:"relative py-2",children:e.jsx(v,{children:e.jsx(L,{checked:u.value,onCheckedChange:u.onChange})})}),e.jsx(S,{})]})}),e.jsxs(ke,{children:[e.jsx(Gs,{asChild:!0,children:e.jsx(k,{type:"button",variant:"outline",children:"取消"})}),e.jsx(k,{type:"submit",onClick:()=>{c.handleSubmit(u=>{vc(u).then(({data:b})=>{b&&(c.reset(),z.success("操作成功"),l(!1),s())})})()},children:"提交"})]})]})]})]})}function _x({column:s,title:t,options:a}){const n=s?.getFacetedUniqueValues(),r=new Set(s?.getFilterValue());return e.jsxs(Ue,{children:[e.jsx(qe,{asChild:!0,children:e.jsxs(k,{variant:"outline",size:"sm",className:"h-8 border-dashed",children:[e.jsx(Fs,{className:"mr-2 h-4 w-4"}),t,r?.size>0&&e.jsxs(e.Fragment,{children:[e.jsx(se,{orientation:"vertical",className:"mx-2 h-4"}),e.jsx(M,{variant:"secondary",className:"rounded-sm px-1 font-normal lg:hidden",children:r.size}),e.jsx("div",{className:"hidden space-x-1 lg:flex",children:r.size>2?e.jsxs(M,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:[r.size," selected"]}):a.filter(l=>r.has(l.value)).map(l=>e.jsx(M,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:l.label},l.value))})]})]})}),e.jsx(Le,{className:"w-[200px] p-0",align:"start",children:e.jsxs(Qe,{children:[e.jsx(xs,{placeholder:t}),e.jsxs(es,{children:[e.jsx(ms,{children:"No results found."}),e.jsx(pe,{children:a.map(l=>{const c=r.has(l.value);return e.jsxs(ie,{onSelect:()=>{c?r.delete(l.value):r.add(l.value);const x=Array.from(r);s?.setFilterValue(x.length?x:void 0)},children:[e.jsx("div",{className:f("mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary",c?"bg-primary text-primary-foreground":"opacity-50 [&_svg]:invisible"),children:e.jsx(ds,{className:f("h-4 w-4")})}),l.icon&&e.jsx(l.icon,{className:"mr-2 h-4 w-4 text-muted-foreground"}),e.jsx("span",{children:l.label}),n?.get(l.value)&&e.jsx("span",{className:"ml-auto flex h-4 w-4 items-center justify-center font-mono text-xs",children:n.get(l.value)})]},l.value)})}),r.size>0&&e.jsxs(e.Fragment,{children:[e.jsx(ys,{}),e.jsx(pe,{children:e.jsx(ie,{onSelect:()=>s?.setFilterValue(void 0),className:"justify-center text-center",children:"Clear filters"})})]})]})]})})]})}function Cx({table:s,refetch:t,saveOrder:a,isSortMode:n}){const r=s.getState().columnFilters.length>0;return e.jsxs("div",{className:"flex items-center justify-between",children:[n?e.jsx("p",{className:"text-sm text-muted-foreground",children:"拖拽知识条目进行排序,完成后点击保存"}):e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(gr,{refreshData:t}),e.jsx(C,{placeholder:"搜索知识...",value:s.getColumn("title")?.getFilterValue()??"",onChange:l=>s.getColumn("title")?.setFilterValue(l.target.value),className:"h-8 w-[250px]"}),s.getColumn("category")&&e.jsx(_x,{column:s.getColumn("category"),title:"分类",options:Array.from(new Set(s.getCoreRowModel().rows.map(l=>l.getValue("category")))).map(l=>({label:l,value:l}))}),r&&e.jsxs(k,{variant:"ghost",onClick:()=>s.resetColumnFilters(),children:["重置",e.jsx(Re,{className:"ml-2 h-4 w-4"})]})]}),e.jsx("div",{className:"flex items-center gap-2",children:e.jsx(k,{variant:n?"default":"outline",onClick:a,size:"sm",children:n?"保存排序":"编辑排序"})})]})}const Sx=({refetch:s,isSortMode:t=!1})=>[{id:"drag-handle",header:()=>null,cell:()=>e.jsx("div",{className:t?"cursor-move":"opacity-0",children:e.jsx(ht,{className:"size-4"})}),size:40,enableSorting:!1},{accessorKey:"id",header:({column:a})=>e.jsx(V,{column:a,title:"ID"}),cell:({row:a})=>e.jsx(M,{variant:"outline",className:"justify-center",children:a.getValue("id")}),enableSorting:!0,size:70},{accessorKey:"show",header:({column:a})=>e.jsx(V,{column:a,title:"状态"}),cell:({row:a})=>e.jsx("div",{className:"flex items-center",children:e.jsx(L,{defaultChecked:a.getValue("show"),onCheckedChange:async()=>{yc({id:a.original.id}).then(({data:n})=>{n||s()})}})}),enableSorting:!1,size:100},{accessorKey:"title",header:({column:a})=>e.jsx(V,{column:a,title:"标题"}),cell:({row:a})=>e.jsx("div",{className:"flex space-x-2",children:e.jsx("span",{className:"line-clamp-2 font-medium",children:a.getValue("title")})}),enableSorting:!0,size:600},{accessorKey:"category",header:({column:a})=>e.jsx(V,{column:a,title:"分类"}),cell:({row:a})=>e.jsx(M,{variant:"secondary",className:"max-w-[180px] truncate",children:a.getValue("category")}),enableSorting:!0,size:1800},{id:"actions",header:({column:a})=>e.jsx(V,{className:"justify-end",column:a,title:"操作"}),cell:({row:a})=>e.jsxs("div",{className:"flex items-center justify-end space-x-1",children:[e.jsx(gr,{refreshData:s,dialogTrigger:e.jsxs(k,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-muted",children:[e.jsx(bs,{className:"h-4 w-4 text-muted-foreground hover:text-foreground"}),e.jsx("span",{className:"sr-only",children:"编辑"})]}),type:"edit",defaultFormValues:a.original}),e.jsx(Ae,{title:"确认删除",description:"此操作将永久删除该知识库记录,删除后无法恢复。确定要继续吗?",confirmText:"删除",variant:"destructive",onConfirm:async()=>{bc({id:a.original.id}).then(({data:n})=>{n&&(z.success("删除成功"),s())})},children:e.jsxs(k,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-red-100 dark:hover:bg-red-900",children:[e.jsx(Je,{className:"h-4 w-4 text-muted-foreground hover:text-red-600 dark:hover:text-red-400"}),e.jsx("span",{className:"sr-only",children:"删除"})]})})]}),size:100}];function kx(){const[s,t]=o.useState([]),[a,n]=o.useState([]),[r,l]=o.useState(!1),[c,x]=o.useState([]),[u,b]=o.useState({"drag-handle":!1}),{refetch:p,isLoading:y,data:_}=G({queryKey:["knowledge"],queryFn:async()=>{const{data:d}=await fc();return x(d||[]),d}});o.useEffect(()=>{b({"drag-handle":r})},[r]);const D=(d,N)=>{r&&(d.dataTransfer.setData("text/plain",N.toString()),d.currentTarget.classList.add("opacity-50"))},F=(d,N)=>{if(!r)return;d.preventDefault(),d.currentTarget.classList.remove("bg-muted");const w=parseInt(d.dataTransfer.getData("text/plain"));if(w===N)return;const E=[...c],[H]=E.splice(w,1);E.splice(N,0,H),x(E)},T=async()=>{if(r)try{await Nc({ids:c.map(d=>d.id)}),await p(),l(!1),z.success("排序保存成功")}catch{z.error("排序保存失败")}else l(!0)},m=Fe({data:c,columns:Sx({refetch:p,isSortMode:r}),state:{sorting:a,columnFilters:s,columnVisibility:u},onSortingChange:n,onColumnFiltersChange:t,onColumnVisibilityChange:b,getCoreRowModel:Pe(),getFilteredRowModel:Ee(),getPaginationRowModel:Me(),getSortedRowModel:Oe(),pagination:r?{pageSize:Number.MAX_SAFE_INTEGER,pageIndex:0}:void 0,initialState:{columnPinning:{right:["actions"]}}});return e.jsx($e,{table:m,toolbar:d=>e.jsx(Cx,{table:d,refetch:p,saveOrder:T,isSortMode:r}),draggable:r,onDragStart:D,onDragEnd:d=>d.currentTarget.classList.remove("opacity-50"),onDragOver:d=>{d.preventDefault(),d.currentTarget.classList.add("bg-muted")},onDragLeave:d=>d.currentTarget.classList.remove("bg-muted"),onDrop:F,showPagination:!r})}function Dx(){return e.jsxs(ge,{children:[e.jsxs(fe,{children:[e.jsx(Ne,{}),e.jsxs("div",{className:"ml-auto flex items-center space-x-4",children:[e.jsx(we,{}),e.jsx(_e,{})]})]}),e.jsxs(be,{className:"flex flex-col",fixedHeight:!0,children:[e.jsx("div",{className:"mb-2 flex items-center justify-between space-y-2",children:e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight mb-2",children:"知识库管理"}),e.jsx("p",{className:"text-muted-foreground",children:"在这里可以配置知识库,包括添加、删除、编辑等操作。"})]})}),e.jsx("div",{className:"-mx-4 flex-1 overflow-auto px-4 py-1 lg:flex-row lg:space-x-12 lg:space-y-0",children:e.jsx(kx,{})})]})]})}const Tx=Object.freeze(Object.defineProperty({__proto__:null,default:Dx},Symbol.toStringTag,{value:"Module"}));function Fx(s,t){const[a,n]=o.useState(s);return o.useEffect(()=>{const r=setTimeout(()=>n(s),t);return()=>{clearTimeout(r)}},[s,t]),a}function St(s,t){if(s.length===0)return{};if(!t)return{"":s};const a={};return s.forEach(n=>{const r=n[t]||"";a[r]||(a[r]=[]),a[r].push(n)}),a}function Px(s,t){const a=JSON.parse(JSON.stringify(s));for(const[n,r]of Object.entries(a))a[n]=r.filter(l=>!t.find(c=>c.value===l.value));return a}function Vx(s,t){for(const[,a]of Object.entries(s))if(a.some(n=>t.find(r=>r.value===n.value)))return!0;return!1}const fr=o.forwardRef(({className:s,...t},a)=>Fi(r=>r.filtered.count===0)?e.jsx("div",{ref:a,className:f("py-6 text-center text-sm",s),"cmdk-empty":"",role:"presentation",...t}):null);fr.displayName="CommandEmpty";const Hs=o.forwardRef(({value:s,onChange:t,placeholder:a,defaultOptions:n=[],options:r,delay:l,onSearch:c,loadingIndicator:x,emptyIndicator:u,maxSelected:b=Number.MAX_SAFE_INTEGER,onMaxSelected:p,hidePlaceholderWhenSelected:y,disabled:_,groupBy:D,className:F,badgeClassName:T,selectFirstItem:m=!0,creatable:d=!1,triggerSearchOnFocus:N=!1,commandProps:w,inputProps:E,hideClearAllButton:H=!1},je)=>{const He=o.useRef(null),[Vs,sa]=o.useState(!1),yt=o.useRef(!1),[ta,aa]=o.useState(!1),[K,Is]=o.useState(s||[]),[hs,na]=o.useState(St(n,D)),[as,Nt]=o.useState(""),zs=Fx(as,l||500);o.useImperativeHandle(je,()=>({selectedValue:[...K],input:He.current,focus:()=>He.current?.focus()}),[K]);const qs=o.useCallback($=>{const W=K.filter(ye=>ye.value!==$.value);Is(W),t?.(W)},[t,K]),Ur=o.useCallback($=>{const W=He.current;W&&(($.key==="Delete"||$.key==="Backspace")&&W.value===""&&K.length>0&&(K[K.length-1].fixed||qs(K[K.length-1])),$.key==="Escape"&&W.blur())},[qs,K]);o.useEffect(()=>{s&&Is(s)},[s]),o.useEffect(()=>{if(!r||c)return;const $=St(r||[],D);JSON.stringify($)!==JSON.stringify(hs)&&na($)},[n,r,D,c,hs]),o.useEffect(()=>{const $=async()=>{aa(!0);const ye=await c?.(zs);na(St(ye||[],D)),aa(!1)};(async()=>{!c||!Vs||(N&&await $(),zs&&await $())})()},[zs,D,Vs,N]);const qr=()=>{if(!d||Vx(hs,[{value:as,label:as}])||K.find(W=>W.value===as))return;const $=e.jsx(ie,{value:as,className:"cursor-pointer",onMouseDown:W=>{W.preventDefault(),W.stopPropagation()},onSelect:W=>{if(K.length>=b){p?.(K.length);return}Nt("");const ye=[...K,{value:W,label:W}];Is(ye),t?.(ye)},children:`Create "${as}"`});if(!c&&as.length>0||c&&zs.length>0&&!ta)return $},Br=o.useCallback(()=>{if(u)return c&&!d&&Object.keys(hs).length===0?e.jsx(ie,{value:"-",disabled:!0,children:u}):e.jsx(fr,{children:u})},[d,u,c,hs]),Yr=o.useMemo(()=>Px(hs,K),[hs,K]),Wr=o.useCallback(()=>{if(w?.filter)return w.filter;if(d)return($,W)=>$.toLowerCase().includes(W.toLowerCase())?1:-1},[d,w?.filter]),Jr=o.useCallback(()=>{const $=K.filter(W=>W.fixed);Is($),t?.($)},[t,K]);return e.jsxs(Qe,{...w,onKeyDown:$=>{Ur($),w?.onKeyDown?.($)},className:f("h-auto overflow-visible bg-transparent",w?.className),shouldFilter:w?.shouldFilter!==void 0?w.shouldFilter:!c,filter:Wr(),children:[e.jsx("div",{className:f("rounded-md border border-input text-sm ring-offset-background focus-within:ring-1 focus-within:ring-ring ",{"px-3 py-2":K.length!==0,"cursor-text":!_&&K.length!==0},F),onClick:()=>{_||He.current?.focus()},children:e.jsxs("div",{className:"flex flex-wrap gap-1",children:[K.map($=>e.jsxs(M,{className:f("data-[disabled]:bg-muted-foreground data-[disabled]:text-muted data-[disabled]:hover:bg-muted-foreground","data-[fixed]:bg-muted-foreground data-[fixed]:text-muted data-[fixed]:hover:bg-muted-foreground",T),"data-fixed":$.fixed,"data-disabled":_||void 0,children:[$.label,e.jsx("button",{className:f("ml-1 rounded-full outline-none ring-offset-background focus:ring-2 focus:ring-ring focus:ring-offset-2",(_||$.fixed)&&"hidden"),onKeyDown:W=>{W.key==="Enter"&&qs($)},onMouseDown:W=>{W.preventDefault(),W.stopPropagation()},onClick:()=>qs($),children:e.jsx(Mt,{className:"h-3 w-3 text-muted-foreground hover:text-foreground"})})]},$.value)),e.jsx(ve.Input,{...E,ref:He,value:as,disabled:_,onValueChange:$=>{Nt($),E?.onValueChange?.($)},onBlur:$=>{yt.current===!1&&sa(!1),E?.onBlur?.($)},onFocus:$=>{sa(!0),N&&c?.(zs),E?.onFocus?.($)},placeholder:y&&K.length!==0?"":a,className:f("flex-1 bg-transparent outline-none placeholder:text-muted-foreground",{"w-full":y,"px-3 py-2":K.length===0,"ml-1":K.length!==0},E?.className)}),e.jsx("button",{type:"button",onClick:Jr,className:f((H||_||K.length<1||K.filter($=>$.fixed).length===K.length)&&"hidden"),children:e.jsx(Mt,{})})]})}),e.jsx("div",{className:"relative",children:Vs&&e.jsx(es,{className:"absolute top-1 z-10 w-full rounded-md border bg-popover text-popover-foreground shadow-md outline-none animate-in",onMouseLeave:()=>{yt.current=!1},onMouseEnter:()=>{yt.current=!0},onMouseUp:()=>{He.current?.focus()},children:ta?e.jsx(e.Fragment,{children:x}):e.jsxs(e.Fragment,{children:[Br(),qr(),!m&&e.jsx(ie,{value:"-",className:"hidden"}),Object.entries(Yr).map(([$,W])=>e.jsx(pe,{heading:$,className:"h-full overflow-auto",children:e.jsx(e.Fragment,{children:W.map(ye=>e.jsx(ie,{value:ye.value,disabled:ye.disable,onMouseDown:Rs=>{Rs.preventDefault(),Rs.stopPropagation()},onSelect:()=>{if(K.length>=b){p?.(K.length);return}Nt("");const Rs=[...K,ye];Is(Rs),t?.(Rs)},className:f("cursor-pointer",ye.disable&&"cursor-default text-muted-foreground"),children:ye.label},ye.value))})},$))]})})})]})});Hs.displayName="MultipleSelector";const Ix=i.object({id:i.number().optional(),name:i.string().min(2,"组名至少需要2个字符").max(50,"组名不能超过50个字符").regex(/^[a-zA-Z0-9\u4e00-\u9fa5_-]+$/,"组名只能包含字母、数字、中文、下划线和连字符")});function bt({refetch:s,dialogTrigger:t,defaultValues:a={name:""},type:n="add"}){const r=Z({resolver:Q(Ix),defaultValues:a,mode:"onChange"}),[l,c]=o.useState(!1),[x,u]=o.useState(!1),b=async p=>{try{u(!0);const{data:y}=await tc(p);y&&(z.success(n==="edit"?"更新成功":"创建成功"),s&&s(),r.reset(),c(!1))}catch{z.error("操作失败,请重试")}finally{u(!1)}};return e.jsxs(de,{open:l,onOpenChange:c,children:[e.jsx(Se,{asChild:!0,children:t||e.jsxs(k,{variant:"outline",size:"sm",className:"space-x-2",children:[e.jsx(Ce,{icon:"ion:add",className:"h-4 w-4"}),e.jsx("span",{children:"添加权限组"})]})}),e.jsxs(re,{className:"sm:max-w-[425px]",children:[e.jsxs(he,{children:[e.jsx(xe,{children:n==="edit"?"编辑权限组":"创建权限组"}),e.jsx(Ve,{children:n==="edit"?"修改权限组信息,更新后会立即生效。":"创建新的权限组,可以为不同的用户分配不同的权限。"})]}),e.jsx(ee,{...r,children:e.jsxs("form",{onSubmit:r.handleSubmit(b),className:"space-y-4",children:[e.jsx(j,{control:r.control,name:"name",render:({field:p})=>e.jsxs(h,{children:[e.jsx(g,{children:"组名称"}),e.jsx(v,{children:e.jsx(C,{placeholder:"请输入权限组名称",...p,className:"w-full"})}),e.jsx(P,{children:"权限组名称用于标识不同的用户组,建议使用有意义的名称。"}),e.jsx(S,{})]})}),e.jsxs(ke,{className:"gap-2",children:[e.jsx(Gs,{asChild:!0,children:e.jsx(k,{type:"button",variant:"outline",children:"取消"})}),e.jsxs(k,{type:"submit",disabled:x||!r.formState.isValid,children:[x&&e.jsx(gn,{className:"mr-2 h-4 w-4 animate-spin"}),n==="edit"?"更新":"创建"]})]})]})})]})]})}function kt({dialogTrigger:s,state:t,setState:a,templateType:n}){const[r,l]=o.useState(!1),[c,x]=o.useState(typeof t=="object"?JSON.stringify(t,null,2):t),[u,b]=o.useState(null),p=m=>{if(!m)return null;try{const d=JSON.parse(m);return typeof d!="object"||d===null?"配置必须是一个JSON对象":null}catch{return"无效的JSON格式"}},y={tcp:{label:"TCP",content:{acceptProxyProtocol:!1,header:{type:"none"}}},"tcp-http":{label:"TCP + HTTP",content:{acceptProxyProtocol:!1,header:{type:"http",request:{version:"1.1",method:"GET",path:["/"],headers:{Host:["www.example.com"]}},response:{version:"1.1",status:"200",reason:"OK"}}}},grpc:{label:"gRPC",content:{serviceName:"GunService"}},ws:{label:"WebSocket",content:{path:"/",headers:{Host:"v2ray.com"}}}},_=()=>{switch(n){case"tcp":return["tcp","tcp-http"];case"grpc":return["grpc"];case"ws":return["ws"];default:return[]}},D=()=>{const m=p(c||"");if(m){z.error(m);return}try{if(!c){a(""),l(!1);return}a(JSON.parse(c)),l(!1)}catch{z.error("保存时发生错误")}},F=m=>{x(m),b(p(m))},T=m=>{const d=y[m];if(d){const N=JSON.stringify(d.content,null,2);x(N),b(null)}};return e.jsxs(de,{open:r,onOpenChange:m=>{!m&&r&&D(),l(m)},children:[e.jsx(Se,{asChild:!0,children:s??e.jsx(A,{variant:"link",children:"编辑协议"})}),e.jsxs(re,{className:"sm:max-w-[425px]",children:[e.jsx(he,{children:e.jsx(xe,{children:"编辑协议配置"})}),e.jsxs("div",{className:"space-y-4",children:[_().length>0&&e.jsx("div",{className:"flex flex-wrap gap-2 pt-2",children:_().map(m=>e.jsxs(A,{variant:"outline",size:"sm",onClick:()=>T(m),children:["使用",y[m].label,"模板"]},m))}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(us,{className:`min-h-[200px] font-mono text-sm ${u?"border-red-500 focus-visible:ring-red-500":""}`,value:c,placeholder:`请输入JSON配置${_().length>0?"或选择上方模板":""}`,onChange:m=>F(m.target.value)}),u&&e.jsx("p",{className:"text-sm text-red-500",children:u})]})]}),e.jsxs(ke,{className:"gap-2",children:[e.jsx(A,{variant:"outline",onClick:()=>l(!1),children:"取消"}),e.jsx(A,{onClick:D,disabled:!!u,children:"确定"})]})]})]})}const zx=({serverType:s,state:t,setState:a})=>{const n=i.object({cipher:i.string(),obfs:i.string().optional(),obfs_settings:i.object({path:i.string(),host:i.string()}).optional()}),r={cipher:"aes-128-gcm",obfs:"",obfs_settings:{path:"",host:""}},l=i.object({tls:i.string(),network:i.string(),network_settings:i.string().optional(),tls_settings:i.object({server_name:i.string(),allow_insecure:i.boolean()}).optional()}),c={tls:"0",network:"tcp",network_settings:"",tls_settings:{server_name:"",allow_insecure:!1}},x=i.object({allow_insecure:i.boolean(),network:i.string(),networkSettings:i.string().optional(),server_name:i.string().optional()}),u={allow_insecure:!1,network:"tcp",networkSettings:"",server_name:""},b=i.object({version:i.string(),obfs:i.object({open:i.boolean(),type:i.string().optional(),password:i.string().optional()}).optional(),tls:i.object({allow_insecure:i.boolean(),server_name:i.string().optional()}).optional(),bandwidth:i.object({up:i.union([i.number(),i.string()]).optional(),down:i.union([i.number(),i.string()]).optional()}),alpn:i.string().optional()}),p={version:"2",obfs:{open:!1,type:"",password:""},tls:{allow_insecure:!1,server_name:""},bandwidth:{up:"",down:""},alpn:"hysteria"},y=i.object({tls:i.string(),network:i.string(),network_settings:i.string().optional(),flow:i.string().optional(),tls_settings:i.object({server_name:i.string().optional(),allow_insecure:i.boolean()}),reality_settings:i.object({dest:i.string(),allow_insecure:i.boolean(),public_key:i.string().optional(),private_key:i.string().optional(),short_id:i.string().optional()}).optional()}),_={tls:"0",network:"tcp",network_settings:"",flow:"",tls_settings:{server_name:"",allow_insecure:!1},reality_settings:{dest:"",allow_insecure:!1,public_key:"",private_key:"",short_id:""}},D=()=>{let d,N;switch(s){case"shadowsocks":d=n,N=r;break;case"vmess":d=l,N=c;break;case"trojan":d=x,N=u;break;case"hysteria":d=b,N=p;break;case"vless":d=y,N=_;break}return{formSchema:d,initialValues:N}},{formSchema:F,initialValues:T}=D(),m=Z({resolver:Q(F),defaultValues:JSON.stringify(t)!=="{}"?t:T,mode:"onChange"});return o.useEffect(()=>{if(JSON.stringify(t)==="{}"){const{initialValues:d}=D();m.reset(d),a(d)}},[s]),o.useEffect(()=>{a(m.getValues())},[]),m.watch(d=>a(d)),e.jsxs(e.Fragment,{children:[s==="shadowsocks"&&e.jsxs(e.Fragment,{children:[e.jsx(j,{control:m.control,name:"cipher",render:({field:d})=>e.jsxs(h,{children:[e.jsx(g,{children:"加密算法"}),e.jsx("div",{className:"relative w-full",children:e.jsx(v,{children:e.jsxs(B,{onValueChange:d.onChange,defaultValue:d.value,children:[e.jsx(U,{children:e.jsx(Y,{placeholder:"选择加密算法"})}),e.jsx(q,{children:e.jsx(rs,{children:["aes-128-gcm","aes-192-gcm","aes-256-gcm","chacha20-ietf-poly1305","2022-blake3-aes-128-gcm","2022-blake3-aes-256-gcm"].map(N=>e.jsx(O,{value:N,children:N},N))})})]})})})]})}),e.jsx(j,{control:m.control,name:"obfs",render:({field:d})=>e.jsxs(h,{children:[e.jsx(g,{children:" 混淆 "}),e.jsx("div",{className:"relative w-full",children:e.jsx(v,{children:e.jsxs(B,{onValueChange:d.onChange,defaultValue:d.value||"0",children:[e.jsx(U,{children:e.jsx(Y,{placeholder:"选择混淆方式"})}),e.jsx(q,{children:e.jsxs(rs,{children:[e.jsx(O,{value:"0",children:"无"}),e.jsx(O,{value:"http",children:"HTTP"})]})})]})})})]})}),m.watch("obfs")=="http"&&e.jsxs("div",{className:"flex gap-2",children:[e.jsx(j,{control:m.control,name:"obfs_settings.path",render:({field:d})=>e.jsxs(h,{className:"flex-[1]",children:[e.jsx("div",{className:"relative ",children:e.jsx(v,{children:e.jsx(C,{type:"text",placeholder:"路径",...d})})}),e.jsx(S,{})]})}),e.jsx(j,{control:m.control,name:"obfs_settings.host",render:({field:d})=>e.jsxs(h,{className:"flex-[2]",children:[e.jsx("div",{className:"relative flex ",children:e.jsx(v,{children:e.jsx(C,{type:"text",placeholder:"Host",...d})})}),e.jsx(S,{})]})})]})]}),s==="vmess"&&e.jsxs(e.Fragment,{children:[e.jsx(j,{control:m.control,name:"tls",render:({field:d})=>e.jsxs(h,{children:[e.jsx(g,{children:"TLS"}),e.jsx("div",{className:"",children:e.jsx(v,{children:e.jsxs(B,{value:d.value,onValueChange:d.onChange,children:[e.jsx(U,{children:e.jsx(Y,{placeholder:"请选择安全性"})}),e.jsxs(q,{children:[e.jsx(O,{value:"0",children:"不支持"}),e.jsx(O,{value:"1",children:"支持"})]})]})})})]})}),m.watch("tls")=="1"&&e.jsxs("div",{className:"flex gap-2",children:[e.jsx(j,{control:m.control,name:"tls_settings.server_name",render:({field:d})=>e.jsxs(h,{className:"flex-[2]",children:[e.jsx(g,{children:"服务器名称指示(SNI)"}),e.jsx("div",{className:"relative w-full",children:e.jsx(v,{children:e.jsx(C,{placeholder:"不使用请留空",...d})})})]})}),e.jsx(j,{control:m.control,name:"tls_settings.allow_insecure",render:({field:d})=>e.jsxs(h,{className:"",children:[e.jsx(g,{children:"允许不安全?"}),e.jsx("div",{className:"py-2 text-center",children:e.jsx(v,{children:e.jsx(L,{onCheckedChange:d.onChange,checked:d.value})})})]})})]}),e.jsx(j,{control:m.control,name:"network",render:({field:d})=>e.jsxs(h,{children:[e.jsxs(g,{children:["传输协议",e.jsx(kt,{state:m.getValues("network_settings"),setState:N=>m.setValue("network_settings",N),templateType:m.getValues("network")})]}),e.jsx("div",{className:"relative w-full",children:e.jsx(v,{children:e.jsxs(B,{onValueChange:d.onChange,defaultValue:d.value,children:[e.jsx(U,{children:e.jsx(Y,{placeholder:"选择传输协议"})}),e.jsx(q,{children:e.jsx(rs,{children:[{value:"tcp",label:"TCP"},{value:"ws",label:"Websocket"},{value:"grpc",label:"gRPC"}].map(N=>e.jsx(O,{value:N.value,className:"cursor-pointer",children:N.label},N.value))})})]})})})]})})]}),s==="trojan"&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex gap-2",children:[e.jsx(j,{control:m.control,name:"server_name",render:({field:d})=>e.jsxs(h,{className:"flex-[2]",children:[e.jsx(g,{className:"leading-loose",children:"服务器名称指示(SNI)"}),e.jsx("div",{className:"relative w-full",children:e.jsx(v,{children:e.jsx(C,{placeholder:"当节点地址于证书不一致时用于证书验证",...d})})})]})}),e.jsx(j,{control:m.control,name:"allow_insecure",render:({field:d})=>e.jsxs(h,{className:"flex flex-col",children:[e.jsx(g,{className:"leading-loose",children:"允许不安全?"}),e.jsx("div",{className:"flex flex-[1] items-center justify-center",children:e.jsx(v,{children:e.jsx(L,{onCheckedChange:d.onChange,checked:d.value})})})]})})]}),e.jsx(j,{control:m.control,name:"network",render:({field:d})=>e.jsxs(h,{children:[e.jsxs(g,{children:["传输协议",e.jsx(kt,{state:m.getValues("network_settings"),setState:N=>m.setValue("network_settings",N),templateType:m.getValues("network")})]}),e.jsx("div",{className:"relative w-full",children:e.jsx(v,{children:e.jsxs(B,{onValueChange:d.onChange,defaultValue:d.value,children:[e.jsx(U,{children:e.jsx(Y,{placeholder:"选择传输协议"})}),e.jsx(q,{children:e.jsx(rs,{children:[{value:"tcp",label:"TCP"},{value:"ws",label:"Websocket"},{value:"grpc",label:"gRPC"}].map(N=>e.jsx(O,{value:N.value,className:"cursor-pointer",children:N.label},N.value))})})]})})})]})})]}),s==="hysteria"&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex gap-2",children:[e.jsx(j,{control:m.control,name:"version",render:({field:d})=>e.jsxs(h,{className:"flex-[1]",children:[e.jsx(g,{children:"协议版本"}),e.jsx(v,{children:e.jsxs(B,{value:d.value,onValueChange:d.onChange,children:[e.jsx(U,{children:e.jsx(Y,{placeholder:"协议版本"})}),e.jsx(q,{children:e.jsxs(rs,{children:[e.jsx(O,{value:"1",className:"cursor-pointer",children:"V1"}),e.jsx(O,{value:"2",className:"cursor-pointer",children:"V2"})]})})]})})]})}),m.watch("version")==="1"&&e.jsx(j,{control:m.control,name:"alpn",render:({field:d})=>e.jsxs(h,{className:"flex-[2]",children:[e.jsx(g,{children:"ALPN"}),e.jsx(v,{children:e.jsxs(B,{value:d.value,onValueChange:d.onChange,children:[e.jsx(U,{children:e.jsx(Y,{placeholder:"ALPN"})}),e.jsx(q,{children:e.jsxs(rs,{children:[e.jsx(O,{value:"hysteria",children:"hysteria"}),e.jsx(O,{value:"http/1.1",children:"http/1.1"}),e.jsx(O,{value:"h2",children:"h2"}),e.jsx(O,{value:"h3",children:"h3"})]})})]})})]})})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(j,{control:m.control,name:"obfs.open",render:({field:d})=>e.jsxs(h,{children:[e.jsx(g,{children:"混淆"}),e.jsx("div",{className:"py-2 text-center",children:e.jsx(v,{children:e.jsx(L,{checked:d.value,onCheckedChange:d.onChange})})})]})}),m.watch("obfs.open")==!0&&e.jsxs(e.Fragment,{children:[m.watch("version")=="2"&&e.jsx(j,{control:m.control,name:"obfs.type",render:({field:d})=>e.jsxs(h,{className:"flex-[1] ",children:[e.jsx(g,{children:"混淆实现"}),e.jsx(v,{children:e.jsxs(B,{value:d.value,onValueChange:d.onChange,children:[e.jsx(U,{children:e.jsx(Y,{placeholder:"选择混淆实现"})}),e.jsx(q,{children:e.jsx(rs,{children:e.jsx(O,{value:"salamander",children:"Salamander"})})})]})})]})}),e.jsx(j,{control:m.control,name:"obfs.password",render:({field:d})=>e.jsxs(h,{className:"flex-[2]",children:[e.jsx(g,{children:"混淆密码"}),e.jsx(v,{children:e.jsx(C,{placeholder:"请输入混淆密码",...d})})]})})]})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(j,{control:m.control,name:"tls.server_name",render:({field:d})=>e.jsxs(h,{className:"flex-[2]",children:[e.jsx(g,{children:"服务器名称指示(SNI)"}),e.jsx("div",{className:"relative w-full",children:e.jsx(v,{children:e.jsx(C,{placeholder:"当节点地址于证书不一致时用于证书验证",...d})})})]})}),e.jsx(j,{control:m.control,name:"tls.allow_insecure",render:({field:d})=>e.jsxs(h,{className:"",children:[e.jsx(g,{children:"允许不安全?"}),e.jsx("div",{className:"py-2 text-center",children:e.jsx(v,{children:e.jsx(L,{className:"",onCheckedChange:d.onChange,checked:d.value})})})]})})]}),e.jsx(j,{control:m.control,name:"bandwidth.up",render:({field:d})=>e.jsxs(h,{children:[e.jsx(g,{children:"上行宽带"}),e.jsxs("div",{className:"relative flex",children:[e.jsx(v,{children:e.jsx(C,{type:"number",placeholder:"请输入上行宽带"+(m.watch("version")==="2"?",留空则使用BBR":""),className:"rounded-br-none rounded-tr-none",...d})}),e.jsx("div",{className:"pointer-events-none z-[-1] flex items-center rounded-md rounded-bl-none rounded-tl-none border border-l-0 border-input px-3 shadow-sm",children:e.jsx("span",{className:"text-gray-500",children:"Mbps"})})]})]})}),e.jsx(j,{control:m.control,name:"bandwidth.down",render:({field:d})=>e.jsxs(h,{children:[e.jsx(g,{children:"下行宽带"}),e.jsxs("div",{className:"relative flex",children:[e.jsx(v,{children:e.jsx(C,{type:"number",placeholder:"请输入下行宽带"+(m.watch("version")==="2"?",留空则使用BBR":""),className:"rounded-br-none rounded-tr-none",...d})}),e.jsx("div",{className:"pointer-events-none z-[-1] flex items-center rounded-md rounded-bl-none rounded-tl-none border border-l-0 border-input px-3 shadow-sm",children:e.jsx("span",{className:"text-gray-500",children:"Mbps"})})]})]})})]}),s==="vless"&&e.jsxs(e.Fragment,{children:[e.jsx(j,{control:m.control,name:"tls",render:({field:d})=>e.jsxs(h,{children:[e.jsx(g,{children:"安全性"}),e.jsxs("div",{className:"",children:[e.jsx(v,{children:e.jsxs(B,{value:d.value.toString(),onValueChange:d.onChange,children:[e.jsx(U,{children:e.jsx(Y,{placeholder:"请选择安全性"})}),e.jsxs(q,{children:[e.jsx(O,{value:"0",children:"无"}),e.jsx(O,{value:"1",children:"TLS"}),e.jsx(O,{value:"2",children:"Reality"})]})]})}),e.jsx(S,{})]})]})}),m.watch("tls")=="1"&&e.jsxs("div",{className:"flex gap-2",children:[e.jsx(j,{control:m.control,name:"tls_settings.server_name",render:({field:d})=>e.jsxs(h,{className:"flex-[2]",children:[e.jsx(g,{children:"服务器名称指示(SNI)"}),e.jsx("div",{className:"relative w-full",children:e.jsx(v,{children:e.jsx(C,{placeholder:"不使用请留空",...d})})})]})}),e.jsx(j,{control:m.control,name:"tls_settings.allow_insecure",render:({field:d})=>e.jsxs(h,{className:"",children:[e.jsx(g,{children:"允许不安全?"}),e.jsx("div",{className:"py-2 text-center",children:e.jsx(v,{children:e.jsx(L,{onCheckedChange:d.onChange,checked:d.value})})})]})})]}),m.watch("tls")=="2"&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex gap-2",children:[e.jsx(j,{control:m.control,name:"reality_settings.dest",render:({field:d})=>e.jsxs(h,{className:"flex-[2]",children:[e.jsx(g,{children:"伪装站点(dest)"}),e.jsx("div",{className:"relative w-full",children:e.jsx(v,{children:e.jsx(C,{placeholder:"例如:example.com:443",...d})})})]})}),e.jsx(j,{control:m.control,name:"reality_settings.allow_insecure",render:({field:d})=>e.jsxs(h,{className:"",children:[e.jsx(g,{children:"允许不安全?"}),e.jsx("div",{className:"py-2 text-center",children:e.jsx(v,{children:e.jsx(L,{onCheckedChange:d.onChange,checked:d.value})})})]})})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(j,{control:m.control,name:"reality_settings.private_key",render:({field:d})=>e.jsxs(h,{className:"flex-1",children:[e.jsx(g,{children:"私钥(Private key)"}),e.jsx(v,{children:e.jsx(C,{...d})})]})}),e.jsx(A,{type:"button",variant:"outline",className:"self-end",onClick:()=>{const d=Pi(),N=btoa(String.fromCharCode.apply(null,Array.from(d.secretKey))).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,""),w=btoa(String.fromCharCode.apply(null,Array.from(d.publicKey))).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,""),E=Array.from(Vi(8)).map(H=>H.toString(16).padStart(2,"0")).join("");m.setValue("reality_settings.private_key",N),m.setValue("reality_settings.public_key",w),m.setValue("reality_settings.short_id",E)},children:"生成密钥"})]}),e.jsx(j,{control:m.control,name:"reality_settings.public_key",render:({field:d})=>e.jsxs(h,{children:[e.jsx(g,{children:"公钥(Public key)"}),e.jsx(v,{children:e.jsx(C,{...d})})]})}),e.jsx(j,{control:m.control,name:"reality_settings.short_id",render:({field:d})=>e.jsxs(h,{children:[e.jsx(g,{children:"Short ID"}),e.jsx(v,{children:e.jsx(C,{...d})})]})})]}),e.jsx(j,{control:m.control,name:"network",render:({field:d})=>e.jsxs(h,{children:[e.jsxs(g,{children:["传输协议",e.jsx(kt,{state:m.getValues("network_settings"),setState:N=>m.setValue("network_settings",N),templateType:m.getValues("network")})]}),e.jsx("div",{className:"relative w-full",children:e.jsx(v,{children:e.jsxs(B,{onValueChange:d.onChange,defaultValue:d.value,children:[e.jsx(U,{children:e.jsx(Y,{placeholder:"选择传输协议"})}),e.jsx(q,{children:e.jsx(rs,{children:[{value:"tcp",label:"TCP"},{value:"ws",label:"Websocket"},{value:"grpc",label:"gRPC"}].map(N=>e.jsx(O,{value:N.value,className:"cursor-pointer",children:N.label},N.value))})})]})})})]})}),e.jsx(j,{control:m.control,name:"flow",render:({field:d})=>e.jsxs(h,{children:[e.jsx(g,{children:"XTLS流控算法"}),e.jsx("div",{className:"",children:e.jsx(v,{children:e.jsxs(B,{value:d.value||"none",onValueChange:N=>{d.onChange(N==="none"?"":N)},children:[e.jsx(U,{children:e.jsx(Y,{placeholder:"请选择流控算法"})}),e.jsxs(q,{children:[e.jsx(O,{value:"none",children:"无"}),e.jsx(O,{value:"xtls-rprx-vision",children:"xtls-rprx-vision"})]})]})})})]})})]})]})},pr=o.createContext(void 0);function Rx({children:s,refreshData:t}){const[a,n]=o.useState(!1),[r,l]=o.useState(null),[c,x]=o.useState(me.Shadowsocks);return e.jsx(pr.Provider,{value:{isOpen:a,setIsOpen:n,editingServer:r,setEditingServer:l,serverType:c,setServerType:x,refreshData:t},children:s})}function vr(){const s=o.useContext(pr);if(s===void 0)throw new Error("useServerEdit must be used within a ServerEditProvider");return s}const Ex=i.object({id:i.number().optional().nullable(),code:i.string().optional(),name:i.string().min(1,"Please enter a valid name."),rate:i.string().min(1,"Please enter a valid rate."),tags:i.array(i.string()).default([]),excludes:i.array(i.string()).default([]),ips:i.array(i.string()).default([]),group_ids:i.array(i.string()).default([]),host:i.string().min(1,"Please enter a valid host."),port:i.string().min(1,"Please enter a valid port."),server_port:i.string().min(1,"Please enter a valid server port."),parent_id:i.string().default("0").nullable(),route_ids:i.array(i.string()).default([]),protocol_settings:i.record(i.any()).default({})}),Zs={id:null,code:"",name:"",rate:"1",tags:[],excludes:[],ips:[],group_ids:[],host:"",port:"",server_port:"",parent_id:"0",route_ids:[],protocol_settings:{}};function br(){const{isOpen:s,setIsOpen:t,editingServer:a,setEditingServer:n,serverType:r,setServerType:l,refreshData:c}=vr(),[x,u]=o.useState([]),[b,p]=o.useState([]),[y,_]=o.useState([]),D=Z({resolver:Q(Ex),defaultValues:{...Zs,...a||{}},mode:"onChange"}),F=async()=>{if(!s)return;const[w,E,H]=await Promise.all([pt(),Zn(),Jn()]);u(w.data?.map(je=>({label:je.name,value:je.id.toString()}))||[]),p(E.data?.map(je=>({label:je.remarks,value:je.id.toString()}))||[]),_(H.data||[])},T=o.useMemo(()=>y?.filter(w=>(w.parent_id===0||w.parent_id===null)&&w.type===r&&w.id!==D.watch("id")),[r,y,D]);o.useEffect(()=>{F()},[s]),o.useEffect(()=>{a?D.reset({...Zs,...a}):D.reset(Zs)},[a,D]);const m=()=>{t(!1),n(null),D.reset(Zs)},d=async()=>{try{const w=D.getValues();(await Zo({...w,type:r})).data&&(m(),z.success("提交成功"),c())}catch{z.error("提交失败")}},N=()=>e.jsxs(gs,{children:[e.jsx(fs,{asChild:!0,children:e.jsxs(k,{variant:"outline",size:"sm",className:"space-x-2",children:[e.jsx(Ce,{icon:"ion:add"}),e.jsx("div",{children:"添加节点"})]})}),e.jsx(cs,{align:"start",children:e.jsx(ko,{children:js.map(({type:w,label:E})=>e.jsx(ae,{onClick:()=>{l(w),t(!0)},className:"cursor-pointer",children:e.jsx(M,{variant:"outline",className:"text-white",style:{background:ls[w]},children:E})},w))})})]});return e.jsxs(de,{open:s,onOpenChange:m,children:[N(),e.jsxs(re,{className:"sm:max-w-[425px]",children:[e.jsxs(he,{children:[e.jsx(xe,{children:a?"编辑节点":"新建节点"}),e.jsx(Ve,{})]}),e.jsxs(ee,{...D,children:[e.jsxs("div",{className:"grid gap-4",children:[e.jsxs("div",{className:"flex gap-2",children:[e.jsx(j,{control:D.control,name:"name",render:({field:w})=>e.jsxs(h,{className:"flex-[2]",children:[e.jsx(g,{children:"节点名称"}),e.jsx(v,{children:e.jsx(C,{placeholder:"请输入节点名称",...w})}),e.jsx(S,{})]})}),e.jsx(j,{control:D.control,name:"rate",render:({field:w})=>e.jsxs(h,{className:"flex-[1]",children:[e.jsx(g,{children:"倍率"}),e.jsx("div",{className:"relative flex",children:e.jsx(v,{children:e.jsx(C,{type:"number",min:"0",step:"0.1",...w})})}),e.jsx(S,{})]})})]}),e.jsx(j,{control:D.control,name:"code",render:({field:w})=>e.jsxs(h,{children:[e.jsxs(g,{children:["节点代码",e.jsx("span",{className:"ml-1 text-xs text-muted-foreground",children:"(选填)"})]}),e.jsx(v,{children:e.jsx(C,{placeholder:"请输入节点唯一标识符",...w,value:w.value||""})}),e.jsx(S,{})]})}),e.jsx(j,{control:D.control,name:"tags",render:({field:w})=>e.jsxs(h,{children:[e.jsx(g,{children:"节点标签"}),e.jsx(v,{children:e.jsx(Qt,{value:w.value,onChange:w.onChange,placeholder:"输入后回车添加标签",className:"w-full"})}),e.jsx(S,{})]})}),e.jsx(j,{control:D.control,name:"group_ids",render:({field:w})=>e.jsxs(h,{children:[e.jsxs(g,{className:"flex items-center justify-between",children:["权限组",e.jsx(bt,{dialogTrigger:e.jsx(k,{variant:"link",children:"添加权限组"}),refetch:F})]}),e.jsx(v,{children:e.jsx(Hs,{options:x,onChange:E=>w.onChange(E.map(H=>H.value)),value:x?.filter(E=>w.value.includes(E.value)),placeholder:"请选择权限组",emptyIndicator:e.jsx("p",{className:"text-center text-lg leading-10 text-gray-600 dark:text-gray-400",children:"no results found."})})}),e.jsx(S,{})]})}),e.jsxs("div",{className:"space-y-4",children:[e.jsx(j,{control:D.control,name:"host",render:({field:w})=>e.jsxs(h,{children:[e.jsx(g,{children:"节点地址"}),e.jsx(v,{children:e.jsx(C,{placeholder:"请输入节点域名或者IP",...w})}),e.jsx(S,{})]})}),e.jsxs("div",{className:"flex space-x-2",children:[e.jsx(j,{control:D.control,name:"port",render:({field:w})=>e.jsxs(h,{className:"flex-1",children:[e.jsxs(g,{className:"flex items-center gap-1.5",children:["连接端口",e.jsx(ue,{delayDuration:100,children:e.jsxs(oe,{children:[e.jsx(ce,{asChild:!0,children:e.jsx(Ce,{icon:"ph:info-light",className:"size-3.5 cursor-help text-muted-foreground"})}),e.jsx(ne,{side:"top",className:"max-w-80 p-3",children:e.jsx("p",{children:"用户实际连接使用的端口,这是客户端配置中需要填写的端口号。如果使用了中转或隧道,这个端口可能与服务器实际监听的端口不同。"})})]})})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(v,{children:e.jsx(C,{placeholder:"用户连接端口",...w})}),e.jsx(ue,{delayDuration:100,children:e.jsxs(oe,{children:[e.jsx(ce,{asChild:!0,children:e.jsx(k,{type:"button",variant:"ghost",size:"icon",className:"size-6 shrink-0 text-muted-foreground/50 hover:text-muted-foreground",onClick:()=>{const E=w.value;E&&D.setValue("server_port",E)},children:e.jsx(Ce,{icon:"tabler:arrows-right",className:"size-3"})})}),e.jsx(ne,{side:"right",children:e.jsx("p",{children:"同步到服务端口"})})]})})]}),e.jsx(S,{})]})}),e.jsx(j,{control:D.control,name:"server_port",render:({field:w})=>e.jsxs(h,{className:"flex-1",children:[e.jsxs(g,{className:"flex items-center gap-1.5",children:["服务端口",e.jsx(ue,{delayDuration:100,children:e.jsxs(oe,{children:[e.jsx(ce,{asChild:!0,children:e.jsx(Ce,{icon:"ph:info-light",className:"size-3.5 cursor-help text-muted-foreground"})}),e.jsx(ne,{side:"top",className:"max-w-80 p-3",children:e.jsx("p",{children:"服务器实际监听的端口,这是在服务器上开放的真实端口。如果使用了中转或隧道,这个端口可能与用户连接端口不同。"})})]})})]}),e.jsx(v,{children:e.jsx(C,{placeholder:"服务端开放端口",...w})}),e.jsx(S,{})]})})]})]}),e.jsx(zx,{serverType:r,setState:w=>D.setValue("protocol_settings",w),state:D.getValues("protocol_settings")}),e.jsx(j,{control:D.control,name:"parent_id",render:({field:w})=>e.jsxs(h,{children:[e.jsx(g,{children:"父节点"}),e.jsxs(B,{onValueChange:w.onChange,value:w.value||"0",children:[e.jsx(v,{children:e.jsx(U,{children:e.jsx(Y,{placeholder:"选择父节点"})})}),e.jsxs(q,{children:[e.jsx(O,{value:"0",children:"无"}),T?.map(E=>e.jsx(O,{value:E.id.toString(),className:"cursor-pointer",children:E.name},E.id))]})]}),e.jsx(S,{})]})}),e.jsx(j,{control:D.control,name:"route_ids",render:({field:w})=>e.jsxs(h,{children:[e.jsx(g,{children:"路由组"}),e.jsx(v,{children:e.jsx(Hs,{options:b,onChange:E=>w.onChange(E.map(H=>H.value)),value:b?.filter(E=>w.value.includes(E.value)),placeholder:"选择路由组",emptyIndicator:e.jsx("p",{className:"text-center text-lg leading-10 text-gray-600 dark:text-gray-400",children:"no results found."})})}),e.jsx(S,{})]})})]}),e.jsxs(ke,{className:"mt-6",children:[e.jsx(k,{type:"button",variant:"outline",onClick:m,children:"取消"}),e.jsx(k,{type:"submit",onClick:d,children:"提交"})]})]})]})]})}function _a({column:s,title:t,options:a}){const n=s?.getFacetedUniqueValues(),r=new Set(s?.getFilterValue());return e.jsxs(Ue,{children:[e.jsx(qe,{asChild:!0,children:e.jsxs(k,{variant:"outline",size:"sm",className:"h-8 border-dashed",children:[e.jsx(Fs,{className:"mr-2 h-4 w-4"}),t,r?.size>0&&e.jsxs(e.Fragment,{children:[e.jsx(se,{orientation:"vertical",className:"mx-2 h-4"}),e.jsx(M,{variant:"secondary",className:"rounded-sm px-1 font-normal lg:hidden",children:r.size}),e.jsx("div",{className:"hidden space-x-1 lg:flex",children:r.size>2?e.jsxs(M,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:[r.size," selected"]}):a.filter(l=>r.has(l.value)).map(l=>e.jsx(M,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:l.label},l.value))})]})]})}),e.jsx(Le,{className:"w-[200px] p-0",align:"start",children:e.jsxs(Qe,{children:[e.jsx(xs,{placeholder:t}),e.jsxs(es,{children:[e.jsx(ms,{children:"No results found."}),e.jsx(pe,{children:a.map(l=>{const c=r.has(l.value);return e.jsxs(ie,{onSelect:()=>{c?r.delete(l.value):r.add(l.value);const x=Array.from(r);s?.setFilterValue(x.length?x:void 0)},className:"cursor-pointer",children:[e.jsx("div",{className:f("mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary",c?"bg-primary text-primary-foreground":"opacity-50 [&_svg]:invisible"),children:e.jsx(ds,{className:f("h-4 w-4")})}),l.icon&&e.jsx(l.icon,{className:`mr-2 h-4 w-4 text-muted-foreground text-${l.color}`}),e.jsx("span",{children:l.label}),n?.get(l.value)&&e.jsx("span",{className:"ml-auto flex h-4 w-4 items-center justify-center font-mono text-xs",children:n.get(l.value)})]},l.value)})}),r.size>0&&e.jsxs(e.Fragment,{children:[e.jsx(ys,{}),e.jsx(pe,{children:e.jsx(ie,{onSelect:()=>s?.setFilterValue(void 0),className:"justify-center text-center cursor-pointer",children:"Clear filters"})})]})]})]})})]})}const Mx=[{value:me.Shadowsocks,label:js.find(s=>s.type===me.Shadowsocks)?.label,color:ls[me.Shadowsocks]},{value:me.Vmess,label:js.find(s=>s.type===me.Vmess)?.label,color:ls[me.Vmess]},{value:me.Trojan,label:js.find(s=>s.type===me.Trojan)?.label,color:ls[me.Trojan]},{value:me.Hysteria,label:js.find(s=>s.type===me.Hysteria)?.label,color:ls[me.Hysteria]},{value:me.Vless,label:js.find(s=>s.type===me.Vless)?.label,color:ls[me.Vless]}];function Ox({table:s,refetch:t,saveOrder:a,isSortMode:n,groups:r}){const l=s.getState().columnFilters.length>0,c=r.map(x=>({label:x,value:x}));return e.jsxs("div",{className:"flex items-center justify-between ",children:[e.jsxs("div",{className:"flex flex-1 flex-col-reverse items-start gap-y-2 sm:flex-row sm:items-center sm:space-x-2",children:[!n&&e.jsxs(e.Fragment,{children:[e.jsx(br,{refetch:t}),e.jsx(C,{placeholder:"搜索节点...",value:s.getColumn("name")?.getFilterValue()??"",onChange:x=>s.getColumn("name")?.setFilterValue(x.target.value),className:"h-8 w-[150px] lg:w-[250px]"}),e.jsxs("div",{className:"flex gap-x-2",children:[s.getColumn("type")&&e.jsx(_a,{column:s.getColumn("type"),title:"类型",options:Mx}),s.getColumn("groups")&&e.jsx(_a,{column:s.getColumn("groups"),title:"权限组",options:c})]}),l&&e.jsxs(k,{variant:"ghost",onClick:()=>s.resetColumnFilters(),className:"h-8 px-2 lg:px-3",children:["重置",e.jsx(Re,{className:"ml-2 h-4 w-4"})]})]}),n&&e.jsx("div",{className:"flex items-center space-x-2",children:e.jsx("p",{className:"text-sm text-muted-foreground",children:"拖拽节点进行排序,完成后点击保存"})})]}),e.jsx("div",{children:e.jsx(k,{size:"sm",variant:n?"default":"outline",className:"ml-auto hidden h-8 lg:flex",onClick:a,children:n?"保存排序":"编辑排序"})})]})}const Ks=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M15.71 12.71a6 6 0 1 0-7.42 0a10 10 0 0 0-6.22 8.18a1 1 0 0 0 2 .22a8 8 0 0 1 15.9 0a1 1 0 0 0 1 .89h.11a1 1 0 0 0 .88-1.1a10 10 0 0 0-6.25-8.19M12 12a4 4 0 1 1 4-4a4 4 0 0 1-4 4"})}),Xs={0:"bg-destructive/80 shadow-sm shadow-destructive/50",1:"bg-yellow-500/80 shadow-sm shadow-yellow-500/50",2:"bg-emerald-500/80 shadow-sm shadow-emerald-500/50"},Qs={0:"未运行",1:"异常",2:"正常"},Lx=s=>[{id:"drag-handle",header:({column:t})=>e.jsx(V,{column:t,title:"排序"}),cell:()=>e.jsx("div",{className:"flex items-center justify-center",children:e.jsx(ht,{className:"size-4 cursor-move text-muted-foreground transition-colors hover:text-primary","aria-hidden":"true"})}),size:50},{accessorKey:"id",header:({column:t})=>e.jsx(V,{column:t,title:"节点ID"}),cell:({row:t})=>{const a=t.getValue("id"),n=t.original.code;return e.jsx(ue,{delayDuration:100,children:e.jsxs(oe,{children:[e.jsx(ce,{asChild:!0,children:e.jsxs("div",{className:"group/id flex items-center space-x-2",children:[e.jsxs(M,{variant:"outline",className:f("border-2 font-medium transition-all duration-200 hover:opacity-80","flex items-center gap-1.5"),style:{borderColor:ls[t.original.type]},children:[e.jsx(vn,{className:"size-3"}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsxs("span",{className:"flex items-center gap-0.5",children:[a,n&&e.jsxs("span",{className:"cursor-copy text-[0.7rem] text-muted-foreground/50",onClick:r=>{r.stopPropagation(),tt(n),z.success("已复制节点代码")},children:["(",n,")"]})]}),t.original.parent_id?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-sm text-muted-foreground/30",children:"→"}),e.jsx("span",{children:t.original.parent_id})]}):""]})]}),e.jsx(k,{variant:"ghost",size:"icon",className:"size-5 text-muted-foreground/40 opacity-0 transition-all duration-200 hover:text-muted-foreground group-hover/id:opacity-100",onClick:r=>{r.stopPropagation(),tt(n||a.toString()),z.success(n?"已复制节点代码":"已复制节点ID")},children:e.jsx(ha,{className:"size-3"})})]})}),e.jsxs(ne,{side:"top",className:"flex flex-col gap-1 p-3",children:[e.jsxs("p",{className:"font-medium",children:[js.find(r=>r.type===t.original.type)?.label,t.original.parent_id?" (子节点)":""]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:n?"点击括号内容或复制按钮可复制节点代码":"点击复制按钮可复制节点ID"})]})]})})},size:200,enableSorting:!0},{accessorKey:"show",header:({column:t})=>e.jsx(V,{column:t,title:"显示"}),cell:({row:t})=>e.jsx(L,{defaultChecked:t.getValue("show"),onCheckedChange:async a=>{ec({id:t.original.id,type:t.original.type,show:a?1:0}).catch(()=>{s()})},className:"data-[state=checked]:bg-primary"}),size:50,enableSorting:!1},{accessorKey:"name",header:({column:t})=>e.jsx("div",{className:"flex items-center",children:e.jsx(V,{column:t,title:"节点",tooltip:e.jsxs("div",{className:"grid grid-cols-1 gap-3 p-2",children:[e.jsxs("div",{className:"flex items-center space-x-2.5",children:[e.jsx("span",{className:f("h-2.5 w-2.5 rounded-full",Xs[0])}),e.jsx("span",{className:"text-sm font-medium",children:Qs[0]})]}),e.jsxs("div",{className:"flex items-center space-x-2.5",children:[e.jsx("span",{className:f("h-2.5 w-2.5 rounded-full",Xs[1])}),e.jsx("span",{className:"text-sm font-medium",children:Qs[1]})]}),e.jsxs("div",{className:"flex items-center space-x-2.5",children:[e.jsx("span",{className:f("h-2.5 w-2.5 rounded-full",Xs[2])}),e.jsx("span",{className:"text-sm font-medium",children:Qs[2]})]})]})})}),cell:({row:t})=>e.jsx(ue,{delayDuration:100,children:e.jsxs(oe,{children:[e.jsx(ce,{children:e.jsxs("div",{className:"flex items-center space-x-2.5",children:[e.jsx("span",{className:f("h-2.5 w-2.5 rounded-full transition-all duration-200",Xs[t.original.available_status])}),e.jsx("span",{className:"text-left font-medium transition-colors hover:text-primary",children:t.getValue("name")})]})}),e.jsx(ne,{children:e.jsx("p",{className:"font-medium",children:Qs[t.original.available_status]})})]})}),enableSorting:!1,size:t=>t.getState().columnVisibility["drag-handle"]?2e3:200},{accessorKey:"host",header:({column:t})=>e.jsx(V,{column:t,title:"地址"}),cell:({row:t})=>{const a=`${t.original.host}:${t.original.port}`,n=t.original.port!==t.original.server_port;return e.jsxs("div",{className:"group relative flex min-w-0 items-start",children:[e.jsxs("div",{className:"flex min-w-0 flex-wrap items-baseline gap-x-1 gap-y-0.5 pr-7",children:[e.jsx("div",{className:"flex items-center ",children:e.jsxs("span",{className:"font-mono text-sm font-medium text-foreground/90",children:[t.original.host,":",t.original.port]})}),n&&e.jsxs("span",{className:"whitespace-nowrap text-[0.7rem] tracking-tight text-muted-foreground/40",children:["(内部端口 ",t.original.server_port,")"]})]}),e.jsx("div",{className:"absolute right-0 top-0",children:e.jsx(ue,{delayDuration:0,children:e.jsxs(oe,{children:[e.jsx(ce,{asChild:!0,children:e.jsx(k,{variant:"ghost",size:"icon",className:"size-6 text-muted-foreground/40 opacity-0 transition-all duration-200 hover:bg-muted/50 hover:text-muted-foreground group-hover:opacity-100",onClick:r=>{r.stopPropagation(),tt(a)},children:e.jsx(ha,{className:"size-3"})})}),e.jsx(ne,{side:"top",sideOffset:10,children:"复制连接地址"})]})})})]})},enableSorting:!1,enableHiding:!0},{accessorKey:"online",header:({column:t})=>e.jsx(V,{column:t,title:"在线人数",tooltip:"在线人数根据服务端上报频率而定"}),cell:({row:t})=>e.jsxs("div",{className:"flex items-center space-x-2 px-4",children:[e.jsx(Ks,{className:"size-4"}),e.jsx("span",{className:"font-medium",children:t.getValue("online")})]}),size:80,enableSorting:!0,enableHiding:!0},{accessorKey:"rate",header:({column:t})=>e.jsx(V,{column:t,title:"倍率",tooltip:"流量扣费倍率"}),cell:({row:t})=>e.jsxs(M,{variant:"secondary",className:"font-medium",children:[t.getValue("rate")," x"]}),size:80,enableSorting:!1,enableHiding:!0},{accessorKey:"groups",header:({column:t})=>e.jsx(V,{column:t,title:"权限组",tooltip:"可订阅到该节点的权限组"}),cell:({row:t})=>{const a=t.getValue("groups")||[];return e.jsx("div",{className:"flex max-w-[600px] flex-wrap items-center gap-1.5",children:a.length>0?a.map((n,r)=>e.jsx(M,{variant:"secondary",className:f("px-2 py-0.5 font-medium","bg-secondary/50 hover:bg-secondary/70","border border-border/50","transition-all duration-200","cursor-default select-none","flex items-center gap-1.5"),children:n.name},r)):e.jsx("span",{className:"text-sm text-muted-foreground",children:"--"})})},enableSorting:!1,size:600,filterFn:(t,a,n)=>{const r=t.getValue(a);return r?n.some(l=>r.includes(l)):!1}},{accessorKey:"type",header:({column:t})=>e.jsx(V,{column:t,title:"类型"}),cell:({row:t})=>{const a=t.getValue("type");return e.jsx(M,{variant:"outline",className:"border-2 font-medium transition-colors",style:{borderColor:ls[a]},children:a})},enableSorting:!1,enableHiding:!0,enableColumnFilter:!1,size:8e3},{id:"actions",header:({column:t})=>e.jsx(V,{className:"justify-end",column:t,title:"操作"}),cell:({row:t})=>{const{setIsOpen:a,setEditingServer:n,setServerType:r}=vr();return e.jsx("div",{className:"flex justify-center",children:e.jsxs(gs,{modal:!1,children:[e.jsx(fs,{asChild:!0,children:e.jsx(k,{variant:"ghost",className:"h-8 w-8 p-0 hover:bg-muted","aria-label":"打开操作菜单",children:e.jsx(lt,{className:"size-4"})})}),e.jsxs(cs,{align:"end",className:"w-40",children:[e.jsx(ae,{className:"cursor-pointer",onClick:()=>{r(t.original.type),n({...t.original,rate:t.original.rate.toString(),parent_id:t.original.parent_id?.toString()??null}),a(!0)},children:e.jsxs("div",{className:"flex w-full items-center",children:[e.jsx(Ii,{className:"mr-2 size-4"}),"编辑"]})}),e.jsxs(ae,{className:"cursor-pointer",onClick:async()=>{try{await Qo({id:t.original.id}),z.success("复制成功"),s()}catch{z.error("复制失败")}},children:[e.jsx(zi,{className:"mr-2 size-4"}),"复制"]}),e.jsx(As,{}),e.jsx(ae,{className:"cursor-pointer text-destructive focus:text-destructive",onSelect:l=>l.preventDefault(),children:e.jsx(Ae,{title:"确认删除",description:"此操作将永久删除该节点,删除后无法恢复。确定要继续吗?",confirmText:"删除",variant:"destructive",onConfirm:async()=>{Xo({id:t.original.id}).then(({data:l})=>{l&&(z.success("删除成功"),s())})},children:e.jsxs("div",{className:"flex w-full items-center",children:[e.jsx(Je,{className:"mr-2 size-4"}),"删除"]})})})]})]})})},size:50}];function $x(){const[s,t]=o.useState({}),[a,n]=o.useState({"drag-handle":!1}),[r,l]=o.useState([]),[c,x]=o.useState([]),[u,b]=o.useState(!1),[p,y]=o.useState([]),{refetch:_}=G({queryKey:["nodeList"],queryFn:async()=>{const{data:N}=await Jn();return y(N),N}}),D=o.useMemo(()=>{const N=new Set;return p.forEach(w=>{w.groups&&w.groups.forEach(E=>N.add(E.name))}),Array.from(N).sort()},[p]);o.useEffect(()=>{n({"drag-handle":u,show:!u,host:!u,online:!u,rate:!u,groups:!u,type:!1,actions:!u})},[u]);const F=(N,w)=>{u&&(N.dataTransfer.setData("text/plain",w.toString()),N.currentTarget.classList.add("opacity-50"))},T=(N,w)=>{if(!u)return;N.preventDefault(),N.currentTarget.classList.remove("bg-muted");const E=parseInt(N.dataTransfer.getData("text/plain"));if(E===w)return;const H=[...p],[je]=H.splice(E,1);H.splice(w,0,je),y(H)},m=async()=>{if(!u){b(!0);return}try{const N=p?.map(w=>w.id);await sc(N),z.success("排序保存成功"),b(!1),_()}catch{z.error("排序保存失败"),b(!1)}},d=Fe({data:p||[],columns:Lx(_),state:{sorting:c,columnVisibility:a,rowSelection:s,columnFilters:r},enableRowSelection:!0,onRowSelectionChange:t,onSortingChange:x,onColumnFiltersChange:l,onColumnVisibilityChange:n,getCoreRowModel:Pe(),getFilteredRowModel:Ee(),getPaginationRowModel:Me(),getSortedRowModel:Oe(),getFacetedRowModel:Ze(),getFacetedUniqueValues:Xe(),initialState:{columnPinning:{right:["actions"]}},pageCount:u?1:void 0});return e.jsx(Rx,{refreshData:_,children:e.jsxs("div",{className:"space-y-4",children:[e.jsx($e,{table:d,toolbar:N=>e.jsx(Ox,{table:N,refetch:_,saveOrder:m,isSortMode:u,groups:D}),draggable:u,onDragStart:F,onDragEnd:N=>N.currentTarget.classList.remove("opacity-50"),onDragOver:N=>{N.preventDefault(),N.currentTarget.classList.add("bg-muted")},onDragLeave:N=>N.currentTarget.classList.remove("bg-muted"),onDrop:T,showPagination:!u}),e.jsx(br,{})]})})}function Ax(){return e.jsxs(ge,{children:[e.jsxs(fe,{children:[e.jsx(Ne,{}),e.jsxs("div",{className:"ml-auto flex items-center space-x-4",children:[e.jsx(we,{}),e.jsx(_e,{})]})]}),e.jsxs(be,{className:"flex flex-col",fixedHeight:!0,children:[e.jsx("div",{className:"mb-2 flex items-center justify-between space-y-2",children:e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:"节点管理"}),e.jsx("p",{className:"text-muted-foreground mt-2",children:"管理所有节点,包括添加、删除、编辑等操作。"})]})}),e.jsx("div",{className:"-mx-4 flex-1 overflow-auto px-4 py-1 lg:flex-row lg:space-x-12 lg:space-y-0",children:e.jsx($x,{})})]})]})}const Hx=Object.freeze(Object.defineProperty({__proto__:null,default:Ax},Symbol.toStringTag,{value:"Module"}));function Kx({table:s,refetch:t}){const a=s.getState().columnFilters.length>0;return e.jsx("div",{className:"flex items-center justify-between space-x-4",children:e.jsxs("div",{className:"flex flex-1 items-center space-x-2",children:[e.jsx(bt,{refetch:t}),e.jsx(C,{placeholder:"搜索权限组...",value:s.getColumn("name")?.getFilterValue()??"",onChange:n=>s.getColumn("name")?.setFilterValue(n.target.value),className:f("h-8 w-[150px] lg:w-[250px]",a&&"border-primary/50 ring-primary/20")}),a&&e.jsxs(k,{variant:"ghost",onClick:()=>s.resetColumnFilters(),className:"h-8 px-2 lg:px-3",children:["重置",e.jsx(Re,{className:"ml-2 h-4 w-4"})]})]})})}const Gx=s=>[{accessorKey:"id",header:({column:t})=>e.jsx(V,{column:t,title:"组ID"}),cell:({row:t})=>e.jsx("div",{className:"flex items-center space-x-2",children:e.jsx(M,{variant:"outline",children:t.getValue("id")})}),enableSorting:!0},{accessorKey:"name",header:({column:t})=>e.jsx(V,{column:t,title:"组名称"}),cell:({row:t})=>e.jsx("div",{className:"flex space-x-2",children:e.jsx("span",{className:"max-w-32 truncate font-medium",children:t.getValue("name")})})},{accessorKey:"users_count",header:({column:t})=>e.jsx(V,{column:t,title:"用户数量"}),cell:({row:t})=>e.jsxs("div",{className:"flex items-center space-x-2 px-4",children:[e.jsx(Ks,{className:"h-4 w-4"}),e.jsx("span",{className:"font-medium",children:t.getValue("users_count")})]}),enableSorting:!0},{accessorKey:"server_count",header:({column:t})=>e.jsx(V,{column:t,title:"节点数量"}),cell:({row:t})=>e.jsxs("div",{className:"flex items-center space-x-2 px-4",children:[e.jsx(vn,{className:"h-4 w-4"}),e.jsx("span",{className:"font-medium",children:t.getValue("server_count")})]}),enableSorting:!0,size:8e3},{id:"actions",header:({column:t})=>e.jsx(V,{className:"justify-end",column:t,title:"操作"}),cell:({row:t})=>e.jsxs("div",{className:"flex items-center justify-center",children:[e.jsx(bt,{defaultValues:t.original,refetch:s,type:"edit",dialogTrigger:e.jsxs(k,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-muted",children:[e.jsx(bs,{className:"h-4 w-4 text-muted-foreground hover:text-foreground"}),e.jsx("span",{className:"sr-only",children:"编辑"})]})}),e.jsx(Ae,{title:"确认删除",description:"此操作将永久删除该权限组,删除后无法恢复。确定要继续吗?",confirmText:"删除",variant:"destructive",onConfirm:async()=>{ac({id:t.original.id}).then(({data:a})=>{a&&(z.success("删除成功"),s())})},children:e.jsxs(k,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-red-100 dark:hover:bg-red-900",children:[e.jsx(Je,{className:"h-4 w-4 text-muted-foreground hover:text-red-600 dark:hover:text-red-400"}),e.jsx("span",{className:"sr-only",children:"删除"})]})})]})}];function Ux(){const[s,t]=o.useState({}),[a,n]=o.useState({}),[r,l]=o.useState([]),[c,x]=o.useState([]),{data:u,refetch:b,isLoading:p}=G({queryKey:["serverGroupList"],queryFn:async()=>{const{data:_}=await pt();return _}}),y=Fe({data:u||[],columns:Gx(b),state:{sorting:c,columnVisibility:a,rowSelection:s,columnFilters:r},enableRowSelection:!0,onRowSelectionChange:t,onSortingChange:x,onColumnFiltersChange:l,onColumnVisibilityChange:n,getCoreRowModel:Pe(),getFilteredRowModel:Ee(),getPaginationRowModel:Me(),getSortedRowModel:Oe(),getFacetedRowModel:Ze(),getFacetedUniqueValues:Xe(),initialState:{columnPinning:{right:["actions"]}}});return e.jsx($e,{table:y,toolbar:_=>e.jsx(Kx,{table:_,refetch:b}),isLoading:p})}function qx(){return e.jsxs(ge,{children:[e.jsxs(fe,{children:[e.jsx(Ne,{}),e.jsxs("div",{className:"ml-auto flex items-center space-x-4",children:[e.jsx(we,{}),e.jsx(_e,{})]})]}),e.jsxs(be,{className:"flex flex-col",fixedHeight:!0,children:[e.jsx("div",{className:"mb-2 flex items-center justify-between space-y-2",children:e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:"权限组管理"}),e.jsx("p",{className:"mt-2 text-muted-foreground",children:"管理所有权限组,包括添加、删除、编辑等操作。"})]})}),e.jsx("div",{className:"-mx-4 flex-1 overflow-auto px-4 py-1 lg:flex-row lg:space-x-12 lg:space-y-0",children:e.jsx(Ux,{})})]})]})}const Bx=Object.freeze(Object.defineProperty({__proto__:null,default:qx},Symbol.toStringTag,{value:"Module"})),Yx=i.object({remarks:i.string().min(1,"Please enter a valid remarks."),match:i.array(i.string()),action:i.enum(["block","dns"]),action_value:i.string().optional()});function yr({refetch:s,dialogTrigger:t,defaultValues:a={remarks:"",match:[],action:"block",action_value:""},type:n="add"}){const r=Z({resolver:Q(Yx),defaultValues:a,mode:"onChange"}),[l,c]=o.useState(!1);return e.jsxs(de,{open:l,onOpenChange:c,children:[e.jsx(Se,{asChild:!0,children:t||e.jsxs(k,{variant:"outline",size:"sm",className:"space-x-2",children:[e.jsx(Ce,{icon:"ion:add"})," ",e.jsx("div",{children:"添加路由"})]})}),e.jsxs(re,{className:"sm:max-w-[425px]",children:[e.jsxs(he,{children:[e.jsx(xe,{children:n==="edit"?"编辑路由":"创建路由"}),e.jsx(Ve,{})]}),e.jsxs(ee,{...r,children:[e.jsx(j,{control:r.control,name:"remarks",render:({field:x})=>e.jsxs(h,{className:"flex-[2]",children:[e.jsx(g,{children:"备注"}),e.jsx("div",{className:"relative",children:e.jsx(v,{children:e.jsx(C,{type:"text",placeholder:"请输入备注",...x})})}),e.jsx(S,{})]})}),e.jsx(j,{control:r.control,name:"match",render:({field:x})=>e.jsxs(h,{className:"flex-[2]",children:[e.jsx(g,{children:"备注"}),e.jsx("div",{className:"relative",children:e.jsx(v,{children:e.jsx(us,{className:"min-h-[120px]",placeholder:`example.com -*.example.com`,value:x.value.join(` -`),onChange:u=>{x.onChange(u.target.value.split(` -`))}})})}),e.jsx(S,{})]})}),e.jsx(j,{control:r.control,name:"action",render:({field:x})=>e.jsxs(h,{children:[e.jsx(g,{children:"动作"}),e.jsx("div",{className:"relative",children:e.jsx(v,{children:e.jsxs(B,{onValueChange:x.onChange,defaultValue:x.value,children:[e.jsx(U,{children:e.jsx(Y,{placeholder:"请选择动作"})}),e.jsxs(q,{children:[e.jsx(O,{value:"block",children:"禁止访问"}),e.jsx(O,{value:"dns",children:"指定DNS服务器进行解析"})]})]})})}),e.jsx(S,{})]})}),r.watch("action")==="dns"&&e.jsx(j,{control:r.control,name:"action_value",render:({field:x})=>e.jsxs(h,{children:[e.jsx(g,{children:"DNS服务器"}),e.jsx("div",{className:"relative",children:e.jsx(v,{children:e.jsx(C,{type:"text",placeholder:"请输入DNS服务器",...x})})})]})}),e.jsxs(ke,{children:[e.jsx(Gs,{asChild:!0,children:e.jsx(k,{variant:"outline",children:"取消"})}),e.jsx(k,{type:"submit",onClick:()=>{nc(r.getValues()).then(({data:x})=>{x&&(c(!1),s&&s(),r.reset())})},children:"提交"})]})]})]})]})}function Wx({table:s,refetch:t}){const a=s.getState().columnFilters.length>0;return e.jsx("div",{className:"flex items-center justify-between ",children:e.jsxs("div",{className:"flex flex-1 flex-col-reverse items-start gap-y-2 sm:flex-row sm:items-center sm:space-x-2",children:[e.jsx(yr,{refetch:t}),e.jsx(C,{placeholder:"搜索路由...",value:s.getColumn("remarks")?.getFilterValue()??"",onChange:n=>s.getColumn("remarks")?.setFilterValue(n.target.value),className:"h-8 w-[150px] lg:w-[250px]"}),a&&e.jsxs(k,{variant:"ghost",onClick:()=>s.resetColumnFilters(),className:"h-8 px-2 lg:px-3",children:["Reset",e.jsx(Re,{className:"ml-2 h-4 w-4"})]})]})})}function Jx({columns:s,data:t,refetch:a}){const[n,r]=o.useState({}),[l,c]=o.useState({}),[x,u]=o.useState([]),[b,p]=o.useState([]),y=Fe({data:t,columns:s,state:{sorting:b,columnVisibility:l,rowSelection:n,columnFilters:x},enableRowSelection:!0,onRowSelectionChange:r,onSortingChange:p,onColumnFiltersChange:u,onColumnVisibilityChange:c,getCoreRowModel:Pe(),getFilteredRowModel:Ee(),getPaginationRowModel:Me(),getSortedRowModel:Oe(),getFacetedRowModel:Ze(),getFacetedUniqueValues:Xe(),initialState:{columnPinning:{right:["actions"]}}});return e.jsx($e,{table:y,toolbar:_=>e.jsx(Wx,{table:_,refetch:a})})}const Zx=s=>[{accessorKey:"id",header:({column:t})=>e.jsx(V,{column:t,title:"组ID"}),cell:({row:t})=>e.jsx("div",{className:"flex items-center space-x-2",children:e.jsx(M,{variant:"outline",children:t.getValue("id")})}),enableSorting:!0,enableHiding:!1},{accessorKey:"remarks",header:()=>e.jsx("div",{children:"备注"}),cell:({row:t})=>e.jsx("div",{className:"flex space-x-2",children:e.jsxs("span",{className:"max-w-32 truncate font-medium sm:max-w-72 md:max-w-[31rem]",children:["匹配 ",t.original.match?.length," 条规则"]})})},{accessorKey:"action",header:({column:t})=>e.jsx(V,{column:t,title:"动作"}),cell:({row:t})=>{const a={dns:"指定DNS服务器进行解析",block:"禁止访问"};return e.jsx("div",{className:"flex items-center space-x-2",children:e.jsx(M,{className:"max-w-32 truncate font-medium sm:max-w-72 md:max-w-[31rem]",children:a[t.getValue("action")]})})},enableSorting:!1,size:9e3},{id:"actions",header:()=>e.jsx("div",{className:"text-right",children:"操作"}),cell:({row:t})=>e.jsxs("div",{className:"flex items-center justify-center",children:[e.jsx(yr,{defaultValues:t.original,refetch:s,type:"edit",dialogTrigger:e.jsxs(k,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-muted",children:[e.jsx(bs,{className:"h-4 w-4 text-muted-foreground hover:text-foreground"}),e.jsx("span",{className:"sr-only",children:"编辑"})]})}),e.jsx(Ae,{title:"确认删除",description:"此操作将永久删除该权限组,删除后无法恢复。确定要继续吗?",confirmText:"删除",variant:"destructive",onConfirm:async()=>{rc({id:t.original.id}).then(({data:a})=>{a&&(z.success("删除成功"),s())})},children:e.jsxs(k,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-red-100 dark:hover:bg-red-900",children:[e.jsx(Je,{className:"h-4 w-4 text-muted-foreground hover:text-red-600 dark:hover:text-red-400"}),e.jsx("span",{className:"sr-only",children:"删除"})]})})]})}];function Xx(){const[s,t]=o.useState([]);function a(){Zn().then(({data:n})=>{t(n)})}return o.useEffect(()=>{a()},[]),e.jsxs(ge,{children:[e.jsxs(fe,{children:[e.jsx(Ne,{}),e.jsxs("div",{className:"ml-auto flex items-center space-x-4",children:[e.jsx(we,{}),e.jsx(_e,{})]})]}),e.jsxs(be,{className:"flex flex-col",fixedHeight:!0,children:[e.jsx("div",{className:"mb-2 flex items-center justify-between space-y-2",children:e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:"路由管理"}),e.jsx("p",{className:"mt-2 text-muted-foreground",children:"管理所有路由组,包括添加、删除、编辑等操作。"})]})}),e.jsx("div",{className:"-mx-4 flex-1 overflow-auto px-4 py-1 lg:flex-row lg:space-x-12 lg:space-y-0",children:e.jsx(Jx,{data:s,columns:Zx(a),refetch:a})})]})]})}const Qx=Object.freeze(Object.defineProperty({__proto__:null,default:Xx},Symbol.toStringTag,{value:"Module"})),Nr=o.createContext(void 0);function em({children:s,refreshData:t}){const[a,n]=o.useState(!1),[r,l]=o.useState(null);return e.jsx(Nr.Provider,{value:{isOpen:a,setIsOpen:n,editingPlan:r,setEditingPlan:l,refreshData:t},children:s})}function ea(){const s=o.useContext(Nr);if(s===void 0)throw new Error("usePlanEdit must be used within a PlanEditProvider");return s}function sm({table:s,saveOrder:t,isSortMode:a}){const{setIsOpen:n}=ea();return e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex flex-1 items-center space-x-2",children:[e.jsxs(k,{variant:"outline",className:"space-x-2",size:"sm",onClick:()=>n(!0),children:[e.jsx(Ce,{icon:"ion:add"}),e.jsx("div",{children:"添加套餐"})]}),e.jsx(C,{placeholder:"搜索套餐...",value:s.getColumn("name")?.getFilterValue()??"",onChange:r=>s.getColumn("name")?.setFilterValue(r.target.value),className:"h-8 w-[150px] lg:w-[250px]"})]}),e.jsx("div",{className:"flex items-center space-x-2",children:e.jsx(k,{variant:a?"default":"outline",size:"sm",onClick:t,children:a?"保存排序":"编辑排序"})})]})}const tm=s=>[{id:"drag-handle",header:()=>null,cell:()=>e.jsx("div",{className:"cursor-move",children:e.jsx(ht,{className:"size-4"})}),size:40,enableSorting:!1},{accessorKey:"id",header:({column:t})=>e.jsx(V,{column:t,title:"ID"}),cell:({row:t})=>e.jsx("div",{className:"flex items-center space-x-2",children:e.jsx(M,{variant:"outline",children:t.getValue("id")})}),enableSorting:!0,enableHiding:!1},{accessorKey:"show",header:({column:t})=>e.jsx(V,{column:t,title:"显示"}),cell:({row:t})=>e.jsx(L,{defaultChecked:t.getValue("show"),onCheckedChange:a=>{Ct({id:t.original.id,show:a}).then(({data:n})=>{!n&&s()})}}),enableSorting:!1,enableHiding:!1},{accessorKey:"sell",header:({column:t})=>e.jsx(V,{column:t,title:"销售"}),cell:({row:t})=>e.jsx(L,{defaultChecked:t.getValue("sell"),onCheckedChange:a=>{Ct({id:t.original.id,sell:a}).then(({data:n})=>{!n&&s()})}}),enableSorting:!1,enableHiding:!1},{accessorKey:"renew",header:({column:t})=>e.jsx(V,{column:t,title:"续费",tooltip:"在订阅停止销售时,已购用户是否可以续费"}),cell:({row:t})=>e.jsx(L,{defaultChecked:t.getValue("renew"),onCheckedChange:a=>{Ct({id:t.original.id,renew:a}).then(({data:n})=>{!n&&s()})}}),enableSorting:!1,enableHiding:!1},{accessorKey:"name",header:({column:t})=>e.jsx(V,{column:t,title:"名称"}),cell:({row:t})=>e.jsx("div",{className:"flex space-x-2",children:e.jsx("span",{className:"max-w-32 truncate font-medium sm:max-w-72 md:max-w-[31rem]",children:t.getValue("name")})}),enableSorting:!1,enableHiding:!1,size:900},{accessorKey:"users_count",header:({column:t})=>e.jsx(V,{column:t,title:"统计"}),cell:({row:t})=>e.jsxs("div",{className:"flex items-center space-x-2 px-2",children:[e.jsx(Ks,{}),e.jsx("span",{className:"max-w-32 truncate font-medium sm:max-w-72 md:max-w-[31rem]",children:t.getValue("users_count")})]}),enableSorting:!0},{accessorKey:"group",header:({column:t})=>e.jsx(V,{column:t,title:"权限组"}),cell:({row:t})=>e.jsx("div",{className:"flex max-w-[600px] flex-wrap items-center gap-1.5",children:e.jsx(M,{variant:"secondary",className:f("px-2 py-0.5 font-medium","bg-secondary/50 hover:bg-secondary/70","border border-border/50","transition-all duration-200","cursor-default select-none","flex items-center gap-1.5"),children:t.getValue("group")?.name})}),enableSorting:!1,enableHiding:!1,size:9e3},{id:"actions",header:({column:t})=>e.jsx(V,{className:"justify-end",column:t,title:"操作"}),cell:({row:t})=>{const{setIsOpen:a,setEditingPlan:n}=ea();return e.jsxs("div",{className:"flex items-center justify-center",children:[e.jsxs(k,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-muted",onClick:()=>{n(t.original),a(!0)},children:[e.jsx(bs,{className:"h-4 w-4 text-muted-foreground hover:text-foreground"}),e.jsx("span",{className:"sr-only",children:"编辑"})]}),e.jsx(Ae,{title:"确认删除",description:"此操作将永久删除该订阅,删除后无法恢复。确定要继续吗?",confirmText:"删除",variant:"destructive",onConfirm:async()=>{_c({id:t.original.id}).then(({data:r})=>{r&&(z.success("删除成功"),s())})},children:e.jsxs(k,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-red-100 dark:hover:bg-red-900",children:[e.jsx(Je,{className:"h-4 w-4 text-muted-foreground hover:text-red-600 dark:hover:text-red-400"}),e.jsx("span",{className:"sr-only",children:"删除"})]})})]})}}],am=i.object({id:i.number().nullable(),group_id:i.union([i.number(),i.string()]).nullable().optional(),name:i.string().min(1).max(250),content:i.string().nullable().optional(),transfer_enable:i.union([i.number().min(0),i.string().min(1)]),prices:i.object({monthly:i.union([i.number(),i.string()]).nullable().optional(),quarterly:i.union([i.number(),i.string()]).nullable().optional(),half_yearly:i.union([i.number(),i.string()]).nullable().optional(),yearly:i.union([i.number(),i.string()]).nullable().optional(),two_yearly:i.union([i.number(),i.string()]).nullable().optional(),three_yearly:i.union([i.number(),i.string()]).nullable().optional(),onetime:i.union([i.number(),i.string()]).nullable().optional(),reset_traffic:i.union([i.number(),i.string()]).nullable().optional()}).default({}),speed_limit:i.union([i.number(),i.string()]).nullable().optional(),capacity_limit:i.union([i.number(),i.string()]).nullable().optional(),device_limit:i.union([i.number(),i.string()]).nullable().optional(),force_update:i.boolean().optional(),reset_traffic_method:i.number().nullable(),users_count:i.number().optional()}),wr=o.forwardRef(({className:s,...t},a)=>e.jsx(bn,{ref:a,className:f("peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",s),...t,children:e.jsx(Ri,{className:f("flex items-center justify-center text-current"),children:e.jsx(ds,{className:"h-4 w-4"})})}));wr.displayName=bn.displayName;const et={id:null,group_id:null,name:"",content:"",transfer_enable:"",prices:{monthly:"",quarterly:"",half_yearly:"",yearly:"",two_yearly:"",three_yearly:"",onetime:"",reset_traffic:""},speed_limit:"",capacity_limit:"",device_limit:"",force_update:!1,reset_traffic_method:null},st={monthly:{label:"月付",months:1,discount:1},quarterly:{label:"季付",months:3,discount:.95},half_yearly:{label:"半年付",months:6,discount:.9},yearly:{label:"年付",months:12,discount:.85},two_yearly:{label:"两年付",months:24,discount:.8},three_yearly:{label:"三年付",months:36,discount:.75},onetime:{label:"流量包",months:1,discount:1},reset_traffic:{label:"重置包",months:1,discount:1}},nm=[{value:0,label:"跟随系统设置"},{value:1,label:"每月1号"},{value:2,label:"按月重置"},{value:3,label:"不重置"},{value:4,label:"每年1月1日"},{value:5,label:"按年重置"}];function rm(){const{isOpen:s,setIsOpen:t,editingPlan:a,setEditingPlan:n,refreshData:r}=ea(),[l,c]=o.useState(!1),x=Z({resolver:Q(am),defaultValues:{...et,...a||{}},mode:"onChange"});o.useEffect(()=>{a?x.reset({...et,...a}):x.reset(et)},[a,x]);const u=new fn({html:!0}),[b,p]=o.useState();async function y(){pt().then(({data:F})=>{p(F)})}o.useEffect(()=>{s&&y()},[s]);const _=F=>{if(isNaN(F))return;const T=Object.entries(st).reduce((m,[d,N])=>{const w=F*N.months*N.discount;return{...m,[d]:w.toFixed(2)}},{});x.setValue("prices",T,{shouldDirty:!0})},D=()=>{t(!1),n(null),x.reset(et)};return e.jsx(de,{open:s,onOpenChange:D,children:e.jsxs(re,{children:[e.jsxs(he,{children:[e.jsx(xe,{children:a?"编辑套餐":"添加套餐"}),e.jsx(Ve,{})]}),e.jsxs(ee,{...x,children:[e.jsxs("div",{className:"space-y-4",children:[e.jsx(j,{control:x.control,name:"name",render:({field:F})=>e.jsxs(h,{children:[e.jsx(g,{children:"套餐名称"}),e.jsx(v,{children:e.jsx(C,{placeholder:"请输入套餐名称",...F})}),e.jsx(S,{})]})}),e.jsx(j,{control:x.control,name:"group_id",render:({field:F})=>e.jsxs(h,{children:[e.jsxs(g,{className:"flex items-center justify-between",children:["权限组",e.jsx(bt,{dialogTrigger:e.jsx(k,{variant:"link",children:"添加权限组"}),refetch:y})]}),e.jsxs(B,{value:F.value||"",onValueChange:F.onChange,children:[e.jsx(v,{children:e.jsx(U,{children:e.jsx(Y,{placeholder:"选择权限组"})})}),e.jsx(q,{children:b?.map(T=>e.jsx(O,{value:T.id,children:T.name},T.id))})]}),e.jsx(S,{})]})}),e.jsx(j,{control:x.control,name:"transfer_enable",render:({field:F})=>e.jsxs(h,{className:"flex-1",children:[e.jsx(g,{children:"流量"}),e.jsxs("div",{className:"relative flex",children:[e.jsx(v,{children:e.jsx(C,{type:"number",min:0,placeholder:"请输入流量大小",className:"rounded-r-none",...F})}),e.jsx("div",{className:"flex items-center rounded-r-md border border-l-0 border-input bg-muted px-3 text-sm text-muted-foreground",children:"GB"})]}),e.jsx(S,{})]})}),e.jsx(j,{control:x.control,name:"speed_limit",render:({field:F})=>e.jsxs(h,{className:"flex-1",children:[e.jsx(g,{children:"限速"}),e.jsxs("div",{className:"relative flex",children:[e.jsx(v,{children:e.jsx(C,{type:"number",min:0,placeholder:"请输入限速",className:"rounded-r-none",...F})}),e.jsx("div",{className:"flex items-center rounded-r-md border border-l-0 border-input bg-muted px-3 text-sm text-muted-foreground",children:"Mbps"})]}),e.jsx(S,{})]})}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex flex-1 items-center",children:[e.jsx("div",{className:"flex-grow border-t border-gray-200 dark:border-gray-700"}),e.jsx("h3",{className:"mx-4 text-sm font-medium text-gray-500 dark:text-gray-400",children:"售价设置"}),e.jsx("div",{className:"flex-grow border-t border-gray-200 dark:border-gray-700"})]}),e.jsxs("div",{className:"ml-4 flex items-center gap-2",children:[e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-2",children:e.jsx("span",{className:"text-sm font-medium text-gray-400",children:"¥"})}),e.jsx(C,{type:"number",placeholder:"基础月付价格",className:"h-7 w-32 border-0 bg-gray-50 pl-6 pr-2 text-sm shadow-none ring-1 ring-gray-200 transition-shadow focus-visible:ring-2 focus-visible:ring-primary dark:bg-gray-800/50 dark:ring-gray-700 dark:placeholder:text-gray-500",onChange:F=>{const T=parseFloat(F.target.value);_(T)}})]}),e.jsx(ue,{children:e.jsxs(oe,{children:[e.jsx(ce,{asChild:!0,children:e.jsx(k,{variant:"outline",size:"sm",className:"h-7 text-xs",onClick:()=>{const F=Object.keys(st).reduce((T,m)=>({...T,[m]:""}),{});x.setValue("prices",F,{shouldDirty:!0})},children:"清空价格"})}),e.jsx(ne,{side:"top",align:"end",children:e.jsx("p",{className:"text-xs",children:"清空所有周期的价格设置"})})]})})]})]}),e.jsx("div",{className:"grid grid-cols-2 gap-3 lg:grid-cols-3",children:Object.entries(st).filter(([F])=>!["onetime","reset_traffic"].includes(F)).map(([F,T])=>e.jsx("div",{className:"group relative rounded-md bg-card p-2 ring-1 ring-gray-200 transition-all hover:ring-primary dark:ring-gray-800",children:e.jsx(j,{control:x.control,name:`prices.${F}`,render:({field:m})=>e.jsxs(h,{children:[e.jsxs(g,{className:"text-xs font-medium text-muted-foreground",children:[T.label,e.jsxs("span",{className:"ml-1 text-[10px] text-gray-400",children:["(",T.months===1?"每月":`每${T.months}个月`,"结算)"]})]}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-2",children:e.jsx("span",{className:"text-sm font-medium text-gray-400",children:"¥"})}),e.jsx(v,{children:e.jsx(C,{type:"number",placeholder:"0.00",min:0,...m,value:m.value??"",onChange:d=>m.onChange(d.target.value),className:"h-7 border-0 bg-gray-50 pl-6 pr-2 text-sm shadow-none ring-1 ring-gray-200 transition-shadow focus-visible:ring-2 focus-visible:ring-primary dark:bg-gray-800/50 dark:ring-gray-700 dark:placeholder:text-gray-500"})})]})]})})},F))}),e.jsx("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-2",children:Object.entries(st).filter(([F])=>["onetime","reset_traffic"].includes(F)).map(([F,T])=>e.jsx("div",{className:"rounded-md border border-dashed border-gray-200 bg-muted/30 p-3 dark:border-gray-700",children:e.jsx(j,{control:x.control,name:`prices.${F}`,render:({field:m})=>e.jsx(h,{children:e.jsxs("div",{className:"flex flex-col gap-2 md:flex-row md:items-center md:justify-between",children:[e.jsxs("div",{className:"space-y-0",children:[e.jsx(g,{className:"text-xs font-medium",children:T.label}),e.jsx("p",{className:"text-[10px] text-muted-foreground",children:F==="onetime"?"一次性流量包,购买后立即生效":"用户可随时购买流量重置包,立即重置流量"})]}),e.jsxs("div",{className:"relative w-full md:w-32",children:[e.jsx("div",{className:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-2",children:e.jsx("span",{className:"text-sm font-medium text-gray-400",children:"¥"})}),e.jsx(v,{children:e.jsx(C,{type:"number",placeholder:"0.00",min:0,...m,className:"h-7 border-0 bg-gray-50 pl-6 pr-2 text-sm shadow-none ring-1 ring-gray-200 transition-shadow focus-visible:ring-2 focus-visible:ring-primary dark:bg-gray-800/50 dark:ring-gray-700 dark:placeholder:text-gray-500"})})]})]})})})},F))})]}),e.jsxs("div",{className:"flex gap-4",children:[e.jsx(j,{control:x.control,name:"device_limit",render:({field:F})=>e.jsxs(h,{className:"flex-1",children:[e.jsx(g,{children:"设备限制"}),e.jsxs("div",{className:"relative flex",children:[e.jsx(v,{children:e.jsx(C,{type:"number",min:0,placeholder:"留空则不限制",className:"rounded-r-none",...F,value:F.value??""})}),e.jsx("div",{className:"flex items-center rounded-r-md border border-l-0 border-input bg-muted px-3 text-sm text-muted-foreground",children:"台"})]}),e.jsx(S,{})]})}),e.jsx(j,{control:x.control,name:"capacity_limit",render:({field:F})=>e.jsxs(h,{className:"flex-1",children:[e.jsx(g,{children:"容量限制"}),e.jsxs("div",{className:"relative flex",children:[e.jsx(v,{children:e.jsx(C,{type:"number",min:0,placeholder:"留空则不限制",className:"rounded-r-none",...F,value:F.value??""})}),e.jsx("div",{className:"flex items-center rounded-r-md border border-l-0 border-input bg-muted px-3 text-sm text-muted-foreground",children:"人"})]}),e.jsx(S,{})]})})]}),e.jsx(j,{control:x.control,name:"reset_traffic_method",render:({field:F})=>e.jsxs(h,{children:[e.jsx(g,{children:"流量重置方式"}),e.jsxs(B,{value:F.value?.toString()??"0",onValueChange:T=>F.onChange(Number(T)),children:[e.jsx(v,{children:e.jsx(U,{children:e.jsx(Y,{placeholder:"选择流量重置方式"})})}),e.jsx(q,{children:nm.map(T=>e.jsx(O,{value:T.value.toString(),children:T.label},T.value))})]}),e.jsx(P,{className:"text-xs",children:"设置订阅流量的重置方式,不同的重置方式会影响用户的流量计算方式"}),e.jsx(S,{})]})}),e.jsx(j,{control:x.control,name:"content",render:({field:F})=>{const[T,m]=o.useState(!1);return e.jsxs(h,{className:"space-y-2",children:[e.jsxs(g,{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:["套餐描述",e.jsx(ue,{children:e.jsxs(oe,{children:[e.jsx(ce,{asChild:!0,children:e.jsx(k,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0",onClick:()=>m(!T),children:T?e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"h-4 w-4",children:[e.jsx("path",{d:"M10 12.5a2.5 2.5 0 100-5 2.5 2.5 0 000 5z"}),e.jsx("path",{fillRule:"evenodd",d:"M.664 10.59a1.651 1.651 0 010-1.186A10.004 10.004 0 0110 3c4.257 0 7.893 2.66 9.336 6.41.147.381.146.804 0 1.186A10.004 10.004 0 0110 17c-4.257 0-7.893-2.66-9.336-6.41zM14 10a4 4 0 11-8 0 4 4 0 018 0z",clipRule:"evenodd"})]}):e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"h-4 w-4",children:[e.jsx("path",{fillRule:"evenodd",d:"M3.28 2.22a.75.75 0 00-1.06 1.06l14.5 14.5a.75.75 0 101.06-1.06l-1.745-1.745a10.029 10.029 0 003.3-4.38 1.651 1.651 0 000-1.185A10.004 10.004 0 009.999 3a9.956 9.956 0 00-4.744 1.194L3.28 2.22zM7.752 6.69l1.092 1.092a2.5 2.5 0 013.374 3.373l1.091 1.092a4 4 0 00-5.557-5.557z",clipRule:"evenodd"}),e.jsx("path",{d:"M10.748 13.93l2.523 2.523a9.987 9.987 0 01-3.27.547c-4.258 0-7.894-2.66-9.337-6.41a1.651 1.651 0 010-1.186A10.007 10.007 0 012.839 6.02L6.07 9.252a4 4 0 004.678 4.678z"})]})})}),e.jsx(ne,{side:"top",children:e.jsx("p",{className:"text-xs",children:T?"隐藏预览":"显示预览"})})]})})]}),e.jsx(ue,{children:e.jsxs(oe,{children:[e.jsx(ce,{asChild:!0,children:e.jsx(k,{variant:"outline",size:"sm",onClick:()=>{F.onChange(`## 套餐特点 +import{r as i,j as e,t as tl,c as al,I as oa,a as ys,S as Ut,u as Ze,b as gt,d as nl,O as Gt,e as rl,f as V,g as ll,h as il,i as ol,Q as cl,k as dl,R as xl,l as ml,P as ul,m as hl,B as jl,n as Ia,F as gl,C as fl,o as pl,p as vl,q as bl,s as yl,v as Nl,z as o,w as Va,x as Z,y as ee,A as Ra,D as ft,E as pt,G as Bt,H as Le,T as vt,J as bt,K as Ma,L as za,M as wl,N as _l,U as Cl,V as Sl,W as Ea,X as Yt,Y as Oa,Z as kl,_ as La,$ as $a,a0 as Aa,a1 as Ha,a2 as us,a3 as Ka,a4 as Tl,a5 as qa,a6 as Ua,a7 as Dl,a8 as Pl,a9 as Fl,aa as Il,ab as Ga,ac as Vl,ad as Rl,ae as Ns,af as Ba,ag as Ml,ah as zl,ai as Ya,aj as El,ak as Ol,al as ca,am as Ll,an as Wa,ao as $l,ap as Ja,aq as Al,ar as Hl,as as Kl,at as ql,au as Ul,av as Gl,aw as Qa,ax as Bl,ay as Yl,az as Wl,aA as ye,aB as Jl,aC as Ql,aD as Zl,aE as Xl,aF as Za,aG as Xa,aH as en,aI as ei,aJ as sn,aK as tn,aL as an,aM as si,aN as Bs,aO as K,aP as ds,aQ as ti,aR as ai,aS as ni,aT as ri,aU as li,aV as ii,aW as da,aX as xa,aY as oi,aZ as ci,a_ as di,a$ as xi,b0 as mi,b1 as ui,b2 as nn,b3 as hi,b4 as ji,b5 as gi,b6 as rn,b7 as fi,b8 as Qe,b9 as ln,ba as pi,bb as on,bc as vi,bd as cn,be as bi,bf as dn,bg as xn,bh as yi,bi as Ni,bj as mn,bk as wi,bl as _i,bm as un,bn as Ci,bo as hn,bp as Si,bq as ki,br as jn,bs as Ti,bt as Di,bu as gn,bv as Pi,bw as tt,bx as Fi,by as ma,bz as Mt,bA as zt,bB as Ii,bC as yt,bD as fn,bE as Vi,bF as Wt,bG as Ri,bH as Mi,bI as zi,bJ as Ei,bK as Oi,bL as pn,bM as Li,bN as $i,bO as Ai,bP as Hi,bQ as vn,bR as Ki,bS as Et,bT as qi,bU as Ui,bV as mt,bW as ve,bX as ua,bY as Gi,bZ as bn,b_ as yn,b$ as Nn,c0 as wn,c1 as _n,c2 as Cn,c3 as Bi,c4 as Yi,c5 as Wi,c6 as Nt,c7 as ws,c8 as Xe,c9 as Re,ca as Me,cb as $e,cc as Ae,cd as He,ce as ha,cf as Ot,cg as es,ch as ss,ci as Sn,cj as kn,ck as Ms,cl as Ji,cm as Qi,cn as ja,co as Tn,cp as ga,cq as ut,cr as Zi,cs as Xi,ct as Dn,cu as eo,cv as so,cw as Pn,cx as Lt,cy as Fn,cz as to,cA as In,cB as ao,cC as no,cD as ro,cE as lo,cF as io}from"./vendor.js";import"./index.js";var Uu=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Gu(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function oo(s){if(s.__esModule)return s;var t=s.default;if(typeof t=="function"){var a=function n(){return this instanceof n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};a.prototype=t.prototype}else a={};return Object.defineProperty(a,"__esModule",{value:!0}),Object.keys(s).forEach(function(n){var r=Object.getOwnPropertyDescriptor(s,n);Object.defineProperty(a,n,r.get?r:{enumerable:!0,get:function(){return s[n]}})}),a}const co={theme:"system",setTheme:()=>null},Vn=i.createContext(co);function xo({children:s,defaultTheme:t="system",storageKey:a="vite-ui-theme",...n}){const[r,l]=i.useState(()=>localStorage.getItem(a)||t);i.useEffect(()=>{const d=window.document.documentElement;if(d.classList.remove("light","dark"),r==="system"){const m=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";d.classList.add(m);return}d.classList.add(r)},[r]);const c={theme:r,setTheme:d=>{localStorage.setItem(a,d),l(d)}};return e.jsx(Vn.Provider,{...n,value:c,children:s})}const mo=()=>{const s=i.useContext(Vn);if(s===void 0)throw new Error("useTheme must be used within a ThemeProvider");return s},uo=function(){const t=typeof document<"u"&&document.createElement("link").relList;return t&&t.supports&&t.supports("modulepreload")?"modulepreload":"preload"}(),ho=function(s,t){return new URL(s,t).href},fa={},Q=function(t,a,n){let r=Promise.resolve();if(a&&a.length>0){const c=document.getElementsByTagName("link"),d=document.querySelector("meta[property=csp-nonce]"),m=d?.nonce||d?.getAttribute("nonce");r=Promise.allSettled(a.map(w=>{if(w=ho(w,n),w in fa)return;fa[w]=!0;const j=w.endsWith(".css"),b=j?'[rel="stylesheet"]':"";if(!!n)for(let D=c.length-1;D>=0;D--){const T=c[D];if(T.href===w&&(!j||T.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${w}"]${b}`))return;const y=document.createElement("link");if(y.rel=j?"stylesheet":uo,j||(y.as="script"),y.crossOrigin="",y.href=w,m&&y.setAttribute("nonce",m),document.head.appendChild(y),j)return new Promise((D,T)=>{y.addEventListener("load",D),y.addEventListener("error",()=>T(new Error(`Unable to preload CSS for ${w}`)))})}))}function l(c){const d=new Event("vite:preloadError",{cancelable:!0});if(d.payload=c,window.dispatchEvent(d),!d.defaultPrevented)throw c}return r.then(c=>{for(const d of c||[])d.status==="rejected"&&l(d.reason);return t().catch(l)})};function f(...s){return tl(al(s))}const Ie=ys("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),k=i.forwardRef(({className:s,variant:t,size:a,asChild:n=!1,children:r,disabled:l,loading:c=!1,leftSection:d,rightSection:m,...w},j)=>{const b=n?Ut:"button";return e.jsxs(b,{className:f(Ie({variant:t,size:a,className:s})),disabled:c||l,ref:j,...w,children:[(d&&c||!d&&!m&&c)&&e.jsx(oa,{className:"mr-2 h-4 w-4 animate-spin"}),!c&&d&&e.jsx("div",{className:"mr-2",children:d}),r,!c&&m&&e.jsx("div",{className:"ml-2",children:m}),m&&c&&e.jsx(oa,{className:"ml-2 h-4 w-4 animate-spin"})]})});k.displayName="Button";function Ss({className:s,minimal:t=!1}){const a=Ze();return e.jsx("div",{className:f("h-svh w-full",s),children:e.jsxs("div",{className:"m-auto flex h-full w-full flex-col items-center justify-center gap-2",children:[!t&&e.jsx("h1",{className:"text-[7rem] font-bold leading-tight",children:"500"}),e.jsxs("span",{className:"font-medium",children:["Oops! Something went wrong ",":')"]}),e.jsxs("p",{className:"text-center text-muted-foreground",children:["We apologize for the inconvenience. ",e.jsx("br",{})," Please try again later."]}),!t&&e.jsxs("div",{className:"mt-6 flex gap-4",children:[e.jsx(k,{variant:"outline",onClick:()=>a(-1),children:"Go Back"}),e.jsx(k,{onClick:()=>a("/"),children:"Back to Home"})]})]})})}function pa(){const s=Ze();return e.jsx("div",{className:"h-svh",children:e.jsxs("div",{className:"m-auto flex h-full w-full flex-col items-center justify-center gap-2",children:[e.jsx("h1",{className:"text-[7rem] font-bold leading-tight",children:"404"}),e.jsx("span",{className:"font-medium",children:"Oops! Page Not Found!"}),e.jsxs("p",{className:"text-center text-muted-foreground",children:["It seems like the page you're looking for ",e.jsx("br",{}),"does not exist or might have been removed."]}),e.jsxs("div",{className:"mt-6 flex gap-4",children:[e.jsx(k,{variant:"outline",onClick:()=>s(-1),children:"Go Back"}),e.jsx(k,{onClick:()=>s("/"),children:"Back to Home"})]})]})})}function jo(){return e.jsx("div",{className:"h-svh",children:e.jsxs("div",{className:"m-auto flex h-full w-full flex-col items-center justify-center gap-2",children:[e.jsx("h1",{className:"text-[7rem] font-bold leading-tight",children:"503"}),e.jsx("span",{className:"font-medium",children:"Website is under maintenance!"}),e.jsxs("p",{className:"text-center text-muted-foreground",children:["The site is not available at the moment. ",e.jsx("br",{}),"We'll be back online shortly."]}),e.jsx("div",{className:"mt-6 flex gap-4",children:e.jsx(k,{variant:"outline",children:"Learn more"})})]})})}function go(s){return typeof s>"u"}function fo(s){return s===null}function po(s){return fo(s)||go(s)}class vo{storage;prefixKey;constructor(t){this.storage=t.storage,this.prefixKey=t.prefixKey}getKey(t){return`${this.prefixKey}${t}`.toUpperCase()}set(t,a,n=null){const r=JSON.stringify({value:a,time:Date.now(),expire:n!==null?new Date().getTime()+n*1e3:null});this.storage.setItem(this.getKey(t),r)}get(t,a=null){const n=this.storage.getItem(this.getKey(t));if(!n)return{value:a,time:0};try{const r=JSON.parse(n),{value:l,time:c,expire:d}=r;return po(d)||d>new Date().getTime()?{value:l,time:c}:(this.remove(t),{value:a,time:0})}catch{return this.remove(t),{value:a,time:0}}}remove(t){this.storage.removeItem(this.getKey(t))}clear(){this.storage.clear()}}function Rn({prefixKey:s="",storage:t=sessionStorage}){return new vo({prefixKey:s,storage:t})}const Mn="Xboard_",bo=function(s={}){return Rn({prefixKey:s.prefixKey||"",storage:localStorage})},yo=function(s={}){return Rn({prefixKey:s.prefixKey||"",storage:sessionStorage})},wt=bo({prefixKey:Mn});yo({prefixKey:Mn});const zn="access_token";function Ys(){return wt.get(zn)}function En(){wt.remove(zn)}const va=["/sign-in","/sign-in-2","/sign-up","/forgot-password","/otp"];function No({children:s}){const t=Ze(),a=gt(),n=Ys();return i.useEffect(()=>{if(!n.value&&!va.includes(a.pathname)){const r=encodeURIComponent(a.pathname+a.search);t(`/sign-in?redirect=${r}`)}},[n.value,a.pathname,a.search,t]),va.includes(a.pathname)||n.value?e.jsx(e.Fragment,{children:s}):null}const wo=()=>e.jsx(No,{children:e.jsx(Gt,{})}),_o=nl([{path:"/sign-in",lazy:async()=>({Component:(await Q(async()=>{const{default:s}=await Promise.resolve().then(()=>Uo);return{default:s}},void 0,import.meta.url)).default})},{element:e.jsx(wo,{}),children:[{path:"/",lazy:async()=>({Component:(await Q(()=>Promise.resolve().then(()=>rc),void 0,import.meta.url)).default}),errorElement:e.jsx(Ss,{}),children:[{index:!0,lazy:async()=>({Component:(await Q(async()=>{const{default:s}=await Promise.resolve().then(()=>Cd);return{default:s}},void 0,import.meta.url)).default})},{path:"config",errorElement:e.jsx(Ss,{}),children:[{path:"system",lazy:async()=>({Component:(await Q(async()=>{const{default:s}=await Promise.resolve().then(()=>Td);return{default:s}},void 0,import.meta.url)).default}),children:[{index:!0,lazy:async()=>({Component:(await Q(async()=>{const{default:s}=await Promise.resolve().then(()=>Rd);return{default:s}},void 0,import.meta.url)).default})},{path:"safe",lazy:async()=>({Component:(await Q(async()=>{const{default:s}=await Promise.resolve().then(()=>Ld);return{default:s}},void 0,import.meta.url)).default})},{path:"subscribe",lazy:async()=>({Component:(await Q(async()=>{const{default:s}=await Promise.resolve().then(()=>Kd);return{default:s}},void 0,import.meta.url)).default})},{path:"invite",lazy:async()=>({Component:(await Q(async()=>{const{default:s}=await Promise.resolve().then(()=>Yd);return{default:s}},void 0,import.meta.url)).default})},{path:"frontend",lazy:async()=>({Component:(await Q(async()=>{const{default:s}=await Promise.resolve().then(()=>Xd);return{default:s}},void 0,import.meta.url)).default})},{path:"server",lazy:async()=>({Component:(await Q(async()=>{const{default:s}=await Promise.resolve().then(()=>nx);return{default:s}},void 0,import.meta.url)).default})},{path:"email",lazy:async()=>({Component:(await Q(async()=>{const{default:s}=await Promise.resolve().then(()=>cx);return{default:s}},void 0,import.meta.url)).default})},{path:"telegram",lazy:async()=>({Component:(await Q(async()=>{const{default:s}=await Promise.resolve().then(()=>hx);return{default:s}},void 0,import.meta.url)).default})},{path:"APP",lazy:async()=>({Component:(await Q(async()=>{const{default:s}=await Promise.resolve().then(()=>vx);return{default:s}},void 0,import.meta.url)).default})}]},{path:"payment",lazy:async()=>({Component:(await Q(async()=>{const{default:s}=await Promise.resolve().then(()=>Fx);return{default:s}},void 0,import.meta.url)).default})},{path:"theme",lazy:async()=>({Component:(await Q(async()=>{const{default:s}=await Promise.resolve().then(()=>Rx);return{default:s}},void 0,import.meta.url)).default})},{path:"notice",lazy:async()=>({Component:(await Q(async()=>{const{default:s}=await Promise.resolve().then(()=>Ax);return{default:s}},void 0,import.meta.url)).default})},{path:"knowledge",lazy:async()=>({Component:(await Q(async()=>{const{default:s}=await Promise.resolve().then(()=>Wx);return{default:s}},void 0,import.meta.url)).default})}]},{path:"server",errorElement:e.jsx(Ss,{}),children:[{path:"manage",lazy:async()=>({Component:(await Q(async()=>{const{default:s}=await Promise.resolve().then(()=>vm);return{default:s}},void 0,import.meta.url)).default})},{path:"group",lazy:async()=>({Component:(await Q(async()=>{const{default:s}=await Promise.resolve().then(()=>_m);return{default:s}},void 0,import.meta.url)).default})},{path:"route",lazy:async()=>({Component:(await Q(async()=>{const{default:s}=await Promise.resolve().then(()=>Pm);return{default:s}},void 0,import.meta.url)).default})}]},{path:"finance",errorElement:e.jsx(Ss,{}),children:[{path:"plan",lazy:async()=>({Component:(await Q(async()=>{const{default:s}=await Promise.resolve().then(()=>Lm);return{default:s}},void 0,import.meta.url)).default})},{path:"order",lazy:async()=>({Component:(await Q(async()=>{const{default:s}=await Promise.resolve().then(()=>Ym);return{default:s}},void 0,import.meta.url)).default})},{path:"coupon",lazy:async()=>({Component:(await Q(async()=>{const{default:s}=await Promise.resolve().then(()=>au);return{default:s}},void 0,import.meta.url)).default})}]},{path:"user",errorElement:e.jsx(Ss,{}),children:[{path:"manage",lazy:async()=>({Component:(await Q(async()=>{const{default:s}=await Promise.resolve().then(()=>Cu);return{default:s}},void 0,import.meta.url)).default})},{path:"ticket",lazy:async()=>({Component:(await Q(async()=>{const{default:s}=await Promise.resolve().then(()=>Hu);return{default:s}},void 0,import.meta.url)).default})}]}]}]},{path:"/500",Component:Ss},{path:"/404",Component:pa},{path:"/503",Component:jo},{path:"*",Component:pa}]),Co="locale";function So(){return wt.get(Co)}function On(){En();const s=window.location.pathname,t=s&&!["/404","/sign-in"].includes(s);window.location.href="sign-in"+(t?`?redirect=${s}`:"")}const ko=["/passport/auth/login","/passport/auth/token2Login","/passport/auth/register","/guest/comm/config","/passport/comm/sendEmailVerify","/passport/auth/forget"];function To(){const s=window.settings?.base_url||"/";return s.endsWith("/")?s+"api/v2":s+"/api/v2"}const I=rl.create({baseURL:To(),timeout:12e3,headers:{"Content-Type":"application/json"}});I.interceptors.request.use(s=>{s.method?.toLowerCase()==="get"&&(s.params={...s.params,t:Date.now()});const t=Ys();if(!ko.includes(s.url?.split("?")[0]||"")){if(!t.value)return On(),Promise.reject({code:-1,message:"未登录"});s.headers.Authorization=t.value}return s.headers["Content-Language"]=So().value||"zh-CN",s},s=>Promise.reject(s));I.interceptors.response.use(s=>{const t=s?.data||{code:-1,message:"未知错误"};return Promise.resolve(t)},s=>{const t=s.response?.data||{data:null,code:-1,message:"未知错误"},a=s.response?.status;let n=t.message;return a===401||a===403?(On(),n=a===401?n||"登录已过期":n||"没有权限"):a===404?n=n||"资源或接口不存在":n=n||"未知异常",V.error(n),Promise.resolve(t)});function Do(){return I.get("/user/info")}const Pt={token:Ys()?.value||"",userInfo:null,isLoggedIn:!!Ys()?.value,loading:!1,error:null},Us=ll("user/fetchUserInfo",async()=>(await Do()).data,{condition:(s,{getState:t})=>{const{user:a}=t();return!!a.token&&!a.loading}}),Ln=il({name:"user",initialState:Pt,reducers:{setToken(s,t){s.token=t.payload,s.isLoggedIn=!!t.payload},resetUserState:()=>Pt},extraReducers:s=>{s.addCase(Us.pending,t=>{t.loading=!0,t.error=null}).addCase(Us.fulfilled,(t,a)=>{t.loading=!1,t.userInfo=a.payload,t.error=null}).addCase(Us.rejected,(t,a)=>{if(t.loading=!1,t.error=a.error.message||"Failed to fetch user info",!t.token)return Pt})}}),{setToken:Po,resetUserState:Fo}=Ln.actions,Io=s=>s.user.userInfo,Vo=Ln.reducer,$n=ol({reducer:{user:Vo}});Ys()?.value&&$n.dispatch(Us());const Ro=new cl;dl.createRoot(document.getElementById("root")).render(e.jsx(xl.StrictMode,{children:e.jsx(ml,{client:Ro,children:e.jsx(ul,{store:$n,children:e.jsxs(xo,{defaultTheme:"light",storageKey:"vite-ui-theme",children:[e.jsx(hl,{router:_o}),e.jsx(jl,{richColors:!0,position:"top-right"})]})})})}));const _e=i.forwardRef(({className:s,...t},a)=>e.jsx("div",{ref:a,className:f("rounded-xl border bg-card text-card-foreground shadow",s),...t}));_e.displayName="Card";const Te=i.forwardRef(({className:s,...t},a)=>e.jsx("div",{ref:a,className:f("flex flex-col space-y-1.5 p-6",s),...t}));Te.displayName="CardHeader";const Oe=i.forwardRef(({className:s,...t},a)=>e.jsx("h3",{ref:a,className:f("font-semibold leading-none tracking-tight",s),...t}));Oe.displayName="CardTitle";const Vs=i.forwardRef(({className:s,...t},a)=>e.jsx("p",{ref:a,className:f("text-sm text-muted-foreground",s),...t}));Vs.displayName="CardDescription";const De=i.forwardRef(({className:s,...t},a)=>e.jsx("div",{ref:a,className:f("p-6 pt-0",s),...t}));De.displayName="CardContent";const Mo=i.forwardRef(({className:s,...t},a)=>e.jsx("div",{ref:a,className:f("flex items-center p-6 pt-0",s),...t}));Mo.displayName="CardFooter";const zo=ys("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),An=i.forwardRef(({className:s,...t},a)=>e.jsx(Ia,{ref:a,className:f(zo(),s),...t}));An.displayName=Ia.displayName;const se=gl,Hn=i.createContext({}),h=({...s})=>e.jsx(Hn.Provider,{value:{name:s.name},children:e.jsx(fl,{...s})}),_t=()=>{const s=i.useContext(Hn),t=i.useContext(Kn),{getFieldState:a,formState:n}=pl(),r=a(s.name,n);if(!s)throw new Error("useFormField should be used within ");const{id:l}=t;return{id:l,name:s.name,formItemId:`${l}-form-item`,formDescriptionId:`${l}-form-item-description`,formMessageId:`${l}-form-item-message`,...r}},Kn=i.createContext({}),u=i.forwardRef(({className:s,...t},a)=>{const n=i.useId();return e.jsx(Kn.Provider,{value:{id:n},children:e.jsx("div",{ref:a,className:f("space-y-2",s),...t})})});u.displayName="FormItem";const g=i.forwardRef(({className:s,...t},a)=>{const{error:n,formItemId:r}=_t();return e.jsx(An,{ref:a,className:f(n&&"text-destructive",s),htmlFor:r,...t})});g.displayName="FormLabel";const v=i.forwardRef(({...s},t)=>{const{error:a,formItemId:n,formDescriptionId:r,formMessageId:l}=_t();return e.jsx(Ut,{ref:t,id:n,"aria-describedby":a?`${r} ${l}`:`${r}`,"aria-invalid":!!a,...s})});v.displayName="FormControl";const P=i.forwardRef(({className:s,...t},a)=>{const{formDescriptionId:n}=_t();return e.jsx("p",{ref:a,id:n,className:f("text-[0.8rem] text-muted-foreground",s),...t})});P.displayName="FormDescription";const S=i.forwardRef(({className:s,children:t,...a},n)=>{const{error:r,formMessageId:l}=_t(),c=r?String(r?.message):t;return c?e.jsx("p",{ref:n,id:l,className:f("text-[0.8rem] font-medium text-destructive",s),...a,children:c}):null});S.displayName="FormMessage";const C=i.forwardRef(({className:s,type:t,...a},n)=>e.jsx("input",{type:t,className:f("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",s),ref:n,...a}));C.displayName="Input";const qn=i.forwardRef(({className:s,...t},a)=>{const[n,r]=i.useState(!1);return e.jsxs("div",{className:"relative rounded-md",children:[e.jsx("input",{type:n?"text":"password",className:f("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",s),ref:a,...t}),e.jsx(k,{type:"button",size:"icon",variant:"ghost",className:"absolute right-1 top-1/2 h-6 w-6 -translate-y-1/2 rounded-md text-muted-foreground",onClick:()=>r(l=>!l),children:n?e.jsx(vl,{size:18}):e.jsx(bl,{size:18})})]})});qn.displayName="PasswordInput";const Eo=s=>I({url:"/passport/auth/login",method:"post",data:s}),$t=s=>s;function X(s=void 0,t="YYYY-MM-DD HH:mm:ss"){return s==null?"":(Math.floor(s).toString().length===10&&(s=s*1e3),yl(s).format(t))}function Oo(s=void 0,t="YYYY-MM-DD"){return X(s,t)}function Ts(s){const t=typeof s=="string"?parseFloat(s):s;return isNaN(t)?"0.00":t.toFixed(2)}function As(s){const t=typeof s=="string"?parseFloat(s):s;return isNaN(t)?"0.00":(t/100).toFixed(2)}function At(s){navigator.clipboard?navigator.clipboard.writeText(s).then(()=>{V.success($t("复制成功"))}).catch(t=>{console.error("复制到剪贴板时出错:",t),ba(s)}):ba(s)}function ba(s){const t=document.createElement("button"),a=new Nl(t,{text:()=>s});a.on("success",()=>{V.success($t("复制成功")),a.destroy()}),a.on("error",()=>{V.error($t("复制失败")),a.destroy()}),t.click()}function Fs(s){const t=s/1024,a=t/1024,n=a/1024,r=n/1024;return r>=1?Ts(r)+" TB":n>=1?Ts(n)+" GB":a>=1?Ts(a)+" MB":Ts(t)+" KB"}const Lo="access_token";function $o(s){wt.set(Lo,s)}const Ao=o.object({email:o.string().min(1,{message:"请输入邮箱地址"}).email({message:"邮箱地址格式不正确"}),password:o.string().min(1,{message:"请输入密码"}).min(7,{message:"密码长度至少为7个字符"})});function Ho({className:s,onForgotPassword:t,...a}){const n=Ze(),r=Va(),l=Z({resolver:ee(Ao),defaultValues:{email:"",password:""}});async function c(d){try{const{data:m}=await Eo(d);m&&($o(m.auth_data),r(Po(m.auth_data)),await r(Us()).unwrap(),n("/"))}catch(m){const w=m instanceof Error?m.message:"登录失败";V.error(w)}}return e.jsx("div",{className:f("grid gap-6",s),...a,children:e.jsx(se,{...l,children:e.jsx("form",{onSubmit:l.handleSubmit(c),children:e.jsxs("div",{className:"grid gap-2",children:[e.jsx(h,{control:l.control,name:"email",render:({field:d})=>e.jsxs(u,{className:"space-y-1",children:[e.jsx(g,{children:"邮箱地址"}),e.jsx(v,{children:e.jsx(C,{placeholder:"name@example.com",...d})}),e.jsx(S,{})]})}),e.jsx(h,{control:l.control,name:"password",render:({field:d})=>e.jsxs(u,{className:"space-y-1",children:[e.jsx(g,{children:"密码"}),e.jsx(v,{children:e.jsx(qn,{placeholder:"请输入密码",...d})}),e.jsx(S,{})]})}),e.jsx(k,{className:"mt-2",loading:l.formState.isSubmitting,children:"登录"}),e.jsx(k,{variant:"link",type:"button",className:"mt-1 text-sm text-muted-foreground hover:text-primary",onClick:t,children:"忘记密码?"})]})})})})}const ue=Ra,Pe=Ma,Ko=za,Xs=Bt,Un=i.forwardRef(({className:s,...t},a)=>e.jsx(ft,{ref:a,className:f("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",s),...t}));Un.displayName=ft.displayName;const de=i.forwardRef(({className:s,children:t,...a},n)=>e.jsxs(Ko,{children:[e.jsx(Un,{}),e.jsxs(pt,{ref:n,className:f("max-h-[95%] overflow-auto fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",s),...a,children:[t,e.jsxs(Bt,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[e.jsx(Le,{className:"h-4 w-4"}),e.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));de.displayName=pt.displayName;const ge=({className:s,...t})=>e.jsx("div",{className:f("flex flex-col space-y-1.5 text-center sm:text-left",s),...t});ge.displayName="DialogHeader";const Fe=({className:s,...t})=>e.jsx("div",{className:f("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",s),...t});Fe.displayName="DialogFooter";const he=i.forwardRef(({className:s,...t},a)=>e.jsx(vt,{ref:a,className:f("text-lg font-semibold leading-none tracking-tight",s),...t}));he.displayName=vt.displayName;const ze=i.forwardRef(({className:s,...t},a)=>e.jsx(bt,{ref:a,className:f("text-sm text-muted-foreground",s),...t}));ze.displayName=bt.displayName;const Rs=ys("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),H=i.forwardRef(({className:s,variant:t,size:a,asChild:n=!1,...r},l)=>{const c=n?Ut:"button";return e.jsx(c,{className:f(Rs({variant:t,size:a,className:s})),ref:l,...r})});H.displayName="Button";function qo(){const[s,t]=i.useState(!1),a=async r=>{try{await navigator.clipboard.writeText(r),V.success("命令已复制到剪贴板")}catch{V.error("复制失败,请手动复制")}},n="php artisan reset:password 管理员邮箱";return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"container grid h-svh flex-col items-center justify-center bg-primary-foreground lg:max-w-none lg:px-0",children:e.jsxs("div",{className:"mx-auto flex w-full flex-col justify-center space-y-2 sm:w-[480px] lg:p-8",children:[e.jsx("div",{className:"mb-4 flex items-center justify-center",children:e.jsx("h1",{className:"text-3xl font-medium",children:window?.settings?.title})}),e.jsxs(_e,{className:"p-6",children:[e.jsxs("div",{className:"flex flex-col space-y-2 text-left",children:[e.jsx("h1",{className:"text-2xl font-semibold tracking-tight",children:"登录"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"请输入您的邮箱和密码登录系统"})]}),e.jsx(Ho,{onForgotPassword:()=>t(!0)})]})]})}),e.jsx(ue,{open:s,onOpenChange:t,children:e.jsx(de,{children:e.jsxs(ge,{children:[e.jsx(he,{children:"忘记密码"}),e.jsx(ze,{children:"在站点目录下执行以下命令找回密码"}),e.jsx("div",{className:"mt-2",children:e.jsxs("div",{className:"relative",children:[e.jsx("pre",{className:"rounded-md bg-secondary p-4 pr-12",children:n}),e.jsx(H,{variant:"ghost",size:"icon",className:"absolute right-2 top-2 h-8 w-8 hover:bg-secondary-foreground/10",onClick:()=>a(n),children:e.jsx(wl,{className:"h-4 w-4"})})]})})]})})})]})}const Uo=Object.freeze(Object.defineProperty({__proto__:null,default:qo},Symbol.toStringTag,{value:"Module"})),fe=i.forwardRef(({className:s,fadedBelow:t=!1,fixedHeight:a=!1,...n},r)=>e.jsx("div",{ref:r,className:f("relative flex h-full w-full flex-col",t&&"after:pointer-events-none after:absolute after:bottom-0 after:left-0 after:hidden after:h-32 after:w-full after:bg-[linear-gradient(180deg,_transparent_10%,_hsl(var(--background))_70%)] after:md:block",a&&"md:h-svh",s),...n}));fe.displayName="Layout";const pe=i.forwardRef(({className:s,...t},a)=>e.jsx("div",{ref:a,className:f("flex h-[var(--header-height)] flex-none items-center gap-4 bg-background p-4 md:px-8",s),...t}));pe.displayName="LayoutHeader";const Ne=i.forwardRef(({className:s,fixedHeight:t,...a},n)=>e.jsx("div",{ref:n,className:f("flex-1 overflow-hidden px-4 py-6 md:px-8",t&&"h-[calc(100%-var(--header-height))]",s),...a}));Ne.displayName="LayoutBody";const Gn=_l,Bn=Cl,Yn=Sl,vs=Dl,bs=Pl,Go=Fl,Bo=i.forwardRef(({className:s,inset:t,children:a,...n},r)=>e.jsxs(Ea,{ref:r,className:f("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",t&&"pl-8",s),...n,children:[a,e.jsx(Yt,{className:"ml-auto h-4 w-4"})]}));Bo.displayName=Ea.displayName;const Yo=i.forwardRef(({className:s,...t},a)=>e.jsx(Oa,{ref:a,className:f("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",s),...t}));Yo.displayName=Oa.displayName;const ms=i.forwardRef(({className:s,sideOffset:t=4,...a},n)=>e.jsx(kl,{children:e.jsx(La,{ref:n,sideOffset:t,className:f("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",s),...a})}));ms.displayName=La.displayName;const oe=i.forwardRef(({className:s,inset:t,...a},n)=>e.jsx($a,{ref:n,className:f("relative flex cursor-default cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-8",s),...a}));oe.displayName=$a.displayName;const Wo=i.forwardRef(({className:s,children:t,checked:a,...n},r)=>e.jsxs(Aa,{ref:r,className:f("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",s),checked:a,...n,children:[e.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:e.jsx(Ha,{children:e.jsx(us,{className:"h-4 w-4"})})}),t]}));Wo.displayName=Aa.displayName;const Jo=i.forwardRef(({className:s,children:t,...a},n)=>e.jsxs(Ka,{ref:n,className:f("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",s),...a,children:[e.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:e.jsx(Ha,{children:e.jsx(Tl,{className:"h-4 w-4 fill-current"})})}),t]}));Jo.displayName=Ka.displayName;const Jt=i.forwardRef(({className:s,inset:t,...a},n)=>e.jsx(qa,{ref:n,className:f("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",s),...a}));Jt.displayName=qa.displayName;const Ws=i.forwardRef(({className:s,...t},a)=>e.jsx(Ua,{ref:a,className:f("-mx-1 my-1 h-px bg-muted",s),...t}));Ws.displayName=Ua.displayName;const Ht=({className:s,...t})=>e.jsx("span",{className:f("ml-auto text-xs tracking-widest opacity-60",s),...t});Ht.displayName="DropdownMenuShortcut";const ce=Il,ne=Vl,re=Rl,te=i.forwardRef(({className:s,sideOffset:t=4,...a},n)=>e.jsx(Ga,{ref:n,sideOffset:t,className:f("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",s),...a}));te.displayName=Ga.displayName;function Ct(){const{pathname:s}=gt();return{checkActiveNav:a=>{if(a==="/"&&s==="/")return!0;const n=a.replace(/^\//,""),r=s.replace(/^\//,"");return n?r.startsWith(n):!1}}}function Wn({key:s,defaultValue:t}){const[a,n]=i.useState(()=>{const r=localStorage.getItem(s);return r!==null?JSON.parse(r):t});return i.useEffect(()=>{localStorage.setItem(s,JSON.stringify(a))},[a,s]),[a,n]}function Qo(){const[s,t]=Wn({key:"expanded-sidebar-items",defaultValue:["仪表盘","系统管理","节点管理","订阅管理","用户管理"]});return{expandedItems:s,toggleItem:n=>{t(r=>r.includes(n)?r.filter(l=>l!==n):[...r,n])},isExpanded:n=>s.includes(n)}}function Zo({links:s,isCollapsed:t,className:a,closeNav:n}){const r=({sub:l,...c})=>{const d=`${c.title}-${c.href}`;return t&&l?i.createElement(sc,{...c,sub:l,key:d,closeNav:n}):t?i.createElement(ec,{...c,key:d,closeNav:n}):l?i.createElement(Xo,{...c,sub:l,key:d,closeNav:n}):i.createElement(Jn,{...c,key:d,closeNav:n})};return e.jsx("div",{"data-collapsed":t,className:f("group border-b bg-background py-2 transition-[max-height,padding] duration-500 data-[collapsed=true]:py-2 md:border-none",a),children:e.jsx(ce,{delayDuration:0,children:e.jsx("nav",{className:"grid gap-1 group-[[data-collapsed=true]]:justify-center group-[[data-collapsed=true]]:px-2",children:s.map(r)})})})}function Jn({title:s,icon:t,label:a,href:n,closeNav:r,subLink:l=!1}){const{checkActiveNav:c}=Ct();return e.jsxs(Ns,{to:n,onClick:r,className:f(Ie({variant:c(n)?"secondary":"ghost",size:"sm"}),"h-12 justify-start text-wrap rounded-none px-6",l&&"h-10 w-full border-l border-l-slate-500 px-2"),"aria-current":c(n)?"page":void 0,children:[e.jsx("div",{className:"mr-2",children:t}),s,a&&e.jsx("div",{className:"ml-2 rounded-lg bg-primary px-1 text-[0.625rem] text-primary-foreground",children:a})]})}function Xo({title:s,icon:t,label:a,sub:n,closeNav:r}){const{checkActiveNav:l}=Ct(),{isExpanded:c,toggleItem:d}=Qo(),m=!!n?.find(j=>l(j.href)),w=c(s)||m;return e.jsxs(Gn,{open:w,onOpenChange:()=>d(s),children:[e.jsxs(Bn,{className:f(Ie({variant:"ghost",size:"sm"}),"group h-12 w-full justify-start rounded-none px-6"),children:[e.jsx("div",{className:"mr-2",children:t}),s,a&&e.jsx("div",{className:"ml-2 rounded-lg bg-primary px-1 text-[0.625rem] text-primary-foreground",children:a}),e.jsx("span",{className:f('ml-auto transition-all group-data-[state="open"]:-rotate-180'),children:e.jsx(Ba,{stroke:1})})]}),e.jsx(Yn,{className:"collapsibleDropdown",asChild:!0,children:e.jsx("ul",{children:n.map(j=>e.jsx("li",{className:"my-1 ml-8",children:e.jsx(Jn,{...j,subLink:!0,closeNav:r})},j.title))})})]})}function ec({title:s,icon:t,label:a,href:n}){const{checkActiveNav:r}=Ct();return e.jsxs(ne,{delayDuration:0,children:[e.jsx(re,{asChild:!0,children:e.jsxs(Ns,{to:n,className:f(Ie({variant:r(n)?"secondary":"ghost",size:"icon"}),"h-12 w-12"),children:[t,e.jsx("span",{className:"sr-only",children:s})]})}),e.jsxs(te,{side:"right",className:"flex items-center gap-4",children:[s,a&&e.jsx("span",{className:"ml-auto text-muted-foreground",children:a})]})]})}function sc({title:s,icon:t,label:a,sub:n}){const{checkActiveNav:r}=Ct(),l=!!n?.find(c=>r(c.href));return e.jsxs(vs,{children:[e.jsxs(ne,{delayDuration:0,children:[e.jsx(re,{asChild:!0,children:e.jsx(bs,{asChild:!0,children:e.jsx(k,{variant:l?"secondary":"ghost",size:"icon",className:"h-12 w-12",children:t})})}),e.jsxs(te,{side:"right",className:"flex items-center gap-4",children:[s," ",a&&e.jsx("span",{className:"ml-auto text-muted-foreground",children:a}),e.jsx(Ba,{size:18,className:"-rotate-90 text-muted-foreground"})]})]}),e.jsxs(ms,{side:"right",align:"start",sideOffset:4,children:[e.jsxs(Jt,{children:[s," ",a?`(${a})`:""]}),e.jsx(Ws,{}),n.map(({title:c,icon:d,label:m,href:w})=>e.jsx(oe,{asChild:!0,children:e.jsxs(Ns,{to:w,className:`${r(w)?"bg-secondary":""}`,children:[d," ",e.jsx("span",{className:"ml-2 max-w-52 text-wrap",children:c}),m&&e.jsx("span",{className:"ml-auto text-xs",children:m})]})},`${c}-${w}`))]})]})}const Qn=[{title:"仪表盘",label:"",href:"/",icon:e.jsx(Ml,{size:18})},{title:"系统管理",label:"",href:"",icon:e.jsx(zl,{size:18}),sub:[{title:"系统配置",label:"",href:"/config/system",icon:e.jsx(Ya,{size:18})},{title:"主题配置",label:"",href:"/config/theme",icon:e.jsx(El,{size:18})},{title:"公告管理",label:"",href:"/config/notice",icon:e.jsx(Ol,{size:18})},{title:"支付配置",label:"",href:"/config/payment",icon:e.jsx(ca,{size:18})},{title:"知识库管理",label:"",href:"/config/knowledge",icon:e.jsx(Ll,{size:18})}]},{title:"节点管理",label:"",href:"",icon:e.jsx(Wa,{size:18}),sub:[{title:"节点管理",label:"",href:"/server/manage",icon:e.jsx($l,{size:18})},{title:"权限组管理",label:"",href:"/server/group",icon:e.jsx(Ja,{size:18})},{title:"路由管理",label:"",href:"/server/route",icon:e.jsx(Al,{size:18})}]},{title:"订阅管理",label:"",href:"",icon:e.jsx(Hl,{size:18}),sub:[{title:"套餐管理",label:"",href:"/finance/plan",icon:e.jsx(Kl,{size:18})},{title:"订单管理",label:"",href:"/finance/order",icon:e.jsx(ca,{size:18})},{title:"优惠券管理",label:"",href:"/finance/coupon",icon:e.jsx(ql,{size:18})}]},{title:"用户管理",label:"",href:"",icon:e.jsx(Ul,{size:18}),sub:[{title:"用户管理",label:"",href:"/user/manage",icon:e.jsx(Gl,{size:18})},{title:"工单管理",label:"",href:"/user/ticket",icon:e.jsx(Qa,{size:18})}]}];function tc({className:s,isCollapsed:t,setIsCollapsed:a}){const[n,r]=i.useState(!1);return i.useEffect(()=>{n?document.body.classList.add("overflow-hidden"):document.body.classList.remove("overflow-hidden")},[n]),e.jsxs("aside",{className:f(`fixed left-0 right-0 top-0 z-50 w-full border-r-2 border-r-muted transition-[width] md:bottom-0 md:right-auto md:h-svh ${t?"md:w-14":"md:w-64"}`,s),children:[e.jsx("div",{onClick:()=>r(!1),className:`absolute inset-0 transition-[opacity] delay-100 duration-700 ${n?"h-svh opacity-50":"h-0 opacity-0"} w-full bg-black md:hidden`}),e.jsxs(fe,{children:[e.jsxs(pe,{className:"sticky top-0 justify-between px-4 py-3 shadow md:px-4",children:[e.jsxs("div",{className:`flex items-center ${t?"":"gap-2"}`,children:[e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 256 256",className:`transition-all ${t?"h-6 w-6":"h-8 w-8"}`,children:[e.jsx("rect",{width:"256",height:"256",fill:"none"}),e.jsx("line",{x1:"208",y1:"128",x2:"128",y2:"208",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}),e.jsx("line",{x1:"192",y1:"40",x2:"40",y2:"192",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}),e.jsx("span",{className:"sr-only",children:"Website Name"})]}),e.jsx("div",{className:`flex flex-col justify-end truncate ${t?"invisible w-0":"visible w-auto"}`,children:e.jsx("span",{className:"font-medium",children:window?.settings?.title})})]}),e.jsx(k,{variant:"ghost",size:"icon",className:"md:hidden","aria-label":"Toggle Navigation","aria-controls":"sidebar-menu","aria-expanded":n,onClick:()=>r(l=>!l),children:n?e.jsx(Bl,{}):e.jsx(Yl,{})})]}),e.jsx(Zo,{id:"sidebar-menu",className:`h-full flex-1 overflow-auto ${n?"max-h-screen":"max-h-0 py-0 md:max-h-screen md:py-2"}`,closeNav:()=>r(!1),isCollapsed:t,links:Qn}),e.jsx(k,{onClick:()=>a(l=>!l),size:"icon",variant:"outline",className:"absolute -right-5 top-1/2 hidden rounded-full md:inline-flex",children:e.jsx(Wl,{stroke:1.5,className:`h-5 w-5 ${t?"rotate-180":""}`})})]})]})}function ac(){const[s,t]=Wn({key:"collapsed-sidebar",defaultValue:!1});return i.useEffect(()=>{const a=()=>{t(window.innerWidth<768?!1:s)};return a(),window.addEventListener("resize",a),()=>{window.removeEventListener("resize",a)}},[s,t]),[s,t]}function nc(){const[s,t]=ac();return e.jsxs("div",{className:"relative h-full overflow-hidden bg-background",children:[e.jsx(tc,{isCollapsed:s,setIsCollapsed:t}),e.jsx("main",{id:"content",className:`overflow-x-hidden pt-16 transition-[margin] md:overflow-y-hidden md:pt-0 ${s?"md:ml-14":"md:ml-64"} h-full`,children:e.jsx(Gt,{})})]})}const rc=Object.freeze(Object.defineProperty({__proto__:null,default:nc},Symbol.toStringTag,{value:"Module"})),ts=i.forwardRef(({className:s,...t},a)=>e.jsx(ye,{ref:a,className:f("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",s),...t}));ts.displayName=ye.displayName;const lc=({children:s,...t})=>e.jsx(ue,{...t,children:e.jsx(de,{className:"overflow-hidden p-0",children:e.jsx(ts,{className:"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:s})})}),hs=i.forwardRef(({className:s,...t},a)=>e.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[e.jsx(Jl,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),e.jsx(ye.Input,{ref:a,className:f("flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",s),...t})]}));hs.displayName=ye.Input.displayName;const as=i.forwardRef(({className:s,...t},a)=>e.jsx(ye.List,{ref:a,className:f("max-h-[300px] overflow-y-auto overflow-x-hidden",s),...t}));as.displayName=ye.List.displayName;const js=i.forwardRef((s,t)=>e.jsx(ye.Empty,{ref:t,className:"py-6 text-center text-sm",...s}));js.displayName=ye.Empty.displayName;const be=i.forwardRef(({className:s,...t},a)=>e.jsx(ye.Group,{ref:a,className:f("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",s),...t}));be.displayName=ye.Group.displayName;const _s=i.forwardRef(({className:s,...t},a)=>e.jsx(ye.Separator,{ref:a,className:f("-mx-1 h-px bg-border",s),...t}));_s.displayName=ye.Separator.displayName;const me=i.forwardRef(({className:s,...t},a)=>e.jsx(ye.Item,{ref:a,className:f("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none aria-selected:bg-accent aria-selected:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",s),...t}));me.displayName=ye.Item.displayName;function ic(){const s=[];for(const t of Qn)if(t.href&&s.push(t),t.sub)for(const a of t.sub)s.push({...a,parent:t.title});return s}function Ce(){const[s,t]=i.useState(!1),a=Ze(),n=ic();i.useEffect(()=>{const l=c=>{c.key==="k"&&(c.metaKey||c.ctrlKey)&&(c.preventDefault(),t(d=>!d))};return document.addEventListener("keydown",l),()=>document.removeEventListener("keydown",l)},[]);const r=i.useCallback(l=>{t(!1),a(l)},[a]);return e.jsxs(e.Fragment,{children:[e.jsxs(H,{variant:"outline",className:"relative h-9 w-9 p-0 xl:h-10 xl:w-60 xl:justify-start xl:px-3 xl:py-2",onClick:()=>t(!0),children:[e.jsx(Ql,{className:"h-4 w-4 xl:mr-2"}),e.jsx("span",{className:"hidden xl:inline-flex",children:"搜索..."}),e.jsx("span",{className:"sr-only",children:"搜索"}),e.jsxs("kbd",{className:"pointer-events-none absolute right-1.5 top-2 hidden h-6 select-none items-center gap-1 rounded border bg-muted px-1.5 font-mono text-[10px] font-medium opacity-100 xl:flex",children:[e.jsx("span",{className:"text-xs",children:"⌘"}),"K"]})]}),e.jsxs(lc,{open:s,onOpenChange:t,children:[e.jsx(hs,{placeholder:"搜索所有菜单和功能..."}),e.jsxs(as,{children:[e.jsx(js,{children:"未找到相关结果"}),e.jsx(be,{heading:"菜单导航",children:n.map(l=>e.jsxs(me,{value:`${l.parent?l.parent+" ":""}${l.title}`,onSelect:()=>r(l.href),children:[e.jsx("div",{className:"mr-2",children:l.icon}),e.jsx("span",{children:l.title}),l.parent&&e.jsx("span",{className:"ml-2 text-xs text-muted-foreground",children:l.parent})]},l.href))})]})]})]})}function Se(){const{theme:s,setTheme:t}=mo();return i.useEffect(()=>{const a=s==="dark"?"#020817":"#fff",n=document.querySelector("meta[name='theme-color']");n&&n.setAttribute("content",a)},[s]),e.jsx(k,{size:"icon",variant:"ghost",className:"rounded-full",onClick:()=>t(s==="light"?"dark":"light"),children:s==="light"?e.jsx(Zl,{size:20}):e.jsx(Xl,{size:20})})}const Zn=i.forwardRef(({className:s,...t},a)=>e.jsx(Za,{ref:a,className:f("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",s),...t}));Zn.displayName=Za.displayName;const Xn=i.forwardRef(({className:s,...t},a)=>e.jsx(Xa,{ref:a,className:f("aspect-square h-full w-full",s),...t}));Xn.displayName=Xa.displayName;const er=i.forwardRef(({className:s,...t},a)=>e.jsx(en,{ref:a,className:f("flex h-full w-full items-center justify-center rounded-full bg-muted",s),...t}));er.displayName=en.displayName;function ke(){const s=Ze(),t=Va(),a=ei(Io),n=()=>{En(),t(Fo()),s("/sign-in")},r=a?.email?.split("@")[0]||"User",l=r.substring(0,2).toUpperCase();return e.jsxs(vs,{children:[e.jsx(bs,{asChild:!0,children:e.jsx(k,{variant:"ghost",className:"relative h-8 w-8 rounded-full",children:e.jsxs(Zn,{className:"h-8 w-8",children:[e.jsx(Xn,{src:a?.avatar_url,alt:r}),e.jsx(er,{children:l})]})})}),e.jsxs(ms,{className:"w-56",align:"end",forceMount:!0,children:[e.jsx(Jt,{className:"font-normal",children:e.jsxs("div",{className:"flex flex-col space-y-1",children:[e.jsx("p",{className:"text-sm font-medium leading-none",children:r}),e.jsx("p",{className:"text-xs leading-none text-muted-foreground",children:a?.email||"user@example.com"})]})}),e.jsx(Ws,{}),e.jsx(oe,{asChild:!0,children:e.jsxs(Ns,{to:"/config/system",children:["设置",e.jsx(Ht,{children:"⌘S"})]})}),e.jsx(Ws,{}),e.jsxs(oe,{onClick:n,children:["退出登录",e.jsx(Ht,{children:"⇧⌘Q"})]})]})]})}const M=window?.settings?.secure_path,oc=()=>I.get(M+"/stat/getOrder"),cc=()=>I.get(M+"/stat/getStats"),ya=s=>I.get(M+"/stat/getTrafficRank",{params:s}),dc=()=>I.get(M+"/theme/getThemes"),xc=s=>I.post(M+"/theme/getThemeConfig",{name:s}),mc=(s,t)=>I.post(M+"/theme/saveThemeConfig",{name:s,config:t}),uc=s=>{const t=new FormData;return t.append("file",s),I.post(M+"/theme/upload",t,{headers:{"Content-Type":"multipart/form-data"}})},hc=s=>I.post(M+"/theme/delete",{name:s}),jc=s=>I.post(M+"/config/save",s),sr=()=>I.get(M+"/server/manage/getNodes"),gc=s=>I.post(M+"/server/manage/save",s),fc=s=>I.post(M+"/server/manage/drop",s),pc=s=>I.post(M+"/server/manage/copy",s),vc=s=>I.post(M+"/server/manage/update",s),bc=s=>I.post(M+"/server/manage/sort",s),St=()=>I.get(M+"/server/group/fetch"),yc=s=>I.post(M+"/server/group/save",s),Nc=s=>I.post(M+"/server/group/drop",s),tr=()=>I.get(M+"/server/route/fetch"),wc=s=>I.post(M+"/server/route/save",s),_c=s=>I.post(M+"/server/route/drop",s),Cc=()=>I.get(M+"/payment/fetch"),Sc=()=>I.get(M+"/payment/getPaymentMethods"),kc=s=>I.post(M+"/payment/getPaymentForm",s),Tc=s=>I.post(M+"/payment/save",s),Dc=s=>I.post(M+"/payment/drop",s),Pc=s=>I.post(M+"/payment/show",s),Fc=s=>I.post(M+"/payment/sort",s),Ic=()=>I.get(M+"/notice/fetch"),Vc=s=>I.post(M+"/notice/save",s),Rc=s=>I.post(M+"/notice/drop",s),Mc=s=>I.post(M+"/notice/show",s),zc=()=>I.get(M+"/knowledge/fetch"),Ec=s=>I.get(M+"/knowledge/fetch?id="+s),Oc=s=>I.post(M+"/knowledge/save",s),Lc=s=>I.post(M+"/knowledge/drop",s),$c=s=>I.post(M+"/knowledge/show",s),Ac=s=>I.post(M+"/knowledge/sort",s),zs=()=>I.get(M+"/plan/fetch"),Hc=s=>I.post(M+"/plan/save",s),Ft=s=>I.post(M+"/plan/update",s),Kc=s=>I.post(M+"/plan/drop",s),qc=s=>I.post(M+"/plan/sort",{ids:s}),ar=async s=>I.post(M+"/order/fetch",s),Uc=s=>I.post(M+"/order/detail",s),Gc=s=>I.post(M+"/order/paid",s),Bc=s=>I.post(M+"/order/cancel",s),Na=s=>I.post(M+"/order/update",s),Yc=s=>I.post(M+"/order/assign",s),Wc=s=>I.post(M+"/coupon/fetch",s),Jc=s=>I.post(M+"/coupon/generate",s),Qc=s=>I.post(M+"/coupon/drop",s),Zc=s=>I.post(M+"/coupon/update",s),Xc=s=>I.post(M+"/user/fetch",s),ed=s=>I.post(M+"/user/update",s),sd=s=>I.post(M+"/user/resetSecret",s),td=s=>I.post(M+"/user/generate",s),ad=s=>I.post(M+"/stat/getStatUser",s),nr=s=>I.post(M+"/ticket/fetch",s),nd=s=>I.get(M+"/ticket/fetch?id= "+s),rd=s=>I.post(M+"/ticket/reply",s),rr=s=>I.post(M+"/ticket/close",{id:s}),ns=(s="")=>I.get(M+"/config/fetch?key="+s),rs=s=>I.post(M+"/config/save",s),ld=()=>I.get(M+"/config/getEmailTemplate"),id=()=>I.post(M+"/config/testSendMail"),od=()=>I.post(M+"/config/setTelegramWebhook"),lr=si,Qt=i.forwardRef(({className:s,...t},a)=>e.jsx(sn,{ref:a,className:f("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",s),...t}));Qt.displayName=sn.displayName;const Js=i.forwardRef(({className:s,...t},a)=>e.jsx(tn,{ref:a,className:f("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",s),...t}));Js.displayName=tn.displayName;const cd=i.forwardRef(({className:s,...t},a)=>e.jsx(an,{ref:a,className:f("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",s),...t}));cd.displayName=an.displayName;const is={income:{main:"hsl(var(--primary))",gradient:{start:"hsl(var(--primary))",end:"transparent"}},commission:{main:"hsl(var(--secondary))",gradient:{start:"hsl(var(--secondary))",end:"transparent"}}},qs=s=>(s/100).toFixed(2),dd=({active:s,payload:t,label:a})=>s&&t&&t.length?e.jsxs("div",{className:"rounded-lg border bg-background p-3 shadow-sm",children:[e.jsx("div",{className:"mb-2 text-sm font-medium",children:a}),t.map((n,r)=>e.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[e.jsx("div",{className:"h-2 w-2 rounded-full",style:{backgroundColor:n.color}}),e.jsxs("span",{className:"text-muted-foreground",children:[n.name,":"]}),e.jsx("span",{className:"font-medium",children:n.name.includes("金额")?`¥${qs(n.value)}`:`${n.value}笔`})]},r))]}):null;function xd(){const[s,t]=i.useState("amount"),a=new Date,n=Bs(a,30),{data:r}=K({queryKey:["orderStat",{start_date:ds(n,"yyyy-MM-dd"),end_date:ds(a,"yyyy-MM-dd"),page_size:31}],queryFn:async()=>{const{data:l}=await oc({start_date:ds(n,"yyyy-MM-dd"),end_date:ds(a,"yyyy-MM-dd"),page_size:31});return l},refetchInterval:3e4});return r?e.jsxs(_e,{children:[e.jsxs(Te,{children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx(Oe,{children:"收入趋势"}),e.jsx(Vs,{children:`${r.summary.start_date} 至 ${r.summary.end_date}`})]}),e.jsx(lr,{value:s,onValueChange:l=>t(l),children:e.jsxs(Qt,{children:[e.jsx(Js,{value:"amount",children:"金额"}),e.jsx(Js,{value:"count",children:"笔数"})]})})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("div",{className:"text-sm text-muted-foreground",children:"总收入"}),e.jsxs("div",{className:"text-2xl font-bold",children:["¥",qs(r.summary.paid_total)]}),e.jsxs("div",{className:"text-xs text-muted-foreground",children:["共 ",r.summary.paid_count," 笔"]}),e.jsxs("div",{className:"text-xs text-muted-foreground",children:["平均订单金额 ¥",qs(r.summary.avg_paid_amount)]})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("div",{className:"text-sm text-muted-foreground",children:"总佣金"}),e.jsxs("div",{className:"text-2xl font-bold",children:["¥",qs(r.summary.commission_total)]}),e.jsxs("div",{className:"text-xs text-muted-foreground",children:["共 ",r.summary.commission_count," 笔"]}),e.jsxs("div",{className:"text-xs text-muted-foreground",children:["佣金比率 ",r.summary.commission_rate.toFixed(2),"%"]})]})]})]}),e.jsx(De,{children:e.jsx("div",{className:"h-[400px] w-full",children:e.jsx(ti,{width:"100%",height:"100%",children:e.jsxs(ai,{data:r.list,margin:{top:20,right:20,left:0,bottom:0},children:[e.jsxs("defs",{children:[e.jsxs("linearGradient",{id:"incomeGradient",x1:"0",y1:"0",x2:"0",y2:"1",children:[e.jsx("stop",{offset:"0%",stopColor:is.income.gradient.start,stopOpacity:.2}),e.jsx("stop",{offset:"100%",stopColor:is.income.gradient.end,stopOpacity:.1})]}),e.jsxs("linearGradient",{id:"commissionGradient",x1:"0",y1:"0",x2:"0",y2:"1",children:[e.jsx("stop",{offset:"0%",stopColor:is.commission.gradient.start,stopOpacity:.2}),e.jsx("stop",{offset:"100%",stopColor:is.commission.gradient.end,stopOpacity:.1})]})]}),e.jsx(ni,{dataKey:"date",axisLine:!1,tickLine:!1,tick:{fill:"hsl(var(--muted-foreground))",fontSize:12},tickFormatter:l=>ds(new Date(l),"MM-dd",{locale:oi})}),e.jsx(ri,{axisLine:!1,tickLine:!1,tick:{fill:"hsl(var(--muted-foreground))",fontSize:12},tickFormatter:l=>s==="amount"?`¥${qs(l)}`:`${l}笔`}),e.jsx(li,{strokeDasharray:"3 3",vertical:!1,stroke:"hsl(var(--border))",opacity:.3}),e.jsx(ii,{content:e.jsx(dd,{})}),s==="amount"?e.jsxs(e.Fragment,{children:[e.jsx(da,{type:"monotone",dataKey:"paid_total",name:"收款金额",stroke:is.income.main,fill:"url(#incomeGradient)",strokeWidth:2}),e.jsx(da,{type:"monotone",dataKey:"commission_total",name:"佣金金额",stroke:is.commission.main,fill:"url(#commissionGradient)",strokeWidth:2})]}):e.jsxs(e.Fragment,{children:[e.jsx(xa,{dataKey:"paid_count",name:"收款笔数",fill:is.income.main,radius:[4,4,0,0],maxBarSize:40}),e.jsx(xa,{dataKey:"commission_count",name:"佣金笔数",fill:is.commission.main,radius:[4,4,0,0],maxBarSize:40})]})]})})})})]}):e.jsxs(_e,{children:[e.jsxs(Te,{children:[e.jsx(Oe,{children:"收入趋势"}),e.jsx(Vs,{children:"加载中..."})]}),e.jsx(De,{children:e.jsx("div",{className:"flex h-[400px] w-full items-center justify-center",children:e.jsx("div",{className:"animate-pulse",children:"Loading..."})})})]})}var ie=(s=>(s[s.PENDING=0]="PENDING",s[s.PROCESSING=1]="PROCESSING",s[s.CANCELLED=2]="CANCELLED",s[s.COMPLETED=3]="COMPLETED",s[s.DISCOUNTED=4]="DISCOUNTED",s))(ie||{});const ks={0:"待支付",1:"开通中",2:"已取消",3:"已完成",4:"已折抵"},Hs={0:"yellow-500",1:"blue-500",2:"red-500",3:"green-500",4:"green-500"},md={1:"新购",2:"续费",3:"升级",5:"流量重置"};var xe=(s=>(s[s.PENDING=0]="PENDING",s[s.PROCESSING=1]="PROCESSING",s[s.VALID=2]="VALID",s[s.INVALID=3]="INVALID",s))(xe||{});const at={0:"待确认",1:"发放中",2:"有效",3:"无效"},nt={0:"yellow-500",1:"blue-500",2:"green-500",3:"red-500"};var Ds=(s=>(s.MONTH_PRICE="month_price",s.QUARTER_PRICE="quarter_price",s.HALF_YEAR_PRICE="half_year_price",s.YEAR_PRICE="year_price",s.TWO_YEAR_PRICE="two_year_price",s.THREE_YEAR_PRICE="three_year_price",s.ONETIME_PRICE="onetime_price",s.RESET_PRICE="reset_price",s))(Ds||{});const ht={month_price:"月付",quarter_price:"季付",half_year_price:"半年付",year_price:"年付",two_year_price:"两年付",three_year_price:"三年付",onetime_price:"一次性",reset_price:"流量重置包"};var je=(s=>(s.Shadowsocks="shadowsocks",s.Vmess="vmess",s.Trojan="trojan",s.Hysteria="hysteria",s.Vless="vless",s))(je||{});const ps=[{type:"shadowsocks",label:"Shadowsocks"},{type:"vmess",label:"VMess"},{type:"trojan",label:"Trojan"},{type:"hysteria",label:"Hysteria"},{type:"vless",label:"VLess"}],Je={shadowsocks:"#489851",vmess:"#CB3180",trojan:"#EBB749",hysteria:"#5684e6",vless:"#1a1a1a"};var kt=(s=>(s[s.AMOUNT=1]="AMOUNT",s[s.PERCENTAGE=2]="PERCENTAGE",s))(kt||{});const Zt={1:"按金额优惠",2:"按比例优惠"},ud={0:"正常",1:"锁定"};var Ps=(s=>(s[s.OPENING=0]="OPENING",s[s.CLOSED=1]="CLOSED",s))(Ps||{});const hd={0:"开启",1:"已关闭"};var We=(s=>(s[s.LOW=0]="LOW",s[s.MIDDLE=1]="MIDDLE",s[s.HIGH=2]="HIGH",s))(We||{});const Gs={0:"低",1:"中",2:"高"};function jd(){const s=Ze(),{data:t}=K({queryKey:["pendingTickets"],queryFn:()=>nr({filter:[{id:"status",value:0}]}),staleTime:1e3*30,refetchInterval:1e3*30}),{data:a}=K({queryKey:["pendingCommissions"],queryFn:()=>ar({filter:[{id:"commission_status",value:xe.PENDING},{id:"status",value:ie.COMPLETED}]}),staleTime:1e3*30,refetchInterval:1e3*30}),n=t?.data||[],r=a?.data||[],l=()=>{s("/finance/order",{state:{filters:[{id:"commission_status",value:xe.PENDING},{id:"status",value:ie.COMPLETED}]}})};return e.jsxs("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-4",children:[e.jsxs(_e,{className:`cursor-pointer transition-colors hover:bg-muted/50 ${n.length>0?"border-orange-500/50":""}`,onClick:()=>s("/user/ticket"),children:[e.jsxs(Te,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[e.jsx(Oe,{className:"text-sm font-medium",children:"待处理工单"}),e.jsx(ci,{className:`h-4 w-4 ${n.length>0?"text-orange-500":"text-muted-foreground"}`})]}),e.jsxs(De,{children:[e.jsx("div",{className:"text-2xl font-bold",children:n.length}),e.jsx("p",{className:"text-xs text-muted-foreground",children:n.length>0?"有待处理的工单需要关注":"暂无待处理工单"})]})]}),e.jsxs(_e,{className:`cursor-pointer transition-colors hover:bg-muted/50 ${r.length>0?"border-blue-500/50":""}`,onClick:l,children:[e.jsxs(Te,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[e.jsx(Oe,{className:"text-sm font-medium",children:"待处理佣金"}),e.jsx(di,{className:`h-4 w-4 ${r.length>0?"text-blue-500":"text-muted-foreground"}`})]}),e.jsxs(De,{children:[e.jsx("div",{className:"text-2xl font-bold",children:r.length}),e.jsx("p",{className:"text-xs text-muted-foreground",children:r.length>0?"有待处理的佣金需要确认":"暂无待处理佣金"})]})]})]})}function Ve({className:s,...t}){return e.jsx("div",{className:f("animate-pulse rounded-md bg-primary/10",s),...t})}function gd(){return e.jsxs(_e,{children:[e.jsxs(Te,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[e.jsx(Ve,{className:"h-4 w-[100px]"}),e.jsx(Ve,{className:"h-4 w-4"})]}),e.jsxs(De,{children:[e.jsx(Ve,{className:"h-8 w-[120px]"}),e.jsx("div",{className:"flex items-center pt-1",children:e.jsx(Ve,{className:"h-4 w-[100px]"})})]})]})}function fd(){return e.jsx("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-4",children:Array.from({length:4}).map((s,t)=>e.jsx(gd,{},t))})}function rt({title:s,value:t,icon:a,trend:n,className:r}){return e.jsxs(_e,{className:f("transition-colors hover:border-primary/50",r),children:[e.jsxs(Te,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[e.jsx(Oe,{className:"text-sm font-medium",children:s}),a]}),e.jsxs(De,{children:[e.jsx("div",{className:"text-2xl font-bold",children:t}),e.jsxs("div",{className:"flex items-center pt-1",children:[e.jsx(hi,{className:f("h-4 w-4",n.isPositive?"text-emerald-500":"text-red-500")}),e.jsxs("span",{className:f("ml-1 text-xs",n.isPositive?"text-emerald-500":"text-red-500"),children:[n.isPositive?"+":"-",Math.abs(n.value),"%"]}),e.jsx("span",{className:"ml-1 text-xs text-muted-foreground",children:n.label})]})]})]})}function pd({className:s}){const{data:t,isLoading:a}=K({queryKey:["dashboardStats"],queryFn:async()=>(await cc()).data,refetchInterval:3e5});return a||!t?e.jsx(fd,{}):e.jsxs("div",{className:f("grid gap-4 md:grid-cols-2 lg:grid-cols-4",s),children:[e.jsx(rt,{title:"本月收入",value:`¥${t.currentMonthIncome/100}`,icon:e.jsx(xi,{className:"h-4 w-4 text-emerald-500"}),trend:{value:t.monthIncomeGrowth,label:"vs 上月",isPositive:t.monthIncomeGrowth>0}}),e.jsx(rt,{title:"上月收入",value:`¥${t.lastMonthIncome/100}`,icon:e.jsx(mi,{className:"h-4 w-4 text-muted-foreground"}),trend:{value:t.lastMonthIncomeGrowth,label:"vs 上上月",isPositive:t.lastMonthIncomeGrowth>0}}),e.jsx(rt,{title:"上月佣金支出",value:`¥${t.lastMonthCommissionPayout/100}`,icon:e.jsx(ui,{className:"h-4 w-4 text-destructive"}),trend:{value:t.commissionGrowth,label:"vs 上上月",isPositive:t.commissionGrowth>0}}),e.jsx(rt,{title:"本月新增用户",value:t.currentMonthNewUsers,icon:e.jsx(nn,{className:"h-4 w-4 text-blue-500"}),trend:{value:t.userGrowth,label:"vs 上月",isPositive:t.userGrowth>0}})]})}const B=ji,os=wi,Y=gi,U=i.forwardRef(({className:s,children:t,...a},n)=>e.jsxs(rn,{ref:n,className:f("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",s),...a,children:[t,e.jsx(fi,{asChild:!0,children:e.jsx(Qe,{className:"h-4 w-4 opacity-50"})})]}));U.displayName=rn.displayName;const ir=i.forwardRef(({className:s,...t},a)=>e.jsx(ln,{ref:a,className:f("flex cursor-default items-center justify-center py-1",s),...t,children:e.jsx(pi,{className:"h-4 w-4"})}));ir.displayName=ln.displayName;const or=i.forwardRef(({className:s,...t},a)=>e.jsx(on,{ref:a,className:f("flex cursor-default items-center justify-center py-1",s),...t,children:e.jsx(Qe,{className:"h-4 w-4"})}));or.displayName=on.displayName;const G=i.forwardRef(({className:s,children:t,position:a="popper",...n},r)=>e.jsx(vi,{children:e.jsxs(cn,{ref:r,className:f("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",a==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",s),position:a,...n,children:[e.jsx(ir,{}),e.jsx(bi,{className:f("p-1",a==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),e.jsx(or,{})]})}));G.displayName=cn.displayName;const vd=i.forwardRef(({className:s,...t},a)=>e.jsx(dn,{ref:a,className:f("px-2 py-1.5 text-sm font-semibold",s),...t}));vd.displayName=dn.displayName;const A=i.forwardRef(({className:s,children:t,...a},n)=>e.jsxs(xn,{ref:n,className:f("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",s),...a,children:[e.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:e.jsx(yi,{children:e.jsx(us,{className:"h-4 w-4"})})}),e.jsx(Ni,{children:t})]}));A.displayName=xn.displayName;const bd=i.forwardRef(({className:s,...t},a)=>e.jsx(mn,{ref:a,className:f("-mx-1 my-1 h-px bg-muted",s),...t}));bd.displayName=mn.displayName;function et({className:s,classNames:t,showOutsideDays:a=!0,...n}){return e.jsx(_i,{showOutsideDays:a,className:f("p-3",s),classNames:{months:"flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",month:"space-y-4",caption:"flex justify-center pt-1 relative items-center",caption_label:"text-sm font-medium",nav:"space-x-1 flex items-center",nav_button:f(Rs({variant:"outline"}),"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"),nav_button_previous:"absolute left-1",nav_button_next:"absolute right-1",table:"w-full border-collapse space-y-1",head_row:"flex",head_cell:"text-muted-foreground rounded-md w-8 font-normal text-[0.8rem]",row:"flex w-full mt-2",cell:f("relative p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-accent [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected].day-range-end)]:rounded-r-md",n.mode==="range"?"[&:has(>.day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md":"[&:has([aria-selected])]:rounded-md"),day:f(Rs({variant:"ghost"}),"h-8 w-8 p-0 font-normal aria-selected:opacity-100"),day_range_start:"day-range-start",day_range_end:"day-range-end",day_selected:"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",day_today:"bg-accent text-accent-foreground",day_outside:"day-outside text-muted-foreground aria-selected:bg-accent/50 aria-selected:text-muted-foreground",day_disabled:"text-muted-foreground opacity-50",day_range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",day_hidden:"invisible",...t},components:{IconLeft:({className:r,...l})=>e.jsx(un,{className:f("h-4 w-4",r),...l}),IconRight:({className:r,...l})=>e.jsx(Yt,{className:f("h-4 w-4",r),...l})},...n})}et.displayName="Calendar";const Be=Si,Ye=ki,Ke=i.forwardRef(({className:s,align:t="center",sideOffset:a=4,...n},r)=>e.jsx(Ci,{children:e.jsx(hn,{ref:r,align:t,sideOffset:a,className:f("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",s),...n})}));Ke.displayName=hn.displayName;const Kt=i.forwardRef(({className:s,children:t,...a},n)=>e.jsxs(jn,{ref:n,className:f("relative overflow-hidden",s),...a,children:[e.jsx(Ti,{className:"h-full w-full rounded-[inherit]",children:t}),e.jsx(jt,{}),e.jsx(Di,{})]}));Kt.displayName=jn.displayName;const jt=i.forwardRef(({className:s,orientation:t="vertical",...a},n)=>e.jsx(gn,{ref:n,orientation:t,className:f("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",s),...a,children:e.jsx(Pi,{className:"relative flex-1 rounded-full bg-border"})}));jt.displayName=gn.displayName;const qt={today:{label:"今天",getValue:()=>({start:Ii(),end:new Date})},last7days:{label:"最近7天",getValue:()=>({start:Bs(new Date,7),end:new Date})},last30days:{label:"最近30天",getValue:()=>({start:Bs(new Date,30),end:new Date})},custom:{label:"自定义范围",getValue:()=>null}};function wa({selectedRange:s,customDateRange:t,onRangeChange:a,onCustomRangeChange:n}){return e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsxs(B,{value:s,onValueChange:a,children:[e.jsx(U,{className:"w-[140px]",children:e.jsx(Y,{placeholder:"选择时间范围"})}),e.jsx(G,{position:"popper",className:"z-50",children:Object.entries(qt).map(([r,{label:l}])=>e.jsx(A,{value:r,children:l},r))})]}),s==="custom"&&e.jsxs(Be,{children:[e.jsx(Ye,{asChild:!0,children:e.jsxs(H,{variant:"outline",className:f("justify-start text-left font-normal",!t&&"text-muted-foreground"),children:[e.jsx(yt,{className:"mr-2 h-4 w-4"}),t?.from?t.to?e.jsxs(e.Fragment,{children:[ds(t.from,"yyyy-MM-dd")," -"," ",ds(t.to,"yyyy-MM-dd")]}):ds(t.from,"yyyy-MM-dd"):e.jsx("span",{children:"选择日期范围"})]})}),e.jsx(Ke,{className:"w-auto p-0",align:"end",children:e.jsx(et,{initialFocus:!0,mode:"range",defaultMonth:t?.from,selected:{from:t?.from,to:t?.to},onSelect:r=>{r?.from&&r?.to&&n({from:r.from,to:r.to})},numberOfMonths:2})})]})]})}function yd({className:s}){const[t,a]=i.useState("today"),[n,r]=i.useState({from:Bs(new Date,7),to:new Date}),[l,c]=i.useState("today"),[d,m]=i.useState({from:Bs(new Date,7),to:new Date}),w=i.useMemo(()=>t==="custom"?{start:n.from,end:n.to}:qt[t].getValue(),[t,n]),j=i.useMemo(()=>l==="custom"?{start:d.from,end:d.to}:qt[l].getValue(),[l,d]),{data:b}=K({queryKey:["nodeTrafficRank",w.start,w.end],queryFn:()=>ya({type:"node",start_time:tt.round(w.start.getTime()/1e3),end_time:tt.round(w.end.getTime()/1e3)}),refetchInterval:3e4}),{data:x}=K({queryKey:["userTrafficRank",j.start,j.end],queryFn:()=>ya({type:"user",start_time:tt.round(j.start.getTime()/1e3),end_time:tt.round(j.end.getTime()/1e3)}),refetchInterval:3e4});return e.jsxs("div",{className:f("grid gap-4 md:grid-cols-2",s),children:[e.jsxs(_e,{children:[e.jsx(Te,{className:"flex-none pb-2",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs(Oe,{className:"flex items-center text-base font-medium",children:[e.jsx(Fi,{className:"mr-2 h-4 w-4"}),"节点流量排行"]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(wa,{selectedRange:t,customDateRange:n,onRangeChange:a,onCustomRangeChange:r}),e.jsx(ma,{className:"h-4 w-4 text-muted-foreground"})]})]})}),e.jsx(De,{className:"flex-1",children:b?.data?e.jsxs(Kt,{className:"h-[400px] pr-4",children:[e.jsx("div",{className:"space-y-3",children:b.data.map(y=>e.jsx("div",{className:"flex items-center justify-between space-x-2 rounded-lg bg-muted/50 p-2",children:e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"truncate text-sm font-medium",children:y.name}),e.jsxs("span",{className:f("ml-2 flex items-center text-xs font-medium",y.change>=0?"text-green-600":"text-red-600"),children:[y.change>=0?e.jsx(Mt,{className:"mr-1 h-3 w-3"}):e.jsx(zt,{className:"mr-1 h-3 w-3"}),Math.abs(y.change),"%"]})]}),e.jsxs("div",{className:"mt-1 flex items-center gap-2",children:[e.jsx("div",{className:"h-2 flex-1 overflow-hidden rounded-full bg-muted",children:e.jsx("div",{className:"h-full bg-primary transition-all",style:{width:`${y.value/b.data[0].value*100}%`}})}),e.jsxs("span",{className:"text-xs text-muted-foreground",children:[(y.value/1024/1024/1024).toFixed(2)," GB"]})]})]})},y.id))}),e.jsx(jt,{orientation:"vertical"})]}):e.jsx("div",{className:"flex h-[400px] items-center justify-center",children:e.jsx("div",{className:"animate-pulse",children:"Loading..."})})})]}),e.jsxs(_e,{children:[e.jsx(Te,{className:"flex-none pb-2",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs(Oe,{className:"flex items-center text-base font-medium",children:[e.jsx(nn,{className:"mr-2 h-4 w-4"}),"用户流量排行"]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(wa,{selectedRange:l,customDateRange:d,onRangeChange:c,onCustomRangeChange:m}),e.jsx(ma,{className:"h-4 w-4 text-muted-foreground"})]})]})}),e.jsx(De,{className:"flex-1",children:x?.data?e.jsxs(Kt,{className:"h-[400px] pr-4",children:[e.jsx("div",{className:"space-y-3",children:x.data.map(y=>e.jsx("div",{className:"flex items-center justify-between space-x-2 rounded-lg bg-muted/50 p-2",children:e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"truncate text-sm font-medium",children:y.name}),e.jsxs("span",{className:f("ml-2 flex items-center text-xs font-medium",y.change>=0?"text-green-600":"text-red-600"),children:[y.change>=0?e.jsx(Mt,{className:"mr-1 h-3 w-3"}):e.jsx(zt,{className:"mr-1 h-3 w-3"}),Math.abs(y.change),"%"]})]}),e.jsxs("div",{className:"mt-1 flex items-center gap-2",children:[e.jsx("div",{className:"h-2 flex-1 overflow-hidden rounded-full bg-muted",children:e.jsx("div",{className:"h-full bg-primary transition-all",style:{width:`${y.value/x.data[0].value*100}%`}})}),e.jsxs("span",{className:"text-xs text-muted-foreground",children:[(y.value/1024/1024/1024).toFixed(2)," GB"]})]})]})},y.id))}),e.jsx(jt,{orientation:"vertical"})]}):e.jsx("div",{className:"flex h-[400px] items-center justify-center",children:e.jsx("div",{className:"animate-pulse",children:"Loading..."})})})]})]})}const Nd=ys("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/10",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function E({className:s,variant:t,...a}){return e.jsx("div",{className:f(Nd({variant:t}),s),...a})}const Ks=window?.settings?.secure_path,_a={getSystemStatus:()=>I.get(`${Ks}/system/getSystemStatus`),getQueueStats:()=>I.get(`${Ks}/system/getQueueStats`),getQueueWorkload:()=>I.get(`${Ks}/system/getQueueWorkload`),getQueueMasters:()=>I.get(`${Ks}/system/getQueueMasters`),getSystemLog:s=>I.get(`${Ks}/system/getSystemLog`,{params:s})},xt=i.forwardRef(({className:s,value:t,...a},n)=>e.jsx(fn,{ref:n,className:f("relative h-2 w-full overflow-hidden rounded-full bg-primary/20",s),...a,children:e.jsx(Vi,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));xt.displayName=fn.displayName;function wd(){const[s,t]=i.useState(null),[a,n]=i.useState(null),[r,l]=i.useState(!0),[c,d]=i.useState(!1),m=async()=>{try{d(!0);const[b,x]=await Promise.all([_a.getSystemStatus(),_a.getQueueStats()]);t(b.data),n(x.data)}catch(b){console.error("Error fetching system data:",b)}finally{l(!1),d(!1)}};i.useEffect(()=>{m();const b=setInterval(m,3e4);return()=>clearInterval(b)},[]);const w=()=>{m()};if(r)return e.jsx("div",{className:"flex items-center justify-center p-6",children:e.jsx(Wt,{className:"h-6 w-6 animate-spin"})});const j=b=>b?e.jsx(Ei,{className:"h-5 w-5 text-green-500"}):e.jsx(Oi,{className:"h-5 w-5 text-red-500"});return e.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[e.jsxs(_e,{children:[e.jsxs(Te,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsxs(Oe,{className:"flex items-center gap-2",children:[e.jsx(Ri,{className:"h-5 w-5"}),"队列状态"]}),e.jsx(Vs,{children:"当前队列运行状态"})]}),e.jsx(H,{variant:"outline",size:"icon",onClick:w,disabled:c,children:e.jsx(Mi,{className:f("h-4 w-4",c&&"animate-spin")})})]}),e.jsx(De,{children:e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2 rounded-lg bg-muted/50 p-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[j(a?.status||!1),e.jsx("span",{className:"font-medium",children:"运行状态"})]}),e.jsx(E,{variant:a?.status?"secondary":"destructive",children:a?.status?"正常":"异常"})]}),e.jsxs("div",{className:"text-sm text-muted-foreground",children:["当前等待时间:",a?.wait?.default||0," 秒"]})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsx(ce,{children:e.jsxs(ne,{children:[e.jsx(re,{asChild:!0,children:e.jsxs("div",{className:"space-y-2 rounded-lg bg-muted/50 p-3",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:"近期任务数"}),e.jsx("p",{className:"text-2xl font-bold",children:a?.recentJobs||0}),e.jsx(xt,{value:(a?.recentJobs||0)/(a?.periods?.recentJobs||1)*100,className:"h-1"})]})}),e.jsx(te,{children:e.jsxs("p",{children:["统计时间范围: ",a?.periods?.recentJobs||0," 小时"]})})]})}),e.jsx(ce,{children:e.jsxs(ne,{children:[e.jsx(re,{asChild:!0,children:e.jsxs("div",{className:"space-y-2 rounded-lg bg-muted/50 p-3",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:"每分钟处理量"}),e.jsx("p",{className:"text-2xl font-bold",children:a?.jobsPerMinute||0}),e.jsx(xt,{value:(a?.jobsPerMinute||0)/(a?.queueWithMaxThroughput?.throughput||1)*100,className:"h-1"})]})}),e.jsx(te,{children:e.jsxs("p",{children:["最高吞吐量:"," ",a?.queueWithMaxThroughput?.throughput||0]})})]})})]})]})})]}),e.jsxs(_e,{children:[e.jsxs(Te,{children:[e.jsxs(Oe,{className:"flex items-center gap-2",children:[e.jsx(zi,{className:"h-5 w-5"}),"作业详情"]}),e.jsx(Vs,{children:"队列处理详细信息"})]}),e.jsx(De,{children:e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-2 rounded-lg bg-muted/50 p-3",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:"7日报错数量"}),e.jsx("p",{className:"text-2xl font-bold text-destructive",children:a?.failedJobs||0}),e.jsxs("div",{className:"text-xs text-muted-foreground",children:["保留 ",a?.periods?.failedJobs||0," 小时"]})]}),e.jsxs("div",{className:"space-y-2 rounded-lg bg-muted/50 p-3",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:"最长运行队列"}),e.jsxs("p",{className:"text-2xl font-bold",children:[a?.queueWithMaxRuntime?.runtime||0,"s"]}),e.jsx("div",{className:"truncate text-xs text-muted-foreground",children:a?.queueWithMaxRuntime?.name||"N/A"})]})]}),e.jsxs("div",{className:"rounded-lg bg-muted/50 p-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-sm text-muted-foreground",children:"活跃进程"}),e.jsxs("span",{className:"font-medium",children:[a?.processes||0," /"," ",(a?.processes||0)+(a?.pausedMasters||0)]})]}),e.jsx(xt,{value:(a?.processes||0)/((a?.processes||0)+(a?.pausedMasters||0))*100,className:"mt-2 h-1"})]})]})})]})]})}function _d(){return e.jsxs(fe,{children:[e.jsxs(pe,{children:[e.jsx("div",{className:"flex items-center",children:e.jsx("h1",{className:"text-2xl font-bold tracking-tight md:text-3xl",children:"仪表盘"})}),e.jsxs("div",{className:"ml-auto flex items-center space-x-4",children:[e.jsx(Ce,{}),e.jsx(Se,{}),e.jsx(ke,{})]})]}),e.jsx(Ne,{children:e.jsxs("div",{className:"space-y-6",children:[e.jsx("div",{className:"border-b pb-6",children:e.jsx(jd,{})}),e.jsxs("div",{className:"grid gap-6",children:[e.jsx(pd,{}),e.jsx(xd,{}),e.jsx(yd,{}),e.jsx(wd,{})]})]})})]})}const Cd=Object.freeze(Object.defineProperty({__proto__:null,default:_d},Symbol.toStringTag,{value:"Module"})),le=i.forwardRef(({className:s,orientation:t="horizontal",decorative:a=!0,...n},r)=>e.jsx(pn,{ref:r,decorative:a,orientation:t,className:f("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",s),...n}));le.displayName=pn.displayName;function Sd({className:s,items:t,...a}){const{pathname:n}=gt(),r=Ze(),[l,c]=i.useState(n??"/settings"),d=m=>{c(m),r(m)};return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"p-1 md:hidden",children:e.jsxs(B,{value:l,onValueChange:d,children:[e.jsx(U,{className:"h-12 sm:w-48",children:e.jsx(Y,{placeholder:"Theme"})}),e.jsx(G,{children:t.map(m=>e.jsx(A,{value:m.href,children:e.jsxs("div",{className:"flex gap-x-4 px-2 py-1",children:[e.jsx("span",{className:"scale-125",children:m.icon}),e.jsx("span",{className:"text-md",children:m.title})]})},m.href))})]})}),e.jsx("div",{className:"hidden w-full overflow-x-auto bg-background px-1 py-2 md:block",children:e.jsx("nav",{className:f("flex space-x-2 lg:flex-col lg:space-x-0 lg:space-y-1",s),...a,children:t.map(m=>e.jsxs(Ns,{to:m.href,className:f(Ie({variant:"ghost"}),n===m.href?"bg-muted hover:bg-muted":"hover:bg-transparent hover:underline","justify-start"),children:[e.jsx("span",{className:"mr-2",children:m.icon}),m.title]},m.href))})})]})}const cr=[{title:"站点设置",key:"site",icon:e.jsx(Li,{size:18}),href:"/config/system",description:"配置站点基本信息,包括站点名称、描述、货币单位等核心设置。"},{title:"安全设置",key:"safe",icon:e.jsx(Ja,{size:18}),href:"/config/system/safe",description:"配置系统安全相关选项,包括登录验证、密码策略、API访问等安全设置。"},{title:"订阅设置",key:"subscribe",icon:e.jsx(Qa,{size:18}),href:"/config/system/subscribe",description:"管理用户订阅相关配置,包括订阅链接格式、更新频率、流量统计等设置。"},{title:"邀请&佣金",key:"invite",icon:e.jsx($i,{size:18}),href:"/config/system/invite",description:"管理用户邀请和佣金系统,配置邀请奖励、分销规则等。"},{title:"节点配置",key:"server",icon:e.jsx(Wa,{size:18}),href:"/config/system/server",description:"配置节点通信和同步设置,包括通信密钥、轮询间隔、负载均衡等高级选项。"},{title:"邮件设置",key:"email",icon:e.jsx(Ai,{size:18}),href:"/config/system/email",description:"配置系统邮件服务,用于发送验证码、密码重置、通知等邮件,支持多种SMTP服务商。"},{title:"Telegram设置",key:"telegram",icon:e.jsx(Hi,{size:18}),href:"/config/system/telegram",description:"配置Telegram机器人功能,实现用户通知、账户绑定、指令交互等自动化服务。"},{title:"APP设置",key:"app",icon:e.jsx(Ya,{size:18}),href:"/config/system/app",description:"管理移动应用程序相关配置,包括API接口、版本控制、推送通知等功能设置。"}];function kd(){return e.jsxs(fe,{fadedBelow:!0,fixedHeight:!0,children:[e.jsxs(pe,{children:[e.jsx(Ce,{}),e.jsxs("div",{className:"ml-auto flex items-center space-x-4",children:[e.jsx(Se,{}),e.jsx(ke,{})]})]}),e.jsxs(Ne,{className:"flex flex-col",fixedHeight:!0,children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx("h1",{className:"text-2xl font-bold tracking-tight md:text-3xl",children:"系统设置"}),e.jsx("div",{className:"text-muted-foreground",children:"管理系统核心配置,包括站点、安全、订阅、邀请佣金、节点、邮件和通知等设置"})]}),e.jsx(le,{className:"my-6"}),e.jsxs("div",{className:"flex flex-1 flex-col space-y-8 overflow-auto lg:flex-row lg:space-x-12 lg:space-y-0",children:[e.jsx("aside",{className:"sticky top-0 lg:w-1/5",children:e.jsx(Sd,{items:cr})}),e.jsx("div",{className:"w-full p-1 pr-4 lg:max-w-xl",children:e.jsx("div",{className:"pb-16",children:e.jsx(Gt,{})})})]})]})]})}const Td=Object.freeze(Object.defineProperty({__proto__:null,default:kd},Symbol.toStringTag,{value:"Module"}));function Dd({title:s,description:t,children:a}){return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-medium",children:s}),e.jsx("p",{className:"text-sm text-muted-foreground",children:t})]}),e.jsx(le,{}),a]})}const O=i.forwardRef(({className:s,...t},a)=>e.jsx(vn,{className:f("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",s),...t,ref:a,children:e.jsx(Ki,{className:f("pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0")})}));O.displayName=vn.displayName;const Pd=o.object({logo:o.string().nullable().nullable(),force_https:o.number().nullable(),stop_register:o.number().nullable(),app_name:o.string().nullable(),app_description:o.string().nullable(),app_url:o.string().nullable(),subscribe_url:o.string().nullable(),try_out_plan_id:o.number().nullable(),try_out_hour:o.number().nullable(),tos_url:o.string().nullable(),currency:o.string().nullable(),currency_symbol:o.string().nullable()}),Fd={logo:"",force_https:0,stop_register:0,app_name:"",app_description:"",app_url:"",subscribe_url:"",try_out_plan_id:0,try_out_hour:0,tos_url:"",currency:"USD",currency_symbol:"$"};function Id(){const{data:s}=K({queryKey:["settings","site"],queryFn:()=>ns("site")}),{data:t}=K({queryKey:["plans"],queryFn:()=>zs()}),a=Z({resolver:ee(Pd),defaultValues:Fd,mode:"onChange"});i.useEffect(()=>{if(s?.data?.site){const r=s?.data?.site;Object.entries(r).forEach(([l,c])=>{a.setValue(l,c)})}},[s]);function n(r){rs(r).then(({data:l})=>{l&&V.success("更新成功")})}return e.jsx(se,{...a,children:e.jsxs("form",{onSubmit:a.handleSubmit(n),className:"space-y-8",children:[e.jsx(h,{control:a.control,name:"app_name",render:({field:r})=>e.jsxs(u,{children:[e.jsx(g,{children:"站点名称"}),e.jsx(v,{children:e.jsx(C,{placeholder:"请输入站点名称",...r})}),e.jsx(P,{children:"用于显示需要站点名称的地方。"}),e.jsx(S,{})]})}),e.jsx(h,{control:a.control,name:"app_description",render:({field:r})=>e.jsxs(u,{children:[e.jsx(g,{children:"站点描述"}),e.jsx(v,{children:e.jsx(C,{placeholder:"请输入站点描述",...r})}),e.jsx(P,{children:"用于显示需要站点名称的地方。"}),e.jsx(S,{})]})}),e.jsx(h,{control:a.control,name:"app_url",render:({field:r})=>e.jsxs(u,{children:[e.jsx(g,{children:"站点网址"}),e.jsx(v,{children:e.jsx(C,{placeholder:"请输入站点URL,末尾不要/",...r})}),e.jsx(P,{children:"当前网站最新网址,将会在邮件等需要用于网址处体现。"}),e.jsx(S,{})]})}),e.jsx(h,{control:a.control,name:"force_https",render:({field:r})=>e.jsxs(u,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(g,{className:"text-base",children:"强制HTTPS"}),e.jsx(P,{children:"当站点没有使用HTTPS,CDN或反代开启强制HTTPS时需要开启。"})]}),e.jsx(v,{children:e.jsx(O,{checked:r.value,onCheckedChange:r.onChange})})]})}),e.jsx(h,{control:a.control,name:"logo",render:({field:r})=>e.jsxs(u,{children:[e.jsx(g,{children:"LOGO"}),e.jsx(v,{children:e.jsx(C,{placeholder:"请输入LOGO URL,末尾不要/",...r})}),e.jsx(P,{children:"用于显示需要LOGO的地方。"}),e.jsx(S,{})]})}),e.jsx(h,{control:a.control,name:"subscribe_url",render:({field:r})=>e.jsxs(u,{children:[e.jsx(g,{children:"订阅URL"}),e.jsx(v,{children:e.jsx(C,{placeholder:'用于订阅所使用,多个订阅地址用","隔开.留空则为站点URL。',...r})}),e.jsx(P,{children:"用于订阅所使用,留空则为站点URL。"}),e.jsx(S,{})]})}),e.jsx(h,{control:a.control,name:"tos_url",render:({field:r})=>e.jsxs(u,{children:[e.jsx(g,{children:"用户条款(TOS)URL"}),e.jsx(v,{children:e.jsx(C,{placeholder:"请输入用户条款URL,末尾不要/",...r})}),e.jsx(P,{children:"用于跳转到用户条款(TOS)"}),e.jsx(S,{})]})}),e.jsx(h,{control:a.control,name:"stop_register",render:({field:r})=>e.jsxs(u,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(g,{className:"text-base",children:"停止新用户注册"}),e.jsx(P,{children:"开启后任何人都将无法进行注册。"})]}),e.jsx(v,{children:e.jsx(O,{checked:r.value,onCheckedChange:r.onChange})})]})}),e.jsx(h,{control:a.control,name:"try_out_plan_id",render:({field:r})=>e.jsxs(u,{children:[e.jsx(g,{children:"注册试用"}),e.jsxs("div",{className:"relative w-max",children:[e.jsx(v,{children:e.jsxs("select",{className:f(Ie({variant:"outline"}),"w-[200px] appearance-none font-normal"),...r,value:r.value||0,onChange:l=>r.onChange(Number(l.target.value)),children:[e.jsx("option",{value:0,children:"关闭"}),t?.data?.map(l=>e.jsx("option",{value:l.id,children:l.name},l.id))]})}),e.jsx(Qe,{className:"absolute right-3 top-2.5 h-4 w-4 opacity-50"})]}),e.jsx(P,{children:"选择需要试用的订阅,如果没有选项请先前往订阅管理添加。"}),e.jsx(S,{})]})}),e.jsx(h,{control:a.control,name:"currency",render:({field:r})=>e.jsxs(u,{children:[e.jsx(g,{children:"货币单位"}),e.jsx(v,{children:e.jsx(C,{placeholder:"CNY",...r})}),e.jsx(P,{children:"仅用于展示使用,更改后系统中所有的货币单位都将发生变更。"}),e.jsx(S,{})]})}),e.jsx(h,{control:a.control,name:"currency_symbol",render:({field:r})=>e.jsxs(u,{children:[e.jsx(g,{children:"货币符号"}),e.jsx(v,{children:e.jsx(C,{placeholder:"¥",...r})}),e.jsx(P,{children:"仅用于展示使用,更改后系统中所有的货币单位都将发生变更。"}),e.jsx(S,{})]})}),e.jsx(k,{type:"submit",children:"更新配置"})]})})}function Vd(){const s=cr.find(t=>t.key==="site");return e.jsx(Dd,{title:s.title,description:s.description,children:e.jsx(Id,{})})}const Rd=Object.freeze(Object.defineProperty({__proto__:null,default:Vd},Symbol.toStringTag,{value:"Module"})),gs=i.forwardRef(({className:s,...t},a)=>e.jsx("textarea",{className:f("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",s),ref:a,...t}));gs.displayName="Textarea";const Md=o.object({email_verify:o.boolean().nullable(),safe_mode_enable:o.boolean().nullable(),secure_path:o.string().nullable(),email_whitelist_enable:o.boolean().nullable(),email_whitelist_suffix:o.array(o.string().nullable()).nullable(),email_gmail_limit_enable:o.boolean().nullable(),recaptcha_enable:o.boolean().nullable(),recaptcha_key:o.string().nullable(),recaptcha_site_key:o.string().nullable(),register_limit_by_ip_enable:o.boolean().nullable(),register_limit_count:o.coerce.string().transform(s=>s===""?null:s).nullable(),register_limit_expire:o.coerce.string().transform(s=>s===""?null:s).nullable(),password_limit_enable:o.boolean().nullable(),password_limit_count:o.coerce.string().transform(s=>s===""?null:s).nullable(),password_limit_expire:o.coerce.string().transform(s=>s===""?null:s).nullable()}),zd={email_verify:!1,safe_mode_enable:!1,secure_path:"",email_whitelist_enable:!1,email_whitelist_suffix:[],email_gmail_limit_enable:!1,recaptcha_enable:!1,recaptcha_key:"",recaptcha_site_key:"",register_limit_by_ip_enable:!1,register_limit_count:"",register_limit_expire:"",password_limit_enable:!1,password_limit_count:"",password_limit_expire:""};function Ed(){const s=Z({resolver:ee(Md),defaultValues:zd,mode:"onChange"}),{data:t}=K({queryKey:["settings","safe"],queryFn:()=>ns("safe")});i.useEffect(()=>{if(t?.data.safe){const n=t.data.safe;Object.entries(n).forEach(([r,l])=>{typeof l=="number"?s.setValue(r,String(l)):s.setValue(r,l)})}},[t,s]);function a(n){rs(n).then(({data:r})=>{r&&V.success("保存成功")})}return e.jsx(se,{...s,children:e.jsxs("form",{onSubmit:s.handleSubmit(a),className:"space-y-8",children:[e.jsx(h,{control:s.control,name:"email_verify",render:({field:n})=>e.jsxs(u,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(g,{className:"text-base",children:"邮箱验证"}),e.jsx(P,{children:"开启后将会强制要求用户进行邮箱验证。"})]}),e.jsx(v,{children:e.jsx(O,{checked:n.value,onCheckedChange:n.onChange})})]})}),e.jsx(h,{control:s.control,name:"email_gmail_limit_enable",render:({field:n})=>e.jsxs(u,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(g,{className:"text-base",children:"禁止使用Gmail多别名"}),e.jsx(P,{children:"开启后Gmail多别名将无法注册。"})]}),e.jsx(v,{children:e.jsx(O,{checked:n.value,onCheckedChange:n.onChange})})]})}),e.jsx(h,{control:s.control,name:"safe_mode_enable",render:({field:n})=>e.jsxs(u,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(g,{className:"text-base",children:"安全模式"}),e.jsx(P,{children:"开启后除了站点URL以外的绑定本站点的域名访问都将会被403。"})]}),e.jsx(v,{children:e.jsx(O,{checked:n.value,onCheckedChange:n.onChange})})]})}),e.jsx(h,{control:s.control,name:"secure_path",render:({field:n})=>e.jsxs(u,{children:[e.jsx(g,{children:"后台路径"}),e.jsx(v,{children:e.jsx(C,{placeholder:"admin",...n})}),e.jsx(P,{children:"后台管理路径,修改后将会改变原有的admin路径"}),e.jsx(S,{})]})}),e.jsx(h,{control:s.control,name:"email_whitelist_enable",render:({field:n})=>e.jsxs(u,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(g,{className:"text-base",children:"邮箱后缀白名单"}),e.jsx(P,{children:"开启后在名单中的邮箱后缀才允许进行注册。"})]}),e.jsx(v,{children:e.jsx(O,{checked:n.value,onCheckedChange:n.onChange})})]})}),s.watch("email_whitelist_enable")&&e.jsx(h,{control:s.control,name:"email_whitelist_suffix",render:({field:n})=>e.jsxs(u,{children:[e.jsx(g,{children:"白名单后缀"}),e.jsx(v,{children:e.jsx(gs,{placeholder:"请输入后缀域名,逗号分割 如:qq.com,gmail.com",value:n.value?.length&&n.value.join(","),onChange:r=>{r.target.value&&n.onChange(r.target.value.split(","))}})}),e.jsx(P,{children:"请使用逗号进行分割,如:qq.com,gmail.com。"}),e.jsx(S,{})]})}),e.jsx(h,{control:s.control,name:"recaptcha_enable",render:({field:n})=>e.jsxs(u,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(g,{className:"text-base",children:"防机器人"}),e.jsx(P,{children:"开启后将会使用Google reCAPTCHA防止机器人。"})]}),e.jsx(v,{children:e.jsx(O,{checked:n.value,onCheckedChange:n.onChange})})]})}),s.watch("recaptcha_enable")&&e.jsx(h,{control:s.control,name:"recaptcha_key",render:({field:n})=>e.jsxs(u,{children:[e.jsx(g,{children:"密钥"}),e.jsx(v,{children:e.jsx(C,{placeholder:"请输入",...n})}),e.jsx(P,{children:"在Google reCAPTCHA申请的密钥。"}),e.jsx(S,{})]})}),s.watch("recaptcha_enable")&&e.jsx(h,{control:s.control,name:"recaptcha_site_key",render:({field:n})=>e.jsxs(u,{children:[e.jsx(g,{children:"网站密钥"}),e.jsx(v,{children:e.jsx(C,{placeholder:"请输入",...n})}),e.jsx(P,{children:"在Google reCAPTCH申请的网站密钥。"}),e.jsx(S,{})]})}),e.jsx(h,{control:s.control,name:"register_limit_by_ip_enable",render:({field:n})=>e.jsxs(u,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(g,{className:"text-base",children:"IP注册限制"}),e.jsx(P,{children:"开启后如果IP注册账户达到规则要求将会被限制注册,请注意IP判断可能因为CDN或前置代理导致问题。"})]}),e.jsx(v,{children:e.jsx(O,{checked:n.value,onCheckedChange:n.onChange})})]})}),s.watch("register_limit_by_ip_enable")&&e.jsx(h,{control:s.control,name:"register_limit_count",render:({field:n})=>e.jsxs(u,{children:[e.jsx(g,{children:"次数"}),e.jsx(v,{children:e.jsx(C,{placeholder:"请输入",...n})}),e.jsx(P,{children:"达到注册次数后开启惩罚。"}),e.jsx(S,{})]})}),s.watch("register_limit_by_ip_enable")&&e.jsx(h,{control:s.control,name:"register_limit_expire",render:({field:n})=>e.jsxs(u,{children:[e.jsx(g,{children:"惩罚时间(分钟)"}),e.jsx(v,{children:e.jsx(C,{placeholder:"请输入",...n})}),e.jsx(P,{children:"需要等待惩罚时间过后才可以再次注册。"}),e.jsx(S,{})]})}),e.jsx(h,{control:s.control,name:"password_limit_enable",render:({field:n})=>e.jsxs(u,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(g,{className:"text-base",children:"IP注册限制"}),e.jsx(P,{children:"开启后如果IP注册账户达到规则要求将会被限制注册,请注意IP判断可能因为CDN或前置代理导致问题。"})]}),e.jsx(v,{children:e.jsx(O,{checked:n.value,onCheckedChange:n.onChange})})]})}),s.watch("password_limit_enable")&&e.jsx(h,{control:s.control,name:"password_limit_count",render:({field:n})=>e.jsxs(u,{children:[e.jsx(g,{children:"次数"}),e.jsx(v,{children:e.jsx(C,{placeholder:"请输入",...n})}),e.jsx(P,{children:"达到注册次数后开启惩罚。"}),e.jsx(S,{})]})}),s.watch("password_limit_enable")&&e.jsx(h,{control:s.control,name:"password_limit_expire",render:({field:n})=>e.jsxs(u,{children:[e.jsx(g,{children:"惩罚时间(分钟)"}),e.jsx(v,{children:e.jsx(C,{placeholder:"请输入",...n})}),e.jsx(P,{children:"需要等待惩罚时间过后才可以再次登陆。"}),e.jsx(S,{})]})}),e.jsx(k,{type:"submit",children:"保存配置"})]})})}function Od(){return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-medium",children:"安全设置"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"配置系统安全相关选项,包括登录验证、密码策略、API访问等安全设置。"})]}),e.jsx(le,{}),e.jsx(Ed,{})]})}const Ld=Object.freeze(Object.defineProperty({__proto__:null,default:Od},Symbol.toStringTag,{value:"Module"})),$d=o.object({plan_change_enable:o.boolean().nullable().default(!1),reset_traffic_method:o.coerce.number().nullable().default(0),surplus_enable:o.boolean().nullable().default(!1),new_order_event_id:o.coerce.number().nullable().default(0),renew_order_event_id:o.coerce.number().nullable().default(0),change_order_event_id:o.coerce.number().nullable().default(0),show_info_to_server_enable:o.boolean().nullable().default(!1),show_protocol_to_server_enable:o.boolean().nullable().default(!1),default_remind_expire:o.boolean().nullable().default(!1),default_remind_traffic:o.boolean().nullable().default(!1),remind_mail_enable:o.boolean().nullable().default(!1)});function Ad(){const{data:s}=K({queryKey:["settings","subscribe"],queryFn:()=>ns("subscribe")}),t=Z({resolver:ee($d),mode:"onChange"});i.useEffect(()=>{if(s?.data?.subscribe){const n=s?.data?.subscribe;Object.entries(n).forEach(([r,l])=>{t.setValue(r,l)})}},[s]);function a(n){rs(n).then(({data:r})=>{r&&V.success("更新成功")})}return e.jsx(se,{...t,children:e.jsxs("form",{onSubmit:t.handleSubmit(a),className:"space-y-8",children:[e.jsx(h,{control:t.control,name:"plan_change_enable",render:({field:n})=>e.jsxs(u,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(g,{className:"text-base",children:"允许用户更改订阅"}),e.jsx(P,{children:"开启后用户将会可以对订阅计划进行变更。"})]}),e.jsx(v,{children:e.jsx(O,{checked:n.value,onCheckedChange:n.onChange})})]})}),e.jsx(h,{control:t.control,name:"reset_traffic_method",render:({field:n})=>e.jsxs(u,{children:[e.jsx(g,{children:"月流量重置方式"}),e.jsxs("div",{className:"relative w-max",children:[e.jsx(v,{children:e.jsxs("select",{className:f(Ie({variant:"outline"}),"w-[200px] appearance-none font-normal"),...n,children:[e.jsx("option",{value:"0",children:"每月1号"}),e.jsx("option",{value:"1",children:"按月重置"}),e.jsx("option",{value:"2",children:"不重置"}),e.jsx("option",{value:"3",children:"每年1月1号"}),e.jsx("option",{value:"4",children:"按年重置"})]})}),e.jsx(Qe,{className:"absolute right-3 top-2.5 h-4 w-4 opacity-50"})]}),e.jsx(P,{children:"全局流量重置方式,默认每月1号。可以在订阅管理为订阅单独设置。"}),e.jsx(S,{})]})}),e.jsx(h,{control:t.control,name:"surplus_enable",render:({field:n})=>e.jsxs(u,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(g,{className:"text-base",children:"开启折抵方案"}),e.jsx(P,{children:"开启后用户更换订阅将会由系统对原有订阅进行折抵,方案参考文档。"})]}),e.jsx(v,{children:e.jsx(O,{checked:n.value,onCheckedChange:n.onChange})})]})}),e.jsx(h,{control:t.control,name:"new_order_event_id",render:({field:n})=>e.jsxs(u,{children:[e.jsx(g,{children:"当订阅新购时触发事件"}),e.jsxs("div",{className:"relative w-max",children:[e.jsx(v,{children:e.jsxs("select",{className:f(Ie({variant:"outline"}),"w-[200px] appearance-none font-normal"),...n,children:[e.jsx("option",{value:"0",children:"不执行任何动作"}),e.jsx("option",{value:"1",children:"重置用户流量"})]})}),e.jsx(Qe,{className:"absolute right-3 top-2.5 h-4 w-4 opacity-50"})]}),e.jsx(P,{children:"新购订阅完成时将触发该任务。"}),e.jsx(S,{})]})}),e.jsx(h,{control:t.control,name:"renew_order_event_id",render:({field:n})=>e.jsxs(u,{children:[e.jsx(g,{children:"当订阅续费时触发事件"}),e.jsxs("div",{className:"relative w-max",children:[e.jsx(v,{children:e.jsxs("select",{className:f(Ie({variant:"outline"}),"w-[200px] appearance-none font-normal"),...n,children:[e.jsx("option",{value:"0",children:"不执行任何动作"}),e.jsx("option",{value:"1",children:"重置用户流量"})]})}),e.jsx(Qe,{className:"absolute right-3 top-2.5 h-4 w-4 opacity-50"})]}),e.jsx(P,{children:"续费订阅完成时将触发该任务。"}),e.jsx(S,{})]})}),e.jsx(h,{control:t.control,name:"change_order_event_id",render:({field:n})=>e.jsxs(u,{children:[e.jsx(g,{children:"当订阅变更时触发事件"}),e.jsxs("div",{className:"relative w-max",children:[e.jsx(v,{children:e.jsxs("select",{className:f(Ie({variant:"outline"}),"w-[200px] appearance-none font-normal"),...n,children:[e.jsx("option",{value:"0",children:"不执行任何动作"}),e.jsx("option",{value:"1",children:"重置用户流量"})]})}),e.jsx(Qe,{className:"absolute right-3 top-2.5 h-4 w-4 opacity-50"})]}),e.jsx(P,{children:"变更订阅完成时将触发该任务。"}),e.jsx(S,{})]})}),e.jsx(h,{control:t.control,name:"show_info_to_server_enable",render:({field:n})=>e.jsxs(u,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(g,{className:"text-base",children:"在订阅中展示订阅信息"}),e.jsx(P,{children:"开启后将会在用户订阅节点时输出订阅信息。"})]}),e.jsx(v,{children:e.jsx(O,{checked:n.value,onCheckedChange:n.onChange})})]})}),e.jsx(h,{control:t.control,name:"show_protocol_to_server_enable",render:({field:n})=>e.jsxs(u,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(g,{className:"text-base",children:"在订阅中线路名称中显示协议名称"}),e.jsx(P,{children:"开启后订阅线路会附带协议名称(例如: [Hy2]香港)"})]}),e.jsx(v,{children:e.jsx(O,{checked:n.value,onCheckedChange:n.onChange})})]})}),e.jsx(h,{control:t.control,name:"remind_mail_enable",render:({field:n})=>e.jsxs(u,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(g,{className:"text-base",children:"邮件提醒"}),e.jsx(P,{children:"开启后用户订阅即将到期时和流量告急时时将发送邮件通知。"})]}),e.jsx(v,{children:e.jsx(O,{checked:n.value||!1,onCheckedChange:n.onChange})})]})}),e.jsx(h,{control:t.control,name:"default_remind_expire",render:({field:n})=>e.jsxs(u,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(g,{className:"text-base",children:"用户订阅到期提醒的默认设置"}),e.jsx(P,{children:"开启后新注册用户将默认接收订阅到期提醒。"})]}),e.jsx(v,{children:e.jsx(O,{checked:n.value||!1,onCheckedChange:n.onChange})})]})}),e.jsx(h,{control:t.control,name:"default_remind_traffic",render:({field:n})=>e.jsxs(u,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(g,{className:"text-base",children:"用户流量告急提醒的默认设置"}),e.jsx(P,{children:"开启后新注册用户将默认接收流量告急提醒。"})]}),e.jsx(v,{children:e.jsx(O,{checked:n.value||!1,onCheckedChange:n.onChange})})]})}),e.jsx(k,{type:"submit",children:"保存设置"})]})})}function Hd(){return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-medium",children:"订阅设置"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"管理用户订阅相关配置,包括订阅链接格式、更新频率、流量统计等设置。"})]}),e.jsx(le,{}),e.jsx(Ad,{})]})}const Kd=Object.freeze(Object.defineProperty({__proto__:null,default:Hd},Symbol.toStringTag,{value:"Module"})),qd=o.object({invite_force:o.boolean().default(!1),invite_commission:o.coerce.string().default("0"),invite_gen_limit:o.coerce.string().default("0"),invite_never_expire:o.boolean().default(!1),commission_first_time_enable:o.boolean().default(!1),commission_auto_check_enable:o.boolean().default(!1),commission_withdraw_limit:o.coerce.string().default("0"),commission_withdraw_method:o.array(o.string()).default(["支付宝","USDT","Paypal"]),withdraw_close_enable:o.boolean().default(!1),commission_distribution_enable:o.boolean().default(!1),commission_distribution_l1:o.coerce.number().default(0),commission_distribution_l2:o.coerce.number().default(0),commission_distribution_l3:o.coerce.number().default(0)}),Ud={invite_force:!1,invite_commission:"0",invite_gen_limit:"0",invite_never_expire:!1,commission_first_time_enable:!1,commission_auto_check_enable:!1,commission_withdraw_limit:"0",commission_withdraw_method:["支付宝","USDT","Paypal"],withdraw_close_enable:!1,commission_distribution_enable:!1,commission_distribution_l1:0,commission_distribution_l2:0,commission_distribution_l3:0};function Gd(){const{data:s}=K({queryKey:["settings","invite"],queryFn:()=>ns("invite")}),t=Z({resolver:ee(qd),defaultValues:Ud,mode:"onChange"});i.useEffect(()=>{if(s?.data?.invite){const n=s?.data?.invite;Object.entries(n).forEach(([r,l])=>{typeof l=="number"?t.setValue(r,String(l)):t.setValue(r,l)})}},[s,t]);function a(n){rs(n).then(r=>{r.data&&V.success("更新成功")})}return e.jsx(se,{...t,children:e.jsxs("form",{onSubmit:t.handleSubmit(a),className:"space-y-8",children:[e.jsx(h,{control:t.control,name:"invite_force",render:({field:n})=>e.jsxs(u,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(g,{className:"text-base",children:"开启强制邀请"}),e.jsx(P,{children:"开启后只有被邀请的用户才可以进行注册。"})]}),e.jsx(v,{children:e.jsx(O,{checked:n.value,onCheckedChange:n.onChange})})]})}),e.jsx(h,{control:t.control,name:"invite_commission",render:({field:n})=>e.jsxs(u,{children:[e.jsx(g,{children:"邀请佣金百分比"}),e.jsx(v,{children:e.jsx(C,{placeholder:"请输入",...n})}),e.jsx(P,{children:"默认全局的佣金分配比例,你可以在用户管理单独配置单个比例。"}),e.jsx(S,{})]})}),e.jsx(h,{control:t.control,name:"invite_gen_limit",render:({field:n})=>e.jsxs(u,{children:[e.jsx(g,{children:"用户可创建邀请码上限"}),e.jsx(v,{children:e.jsx(C,{placeholder:"请输入",...n})}),e.jsx(P,{children:"用户可创建邀请码上限"}),e.jsx(S,{})]})}),e.jsx(h,{control:t.control,name:"invite_never_expire",render:({field:n})=>e.jsxs(u,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(g,{className:"text-base",children:"邀请码永不失效"}),e.jsx(P,{children:"开启后邀请码被使用后将不会失效,否则使用过后即失效。"})]}),e.jsx(v,{children:e.jsx(O,{checked:n.value,onCheckedChange:n.onChange})})]})}),e.jsx(h,{control:t.control,name:"commission_first_time_enable",render:({field:n})=>e.jsxs(u,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(g,{className:"text-base",children:"佣金仅首次发放"}),e.jsx(P,{children:"开启后被邀请人首次支付时才会产生佣金,可以在用户管理对用户进行单独配置。"})]}),e.jsx(v,{children:e.jsx(O,{checked:n.value,onCheckedChange:n.onChange})})]})}),e.jsx(h,{control:t.control,name:"commission_auto_check_enable",render:({field:n})=>e.jsxs(u,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(g,{className:"text-base",children:"佣金自动确认"}),e.jsx(P,{children:"开启后佣金将会在订单完成3日后自动进行确认。"})]}),e.jsx(v,{children:e.jsx(O,{checked:n.value,onCheckedChange:n.onChange})})]})}),e.jsx(h,{control:t.control,name:"commission_withdraw_limit",render:({field:n})=>e.jsxs(u,{children:[e.jsx(g,{children:"提现单申请门槛(元)"}),e.jsx(v,{children:e.jsx(C,{placeholder:"请输入",...n})}),e.jsx(P,{children:"小于门槛金额的提现单将不会被提交。"}),e.jsx(S,{})]})}),e.jsx(h,{control:t.control,name:"commission_withdraw_method",render:({field:n})=>e.jsxs(u,{children:[e.jsx(g,{children:"提现方式"}),e.jsx(v,{children:e.jsx(C,{placeholder:"请输入",...n})}),e.jsx(P,{children:"可以支持的提现方式。"}),e.jsx(S,{})]})}),e.jsx(h,{control:t.control,name:"withdraw_close_enable",render:({field:n})=>e.jsxs(u,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(g,{className:"text-base",children:"关闭提现"}),e.jsx(P,{children:"关闭后将禁止用户申请提现,且邀请佣金将会直接进入用户余额。"})]}),e.jsx(v,{children:e.jsx(O,{checked:n.value,onCheckedChange:n.onChange})})]})}),e.jsx(h,{control:t.control,name:"commission_distribution_enable",render:({field:n})=>e.jsxs(u,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(g,{className:"text-base",children:"三级分销"}),e.jsxs(P,{children:["开启后将佣金将按照设置的3成比例进行分成,三成比例合计请不要",">","100%。"]})]}),e.jsx(v,{children:e.jsx(O,{checked:n.value,onCheckedChange:n.onChange})})]})}),t.watch("commission_distribution_enable")&&e.jsxs(e.Fragment,{children:[e.jsx(h,{control:t.control,name:"commission_distribution_l1",render:({field:n})=>e.jsxs(u,{children:[e.jsx(g,{children:"一级邀请人比例"}),e.jsx(v,{children:e.jsx(C,{placeholder:"请输入比例如:50",...n})}),e.jsx(S,{})]})}),e.jsx(h,{control:t.control,name:"commission_distribution_l2",render:({field:n})=>e.jsxs(u,{children:[e.jsx(g,{children:"二级邀请人比例"}),e.jsx(v,{children:e.jsx(C,{placeholder:"请输入比例如:50",...n})}),e.jsx(S,{})]})}),e.jsx(h,{control:t.control,name:"commission_distribution_l3",render:({field:n})=>e.jsxs(u,{children:[e.jsx(g,{children:"三级邀请人比例"}),e.jsx(v,{children:e.jsx(C,{placeholder:"请输入比例如:50",...n})}),e.jsx(S,{})]})})]}),e.jsx(k,{type:"submit",children:"保存设置"})]})})}function Bd(){return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-medium",children:"邀请&佣金设置"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"邀请注册、佣金相关设置。"})]}),e.jsx(le,{}),e.jsx(Gd,{})]})}const Yd=Object.freeze(Object.defineProperty({__proto__:null,default:Bd},Symbol.toStringTag,{value:"Module"})),Wd=o.object({frontend_theme:o.string().nullable(),frontend_theme_sidebar:o.string().nullable(),frontend_theme_header:o.string().nullable(),frontend_theme_color:o.string().nullable(),frontend_background_url:o.string().url().nullable()}),Jd={frontend_theme:"",frontend_theme_sidebar:"",frontend_theme_header:"",frontend_theme_color:"",frontend_background_url:""};function Qd(){const{data:s}=K({queryKey:["settings","frontend"],queryFn:()=>ns("frontend")}),t=Z({resolver:ee(Wd),defaultValues:Jd,mode:"onChange"});i.useEffect(()=>{if(s?.data?.frontend){const n=s?.data?.frontend;Object.entries(n).forEach(([r,l])=>{t.setValue(r,l)})}},[s]);function a(n){rs(n).then(({data:r})=>{r&&V.success("更新成功")})}return e.jsx(se,{...t,children:e.jsxs("form",{onSubmit:t.handleSubmit(a),className:"space-y-8",children:[e.jsx(h,{control:t.control,name:"frontend_theme_sidebar",render:({field:n})=>e.jsxs(u,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(g,{className:"text-base",children:"边栏风格"}),e.jsx(P,{children:"边栏风格"})]}),e.jsx(v,{children:e.jsx(O,{checked:n.value,onCheckedChange:n.onChange})})]})}),e.jsx(h,{control:t.control,name:"frontend_theme_header",render:({field:n})=>e.jsxs(u,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(g,{className:"text-base",children:"头部风格"}),e.jsx(P,{children:"边栏风格"})]}),e.jsx(v,{children:e.jsx(O,{checked:n.value,onCheckedChange:n.onChange})})]})}),e.jsx(h,{control:t.control,name:"frontend_theme_color",render:({field:n})=>e.jsxs(u,{children:[e.jsx(g,{children:"主题色"}),e.jsxs("div",{className:"relative w-max",children:[e.jsx(v,{children:e.jsxs("select",{className:f(Ie({variant:"outline"}),"w-[200px] appearance-none font-normal"),...n,children:[e.jsx("option",{value:"default",children:"默认"}),e.jsx("option",{value:"black",children:"黑色"}),e.jsx("option",{value:"blackblue",children:"暗蓝色"}),e.jsx("option",{value:"green",children:"奶绿色"})]})}),e.jsx(Qe,{className:"absolute right-3 top-2.5 h-4 w-4 opacity-50"})]}),e.jsx(P,{children:"主题色"}),e.jsx(S,{})]})}),e.jsx(h,{control:t.control,name:"frontend_background_url",render:({field:n})=>e.jsxs(u,{children:[e.jsx(g,{children:"背景"}),e.jsx(v,{children:e.jsx(C,{placeholder:"请输入图片地址",...n})}),e.jsx(P,{children:"将会在后台登录页面进行展示。"}),e.jsx(S,{})]})}),e.jsx(k,{type:"submit",children:"保存设置"})]})})}function Zd(){return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-medium",children:"个性化设置"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"自定义系统界面外观,包括主题风格、布局、颜色方案、背景图等个性化选项。"})]}),e.jsx(le,{}),e.jsx(Qd,{})]})}const Xd=Object.freeze(Object.defineProperty({__proto__:null,default:Zd},Symbol.toStringTag,{value:"Module"})),ex=o.object({server_pull_interval:o.coerce.number().nullable(),server_push_interval:o.coerce.number().nullable(),server_token:o.string().nullable()}),sx={server_pull_interval:0,server_push_interval:0,server_token:""};function tx(){const s=Z({resolver:ee(ex),defaultValues:sx,mode:"onChange"}),{data:t}=K({queryKey:["settings","server"],queryFn:()=>ns("server")});i.useEffect(()=>{if(t?.data.server){const n=t.data.server;Object.entries(n).forEach(([r,l])=>{s.setValue(r,l)})}},[t]);function a(n){rs(n).then(({data:r})=>{r&&V.success("保存成功")})}return e.jsx(se,{...s,children:e.jsxs("form",{onSubmit:s.handleSubmit(a),className:"space-y-8",children:[e.jsx(h,{control:s.control,name:"server_token",render:({field:n})=>e.jsxs(u,{children:[e.jsx(g,{children:"通讯密钥"}),e.jsx(v,{children:e.jsx(C,{placeholder:"请输入",...n})}),e.jsx(P,{children:"Xboard与节点通讯的密钥,以便数据不会被他人获取。"}),e.jsx(S,{})]})}),e.jsx(h,{control:s.control,name:"server_pull_interval",render:({field:n})=>e.jsxs(u,{children:[e.jsx(g,{children:"节点拉取动作轮询间隔"}),e.jsx(v,{children:e.jsx(C,{placeholder:"请输入",...n})}),e.jsx(P,{children:"节点从面板获取数据的间隔频率。"}),e.jsx(S,{})]})}),e.jsx(h,{control:s.control,name:"server_push_interval",render:({field:n})=>e.jsxs(u,{children:[e.jsx(g,{children:"节点推送动作轮询间隔"}),e.jsx(v,{children:e.jsx(C,{placeholder:"请输入",...n})}),e.jsx(P,{children:"节点推送数据到面板的间隔频率。"}),e.jsx(S,{})]})}),e.jsx(k,{type:"submit",children:"保存设置"})]})})}function ax(){return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-medium",children:"节点配置"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"配置节点通信和同步设置,包括通信密钥、轮询间隔、负载均衡等高级选项。"})]}),e.jsx(le,{}),e.jsx(tx,{})]})}const nx=Object.freeze(Object.defineProperty({__proto__:null,default:ax},Symbol.toStringTag,{value:"Module"})),rx=o.object({email_template:o.string().nullable(),email_host:o.string().nullable(),email_port:o.string().regex(/^\d+$/).nullable(),email_username:o.string().nullable(),email_password:o.string().nullable(),email_encryption:o.string().nullable(),email_from_address:o.string().email().nullable()}),lx={email_template:"classic",email_host:"",email_port:"465",email_username:"",email_password:"",email_encryption:"",email_from_address:""};function ix(){const s=Z({resolver:ee(rx),defaultValues:lx,mode:"onChange"}),{data:t}=K({queryKey:["settings","email"],queryFn:()=>ns("email")}),{data:a}=K({queryKey:["emailTemplate"],queryFn:()=>ld()});i.useEffect(()=>{if(t?.data.email){const l=t.data.email;Object.entries(l).forEach(([c,d])=>{s.setValue(c,d)})}},[t]);const{isLoading:n,refetch:r}=K({queryKey:["sendTestMail"],queryFn:()=>id().then(()=>V.success("发送成功")),enabled:!1});return e.jsxs(se,{...s,children:[e.jsx(h,{control:s.control,name:"email_host",render:({field:l})=>e.jsxs(u,{children:[e.jsx(g,{children:"SMTP服务器地址"}),e.jsx(v,{children:e.jsx(C,{placeholder:"请输入",...l})}),e.jsx(P,{children:"由邮件服务商提供的服务地址"}),e.jsx(S,{})]})}),e.jsx(h,{control:s.control,name:"email_port",render:({field:l})=>e.jsxs(u,{children:[e.jsx(g,{children:"SMTP服务端口"}),e.jsx(v,{children:e.jsx(C,{placeholder:"请输入",...l})}),e.jsx(P,{children:"常见的端口有25, 465, 587"}),e.jsx(S,{})]})}),e.jsx(h,{control:s.control,name:"email_encryption",render:({field:l})=>e.jsxs(u,{children:[e.jsx(g,{children:"SMTP加密方式"}),e.jsx(v,{children:e.jsx(C,{placeholder:"请输入",...l})}),e.jsx(P,{children:"465端口加密方式一般为SSL,587端口加密方式一般为TLS"}),e.jsx(S,{})]})}),e.jsx(h,{control:s.control,name:"email_username",render:({field:l})=>e.jsxs(u,{children:[e.jsx(g,{children:"SMTP账号"}),e.jsx(v,{children:e.jsx(C,{placeholder:"请输入",...l})}),e.jsx(P,{children:"由邮件服务商提供的账号"}),e.jsx(S,{})]})}),e.jsx(h,{control:s.control,name:"email_password",render:({field:l})=>e.jsxs(u,{children:[e.jsx(g,{children:"SMTP密码"}),e.jsx(v,{children:e.jsx(C,{placeholder:"请输入",...l})}),e.jsx(P,{children:"由邮件服务商提供的密码"}),e.jsx(S,{})]})}),e.jsx(h,{control:s.control,name:"email_from_address",render:({field:l})=>e.jsxs(u,{children:[e.jsx(g,{children:"发件地址"}),e.jsx(v,{children:e.jsx(C,{placeholder:"请输入",...l})}),e.jsx(P,{children:"由邮件服务商提供的发件地址"}),e.jsx(S,{})]})}),e.jsx(h,{control:s.control,name:"email_template",render:({field:l})=>e.jsxs(u,{children:[e.jsx(g,{children:"邮件模板"}),e.jsxs("div",{className:"relative w-max",children:[e.jsx(v,{children:e.jsx("select",{className:f(Ie({variant:"outline"}),"w-[200px] appearance-none font-normal"),...l,children:a?.data?.map(c=>e.jsx("option",{value:c,children:c},c))})}),e.jsx(Qe,{className:"absolute right-3 top-2.5 h-4 w-4 opacity-50"})]}),e.jsx(P,{children:"你可以在文档查看如何自定义邮件模板"}),e.jsx(S,{})]})}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx(k,{type:"submit",onClick:()=>{s.handleSubmit(l=>{console.log(l),rs(l).then(({data:c})=>{c&&V.success("保存成功")})})()},children:"保存设置"}),e.jsx(k,{loading:n,onClick:()=>{r()},children:"发送测试邮件"})]})]})}function ox(){return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-medium",children:"邮件设置"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"配置系统邮件服务,用于发送验证码、密码重置、通知等邮件,支持多种SMTP服务商。"})]}),e.jsx(le,{}),e.jsx(ix,{})]})}const cx=Object.freeze(Object.defineProperty({__proto__:null,default:ox},Symbol.toStringTag,{value:"Module"})),dx=o.object({telegram_bot_enable:o.boolean().nullable(),telegram_bot_token:o.string().nullable(),telegram_discuss_link:o.string().nullable()}),xx={telegram_bot_enable:!1,telegram_bot_token:"",telegram_discuss_link:""};function mx(){const s=Z({resolver:ee(dx),defaultValues:xx,mode:"onChange"}),{data:t}=K({queryKey:["settings","telegram"],queryFn:()=>ns("telegram")});i.useEffect(()=>{if(t?.data.telegram){const c=t.data.telegram;Object.entries(c).forEach(([d,m])=>{s.setValue(d,m)})}},[t]);const{mutate:a,status:n}=Et({mutationFn:c=>rs(c).then(({data:d})=>d&&V.success("保存成功")),mutationKey:["settings","telegram"]}),{mutate:r,status:l}=Et({mutationFn:c=>od().then(({data:d})=>d&&V.success("保存成功")),mutationKey:["settings","settelegramWebhook"]});return e.jsxs(se,{...s,children:[e.jsx(h,{control:s.control,name:"telegram_bot_token",render:({field:c})=>e.jsxs(u,{children:[e.jsx(g,{children:"机器人Token"}),e.jsx(v,{children:e.jsx(C,{placeholder:"0000000000:xxxxxxxxx_xxxxxxxxxxxxxxx",...c})}),e.jsx(P,{children:"请输入由Botfather提供的token。"}),e.jsx(S,{})]})}),s.watch("telegram_bot_token")&&e.jsxs(u,{children:[e.jsx(g,{children:"设置Webhook"}),e.jsx("div",{children:e.jsx(k,{loading:l=="pending",onClick:()=>{r()},children:"一键设置"})}),e.jsx(P,{children:"对机器人进行Webhook设置,不设置将无法收到Telegram通知。"}),e.jsx(S,{})]}),e.jsx(h,{control:s.control,name:"telegram_bot_enable",render:({field:c})=>e.jsxs(u,{children:[e.jsx(g,{children:"开启机器人通知"}),e.jsx(P,{children:"开启后bot将会对绑定了telegram的管理员和用户进行基础通知。"}),e.jsx(v,{children:e.jsx(O,{checked:c.value,onCheckedChange:c.onChange})}),e.jsx(S,{})]})}),e.jsx(h,{control:s.control,name:"telegram_discuss_link",render:({field:c})=>e.jsxs(u,{children:[e.jsx(g,{children:"群组地址"}),e.jsx(v,{children:e.jsx(C,{placeholder:"https://t.me/xxxxxx",...c})}),e.jsx(P,{children:"填写后将会在用户端展示,或者被用于需要的地方。"}),e.jsx(S,{})]})}),e.jsx(k,{type:"submit",loading:n==="pending",onClick:()=>{s.handleSubmit(c=>{console.log(c),a(c)})()},children:"保存设置"})]})}function ux(){return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-medium",children:"Telegram设置"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"配置Telegram机器人功能,实现用户通知、账户绑定、指令交互等自动化服务。"})]}),e.jsx(le,{}),e.jsx(mx,{})]})}const hx=Object.freeze(Object.defineProperty({__proto__:null,default:ux},Symbol.toStringTag,{value:"Module"})),jx=o.object({windows_version:o.string().nullable(),windows_download_url:o.string().nullable(),macos_version:o.string().nullable(),macos_download_url:o.string().nullable(),android_version:o.string().nullable(),android_download_url:o.string().nullable()}),gx={windows_version:"",windows_download_url:"",macos_version:"",macos_download_url:"",android_version:"",android_download_url:""};function fx(){const s=Z({resolver:ee(jx),defaultValues:gx,mode:"onChange"}),{data:t}=K({queryKey:["settings","app"],queryFn:()=>ns("app")});i.useEffect(()=>{if(t?.data.app){const r=t.data.app;Object.entries(r).forEach(([l,c])=>{s.setValue(l,c)})}},[t]);const{mutate:a,status:n}=Et({mutationFn:r=>rs(r).then(({data:l})=>l&&V.success("保存成功")),mutationKey:["settings","app","update"]});return e.jsxs(se,{...s,children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:"Windows"}),e.jsx("div",{className:"text-[0.8rem] text-muted-foreground",children:"Windows端版本号及下载地址"}),e.jsxs("div",{children:[e.jsx("div",{className:"mb-1",children:e.jsx(h,{control:s.control,name:"windows_version",render:({field:r})=>e.jsxs(u,{children:[e.jsx(v,{children:e.jsx(C,{placeholder:"1.0.0",...r})}),e.jsx(S,{})]})})}),e.jsx("div",{children:e.jsx(h,{control:s.control,name:"windows_download_url",render:({field:r})=>e.jsxs(u,{children:[e.jsx(v,{children:e.jsx(C,{placeholder:"https://xxx.com/xxx.exe",...r})}),e.jsx(S,{})]})})})]})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:"macOS"}),e.jsx("div",{className:"text-[0.8rem] text-muted-foreground",children:"macOS端版本号及下载地址"}),e.jsxs("div",{children:[e.jsx("div",{className:"mb-1",children:e.jsx(h,{control:s.control,name:"mac_version",render:({field:r})=>e.jsxs(u,{children:[e.jsx(v,{children:e.jsx(C,{placeholder:"1.0.0",...r})}),e.jsx(S,{})]})})}),e.jsx("div",{children:e.jsx(h,{control:s.control,name:"mac_download_url",render:({field:r})=>e.jsxs(u,{children:[e.jsx(v,{children:e.jsx(C,{placeholder:"https://xxx.com/xxx.dmg",...r})}),e.jsx(S,{})]})})})]})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:"Android"}),e.jsx("div",{className:"text-[0.8rem] text-muted-foreground",children:"Android端版本号及下载地址"}),e.jsxs("div",{children:[e.jsx("div",{className:"mb-1",children:e.jsx(h,{control:s.control,name:"android_version",render:({field:r})=>e.jsxs(u,{children:[e.jsx(v,{children:e.jsx(C,{placeholder:"1.0.0",...r})}),e.jsx(S,{})]})})}),e.jsx("div",{children:e.jsx(h,{control:s.control,name:"android_download_url",render:({field:r})=>e.jsxs(u,{children:[e.jsx(v,{children:e.jsx(C,{placeholder:"https://xxx.com/xxx.apk",...r})}),e.jsx(S,{})]})})})]})]}),e.jsx(k,{type:"submit",loading:n=="pending",onClick:()=>{s.handleSubmit(r=>{a(r)})()},children:"保存设置"})]})}function px(){return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-medium",children:"APP设置"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"管理移动应用程序相关配置,包括API接口、版本控制、推送通知等功能设置。"})]}),e.jsx(le,{}),e.jsx(fx,{})]})}const vx=Object.freeze(Object.defineProperty({__proto__:null,default:px},Symbol.toStringTag,{value:"Module"})),Xt=i.forwardRef(({className:s,...t},a)=>e.jsx("div",{className:"relative w-full overflow-auto",children:e.jsx("table",{ref:a,className:f("w-full caption-bottom text-sm",s),...t})}));Xt.displayName="Table";const ea=i.forwardRef(({className:s,...t},a)=>e.jsx("thead",{ref:a,className:f("[&_tr]:border-b",s),...t}));ea.displayName="TableHeader";const sa=i.forwardRef(({className:s,...t},a)=>e.jsx("tbody",{ref:a,className:f("[&_tr:last-child]:border-0",s),...t}));sa.displayName="TableBody";const bx=i.forwardRef(({className:s,...t},a)=>e.jsx("tfoot",{ref:a,className:f("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",s),...t}));bx.displayName="TableFooter";const xs=i.forwardRef(({className:s,...t},a)=>e.jsx("tr",{ref:a,className:f("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",s),...t}));xs.displayName="TableRow";const ta=i.forwardRef(({className:s,...t},a)=>e.jsx("th",{ref:a,className:f("h-10 px-2 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",s),...t}));ta.displayName="TableHead";const Is=i.forwardRef(({className:s,...t},a)=>e.jsx("td",{ref:a,className:f("p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",s),...t}));Is.displayName="TableCell";const yx=i.forwardRef(({className:s,...t},a)=>e.jsx("caption",{ref:a,className:f("mt-4 text-sm text-muted-foreground",s),...t}));yx.displayName="TableCaption";function Nx({table:s}){const[t,a]=i.useState("");i.useEffect(()=>{a((s.getState().pagination.pageIndex+1).toString())},[s.getState().pagination.pageIndex]);const n=r=>{const l=parseInt(r);!isNaN(l)&&l>=1&&l<=s.getPageCount()?s.setPageIndex(l-1):a((s.getState().pagination.pageIndex+1).toString())};return e.jsxs("div",{className:"flex flex-col-reverse gap-4 px-2 py-4 sm:flex-row sm:items-center sm:justify-between",children:[e.jsxs("div",{className:"flex-1 text-sm text-muted-foreground",children:["已选择 ",s.getFilteredSelectedRowModel().rows.length," 项, 共"," ",s.getFilteredRowModel().rows.length," 项"]}),e.jsxs("div",{className:"flex flex-col-reverse items-center gap-4 sm:flex-row sm:gap-6 lg:gap-8",children:[e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx("p",{className:"text-sm font-medium",children:"每页显示"}),e.jsxs(B,{value:`${s.getState().pagination.pageSize}`,onValueChange:r=>{s.setPageSize(Number(r))},children:[e.jsx(U,{className:"h-8 w-[70px]",children:e.jsx(Y,{placeholder:s.getState().pagination.pageSize})}),e.jsx(G,{side:"top",children:[10,20,30,40,50,100,500].map(r=>e.jsx(A,{value:`${r}`,children:r},r))})]})]}),e.jsxs("div",{className:"flex items-center justify-center space-x-2 text-sm font-medium",children:[e.jsx("span",{children:"第"}),e.jsx(C,{type:"text",value:t,onChange:r=>a(r.target.value),onBlur:r=>n(r.target.value),onKeyDown:r=>{r.key==="Enter"&&n(r.currentTarget.value)},className:"h-8 w-[50px] text-center"}),e.jsxs("span",{children:["页,共 ",s.getPageCount()," 页"]})]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsxs(k,{variant:"outline",className:"hidden h-8 w-8 p-0 lg:flex",onClick:()=>s.setPageIndex(0),disabled:!s.getCanPreviousPage(),children:[e.jsx("span",{className:"sr-only",children:"跳转到第一页"}),e.jsx(qi,{className:"h-4 w-4"})]}),e.jsxs(k,{variant:"outline",className:"h-8 w-8 p-0",onClick:()=>s.previousPage(),disabled:!s.getCanPreviousPage(),children:[e.jsx("span",{className:"sr-only",children:"上一页"}),e.jsx(un,{className:"h-4 w-4"})]}),e.jsxs(k,{variant:"outline",className:"h-8 w-8 p-0",onClick:()=>s.nextPage(),disabled:!s.getCanNextPage(),children:[e.jsx("span",{className:"sr-only",children:"下一页"}),e.jsx(Yt,{className:"h-4 w-4"})]}),e.jsxs(k,{variant:"outline",className:"hidden h-8 w-8 p-0 lg:flex",onClick:()=>s.setPageIndex(s.getPageCount()-1),disabled:!s.getCanNextPage(),children:[e.jsx("span",{className:"sr-only",children:"跳转到最后一页"}),e.jsx(Ui,{className:"h-4 w-4"})]})]})]})]})}function qe({table:s,toolbar:t,draggable:a=!1,onDragStart:n,onDragEnd:r,onDragOver:l,onDragLeave:c,onDrop:d,showPagination:m=!0,isLoading:w=!1}){const j=i.useRef(null),b=s.getAllColumns().filter(T=>T.getIsPinned()==="left"),x=s.getAllColumns().filter(T=>T.getIsPinned()==="right"),y=T=>b.slice(0,T).reduce((p,_)=>p+(_.getSize()??0),0),D=T=>x.slice(T+1).reduce((p,_)=>p+(_.getSize()??0),0);return e.jsxs("div",{className:"space-y-4",children:[typeof t=="function"?t(s):t,e.jsx("div",{ref:j,className:"relative overflow-auto rounded-md border bg-card",children:e.jsx("div",{className:"overflow-auto",children:e.jsxs(Xt,{children:[e.jsx(ea,{children:s.getHeaderGroups().map(T=>e.jsx(xs,{className:"hover:bg-transparent",children:T.headers.map((p,_)=>{const z=p.column.getIsPinned()==="left",N=p.column.getIsPinned()==="right",R=z?y(b.indexOf(p.column)):void 0,W=N?D(x.indexOf(p.column)):void 0;return e.jsx(ta,{colSpan:p.colSpan,style:{width:p.getSize(),...z&&{left:R},...N&&{right:W}},className:f("h-11 bg-card px-4 text-muted-foreground",(z||N)&&["sticky z-20","before:absolute before:bottom-0 before:top-0 before:w-[1px] before:bg-border",z&&"before:right-0",N&&"before:left-0"]),children:p.isPlaceholder?null:mt(p.column.columnDef.header,p.getContext())},p.id)})},T.id))}),e.jsx(sa,{children:s.getRowModel().rows?.length?s.getRowModel().rows.map((T,p)=>e.jsx(xs,{"data-state":T.getIsSelected()&&"selected",className:"hover:bg-muted/50",draggable:a,onDragStart:_=>n?.(_,p),onDragEnd:r,onDragOver:l,onDragLeave:c,onDrop:_=>d?.(_,p),children:T.getVisibleCells().map((_,z)=>{const N=_.column.getIsPinned()==="left",R=_.column.getIsPinned()==="right",W=N?y(b.indexOf(_.column)):void 0,L=R?D(x.indexOf(_.column)):void 0;return e.jsx(Is,{style:{width:_.column.getSize(),...N&&{left:W},...R&&{right:L}},className:f("bg-card",(N||R)&&["sticky z-20","before:absolute before:bottom-0 before:top-0 before:w-[1px] before:bg-border",N&&"before:right-0",R&&"before:left-0"]),children:mt(_.column.columnDef.cell,_.getContext())},_.id)})},T.id)):e.jsx(xs,{children:e.jsx(Is,{colSpan:s.getAllColumns().length,className:"h-24 text-center",children:"暂无数据"})})})]})})}),m&&e.jsx(Nx,{table:s})]})}const dr=(s,t)=>{let a=null;switch(s.field_type){case"input":a=e.jsx(C,{placeholder:s.placeholder,...t});break;case"textarea":a=e.jsx(gs,{placeholder:s.placeholder,...t});break;case"select":a=e.jsx("select",{className:f(Rs({variant:"outline"}),"w-full appearance-none font-normal"),...t,children:s.select_options&&Object.keys(s.select_options).map(n=>e.jsx("option",{value:n,children:s.select_options?.[n]},n))});break;default:a=null;break}return a},wx=o.object({id:o.number().nullable(),name:o.string().min(2,"名称至少需要2个字符").max(30,"名称不能超过30个字符"),icon:o.string().optional().nullable(),notify_domain:o.string().refine(s=>!s||/^https?:\/\/\S+/.test(s),"请输入有效的URL").optional().nullable(),handling_fee_fixed:o.coerce.number().min(0).optional().nullable(),handling_fee_percent:o.coerce.number().min(0).max(100).optional().nullable(),payment:o.string().min(1,"请选择支付接口"),config:o.record(o.string(),o.string())}),Ca={id:null,name:"",icon:"",notify_domain:"",handling_fee_fixed:0,handling_fee_percent:0,payment:"",config:{}};function xr({refetch:s,dialogTrigger:t,type:a="add",defaultFormValues:n=Ca}){const[r,l]=i.useState(!1),[c,d]=i.useState(!1),[m,w]=i.useState([]),[j,b]=i.useState([]),x=Z({resolver:ee(wx),defaultValues:n,mode:"onChange"}),y=x.watch("payment");i.useEffect(()=>{r&&(async()=>{const{data:p}=await Sc();w(p)})()},[r]),i.useEffect(()=>{if(!y||!r)return;(async()=>{try{const p={payment:y,...a==="edit"&&{id:Number(x.getValues("id"))}},{data:_}=await kc(p);b(_);const z=_.reduce((N,R)=>(R.field_name&&(N[R.field_name]=R.value??""),N),{});x.setValue("config",z)}catch{V.error("获取支付方式表单失败")}})()},[y,r,x,a]);const D=async T=>{d(!0),(await Tc(T)).data&&(V.success("保存成功"),x.reset(Ca),s(),l(!1)),d(!1)};return e.jsxs(ue,{open:r,onOpenChange:l,children:[e.jsx(Pe,{asChild:!0,children:t||e.jsxs(k,{variant:"outline",size:"sm",className:"space-x-2",children:[e.jsx(ve,{icon:"ion:add"})," ",e.jsx("div",{children:"添加支付方式"})]})}),e.jsxs(de,{className:"sm:max-w-[425px]",children:[e.jsx(ge,{children:e.jsx(he,{children:a==="add"?"添加支付方式":"编辑支付方式"})}),e.jsx(se,{...x,children:e.jsxs("form",{onSubmit:x.handleSubmit(D),className:"space-y-4",children:[e.jsx(h,{control:x.control,name:"name",render:({field:T})=>e.jsxs(u,{children:[e.jsx(g,{children:"显示名称"}),e.jsx(v,{children:e.jsx(C,{placeholder:"请输入支付名称",...T})}),e.jsx(P,{children:"用于前端显示"}),e.jsx(S,{})]})}),e.jsx(h,{control:x.control,name:"icon",render:({field:T})=>e.jsxs(u,{children:[e.jsx(g,{children:"图标URL"}),e.jsx(v,{children:e.jsx(C,{placeholder:"https://example.com/icon.svg",...T})}),e.jsx(P,{children:"用于前端显示的图标地址"}),e.jsx(S,{})]})}),e.jsx(h,{control:x.control,name:"notify_domain",render:({field:T})=>e.jsxs(u,{children:[e.jsx(g,{children:"通知域名"}),e.jsx(v,{children:e.jsx(C,{placeholder:"https://example.com",...T})}),e.jsx(P,{children:"网关通知将发送到该域名"}),e.jsx(S,{})]})}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsx(h,{control:x.control,name:"handling_fee_percent",render:({field:T})=>e.jsxs(u,{children:[e.jsx(g,{children:"百分比手续费(%)"}),e.jsx(v,{children:e.jsx(C,{type:"number",placeholder:"0-100",...T})}),e.jsx(S,{})]})}),e.jsx(h,{control:x.control,name:"handling_fee_fixed",render:({field:T})=>e.jsxs(u,{children:[e.jsx(g,{children:"固定手续费"}),e.jsx(v,{children:e.jsx(C,{type:"number",placeholder:"0",...T})}),e.jsx(S,{})]})})]}),e.jsx(h,{control:x.control,name:"payment",render:({field:T})=>e.jsxs(u,{children:[e.jsx(g,{children:"支付接口"}),e.jsxs(B,{value:T.value,onValueChange:T.onChange,children:[e.jsx(v,{children:e.jsx(U,{children:e.jsx(Y,{placeholder:"请选择支付接口"})})}),e.jsx(G,{children:m.map(p=>e.jsx(A,{value:p,children:p},p))})]}),e.jsx(S,{})]})}),j.map(T=>e.jsx(h,{control:x.control,name:`config.${T.field_name}`,render:({field:p})=>e.jsxs(u,{children:[e.jsx(g,{children:T.label}),e.jsx(v,{children:dr(T,p)}),e.jsx(S,{})]})},T.field_name)),e.jsxs(Fe,{className:"gap-2",children:[e.jsx(Xs,{asChild:!0,children:e.jsx(k,{type:"button",variant:"outline",children:"取消"})}),e.jsx(k,{type:"submit",disabled:c,className:f(c&&"cursor-not-allowed opacity-50"),children:c?"保存中...":"提交"})]})]})})]})]})}function F({column:s,title:t,tooltip:a,className:n}){return s.getCanSort()?e.jsx("div",{className:"flex items-center gap-1",children:e.jsx("div",{className:"flex items-center gap-2",children:e.jsxs(k,{variant:"ghost",size:"default",className:f("-ml-3 flex h-8 items-center gap-2 text-nowrap font-medium hover:bg-muted/60",n),onClick:()=>s.toggleSorting(s.getIsSorted()==="asc"),children:[e.jsx("span",{children:t}),a&&e.jsx(ce,{delayDuration:100,children:e.jsxs(ne,{children:[e.jsx(re,{asChild:!0,children:e.jsx(ua,{className:"h-4 w-4 cursor-pointer text-muted-foreground"})}),e.jsx(te,{children:a})]})}),s.getIsSorted()==="asc"?e.jsx(Mt,{className:"h-4 w-4 text-foreground/70"}):s.getIsSorted()==="desc"?e.jsx(zt,{className:"h-4 w-4 text-foreground/70"}):e.jsx(Gi,{className:"h-4 w-4 text-muted-foreground/70 transition-colors hover:text-foreground/70"})]})})}):e.jsxs("div",{className:f("flex items-center space-x-1 text-nowrap py-2 font-medium text-muted-foreground",n),children:[e.jsx("span",{children:t}),a&&e.jsx(ce,{delayDuration:100,children:e.jsxs(ne,{children:[e.jsx(re,{children:e.jsx(ua,{className:"h-4 w-4 text-muted-foreground"})}),e.jsx(te,{children:a})]})})]})}const _x=Bi,Cx=Yi,Sx=Wi,mr=i.forwardRef(({className:s,...t},a)=>e.jsx(bn,{className:f("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",s),...t,ref:a}));mr.displayName=bn.displayName;const ur=i.forwardRef(({className:s,...t},a)=>e.jsxs(Sx,{children:[e.jsx(mr,{}),e.jsx(yn,{ref:a,className:f("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",s),...t})]}));ur.displayName=yn.displayName;const hr=({className:s,...t})=>e.jsx("div",{className:f("flex flex-col space-y-2 text-center sm:text-left",s),...t});hr.displayName="AlertDialogHeader";const jr=({className:s,...t})=>e.jsx("div",{className:f("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",s),...t});jr.displayName="AlertDialogFooter";const gr=i.forwardRef(({className:s,...t},a)=>e.jsx(Nn,{ref:a,className:f("text-lg font-semibold",s),...t}));gr.displayName=Nn.displayName;const fr=i.forwardRef(({className:s,...t},a)=>e.jsx(wn,{ref:a,className:f("text-sm text-muted-foreground",s),...t}));fr.displayName=wn.displayName;const pr=i.forwardRef(({className:s,...t},a)=>e.jsx(_n,{ref:a,className:f(Rs(),s),...t}));pr.displayName=_n.displayName;const vr=i.forwardRef(({className:s,...t},a)=>e.jsx(Cn,{ref:a,className:f(Rs({variant:"outline"}),"mt-2 sm:mt-0",s),...t}));vr.displayName=Cn.displayName;function Ue({onConfirm:s,children:t,title:a="确认操作",description:n="确定要执行此操作吗?",cancelText:r="取消",confirmText:l="确认",variant:c="default",className:d}){return e.jsxs(_x,{children:[e.jsx(Cx,{asChild:!0,children:t}),e.jsxs(ur,{className:f("sm:max-w-[425px]",d),children:[e.jsxs(hr,{children:[e.jsx(gr,{children:a}),e.jsx(fr,{children:n})]}),e.jsxs(jr,{children:[e.jsx(vr,{asChild:!0,children:e.jsx(k,{variant:"outline",children:r})}),e.jsx(pr,{asChild:!0,children:e.jsx(k,{variant:c,onClick:s,children:l})})]})]})]})}const br=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M11.29 15.29a2 2 0 0 0-.12.15a.8.8 0 0 0-.09.18a.6.6 0 0 0-.06.18a1.4 1.4 0 0 0 0 .2a.84.84 0 0 0 .08.38a.9.9 0 0 0 .54.54a.94.94 0 0 0 .76 0a.9.9 0 0 0 .54-.54A1 1 0 0 0 13 16a1 1 0 0 0-.29-.71a1 1 0 0 0-1.42 0M12 2a10 10 0 1 0 10 10A10 10 0 0 0 12 2m0 18a8 8 0 1 1 8-8a8 8 0 0 1-8 8m0-13a3 3 0 0 0-2.6 1.5a1 1 0 1 0 1.73 1A1 1 0 0 1 12 9a1 1 0 0 1 0 2a1 1 0 0 0-1 1v1a1 1 0 0 0 2 0v-.18A3 3 0 0 0 12 7"})}),kx=({refetch:s,isSortMode:t=!1})=>[{id:"drag-handle",header:()=>null,cell:()=>e.jsx("div",{className:t?"cursor-move":"opacity-0",children:e.jsx(Nt,{className:"size-4"})}),size:40,enableSorting:!1},{accessorKey:"id",header:({column:a})=>e.jsx(F,{column:a,title:"ID"}),cell:({row:a})=>e.jsx(E,{variant:"outline",children:a.getValue("id")}),enableSorting:!0,size:60},{accessorKey:"enable",header:({column:a})=>e.jsx(F,{column:a,title:"启用"}),cell:({row:a})=>e.jsx(O,{defaultChecked:a.getValue("enable"),onCheckedChange:async()=>{const{data:n}=await Pc({id:a.original.id});n||s()}}),enableSorting:!1,size:100},{accessorKey:"name",header:({column:a})=>e.jsx(F,{column:a,title:"显示名称"}),cell:({row:a})=>e.jsx("div",{className:"flex items-center",children:e.jsx("span",{className:"max-w-[200px] truncate font-medium",children:a.getValue("name")})}),enableSorting:!1,size:200},{accessorKey:"payment",header:({column:a})=>e.jsx(F,{column:a,title:"支付接口"}),cell:({row:a})=>e.jsx("div",{className:"flex items-center",children:e.jsx("span",{className:"max-w-[200px] truncate font-medium",children:a.getValue("payment")})}),enableSorting:!1,size:200},{accessorKey:"notify_url",header:({column:a})=>e.jsxs("div",{className:"flex items-center",children:[e.jsx(F,{column:a,title:"通知地址"}),e.jsx(ce,{delayDuration:100,children:e.jsxs(ne,{children:[e.jsx(re,{className:"ml-1",children:e.jsx(br,{className:"h-4 w-4"})}),e.jsx(te,{children:"支付网关将会把数据通知到本地址,请通过防火墙放行本地址。"})]})})]}),cell:({row:a})=>e.jsx("div",{className:"flex items-center",children:e.jsx("span",{className:"max-w-[300px] truncate font-medium",children:a.getValue("notify_url")})}),enableSorting:!1,size:3e3},{id:"actions",header:({column:a})=>e.jsx(F,{className:"justify-end",column:a,title:"操作"}),cell:({row:a})=>e.jsxs("div",{className:"flex items-center justify-end space-x-2",children:[e.jsx(xr,{refetch:s,dialogTrigger:e.jsxs(k,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-muted",children:[e.jsx(ws,{className:"h-4 w-4 text-muted-foreground hover:text-foreground"}),e.jsx("span",{className:"sr-only",children:"编辑"})]}),type:"edit",defaultFormValues:a.original}),e.jsx(Ue,{title:"删除确认",description:"确定要删除该支付方式吗?此操作无法撤销。",onConfirm:async()=>{const{data:n}=await Dc({id:a.original.id});n&&s()},children:e.jsxs(k,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-destructive/10",children:[e.jsx(Xe,{className:"h-4 w-4 text-muted-foreground hover:text-destructive"}),e.jsx("span",{className:"sr-only",children:"删除"})]})})]}),size:100}];function Tx({table:s,refetch:t,saveOrder:a,isSortMode:n}){const r=s.getState().columnFilters.length>0;return e.jsxs("div",{className:"flex items-center justify-between",children:[n?e.jsx("p",{className:"text-sm text-muted-foreground",children:"拖拽支付方式进行排序,完成后点击保存"}):e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(xr,{refetch:t}),e.jsx(C,{placeholder:"搜索支付方式...",value:s.getColumn("name")?.getFilterValue()??"",onChange:l=>s.getColumn("name")?.setFilterValue(l.target.value),className:"h-8 w-[250px]"}),r&&e.jsxs(k,{variant:"ghost",onClick:()=>s.resetColumnFilters(),children:["重置",e.jsx(Le,{className:"ml-2 h-4 w-4"})]})]}),e.jsx("div",{className:"flex items-center gap-2",children:e.jsx(k,{size:"sm",variant:n?"default":"outline",onClick:a,children:n?"保存排序":"编辑排序"})})]})}function Dx(){const[s,t]=i.useState([]),[a,n]=i.useState([]),[r,l]=i.useState(!1),[c,d]=i.useState([]),[m,w]=i.useState({"drag-handle":!1}),[j,b]=i.useState({pageSize:10,pageIndex:0}),{refetch:x}=K({queryKey:["paymentList"],queryFn:async()=>{const{data:_}=await Cc();return d(_?.map(z=>({...z,enable:!!z.enable}))||[]),_}});i.useEffect(()=>{w({"drag-handle":r}),b({pageSize:r?99999:10,pageIndex:0})},[r]);const y=(_,z)=>{r&&(_.dataTransfer.setData("text/plain",z.toString()),_.currentTarget.classList.add("opacity-50"))},D=(_,z)=>{if(!r)return;_.preventDefault(),_.currentTarget.classList.remove("bg-muted");const N=parseInt(_.dataTransfer.getData("text/plain"));if(N===z)return;const R=[...c],[W]=R.splice(N,1);R.splice(z,0,W),d(R)},T=async()=>{if(r)try{await Fc({ids:c.map(_=>_.id)}),await x(),l(!1),V.success("排序保存成功")}catch{V.error("排序保存失败")}else l(!0)},p=Re({data:c,columns:kx({refetch:x,isSortMode:r}),state:{sorting:a,columnFilters:s,columnVisibility:m,pagination:j},onSortingChange:n,onColumnFiltersChange:t,onColumnVisibilityChange:w,getCoreRowModel:Me(),getFilteredRowModel:$e(),getPaginationRowModel:Ae(),getSortedRowModel:He(),initialState:{columnPinning:{right:["actions"]}},pageCount:r?1:void 0});return e.jsx(qe,{table:p,toolbar:_=>e.jsx(Tx,{table:_,refetch:x,saveOrder:T,isSortMode:r}),draggable:r,onDragStart:y,onDragEnd:_=>_.currentTarget.classList.remove("opacity-50"),onDragOver:_=>{_.preventDefault(),_.currentTarget.classList.add("bg-muted")},onDragLeave:_=>_.currentTarget.classList.remove("bg-muted"),onDrop:D,showPagination:!r})}function Px(){return e.jsxs(fe,{children:[e.jsxs(pe,{className:"flex items-center justify-between",children:[e.jsx(Ce,{}),e.jsxs("div",{className:"flex items-center space-x-4",children:[e.jsx(Se,{}),e.jsx(ke,{})]})]}),e.jsxs(Ne,{children:[e.jsx("header",{className:"mb-2 flex items-center justify-between space-y-2",children:e.jsxs("div",{children:[e.jsx("div",{className:"mb-2",children:e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:"支付配置"})}),e.jsx("p",{className:"text-muted-foreground",children:"在这里可以配置支付方式,包括支付宝、微信等。"})]})}),e.jsx("section",{className:"-mx-4 flex-1 overflow-auto px-4 py-1 lg:flex-row lg:space-x-12 lg:space-y-0",children:e.jsx(Dx,{})})]})]})}const Fx=Object.freeze(Object.defineProperty({__proto__:null,default:Px},Symbol.toStringTag,{value:"Module"}));function Ix({themeKey:s,themeInfo:t}){const[a,n]=i.useState(!1),[r,l]=i.useState(!1),[c,d]=i.useState(!1),m=Z({defaultValues:t.configs.reduce((b,x)=>(b[x.field_name]="",b),{})}),w=async()=>{try{l(!0);const{data:b}=await xc(s);Object.entries(b).forEach(([x,y])=>{m.setValue(x,y)})}catch{V.error("加载主题配置失败"),n(!1)}finally{l(!1)}},j=async b=>{try{d(!0),mc(s,b).then(()=>{V.success("保存成功"),n(!1)})}catch{V.error("保存失败")}finally{d(!1)}};return e.jsxs(ue,{open:a,onOpenChange:b=>{n(b),b?w():m.reset()},children:[e.jsx(Pe,{asChild:!0,children:e.jsx(k,{variant:"outline",children:"主题设置"})}),e.jsxs(de,{className:"max-h-[90vh] overflow-auto sm:max-w-[425px]",children:[e.jsxs(ge,{children:[e.jsxs(he,{children:["配置",t.name,"主题"]}),e.jsx(ze,{children:"修改主题的样式、布局和其他显示选项。"})]}),r?e.jsx("div",{className:"flex h-40 items-center justify-center",children:e.jsx(Wt,{className:"h-6 w-6 animate-spin"})}):e.jsx(se,{...m,children:e.jsxs("form",{onSubmit:m.handleSubmit(j),className:"space-y-4",children:[t.configs.map(b=>e.jsx(h,{control:m.control,name:b.field_name,render:({field:x})=>e.jsxs(u,{children:[e.jsx(g,{children:b.label}),e.jsx(v,{children:dr(b,x)}),e.jsx(S,{})]})},b.field_name)),e.jsxs(Fe,{className:"mt-6 gap-2",children:[e.jsx(k,{type:"button",variant:"secondary",onClick:()=>n(!1),children:"取消"}),e.jsx(k,{type:"submit",loading:c,children:"保存"})]})]})})]})]})}function Vx(){const[s,t]=i.useState(null),[a,n]=i.useState(!1),[r,l]=i.useState(!1),[c,d]=i.useState(!1),m=i.useRef(null),{data:w,isLoading:j,refetch:b}=K({queryKey:["themeList"],queryFn:async()=>{const{data:p}=await dc();return p}}),x=async p=>{try{t(p),await jc({frontend_theme:p}),V.success("主题切换成功"),b()}catch{V.error("主题切换失败")}finally{t(null)}},y=async p=>{if(!p.name.endsWith(".zip")){V.error("只支持上传 ZIP 格式的主题文件");return}try{n(!0),await uc(p),V.success("主题上传成功"),l(!1),b()}catch{V.error("主题上传失败")}finally{n(!1),m.current&&(m.current.value="")}},D=p=>{p.preventDefault(),p.stopPropagation(),p.type==="dragenter"||p.type==="dragover"?d(!0):p.type==="dragleave"&&d(!1)},T=p=>{p.preventDefault(),p.stopPropagation(),d(!1),p.dataTransfer.files&&p.dataTransfer.files[0]&&y(p.dataTransfer.files[0])};return e.jsxs(fe,{children:[e.jsxs(pe,{className:"flex items-center justify-between",children:[e.jsx(Ce,{}),e.jsxs("div",{className:"flex items-center space-x-4",children:[e.jsx(Se,{}),e.jsx(ke,{})]})]}),e.jsxs(Ne,{className:"",children:[e.jsxs("header",{className:"mb-8",children:[e.jsx("div",{className:"mb-2",children:e.jsx("h1",{className:"text-2xl font-bold tracking-tight",children:"主题配置"})}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("p",{className:"text-muted-foreground",children:"主题配置,包括主题色、字体大小等。如果你采用前后分离的方式部署V2board,那么主题配置将不会生效。"}),e.jsxs(k,{onClick:()=>l(!0),variant:"outline",className:"ml-4 shrink-0",size:"sm",children:[e.jsx(ha,{className:"mr-2 h-4 w-4"}),"上传主题"]})]})]}),e.jsx("section",{className:"grid gap-6 sm:grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4",children:j?e.jsxs(e.Fragment,{children:[e.jsx(Sa,{}),e.jsx(Sa,{})]}):w?.themes&&Object.entries(w.themes).map(([p,_])=>e.jsxs(_e,{className:"relative transition-shadow hover:shadow-md",children:[p!==w.active&&e.jsx("div",{className:"absolute right-2 top-2",children:e.jsx(Ue,{title:"删除主题",description:"确定要删除该主题吗?删除后无法恢复。",confirmText:"删除",variant:"destructive",onConfirm:async()=>{if(p===w?.active){V.error("不能删除当前使用的主题");return}t(p),hc(p).then(()=>{V.success("主题删除成功"),b()}).catch(()=>{V.error("主题删除失败")}).finally(()=>{t(null)})},children:e.jsx(k,{disabled:s===p,loading:s===p,variant:"ghost",size:"icon",className:"h-8 w-8 text-muted-foreground hover:text-destructive",children:e.jsx(Xe,{className:"h-4 w-4"})})})}),e.jsxs(Te,{children:[e.jsx(Oe,{children:_.name}),e.jsx(Vs,{children:_.description})]}),e.jsxs(De,{className:"flex items-center justify-end space-x-3",children:[e.jsx(Ix,{themeKey:p,themeInfo:_}),e.jsx(k,{onClick:()=>x(p),disabled:s===p||p===w.active,loading:s===p,variant:p===w.active?"secondary":"default",children:p===w.active?"当前主题":"激活主题"})]})]},p))}),e.jsx(ue,{open:r,onOpenChange:l,children:e.jsxs(de,{className:"sm:max-w-md",children:[e.jsxs(ge,{children:[e.jsx(he,{children:"上传主题"}),e.jsx(ze,{children:"请上传一个有效的主题压缩包(.zip 格式)。主题包应包含完整的主题文件结构。"})]}),e.jsxs("div",{className:f("relative mt-4 flex h-64 flex-col items-center justify-center rounded-lg border-2 border-dashed border-muted-foreground/25 px-5 py-10 text-center transition-colors",c&&"border-primary/50 bg-muted/50"),onDragEnter:D,onDragLeave:D,onDragOver:D,onDrop:T,children:[e.jsx("input",{type:"file",ref:m,className:"hidden",accept:".zip",onChange:p=>{const _=p.target.files?.[0];_&&y(_)}}),a?e.jsxs("div",{className:"flex flex-col items-center space-y-2",children:[e.jsx("div",{className:"h-10 w-10 animate-spin rounded-full border-b-2 border-primary"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"正在上传..."})]}):e.jsx(e.Fragment,{children:e.jsxs("div",{className:"flex flex-col items-center space-y-4",children:[e.jsx("div",{className:"rounded-full border-2 border-muted-foreground/25 p-3",children:e.jsx(ha,{className:"h-6 w-6 text-muted-foreground/50"})}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("p",{className:"text-sm font-medium",children:["将主题文件拖放到此处,或者",e.jsx("button",{type:"button",onClick:()=>m.current?.click(),className:"mx-1 text-primary hover:underline",children:"点击选择"})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"支持 .zip 格式的主题包"})]})]})})]})]})})]})]})}function Sa(){return e.jsxs(_e,{children:[e.jsxs(Te,{children:[e.jsx(Ve,{className:"h-6 w-[200px]"}),e.jsx(Ve,{className:"h-4 w-[300px]"})]}),e.jsxs(De,{className:"flex items-center justify-end space-x-3",children:[e.jsx(Ve,{className:"h-10 w-[100px]"}),e.jsx(Ve,{className:"h-10 w-[100px]"})]})]})}const Rx=Object.freeze(Object.defineProperty({__proto__:null,default:Vx},Symbol.toStringTag,{value:"Module"})),aa=i.forwardRef(({className:s,value:t,onChange:a,...n},r)=>{const[l,c]=i.useState("");i.useEffect(()=>{if(l.includes(",")){const m=new Set([...t,...l.split(",").map(w=>w.trim())]);a(Array.from(m)),c("")}},[l,a,t]);const d=()=>{if(l){const m=new Set([...t,l]);a(Array.from(m)),c("")}};return e.jsxs("div",{className:f(" has-[:focus-visible]:outline-none has-[:focus-visible]:ring-1 has-[:focus-visible]:ring-neutral-950 dark:has-[:focus-visible]:ring-neutral-300 flex w-full flex-wrap gap-2 rounded-md border border-input shadow-sm px-3 py-2 text-sm ring-offset-white disabled:cursor-not-allowed disabled:opacity-50",s),children:[t.map(m=>e.jsxs(E,{variant:"secondary",children:[m,e.jsx(H,{variant:"ghost",size:"icon",className:"ml-2 h-3 w-3",onClick:()=>{a(t.filter(w=>w!==m))},children:e.jsx(Ot,{className:"w-3"})})]},m)),e.jsx("input",{className:"flex-1 outline-none placeholder:text-muted-foreground bg-transparent",value:l,onChange:m=>c(m.target.value),onKeyDown:m=>{m.key==="Enter"||m.key===","?(m.preventDefault(),d()):m.key==="Backspace"&&l.length===0&&t.length>0&&(m.preventDefault(),a(t.slice(0,-1)))},...n,ref:r})]})});aa.displayName="InputTags";const Mx=o.object({id:o.number().nullable(),title:o.string().min(1).max(250),content:o.string().min(1),show:o.boolean(),tags:o.array(o.string()),img_url:o.string().nullable()}),zx={id:null,show:!1,tags:[],img_url:"",title:"",content:""};function yr({refetch:s,dialogTrigger:t,type:a="add",defaultFormValues:n=zx}){const[r,l]=i.useState(!1),c=Z({resolver:ee(Mx),defaultValues:n,mode:"onChange",shouldFocusError:!0});return e.jsx(se,{...c,children:e.jsxs(ue,{onOpenChange:l,open:r,children:[e.jsx(Pe,{asChild:!0,children:t||e.jsxs(k,{variant:"outline",size:"sm",className:"space-x-2",children:[e.jsx(ve,{icon:"ion:add"})," ",e.jsx("div",{children:"添加公告"})]})}),e.jsxs(de,{className:"sm:max-w-[425px]",children:[e.jsxs(ge,{children:[e.jsx(he,{children:a==="add"?"添加公告":"编辑公告"}),e.jsx(ze,{})]}),e.jsx(h,{control:c.control,name:"title",render:({field:d})=>e.jsxs(u,{children:[e.jsx(g,{children:"标题"}),e.jsx("div",{className:"relative ",children:e.jsx(v,{children:e.jsx(C,{placeholder:"请输入公告标题",...d})})}),e.jsx(S,{})]})}),e.jsx(h,{control:c.control,name:"content",render:({field:d})=>e.jsxs(u,{children:[e.jsx(g,{children:"公告内容"}),e.jsx("div",{className:"relative",children:e.jsx(v,{children:e.jsx(gs,{className:"min-h-[150px]",placeholder:"请输入公告内容,支持HTML",...d})})}),e.jsx(S,{})]})}),e.jsx(h,{control:c.control,name:"img_url",render:({field:d})=>e.jsxs(u,{children:[e.jsx(g,{children:"公告背景"}),e.jsx("div",{className:"relative",children:e.jsx(v,{children:e.jsx(C,{type:"text",placeholder:"请输入公告背景图片URL",...d,value:d.value||""})})}),e.jsx(S,{})]})}),e.jsx(h,{control:c.control,name:"show",render:({field:d})=>e.jsxs(u,{children:[e.jsx(g,{children:"显示"}),e.jsx("div",{className:"relative py-2",children:e.jsx(v,{children:e.jsx(O,{checked:d.value,onCheckedChange:d.onChange})})}),e.jsx(S,{})]})}),e.jsx(h,{control:c.control,name:"tags",render:({field:d})=>e.jsxs(u,{children:[e.jsx(g,{children:"节点标签"}),e.jsx(v,{children:e.jsx(aa,{value:d.value,onChange:d.onChange,placeholder:"输入后回车添加标签",className:"w-full"})}),e.jsx(S,{})]})}),e.jsxs(Fe,{children:[e.jsx(Xs,{asChild:!0,children:e.jsx(k,{type:"button",variant:"outline",children:"取消"})}),e.jsx(k,{type:"submit",onClick:d=>{d.preventDefault(),c.handleSubmit(async m=>{try{(await Vc(m)).data&&(await s(),l(!1))}catch(w){console.error("Failed to save notice:",w)}})()},children:"提交"})]})]})]})})}function Ex({table:s,refetch:t}){const a=s.getState().columnFilters.length>0;return e.jsxs("div",{className:"flex items-center justify-between space-x-2 ",children:[e.jsxs("div",{className:"flex flex-1 items-center space-x-2",children:[e.jsx(yr,{refetch:t}),e.jsx(C,{placeholder:"搜索公告标题...",value:s.getColumn("title")?.getFilterValue()??"",onChange:n=>s.getColumn("title")?.setFilterValue(n.target.value),className:"h-8 w-[150px] lg:w-[250px]"}),a&&e.jsxs(k,{variant:"ghost",onClick:()=>s.resetColumnFilters(),className:"h-9 px-2 lg:px-3",children:["重置",e.jsx(Le,{className:"ml-2 h-4 w-4"})]})]}),e.jsx("div",{className:"flex items-center space-x-2"})]})}const Ox=s=>[{accessorKey:"id",header:({column:t})=>e.jsx(F,{column:t,title:"ID"}),cell:({row:t})=>e.jsx(E,{variant:"outline",className:"font-mono",children:t.getValue("id")}),enableSorting:!0,size:60},{accessorKey:"show",header:({column:t})=>e.jsx(F,{column:t,title:"显示状态"}),cell:({row:t})=>e.jsx("div",{className:"flex items-center",children:e.jsx(O,{defaultChecked:t.getValue("show"),onCheckedChange:async()=>{const{data:a}=await Mc({id:t.original.id});a||s()}})}),enableSorting:!1,size:100},{accessorKey:"title",header:({column:t})=>e.jsx(F,{column:t,title:"标题"}),cell:({row:t})=>e.jsx("div",{className:"flex max-w-[500px] items-center",children:e.jsx("span",{className:"truncate font-medium",children:t.getValue("title")})}),enableSorting:!1,size:6e3},{id:"actions",header:({column:t})=>e.jsx(F,{className:"justify-end",column:t,title:"操作"}),cell:({row:t})=>e.jsxs("div",{className:"flex items-center justify-end space-x-2",children:[e.jsx(yr,{refetch:s,dialogTrigger:e.jsxs(k,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-muted",children:[e.jsx(ws,{className:"h-4 w-4 text-muted-foreground hover:text-foreground"}),e.jsx("span",{className:"sr-only",children:"编辑"})]}),type:"edit",defaultFormValues:t.original}),e.jsx(Ue,{title:"删除确认",description:"确定要删除该条公告吗?此操作无法撤销。",onConfirm:async()=>{Rc({id:t.original.id}).then(()=>{V.success("删除成功"),s()})},children:e.jsxs(k,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-red-100 dark:hover:bg-red-900",children:[e.jsx(Xe,{className:"h-4 w-4 text-muted-foreground hover:text-red-600 dark:hover:text-red-400"}),e.jsx("span",{className:"sr-only",children:"删除"})]})})]}),size:100}];function Lx(){const[s,t]=i.useState({}),[a,n]=i.useState({}),[r,l]=i.useState([]),[c,d]=i.useState([]),{data:m,isLoading:w,refetch:j}=K({queryKey:["notices"],queryFn:async()=>{const{data:x}=await Ic();return x}}),b=Re({data:m??[],columns:Ox(j),state:{sorting:c,columnVisibility:a,rowSelection:s,columnFilters:r},enableRowSelection:!0,onRowSelectionChange:t,onSortingChange:d,onColumnFiltersChange:l,onColumnVisibilityChange:n,getCoreRowModel:Me(),getFilteredRowModel:$e(),getPaginationRowModel:Ae(),getSortedRowModel:He(),getFacetedRowModel:es(),getFacetedUniqueValues:ss(),initialState:{columnPinning:{right:["actions"]}}});return e.jsx(qe,{table:b,toolbar:x=>e.jsx(Ex,{table:x,refetch:j})})}function $x(){return e.jsxs(fe,{children:[e.jsxs(pe,{className:"flex items-center justify-between",children:[e.jsx(Ce,{}),e.jsxs("div",{className:"flex items-center space-x-4",children:[e.jsx(Se,{}),e.jsx(ke,{})]})]}),e.jsxs(Ne,{className:"flex flex-col",fixedHeight:!0,children:[e.jsx("div",{className:"mb-2 flex items-center justify-between space-y-2",children:e.jsxs("div",{children:[e.jsx("div",{className:"mb-2",children:e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:"公告管理"})}),e.jsx("p",{className:"text-muted-foreground",children:"在这里可以配置公告,包括添加、删除、编辑等操作。"})]})}),e.jsx("div",{className:"-mx-4 flex-1 overflow-auto px-4 py-1 lg:flex-row lg:space-x-12 lg:space-y-0",children:e.jsx(Lx,{})})]})]})}const Ax=Object.freeze(Object.defineProperty({__proto__:null,default:$x},Symbol.toStringTag,{value:"Module"})),Hx=o.object({id:o.number().nullable(),language:o.string().max(250),category:o.string().max(250),title:o.string().min(1).max(250),body:o.string().min(1),show:o.boolean()}),Kx={id:null,language:"zh-CN",category:"",title:"",body:"",show:!1};function Nr({refreshData:s,dialogTrigger:t,type:a="add",defaultFormValues:n=Kx}){const[r,l]=i.useState(!1),c=Z({resolver:ee(Hx),defaultValues:n,mode:"onChange",shouldFocusError:!0}),d=new Sn({html:!0});return i.useEffect(()=>{r&&n.id&&Ec(n.id).then(({data:m})=>{c.reset(m)})},[n.id,c,r]),e.jsxs(ue,{onOpenChange:l,open:r,children:[e.jsx(Pe,{asChild:!0,children:t||e.jsxs(k,{variant:"outline",size:"sm",className:"space-x-2",children:[e.jsx(ve,{icon:"ion:add"})," ",e.jsx("div",{children:"添加知识"})]})}),e.jsxs(de,{className:"sm:max-w-[1025px]",children:[e.jsxs(ge,{children:[e.jsx(he,{children:a==="add"?"添加知识":"编辑知识"}),e.jsx(ze,{})]}),e.jsxs(se,{...c,children:[e.jsx(h,{control:c.control,name:"title",render:({field:m})=>e.jsxs(u,{children:[e.jsx(g,{children:"标题"}),e.jsx("div",{className:"relative ",children:e.jsx(v,{children:e.jsx(C,{placeholder:"请输入知识标题",...m})})}),e.jsx(S,{})]})}),e.jsx(h,{control:c.control,name:"category",render:({field:m})=>e.jsxs(u,{children:[e.jsx(g,{children:"分类"}),e.jsx("div",{className:"relative ",children:e.jsx(v,{children:e.jsx(C,{placeholder:"请输入分类,分类将会自动归类",...m})})}),e.jsx(S,{})]})}),e.jsx(h,{control:c.control,name:"language",render:({field:m})=>e.jsxs(u,{children:[e.jsx(g,{children:"语言"}),e.jsx(v,{children:e.jsxs(B,{value:m.value,onValueChange:m.onChange,children:[e.jsx(U,{children:e.jsx(Y,{placeholder:"请选择语言"})}),e.jsx(G,{children:[{field:"English",value:"en-US"},{field:"日本語",value:"ja-JP"},{field:"한국어",value:"ko-KR"},{field:"Tiếng Việt",value:"vi-VN"},{field:"简体中文",value:"zh-CN"},{field:"繁體中文",value:"zh-TW"}].map(w=>e.jsx(A,{value:w.value,className:"cursor-pointer",children:w.field},w.value))})]})})]})}),e.jsx(h,{control:c.control,name:"body",render:({field:m})=>e.jsxs(u,{children:[e.jsx(g,{children:"内容"}),e.jsx(v,{children:e.jsx(kn,{style:{height:"500px"},value:m.value,renderHTML:w=>d.render(w),onChange:({text:w})=>{m.onChange(w)}})}),e.jsx(S,{})]})}),e.jsx(h,{control:c.control,name:"show",render:({field:m})=>e.jsxs(u,{children:[e.jsx(g,{children:"显示"}),e.jsx("div",{className:"relative py-2",children:e.jsx(v,{children:e.jsx(O,{checked:m.value,onCheckedChange:m.onChange})})}),e.jsx(S,{})]})}),e.jsxs(Fe,{children:[e.jsx(Xs,{asChild:!0,children:e.jsx(k,{type:"button",variant:"outline",children:"取消"})}),e.jsx(k,{type:"submit",onClick:()=>{c.handleSubmit(m=>{Oc(m).then(({data:w})=>{w&&(c.reset(),V.success("操作成功"),l(!1),s())})})()},children:"提交"})]})]})]})]})}function qx({column:s,title:t,options:a}){const n=s?.getFacetedUniqueValues(),r=new Set(s?.getFilterValue());return e.jsxs(Be,{children:[e.jsx(Ye,{asChild:!0,children:e.jsxs(k,{variant:"outline",size:"sm",className:"h-8 border-dashed",children:[e.jsx(Ms,{className:"mr-2 h-4 w-4"}),t,r?.size>0&&e.jsxs(e.Fragment,{children:[e.jsx(le,{orientation:"vertical",className:"mx-2 h-4"}),e.jsx(E,{variant:"secondary",className:"rounded-sm px-1 font-normal lg:hidden",children:r.size}),e.jsx("div",{className:"hidden space-x-1 lg:flex",children:r.size>2?e.jsxs(E,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:[r.size," selected"]}):a.filter(l=>r.has(l.value)).map(l=>e.jsx(E,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:l.label},l.value))})]})]})}),e.jsx(Ke,{className:"w-[200px] p-0",align:"start",children:e.jsxs(ts,{children:[e.jsx(hs,{placeholder:t}),e.jsxs(as,{children:[e.jsx(js,{children:"No results found."}),e.jsx(be,{children:a.map(l=>{const c=r.has(l.value);return e.jsxs(me,{onSelect:()=>{c?r.delete(l.value):r.add(l.value);const d=Array.from(r);s?.setFilterValue(d.length?d:void 0)},children:[e.jsx("div",{className:f("mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary",c?"bg-primary text-primary-foreground":"opacity-50 [&_svg]:invisible"),children:e.jsx(us,{className:f("h-4 w-4")})}),l.icon&&e.jsx(l.icon,{className:"mr-2 h-4 w-4 text-muted-foreground"}),e.jsx("span",{children:l.label}),n?.get(l.value)&&e.jsx("span",{className:"ml-auto flex h-4 w-4 items-center justify-center font-mono text-xs",children:n.get(l.value)})]},l.value)})}),r.size>0&&e.jsxs(e.Fragment,{children:[e.jsx(_s,{}),e.jsx(be,{children:e.jsx(me,{onSelect:()=>s?.setFilterValue(void 0),className:"justify-center text-center",children:"Clear filters"})})]})]})]})})]})}function Ux({table:s,refetch:t,saveOrder:a,isSortMode:n}){const r=s.getState().columnFilters.length>0;return e.jsxs("div",{className:"flex items-center justify-between",children:[n?e.jsx("p",{className:"text-sm text-muted-foreground",children:"拖拽知识条目进行排序,完成后点击保存"}):e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Nr,{refreshData:t}),e.jsx(C,{placeholder:"搜索知识...",value:s.getColumn("title")?.getFilterValue()??"",onChange:l=>s.getColumn("title")?.setFilterValue(l.target.value),className:"h-8 w-[250px]"}),s.getColumn("category")&&e.jsx(qx,{column:s.getColumn("category"),title:"分类",options:Array.from(new Set(s.getCoreRowModel().rows.map(l=>l.getValue("category")))).map(l=>({label:l,value:l}))}),r&&e.jsxs(k,{variant:"ghost",onClick:()=>s.resetColumnFilters(),children:["重置",e.jsx(Le,{className:"ml-2 h-4 w-4"})]})]}),e.jsx("div",{className:"flex items-center gap-2",children:e.jsx(k,{variant:n?"default":"outline",onClick:a,size:"sm",children:n?"保存排序":"编辑排序"})})]})}const Gx=({refetch:s,isSortMode:t=!1})=>[{id:"drag-handle",header:()=>null,cell:()=>e.jsx("div",{className:t?"cursor-move":"opacity-0",children:e.jsx(Nt,{className:"size-4"})}),size:40,enableSorting:!1},{accessorKey:"id",header:({column:a})=>e.jsx(F,{column:a,title:"ID"}),cell:({row:a})=>e.jsx(E,{variant:"outline",className:"justify-center",children:a.getValue("id")}),enableSorting:!0,size:70},{accessorKey:"show",header:({column:a})=>e.jsx(F,{column:a,title:"状态"}),cell:({row:a})=>e.jsx("div",{className:"flex items-center",children:e.jsx(O,{defaultChecked:a.getValue("show"),onCheckedChange:async()=>{$c({id:a.original.id}).then(({data:n})=>{n||s()})}})}),enableSorting:!1,size:100},{accessorKey:"title",header:({column:a})=>e.jsx(F,{column:a,title:"标题"}),cell:({row:a})=>e.jsx("div",{className:"flex space-x-2",children:e.jsx("span",{className:"line-clamp-2 font-medium",children:a.getValue("title")})}),enableSorting:!0,size:600},{accessorKey:"category",header:({column:a})=>e.jsx(F,{column:a,title:"分类"}),cell:({row:a})=>e.jsx(E,{variant:"secondary",className:"max-w-[180px] truncate",children:a.getValue("category")}),enableSorting:!0,size:1800},{id:"actions",header:({column:a})=>e.jsx(F,{className:"justify-end",column:a,title:"操作"}),cell:({row:a})=>e.jsxs("div",{className:"flex items-center justify-end space-x-1",children:[e.jsx(Nr,{refreshData:s,dialogTrigger:e.jsxs(k,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-muted",children:[e.jsx(ws,{className:"h-4 w-4 text-muted-foreground hover:text-foreground"}),e.jsx("span",{className:"sr-only",children:"编辑"})]}),type:"edit",defaultFormValues:a.original}),e.jsx(Ue,{title:"确认删除",description:"此操作将永久删除该知识库记录,删除后无法恢复。确定要继续吗?",confirmText:"删除",variant:"destructive",onConfirm:async()=>{Lc({id:a.original.id}).then(({data:n})=>{n&&(V.success("删除成功"),s())})},children:e.jsxs(k,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-red-100 dark:hover:bg-red-900",children:[e.jsx(Xe,{className:"h-4 w-4 text-muted-foreground hover:text-red-600 dark:hover:text-red-400"}),e.jsx("span",{className:"sr-only",children:"删除"})]})})]}),size:100}];function Bx(){const[s,t]=i.useState([]),[a,n]=i.useState([]),[r,l]=i.useState(!1),[c,d]=i.useState([]),[m,w]=i.useState({"drag-handle":!1}),[j,b]=i.useState({pageSize:10,pageIndex:0}),{refetch:x,isLoading:y,data:D}=K({queryKey:["knowledge"],queryFn:async()=>{const{data:N}=await zc();return d(N||[]),N}});i.useEffect(()=>{w({"drag-handle":r}),b({pageSize:r?99999:10,pageIndex:0})},[r]);const T=(N,R)=>{r&&(N.dataTransfer.setData("text/plain",R.toString()),N.currentTarget.classList.add("opacity-50"))},p=(N,R)=>{if(!r)return;N.preventDefault(),N.currentTarget.classList.remove("bg-muted");const W=parseInt(N.dataTransfer.getData("text/plain"));if(W===R)return;const L=[...c],[ae]=L.splice(W,1);L.splice(R,0,ae),d(L)},_=async()=>{if(r)try{await Ac({ids:c.map(N=>N.id)}),await x(),l(!1),V.success("排序保存成功")}catch{V.error("排序保存失败")}else l(!0)},z=Re({data:c,columns:Gx({refetch:x,isSortMode:r}),state:{sorting:a,columnFilters:s,columnVisibility:m,pagination:j},onSortingChange:n,onColumnFiltersChange:t,onColumnVisibilityChange:w,getCoreRowModel:Me(),getFilteredRowModel:$e(),getPaginationRowModel:Ae(),getSortedRowModel:He(),initialState:{columnPinning:{right:["actions"]}}});return e.jsx(qe,{table:z,toolbar:N=>e.jsx(Ux,{table:N,refetch:x,saveOrder:_,isSortMode:r}),draggable:r,onDragStart:T,onDragEnd:N=>N.currentTarget.classList.remove("opacity-50"),onDragOver:N=>{N.preventDefault(),N.currentTarget.classList.add("bg-muted")},onDragLeave:N=>N.currentTarget.classList.remove("bg-muted"),onDrop:p,showPagination:!r})}function Yx(){return e.jsxs(fe,{children:[e.jsxs(pe,{children:[e.jsx(Ce,{}),e.jsxs("div",{className:"ml-auto flex items-center space-x-4",children:[e.jsx(Se,{}),e.jsx(ke,{})]})]}),e.jsxs(Ne,{className:"flex flex-col",fixedHeight:!0,children:[e.jsx("div",{className:"mb-2 flex items-center justify-between space-y-2",children:e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight mb-2",children:"知识库管理"}),e.jsx("p",{className:"text-muted-foreground",children:"在这里可以配置知识库,包括添加、删除、编辑等操作。"})]})}),e.jsx("div",{className:"-mx-4 flex-1 overflow-auto px-4 py-1 lg:flex-row lg:space-x-12 lg:space-y-0",children:e.jsx(Bx,{})})]})]})}const Wx=Object.freeze(Object.defineProperty({__proto__:null,default:Yx},Symbol.toStringTag,{value:"Module"}));function Jx(s,t){const[a,n]=i.useState(s);return i.useEffect(()=>{const r=setTimeout(()=>n(s),t);return()=>{clearTimeout(r)}},[s,t]),a}function It(s,t){if(s.length===0)return{};if(!t)return{"":s};const a={};return s.forEach(n=>{const r=n[t]||"";a[r]||(a[r]=[]),a[r].push(n)}),a}function Qx(s,t){const a=JSON.parse(JSON.stringify(s));for(const[n,r]of Object.entries(a))a[n]=r.filter(l=>!t.find(c=>c.value===l.value));return a}function Zx(s,t){for(const[,a]of Object.entries(s))if(a.some(n=>t.find(r=>r.value===n.value)))return!0;return!1}const wr=i.forwardRef(({className:s,...t},a)=>Ji(r=>r.filtered.count===0)?e.jsx("div",{ref:a,className:f("py-6 text-center text-sm",s),"cmdk-empty":"",role:"presentation",...t}):null);wr.displayName="CommandEmpty";const Qs=i.forwardRef(({value:s,onChange:t,placeholder:a,defaultOptions:n=[],options:r,delay:l,onSearch:c,loadingIndicator:d,emptyIndicator:m,maxSelected:w=Number.MAX_SAFE_INTEGER,onMaxSelected:j,hidePlaceholderWhenSelected:b,disabled:x,groupBy:y,className:D,badgeClassName:T,selectFirstItem:p=!0,creatable:_=!1,triggerSearchOnFocus:z=!1,commandProps:N,inputProps:R,hideClearAllButton:W=!1},L)=>{const ae=i.useRef(null),[Ge,Cs]=i.useState(!1),Es=i.useRef(!1),[ra,la]=i.useState(!1),[q,Os]=i.useState(s||[]),[fs,ia]=i.useState(It(n,y)),[ls,Dt]=i.useState(""),Ls=Jx(ls,l||500);i.useImperativeHandle(L,()=>({selectedValue:[...q],input:ae.current,focus:()=>ae.current?.focus()}),[q]);const st=i.useCallback($=>{const J=q.filter(we=>we.value!==$.value);Os(J),t?.(J)},[t,q]),Jr=i.useCallback($=>{const J=ae.current;J&&(($.key==="Delete"||$.key==="Backspace")&&J.value===""&&q.length>0&&(q[q.length-1].fixed||st(q[q.length-1])),$.key==="Escape"&&J.blur())},[st,q]);i.useEffect(()=>{s&&Os(s)},[s]),i.useEffect(()=>{if(!r||c)return;const $=It(r||[],y);JSON.stringify($)!==JSON.stringify(fs)&&ia($)},[n,r,y,c,fs]),i.useEffect(()=>{const $=async()=>{la(!0);const we=await c?.(Ls);ia(It(we||[],y)),la(!1)};(async()=>{!c||!Ge||(z&&await $(),Ls&&await $())})()},[Ls,y,Ge,z]);const Qr=()=>{if(!_||Zx(fs,[{value:ls,label:ls}])||q.find(J=>J.value===ls))return;const $=e.jsx(me,{value:ls,className:"cursor-pointer",onMouseDown:J=>{J.preventDefault(),J.stopPropagation()},onSelect:J=>{if(q.length>=w){j?.(q.length);return}Dt("");const we=[...q,{value:J,label:J}];Os(we),t?.(we)},children:`Create "${ls}"`});if(!c&&ls.length>0||c&&Ls.length>0&&!ra)return $},Zr=i.useCallback(()=>{if(m)return c&&!_&&Object.keys(fs).length===0?e.jsx(me,{value:"-",disabled:!0,children:m}):e.jsx(wr,{children:m})},[_,m,c,fs]),Xr=i.useMemo(()=>Qx(fs,q),[fs,q]),el=i.useCallback(()=>{if(N?.filter)return N.filter;if(_)return($,J)=>$.toLowerCase().includes(J.toLowerCase())?1:-1},[_,N?.filter]),sl=i.useCallback(()=>{const $=q.filter(J=>J.fixed);Os($),t?.($)},[t,q]);return e.jsxs(ts,{...N,onKeyDown:$=>{Jr($),N?.onKeyDown?.($)},className:f("h-auto overflow-visible bg-transparent",N?.className),shouldFilter:N?.shouldFilter!==void 0?N.shouldFilter:!c,filter:el(),children:[e.jsx("div",{className:f("rounded-md border border-input text-sm ring-offset-background focus-within:ring-1 focus-within:ring-ring ",{"px-3 py-2":q.length!==0,"cursor-text":!x&&q.length!==0},D),onClick:()=>{x||ae.current?.focus()},children:e.jsxs("div",{className:"flex flex-wrap gap-1",children:[q.map($=>e.jsxs(E,{className:f("data-[disabled]:bg-muted-foreground data-[disabled]:text-muted data-[disabled]:hover:bg-muted-foreground","data-[fixed]:bg-muted-foreground data-[fixed]:text-muted data-[fixed]:hover:bg-muted-foreground",T),"data-fixed":$.fixed,"data-disabled":x||void 0,children:[$.label,e.jsx("button",{className:f("ml-1 rounded-full outline-none ring-offset-background focus:ring-2 focus:ring-ring focus:ring-offset-2",(x||$.fixed)&&"hidden"),onKeyDown:J=>{J.key==="Enter"&&st($)},onMouseDown:J=>{J.preventDefault(),J.stopPropagation()},onClick:()=>st($),children:e.jsx(Ot,{className:"h-3 w-3 text-muted-foreground hover:text-foreground"})})]},$.value)),e.jsx(ye.Input,{...R,ref:ae,value:ls,disabled:x,onValueChange:$=>{Dt($),R?.onValueChange?.($)},onBlur:$=>{Es.current===!1&&Cs(!1),R?.onBlur?.($)},onFocus:$=>{Cs(!0),z&&c?.(Ls),R?.onFocus?.($)},placeholder:b&&q.length!==0?"":a,className:f("flex-1 bg-transparent outline-none placeholder:text-muted-foreground",{"w-full":b,"px-3 py-2":q.length===0,"ml-1":q.length!==0},R?.className)}),e.jsx("button",{type:"button",onClick:sl,className:f((W||x||q.length<1||q.filter($=>$.fixed).length===q.length)&&"hidden"),children:e.jsx(Ot,{})})]})}),e.jsx("div",{className:"relative",children:Ge&&e.jsx(as,{className:"absolute top-1 z-10 w-full rounded-md border bg-popover text-popover-foreground shadow-md outline-none animate-in",onMouseLeave:()=>{Es.current=!1},onMouseEnter:()=>{Es.current=!0},onMouseUp:()=>{ae.current?.focus()},children:ra?e.jsx(e.Fragment,{children:d}):e.jsxs(e.Fragment,{children:[Zr(),Qr(),!p&&e.jsx(me,{value:"-",className:"hidden"}),Object.entries(Xr).map(([$,J])=>e.jsx(be,{heading:$,className:"h-full overflow-auto",children:e.jsx(e.Fragment,{children:J.map(we=>e.jsx(me,{value:we.value,disabled:we.disable,onMouseDown:$s=>{$s.preventDefault(),$s.stopPropagation()},onSelect:()=>{if(q.length>=w){j?.(q.length);return}Dt("");const $s=[...q,we];Os($s),t?.($s)},className:f("cursor-pointer",we.disable&&"cursor-default text-muted-foreground"),children:we.label},we.value))})},$))]})})})]})});Qs.displayName="MultipleSelector";const Xx=o.object({id:o.number().optional(),name:o.string().min(2,"组名至少需要2个字符").max(50,"组名不能超过50个字符").regex(/^[a-zA-Z0-9\u4e00-\u9fa5_-]+$/,"组名只能包含字母、数字、中文、下划线和连字符")});function Tt({refetch:s,dialogTrigger:t,defaultValues:a={name:""},type:n="add"}){const r=Z({resolver:ee(Xx),defaultValues:a,mode:"onChange"}),[l,c]=i.useState(!1),[d,m]=i.useState(!1),w=async j=>{try{m(!0);const{data:b}=await yc(j);b&&(V.success(n==="edit"?"更新成功":"创建成功"),s&&s(),r.reset(),c(!1))}catch{V.error("操作失败,请重试")}finally{m(!1)}};return e.jsxs(ue,{open:l,onOpenChange:c,children:[e.jsx(Pe,{asChild:!0,children:t||e.jsxs(k,{variant:"outline",size:"sm",className:"space-x-2",children:[e.jsx(ve,{icon:"ion:add"}),e.jsx("span",{children:"添加权限组"})]})}),e.jsxs(de,{className:"sm:max-w-[425px]",children:[e.jsxs(ge,{children:[e.jsx(he,{children:n==="edit"?"编辑权限组":"创建权限组"}),e.jsx(ze,{children:n==="edit"?"修改权限组信息,更新后会立即生效。":"创建新的权限组,可以为不同的用户分配不同的权限。"})]}),e.jsx(se,{...r,children:e.jsxs("form",{onSubmit:r.handleSubmit(w),className:"space-y-4",children:[e.jsx(h,{control:r.control,name:"name",render:({field:j})=>e.jsxs(u,{children:[e.jsx(g,{children:"组名称"}),e.jsx(v,{children:e.jsx(C,{placeholder:"请输入权限组名称",...j,className:"w-full"})}),e.jsx(P,{children:"权限组名称用于标识不同的用户组,建议使用有意义的名称。"}),e.jsx(S,{})]})}),e.jsxs(Fe,{className:"gap-2",children:[e.jsx(Xs,{asChild:!0,children:e.jsx(k,{type:"button",variant:"outline",children:"取消"})}),e.jsxs(k,{type:"submit",disabled:d||!r.formState.isValid,children:[d&&e.jsx(Wt,{className:"mr-2 h-4 w-4 animate-spin"}),n==="edit"?"更新":"创建"]})]})]})})]})]})}const _r=i.createContext(void 0);function em({children:s,refetch:t}){const[a,n]=i.useState(!1),[r,l]=i.useState(null),[c,d]=i.useState(je.Shadowsocks);return e.jsx(_r.Provider,{value:{isOpen:a,setIsOpen:n,editingServer:r,setEditingServer:l,serverType:c,setServerType:d,refetch:t},children:s})}function Cr(){const s=i.useContext(_r);if(s===void 0)throw new Error("useServerEdit must be used within a ServerEditProvider");return s}function Vt({dialogTrigger:s,value:t,setValue:a,templateType:n}){i.useEffect(()=>{console.log(t)},[t]);const[r,l]=i.useState(!1),[c,d]=i.useState(()=>{if(!t||Object.keys(t).length===0)return"";try{return JSON.stringify(t,null,2)}catch{return""}}),[m,w]=i.useState(null),j=p=>{if(!p)return null;try{const _=JSON.parse(p);return typeof _!="object"||_===null?"配置必须是一个JSON对象":null}catch{return"无效的JSON格式"}},b={tcp:{label:"TCP",content:{acceptProxyProtocol:!1,header:{type:"none"}}},"tcp-http":{label:"TCP + HTTP",content:{acceptProxyProtocol:!1,header:{type:"http",request:{version:"1.1",method:"GET",path:["/"],headers:{Host:["www.example.com"]}},response:{version:"1.1",status:"200",reason:"OK"}}}},grpc:{label:"gRPC",content:{serviceName:"GunService"}},ws:{label:"WebSocket",content:{path:"/",headers:{Host:"v2ray.com"}}}},x=()=>{switch(n){case"tcp":return["tcp","tcp-http"];case"grpc":return["grpc"];case"ws":return["ws"];default:return[]}},y=()=>{const p=j(c||"");if(p){V.error(p);return}try{if(!c){a(null),l(!1);return}a(JSON.parse(c)),l(!1)}catch{V.error("保存时发生错误")}},D=p=>{d(p),w(j(p))},T=p=>{const _=b[p];if(_){const z=JSON.stringify(_.content,null,2);d(z),w(null)}};return i.useEffect(()=>{r&&console.log(t)},[r,t]),i.useEffect(()=>{r&&t&&Object.keys(t).length>0&&d(JSON.stringify(t,null,2))},[r,t]),e.jsxs(ue,{open:r,onOpenChange:p=>{!p&&r&&y(),l(p)},children:[e.jsx(Pe,{asChild:!0,children:s??e.jsx(H,{variant:"link",children:"编辑协议"})}),e.jsxs(de,{className:"sm:max-w-[425px]",children:[e.jsx(ge,{children:e.jsx(he,{children:"编辑协议配置"})}),e.jsxs("div",{className:"space-y-4",children:[x().length>0&&e.jsx("div",{className:"flex flex-wrap gap-2 pt-2",children:x().map(p=>e.jsxs(H,{variant:"outline",size:"sm",onClick:()=>T(p),children:["使用",b[p].label,"模板"]},p))}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(gs,{className:`min-h-[200px] font-mono text-sm ${m?"border-red-500 focus-visible:ring-red-500":""}`,value:c,placeholder:`请输入JSON配置${x().length>0?"或选择上方模板":""}`,onChange:p=>D(p.target.value)}),m&&e.jsx("p",{className:"text-sm text-red-500",children:m})]})]}),e.jsxs(Fe,{className:"gap-2",children:[e.jsx(H,{variant:"outline",onClick:()=>l(!1),children:"取消"}),e.jsx(H,{onClick:y,disabled:!!m,children:"确定"})]})]})]})}function Bu(s){throw new Error('Could not dynamically require "'+s+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}const sm={},tm=Object.freeze(Object.defineProperty({__proto__:null,default:sm},Symbol.toStringTag,{value:"Module"})),Yu=oo(tm),ka=s=>s.replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,""),am=()=>{try{const s=Qi.box.keyPair(),t=ka(ja.encodeBase64(s.secretKey)),a=ka(ja.encodeBase64(s.publicKey));return{privateKey:t,publicKey:a}}catch(s){throw console.error("Error generating x25519 key pair:",s),s}},nm=()=>{try{return am()}catch(s){throw console.error("Error generating key pair:",s),s}},rm=s=>{const t=new Uint8Array(Math.ceil(s/2));return window.crypto.getRandomValues(t),Array.from(t).map(a=>a.toString(16).padStart(2,"0")).join("").substring(0,s)},lm=()=>{const s=Math.floor(Math.random()*8)*2+2;return rm(s)},im=o.object({cipher:o.string().default("aes-128-gcm"),obfs:o.string().default("0"),obfs_settings:o.object({path:o.string().default(""),host:o.string().default("")}).default({})}),om=o.object({tls:o.coerce.number().default(0),tls_settings:o.object({server_name:o.string().default(""),allow_insecure:o.boolean().default(!1)}).default({}),network:o.string().default("tcp"),network_settings:o.record(o.any()).default({})}),cm=o.object({server_name:o.string().default(""),allow_insecure:o.boolean().default(!1),network:o.string().default("tcp"),network_settings:o.record(o.any()).default({})}),dm=o.object({version:o.coerce.number().default(2),alpn:o.string().default("h2"),obfs:o.object({open:o.coerce.boolean().default(!1),type:o.string().default("salamander"),password:o.string().default("")}).default({}),tls:o.object({server_name:o.string().default(""),allow_insecure:o.boolean().default(!1)}).default({}),bandwidth:o.object({up:o.string().default(""),down:o.string().default("")}).default({})}),xm=o.object({tls:o.coerce.number().default(0),tls_settings:o.object({server_name:o.string().default(""),allow_insecure:o.boolean().default(!1)}).default({}),reality_settings:o.object({server_port:o.coerce.number().default(443),server_name:o.string().default(""),allow_insecure:o.boolean().default(!1),public_key:o.string().default(""),private_key:o.string().default(""),short_id:o.string().default("")}).default({}),network:o.string().default("tcp"),network_settings:o.record(o.any()).default({}),flow:o.string().default("")}),cs={shadowsocks:{schema:im,ciphers:["aes-128-gcm","aes-192-gcm","aes-256-gcm","chacha20-ietf-poly1305","2022-blake3-aes-128-gcm","2022-blake3-aes-256-gcm"]},vmess:{schema:om,networkOptions:[{value:"tcp",label:"TCP"},{value:"ws",label:"Websocket"},{value:"grpc",label:"gRPC"}]},trojan:{schema:cm,networkOptions:[{value:"tcp",label:"TCP"},{value:"ws",label:"Websocket"},{value:"grpc",label:"gRPC"}]},hysteria:{schema:dm,versions:["1","2"],alpnOptions:["hysteria","http/1.1","h2","h3"]},vless:{schema:xm,networkOptions:[{value:"tcp",label:"TCP"},{value:"ws",label:"Websocket"},{value:"grpc",label:"gRPC"}],flowOptions:["none","xtls-rprx-direct","xtls-rprx-splice","xtls-rprx-vision"]}},mm=({serverType:s,value:t,onChange:a})=>{const n=s?cs[s]:null,r=n?.schema||o.record(o.any()),l=Z({resolver:ee(r),defaultValues:t||(s?r.parse({}):{}),mode:"onChange"});return i.useEffect(()=>{if(!t||Object.keys(t).length===0){if(s){const x=r.parse({});l.reset(x)}}else l.reset(t)},[s,t,a,l,r]),i.useEffect(()=>{const x=l.watch(y=>{a(y)});return()=>x.unsubscribe()},[l,a]),!s||!n?null:{shadowsocks:()=>e.jsxs(e.Fragment,{children:[e.jsx(h,{control:l.control,name:"cipher",render:({field:x})=>e.jsxs(u,{children:[e.jsx(g,{children:"加密算法"}),e.jsx(v,{children:e.jsxs(B,{onValueChange:x.onChange,value:x.value,children:[e.jsx(U,{children:e.jsx(Y,{placeholder:"选择加密算法"})}),e.jsx(G,{children:e.jsx(os,{children:cs.shadowsocks.ciphers.map(y=>e.jsx(A,{value:y,children:y},y))})})]})})]})}),e.jsx(h,{control:l.control,name:"obfs",render:({field:x})=>e.jsxs(u,{children:[e.jsx(g,{children:"混淆"}),e.jsx(v,{children:e.jsxs(B,{onValueChange:x.onChange,value:x.value,children:[e.jsx(U,{children:e.jsx(Y,{placeholder:"选择混淆方式"})}),e.jsx(G,{children:e.jsxs(os,{children:[e.jsx(A,{value:"0",children:"无"}),e.jsx(A,{value:"http",children:"HTTP"})]})})]})})]})}),l.watch("obfs")==="http"&&e.jsxs("div",{className:"flex gap-2",children:[e.jsx(h,{control:l.control,name:"obfs_settings.path",render:({field:x})=>e.jsxs(u,{className:"flex-1",children:[e.jsx(v,{children:e.jsx(C,{type:"text",placeholder:"路径",...x})}),e.jsx(S,{})]})}),e.jsx(h,{control:l.control,name:"obfs_settings.host",render:({field:x})=>e.jsxs(u,{className:"flex-[2]",children:[e.jsx(v,{children:e.jsx(C,{type:"text",placeholder:"Host",...x})}),e.jsx(S,{})]})})]})]}),vmess:()=>e.jsxs(e.Fragment,{children:[e.jsx(h,{control:l.control,name:"tls",render:({field:x})=>e.jsxs(u,{children:[e.jsx(g,{children:"TLS"}),e.jsx(v,{children:e.jsxs(B,{value:x.value?.toString(),onValueChange:y=>x.onChange(Number(y)),children:[e.jsx(U,{children:e.jsx(Y,{placeholder:"请选择安全性"})}),e.jsxs(G,{children:[e.jsx(A,{value:"0",children:"不支持"}),e.jsx(A,{value:"1",children:"支持"})]})]})})]})}),l.watch("tls")==1&&e.jsxs("div",{className:"flex gap-2",children:[e.jsx(h,{control:l.control,name:"tls_settings.server_name",render:({field:x})=>e.jsxs(u,{className:"flex-[2]",children:[e.jsx(g,{children:"服务器名称指示(SNI)"}),e.jsx(v,{children:e.jsx(C,{placeholder:"不使用请留空",...x})})]})}),e.jsx(h,{control:l.control,name:"tls_settings.allow_insecure",render:({field:x})=>e.jsxs(u,{children:[e.jsx(g,{children:"允许不安全?"}),e.jsx("div",{className:"py-2 text-center",children:e.jsx(v,{children:e.jsx(O,{checked:x.value,onCheckedChange:x.onChange})})})]})})]}),e.jsx(h,{control:l.control,name:"network",render:({field:x})=>e.jsxs(u,{children:[e.jsxs(g,{children:["传输协议",e.jsx(Vt,{value:l.watch("network_settings"),setValue:y=>l.setValue("network_settings",y),templateType:l.watch("network")})]}),e.jsx(v,{children:e.jsxs(B,{onValueChange:x.onChange,value:x.value,children:[e.jsx(U,{children:e.jsx(Y,{placeholder:"选择传输协议"})}),e.jsx(G,{children:e.jsx(os,{children:cs.vmess.networkOptions.map(y=>e.jsx(A,{value:y.value,className:"cursor-pointer",children:y.label},y.value))})})]})})]})})]}),trojan:()=>e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex gap-2",children:[e.jsx(h,{control:l.control,name:"server_name",render:({field:x})=>e.jsxs(u,{className:"flex-[2]",children:[e.jsx(g,{children:"服务器名称指示(SNI)"}),e.jsx(v,{children:e.jsx(C,{placeholder:"当节点地址于证书不一致时用于证书验证",...x,value:x.value||""})})]})}),e.jsx(h,{control:l.control,name:"allow_insecure",render:({field:x})=>e.jsxs(u,{children:[e.jsx(g,{children:"允许不安全?"}),e.jsx("div",{className:"py-2 text-center",children:e.jsx(v,{children:e.jsx(O,{checked:x.value||!1,onCheckedChange:x.onChange})})})]})})]}),e.jsx(h,{control:l.control,name:"network",render:({field:x})=>e.jsxs(u,{children:[e.jsxs(g,{children:["传输协议",e.jsx(Vt,{value:l.watch("network_settings")||{},setValue:y=>l.setValue("network_settings",y),templateType:l.watch("network")||"tcp"})]}),e.jsx(v,{children:e.jsxs(B,{onValueChange:x.onChange,value:x.value||"tcp",children:[e.jsx(U,{children:e.jsx(Y,{placeholder:"选择传输协议"})}),e.jsx(G,{children:e.jsx(os,{children:cs.trojan.networkOptions.map(y=>e.jsx(A,{value:y.value,className:"cursor-pointer",children:y.label},y.value))})})]})})]})})]}),hysteria:()=>e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex gap-2",children:[e.jsx(h,{control:l.control,name:"version",render:({field:x})=>e.jsxs(u,{className:"flex-1",children:[e.jsx(g,{children:"协议版本"}),e.jsx(v,{children:e.jsxs(B,{value:(x.value||2).toString(),onValueChange:y=>x.onChange(Number(y)),children:[e.jsx(U,{children:e.jsx(Y,{placeholder:"协议版本"})}),e.jsx(G,{children:e.jsx(os,{children:cs.hysteria.versions.map(y=>e.jsxs(A,{value:y,className:"cursor-pointer",children:["V",y]},y))})})]})})]})}),l.watch("version")==1&&e.jsx(h,{control:l.control,name:"alpn",render:({field:x})=>e.jsxs(u,{className:"flex-[2]",children:[e.jsx(g,{children:"ALPN"}),e.jsx(v,{children:e.jsxs(B,{value:x.value||"h2",onValueChange:x.onChange,children:[e.jsx(U,{children:e.jsx(Y,{placeholder:"ALPN"})}),e.jsx(G,{children:e.jsx(os,{children:cs.hysteria.alpnOptions.map(y=>e.jsx(A,{value:y,children:y},y))})})]})})]})})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(h,{control:l.control,name:"obfs.open",render:({field:x})=>e.jsxs(u,{children:[e.jsx(g,{children:"混淆"}),e.jsx("div",{className:"py-2 text-center",children:e.jsx(v,{children:e.jsx(O,{checked:x.value||!1,onCheckedChange:x.onChange})})})]})}),!!l.watch("obfs.open")&&e.jsxs(e.Fragment,{children:[l.watch("version")=="2"&&e.jsx(h,{control:l.control,name:"obfs.type",render:({field:x})=>e.jsxs(u,{className:"flex-1",children:[e.jsx(g,{children:"混淆实现"}),e.jsx(v,{children:e.jsxs(B,{value:x.value||"salamander",onValueChange:x.onChange,children:[e.jsx(U,{children:e.jsx(Y,{placeholder:"选择混淆实现"})}),e.jsx(G,{children:e.jsx(os,{children:e.jsx(A,{value:"salamander",children:"Salamander"})})})]})})]})}),e.jsx(h,{control:l.control,name:"obfs.password",render:({field:x})=>e.jsxs(u,{className:"flex-[2]",children:[e.jsx(g,{children:"混淆密码"}),e.jsx(v,{children:e.jsx(C,{placeholder:"请输入混淆密码",...x,value:x.value||""})})]})})]})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(h,{control:l.control,name:"tls.server_name",render:({field:x})=>e.jsxs(u,{className:"flex-[2]",children:[e.jsx(g,{children:"服务器名称指示(SNI)"}),e.jsx(v,{children:e.jsx(C,{placeholder:"当节点地址于证书不一致时用于证书验证",...x,value:x.value||""})})]})}),e.jsx(h,{control:l.control,name:"tls.allow_insecure",render:({field:x})=>e.jsxs(u,{children:[e.jsx(g,{children:"允许不安全?"}),e.jsx("div",{className:"py-2 text-center",children:e.jsx(v,{children:e.jsx(O,{checked:x.value||!1,onCheckedChange:x.onChange})})})]})})]}),e.jsx(h,{control:l.control,name:"bandwidth.up",render:({field:x})=>e.jsxs(u,{children:[e.jsx(g,{children:"上行宽带"}),e.jsxs("div",{className:"relative flex",children:[e.jsx(v,{children:e.jsx(C,{type:"number",placeholder:"请输入上行宽带"+(l.watch("version")==2?",留空则使用BBR":""),className:"rounded-br-none rounded-tr-none",...x,value:x.value||""})}),e.jsx("div",{className:"pointer-events-none z-[-1] flex items-center rounded-md rounded-bl-none rounded-tl-none border border-l-0 border-input px-3 shadow-sm",children:e.jsx("span",{className:"text-gray-500",children:"Mbps"})})]})]})}),e.jsx(h,{control:l.control,name:"bandwidth.down",render:({field:x})=>e.jsxs(u,{children:[e.jsx(g,{children:"下行宽带"}),e.jsxs("div",{className:"relative flex",children:[e.jsx(v,{children:e.jsx(C,{type:"number",placeholder:"请输入下行宽带"+(l.watch("version")==2?",留空则使用BBR":""),className:"rounded-br-none rounded-tr-none",...x,value:x.value||""})}),e.jsx("div",{className:"pointer-events-none z-[-1] flex items-center rounded-md rounded-bl-none rounded-tl-none border border-l-0 border-input px-3 shadow-sm",children:e.jsx("span",{className:"text-gray-500",children:"Mbps"})})]})]})})]}),vless:()=>e.jsxs(e.Fragment,{children:[e.jsx(h,{control:l.control,name:"tls",render:({field:x})=>e.jsxs(u,{children:[e.jsx(g,{children:"安全性"}),e.jsx(v,{children:e.jsxs(B,{value:x.value?.toString(),onValueChange:y=>x.onChange(Number(y)),children:[e.jsx(U,{children:e.jsx(Y,{placeholder:"请选择安全性"})}),e.jsxs(G,{children:[e.jsx(A,{value:"0",children:"无"}),e.jsx(A,{value:"1",children:"TLS"}),e.jsx(A,{value:"2",children:"Reality"})]})]})})]})}),l.watch("tls")=="1"&&e.jsxs("div",{className:"flex gap-2",children:[e.jsx(h,{control:l.control,name:"tls_settings.server_name",render:({field:x})=>e.jsxs(u,{className:"flex-[2]",children:[e.jsx(g,{children:"服务器名称指示(SNI)"}),e.jsx(v,{children:e.jsx(C,{placeholder:"不使用请留空",...x})})]})}),e.jsx(h,{control:l.control,name:"tls_settings.allow_insecure",render:({field:x})=>e.jsxs(u,{children:[e.jsx(g,{children:"允许不安全?"}),e.jsx("div",{className:"py-2 text-center",children:e.jsx(v,{children:e.jsx(O,{checked:x.value,onCheckedChange:x.onChange})})})]})})]}),l.watch("tls")==2&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex gap-2",children:[e.jsx(h,{control:l.control,name:"reality_settings.server_name",render:({field:x})=>e.jsxs(u,{className:"flex-[2]",children:[e.jsx(g,{children:"伪装站点(dest)"}),e.jsx(v,{children:e.jsx(C,{placeholder:"例如:example.com",...x})})]})}),e.jsx(h,{control:l.control,name:"reality_settings.server_port",render:({field:x})=>e.jsxs(u,{className:"flex-1",children:[e.jsx(g,{children:"端口(port)"}),e.jsx(v,{children:e.jsx(C,{placeholder:"例如:443",...x})})]})}),e.jsx(h,{control:l.control,name:"reality_settings.allow_insecure",render:({field:x})=>e.jsxs(u,{children:[e.jsx(g,{children:"允许不安全?"}),e.jsx("div",{className:"py-2 text-center",children:e.jsx(v,{children:e.jsx(O,{checked:x.value,onCheckedChange:x.onChange})})})]})})]}),e.jsxs("div",{className:"flex items-end gap-2",children:[e.jsx(h,{control:l.control,name:"reality_settings.private_key",render:({field:x})=>e.jsxs(u,{className:"flex-1",children:[e.jsx(g,{children:"私钥(Private key)"}),e.jsx(v,{children:e.jsx(C,{...x})})]})}),e.jsxs(H,{variant:"outline",className:"",onClick:()=>{try{const x=nm();l.setValue("reality_settings.private_key",x.privateKey),l.setValue("reality_settings.public_key",x.publicKey),V.success("密钥对生成成功")}catch{V.error("生成密钥对失败")}},children:[e.jsx(ve,{icon:"ion:key-outline",className:"mr-2 h-4 w-4"}),"生成密钥对"]})]}),e.jsx(h,{control:l.control,name:"reality_settings.public_key",render:({field:x})=>e.jsxs(u,{children:[e.jsx(g,{children:"公钥(Public key)"}),e.jsx(v,{children:e.jsx(C,{...x})})]})}),e.jsx(h,{control:l.control,name:"reality_settings.short_id",render:({field:x})=>e.jsxs(u,{children:[e.jsx(g,{children:"Short ID"}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(v,{children:e.jsx(C,{...x,placeholder:"可留空,长度为2的倍数,最长16位"})}),e.jsxs(H,{variant:"outline",onClick:()=>{const y=lm();l.setValue("reality_settings.short_id",y),V.success("Short ID 生成成功")},children:[e.jsx(ve,{icon:"ion:refresh-outline",className:"mr-2 h-4 w-4"}),"生成"]})]}),e.jsx(P,{className:"text-xs text-muted-foreground",children:"客户端可用的 shortId 列表,可用于区分不同的客户端,使用0-f的十六进制字符"})]})})]}),e.jsx(h,{control:l.control,name:"network",render:({field:x})=>e.jsxs(u,{children:[e.jsxs(g,{children:["传输协议",e.jsx(Vt,{value:l.watch("network_settings"),setValue:y=>l.setValue("network_settings",y),templateType:l.watch("network")})]}),e.jsx(v,{children:e.jsxs(B,{onValueChange:x.onChange,value:x.value,children:[e.jsx(U,{children:e.jsx(Y,{placeholder:"选择传输协议"})}),e.jsx(G,{children:e.jsx(os,{children:cs.vless.networkOptions.map(y=>e.jsx(A,{value:y.value,className:"cursor-pointer",children:y.label},y.value))})})]})})]})}),e.jsx(h,{control:l.control,name:"flow",render:({field:x})=>e.jsxs(u,{children:[e.jsx(g,{children:"流控"}),e.jsx(v,{children:e.jsxs(B,{onValueChange:y=>x.onChange(y==="none"?null:y),value:x.value||"none",children:[e.jsx(U,{children:e.jsx(Y,{placeholder:"选择流控"})}),e.jsx(G,{children:cs.vless.flowOptions.map(y=>e.jsx(A,{value:y,children:y},y))})]})})]})})]})}[s]?.()},um=o.object({id:o.number().optional().nullable(),code:o.string().optional(),name:o.string().min(1,"Please enter a valid name."),rate:o.string().min(1,"Please enter a valid rate."),tags:o.array(o.string()).default([]),excludes:o.array(o.string()).default([]),ips:o.array(o.string()).default([]),group_ids:o.array(o.string()).default([]),host:o.string().min(1,"Please enter a valid host."),port:o.string().min(1,"Please enter a valid port."),server_port:o.string().min(1,"Please enter a valid server port."),parent_id:o.string().default("0").nullable(),route_ids:o.array(o.string()).default([]),protocol_settings:o.record(o.any()).default({}).nullable()}),lt={id:null,code:"",name:"",rate:"1",tags:[],excludes:[],ips:[],group_ids:[],host:"",port:"",server_port:"",parent_id:"0",route_ids:[],protocol_settings:{}};function Sr(){const{isOpen:s,setIsOpen:t,editingServer:a,setEditingServer:n,serverType:r,setServerType:l,refetch:c}=Cr(),[d,m]=i.useState([]),[w,j]=i.useState([]),[b,x]=i.useState([]),y=Z({resolver:ee(um),defaultValues:lt,mode:"onChange"});i.useEffect(()=>{D()},[s]),i.useEffect(()=>{a?.type&&a.type!==r&&l(a.type)},[a,r,l]),i.useEffect(()=>{a?a.type===r&&y.reset({...lt,...a}):y.reset(lt)},[a,y,r]);const D=async()=>{if(!s)return;const[N,R,W]=await Promise.all([St(),tr(),sr()]);m(N.data?.map(L=>({label:L.name,value:L.id.toString()}))||[]),j(R.data?.map(L=>({label:L.remarks,value:L.id.toString()}))||[]),x(W.data||[])},T=i.useMemo(()=>b?.filter(N=>(N.parent_id===0||N.parent_id===null)&&N.type===r&&N.id!==y.watch("id")),[r,b,y]),p=()=>e.jsxs(vs,{children:[e.jsx(bs,{asChild:!0,children:e.jsxs(k,{variant:"outline",size:"sm",className:"space-x-2",children:[e.jsx(ve,{icon:"ion:add"}),e.jsx("div",{children:"添加节点"})]})}),e.jsx(ms,{align:"start",children:e.jsx(Go,{children:ps.map(({type:N,label:R})=>e.jsx(oe,{onClick:()=>{l(N),t(!0)},className:"cursor-pointer",children:e.jsx(E,{variant:"outline",className:"text-white",style:{background:Je[N]},children:R})},N))})})]}),_=()=>{t(!1),n(null),y.reset(lt)},z=async()=>{const N=y.getValues();(await gc({...N,type:r})).data&&(_(),V.success("提交成功"),c())};return e.jsxs(ue,{open:s,onOpenChange:_,children:[p(),e.jsxs(de,{className:"sm:max-w-[425px]",children:[e.jsxs(ge,{children:[e.jsx(he,{children:a?"编辑节点":"新建节点"}),e.jsx(ze,{})]}),e.jsxs(se,{...y,children:[e.jsxs("div",{className:"grid gap-4",children:[e.jsxs("div",{className:"flex gap-2",children:[e.jsx(h,{control:y.control,name:"name",render:({field:N})=>e.jsxs(u,{className:"flex-[2]",children:[e.jsx(g,{children:"节点名称"}),e.jsx(v,{children:e.jsx(C,{placeholder:"请输入节点名称",...N})}),e.jsx(S,{})]})}),e.jsx(h,{control:y.control,name:"rate",render:({field:N})=>e.jsxs(u,{className:"flex-[1]",children:[e.jsx(g,{children:"倍率"}),e.jsx("div",{className:"relative flex",children:e.jsx(v,{children:e.jsx(C,{type:"number",min:"0",step:"0.1",...N})})}),e.jsx(S,{})]})})]}),e.jsx(h,{control:y.control,name:"code",render:({field:N})=>e.jsxs(u,{children:[e.jsxs(g,{children:["自定义节点ID",e.jsx("span",{className:"ml-1 text-xs text-muted-foreground",children:"(选填)"})]}),e.jsx(v,{children:e.jsx(C,{placeholder:"请输入自定义节点ID",...N,value:N.value||""})}),e.jsx(S,{})]})}),e.jsx(h,{control:y.control,name:"tags",render:({field:N})=>e.jsxs(u,{children:[e.jsx(g,{children:"节点标签"}),e.jsx(v,{children:e.jsx(aa,{value:N.value,onChange:N.onChange,placeholder:"输入后回车添加标签",className:"w-full"})}),e.jsx(S,{})]})}),e.jsx(h,{control:y.control,name:"group_ids",render:({field:N})=>e.jsxs(u,{children:[e.jsxs(g,{className:"flex items-center justify-between",children:["权限组",e.jsx(Tt,{dialogTrigger:e.jsx(k,{variant:"link",children:"添加权限组"}),refetch:D})]}),e.jsx(v,{children:e.jsx(Qs,{options:d,onChange:R=>N.onChange(R.map(W=>W.value)),value:d?.filter(R=>N.value.includes(R.value)),placeholder:"请选择权限组",emptyIndicator:e.jsx("p",{className:"text-center text-lg leading-10 text-gray-600 dark:text-gray-400",children:"no results found."})})}),e.jsx(S,{})]})}),e.jsxs("div",{className:"space-y-4",children:[e.jsx(h,{control:y.control,name:"host",render:({field:N})=>e.jsxs(u,{children:[e.jsx(g,{children:"节点地址"}),e.jsx(v,{children:e.jsx(C,{placeholder:"请输入节点域名或者IP",...N})}),e.jsx(S,{})]})}),e.jsxs("div",{className:"flex space-x-2",children:[e.jsx(h,{control:y.control,name:"port",render:({field:N})=>e.jsxs(u,{className:"flex-1",children:[e.jsxs(g,{className:"flex items-center gap-1.5",children:["连接端口",e.jsx(ce,{delayDuration:100,children:e.jsxs(ne,{children:[e.jsx(re,{asChild:!0,children:e.jsx(ve,{icon:"ph:info-light",className:"size-3.5 cursor-help text-muted-foreground"})}),e.jsx(te,{side:"top",className:"max-w-80 p-3",children:e.jsx("p",{children:"用户实际连接使用的端口,这是客户端配置中需要填写的端口号。如果使用了中转或隧道,这个端口可能与服务器实际监听的端口不同。"})})]})})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(v,{children:e.jsx(C,{placeholder:"用户连接端口",...N})}),e.jsx(ce,{delayDuration:100,children:e.jsxs(ne,{children:[e.jsx(re,{asChild:!0,children:e.jsx(k,{type:"button",variant:"ghost",size:"icon",className:"size-6 shrink-0 text-muted-foreground/50 hover:text-muted-foreground",onClick:()=>{const R=N.value;R&&y.setValue("server_port",R)},children:e.jsx(ve,{icon:"tabler:arrows-right",className:"size-3"})})}),e.jsx(te,{side:"right",children:e.jsx("p",{children:"同步到服务端口"})})]})})]}),e.jsx(S,{})]})}),e.jsx(h,{control:y.control,name:"server_port",render:({field:N})=>e.jsxs(u,{className:"flex-1",children:[e.jsxs(g,{className:"flex items-center gap-1.5",children:["服务端口",e.jsx(ce,{delayDuration:100,children:e.jsxs(ne,{children:[e.jsx(re,{asChild:!0,children:e.jsx(ve,{icon:"ph:info-light",className:"size-3.5 cursor-help text-muted-foreground"})}),e.jsx(te,{side:"top",className:"max-w-80 p-3",children:e.jsx("p",{children:"服务器实际监听的端口,这是在服务器上开放的真实端口。如果使用了中转或隧道,这个端口可能与用户连接端口不同。"})})]})})]}),e.jsx(v,{children:e.jsx(C,{placeholder:"服务端开放端口",...N})}),e.jsx(S,{})]})})]})]}),!!y.watch("protocol_settings")&&e.jsx(mm,{serverType:r,value:y.watch("protocol_settings"),onChange:N=>y.setValue("protocol_settings",N,{shouldDirty:!0,shouldTouch:!0,shouldValidate:!0})}),e.jsx(h,{control:y.control,name:"parent_id",render:({field:N})=>e.jsxs(u,{children:[e.jsx(g,{children:"父节点"}),e.jsxs(B,{onValueChange:N.onChange,value:N.value?.toString()||"0",children:[e.jsx(v,{children:e.jsx(U,{children:e.jsx(Y,{placeholder:"选择父节点"})})}),e.jsxs(G,{children:[e.jsx(A,{value:"0",children:"无"}),T?.map(R=>e.jsx(A,{value:R.id.toString(),className:"cursor-pointer",children:R.name},R.id))]})]}),e.jsx(S,{})]})}),e.jsx(h,{control:y.control,name:"route_ids",render:({field:N})=>e.jsxs(u,{children:[e.jsx(g,{children:"路由组"}),e.jsx(v,{children:e.jsx(Qs,{options:w,onChange:R=>N.onChange(R.map(W=>W.value)),value:w?.filter(R=>N.value.includes(R.value)),placeholder:"选择路由组",emptyIndicator:e.jsx("p",{className:"text-center text-lg leading-10 text-gray-600 dark:text-gray-400",children:"no results found."})})}),e.jsx(S,{})]})})]}),e.jsxs(Fe,{className:"mt-6",children:[e.jsx(k,{type:"button",variant:"outline",onClick:_,children:"取消"}),e.jsx(k,{type:"submit",onClick:z,children:"提交"})]})]})]})]})}function Ta({column:s,title:t,options:a}){const n=s?.getFacetedUniqueValues(),r=new Set(s?.getFilterValue());return e.jsxs(Be,{children:[e.jsx(Ye,{asChild:!0,children:e.jsxs(k,{variant:"outline",size:"sm",className:"h-8 border-dashed",children:[e.jsx(Ms,{className:"mr-2 h-4 w-4"}),t,r?.size>0&&e.jsxs(e.Fragment,{children:[e.jsx(le,{orientation:"vertical",className:"mx-2 h-4"}),e.jsx(E,{variant:"secondary",className:"rounded-sm px-1 font-normal lg:hidden",children:r.size}),e.jsx("div",{className:"hidden space-x-1 lg:flex",children:r.size>2?e.jsxs(E,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:[r.size," selected"]}):a.filter(l=>r.has(l.value)).map(l=>e.jsx(E,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:l.label},l.value))})]})]})}),e.jsx(Ke,{className:"w-[200px] p-0",align:"start",children:e.jsxs(ts,{children:[e.jsx(hs,{placeholder:t}),e.jsxs(as,{children:[e.jsx(js,{children:"No results found."}),e.jsx(be,{children:a.map(l=>{const c=r.has(l.value);return e.jsxs(me,{onSelect:()=>{c?r.delete(l.value):r.add(l.value);const d=Array.from(r);s?.setFilterValue(d.length?d:void 0)},className:"cursor-pointer",children:[e.jsx("div",{className:f("mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary",c?"bg-primary text-primary-foreground":"opacity-50 [&_svg]:invisible"),children:e.jsx(us,{className:f("h-4 w-4")})}),l.icon&&e.jsx(l.icon,{className:`mr-2 h-4 w-4 text-muted-foreground text-${l.color}`}),e.jsx("span",{children:l.label}),n?.get(l.value)&&e.jsx("span",{className:"ml-auto flex h-4 w-4 items-center justify-center font-mono text-xs",children:n.get(l.value)})]},l.value)})}),r.size>0&&e.jsxs(e.Fragment,{children:[e.jsx(_s,{}),e.jsx(be,{children:e.jsx(me,{onSelect:()=>s?.setFilterValue(void 0),className:"justify-center text-center cursor-pointer",children:"Clear filters"})})]})]})]})})]})}const hm=[{value:je.Shadowsocks,label:ps.find(s=>s.type===je.Shadowsocks)?.label,color:Je[je.Shadowsocks]},{value:je.Vmess,label:ps.find(s=>s.type===je.Vmess)?.label,color:Je[je.Vmess]},{value:je.Trojan,label:ps.find(s=>s.type===je.Trojan)?.label,color:Je[je.Trojan]},{value:je.Hysteria,label:ps.find(s=>s.type===je.Hysteria)?.label,color:Je[je.Hysteria]},{value:je.Vless,label:ps.find(s=>s.type===je.Vless)?.label,color:Je[je.Vless]}];function jm({table:s,refetch:t,saveOrder:a,isSortMode:n,groups:r}){const l=s.getState().columnFilters.length>0,c=r.map(d=>({label:d,value:d}));return e.jsxs("div",{className:"flex items-center justify-between ",children:[e.jsxs("div",{className:"flex flex-1 flex-col-reverse items-start gap-y-2 sm:flex-row sm:items-center sm:space-x-2",children:[!n&&e.jsxs(e.Fragment,{children:[e.jsx(Sr,{refetch:t}),e.jsx(C,{placeholder:"搜索节点...",value:s.getColumn("name")?.getFilterValue()??"",onChange:d=>s.getColumn("name")?.setFilterValue(d.target.value),className:"h-8 w-[150px] lg:w-[250px]"}),e.jsxs("div",{className:"flex gap-x-2",children:[s.getColumn("type")&&e.jsx(Ta,{column:s.getColumn("type"),title:"类型",options:hm}),s.getColumn("groups")&&e.jsx(Ta,{column:s.getColumn("groups"),title:"权限组",options:c})]}),l&&e.jsxs(k,{variant:"ghost",onClick:()=>s.resetColumnFilters(),className:"h-8 px-2 lg:px-3",children:["重置",e.jsx(Le,{className:"ml-2 h-4 w-4"})]})]}),n&&e.jsx("div",{className:"flex items-center space-x-2",children:e.jsx("p",{className:"text-sm text-muted-foreground",children:"拖拽节点进行排序,完成后点击保存"})})]}),e.jsx("div",{children:e.jsx(k,{size:"sm",variant:n?"default":"outline",className:"ml-auto hidden h-8 lg:flex",onClick:a,children:n?"保存排序":"编辑排序"})})]})}const Zs=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M15.71 12.71a6 6 0 1 0-7.42 0a10 10 0 0 0-6.22 8.18a1 1 0 0 0 2 .22a8 8 0 0 1 15.9 0a1 1 0 0 0 1 .89h.11a1 1 0 0 0 .88-1.1a10 10 0 0 0-6.25-8.19M12 12a4 4 0 1 1 4-4a4 4 0 0 1-4 4"})}),it={0:"bg-destructive/80 shadow-sm shadow-destructive/50",1:"bg-yellow-500/80 shadow-sm shadow-yellow-500/50",2:"bg-emerald-500/80 shadow-sm shadow-emerald-500/50"},ot={0:"未运行",1:"异常",2:"正常"},gm=s=>[{id:"drag-handle",header:({column:t})=>e.jsx(F,{column:t,title:"排序"}),cell:()=>e.jsx("div",{className:"flex items-center justify-center",children:e.jsx(Nt,{className:"size-4 cursor-move text-muted-foreground transition-colors hover:text-primary","aria-hidden":"true"})}),size:50},{accessorKey:"id",header:({column:t})=>e.jsx(F,{column:t,title:"节点ID"}),cell:({row:t})=>{const a=t.getValue("id"),n=t.original.code;return e.jsx(ce,{delayDuration:100,children:e.jsxs(ne,{children:[e.jsx(re,{asChild:!0,children:e.jsxs("div",{className:"group/id flex items-center space-x-2",children:[e.jsxs(E,{variant:"outline",className:f("border-2 font-medium transition-all duration-200 hover:opacity-80","flex items-center gap-1.5"),style:{borderColor:Je[t.original.type]},children:[e.jsx(Tn,{className:"size-3"}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx("span",{className:"flex items-center gap-0.5",children:n??a}),t.original.parent_id?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-sm text-muted-foreground/30",children:"→"}),e.jsx("span",{children:t.original.parent_id})]}):""]})]}),e.jsx(k,{variant:"ghost",size:"icon",className:"size-5 text-muted-foreground/40 opacity-0 transition-all duration-200 hover:text-muted-foreground group-hover/id:opacity-100",onClick:r=>{r.stopPropagation(),At(n||a.toString()),V.success(n?"已复制节点代码":"已复制节点ID")},children:e.jsx(ga,{className:"size-3"})})]})}),e.jsxs(te,{side:"top",className:"flex flex-col gap-1 p-3",children:[e.jsxs("p",{className:"font-medium",children:[ps.find(r=>r.type===t.original.type)?.label,t.original.parent_id?" (子节点)":""]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:n?"点击括号内容或复制按钮可复制节点代码":"点击复制按钮可复制节点ID"})]})]})})},size:200,enableSorting:!0},{accessorKey:"show",header:({column:t})=>e.jsx(F,{column:t,title:"显隐"}),cell:({row:t})=>{const[a,n]=i.useState(!!t.getValue("show"));return e.jsx(O,{checked:a,onCheckedChange:async r=>{n(r),vc({id:t.original.id,type:t.original.type,show:r?1:0}).catch(()=>{n(!r),s()})},style:{backgroundColor:a?Je[t.original.type]:void 0}})},size:50,enableSorting:!1},{accessorKey:"name",header:({column:t})=>e.jsx("div",{className:"flex items-center",children:e.jsx(F,{column:t,title:"节点",tooltip:e.jsxs("div",{className:"grid grid-cols-1 gap-3 p-2",children:[e.jsxs("div",{className:"flex items-center space-x-2.5",children:[e.jsx("span",{className:f("h-2.5 w-2.5 rounded-full",it[0])}),e.jsx("span",{className:"text-sm font-medium",children:ot[0]})]}),e.jsxs("div",{className:"flex items-center space-x-2.5",children:[e.jsx("span",{className:f("h-2.5 w-2.5 rounded-full",it[1])}),e.jsx("span",{className:"text-sm font-medium",children:ot[1]})]}),e.jsxs("div",{className:"flex items-center space-x-2.5",children:[e.jsx("span",{className:f("h-2.5 w-2.5 rounded-full",it[2])}),e.jsx("span",{className:"text-sm font-medium",children:ot[2]})]})]})})}),cell:({row:t})=>e.jsx(ce,{delayDuration:100,children:e.jsxs(ne,{children:[e.jsx(re,{children:e.jsxs("div",{className:"flex items-center space-x-2.5",children:[e.jsx("span",{className:f("size-2.5 flex-shrink-0 rounded-full transition-all duration-200",it[t.original.available_status])}),e.jsx("span",{className:"text-left font-medium transition-colors hover:text-primary",children:t.getValue("name")})]})}),e.jsx(te,{children:e.jsx("p",{className:"font-medium",children:ot[t.original.available_status]})})]})}),enableSorting:!1,size:200},{accessorKey:"host",header:({column:t})=>e.jsx(F,{column:t,title:"地址"}),cell:({row:t})=>{const a=`${t.original.host}:${t.original.port}`,n=t.original.port!==t.original.server_port;return e.jsxs("div",{className:"group relative flex min-w-0 items-start",children:[e.jsxs("div",{className:"flex min-w-0 flex-wrap items-baseline gap-x-1 gap-y-0.5 pr-7",children:[e.jsx("div",{className:"flex items-center ",children:e.jsxs("span",{className:"font-mono text-sm font-medium text-foreground/90",children:[t.original.host,":",t.original.port]})}),n&&e.jsxs("span",{className:"whitespace-nowrap text-[0.7rem] tracking-tight text-muted-foreground/40",children:["(内部端口 ",t.original.server_port,")"]})]}),e.jsx("div",{className:"absolute right-0 top-0",children:e.jsx(ce,{delayDuration:0,children:e.jsxs(ne,{children:[e.jsx(re,{asChild:!0,children:e.jsx(k,{variant:"ghost",size:"icon",className:"size-6 text-muted-foreground/40 opacity-0 transition-all duration-200 hover:bg-muted/50 hover:text-muted-foreground group-hover:opacity-100",onClick:r=>{r.stopPropagation(),At(a)},children:e.jsx(ga,{className:"size-3"})})}),e.jsx(te,{side:"top",sideOffset:10,children:"复制连接地址"})]})})})]})},enableSorting:!1,enableHiding:!0},{accessorKey:"online",header:({column:t})=>e.jsx(F,{column:t,title:"在线人数",tooltip:"在线人数根据服务端上报频率而定"}),cell:({row:t})=>e.jsxs("div",{className:"flex items-center space-x-2 px-4",children:[e.jsx(Zs,{className:"size-4"}),e.jsx("span",{className:"font-medium",children:t.getValue("online")})]}),size:80,enableSorting:!0,enableHiding:!0},{accessorKey:"rate",header:({column:t})=>e.jsx(F,{column:t,title:"倍率",tooltip:"流量扣费倍率"}),cell:({row:t})=>e.jsxs(E,{variant:"secondary",className:"font-medium",children:[t.getValue("rate")," x"]}),size:80,enableSorting:!1,enableHiding:!0},{accessorKey:"groups",header:({column:t})=>e.jsx(F,{column:t,title:"权限组",tooltip:"可订阅到该节点的权限组"}),cell:({row:t})=>{const a=t.getValue("groups")||[];return e.jsx("div",{className:"flex min-w-[300px] max-w-[600px] flex-wrap items-center gap-1.5",children:a.length>0?a.map((n,r)=>e.jsx(E,{variant:"secondary",className:f("px-2 py-0.5 font-medium","bg-secondary/50 hover:bg-secondary/70","border border-border/50","transition-all duration-200","cursor-default select-none","flex items-center gap-1.5"),children:n.name},r)):e.jsx("span",{className:"text-sm text-muted-foreground",children:"--"})})},enableSorting:!1,size:600,filterFn:(t,a,n)=>{const r=t.getValue(a);return r?n.some(l=>r.includes(l)):!1}},{accessorKey:"type",header:({column:t})=>e.jsx(F,{column:t,title:"类型"}),cell:({row:t})=>{const a=t.getValue("type");return e.jsx(E,{variant:"outline",className:"border-2 font-medium transition-colors",style:{borderColor:Je[a]},children:a})},enableSorting:!1,enableHiding:!0,enableColumnFilter:!1,size:8e3},{id:"actions",header:({column:t})=>e.jsx(F,{className:"justify-end",column:t,title:"操作"}),cell:({row:t})=>{const{setIsOpen:a,setEditingServer:n,setServerType:r}=Cr();return e.jsx("div",{className:"flex justify-center",children:e.jsxs(vs,{modal:!1,children:[e.jsx(bs,{asChild:!0,children:e.jsx(k,{variant:"ghost",className:"h-8 w-8 p-0 hover:bg-muted","aria-label":"打开操作菜单",children:e.jsx(ut,{className:"size-4"})})}),e.jsxs(ms,{align:"end",className:"w-40",children:[e.jsx(oe,{className:"cursor-pointer",onClick:()=>{r(t.original.type),n(t.original),a(!0)},children:e.jsxs("div",{className:"flex w-full items-center",children:[e.jsx(Zi,{className:"mr-2 size-4"}),"编辑"]})}),e.jsxs(oe,{className:"cursor-pointer",onClick:async()=>{pc({id:t.original.id}).then(({data:l})=>{l&&(V.success("复制成功"),s())})},children:[e.jsx(Xi,{className:"mr-2 size-4"}),"复制"]}),e.jsx(Ws,{}),e.jsx(oe,{className:"cursor-pointer text-destructive focus:text-destructive",onSelect:l=>l.preventDefault(),children:e.jsx(Ue,{title:"确认删除",description:"此操作将永久删除该节点,删除后无法恢复。确定要继续吗?",confirmText:"删除",variant:"destructive",onConfirm:async()=>{fc({id:t.original.id}).then(({data:l})=>{l&&(V.success("删除成功"),s())})},children:e.jsxs("div",{className:"flex w-full items-center",children:[e.jsx(Xe,{className:"mr-2 size-4"}),"删除"]})})})]})]})})},size:50}];function fm(){const[s,t]=i.useState({}),[a,n]=i.useState({"drag-handle":!1}),[r,l]=i.useState([]),[c,d]=i.useState({pageSize:50,pageIndex:0}),[m,w]=i.useState([]),[j,b]=i.useState(!1),[x,y]=i.useState({}),[D,T]=i.useState([]),{refetch:p}=K({queryKey:["nodeList"],queryFn:async()=>{const{data:L}=await sr();return T(L),L}}),_=i.useMemo(()=>{const L=new Set;return D.forEach(ae=>{ae.groups&&ae.groups.forEach(Ge=>L.add(Ge.name))}),Array.from(L).sort()},[D]);i.useEffect(()=>{n({"drag-handle":j,show:!j,host:!j,online:!j,rate:!j,groups:!j,type:!1,actions:!j}),y({name:j?2e3:200}),d({pageSize:j?99999:50,pageIndex:0})},[j]);const z=(L,ae)=>{j&&(L.dataTransfer.setData("text/plain",ae.toString()),L.currentTarget.classList.add("opacity-50"))},N=(L,ae)=>{if(!j)return;L.preventDefault(),L.currentTarget.classList.remove("bg-muted");const Ge=parseInt(L.dataTransfer.getData("text/plain"));if(Ge===ae)return;const Cs=[...D],[Es]=Cs.splice(Ge,1);Cs.splice(ae,0,Es),T(Cs)},R=async()=>{if(!j){b(!0);return}try{const L=D?.map((ae,Ge)=>({id:ae.id,order:Ge+1}));await bc(L),V.success("排序保存成功"),b(!1),p()}catch{V.error("排序保存失败"),b(!1)}},W=Re({data:D||[],columns:gm(p),state:{sorting:m,columnVisibility:a,rowSelection:s,columnFilters:r,columnSizing:x,pagination:c},enableRowSelection:!0,onRowSelectionChange:t,onSortingChange:w,onColumnFiltersChange:l,onColumnVisibilityChange:n,onColumnSizingChange:y,onPaginationChange:d,getCoreRowModel:Me(),getFilteredRowModel:$e(),getPaginationRowModel:Ae(),getSortedRowModel:He(),getFacetedRowModel:es(),getFacetedUniqueValues:ss(),initialState:{columnPinning:{right:["actions"]}}});return e.jsx(em,{refetch:p,children:e.jsxs("div",{className:"space-y-4",children:[e.jsx(qe,{table:W,toolbar:L=>e.jsx(jm,{table:L,refetch:p,saveOrder:R,isSortMode:j,groups:_}),draggable:j,onDragStart:z,onDragEnd:L=>L.currentTarget.classList.remove("opacity-50"),onDragOver:L=>{L.preventDefault(),L.currentTarget.classList.add("bg-muted")},onDragLeave:L=>L.currentTarget.classList.remove("bg-muted"),onDrop:N,showPagination:!j}),e.jsx(Sr,{})]})})}function pm(){return e.jsxs(fe,{children:[e.jsxs(pe,{children:[e.jsx(Ce,{}),e.jsxs("div",{className:"ml-auto flex items-center space-x-4",children:[e.jsx(Se,{}),e.jsx(ke,{})]})]}),e.jsxs(Ne,{className:"flex flex-col",fixedHeight:!0,children:[e.jsx("div",{className:"mb-2 flex items-center justify-between space-y-2",children:e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:"节点管理"}),e.jsx("p",{className:"text-muted-foreground mt-2",children:"管理所有节点,包括添加、删除、编辑等操作。"})]})}),e.jsx("div",{className:"-mx-4 flex-1 overflow-auto px-4 py-1 lg:flex-row lg:space-x-12 lg:space-y-0",children:e.jsx(fm,{})})]})]})}const vm=Object.freeze(Object.defineProperty({__proto__:null,default:pm},Symbol.toStringTag,{value:"Module"}));function bm({table:s,refetch:t}){const a=s.getState().columnFilters.length>0;return e.jsx("div",{className:"flex items-center justify-between space-x-4",children:e.jsxs("div",{className:"flex flex-1 items-center space-x-2",children:[e.jsx(Tt,{refetch:t}),e.jsx(C,{placeholder:"搜索权限组...",value:s.getColumn("name")?.getFilterValue()??"",onChange:n=>s.getColumn("name")?.setFilterValue(n.target.value),className:f("h-8 w-[150px] lg:w-[250px]",a&&"border-primary/50 ring-primary/20")}),a&&e.jsxs(k,{variant:"ghost",onClick:()=>s.resetColumnFilters(),className:"h-8 px-2 lg:px-3",children:["重置",e.jsx(Le,{className:"ml-2 h-4 w-4"})]})]})})}const ym=s=>[{accessorKey:"id",header:({column:t})=>e.jsx(F,{column:t,title:"组ID"}),cell:({row:t})=>e.jsx("div",{className:"flex items-center space-x-2",children:e.jsx(E,{variant:"outline",children:t.getValue("id")})}),enableSorting:!0},{accessorKey:"name",header:({column:t})=>e.jsx(F,{column:t,title:"组名称"}),cell:({row:t})=>e.jsx("div",{className:"flex space-x-2",children:e.jsx("span",{className:"max-w-32 truncate font-medium",children:t.getValue("name")})})},{accessorKey:"users_count",header:({column:t})=>e.jsx(F,{column:t,title:"用户数量"}),cell:({row:t})=>e.jsxs("div",{className:"flex items-center space-x-2 px-4",children:[e.jsx(Zs,{className:"h-4 w-4"}),e.jsx("span",{className:"font-medium",children:t.getValue("users_count")})]}),enableSorting:!0},{accessorKey:"server_count",header:({column:t})=>e.jsx(F,{column:t,title:"节点数量"}),cell:({row:t})=>e.jsxs("div",{className:"flex items-center space-x-2 px-4",children:[e.jsx(Tn,{className:"h-4 w-4"}),e.jsx("span",{className:"font-medium",children:t.getValue("server_count")})]}),enableSorting:!0,size:8e3},{id:"actions",header:({column:t})=>e.jsx(F,{className:"justify-end",column:t,title:"操作"}),cell:({row:t})=>e.jsxs("div",{className:"flex items-center justify-center",children:[e.jsx(Tt,{defaultValues:t.original,refetch:s,type:"edit",dialogTrigger:e.jsxs(k,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-muted",children:[e.jsx(ws,{className:"h-4 w-4 text-muted-foreground hover:text-foreground"}),e.jsx("span",{className:"sr-only",children:"编辑"})]})}),e.jsx(Ue,{title:"确认删除",description:"此操作将永久删除该权限组,删除后无法恢复。确定要继续吗?",confirmText:"删除",variant:"destructive",onConfirm:async()=>{Nc({id:t.original.id}).then(({data:a})=>{a&&(V.success("删除成功"),s())})},children:e.jsxs(k,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-red-100 dark:hover:bg-red-900",children:[e.jsx(Xe,{className:"h-4 w-4 text-muted-foreground hover:text-red-600 dark:hover:text-red-400"}),e.jsx("span",{className:"sr-only",children:"删除"})]})})]})}];function Nm(){const[s,t]=i.useState({}),[a,n]=i.useState({}),[r,l]=i.useState([]),[c,d]=i.useState([]),{data:m,refetch:w,isLoading:j}=K({queryKey:["serverGroupList"],queryFn:async()=>{const{data:x}=await St();return x}}),b=Re({data:m||[],columns:ym(w),state:{sorting:c,columnVisibility:a,rowSelection:s,columnFilters:r},enableRowSelection:!0,onRowSelectionChange:t,onSortingChange:d,onColumnFiltersChange:l,onColumnVisibilityChange:n,getCoreRowModel:Me(),getFilteredRowModel:$e(),getPaginationRowModel:Ae(),getSortedRowModel:He(),getFacetedRowModel:es(),getFacetedUniqueValues:ss(),initialState:{columnPinning:{right:["actions"]}}});return e.jsx(qe,{table:b,toolbar:x=>e.jsx(bm,{table:x,refetch:w}),isLoading:j})}function wm(){return e.jsxs(fe,{children:[e.jsxs(pe,{children:[e.jsx(Ce,{}),e.jsxs("div",{className:"ml-auto flex items-center space-x-4",children:[e.jsx(Se,{}),e.jsx(ke,{})]})]}),e.jsxs(Ne,{className:"flex flex-col",fixedHeight:!0,children:[e.jsx("div",{className:"mb-2 flex items-center justify-between space-y-2",children:e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:"权限组管理"}),e.jsx("p",{className:"mt-2 text-muted-foreground",children:"管理所有权限组,包括添加、删除、编辑等操作。"})]})}),e.jsx("div",{className:"-mx-4 flex-1 overflow-auto px-4 py-1 lg:flex-row lg:space-x-12 lg:space-y-0",children:e.jsx(Nm,{})})]})]})}const _m=Object.freeze(Object.defineProperty({__proto__:null,default:wm},Symbol.toStringTag,{value:"Module"})),Cm=o.object({remarks:o.string().min(1,"Please enter a valid remarks."),match:o.array(o.string()),action:o.enum(["block","dns"]),action_value:o.string().optional()});function kr({refetch:s,dialogTrigger:t,defaultValues:a={remarks:"",match:[],action:"block",action_value:""},type:n="add"}){const r=Z({resolver:ee(Cm),defaultValues:a,mode:"onChange"}),[l,c]=i.useState(!1);return e.jsxs(ue,{open:l,onOpenChange:c,children:[e.jsx(Pe,{asChild:!0,children:t||e.jsxs(k,{variant:"outline",size:"sm",className:"space-x-2",children:[e.jsx(ve,{icon:"ion:add"})," ",e.jsx("div",{children:"添加路由"})]})}),e.jsxs(de,{className:"sm:max-w-[425px]",children:[e.jsxs(ge,{children:[e.jsx(he,{children:n==="edit"?"编辑路由":"创建路由"}),e.jsx(ze,{})]}),e.jsxs(se,{...r,children:[e.jsx(h,{control:r.control,name:"remarks",render:({field:d})=>e.jsxs(u,{className:"flex-[2]",children:[e.jsx(g,{children:"备注"}),e.jsx("div",{className:"relative",children:e.jsx(v,{children:e.jsx(C,{type:"text",placeholder:"请输入备注",...d})})}),e.jsx(S,{})]})}),e.jsx(h,{control:r.control,name:"match",render:({field:d})=>e.jsxs(u,{className:"flex-[2]",children:[e.jsx(g,{children:"备注"}),e.jsx("div",{className:"relative",children:e.jsx(v,{children:e.jsx(gs,{className:"min-h-[120px]",placeholder:`example.com +*.example.com`,value:d.value.join(` +`),onChange:m=>{d.onChange(m.target.value.split(` +`))}})})}),e.jsx(S,{})]})}),e.jsx(h,{control:r.control,name:"action",render:({field:d})=>e.jsxs(u,{children:[e.jsx(g,{children:"动作"}),e.jsx("div",{className:"relative",children:e.jsx(v,{children:e.jsxs(B,{onValueChange:d.onChange,defaultValue:d.value,children:[e.jsx(U,{children:e.jsx(Y,{placeholder:"请选择动作"})}),e.jsxs(G,{children:[e.jsx(A,{value:"block",children:"禁止访问"}),e.jsx(A,{value:"dns",children:"指定DNS服务器进行解析"})]})]})})}),e.jsx(S,{})]})}),r.watch("action")==="dns"&&e.jsx(h,{control:r.control,name:"action_value",render:({field:d})=>e.jsxs(u,{children:[e.jsx(g,{children:"DNS服务器"}),e.jsx("div",{className:"relative",children:e.jsx(v,{children:e.jsx(C,{type:"text",placeholder:"请输入DNS服务器",...d})})})]})}),e.jsxs(Fe,{children:[e.jsx(Xs,{asChild:!0,children:e.jsx(k,{variant:"outline",children:"取消"})}),e.jsx(k,{type:"submit",onClick:()=>{wc(r.getValues()).then(({data:d})=>{d&&(c(!1),s&&s(),r.reset())})},children:"提交"})]})]})]})]})}function Sm({table:s,refetch:t}){const a=s.getState().columnFilters.length>0;return e.jsx("div",{className:"flex items-center justify-between ",children:e.jsxs("div",{className:"flex flex-1 flex-col-reverse items-start gap-y-2 sm:flex-row sm:items-center sm:space-x-2",children:[e.jsx(kr,{refetch:t}),e.jsx(C,{placeholder:"搜索路由...",value:s.getColumn("remarks")?.getFilterValue()??"",onChange:n=>s.getColumn("remarks")?.setFilterValue(n.target.value),className:"h-8 w-[150px] lg:w-[250px]"}),a&&e.jsxs(k,{variant:"ghost",onClick:()=>s.resetColumnFilters(),className:"h-8 px-2 lg:px-3",children:["Reset",e.jsx(Le,{className:"ml-2 h-4 w-4"})]})]})})}function km({columns:s,data:t,refetch:a}){const[n,r]=i.useState({}),[l,c]=i.useState({}),[d,m]=i.useState([]),[w,j]=i.useState([]),b=Re({data:t,columns:s,state:{sorting:w,columnVisibility:l,rowSelection:n,columnFilters:d},enableRowSelection:!0,onRowSelectionChange:r,onSortingChange:j,onColumnFiltersChange:m,onColumnVisibilityChange:c,getCoreRowModel:Me(),getFilteredRowModel:$e(),getPaginationRowModel:Ae(),getSortedRowModel:He(),getFacetedRowModel:es(),getFacetedUniqueValues:ss(),initialState:{columnPinning:{right:["actions"]}}});return e.jsx(qe,{table:b,toolbar:x=>e.jsx(Sm,{table:x,refetch:a})})}const Tm=s=>[{accessorKey:"id",header:({column:t})=>e.jsx(F,{column:t,title:"组ID"}),cell:({row:t})=>e.jsx("div",{className:"flex items-center space-x-2",children:e.jsx(E,{variant:"outline",children:t.getValue("id")})}),enableSorting:!0,enableHiding:!1},{accessorKey:"remarks",header:()=>e.jsx("div",{children:"备注"}),cell:({row:t})=>e.jsx("div",{className:"flex space-x-2",children:e.jsxs("span",{className:"max-w-32 truncate font-medium sm:max-w-72 md:max-w-[31rem]",children:["匹配 ",t.original.match?.length," 条规则"]})})},{accessorKey:"action",header:({column:t})=>e.jsx(F,{column:t,title:"动作"}),cell:({row:t})=>{const a={dns:"指定DNS服务器进行解析",block:"禁止访问"};return e.jsx("div",{className:"flex items-center space-x-2",children:e.jsx(E,{className:"max-w-32 truncate font-medium sm:max-w-72 md:max-w-[31rem]",children:a[t.getValue("action")]})})},enableSorting:!1,size:9e3},{id:"actions",header:()=>e.jsx("div",{className:"text-right",children:"操作"}),cell:({row:t})=>e.jsxs("div",{className:"flex items-center justify-center",children:[e.jsx(kr,{defaultValues:t.original,refetch:s,type:"edit",dialogTrigger:e.jsxs(k,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-muted",children:[e.jsx(ws,{className:"h-4 w-4 text-muted-foreground hover:text-foreground"}),e.jsx("span",{className:"sr-only",children:"编辑"})]})}),e.jsx(Ue,{title:"确认删除",description:"此操作将永久删除该权限组,删除后无法恢复。确定要继续吗?",confirmText:"删除",variant:"destructive",onConfirm:async()=>{_c({id:t.original.id}).then(({data:a})=>{a&&(V.success("删除成功"),s())})},children:e.jsxs(k,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-red-100 dark:hover:bg-red-900",children:[e.jsx(Xe,{className:"h-4 w-4 text-muted-foreground hover:text-red-600 dark:hover:text-red-400"}),e.jsx("span",{className:"sr-only",children:"删除"})]})})]})}];function Dm(){const[s,t]=i.useState([]);function a(){tr().then(({data:n})=>{t(n)})}return i.useEffect(()=>{a()},[]),e.jsxs(fe,{children:[e.jsxs(pe,{children:[e.jsx(Ce,{}),e.jsxs("div",{className:"ml-auto flex items-center space-x-4",children:[e.jsx(Se,{}),e.jsx(ke,{})]})]}),e.jsxs(Ne,{className:"flex flex-col",fixedHeight:!0,children:[e.jsx("div",{className:"mb-2 flex items-center justify-between space-y-2",children:e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:"路由管理"}),e.jsx("p",{className:"mt-2 text-muted-foreground",children:"管理所有路由组,包括添加、删除、编辑等操作。"})]})}),e.jsx("div",{className:"-mx-4 flex-1 overflow-auto px-4 py-1 lg:flex-row lg:space-x-12 lg:space-y-0",children:e.jsx(km,{data:s,columns:Tm(a),refetch:a})})]})]})}const Pm=Object.freeze(Object.defineProperty({__proto__:null,default:Dm},Symbol.toStringTag,{value:"Module"})),Tr=i.createContext(void 0);function Fm({children:s,refreshData:t}){const[a,n]=i.useState(!1),[r,l]=i.useState(null);return e.jsx(Tr.Provider,{value:{isOpen:a,setIsOpen:n,editingPlan:r,setEditingPlan:l,refreshData:t},children:s})}function na(){const s=i.useContext(Tr);if(s===void 0)throw new Error("usePlanEdit must be used within a PlanEditProvider");return s}function Im({table:s,saveOrder:t,isSortMode:a}){const{setIsOpen:n}=na();return e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex flex-1 items-center space-x-2",children:[e.jsxs(k,{variant:"outline",className:"space-x-2",size:"sm",onClick:()=>n(!0),children:[e.jsx(ve,{icon:"ion:add"}),e.jsx("div",{children:"添加套餐"})]}),e.jsx(C,{placeholder:"搜索套餐...",value:s.getColumn("name")?.getFilterValue()??"",onChange:r=>s.getColumn("name")?.setFilterValue(r.target.value),className:"h-8 w-[150px] lg:w-[250px]"})]}),e.jsx("div",{className:"flex items-center space-x-2",children:e.jsx(k,{variant:a?"default":"outline",size:"sm",onClick:t,children:a?"保存排序":"编辑排序"})})]})}const Vm=s=>[{id:"drag-handle",header:()=>null,cell:()=>e.jsx("div",{className:"cursor-move",children:e.jsx(Nt,{className:"size-4"})}),size:40,enableSorting:!1},{accessorKey:"id",header:({column:t})=>e.jsx(F,{column:t,title:"ID"}),cell:({row:t})=>e.jsx("div",{className:"flex items-center space-x-2",children:e.jsx(E,{variant:"outline",children:t.getValue("id")})}),enableSorting:!0,enableHiding:!1},{accessorKey:"show",header:({column:t})=>e.jsx(F,{column:t,title:"显示"}),cell:({row:t})=>e.jsx(O,{defaultChecked:t.getValue("show"),onCheckedChange:a=>{Ft({id:t.original.id,show:a}).then(({data:n})=>{!n&&s()})}}),enableSorting:!1,enableHiding:!1},{accessorKey:"sell",header:({column:t})=>e.jsx(F,{column:t,title:"销售"}),cell:({row:t})=>e.jsx(O,{defaultChecked:t.getValue("sell"),onCheckedChange:a=>{Ft({id:t.original.id,sell:a}).then(({data:n})=>{!n&&s()})}}),enableSorting:!1,enableHiding:!1},{accessorKey:"renew",header:({column:t})=>e.jsx(F,{column:t,title:"续费",tooltip:"在订阅停止销售时,已购用户是否可以续费"}),cell:({row:t})=>e.jsx(O,{defaultChecked:t.getValue("renew"),onCheckedChange:a=>{Ft({id:t.original.id,renew:a}).then(({data:n})=>{!n&&s()})}}),enableSorting:!1,enableHiding:!1},{accessorKey:"name",header:({column:t})=>e.jsx(F,{column:t,title:"名称"}),cell:({row:t})=>e.jsx("div",{className:"flex space-x-2",children:e.jsx("span",{className:"max-w-32 truncate font-medium sm:max-w-72 md:max-w-[31rem]",children:t.getValue("name")})}),enableSorting:!1,enableHiding:!1,size:900},{accessorKey:"users_count",header:({column:t})=>e.jsx(F,{column:t,title:"统计"}),cell:({row:t})=>e.jsxs("div",{className:"flex items-center space-x-2 px-2",children:[e.jsx(Zs,{}),e.jsx("span",{className:"max-w-32 truncate font-medium sm:max-w-72 md:max-w-[31rem]",children:t.getValue("users_count")})]}),enableSorting:!0},{accessorKey:"group",header:({column:t})=>e.jsx(F,{column:t,title:"权限组"}),cell:({row:t})=>e.jsx("div",{className:"flex max-w-[600px] flex-wrap items-center gap-1.5",children:e.jsx(E,{variant:"secondary",className:f("px-2 py-0.5 font-medium","bg-secondary/50 hover:bg-secondary/70","border border-border/50","transition-all duration-200","cursor-default select-none","flex items-center gap-1.5"),children:t.getValue("group")?.name})}),enableSorting:!1,enableHiding:!1,size:9e3},{id:"actions",header:({column:t})=>e.jsx(F,{className:"justify-end",column:t,title:"操作"}),cell:({row:t})=>{const{setIsOpen:a,setEditingPlan:n}=na();return e.jsxs("div",{className:"flex items-center justify-center",children:[e.jsxs(k,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-muted",onClick:()=>{n(t.original),a(!0)},children:[e.jsx(ws,{className:"h-4 w-4 text-muted-foreground hover:text-foreground"}),e.jsx("span",{className:"sr-only",children:"编辑"})]}),e.jsx(Ue,{title:"确认删除",description:"此操作将永久删除该订阅,删除后无法恢复。确定要继续吗?",confirmText:"删除",variant:"destructive",onConfirm:async()=>{Kc({id:t.original.id}).then(({data:r})=>{r&&(V.success("删除成功"),s())})},children:e.jsxs(k,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-red-100 dark:hover:bg-red-900",children:[e.jsx(Xe,{className:"h-4 w-4 text-muted-foreground hover:text-red-600 dark:hover:text-red-400"}),e.jsx("span",{className:"sr-only",children:"删除"})]})})]})}}],Rm=o.object({id:o.number().nullable(),group_id:o.union([o.number(),o.string()]).nullable().optional(),name:o.string().min(1).max(250),content:o.string().nullable().optional(),transfer_enable:o.union([o.number().min(0),o.string().min(1)]),prices:o.object({monthly:o.union([o.number(),o.string()]).nullable().optional(),quarterly:o.union([o.number(),o.string()]).nullable().optional(),half_yearly:o.union([o.number(),o.string()]).nullable().optional(),yearly:o.union([o.number(),o.string()]).nullable().optional(),two_yearly:o.union([o.number(),o.string()]).nullable().optional(),three_yearly:o.union([o.number(),o.string()]).nullable().optional(),onetime:o.union([o.number(),o.string()]).nullable().optional(),reset_traffic:o.union([o.number(),o.string()]).nullable().optional()}).default({}),speed_limit:o.union([o.number(),o.string()]).nullable().optional(),capacity_limit:o.union([o.number(),o.string()]).nullable().optional(),device_limit:o.union([o.number(),o.string()]).nullable().optional(),force_update:o.boolean().optional(),reset_traffic_method:o.number().nullable(),users_count:o.number().optional()}),Dr=i.forwardRef(({className:s,...t},a)=>e.jsx(Dn,{ref:a,className:f("peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",s),...t,children:e.jsx(eo,{className:f("flex items-center justify-center text-current"),children:e.jsx(us,{className:"h-4 w-4"})})}));Dr.displayName=Dn.displayName;const ct={id:null,group_id:null,name:"",content:"",transfer_enable:"",prices:{monthly:"",quarterly:"",half_yearly:"",yearly:"",two_yearly:"",three_yearly:"",onetime:"",reset_traffic:""},speed_limit:"",capacity_limit:"",device_limit:"",force_update:!1,reset_traffic_method:null},dt={monthly:{label:"月付",months:1,discount:1},quarterly:{label:"季付",months:3,discount:.95},half_yearly:{label:"半年付",months:6,discount:.9},yearly:{label:"年付",months:12,discount:.85},two_yearly:{label:"两年付",months:24,discount:.8},three_yearly:{label:"三年付",months:36,discount:.75},onetime:{label:"流量包",months:1,discount:1},reset_traffic:{label:"重置包",months:1,discount:1}},Mm=[{value:0,label:"跟随系统设置"},{value:1,label:"每月1号"},{value:2,label:"按月重置"},{value:3,label:"不重置"},{value:4,label:"每年1月1日"},{value:5,label:"按年重置"}];function zm(){const{isOpen:s,setIsOpen:t,editingPlan:a,setEditingPlan:n,refreshData:r}=na(),[l,c]=i.useState(!1),d=Z({resolver:ee(Rm),defaultValues:{...ct,...a||{}},mode:"onChange"});i.useEffect(()=>{a?d.reset({...ct,...a}):d.reset(ct)},[a,d]);const m=new Sn({html:!0}),[w,j]=i.useState();async function b(){St().then(({data:D})=>{j(D)})}i.useEffect(()=>{s&&b()},[s]);const x=D=>{if(isNaN(D))return;const T=Object.entries(dt).reduce((p,[_,z])=>{const N=D*z.months*z.discount;return{...p,[_]:N.toFixed(2)}},{});d.setValue("prices",T,{shouldDirty:!0})},y=()=>{t(!1),n(null),d.reset(ct)};return e.jsx(ue,{open:s,onOpenChange:y,children:e.jsxs(de,{children:[e.jsxs(ge,{children:[e.jsx(he,{children:a?"编辑套餐":"添加套餐"}),e.jsx(ze,{})]}),e.jsxs(se,{...d,children:[e.jsxs("div",{className:"space-y-4",children:[e.jsx(h,{control:d.control,name:"name",render:({field:D})=>e.jsxs(u,{children:[e.jsx(g,{children:"套餐名称"}),e.jsx(v,{children:e.jsx(C,{placeholder:"请输入套餐名称",...D})}),e.jsx(S,{})]})}),e.jsx(h,{control:d.control,name:"group_id",render:({field:D})=>e.jsxs(u,{children:[e.jsxs(g,{className:"flex items-center justify-between",children:["权限组",e.jsx(Tt,{dialogTrigger:e.jsx(k,{variant:"link",children:"添加权限组"}),refetch:b})]}),e.jsxs(B,{value:D.value||"",onValueChange:D.onChange,children:[e.jsx(v,{children:e.jsx(U,{children:e.jsx(Y,{placeholder:"选择权限组"})})}),e.jsx(G,{children:w?.map(T=>e.jsx(A,{value:T.id,children:T.name},T.id))})]}),e.jsx(S,{})]})}),e.jsx(h,{control:d.control,name:"transfer_enable",render:({field:D})=>e.jsxs(u,{className:"flex-1",children:[e.jsx(g,{children:"流量"}),e.jsxs("div",{className:"relative flex",children:[e.jsx(v,{children:e.jsx(C,{type:"number",min:0,placeholder:"请输入流量大小",className:"rounded-r-none",...D})}),e.jsx("div",{className:"flex items-center rounded-r-md border border-l-0 border-input bg-muted px-3 text-sm text-muted-foreground",children:"GB"})]}),e.jsx(S,{})]})}),e.jsx(h,{control:d.control,name:"speed_limit",render:({field:D})=>e.jsxs(u,{className:"flex-1",children:[e.jsx(g,{children:"限速"}),e.jsxs("div",{className:"relative flex",children:[e.jsx(v,{children:e.jsx(C,{type:"number",min:0,placeholder:"请输入限速",className:"rounded-r-none",...D})}),e.jsx("div",{className:"flex items-center rounded-r-md border border-l-0 border-input bg-muted px-3 text-sm text-muted-foreground",children:"Mbps"})]}),e.jsx(S,{})]})}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex flex-1 items-center",children:[e.jsx("div",{className:"flex-grow border-t border-gray-200 dark:border-gray-700"}),e.jsx("h3",{className:"mx-4 text-sm font-medium text-gray-500 dark:text-gray-400",children:"售价设置"}),e.jsx("div",{className:"flex-grow border-t border-gray-200 dark:border-gray-700"})]}),e.jsxs("div",{className:"ml-4 flex items-center gap-2",children:[e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-2",children:e.jsx("span",{className:"text-sm font-medium text-gray-400",children:"¥"})}),e.jsx(C,{type:"number",placeholder:"基础月付价格",className:"h-7 w-32 border-0 bg-gray-50 pl-6 pr-2 text-sm shadow-none ring-1 ring-gray-200 transition-shadow focus-visible:ring-2 focus-visible:ring-primary dark:bg-gray-800/50 dark:ring-gray-700 dark:placeholder:text-gray-500",onChange:D=>{const T=parseFloat(D.target.value);x(T)}})]}),e.jsx(ce,{children:e.jsxs(ne,{children:[e.jsx(re,{asChild:!0,children:e.jsx(k,{variant:"outline",size:"sm",className:"h-7 text-xs",onClick:()=>{const D=Object.keys(dt).reduce((T,p)=>({...T,[p]:""}),{});d.setValue("prices",D,{shouldDirty:!0})},children:"清空价格"})}),e.jsx(te,{side:"top",align:"end",children:e.jsx("p",{className:"text-xs",children:"清空所有周期的价格设置"})})]})})]})]}),e.jsx("div",{className:"grid grid-cols-2 gap-3 lg:grid-cols-3",children:Object.entries(dt).filter(([D])=>!["onetime","reset_traffic"].includes(D)).map(([D,T])=>e.jsx("div",{className:"group relative rounded-md bg-card p-2 ring-1 ring-gray-200 transition-all hover:ring-primary dark:ring-gray-800",children:e.jsx(h,{control:d.control,name:`prices.${D}`,render:({field:p})=>e.jsxs(u,{children:[e.jsxs(g,{className:"text-xs font-medium text-muted-foreground",children:[T.label,e.jsxs("span",{className:"ml-1 text-[10px] text-gray-400",children:["(",T.months===1?"每月":`每${T.months}个月`,"结算)"]})]}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-2",children:e.jsx("span",{className:"text-sm font-medium text-gray-400",children:"¥"})}),e.jsx(v,{children:e.jsx(C,{type:"number",placeholder:"0.00",min:0,...p,value:p.value??"",onChange:_=>p.onChange(_.target.value),className:"h-7 border-0 bg-gray-50 pl-6 pr-2 text-sm shadow-none ring-1 ring-gray-200 transition-shadow focus-visible:ring-2 focus-visible:ring-primary dark:bg-gray-800/50 dark:ring-gray-700 dark:placeholder:text-gray-500"})})]})]})})},D))}),e.jsx("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-2",children:Object.entries(dt).filter(([D])=>["onetime","reset_traffic"].includes(D)).map(([D,T])=>e.jsx("div",{className:"rounded-md border border-dashed border-gray-200 bg-muted/30 p-3 dark:border-gray-700",children:e.jsx(h,{control:d.control,name:`prices.${D}`,render:({field:p})=>e.jsx(u,{children:e.jsxs("div",{className:"flex flex-col gap-2 md:flex-row md:items-center md:justify-between",children:[e.jsxs("div",{className:"space-y-0",children:[e.jsx(g,{className:"text-xs font-medium",children:T.label}),e.jsx("p",{className:"text-[10px] text-muted-foreground",children:D==="onetime"?"一次性流量包,购买后立即生效":"用户可随时购买流量重置包,立即重置流量"})]}),e.jsxs("div",{className:"relative w-full md:w-32",children:[e.jsx("div",{className:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-2",children:e.jsx("span",{className:"text-sm font-medium text-gray-400",children:"¥"})}),e.jsx(v,{children:e.jsx(C,{type:"number",placeholder:"0.00",min:0,...p,className:"h-7 border-0 bg-gray-50 pl-6 pr-2 text-sm shadow-none ring-1 ring-gray-200 transition-shadow focus-visible:ring-2 focus-visible:ring-primary dark:bg-gray-800/50 dark:ring-gray-700 dark:placeholder:text-gray-500"})})]})]})})})},D))})]}),e.jsxs("div",{className:"flex gap-4",children:[e.jsx(h,{control:d.control,name:"device_limit",render:({field:D})=>e.jsxs(u,{className:"flex-1",children:[e.jsx(g,{children:"设备限制"}),e.jsxs("div",{className:"relative flex",children:[e.jsx(v,{children:e.jsx(C,{type:"number",min:0,placeholder:"留空则不限制",className:"rounded-r-none",...D,value:D.value??""})}),e.jsx("div",{className:"flex items-center rounded-r-md border border-l-0 border-input bg-muted px-3 text-sm text-muted-foreground",children:"台"})]}),e.jsx(S,{})]})}),e.jsx(h,{control:d.control,name:"capacity_limit",render:({field:D})=>e.jsxs(u,{className:"flex-1",children:[e.jsx(g,{children:"容量限制"}),e.jsxs("div",{className:"relative flex",children:[e.jsx(v,{children:e.jsx(C,{type:"number",min:0,placeholder:"留空则不限制",className:"rounded-r-none",...D,value:D.value??""})}),e.jsx("div",{className:"flex items-center rounded-r-md border border-l-0 border-input bg-muted px-3 text-sm text-muted-foreground",children:"人"})]}),e.jsx(S,{})]})})]}),e.jsx(h,{control:d.control,name:"reset_traffic_method",render:({field:D})=>e.jsxs(u,{children:[e.jsx(g,{children:"流量重置方式"}),e.jsxs(B,{value:D.value?.toString()??"0",onValueChange:T=>D.onChange(Number(T)),children:[e.jsx(v,{children:e.jsx(U,{children:e.jsx(Y,{placeholder:"选择流量重置方式"})})}),e.jsx(G,{children:Mm.map(T=>e.jsx(A,{value:T.value.toString(),children:T.label},T.value))})]}),e.jsx(P,{className:"text-xs",children:"设置订阅流量的重置方式,不同的重置方式会影响用户的流量计算方式"}),e.jsx(S,{})]})}),e.jsx(h,{control:d.control,name:"content",render:({field:D})=>{const[T,p]=i.useState(!1);return e.jsxs(u,{className:"space-y-2",children:[e.jsxs(g,{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:["套餐描述",e.jsx(ce,{children:e.jsxs(ne,{children:[e.jsx(re,{asChild:!0,children:e.jsx(k,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0",onClick:()=>p(!T),children:T?e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"h-4 w-4",children:[e.jsx("path",{d:"M10 12.5a2.5 2.5 0 100-5 2.5 2.5 0 000 5z"}),e.jsx("path",{fillRule:"evenodd",d:"M.664 10.59a1.651 1.651 0 010-1.186A10.004 10.004 0 0110 3c4.257 0 7.893 2.66 9.336 6.41.147.381.146.804 0 1.186A10.004 10.004 0 0110 17c-4.257 0-7.893-2.66-9.336-6.41zM14 10a4 4 0 11-8 0 4 4 0 018 0z",clipRule:"evenodd"})]}):e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"h-4 w-4",children:[e.jsx("path",{fillRule:"evenodd",d:"M3.28 2.22a.75.75 0 00-1.06 1.06l14.5 14.5a.75.75 0 101.06-1.06l-1.745-1.745a10.029 10.029 0 003.3-4.38 1.651 1.651 0 000-1.185A10.004 10.004 0 009.999 3a9.956 9.956 0 00-4.744 1.194L3.28 2.22zM7.752 6.69l1.092 1.092a2.5 2.5 0 013.374 3.373l1.091 1.092a4 4 0 00-5.557-5.557z",clipRule:"evenodd"}),e.jsx("path",{d:"M10.748 13.93l2.523 2.523a9.987 9.987 0 01-3.27.547c-4.258 0-7.894-2.66-9.337-6.41a1.651 1.651 0 010-1.186A10.007 10.007 0 012.839 6.02L6.07 9.252a4 4 0 004.678 4.678z"})]})})}),e.jsx(te,{side:"top",children:e.jsx("p",{className:"text-xs",children:T?"隐藏预览":"显示预览"})})]})})]}),e.jsx(ce,{children:e.jsxs(ne,{children:[e.jsx(re,{asChild:!0,children:e.jsx(k,{variant:"outline",size:"sm",onClick:()=>{D.onChange(`## 套餐特点 • 高速稳定的全球网络接入 • 支持多设备同时在线 • 无限制的流量重置 @@ -14,8 +14,8 @@ import{r as o,j as e,t as Zr,c as Xr,I as ra,a as ps,S as Kt,u as We,b as ot,d a ## 注意事项 - 禁止滥用 - 遵守当地法律法规 -- 支持随时更换套餐`)},children:"使用模板"})}),e.jsx(ne,{side:"left",align:"center",children:e.jsx("p",{className:"text-xs",children:"点击使用预设的套餐描述模板"})})]})})]}),e.jsxs("div",{className:`grid gap-4 ${T?"grid-cols-1 lg:grid-cols-2":"grid-cols-1"}`,children:[e.jsx("div",{className:"space-y-2",children:e.jsx(v,{children:e.jsx(pn,{style:{height:"400px"},value:F.value||"",renderHTML:d=>u.render(d),onChange:({text:d})=>F.onChange(d),config:{view:{menu:!0,md:!0,html:!1},canView:{menu:!0,md:!0,html:!1,fullScreen:!1,hideMenu:!1}},placeholder:"在这里编写套餐描述...",className:"rounded-md border"})})}),T&&e.jsxs("div",{className:"space-y-2",children:[e.jsx("div",{className:"text-sm text-muted-foreground",children:"预览"}),e.jsx("div",{className:"prose prose-sm dark:prose-invert h-[400px] max-w-none overflow-y-auto rounded-md border p-4",children:e.jsx("div",{dangerouslySetInnerHTML:{__html:u.render(F.value||"")}})})]})]}),e.jsx(P,{className:"text-xs",children:"支持 Markdown 格式,可以使用标题、列表、粗体、斜体等样式来美化描述内容"}),e.jsx(S,{})]})}})]}),e.jsx(ke,{className:"mt-6",children:e.jsxs("div",{className:"flex w-full items-center justify-between",children:[e.jsx("div",{className:"flex-shrink-0",children:a&&e.jsx(j,{control:x.control,name:"force_update",render:({field:F})=>e.jsxs(h,{className:"flex flex-row items-center space-x-2 space-y-0",children:[e.jsx(v,{children:e.jsx(wr,{checked:F.value,onCheckedChange:F.onChange})}),e.jsx("div",{className:"",children:e.jsx(g,{className:"text-sm",children:"强制更新到用户"})})]})})}),e.jsxs("div",{className:"flex space-x-2",children:[e.jsx(k,{type:"button",variant:"outline",onClick:D,children:"取消"}),e.jsx(k,{type:"submit",disabled:l,onClick:()=>{x.handleSubmit(async F=>{c(!0),(await wc(F)).data&&(z.success(a?"套餐更新成功":"套餐添加成功"),D(),r()),c(!1)})()},children:l?"提交中...":"提交"})]})]})})]})]})})}function lm(){const[s,t]=o.useState({}),[a,n]=o.useState({"drag-handle":!1}),[r,l]=o.useState([]),[c,x]=o.useState([]),[u,b]=o.useState(!1),[p,y]=o.useState([]),{refetch:_}=G({queryKey:["planList"],queryFn:async()=>{const{data:d}=await Ps();return y(d),d}});o.useEffect(()=>{n({"drag-handle":u})},[u]);const D=(d,N)=>{u&&(d.dataTransfer.setData("text/plain",N.toString()),d.currentTarget.classList.add("opacity-50"))},F=(d,N)=>{if(!u)return;d.preventDefault(),d.currentTarget.classList.remove("bg-muted");const w=parseInt(d.dataTransfer.getData("text/plain"));if(w===N)return;const E=[...p],[H]=E.splice(w,1);E.splice(N,0,H),y(E)},T=async()=>{if(!u){b(!0);return}try{const d=p?.map(N=>N.id);await Cc(d),z.success("排序保存成功"),b(!1),_()}catch{z.error("排序保存失败"),b(!1)}},m=Fe({data:p||[],columns:tm(_),state:{sorting:c,columnVisibility:a,rowSelection:s,columnFilters:r},enableRowSelection:!0,onRowSelectionChange:t,onSortingChange:x,onColumnFiltersChange:l,onColumnVisibilityChange:n,getCoreRowModel:Pe(),getFilteredRowModel:Ee(),getPaginationRowModel:Me(),getSortedRowModel:Oe(),getFacetedRowModel:Ze(),getFacetedUniqueValues:Xe(),initialState:{columnPinning:{right:["actions"]}},pageCount:u?1:void 0});return e.jsx(em,{refreshData:_,children:e.jsxs("div",{className:"space-y-4",children:[e.jsx($e,{table:m,toolbar:d=>e.jsx(sm,{table:d,refetch:_,saveOrder:T,isSortMode:u}),draggable:u,onDragStart:D,onDragEnd:d=>d.currentTarget.classList.remove("opacity-50"),onDragOver:d=>{d.preventDefault(),d.currentTarget.classList.add("bg-muted")},onDragLeave:d=>d.currentTarget.classList.remove("bg-muted"),onDrop:F,showPagination:!u}),e.jsx(rm,{})]})})}function im(){return e.jsxs(ge,{children:[e.jsxs(fe,{children:[e.jsx(Ne,{}),e.jsxs("div",{className:"ml-auto flex items-center space-x-4",children:[e.jsx(we,{}),e.jsx(_e,{})]})]}),e.jsxs(be,{className:"flex flex-col",fixedHeight:!0,children:[e.jsx("div",{className:"mb-2 flex items-center justify-between space-y-2",children:e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:"订阅管理"}),e.jsx("p",{className:"mt-2 text-muted-foreground",children:"在这里可以配置订阅计划,包括添加、删除、编辑等操作。"})]})}),e.jsx("div",{className:"-mx-4 flex-1 overflow-auto px-4 py-1 lg:flex-row lg:space-x-12 lg:space-y-0",children:e.jsx(lm,{})})]})]})}const om=Object.freeze(Object.defineProperty({__proto__:null,default:im},Symbol.toStringTag,{value:"Module"})),_r=[{value:te.PENDING,label:ws[te.PENDING],icon:Ei,color:Ms[te.PENDING]},{value:te.PROCESSING,label:ws[te.PROCESSING],icon:yn,color:Ms[te.PROCESSING]},{value:te.COMPLETED,label:ws[te.COMPLETED],icon:Ot,color:Ms[te.COMPLETED]},{value:te.CANCELLED,label:ws[te.CANCELLED],icon:Nn,color:Ms[te.CANCELLED]},{value:te.DISCOUNTED,label:ws[te.DISCOUNTED],icon:Ot,color:Ms[te.DISCOUNTED]}],Cr=[{value:le.PENDING,label:Ys[le.PENDING],icon:Mi,color:Ws[le.PENDING]},{value:le.PROCESSING,label:Ys[le.PROCESSING],icon:yn,color:Ws[le.PROCESSING]},{value:le.VALID,label:Ys[le.VALID],icon:Ot,color:Ws[le.VALID]},{value:le.INVALID,label:Ys[le.INVALID],icon:Nn,color:Ws[le.INVALID]}];function Ca({column:s,title:t,options:a}){const n=s?.getFacetedUniqueValues(),r=s?.getFilterValue(),l=Array.isArray(r)?new Set(r):r!==void 0?new Set([r]):new Set;return e.jsxs(Ue,{children:[e.jsx(qe,{asChild:!0,children:e.jsxs(k,{variant:"outline",size:"sm",className:"h-8 border-dashed",children:[e.jsx(Fs,{className:"mr-2 h-4 w-4"}),t,l?.size>0&&e.jsxs(e.Fragment,{children:[e.jsx(se,{orientation:"vertical",className:"mx-2 h-4"}),e.jsx(M,{variant:"secondary",className:"rounded-sm px-1 font-normal lg:hidden",children:l.size}),e.jsx("div",{className:"hidden space-x-1 lg:flex",children:l.size>2?e.jsxs(M,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:[l.size," selected"]}):a.filter(c=>l.has(c.value)).map(c=>e.jsx(M,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:c.label},c.value))})]})]})}),e.jsx(Le,{className:"w-[200px] p-0",align:"start",children:e.jsxs(Qe,{children:[e.jsx(xs,{placeholder:t}),e.jsxs(es,{children:[e.jsx(ms,{children:"No results found."}),e.jsx(pe,{children:a.map(c=>{const x=l.has(c.value);return e.jsxs(ie,{onSelect:()=>{const u=new Set(l);x?u.delete(c.value):u.add(c.value);const b=Array.from(u);s?.setFilterValue(b.length?b:void 0)},children:[e.jsx("div",{className:f("mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary",x?"bg-primary text-primary-foreground":"opacity-50 [&_svg]:invisible"),children:e.jsx(ds,{className:f("h-4 w-4")})}),c.icon&&e.jsx(c.icon,{className:`mr-2 h-4 w-4 text-muted-foreground text-${c.color}`}),e.jsx("span",{children:c.label}),n?.get(c.value)&&e.jsx("span",{className:"ml-auto flex h-4 w-4 items-center justify-center font-mono text-xs",children:n.get(c.value)})]},c.value)})}),l.size>0&&e.jsxs(e.Fragment,{children:[e.jsx(ys,{}),e.jsx(pe,{children:e.jsx(ie,{onSelect:()=>s?.setFilterValue(void 0),className:"justify-center text-center",children:"Clear filters"})})]})]})]})})]})}const cm=i.object({email:i.string().min(1),plan_id:i.number(),period:i.string(),total_amount:i.number()}),dm={email:"",plan_id:0,total_amount:0,period:""};function Sr({refetch:s,trigger:t,defaultValues:a}){const[n,r]=o.useState(!1),l=Z({resolver:Q(cm),defaultValues:{...dm,...a},mode:"onChange"}),[c,x]=o.useState([]);return o.useEffect(()=>{n&&Ps().then(({data:u})=>{x(u)})},[n]),e.jsxs(de,{open:n,onOpenChange:r,children:[e.jsx(Se,{asChild:!0,children:t||e.jsxs(k,{variant:"outline",size:"sm",className:" h-8 space-x-2",children:[e.jsx(Ce,{icon:"ion:add"}),e.jsx("div",{children:"添加订单"})]})}),e.jsxs(re,{className:"sm:max-w-[425px]",children:[e.jsxs(he,{children:[e.jsx(xe,{children:"订单分配"}),e.jsx(Ve,{})]}),e.jsxs(ee,{...l,children:[e.jsx(j,{control:l.control,name:"email",render:({field:u})=>e.jsxs(h,{children:[e.jsx(g,{children:"用户邮箱"}),e.jsx(v,{children:e.jsx(C,{placeholder:"请输入用户邮箱",...u})})]})}),e.jsx(j,{control:l.control,name:"plan_id",render:({field:u})=>e.jsxs(h,{children:[e.jsx(g,{children:"订阅计划"}),e.jsx(v,{children:e.jsxs(B,{value:u.value?u.value?.toString():void 0,onValueChange:b=>u.onChange(parseInt(b)),children:[e.jsx(U,{children:e.jsx(Y,{placeholder:"请选择订阅计划"})}),e.jsx(q,{children:c.map(b=>e.jsx(O,{value:b.id.toString(),children:b.name},b.id))})]})})]})}),e.jsx(j,{control:l.control,name:"period",render:({field:u})=>e.jsxs(h,{children:[e.jsx(g,{children:"订阅时长"}),e.jsx(v,{children:e.jsxs(B,{value:u.value,onValueChange:u.onChange,children:[e.jsx(U,{children:e.jsx(Y,{placeholder:"请选择购买时长"})}),e.jsx(q,{children:Object.keys(it).map(b=>e.jsx(O,{value:b,children:it[b]},b))})]})})]})}),e.jsx(j,{control:l.control,name:"total_amount",render:({field:u})=>e.jsxs(h,{children:[e.jsx(g,{children:"支付金额"}),e.jsx(v,{children:e.jsx(C,{type:"number",placeholder:"请输入需要支付的金额",value:u.value/100,onChange:b=>u.onChange(parseFloat(b.currentTarget.value)*100)})}),e.jsx(S,{})]})}),e.jsxs(ke,{children:[e.jsx(k,{variant:"outline",onClick:()=>r(!1),children:"取消"}),e.jsx(k,{type:"submit",onClick:()=>{l.handleSubmit(u=>{Tc(u).then(({data:b})=>{b&&(s&&s(),l.reset(),r(!1),z.success("添加成功"))})})()},children:"确定"})]})]})]})]})}function xm({table:s,refetch:t}){const a=s.getState().columnFilters.length>0;return e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(Sr,{refetch:t}),e.jsx(C,{placeholder:"搜索订单...",value:s.getColumn("trade_no")?.getFilterValue()??"",onChange:n=>s.getColumn("trade_no")?.setFilterValue(n.target.value),className:"h-8 w-[150px] lg:w-[250px]"}),e.jsxs("div",{className:"flex gap-x-2",children:[s.getColumn("status")&&e.jsx(Ca,{column:s.getColumn("status"),title:"订单状态",options:_r}),s.getColumn("commission_status")&&e.jsx(Ca,{column:s.getColumn("commission_status"),title:"佣金状态",options:Cr})]}),a&&e.jsxs(k,{variant:"ghost",onClick:()=>s.resetColumnFilters(),className:"h-8 px-2 lg:px-3",children:["重置",e.jsx(Re,{className:"ml-2 h-4 w-4"})]})]})}function Ie({label:s,value:t,className:a,valueClassName:n}){return e.jsxs("div",{className:f("flex items-center py-1.5",a),children:[e.jsx("div",{className:"w-28 shrink-0 text-sm text-muted-foreground",children:s}),e.jsx("div",{className:f("text-sm",n),children:t||"-"})]})}function mm({status:s}){const t={PENDING:"bg-yellow-100 text-yellow-800 hover:bg-yellow-100",PAID:"bg-green-100 text-green-800 hover:bg-green-100",FAILED:"bg-red-100 text-red-800 hover:bg-red-100",REFUNDED:"bg-gray-100 text-gray-800 hover:bg-gray-100"};return e.jsx(M,{variant:"secondary",className:f("font-medium",t[s]),children:ws[s]})}function um({id:s,trigger:t}){const[a,n]=o.useState(!1),[r,l]=o.useState();return o.useEffect(()=>{(async()=>{if(a){const{data:x}=await Sc({id:s});l(x)}})()},[a,s]),e.jsxs(de,{onOpenChange:n,open:a,children:[e.jsx(Se,{asChild:!0,children:t}),e.jsxs(re,{className:"max-w-xl",children:[e.jsxs(he,{className:"space-y-2",children:[e.jsx(xe,{className:"text-lg font-medium",children:"订单信息"}),e.jsx("div",{className:"flex items-center justify-between text-sm",children:e.jsxs("div",{className:"flex items-center space-x-6",children:[e.jsxs("div",{className:"text-muted-foreground",children:["订单号:",r?.trade_no]}),r?.status&&e.jsx(mm,{status:r.status})]})})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"rounded-lg border p-4",children:[e.jsx("div",{className:"mb-2 text-sm font-medium",children:"基本信息"}),e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(Ie,{label:"用户邮箱",value:r?.user?.email?e.jsxs(vs,{to:`/user/manage?email=${r.user.email}`,className:"group inline-flex items-center gap-1 text-primary hover:underline",children:[r.user.email,e.jsx(wn,{className:"h-3.5 w-3.5 opacity-0 transition-opacity group-hover:opacity-100"})]}):"-"}),e.jsx(Ie,{label:"订单周期",value:r&&it[r.period]}),e.jsx(Ie,{label:"订阅计划",value:r?.plan?.name,valueClassName:"font-medium"}),e.jsx(Ie,{label:"回调单号",value:r?.callback_no,valueClassName:"font-mono text-xs"})]})]}),e.jsxs("div",{className:"rounded-lg border p-4",children:[e.jsx("div",{className:"mb-2 text-sm font-medium",children:"金额信息"}),e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(Ie,{label:"支付金额",value:Es(r?.total_amount||0),valueClassName:"font-medium text-primary"}),e.jsx(se,{className:"my-2"}),e.jsx(Ie,{label:"余额支付",value:Es(r?.balance_amount||0)}),e.jsx(Ie,{label:"优惠金额",value:Es(r?.discount_amount||0),valueClassName:"text-green-600"}),e.jsx(Ie,{label:"退回金额",value:Es(r?.refund_amount||0),valueClassName:"text-red-600"}),e.jsx(Ie,{label:"折抵金额",value:Es(r?.surplus_amount||0)})]})]}),e.jsxs("div",{className:"rounded-lg border p-4",children:[e.jsx("div",{className:"mb-2 text-sm font-medium",children:"时间信息"}),e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(Ie,{label:"创建时间",value:X(r?.created_at),valueClassName:"font-mono text-xs"}),e.jsx(Ie,{label:"更新时间",value:X(r?.updated_at),valueClassName:"font-mono text-xs"})]})]})]})]})]})}const hm=s=>[{accessorKey:"trade_no",header:({column:t})=>e.jsx(V,{column:t,title:"订单号"}),cell:({row:t})=>{const a=t.original.trade_no,n=a.length>6?`${a.slice(0,3)}...${a.slice(-3)}`:a;return e.jsx("div",{className:"flex items-center",children:e.jsx(um,{trigger:e.jsxs(A,{variant:"ghost",size:"sm",className:"flex h-8 items-center gap-1.5 px-2 font-medium text-primary transition-colors hover:bg-primary/10 hover:text-primary/80",children:[e.jsx("span",{className:"font-mono",children:n}),e.jsx(wn,{className:"h-3.5 w-3.5 opacity-70"})]}),id:t.original.id})})},enableSorting:!1,enableHiding:!1},{accessorKey:"type",header:({column:t})=>e.jsx(V,{column:t,title:"类型"}),cell:({row:t})=>e.jsx(M,{variant:"outline",className:"bg-muted/50 transition-colors hover:bg-muted/60",children:qc[t.getValue("type")]}),enableSorting:!1,enableHiding:!1},{accessorKey:"plan.name",header:({column:t})=>e.jsx(V,{column:t,title:"订阅计划"}),cell:({row:t})=>e.jsx("div",{className:"flex space-x-2",children:e.jsx("span",{className:"max-w-32 truncate font-medium text-foreground/90 sm:max-w-72 md:max-w-[31rem]",children:t.original.plan?.name||"-"})}),enableSorting:!1,enableHiding:!1},{accessorKey:"period",header:({column:t})=>e.jsx(V,{column:t,title:"周期"}),cell:({row:t})=>e.jsx(M,{variant:"outline",className:"bg-muted/50 transition-colors hover:bg-muted/60",children:it[t.getValue("period")]}),enableSorting:!1,enableHiding:!1},{accessorKey:"total_amount",header:({column:t})=>e.jsx(V,{column:t,title:"支付金额"}),cell:({row:t})=>{const a=t.getValue("total_amount"),n=typeof a=="number"?(a/100).toFixed(2):"N/A";return e.jsxs("div",{className:"flex items-center font-mono text-foreground/90",children:["¥",n]})},enableSorting:!0,enableHiding:!1},{accessorKey:"status",header:({column:t})=>e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(V,{column:t,title:"订单状态"}),e.jsx(ue,{delayDuration:100,children:e.jsxs(oe,{children:[e.jsx(ce,{children:e.jsx(hr,{className:"h-4 w-4 text-muted-foreground/70 transition-colors hover:text-muted-foreground"})}),e.jsx(ne,{side:"top",className:"max-w-[200px] text-sm",children:"标记为[已支付]后将会由系统进行开通后并完成"})]})})]}),cell:({row:t})=>{const a=_r.find(n=>n.value===t.getValue("status"));return a?e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[a.icon&&e.jsx(a.icon,{className:`h-4 w-4 text-${a.color}`}),e.jsx("span",{className:"text-sm font-medium",children:a.label})]}),a.value===te.PENDING&&e.jsxs(gs,{modal:!0,children:[e.jsx(fs,{asChild:!0,children:e.jsxs(A,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0 hover:bg-muted/60",children:[e.jsx(lt,{className:"h-4 w-4"}),e.jsx("span",{className:"sr-only",children:"打开菜单"})]})}),e.jsxs(cs,{align:"end",className:"w-[140px]",children:[e.jsx(ae,{className:"cursor-pointer",onClick:async()=>{await kc({trade_no:t.original.trade_no}),s()},children:"标记为已支付"}),e.jsx(ae,{className:"cursor-pointer text-destructive focus:text-destructive",onClick:async()=>{await Dc({trade_no:t.original.trade_no}),s()},children:"取消订单"})]})]})]}):null},enableSorting:!0,enableHiding:!1},{accessorKey:"commission_balance",header:({column:t})=>e.jsx(V,{column:t,title:"佣金金额"}),cell:({row:t})=>{const a=t.getValue("commission_balance"),n=a?(a/100).toFixed(2):"-";return e.jsx("div",{className:"flex items-center font-mono text-foreground/90",children:a?`¥${n}`:"-"})},enableSorting:!0,enableHiding:!1},{accessorKey:"commission_status",header:({column:t})=>e.jsx(V,{column:t,title:"佣金状态"}),cell:({row:t})=>{const a=t.original.commission_status,n=Cr.find(r=>r.value===t.getValue("commission_status"));return a==0||!n?e.jsx("span",{className:"text-muted-foreground",children:"-"}):e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[n.icon&&e.jsx(n.icon,{className:`h-4 w-4 text-${n.color}`}),e.jsx("span",{className:"text-sm font-medium",children:n.label})]}),n.value===le.PENDING&&e.jsxs(gs,{modal:!0,children:[e.jsx(fs,{asChild:!0,children:e.jsxs(A,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0 hover:bg-muted/60",children:[e.jsx(lt,{className:"h-4 w-4"}),e.jsx("span",{className:"sr-only",children:"打开菜单"})]})}),e.jsxs(cs,{align:"end",className:"w-[120px]",children:[e.jsx(ae,{className:"cursor-pointer",onClick:async()=>{await ba({trade_no:t.original.trade_no,commission_status:le.PROCESSING}),s()},children:"标记为有效"}),e.jsx(ae,{className:"cursor-pointer text-destructive focus:text-destructive",onClick:async()=>{await ba({trade_no:t.original.trade_no,commission_status:le.INVALID}),s()},children:"标记为无效"})]})]})]})},enableSorting:!0,enableHiding:!1},{accessorKey:"created_at",header:({column:t})=>e.jsx(V,{column:t,title:"创建时间"}),cell:({row:t})=>e.jsx("div",{className:"text-nowrap font-mono text-sm text-muted-foreground",children:X(t.getValue("created_at"),"YYYY/MM/DD HH:mm:ss")}),enableSorting:!0,enableHiding:!1}];function jm(){const s=ot(),t=new URLSearchParams(s.search),a=Array.from(t.entries()).map(([E,H])=>({id:E,value:parseInt(H)||H})),[n]=o.useState(!0),r=n&&s.state?.filters?s.state.filters:[],l=[...a,...r];o.useEffect(()=>{s.state?.filters&&window.history.replaceState({...s.state,filters:void 0},"")},[]);const[c,x]=o.useState({}),[u,b]=o.useState({}),[p,y]=o.useState(l),[_,D]=o.useState([]),[F,T]=o.useState({pageIndex:0,pageSize:10}),{refetch:m,data:d,isLoading:N}=G({queryKey:["orderList",F,p,_],queryFn:()=>Xn({pageSize:F.pageSize,current:F.pageIndex+1,filter:p,sort:_})}),w=Fe({data:d?.data??[],columns:hm(m),state:{sorting:_,columnVisibility:u,rowSelection:c,columnFilters:p,pagination:F},rowCount:d?.total??0,manualPagination:!0,manualFiltering:!0,manualSorting:!0,enableRowSelection:!0,onRowSelectionChange:x,onSortingChange:D,onColumnFiltersChange:y,onColumnVisibilityChange:b,getCoreRowModel:Pe(),getFilteredRowModel:Ee(),getPaginationRowModel:Me(),onPaginationChange:T,getSortedRowModel:Oe(),getFacetedRowModel:Ze(),getFacetedUniqueValues:Xe()});return e.jsx($e,{table:w,toolbar:e.jsx(xm,{table:w,refetch:m}),showPagination:!0})}function gm(){return e.jsxs(ge,{children:[e.jsxs(fe,{children:[e.jsx(Ne,{}),e.jsxs("div",{className:"ml-auto flex items-center space-x-4",children:[e.jsx(we,{}),e.jsx(_e,{})]})]}),e.jsxs(be,{className:"flex flex-col",fixedHeight:!0,children:[e.jsx("div",{className:"mb-2 flex items-center justify-between space-y-2",children:e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:" 订单管理"}),e.jsx("p",{className:"text-muted-foreground mt-2",children:"在这里可以查看用户订单,包括分配、查看、删除等操作。"})]})}),e.jsx("div",{className:"-mx-4 flex-1 overflow-auto px-4 py-1 lg:flex-row lg:space-x-12 lg:space-y-0",children:e.jsx(jm,{})})]})]})}const fm=Object.freeze(Object.defineProperty({__proto__:null,default:gm},Symbol.toStringTag,{value:"Module"}));function pm({column:s,title:t,options:a}){const n=s?.getFacetedUniqueValues(),r=new Set(s?.getFilterValue());return e.jsxs(Ue,{children:[e.jsx(qe,{asChild:!0,children:e.jsxs(k,{variant:"outline",size:"sm",className:"h-8 border-dashed",children:[e.jsx(Fs,{className:"mr-2 h-4 w-4"}),t,r?.size>0&&e.jsxs(e.Fragment,{children:[e.jsx(se,{orientation:"vertical",className:"mx-2 h-4"}),e.jsx(M,{variant:"secondary",className:"rounded-sm px-1 font-normal lg:hidden",children:r.size}),e.jsx("div",{className:"hidden space-x-1 lg:flex",children:r.size>2?e.jsxs(M,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:[r.size," selected"]}):a.filter(l=>r.has(l.value)).map(l=>e.jsx(M,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:l.label},l.value))})]})]})}),e.jsx(Le,{className:"w-[200px] p-0",align:"start",children:e.jsxs(Qe,{children:[e.jsx(xs,{placeholder:t}),e.jsxs(es,{children:[e.jsx(ms,{children:"No results found."}),e.jsx(pe,{children:a.map(l=>{const c=r.has(l.value);return e.jsxs(ie,{onSelect:()=>{c?r.delete(l.value):r.add(l.value);const x=Array.from(r);s?.setFilterValue(x.length?x:void 0)},children:[e.jsx("div",{className:f("mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary",c?"bg-primary text-primary-foreground":"opacity-50 [&_svg]:invisible"),children:e.jsx(ds,{className:f("h-4 w-4")})}),l.icon&&e.jsx(l.icon,{className:`mr-2 h-4 w-4 text-muted-foreground text-${l.color}`}),e.jsx("span",{children:l.label}),n?.get(l.value)&&e.jsx("span",{className:"ml-auto flex h-4 w-4 items-center justify-center font-mono text-xs",children:n.get(l.value)})]},l.value)})}),r.size>0&&e.jsxs(e.Fragment,{children:[e.jsx(ys,{}),e.jsx(pe,{children:e.jsx(ie,{onSelect:()=>s?.setFilterValue(void 0),className:"justify-center text-center",children:"Clear filters"})})]})]})]})})]})}const Dt=s=>s===""||s===void 0?void 0:typeof s=="string"?Number(s):s,vm=i.object({id:i.number().optional(),name:i.string().min(1,"请输入优惠券名称"),code:i.string().optional(),type:i.union([i.string(),i.nativeEnum(vt)]).transform(s=>typeof s=="string"?Number(s):s),value:i.union([i.string(),i.number()]).transform(s=>typeof s=="string"?Number(s):s).refine(s=>s>0,"优惠值必须大于0"),started_at:i.number(),ended_at:i.number(),limit_use:i.union([i.string(),i.number()]).optional().transform(Dt),limit_use_with_user:i.union([i.string(),i.number()]).optional().transform(Dt),generate_count:i.union([i.string(),i.number()]).optional().transform(Dt),limit_plan_ids:i.array(i.number()).default([]),limit_period:i.array(i.nativeEnum(Cs)).default([])}).refine(s=>s.ended_at>s.started_at,{message:"结束时间必须晚于开始时间",path:["ended_at"]}),Sa={name:"",code:"",type:vt.AMOUNT,value:0,started_at:Math.floor(Date.now()/1e3),ended_at:Math.floor(Date.now()/1e3)+7*24*60*60,limit_use:"",limit_use_with_user:"",limit_plan_ids:[],limit_period:[],generate_count:""};function kr({defaultValues:s,refetch:t,type:a="create",dialogTrigger:n=e.jsxs(k,{variant:"outline",size:"sm",className:"h-8 space-x-2",children:[e.jsx(Ce,{icon:"ion:add"}),e.jsx("div",{children:"添加优惠券"})]}),open:r,onOpenChange:l}){const[c,x]=o.useState(!1),u=r??c,b=l??x,[p,y]=o.useState([]),_=Z({resolver:Q(vm),defaultValues:s||Sa});o.useEffect(()=>{s&&_.reset(s)},[s,_]),o.useEffect(()=>{Ps().then(({data:m})=>y(m))},[]);const D=m=>{if(!m)return;const d=(N,w)=>{const E=new Date(w*1e3);return N.setHours(E.getHours(),E.getMinutes(),E.getSeconds()),Math.floor(N.getTime()/1e3)};m.from&&_.setValue("started_at",d(m.from,_.watch("started_at"))),m.to&&_.setValue("ended_at",d(m.to,_.watch("ended_at")))},F=async m=>{try{console.log("Form values before formatting:",m);const d={...m,type:Number(m.type),value:Number(m.value),limit_use:m.limit_use===""?void 0:Number(m.limit_use),limit_use_with_user:m.limit_use_with_user===""?void 0:Number(m.limit_use_with_user),generate_count:m.generate_count===""?void 0:Number(m.generate_count),limit_period:Array.isArray(m.limit_period)?m.limit_period:[],limit_plan_ids:Array.isArray(m.limit_plan_ids)?m.limit_plan_ids:[]};console.log("Formatted values:",d),await Pc(d),b(!1),a==="create"&&_.reset(Sa),t()}catch(d){console.error("保存优惠券失败:",d)}},T=(m,d)=>e.jsxs("div",{className:"flex-1 space-y-1.5",children:[e.jsx("div",{className:"text-sm font-medium text-muted-foreground",children:d}),e.jsx(C,{type:"datetime-local",step:"1",value:X(_.watch(m),"YYYY-MM-DDTHH:mm:ss"),onChange:N=>{const w=new Date(N.target.value);_.setValue(m,Math.floor(w.getTime()/1e3))},className:"h-8 [&::-webkit-calendar-picker-indicator]:hidden"})]});return e.jsxs(de,{open:u,onOpenChange:b,children:[n&&e.jsx(Se,{asChild:!0,children:n}),e.jsxs(re,{className:"sm:max-w-[425px]",children:[e.jsx(he,{children:e.jsx(xe,{children:a==="create"?"添加优惠券":"编辑优惠券"})}),e.jsx(ee,{..._,children:e.jsxs("form",{onSubmit:_.handleSubmit(F),className:"space-y-4",children:[e.jsx(j,{control:_.control,name:"name",render:({field:m})=>e.jsxs(h,{children:[e.jsx(g,{children:"优惠券名称"}),e.jsx(C,{placeholder:"请输入优惠券名称",...m}),e.jsx(S,{})]})}),e.jsxs(h,{children:[e.jsx(g,{children:"优惠券类型和值"}),e.jsxs("div",{className:"flex",children:[e.jsx(j,{control:_.control,name:"type",render:({field:m})=>e.jsxs(B,{value:m.value.toString(),onValueChange:m.onChange,children:[e.jsx(U,{className:"flex-[1.2] rounded-r-none border-r-0 focus:z-10",children:e.jsx(Y,{placeholder:"优惠券类型"})}),e.jsx(q,{children:Object.entries(Yt).map(([d,N])=>e.jsx(O,{value:d,children:N},d))})]})}),e.jsx(j,{control:_.control,name:"value",render:({field:m})=>e.jsx(C,{type:"number",placeholder:"请输入值",...m,onChange:d=>m.onChange(d.target.value===""?"":d.target.value),className:"flex-[2] rounded-none border-x-0 text-left"})}),e.jsx("div",{className:"flex min-w-[40px] items-center justify-center rounded-md rounded-l-none border border-l-0 border-input bg-muted/50 px-3 font-medium text-muted-foreground",children:e.jsx("span",{children:_.watch("type")===vt.AMOUNT?"¥":"%"})})]})]}),e.jsxs(h,{children:[e.jsx(g,{children:"优惠券有效期"}),e.jsxs(Ue,{children:[e.jsx(qe,{asChild:!0,children:e.jsxs(k,{variant:"outline",className:f("w-full justify-start text-left font-normal",!_.watch("started_at")&&"text-muted-foreground"),children:[e.jsx(ut,{className:"mr-2 h-4 w-4"}),X(_.watch("started_at"),"YYYY-MM-DD HH:mm:ss")," ","至"," ",X(_.watch("ended_at"),"YYYY-MM-DD HH:mm:ss")]})}),e.jsxs(Le,{className:"w-auto p-0",align:"start",children:[e.jsx("div",{className:"border-b border-border",children:e.jsx(Us,{mode:"range",selected:{from:new Date(_.watch("started_at")*1e3),to:new Date(_.watch("ended_at")*1e3)},onSelect:D,numberOfMonths:2})}),e.jsx("div",{className:"p-3",children:e.jsxs("div",{className:"flex items-center gap-4",children:[T("started_at","开始时间"),e.jsx("div",{className:"mt-6 text-sm text-muted-foreground",children:"至"}),T("ended_at","结束时间")]})})]})]}),e.jsx(S,{})]}),e.jsx(j,{control:_.control,name:"limit_use",render:({field:m})=>e.jsxs(h,{children:[e.jsx(g,{children:"最大使用次数"}),e.jsx(C,{type:"number",min:0,placeholder:"限制最大使用次数,留空则不限制",...m,value:m.value===void 0?"":m.value,onChange:d=>m.onChange(d.target.value===""?"":d.target.value),className:"h-9"}),e.jsx(P,{className:"text-xs",children:"设置优惠券的总使用次数限制,留空表示不限制使用次数"}),e.jsx(S,{})]})}),e.jsx(j,{control:_.control,name:"limit_use_with_user",render:({field:m})=>e.jsxs(h,{children:[e.jsx(g,{children:"每个用户可使用次数"}),e.jsx(C,{type:"number",min:0,placeholder:"限制每个用户可使用次数,留空则不限制",...m,value:m.value===void 0?"":m.value,onChange:d=>m.onChange(d.target.value===""?"":d.target.value),className:"h-9"}),e.jsx(P,{className:"text-xs",children:"限制每个用户可使用该优惠券的次数,留空表示不限制单用户使用次数"}),e.jsx(S,{})]})}),e.jsx(j,{control:_.control,name:"limit_period",render:({field:m})=>e.jsxs(h,{children:[e.jsx(g,{children:"指定周期"}),e.jsx(Hs,{options:Object.entries(Cs).filter(([d])=>isNaN(Number(d))).map(([d,N])=>({label:N,value:d})),onChange:d=>{if(d.length===0){m.onChange([]);return}const N=d.map(w=>Cs[w.value]);m.onChange(N)},value:(m.value||[]).map(d=>({label:Object.entries(Cs).find(([N,w])=>w===d)?.[1]||"",value:Object.entries(Cs).find(([N,w])=>w===d)?.[0]||""})),placeholder:"限制指定周期可以使用优惠,留空则不限制",emptyIndicator:e.jsx("p",{className:"text-center text-sm text-muted-foreground",children:"没有找到匹配的周期"})}),e.jsx(P,{className:"text-xs",children:"选择可以使用优惠券的订阅周期,留空表示不限制使用周期"}),e.jsx(S,{})]})}),e.jsx(j,{control:_.control,name:"limit_plan_ids",render:({field:m})=>e.jsxs(h,{children:[e.jsx(g,{children:"指定订阅"}),e.jsx(Hs,{options:p?.map(d=>({label:d.name,value:d.id.toString()}))||[],onChange:d=>m.onChange(d.map(N=>Number(N.value))),value:(p||[]).filter(d=>(m.value||[]).includes(d.id)).map(d=>({label:d.name,value:d.id.toString()})),placeholder:"限制指定订阅可以使用优惠,留空则不限制",emptyIndicator:e.jsx("p",{className:"text-center text-sm text-muted-foreground",children:"没有找到匹配的订阅"})}),e.jsx(S,{})]})}),a==="create"&&e.jsxs(e.Fragment,{children:[e.jsx(j,{control:_.control,name:"code",render:({field:m})=>e.jsxs(h,{children:[e.jsx(g,{children:"自定义优惠码"}),e.jsx(C,{placeholder:"自定义优惠码,留空则自动生成",...m,className:"h-9"}),e.jsx(P,{className:"text-xs",children:"可以自定义优惠码,留空则系统自动生成"}),e.jsx(S,{})]})}),e.jsx(j,{control:_.control,name:"generate_count",render:({field:m})=>e.jsxs(h,{children:[e.jsx(g,{children:"批量生成数量"}),e.jsx(C,{type:"number",min:0,placeholder:"批量生成优惠码数量,留空则生成单个",...m,value:m.value===void 0?"":m.value,onChange:d=>m.onChange(d.target.value===""?"":d.target.value),className:"h-9"}),e.jsx(P,{className:"text-xs",children:"批量生成多个优惠码,留空则只生成单个优惠码"}),e.jsx(S,{})]})})]}),e.jsx(ke,{children:e.jsx(k,{type:"submit",disabled:_.formState.isSubmitting,children:_.formState.isSubmitting?"保存中...":"保存"})})]})})]})]})}function bm({table:s,refetch:t}){const a=s.getState().columnFilters.length>0;return e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(kr,{refetch:t}),e.jsx(C,{placeholder:"搜索优惠券...",value:s.getColumn("name")?.getFilterValue()??"",onChange:n=>s.getColumn("name")?.setFilterValue(n.target.value),className:"h-8 w-[150px] lg:w-[250px]"}),s.getColumn("type")&&e.jsx(pm,{column:s.getColumn("type"),title:"类型",options:Object.entries(Yt).map(([n,r])=>({value:n,label:r}))}),a&&e.jsxs(k,{variant:"ghost",onClick:()=>s.resetColumnFilters(),className:"h-8 px-2 lg:px-3",children:["重置",e.jsx(Re,{className:"ml-2 h-4 w-4"})]})]})}const Dr=o.createContext(void 0);function ym({children:s,refetch:t}){const[a,n]=o.useState(!1),[r,l]=o.useState(null),c=u=>{l(u),n(!0)},x=()=>{n(!1),l(null)};return e.jsxs(Dr.Provider,{value:{isOpen:a,currentCoupon:r,openEdit:c,closeEdit:x},children:[s,r&&e.jsx(kr,{defaultValues:r,refetch:t,type:"edit",open:a,onOpenChange:n})]})}function Nm(){const s=o.useContext(Dr);if(s===void 0)throw new Error("useCouponEdit must be used within a CouponEditProvider");return s}const wm=s=>[{accessorKey:"id",header:({column:t})=>e.jsx(V,{column:t,title:"ID"}),cell:({row:t})=>e.jsx(M,{children:t.original.id}),enableSorting:!0},{accessorKey:"show",header:({column:t})=>e.jsx(V,{column:t,title:"启用"}),cell:({row:t})=>e.jsx(L,{defaultChecked:t.original.show,onCheckedChange:a=>{Ic({id:t.original.id,show:a}).then(({data:n})=>!n&&s())}}),enableSorting:!1},{accessorKey:"name",header:({column:t})=>e.jsx(V,{column:t,title:"卷名称"}),cell:({row:t})=>e.jsx("div",{className:"flex items-center",children:e.jsx("span",{children:t.original.name})}),enableSorting:!1,size:800},{accessorKey:"type",header:({column:t})=>e.jsx(V,{column:t,title:"类型"}),cell:({row:t})=>e.jsx(M,{variant:"outline",children:Yt[t.original.type]}),enableSorting:!0},{accessorKey:"code",header:({column:t})=>e.jsx(V,{column:t,title:"卷码"}),cell:({row:t})=>e.jsx(M,{variant:"secondary",children:t.original.code}),enableSorting:!0},{accessorKey:"limit_use",header:({column:t})=>e.jsx(V,{column:t,title:"剩余次数"}),cell:({row:t})=>e.jsx(M,{variant:"outline",children:t.original.limit_use}),enableSorting:!0},{accessorKey:"#",header:({column:t})=>e.jsx(V,{column:t,title:"有效期"}),cell:({row:t})=>{const[a,n]=o.useState(!1),r=Date.now(),l=t.original.started_at*1e3,c=t.original.ended_at*1e3,x=r>c,u=re.jsx(V,{className:"justify-end",column:t,title:"操作"}),cell:({row:t})=>{const{openEdit:a}=Nm();return e.jsxs("div",{className:"flex items-center justify-center",children:[e.jsxs(k,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-muted",onClick:()=>a(t.original),children:[e.jsx(bs,{className:"h-4 w-4 text-muted-foreground hover:text-foreground"}),e.jsx("span",{className:"sr-only",children:"编辑"})]}),e.jsx(Ae,{title:"确认删除",description:"此操作将永久删除该优惠券,删除后无法恢复。确定要继续吗?",confirmText:"删除",variant:"destructive",onConfirm:async()=>{Vc({id:t.original.id}).then(({data:n})=>{n&&(z.success("删除成功"),s())})},children:e.jsxs(k,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-red-100 dark:hover:bg-red-900",children:[e.jsx(Je,{className:"h-4 w-4 text-muted-foreground hover:text-red-600 dark:hover:text-red-400"}),e.jsx("span",{className:"sr-only",children:"删除"})]})})]})}}];function _m(){const[s,t]=o.useState({}),[a,n]=o.useState({}),[r,l]=o.useState([]),[c,x]=o.useState([]),[u,b]=o.useState({pageIndex:0,pageSize:10}),{refetch:p,data:y}=G({queryKey:["couponList",u,r,c],queryFn:()=>Fc({pageSize:u.pageSize,current:u.pageIndex+1,filter:r,sort:c})}),_=Fe({data:y?.data??[],columns:wm(p),state:{sorting:c,columnVisibility:a,rowSelection:s,columnFilters:r,pagination:u},pageCount:Math.ceil((y?.total??0)/u.pageSize),rowCount:y?.total??0,manualPagination:!0,manualFiltering:!0,manualSorting:!0,enableRowSelection:!0,onRowSelectionChange:t,onSortingChange:x,onColumnFiltersChange:l,onColumnVisibilityChange:n,onPaginationChange:b,getCoreRowModel:Pe(),getFilteredRowModel:Ee(),getPaginationRowModel:Me(),getSortedRowModel:Oe(),getFacetedRowModel:Ze(),getFacetedUniqueValues:Xe(),initialState:{columnPinning:{right:["actions"]}}});return e.jsx(ym,{refetch:p,children:e.jsx("div",{className:"space-y-4",children:e.jsx($e,{table:_,toolbar:e.jsx(bm,{table:_,refetch:p})})})})}function Cm(){return e.jsxs(ge,{children:[e.jsxs(fe,{children:[e.jsx(Ne,{}),e.jsxs("div",{className:"ml-auto flex items-center space-x-4",children:[e.jsx(we,{}),e.jsx(_e,{})]})]}),e.jsxs(be,{className:"flex flex-col",fixedHeight:!0,children:[e.jsx("div",{className:"mb-2 flex items-center justify-between space-y-2",children:e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:"优惠券管理"}),e.jsx("p",{className:"text-muted-foreground mt-2",children:"在这里可以查看优惠券,包括增加、查看、删除等操作。"})]})}),e.jsx("div",{className:"-mx-4 flex-1 overflow-auto px-4 py-1 lg:flex-row lg:space-x-12 lg:space-y-0",children:e.jsx(_m,{})})]})]})}const Sm=Object.freeze(Object.defineProperty({__proto__:null,default:Cm},Symbol.toStringTag,{value:"Module"}));function ka({column:s,title:t,options:a}){const n=s?.getFacetedUniqueValues(),r=new Set(s?.getFilterValue());return e.jsxs(Ue,{children:[e.jsx(qe,{asChild:!0,children:e.jsxs(k,{variant:"outline",size:"sm",className:"h-8 border-dashed",children:[e.jsx(Fs,{className:"mr-2 h-4 w-4"}),t,r?.size>0&&e.jsxs(e.Fragment,{children:[e.jsx(se,{orientation:"vertical",className:"mx-2 h-4"}),e.jsx(M,{variant:"secondary",className:"rounded-sm px-1 font-normal lg:hidden",children:r.size}),e.jsx("div",{className:"hidden space-x-1 lg:flex",children:r.size>2?e.jsxs(M,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:[r.size," selected"]}):a.filter(l=>r.has(l.value)).map(l=>e.jsx(M,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:l.label},l.value))})]})]})}),e.jsx(Le,{className:"w-[200px] p-0",align:"start",children:e.jsxs(Qe,{children:[e.jsx(xs,{placeholder:t}),e.jsxs(es,{children:[e.jsx(ms,{children:"No results found."}),e.jsx(pe,{children:a.map(l=>{const c=r.has(l.value);return e.jsxs(ie,{onSelect:()=>{c?r.delete(l.value):r.add(l.value);const x=Array.from(r);s?.setFilterValue(x.length?x:void 0)},children:[e.jsx("div",{className:f("mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary",c?"bg-primary text-primary-foreground":"opacity-50 [&_svg]:invisible"),children:e.jsx(ds,{className:f("h-4 w-4")})}),l.icon&&e.jsx(l.icon,{className:`mr-2 h-4 w-4 text-muted-foreground text-${l.color}`}),e.jsx("span",{children:l.label}),n?.get(l.value)&&e.jsx("span",{className:"ml-auto flex h-4 w-4 items-center justify-center font-mono text-xs",children:n.get(l.value)})]},l.value)})}),r.size>0&&e.jsxs(e.Fragment,{children:[e.jsx(ys,{}),e.jsx(pe,{children:e.jsx(ie,{onSelect:()=>s?.setFilterValue(void 0),className:"justify-center text-center",children:"Clear filters"})})]})]})]})})]})}const km=i.object({email_prefix:i.string().optional(),email_suffix:i.string().min(1),password:i.string().optional(),expired_at:i.number().optional().nullable(),plan_id:i.number().nullable(),generate_count:i.number().optional().nullable()}).refine(s=>s.generate_count===null?s.email_prefix!==void 0&&s.email_prefix!=="":!0,{message:"Email prefix is required when generate_count is null",path:["email_prefix"]}),Dm={email_prefix:"",email_suffix:"",password:"",expired_at:null,plan_id:null,generate_count:void 0};function Tm({refetch:s}){const[t,a]=o.useState(!1),n=Z({resolver:Q(km),defaultValues:Dm,mode:"onChange"}),[r,l]=o.useState([]);return o.useEffect(()=>{t&&Ps().then(({data:c})=>{c&&l(c)})},[t]),e.jsxs(de,{open:t,onOpenChange:a,children:[e.jsx(Se,{asChild:!0,children:e.jsxs(A,{size:"sm",variant:"outline",className:"space-x-2",children:[e.jsx(Ce,{icon:"ion:add"}),e.jsx("div",{children:"创建用户"})]})}),e.jsxs(re,{className:"sm:max-w-[425px]",children:[e.jsxs(he,{children:[e.jsx(xe,{children:"创建用户"}),e.jsx(Ve,{})]}),e.jsxs(ee,{...n,children:[e.jsxs(h,{children:[e.jsx(g,{children:"邮箱"}),e.jsxs("div",{className:"flex",children:[!n.watch("generate_count")&&e.jsx(j,{control:n.control,name:"email_prefix",render:({field:c})=>e.jsx(C,{className:"flex-[5] rounded-r-none",placeholder:"帐号(批量生成请留空)",...c})}),e.jsx("div",{className:`z-[-1] border border-r-0 border-input px-3 py-1 shadow-sm ${n.watch("generate_count")?"rounded-l-md":"border-l-0"}`,children:"@"}),e.jsx(j,{control:n.control,name:"email_suffix",render:({field:c})=>e.jsx(C,{className:"flex-[4] rounded-l-none",placeholder:"域",...c})})]})]}),e.jsx(j,{control:n.control,name:"password",render:({field:c})=>e.jsxs(h,{children:[e.jsx(g,{children:"密码"}),e.jsx(C,{placeholder:"留空则密码与邮件相同",...c}),e.jsx(S,{})]})}),e.jsx(j,{control:n.control,name:"expired_at",render:({field:c})=>e.jsxs(h,{className:"flex flex-col",children:[e.jsx(g,{children:"到期时间"}),e.jsxs(Ue,{children:[e.jsx(qe,{asChild:!0,children:e.jsx(v,{children:e.jsxs(A,{variant:"outline",className:f("w-full pl-3 text-left font-normal",!c.value&&"text-muted-foreground"),children:[c.value?X(c.value):e.jsx("span",{children:"请选择用户到期日期,留空为长期有效"}),e.jsx(ut,{className:"ml-auto h-4 w-4 opacity-50"})]})})}),e.jsxs(Le,{className:"flex w-auto flex-col space-y-2 p-2",children:[e.jsx(Li,{asChild:!0,children:e.jsx(A,{variant:"outline",className:"w-full",onClick:()=>{c.onChange(null)},children:"长期有效"})}),e.jsx("div",{className:"rounded-md border",children:e.jsx(Us,{mode:"single",selected:c.value?new Date(c.value*1e3):void 0,onSelect:x=>{x&&c.onChange(x?.getTime()/1e3)}})})]})]})]})}),e.jsx(j,{control:n.control,name:"plan_id",render:({field:c})=>e.jsxs(h,{children:[e.jsx(g,{children:"订阅计划"}),e.jsx(v,{children:e.jsxs(B,{value:c.value?c.value.toString():"null",onValueChange:x=>c.onChange(x==="null"?null:parseInt(x)),children:[e.jsx(U,{children:e.jsx(Y,{placeholder:"无"})}),e.jsxs(q,{children:[e.jsx(O,{value:"null",children:"无"}),r.map(x=>e.jsx(O,{value:x.id.toString(),children:x.name},x.id))]})]})})]})}),!n.watch("email_prefix")&&e.jsx(j,{control:n.control,name:"generate_count",render:({field:c})=>e.jsxs(h,{children:[e.jsx(g,{children:"生成数量"}),e.jsx(C,{type:"number",placeholder:"如果为批量生产请输入生成数量",value:c.value||"",onChange:x=>c.onChange(x.target.value?parseInt(x.target.value):null)})]})})]}),e.jsxs(ke,{children:[e.jsx(A,{variant:"outline",onClick:()=>a(!1),children:"取消"}),e.jsx(A,{onClick:()=>n.handleSubmit(c=>{Mc(c).then(({data:x})=>{x&&(z.success("生成成功"),n.reset(),s(),a(!1))})})(),children:"生成"})]})]})]})}function Fm({table:s,refetch:t,serverGroupList:a}){const n=s.getState().columnFilters.length>0;return e.jsx("div",{className:"flex flex-wrap items-center justify-between gap-2",children:e.jsxs("div",{className:"flex flex-1 flex-wrap items-center gap-2",children:[e.jsx(Tm,{refetch:t}),e.jsx(C,{placeholder:"搜索用户邮箱...",value:s.getColumn("email")?.getFilterValue()??"",onChange:r=>s.getColumn("email")?.setFilterValue(r.target.value),className:"h-8 w-[150px] lg:w-[250px]"}),s.getColumn("banned")&&e.jsx(ka,{column:s.getColumn("banned"),title:"用户状态",options:[{label:"正常",value:0},{label:"封禁",value:1}]}),s.getColumn("group_ids")&&e.jsx(ka,{column:s.getColumn("group_ids"),title:"权限组",options:a.map(r=>({label:r.name,value:r.id}))}),n&&e.jsxs(k,{variant:"ghost",onClick:()=>s.resetColumnFilters(),className:"h-8 px-2 lg:px-3",children:["重置筛选",e.jsx(Re,{className:"ml-2 h-4 w-4"})]})]})})}const Pm=Fa,Vm=Pa,Im=Va,Tr=o.forwardRef(({className:s,...t},a)=>e.jsx(ct,{className:f("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",s),...t,ref:a}));Tr.displayName=ct.displayName;const zm=ps("fixed overflow-y-scroll z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-300 data-[state=open]:animate-in data-[state=closed]:animate-out",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-md",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-md"}},defaultVariants:{side:"right"}}),Fr=o.forwardRef(({side:s="right",className:t,children:a,...n},r)=>e.jsxs(Im,{children:[e.jsx(Tr,{}),e.jsxs(dt,{ref:r,className:f(zm({side:s}),t),...n,children:[e.jsxs(Ut,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[e.jsx(Re,{className:"h-4 w-4"}),e.jsx("span",{className:"sr-only",children:"Close"})]}),a]})]}));Fr.displayName=dt.displayName;const Pr=({className:s,...t})=>e.jsx("div",{className:f("flex flex-col space-y-2 text-center sm:text-left",s),...t});Pr.displayName="SheetHeader";const Vr=({className:s,...t})=>e.jsx("div",{className:f("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",s),...t});Vr.displayName="SheetFooter";const Ir=o.forwardRef(({className:s,...t},a)=>e.jsx(xt,{ref:a,className:f("text-lg font-semibold text-foreground",s),...t}));Ir.displayName=xt.displayName;const zr=o.forwardRef(({className:s,...t},a)=>e.jsx(mt,{ref:a,className:f("text-sm text-muted-foreground",s),...t}));zr.displayName=mt.displayName;const Rm=i.object({id:i.number(),email:i.string().email(),invite_user_email:i.string().email().nullable().optional(),password:i.string().optional().nullable(),balance:i.coerce.number(),commission_balance:i.coerce.number(),u:i.number(),d:i.number(),transfer_enable:i.number(),expired_at:i.number().nullable(),plan_id:i.number().nullable(),banned:i.number(),commission_type:i.number(),commission_rate:i.number().nullable(),discount:i.number().nullable(),speed_limit:i.number().nullable(),is_admin:i.number(),is_staff:i.number(),remarks:i.string().nullable()});function Rr({refetch:s,defaultValues:t,dialogTrigger:a=e.jsxs(k,{variant:"outline",size:"sm",className:"ml-auto hidden h-8 lg:flex",children:[e.jsx(Fs,{className:"mr-2 h-4 w-4"}),"编辑用户信息"]})}){const[n,r]=o.useState(!1),[l,c]=o.useState(!1),x=Z({resolver:Q(Rm),defaultValues:t,mode:"onChange"}),[u,b]=o.useState([]);return o.useEffect(()=>{n&&Ps().then(({data:p})=>{b(p)})},[n]),e.jsxs(Pm,{open:n,onOpenChange:r,children:[e.jsx(Vm,{asChild:!0,children:a}),e.jsxs(Fr,{className:"max-w-[90%] space-y-4 ",children:[e.jsxs(Pr,{children:[e.jsx(Ir,{children:"用户管理"}),e.jsx(zr,{})]}),e.jsxs(ee,{...x,children:[e.jsx(j,{control:x.control,name:"email",render:({field:p})=>e.jsxs(h,{children:[e.jsx(g,{children:"邮箱"}),e.jsx(C,{...p,placeholder:"请输入邮箱"}),e.jsx(S,{...p})]})}),e.jsx(j,{control:x.control,name:"invite_user_email",render:({field:p})=>e.jsxs(h,{children:[e.jsx(g,{children:"邀请人邮箱"}),e.jsx(C,{value:p.value||"",onChange:y=>p.onChange(y.target.value?y.target.value:null),placeholder:"请输入邮箱"}),e.jsx(S,{...p})]})}),e.jsx(j,{control:x.control,name:"password",render:({field:p})=>e.jsxs(h,{children:[e.jsx(g,{children:"密码"}),e.jsx(C,{value:p.value||"",onChange:p.onChange,placeholder:"如需修改密码请输入"}),e.jsx(S,{...p})]})}),e.jsxs("div",{className:"grid gap-2 md:grid-cols-2",children:[e.jsx(j,{control:x.control,name:"balance",render:({field:p})=>e.jsxs(h,{children:[e.jsx(g,{children:"余额"}),e.jsxs("div",{className:"flex",children:[e.jsx(C,{type:"number",value:p.value||"",onChange:p.onChange,placeholder:"请输入余额",className:"rounded-r-none"}),e.jsx("div",{className:"z-[-1] rounded-md rounded-l-none border border-l-0 border-input px-3 py-1 shadow-sm",children:"¥"})]}),e.jsx(S,{...p})]})}),e.jsx(j,{control:x.control,name:"commission_balance",render:({field:p})=>e.jsxs(h,{children:[e.jsx(g,{children:"佣金余额"}),e.jsxs("div",{className:"flex",children:[e.jsx(C,{type:"number",value:p.value||"",onChange:p.onChange,placeholder:"请输入佣金余额",className:"rounded-r-none"}),e.jsx("div",{className:"z-[-1] rounded-md rounded-l-none border border-l-0 border-input px-3 py-1 shadow-sm",children:"¥"})]}),e.jsx(S,{...p})]})}),e.jsx(j,{control:x.control,name:"u",render:({field:p})=>e.jsxs(h,{children:[e.jsx(g,{children:"已用上行"}),e.jsxs("div",{className:"flex",children:[e.jsx(C,{type:"number",value:(p.value/1024/1024/1024).toFixed(3)||"",onChange:y=>p.onChange(parseInt(y.target.value)*1024*1024*1024),placeholder:"已用上行",className:"rounded-r-none"}),e.jsx("div",{className:"z-[-1] rounded-md rounded-l-none border border-l-0 border-input px-3 py-1 shadow-sm",children:"GB"})]}),e.jsx(S,{...p})]})}),e.jsx(j,{control:x.control,name:"d",render:({field:p})=>e.jsxs(h,{children:[e.jsx(g,{children:"已用下行"}),e.jsxs("div",{className:"flex",children:[e.jsx(C,{type:"number",value:(p.value/1024/1024/1024).toFixed(3)||"",onChange:y=>p.onChange(parseInt(y.target.value)*1024*1024*1024),placeholder:"已用下行",className:"rounded-r-none"}),e.jsx("div",{className:"z-[-1] rounded-md rounded-l-none border border-l-0 border-input px-3 py-1 shadow-sm",children:"GB"})]}),e.jsx(S,{...p})]})})]}),e.jsx(j,{control:x.control,name:"transfer_enable",render:({field:p})=>e.jsxs(h,{children:[e.jsx(g,{children:"流量"}),e.jsxs("div",{className:"flex",children:[e.jsx(C,{type:"number",value:p.value/1024/1024/1024||"",onChange:y=>p.onChange(parseInt(y.target.value)*1024*1024*1024),placeholder:"请输入流量",className:"rounded-r-none "}),e.jsx("div",{className:"z-[-1] rounded-md rounded-l-none border border-l-0 border-input px-3 py-1 shadow-sm",children:"GB"})]}),e.jsx(S,{})]})}),e.jsx(j,{control:x.control,name:"expired_at",render:({field:p})=>e.jsxs(h,{className:"flex flex-col",children:[e.jsx(g,{children:"到期时间"}),e.jsxs(Ue,{open:l,onOpenChange:c,children:[e.jsx(qe,{asChild:!0,children:e.jsx(v,{children:e.jsxs(k,{type:"button",variant:"outline",className:f("w-full pl-3 text-left font-normal",!p.value&&"text-muted-foreground"),onClick:()=>c(!0),children:[p.value?X(p.value):e.jsx("span",{children:"请选择用户到期日期,留空为长期有效"}),e.jsx(ut,{className:"ml-auto h-4 w-4 opacity-50"})]})})}),e.jsx(Le,{className:"w-auto p-0",align:"start",side:"top",sideOffset:4,onInteractOutside:y=>{y.preventDefault()},onEscapeKeyDown:y=>{y.preventDefault()},children:e.jsxs("div",{className:"flex flex-col space-y-3 p-3",children:[e.jsxs("div",{className:"flex gap-2",children:[e.jsx(k,{type:"button",variant:"outline",className:"flex-1",onClick:()=>{p.onChange(null),c(!1)},children:"长期有效"}),e.jsx(k,{type:"button",variant:"outline",className:"flex-1",onClick:()=>{const y=new Date;y.setMonth(y.getMonth()+1),y.setHours(23,59,59,999),p.onChange(Math.floor(y.getTime()/1e3)),c(!1)},children:"一个月"}),e.jsx(k,{type:"button",variant:"outline",className:"flex-1",onClick:()=>{const y=new Date;y.setMonth(y.getMonth()+3),y.setHours(23,59,59,999),p.onChange(Math.floor(y.getTime()/1e3)),c(!1)},children:"三个月"})]}),e.jsx("div",{className:"rounded-md border",children:e.jsx(Us,{mode:"single",selected:p.value?new Date(p.value*1e3):void 0,onSelect:y=>{if(y){const _=new Date(p.value?p.value*1e3:Date.now());y.setHours(_.getHours(),_.getMinutes(),_.getSeconds()),p.onChange(Math.floor(y.getTime()/1e3))}},disabled:y=>y{const y=new Date;y.setHours(23,59,59,999),p.onChange(Math.floor(y.getTime()/1e3))},className:"h-6 px-2 text-xs",children:"设为当天结束"})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(C,{type:"datetime-local",step:"1",value:X(p.value,"YYYY-MM-DDTHH:mm:ss"),onChange:y=>{const _=new Date(y.target.value);isNaN(_.getTime())||p.onChange(Math.floor(_.getTime()/1e3))},className:"flex-1"}),e.jsx(k,{type:"button",variant:"outline",onClick:()=>c(!1),children:"确定"})]})]})]})})]}),e.jsx(S,{})]})}),e.jsx(j,{control:x.control,name:"plan_id",render:({field:p})=>e.jsxs(h,{children:[e.jsx(g,{children:"订阅计划"}),e.jsx(v,{children:e.jsxs(B,{value:p.value?p.value.toString():"null",onValueChange:y=>p.onChange(y==="null"?null:parseInt(y)),children:[e.jsx(U,{children:e.jsx(Y,{placeholder:"无"})}),e.jsxs(q,{children:[e.jsx(O,{value:"null",children:"无"}),u.map(y=>e.jsx(O,{value:y.id.toString(),children:y.name},y.id))]})]})})]})}),e.jsx(j,{control:x.control,name:"banned",render:({field:p})=>e.jsxs(h,{children:[e.jsx(g,{children:"账户状态"}),e.jsx(v,{children:e.jsxs(B,{value:p.value.toString(),onValueChange:y=>p.onChange(parseInt(y)),children:[e.jsx(U,{children:e.jsx(Y,{})}),e.jsxs(q,{children:[e.jsx(O,{value:"1",children:"封禁"}),e.jsx(O,{value:"0",children:"正常"})]})]})})]})}),e.jsx(j,{control:x.control,name:"commission_type",render:({field:p})=>e.jsxs(h,{children:[e.jsx(g,{children:"佣金类型"}),e.jsx(v,{children:e.jsxs(B,{value:p.value.toString(),onValueChange:y=>p.onChange(parseInt(y)),children:[e.jsx(U,{children:e.jsx(Y,{placeholder:"无"})}),e.jsxs(q,{children:[e.jsx(O,{value:"0",children:"跟随系统设置"}),e.jsx(O,{value:"1",children:"循环返利"}),e.jsx(O,{value:"2",children:"首次返利"})]})]})})]})}),e.jsx(j,{control:x.control,name:"commission_rate",render:({field:p})=>e.jsxs(h,{children:[e.jsx(g,{children:"推荐返利比例"}),e.jsxs("div",{className:"flex",children:[e.jsx(C,{type:"number",value:p.value||"",onChange:y=>p.onChange(parseInt(y.currentTarget.value)||null),placeholder:"请输入推荐返利比例(为空则跟随站点设置返利比例)",className:"rounded-r-none "}),e.jsx("div",{className:"z-[-1] rounded-md rounded-l-none border border-l-0 border-input px-3 py-1 shadow-sm",children:"%"})]}),e.jsx(S,{})]})}),e.jsx(j,{control:x.control,name:"discount",render:({field:p})=>e.jsxs(h,{children:[e.jsx(g,{children:"专享折扣比例"}),e.jsxs("div",{className:"flex",children:[e.jsx(C,{type:"number",value:p.value||"",onChange:y=>p.onChange(parseInt(y.currentTarget.value)||null),placeholder:"请输入专享折扣比例(为空则不享受专享折扣)",className:"rounded-r-none "}),e.jsx("div",{className:"z-[-1] rounded-md rounded-l-none border border-l-0 border-input px-3 py-1 shadow-sm",children:"%"})]}),e.jsx(S,{})]})}),e.jsx(j,{control:x.control,name:"speed_limit",render:({field:p})=>e.jsxs(h,{children:[e.jsx(g,{children:"限速"}),e.jsxs("div",{className:"flex",children:[e.jsx(C,{type:"number",value:p.value||"",onChange:y=>p.onChange(parseInt(y.currentTarget.value)||null),placeholder:"留空则不限速",className:"rounded-r-none "}),e.jsx("div",{className:"z-[-1] rounded-md rounded-l-none border border-l-0 border-input px-3 py-1 shadow-sm",children:"Mbps"})]}),e.jsx(S,{})]})}),e.jsx(j,{control:x.control,name:"is_admin",render:({field:p})=>e.jsxs(h,{children:[e.jsx(g,{children:"是否管理员"}),e.jsx("div",{className:"py-2",children:e.jsx(v,{children:e.jsx(L,{checked:p.value===1,onCheckedChange:y=>p.onChange(y?1:0)})})})]})}),e.jsx(j,{control:x.control,name:"is_staff",render:({field:p})=>e.jsxs(h,{children:[e.jsx(g,{children:"是否员工"}),e.jsx("div",{className:"py-2",children:e.jsx(v,{children:e.jsx(L,{checked:p.value===1,onCheckedChange:y=>p.onChange(y?1:0)})})})]})}),e.jsx(j,{control:x.control,name:"remarks",render:({field:p})=>e.jsxs(h,{children:[e.jsx(g,{children:"备注"}),e.jsx(us,{className:"h-24",value:p.value||"",onChange:y=>p.onChange(y.currentTarget.value??null),placeholder:"请在这里记录"})]})})]}),e.jsxs(Vr,{children:[e.jsx(k,{variant:"outline",onClick:()=>r(!1),children:"取消"}),e.jsx(k,{type:"submit",onClick:()=>{x.handleSubmit(p=>{Rc(p).then(({data:y})=>{y&&(z.success("修改成功"),r(!1),s())}).catch(y=>{z.error("修改失败")})})()},children:"提交"})]})]})]})}const Er=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"m17.71 11.29l-5-5a1 1 0 0 0-.33-.21a1 1 0 0 0-.76 0a1 1 0 0 0-.33.21l-5 5a1 1 0 0 0 1.42 1.42L11 9.41V17a1 1 0 0 0 2 0V9.41l3.29 3.3a1 1 0 0 0 1.42 0a1 1 0 0 0 0-1.42"})}),Mr=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M17.71 11.29a1 1 0 0 0-1.42 0L13 14.59V7a1 1 0 0 0-2 0v7.59l-3.29-3.3a1 1 0 0 0-1.42 1.42l5 5a1 1 0 0 0 .33.21a.94.94 0 0 0 .76 0a1 1 0 0 0 .33-.21l5-5a1 1 0 0 0 0-1.42"})}),Em=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M17 11H9.41l3.3-3.29a1 1 0 1 0-1.42-1.42l-5 5a1 1 0 0 0-.21.33a1 1 0 0 0 0 .76a1 1 0 0 0 .21.33l5 5a1 1 0 0 0 1.42 0a1 1 0 0 0 0-1.42L9.41 13H17a1 1 0 0 0 0-2"})}),Mm=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M17.92 11.62a1 1 0 0 0-.21-.33l-5-5a1 1 0 0 0-1.42 1.42l3.3 3.29H7a1 1 0 0 0 0 2h7.59l-3.3 3.29a1 1 0 0 0 0 1.42a1 1 0 0 0 1.42 0l5-5a1 1 0 0 0 .21-.33a1 1 0 0 0 0-.76"})}),Tt=[{accessorKey:"record_at",header:"时间",cell:({row:s})=>e.jsx("div",{className:"flex items-center space-x-2",children:e.jsx("time",{className:"text-sm text-muted-foreground",children:vo(s.original.record_at)})})},{accessorKey:"u",header:"上行流量",cell:({row:s})=>e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(Er,{className:"h-4 w-4 text-emerald-500"}),e.jsx("span",{className:"font-mono text-sm",children:ks(s.original.u)})]})},{accessorKey:"d",header:"下行流量",cell:({row:s})=>e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(Mr,{className:"h-4 w-4 text-blue-500"}),e.jsx("span",{className:"font-mono text-sm",children:ks(s.original.d)})]})},{accessorKey:"server_rate",header:"倍率",cell:({row:s})=>{const t=s.original.server_rate;return e.jsx("div",{className:"flex items-center space-x-2",children:e.jsxs(M,{variant:"outline",className:"font-mono",children:[t,"x"]})})}},{id:"total",header:"总计",cell:({row:s})=>{const t=(s.original.u+s.original.d)*s.original.server_rate;return e.jsx("div",{className:"flex items-center justify-end font-mono text-sm",children:ks(t)})}}];function Or({user_id:s,dialogTrigger:t}){const[a,n]=o.useState(!1),[r,l]=o.useState({pageIndex:0,pageSize:10}),{data:c,isLoading:x}=G({queryKey:["userStats",s,r,a],queryFn:()=>a?Oc({user_id:s,pageSize:r.pageSize,page:r.pageIndex+1}):null}),u=Fe({data:c?.data??[],columns:Tt,pageCount:Math.ceil((c?.total??0)/r.pageSize),state:{pagination:r},manualPagination:!0,getCoreRowModel:Pe(),onPaginationChange:l});return e.jsxs(de,{open:a,onOpenChange:n,children:[e.jsx(Se,{asChild:!0,children:t}),e.jsxs(re,{className:"sm:max-w-[700px]",children:[e.jsx(he,{children:e.jsx(xe,{children:"流量使用记录"})}),e.jsxs("div",{className:"space-y-4",children:[e.jsx("div",{className:"rounded-md border",children:e.jsxs(Wt,{children:[e.jsx(Jt,{children:u.getHeaderGroups().map(b=>e.jsx(is,{children:b.headers.map(p=>e.jsx(Xt,{className:f("h-10 px-2 text-xs",p.id==="total"&&"text-right"),children:p.isPlaceholder?null:rt(p.column.columnDef.header,p.getContext())},p.id))},b.id))}),e.jsx(Zt,{children:x?Array.from({length:r.pageSize}).map((b,p)=>e.jsx(is,{children:Array.from({length:Tt.length}).map((y,_)=>e.jsx(Ds,{className:"p-2",children:e.jsx(Te,{className:"h-6 w-full"})},_))},p)):u.getRowModel().rows?.length?u.getRowModel().rows.map(b=>e.jsx(is,{"data-state":b.getIsSelected()&&"selected",className:"h-10",children:b.getVisibleCells().map(p=>e.jsx(Ds,{className:"px-2",children:rt(p.column.columnDef.cell,p.getContext())},p.id))},b.id)):e.jsx(is,{children:e.jsx(Ds,{colSpan:Tt.length,className:"h-24 text-center",children:"暂无记录"})})})]})}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx("p",{className:"text-sm font-medium",children:"每页显示"}),e.jsxs(B,{value:`${u.getState().pagination.pageSize}`,onValueChange:b=>{u.setPageSize(Number(b))},children:[e.jsx(U,{className:"h-8 w-[70px]",children:e.jsx(Y,{placeholder:u.getState().pagination.pageSize})}),e.jsx(q,{side:"top",children:[10,20,30,40,50].map(b=>e.jsx(O,{value:`${b}`,children:b},b))})]}),e.jsx("p",{className:"text-sm font-medium",children:"条记录"})]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsxs("div",{className:"flex w-[100px] items-center justify-center text-sm",children:["第 ",u.getState().pagination.pageIndex+1," /"," ",u.getPageCount()," 页"]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(A,{variant:"outline",size:"icon",className:"h-8 w-8",onClick:()=>u.previousPage(),disabled:!u.getCanPreviousPage()||x,children:e.jsx(Em,{className:"h-4 w-4"})}),e.jsx(A,{variant:"outline",size:"icon",className:"h-8 w-8",onClick:()=>u.nextPage(),disabled:!u.getCanNextPage()||x,children:e.jsx(Mm,{className:"h-4 w-4"})})]})]})]})]})]})]})}const Om=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M5 18h4.24a1 1 0 0 0 .71-.29l6.92-6.93L19.71 8a1 1 0 0 0 0-1.42l-4.24-4.29a1 1 0 0 0-1.42 0l-2.82 2.83l-6.94 6.93a1 1 0 0 0-.29.71V17a1 1 0 0 0 1 1m9.76-13.59l2.83 2.83l-1.42 1.42l-2.83-2.83ZM6 13.17l5.93-5.93l2.83 2.83L8.83 16H6ZM21 20H3a1 1 0 0 0 0 2h18a1 1 0 0 0 0-2"})}),Lm=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M19 11h-6V5a1 1 0 0 0-2 0v6H5a1 1 0 0 0 0 2h6v6a1 1 0 0 0 2 0v-6h6a1 1 0 0 0 0-2"})}),$m=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M21 8.94a1.3 1.3 0 0 0-.06-.27v-.09a1 1 0 0 0-.19-.28l-6-6a1 1 0 0 0-.28-.19a.3.3 0 0 0-.09 0a.9.9 0 0 0-.33-.11H10a3 3 0 0 0-3 3v1H6a3 3 0 0 0-3 3v10a3 3 0 0 0 3 3h8a3 3 0 0 0 3-3v-1h1a3 3 0 0 0 3-3zm-6-3.53L17.59 8H16a1 1 0 0 1-1-1ZM15 19a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V9a1 1 0 0 1 1-1h1v7a3 3 0 0 0 3 3h5Zm4-4a1 1 0 0 1-1 1h-8a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h3v3a3 3 0 0 0 3 3h3Z"})}),Am=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M21 11a1 1 0 0 0-1 1a8.05 8.05 0 1 1-2.22-5.5h-2.4a1 1 0 0 0 0 2h4.53a1 1 0 0 0 1-1V3a1 1 0 0 0-2 0v1.77A10 10 0 1 0 22 12a1 1 0 0 0-1-1"})}),Hm=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M9.5 10.5H12a1 1 0 0 0 0-2h-1V8a1 1 0 0 0-2 0v.55a2.5 2.5 0 0 0 .5 4.95h1a.5.5 0 0 1 0 1H8a1 1 0 0 0 0 2h1v.5a1 1 0 0 0 2 0v-.55a2.5 2.5 0 0 0-.5-4.95h-1a.5.5 0 0 1 0-1M21 12h-3V3a1 1 0 0 0-.5-.87a1 1 0 0 0-1 0l-3 1.72l-3-1.72a1 1 0 0 0-1 0l-3 1.72l-3-1.72a1 1 0 0 0-1 0A1 1 0 0 0 2 3v16a3 3 0 0 0 3 3h14a3 3 0 0 0 3-3v-6a1 1 0 0 0-1-1M5 20a1 1 0 0 1-1-1V4.73l2 1.14a1.08 1.08 0 0 0 1 0l3-1.72l3 1.72a1.08 1.08 0 0 0 1 0l2-1.14V19a3 3 0 0 0 .18 1Zm15-1a1 1 0 0 1-2 0v-5h2Z"})}),Km=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M12.3 12.22A4.92 4.92 0 0 0 14 8.5a5 5 0 0 0-10 0a4.92 4.92 0 0 0 1.7 3.72A8 8 0 0 0 1 19.5a1 1 0 0 0 2 0a6 6 0 0 1 12 0a1 1 0 0 0 2 0a8 8 0 0 0-4.7-7.28M9 11.5a3 3 0 1 1 3-3a3 3 0 0 1-3 3m9.74.32A5 5 0 0 0 15 3.5a1 1 0 0 0 0 2a3 3 0 0 1 3 3a3 3 0 0 1-1.5 2.59a1 1 0 0 0-.5.84a1 1 0 0 0 .45.86l.39.26l.13.07a7 7 0 0 1 4 6.38a1 1 0 0 0 2 0a9 9 0 0 0-4.23-7.68"})}),Gm=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M12 2a10 10 0 0 0-6.88 2.77V3a1 1 0 0 0-2 0v4.5a1 1 0 0 0 1 1h4.5a1 1 0 0 0 0-2h-2.4A8 8 0 1 1 4 12a1 1 0 0 0-2 0A10 10 0 1 0 12 2m0 6a1 1 0 0 0-1 1v3a1 1 0 0 0 1 1h2a1 1 0 0 0 0-2h-1V9a1 1 0 0 0-1-1"})}),Um=(s,t)=>[{accessorKey:"id",header:({column:a})=>e.jsx(V,{column:a,title:"ID"}),cell:({row:a})=>e.jsx(M,{variant:"outline",children:a.original.id}),enableSorting:!0,enableHiding:!1},{accessorKey:"email",header:({column:a})=>e.jsx(V,{column:a,title:"邮箱"}),cell:({row:a})=>{const n=a.original.t||0,r=Date.now()/1e3-n<120,l=Math.floor(Date.now()/1e3-n);let c=r?"当前在线":n===0?"从未在线":`最后在线时间: ${X(n)}`;if(!r&&n!==0){const x=Math.floor(l/60),u=Math.floor(x/60),b=Math.floor(u/24);b>0?c+=` -离线时长: ${b}天`:u>0?c+=` -离线时长: ${u}小时`:x>0?c+=` -离线时长: ${x}分钟`:c+=` -离线时长: ${l}秒`}return e.jsx(ue,{delayDuration:100,children:e.jsxs(oe,{children:[e.jsx(ce,{children:e.jsxs("div",{className:"flex items-center gap-2.5",children:[e.jsx("div",{className:f("size-2.5 rounded-full ring-2 ring-offset-2",r?"bg-green-500 ring-green-500/20":"bg-gray-300 ring-gray-300/20","transition-all duration-300")}),e.jsx("span",{className:"font-medium text-foreground/90",children:a.original.email})]})}),e.jsx(ne,{side:"bottom",className:"max-w-[280px]",children:e.jsx("p",{className:"whitespace-pre-line text-sm",children:c})})]})})},enableSorting:!1,enableHiding:!1},{accessorKey:"banned",header:({column:a})=>e.jsx(V,{column:a,title:"状态"}),cell:({row:a})=>{const n=a.original.banned;return e.jsx("div",{className:"flex justify-center",children:e.jsx(M,{className:f("min-w-20 justify-center transition-colors",n?"bg-destructive/15 text-destructive hover:bg-destructive/25":"bg-success/15 text-success hover:bg-success/25"),children:Bc[n]})})},enableSorting:!0,filterFn:(a,n,r)=>r.includes(a.getValue(n))},{accessorKey:"plan.name",header:({column:a})=>e.jsx(V,{column:a,title:"订阅"}),cell:({row:a})=>e.jsx("div",{className:"min-w-[10em] break-all",children:a.original?.plan?.name||"-"}),enableSorting:!1,enableHiding:!1},{accessorKey:"group",header:({column:a})=>e.jsx(V,{column:a,title:"权限组"}),cell:({row:a})=>e.jsx("div",{className:"flex flex-wrap gap-1",children:e.jsx(M,{variant:"outline",className:f("px-2 py-0.5 font-medium","bg-secondary/50 hover:bg-secondary/70","border border-border/50","transition-all duration-200","cursor-default select-none","flex items-center gap-1.5 whitespace-nowrap"),children:a.original?.group?.name||"-"})}),enableSorting:!1,filterFn:(a,n,r)=>{const l=a.getValue(n);return r.some(c=>l?.includes(c))}},{accessorKey:"total_used",header:({column:a})=>e.jsx(V,{column:a,title:"已用流量"}),cell:({row:a})=>{const n=ks(a.original?.total_used),r=ks(a.original?.transfer_enable),l=a.original?.total_used/a.original?.transfer_enable*100||0;return e.jsx(ue,{delayDuration:100,children:e.jsxs(oe,{children:[e.jsx(ce,{className:"w-full",children:e.jsxs("div",{className:"w-full space-y-1",children:[e.jsxs("div",{className:"flex justify-between text-sm",children:[e.jsx("span",{className:"text-muted-foreground",children:n}),e.jsxs("span",{className:"text-xs text-muted-foreground",children:[l.toFixed(1),"%"]})]}),e.jsx("div",{className:"h-1.5 w-full rounded-full bg-secondary",children:e.jsx("div",{className:f("h-full rounded-full transition-all",l>90?"bg-destructive":"bg-primary"),style:{width:`${Math.min(l,100)}%`}})})]})}),e.jsx(ne,{side:"bottom",children:e.jsxs("p",{className:"text-sm",children:["总流量配额: ",r]})})]})})}},{accessorKey:"transfer_enable",header:({column:a})=>e.jsx(V,{column:a,title:"总流量"}),cell:({row:a})=>e.jsx("div",{className:"font-medium text-muted-foreground",children:ks(a.original?.transfer_enable)})},{accessorKey:"expired_at",header:({column:a})=>e.jsx(V,{column:a,title:"到期时间"}),cell:({row:a})=>{const n=a.original.expired_at,r=Date.now()/1e3,l=n!=null&&ne.jsx(V,{column:a,title:"余额"}),cell:({row:a})=>{const n=_s(a.original?.balance);return e.jsxs("div",{className:"flex items-center gap-1 font-medium",children:[e.jsx("span",{className:"text-sm text-muted-foreground",children:"¥"}),e.jsx("span",{className:"tabular-nums text-foreground",children:n})]})}},{accessorKey:"commission_balance",header:({column:a})=>e.jsx(V,{column:a,title:"佣金"}),cell:({row:a})=>{const n=_s(a.original?.commission_balance);return e.jsxs("div",{className:"flex items-center gap-1 font-medium",children:[e.jsx("span",{className:"text-sm text-muted-foreground",children:"¥"}),e.jsx("span",{className:"tabular-nums text-foreground",children:n})]})}},{accessorKey:"created_at",header:({column:a})=>e.jsx(V,{column:a,title:"注册时间"}),cell:({row:a})=>e.jsx("div",{className:"truncate",children:X(a.original?.created_at)}),size:1e3},{id:"actions",header:({column:a})=>e.jsx(V,{column:a,className:"justify-end",title:"操作"}),cell:({row:a,table:n})=>e.jsxs(gs,{modal:!0,children:[e.jsx(fs,{asChild:!0,children:e.jsx("div",{className:"text-center",children:e.jsx(A,{variant:"ghost",className:"h-8 w-8 p-0 hover:bg-muted","aria-label":"打开操作菜单",children:e.jsx(lt,{className:"size-4"})})})}),e.jsxs(cs,{align:"end",className:"min-w-[40px]",children:[e.jsx(ae,{onSelect:r=>{r.preventDefault()},className:"p-0",children:e.jsx(Rr,{defaultValues:{...a.original,invite_user_email:a.original.invite_user?.email},refetch:s,dialogTrigger:e.jsxs(A,{variant:"ghost",className:"w-full justify-start px-2 py-1.5",children:[e.jsx(Om,{className:"mr-2"}),"编辑"]})})}),e.jsx(ae,{onSelect:r=>r.preventDefault(),className:"p-0",children:e.jsx(Sr,{defaultValues:{email:a.original.email},trigger:e.jsxs(A,{variant:"ghost",className:"w-full justify-start px-2 py-1.5",children:[e.jsx(Lm,{className:"mr-2 "}),"分配订单"]})})}),e.jsx(ae,{onSelect:()=>{tt(a.original.subscribe_url)},className:"p-0",children:e.jsxs(A,{variant:"ghost",className:"w-full justify-start px-2 py-1.5",children:[e.jsx($m,{className:"mr-2"}),"复制订阅URL"]})}),e.jsx(ae,{onSelect:()=>{Ec({id:a.original.id}).then(({data:r})=>{r&&z.success("重置成功")})},children:e.jsxs("div",{className:"flex items-center",children:[e.jsx(Am,{className:"mr-2 "}),"重置UUID及订阅URL"]})}),e.jsx(ae,{onSelect:()=>{},className:"p-0",children:e.jsxs(vs,{className:"flex items-center px-2 py-1.5",to:`/finance/order?user_id=${a.original?.id}`,children:[e.jsx(Hm,{className:"mr-2"}),"TA的订单"]})}),e.jsx(ae,{onSelect:()=>{n.setColumnFilters([{id:"invite_user_id",value:a.original?.id}])},children:e.jsxs("div",{className:"flex items-center",children:[e.jsx(Km,{className:"mr-2 "}),"TA的邀请"]})}),e.jsx(ae,{onSelect:r=>r.preventDefault(),className:"p-0",children:e.jsx(Or,{user_id:a.original?.id,dialogTrigger:e.jsxs(A,{variant:"ghost",className:"w-full justify-start px-2 py-1.5",children:[e.jsx(Gm,{className:"mr-2 "}),"TA的流量记录"]})})})]})]})}];function qm(){const[s]=$i(),[t,a]=o.useState({}),[n,r]=o.useState({}),[l,c]=o.useState([]),[x,u]=o.useState([]),[b,p]=o.useState({pageIndex:0,pageSize:10});o.useEffect(()=>{const d=s.get("email");d&&c(N=>N.some(E=>E.id==="email")?N:[...N,{id:"email",value:d}])},[s]);const{refetch:y,data:_,isLoading:D}=G({queryKey:["userList",b,l,x],queryFn:()=>zc({pageSize:b.pageSize,current:b.pageIndex+1,filter:l,sort:x})}),[F,T]=o.useState([]);o.useEffect(()=>{pt().then(({data:d})=>{T(d)})},[]);const m=Fe({data:_?.data??[],columns:Um(y),state:{sorting:x,columnVisibility:n,rowSelection:t,columnFilters:l,pagination:b},rowCount:_?.total??0,manualPagination:!0,manualFiltering:!0,manualSorting:!0,enableRowSelection:!0,onRowSelectionChange:a,onSortingChange:u,onColumnFiltersChange:c,onColumnVisibilityChange:r,getCoreRowModel:Pe(),getFilteredRowModel:Ee(),getPaginationRowModel:Me(),onPaginationChange:p,getSortedRowModel:Oe(),getFacetedRowModel:Ze(),getFacetedUniqueValues:Xe(),initialState:{columnVisibility:{commission_balance:!1,created_at:!1},columnPinning:{right:["actions"]}}});return e.jsx($e,{table:m,toolbar:e.jsx(Fm,{table:m,refetch:y,serverGroupList:F})})}function Bm(){return e.jsxs(ge,{children:[e.jsxs(fe,{children:[e.jsx(Ne,{}),e.jsxs("div",{className:"ml-auto flex items-center space-x-4",children:[e.jsx(we,{}),e.jsx(_e,{})]})]}),e.jsxs(be,{className:"flex flex-col",fixedHeight:!0,children:[e.jsx("div",{className:"mb-2 flex items-center justify-between space-y-2",children:e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:"用户管理"}),e.jsx("p",{className:"mt-2 text-muted-foreground",children:"在这里可以管理用户,包括增加、删除、编辑、查询等操作。"})]})}),e.jsx("div",{className:"-mx-4 flex-1 overflow-auto px-4 py-1 lg:flex-row lg:space-x-12 lg:space-y-0",children:e.jsx("div",{className:"w-full",children:e.jsx(qm,{})})})]})]})}const Ym=Object.freeze(Object.defineProperty({__proto__:null,default:Bm},Symbol.toStringTag,{value:"Module"})),Wm=Ai,Lr=o.forwardRef(({className:s,...t},a)=>e.jsx(_n,{ref:a,className:f("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",s),...t}));Lr.displayName=_n.displayName;const Ht=o.forwardRef(({className:s,...t},a)=>e.jsx(Cn,{ref:a,className:f("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",s),...t}));Ht.displayName=Cn.displayName;const Jm=o.forwardRef(({className:s,...t},a)=>e.jsx(Sn,{ref:a,className:f("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",s),...t}));Jm.displayName=Sn.displayName;function Zm({column:s,title:t,options:a}){const n=new Set(s?.getFilterValue());return e.jsxs(Ue,{children:[e.jsx(qe,{asChild:!0,children:e.jsxs(A,{variant:"outline",size:"sm",className:"h-8 border-dashed",children:[e.jsx(Hi,{className:"mr-2 h-4 w-4"}),t,n?.size>0&&e.jsxs(e.Fragment,{children:[e.jsx(se,{orientation:"vertical",className:"mx-2 h-4"}),e.jsx(M,{variant:"secondary",className:"rounded-sm px-1 font-normal lg:hidden",children:n.size}),e.jsx("div",{className:"hidden space-x-1 lg:flex",children:n.size>2?e.jsxs(M,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:[n.size," selected"]}):a.filter(r=>n.has(r.value)).map(r=>e.jsx(M,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:r.label},`selected-${r.value}`))})]})]})}),e.jsx(Le,{className:"w-[200px] p-0",align:"start",children:e.jsxs(Qe,{children:[e.jsx(xs,{placeholder:t}),e.jsxs(es,{children:[e.jsx(ms,{children:"No results found."}),e.jsx(pe,{children:a.map(r=>{const l=n.has(r.value);return e.jsxs(ie,{onSelect:()=>{l?n.delete(r.value):n.add(r.value);const c=Array.from(n);s?.setFilterValue(c.length?c:void 0)},children:[e.jsx("div",{className:f("mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary",l?"bg-primary text-primary-foreground":"opacity-50 [&_svg]:invisible"),children:e.jsx(Ki,{className:f("h-4 w-4")})}),r.icon&&e.jsx(r.icon,{className:"mr-2 h-4 w-4 text-muted-foreground"}),e.jsx("span",{children:r.label})]},`option-${r.value}`)})}),n.size>0&&e.jsxs(e.Fragment,{children:[e.jsx(ys,{}),e.jsx(pe,{children:e.jsx(ie,{onSelect:()=>s?.setFilterValue(void 0),className:"justify-center text-center",children:"Clear filters"})})]})]})]})})]})}const Xm=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M19 11H5a1 1 0 0 0 0 2h14a1 1 0 0 0 0-2"})});function Qm({table:s}){return e.jsx("div",{className:"flex items-center justify-between",children:e.jsxs("div",{className:"flex flex-1 flex-col-reverse items-start gap-y-2 sm:flex-row sm:items-center sm:space-x-4",children:[e.jsx(Wm,{defaultValue:s.getColumn("status")?.getFilterValue(),onValueChange:t=>s.getColumn("status")?.setFilterValue(t),children:e.jsxs(Lr,{className:"grid w-full grid-cols-2",children:[e.jsx(Ht,{value:"0",children:"已开始"}),e.jsx(Ht,{value:"1",children:"已关闭"})]})}),s.getColumn("level")&&e.jsx(Zm,{column:s.getColumn("level"),title:"优先级",options:[{label:Ls[Be.LOW],value:Be.LOW,icon:Xm,color:"gray"},{label:Ls[Be.MEDIUM],value:Be.MEDIUM,icon:Er,color:"yellow"},{label:Ls[Be.HIGH],value:Be.HIGH,icon:Mr,color:"red"}]})]})})}function eu(){return e.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",className:"text-foreground",children:[e.jsx("circle",{cx:"4",cy:"12",r:"2",fill:"currentColor",children:e.jsx("animate",{id:"spinner_qFRN",begin:"0;spinner_OcgL.end+0.25s",attributeName:"cy",calcMode:"spline",dur:"0.6s",values:"12;6;12",keySplines:".33,.66,.66,1;.33,0,.66,.33"})}),e.jsx("circle",{cx:"12",cy:"12",r:"2",fill:"currentColor",children:e.jsx("animate",{begin:"spinner_qFRN.begin+0.1s",attributeName:"cy",calcMode:"spline",dur:"0.6s",values:"12;6;12",keySplines:".33,.66,.66,1;.33,0,.66,.33"})}),e.jsx("circle",{cx:"20",cy:"12",r:"2",fill:"currentColor",children:e.jsx("animate",{id:"spinner_OcgL",begin:"spinner_qFRN.begin+0.2s",attributeName:"cy",calcMode:"spline",dur:"0.6s",values:"12;6;12",keySplines:".33,.66,.66,1;.33,0,.66,.33"})})]})}const su=ps("flex gap-2 max-w-[60%] items-end relative group",{variants:{variant:{received:"self-start",sent:"self-end flex-row-reverse"},layout:{default:"",ai:"max-w-full w-full items-center"}},defaultVariants:{variant:"received",layout:"default"}}),$r=o.forwardRef(({className:s,variant:t,layout:a,children:n,...r},l)=>e.jsx("div",{className:f(su({variant:t,layout:a,className:s}),"relative group"),ref:l,...r,children:o.Children.map(n,c=>o.isValidElement(c)&&typeof c.type!="string"?o.cloneElement(c,{variant:t,layout:a}):c)}));$r.displayName="ChatBubble";const tu=ps("p-4",{variants:{variant:{received:"bg-secondary text-secondary-foreground rounded-r-lg rounded-tl-lg",sent:"bg-primary text-primary-foreground rounded-l-lg rounded-tr-lg"},layout:{default:"",ai:"border-t w-full rounded-none bg-transparent"}},defaultVariants:{variant:"received",layout:"default"}}),Ar=o.forwardRef(({className:s,variant:t,layout:a,isLoading:n=!1,children:r,...l},c)=>e.jsx("div",{className:f(tu({variant:t,layout:a,className:s}),"break-words max-w-full whitespace-pre-wrap"),ref:c,...l,children:n?e.jsx("div",{className:"flex items-center space-x-2",children:e.jsx(eu,{})}):r}));Ar.displayName="ChatBubbleMessage";const au=o.forwardRef(({variant:s,className:t,children:a,...n},r)=>e.jsx("div",{ref:r,className:f("absolute top-1/2 -translate-y-1/2 flex opacity-0 group-hover:opacity-100 transition-opacity duration-200",s==="sent"?"-left-1 -translate-x-full flex-row-reverse":"-right-1 translate-x-full",t),...n,children:a}));au.displayName="ChatBubbleActionWrapper";const Hr=o.forwardRef(({className:s,...t},a)=>e.jsx(us,{autoComplete:"off",ref:a,name:"message",className:f("max-h-12 px-4 py-3 bg-background text-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 w-full rounded-md flex items-center h-16 resize-none",s),...t}));Hr.displayName="ChatInput";const Kr=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"m13.41 12l4.3-4.29a1 1 0 1 0-1.42-1.42L12 10.59l-4.29-4.3a1 1 0 0 0-1.42 1.42l4.3 4.29l-4.3 4.29a1 1 0 0 0 0 1.42a1 1 0 0 0 1.42 0l4.29-4.3l4.29 4.3a1 1 0 0 0 1.42 0a1 1 0 0 0 0-1.42Z"})}),Gr=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M15.098 12.634L13 11.423V7a1 1 0 0 0-2 0v5a1 1 0 0 0 .5.866l2.598 1.5a1 1 0 1 0 1-1.732M12 2a10 10 0 1 0 10 10A10.01 10.01 0 0 0 12 2m0 18a8 8 0 1 1 8-8a8.01 8.01 0 0 1-8 8"})}),nu=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M3.71 16.29a1 1 0 0 0-.33-.21a1 1 0 0 0-.76 0a1 1 0 0 0-.33.21a1 1 0 0 0-.21.33a1 1 0 0 0 .21 1.09a1.2 1.2 0 0 0 .33.21a.94.94 0 0 0 .76 0a1.2 1.2 0 0 0 .33-.21a1 1 0 0 0 .21-1.09a1 1 0 0 0-.21-.33M7 8h14a1 1 0 0 0 0-2H7a1 1 0 0 0 0 2m-3.29 3.29a1 1 0 0 0-1.09-.21a1.2 1.2 0 0 0-.33.21a1 1 0 0 0-.21.33a.94.94 0 0 0 0 .76a1.2 1.2 0 0 0 .21.33a1.2 1.2 0 0 0 .33.21a.94.94 0 0 0 .76 0a1.2 1.2 0 0 0 .33-.21a1.2 1.2 0 0 0 .21-.33a.94.94 0 0 0 0-.76a1 1 0 0 0-.21-.33M21 11H7a1 1 0 0 0 0 2h14a1 1 0 0 0 0-2M3.71 6.29a1 1 0 0 0-.33-.21a1 1 0 0 0-1.09.21a1.2 1.2 0 0 0-.21.33a.94.94 0 0 0 0 .76a1.2 1.2 0 0 0 .21.33a1.2 1.2 0 0 0 .33.21a1 1 0 0 0 1.09-.21a1.2 1.2 0 0 0 .21-.33a.94.94 0 0 0 0-.76a1.2 1.2 0 0 0-.21-.33M21 16H7a1 1 0 0 0 0 2h14a1 1 0 0 0 0-2"})}),ru=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M9 12H7a1 1 0 0 0 0 2h2a1 1 0 0 0 0-2m-1-2h4a1 1 0 0 0 0-2H8a1 1 0 0 0 0 2m1 6H7a1 1 0 0 0 0 2h2a1 1 0 0 0 0-2m12-4h-3V3a1 1 0 0 0-.5-.87a1 1 0 0 0-1 0l-3 1.72l-3-1.72a1 1 0 0 0-1 0l-3 1.72l-3-1.72a1 1 0 0 0-1 0A1 1 0 0 0 2 3v16a3 3 0 0 0 3 3h14a3 3 0 0 0 3-3v-6a1 1 0 0 0-1-1M5 20a1 1 0 0 1-1-1V4.73l2 1.14a1.08 1.08 0 0 0 1 0l3-1.72l3 1.72a1.08 1.08 0 0 0 1 0l2-1.14V19a3 3 0 0 0 .18 1Zm15-1a1 1 0 0 1-2 0v-5h2Zm-6.44-2.83a.8.8 0 0 0-.18-.09a.6.6 0 0 0-.19-.06a1 1 0 0 0-.9.27A1.05 1.05 0 0 0 12 17a1 1 0 0 0 .07.38a1.2 1.2 0 0 0 .22.33a1.2 1.2 0 0 0 .33.21a.94.94 0 0 0 .76 0a1.2 1.2 0 0 0 .33-.21A1 1 0 0 0 14 17a1.05 1.05 0 0 0-.29-.71a2 2 0 0 0-.15-.12m.14-3.88a1 1 0 0 0-1.62.33A1 1 0 0 0 13 14a1 1 0 0 0 1-1a1 1 0 0 0-.08-.38a.9.9 0 0 0-.22-.33"})});function lu(){return e.jsxs("div",{className:"flex h-full flex-col space-y-4 p-6",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(Te,{className:"h-8 w-3/4"}),e.jsx(Te,{className:"h-4 w-1/2"})]}),e.jsx("div",{className:"flex-1 space-y-4",children:[1,2,3].map(s=>e.jsx(Te,{className:"h-20 w-2/3"},s))})]})}function iu({ticketId:s,dialogTrigger:t}){const a=We(),n=o.useRef(null),[r,l]=o.useState(!1),[c,x]=o.useState(""),[u,b]=o.useState(!1),{data:p,refetch:y,isLoading:_}=G({queryKey:["ticket",s,r],queryFn:()=>r?Lc(s):Promise.resolve(null),refetchInterval:r?5e3:!1,retry:3}),D=p?.data,F=(w="smooth")=>{if(n.current){const{scrollHeight:E,clientHeight:H}=n.current;n.current.scrollTo({top:E-H,behavior:w})}};o.useEffect(()=>{if(!r)return;const w=requestAnimationFrame(()=>{F("instant"),setTimeout(()=>F(),1e3)});return()=>{cancelAnimationFrame(w)}},[r,D?.messages]);const T=async()=>{const w=c.trim();if(!(!w||u)){b(!0);try{await $c({id:s,message:w}),x(""),await y(),F()}catch(E){z.error(E instanceof Error?E.message:"回复失败")}finally{b(!1)}}},m=async()=>{try{await er(s),z.success("工单已关闭"),await y()}catch(w){z.error(w instanceof Error?w.message:"关闭工单失败")}},d=()=>{D?.user&&a("/finance/order?user_id="+D.user.id)},N=D?.status===Ss.CLOSED;return e.jsxs(de,{open:r,onOpenChange:l,children:[e.jsx(Se,{asChild:!0,children:t??e.jsx(A,{variant:"outline",children:"查看工单"})}),e.jsxs(re,{className:"flex h-[90vh] max-w-4xl flex-col gap-0 p-0",children:[e.jsx(xe,{}),_?e.jsx(lu,{}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"flex flex-col space-y-4 border-b p-6",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx("h2",{className:"text-2xl font-semibold",children:D?.subject}),e.jsx(M,{variant:N?"secondary":"default",children:N?"已关闭":"处理中"}),!N&&e.jsx(Ae,{title:"确认关闭工单",description:"关闭后将无法继续回复,是否确认关闭该工单?",confirmText:"关闭工单",variant:"destructive",onConfirm:m,children:e.jsxs(A,{variant:"ghost",size:"sm",className:"gap-1 text-muted-foreground hover:text-destructive",children:[e.jsx(Kr,{className:"h-4 w-4"}),"关闭工单"]})})]}),e.jsxs("div",{className:"flex items-center space-x-4 text-sm text-muted-foreground",children:[e.jsxs("div",{className:"flex items-center space-x-1",children:[e.jsx(Ks,{className:"h-4 w-4"}),e.jsx("span",{children:D?.user?.email})]}),e.jsx(se,{orientation:"vertical",className:"h-4"}),e.jsxs("div",{className:"flex items-center space-x-1",children:[e.jsx(Gr,{className:"h-4 w-4"}),e.jsxs("span",{children:["创建于 ",X(D?.created_at)]})]}),e.jsx(se,{orientation:"vertical",className:"h-4"}),e.jsx(M,{variant:"outline",children:D?.level!=null&&Ls[D.level]})]})]}),D?.user&&e.jsxs("div",{className:"flex space-x-2",children:[e.jsx(Rr,{defaultValues:D.user,refetch:y,dialogTrigger:e.jsx(A,{variant:"outline",size:"icon",className:"h-8 w-8",title:"用户信息",children:e.jsx(Ks,{className:"h-4 w-4"})})}),e.jsx(Or,{user_id:D.user.id,dialogTrigger:e.jsx(A,{variant:"outline",size:"icon",className:"h-8 w-8",title:"流量记录",children:e.jsx(nu,{className:"h-4 w-4"})})}),e.jsx(A,{variant:"outline",size:"icon",className:"h-8 w-8",title:"订单记录",onClick:d,children:e.jsx(ru,{className:"h-4 w-4"})})]})]})}),e.jsx("div",{className:"flex-1 overflow-hidden",children:e.jsx("div",{ref:n,className:"h-full space-y-4 overflow-y-auto p-6",children:D?.messages?.length===0?e.jsx("div",{className:"flex h-full items-center justify-center text-muted-foreground",children:"暂无消息记录"}):D?.messages?.map(w=>e.jsx($r,{variant:w.is_me?"sent":"received",className:w.is_me?"ml-auto":"mr-auto",children:e.jsx(Ar,{children:e.jsxs("div",{className:"space-y-1",children:[e.jsx("div",{className:"whitespace-pre-wrap break-words",children:w.message}),e.jsx("div",{className:"text-right",children:e.jsx("time",{className:"text-[10px] text-muted-foreground",children:X(w.created_at)})})]})})},w.id))})}),e.jsx("div",{className:"border-t p-4",children:e.jsxs("div",{className:"relative flex items-center space-x-2",children:[e.jsx(Hr,{disabled:N||u,placeholder:N?"工单已关闭":"请输入回复内容...",className:"flex-1 resize-none rounded-lg border bg-background p-3 focus-visible:ring-1",value:c,onChange:w=>x(w.target.value),onKeyDown:w=>{w.key==="Enter"&&!w.shiftKey&&(w.preventDefault(),T())}}),e.jsx(A,{disabled:N||u||!c.trim(),onClick:T,children:u?"发送中...":"发送"})]})})]})]})]})}const ou=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M19 4H5a3 3 0 0 0-3 3v10a3 3 0 0 0 3 3h14a3 3 0 0 0 3-3V7a3 3 0 0 0-3-3m-.41 2l-5.88 5.88a1 1 0 0 1-1.42 0L5.41 6ZM20 17a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7.41l5.88 5.88a3 3 0 0 0 4.24 0L20 7.41Z"})}),cu=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M21.92 11.6C19.9 6.91 16.1 4 12 4s-7.9 2.91-9.92 7.6a1 1 0 0 0 0 .8C4.1 17.09 7.9 20 12 20s7.9-2.91 9.92-7.6a1 1 0 0 0 0-.8M12 18c-3.17 0-6.17-2.29-7.9-6C5.83 8.29 8.83 6 12 6s6.17 2.29 7.9 6c-1.73 3.71-4.73 6-7.9 6m0-10a4 4 0 1 0 4 4a4 4 0 0 0-4-4m0 6a2 2 0 1 1 2-2a2 2 0 0 1-2 2"})}),du=s=>[{accessorKey:"id",header:({column:t})=>e.jsx(V,{column:t,title:"工单号"}),cell:({row:t})=>e.jsx(M,{variant:"outline",children:t.getValue("id")}),enableSorting:!1,enableHiding:!1},{accessorKey:"subject",header:({column:t})=>e.jsx(V,{column:t,title:"主题"}),cell:({row:t})=>e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(ou,{className:"h-4 w-4 text-muted-foreground"}),e.jsx("span",{className:"max-w-[500px] truncate font-medium",children:t.getValue("subject")})]}),enableSorting:!1,enableHiding:!1,size:4e3},{accessorKey:"level",header:({column:t})=>e.jsx(V,{column:t,title:"优先级"}),cell:({row:t})=>{const a=t.getValue("level"),n=a===Be.LOW?"default":a===Be.MEDIUM?"secondary":"destructive";return e.jsx(M,{variant:n,className:"whitespace-nowrap",children:Ls[a]})},filterFn:(t,a,n)=>n.includes(t.getValue(a))},{accessorKey:"status",header:({column:t})=>e.jsx(V,{column:t,title:"状态"}),cell:({row:t})=>{const a=t.getValue("status"),n=t.original.reply_status,r=a===Ss.CLOSED?Yc[Ss.CLOSED]:n===0?"已回复":"待回复",l=a===Ss.CLOSED?"default":n===0?"secondary":"destructive";return e.jsx(M,{variant:l,className:"whitespace-nowrap",children:r})}},{accessorKey:"updated_at",header:({column:t})=>e.jsx(V,{column:t,title:"最后更新"}),cell:({row:t})=>e.jsxs("div",{className:"flex items-center space-x-2 text-muted-foreground",children:[e.jsx(Gr,{className:"h-4 w-4"}),e.jsx("span",{className:"text-sm",children:X(t.getValue("updated_at"))})]}),enableSorting:!0},{accessorKey:"created_at",header:({column:t})=>e.jsx(V,{column:t,title:"创建时间"}),cell:({row:t})=>e.jsx("div",{className:"text-sm text-muted-foreground",children:X(t.getValue("created_at"))}),enableSorting:!0,meta:{isFlexGrow:!0}},{id:"actions",header:({column:t})=>e.jsx(V,{className:"justify-end",column:t,title:"操作"}),cell:({row:t})=>{const a=t.original.status!==Ss.CLOSED;return e.jsxs("div",{className:"flex items-center justify-center",children:[e.jsx(iu,{ticketId:t.original.id,dialogTrigger:e.jsx(A,{variant:"ghost",size:"icon",className:"h-8 w-8",title:"查看详情",children:e.jsx(cu,{className:"h-4 w-4"})})}),a&&e.jsx(Ae,{title:"确认关闭工单",description:"关闭后将无法继续回复,是否确认关闭该工单?",confirmText:"关闭工单",variant:"destructive",onConfirm:async()=>{try{await er(t.original.id),z.success("工单已关闭"),s()}catch{z.error("关闭工单失败")}},children:e.jsx(A,{variant:"ghost",size:"icon",className:"h-8 w-8",title:"关闭工单",children:e.jsx(Kr,{className:"h-4 w-4"})})})]})}}];function xu(){const[s,t]=o.useState({}),[a,n]=o.useState({}),[r,l]=o.useState([{id:"status",value:"0"}]),[c,x]=o.useState([]),[u,b]=o.useState({pageIndex:0,pageSize:10}),{refetch:p,data:y,isLoading:_}=G({queryKey:["orderList",u,r,c],queryFn:()=>Qn({pageSize:u.pageSize,current:u.pageIndex+1,filter:r,sort:c})}),D=Fe({data:y?.data??[],columns:du(p),state:{sorting:c,columnVisibility:a,rowSelection:s,columnFilters:r,pagination:u},rowCount:y?.total??0,manualPagination:!0,manualFiltering:!0,manualSorting:!0,enableRowSelection:!0,onRowSelectionChange:t,onSortingChange:x,onColumnFiltersChange:l,onColumnVisibilityChange:n,getCoreRowModel:Pe(),getFilteredRowModel:Ee(),getPaginationRowModel:Me(),onPaginationChange:b,getSortedRowModel:Oe(),getFacetedRowModel:Ze(),getFacetedUniqueValues:Xe(),initialState:{columnPinning:{right:["actions"]}}});return e.jsxs("div",{className:"space-y-4",children:[e.jsx(Qm,{table:D,refetch:p}),e.jsx($e,{table:D,showPagination:!0})]})}function mu(){return e.jsxs(ge,{children:[e.jsxs(fe,{children:[e.jsx(Ne,{}),e.jsxs("div",{className:"ml-auto flex items-center space-x-4",children:[e.jsx(we,{}),e.jsx(_e,{})]})]}),e.jsxs(be,{className:"flex flex-col",fixedHeight:!0,children:[e.jsx("div",{className:"mb-2 flex items-center justify-between space-y-2",children:e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:" 工单管理"}),e.jsx("p",{className:"mt-2 text-muted-foreground",children:"在这里可以查看用户工单,包括查看、回复、关闭等操作。"})]})}),e.jsx("div",{className:"-mx-4 flex-1 overflow-auto px-4 py-1 lg:flex-row lg:space-x-12 lg:space-y-0",children:e.jsx(xu,{})})]})]})}const uu=Object.freeze(Object.defineProperty({__proto__:null,default:mu},Symbol.toStringTag,{value:"Module"}));export{gu as c,fu as g}; +- 支持随时更换套餐`)},children:"使用模板"})}),e.jsx(te,{side:"left",align:"center",children:e.jsx("p",{className:"text-xs",children:"点击使用预设的套餐描述模板"})})]})})]}),e.jsxs("div",{className:`grid gap-4 ${T?"grid-cols-1 lg:grid-cols-2":"grid-cols-1"}`,children:[e.jsx("div",{className:"space-y-2",children:e.jsx(v,{children:e.jsx(kn,{style:{height:"400px"},value:D.value||"",renderHTML:_=>m.render(_),onChange:({text:_})=>D.onChange(_),config:{view:{menu:!0,md:!0,html:!1},canView:{menu:!0,md:!0,html:!1,fullScreen:!1,hideMenu:!1}},placeholder:"在这里编写套餐描述...",className:"rounded-md border"})})}),T&&e.jsxs("div",{className:"space-y-2",children:[e.jsx("div",{className:"text-sm text-muted-foreground",children:"预览"}),e.jsx("div",{className:"prose prose-sm dark:prose-invert h-[400px] max-w-none overflow-y-auto rounded-md border p-4",children:e.jsx("div",{dangerouslySetInnerHTML:{__html:m.render(D.value||"")}})})]})]}),e.jsx(P,{className:"text-xs",children:"支持 Markdown 格式,可以使用标题、列表、粗体、斜体等样式来美化描述内容"}),e.jsx(S,{})]})}})]}),e.jsx(Fe,{className:"mt-6",children:e.jsxs("div",{className:"flex w-full items-center justify-between",children:[e.jsx("div",{className:"flex-shrink-0",children:a&&e.jsx(h,{control:d.control,name:"force_update",render:({field:D})=>e.jsxs(u,{className:"flex flex-row items-center space-x-2 space-y-0",children:[e.jsx(v,{children:e.jsx(Dr,{checked:D.value,onCheckedChange:D.onChange})}),e.jsx("div",{className:"",children:e.jsx(g,{className:"text-sm",children:"强制更新到用户"})})]})})}),e.jsxs("div",{className:"flex space-x-2",children:[e.jsx(k,{type:"button",variant:"outline",onClick:y,children:"取消"}),e.jsx(k,{type:"submit",disabled:l,onClick:()=>{d.handleSubmit(async D=>{c(!0),(await Hc(D)).data&&(V.success(a?"套餐更新成功":"套餐添加成功"),y(),r()),c(!1)})()},children:l?"提交中...":"提交"})]})]})})]})]})})}function Em(){const[s,t]=i.useState({}),[a,n]=i.useState({"drag-handle":!1}),[r,l]=i.useState([]),[c,d]=i.useState([]),[m,w]=i.useState(!1),[j,b]=i.useState({pageSize:10,pageIndex:0}),[x,y]=i.useState([]),{refetch:D}=K({queryKey:["planList"],queryFn:async()=>{const{data:N}=await zs();return y(N),N}});i.useEffect(()=>{n({"drag-handle":m}),b({pageSize:m?99999:10,pageIndex:0})},[m]);const T=(N,R)=>{m&&(N.dataTransfer.setData("text/plain",R.toString()),N.currentTarget.classList.add("opacity-50"))},p=(N,R)=>{if(!m)return;N.preventDefault(),N.currentTarget.classList.remove("bg-muted");const W=parseInt(N.dataTransfer.getData("text/plain"));if(W===R)return;const L=[...x],[ae]=L.splice(W,1);L.splice(R,0,ae),y(L)},_=async()=>{if(!m){w(!0);return}try{const N=x?.map(R=>R.id);await qc(N),V.success("排序保存成功"),w(!1),D()}catch{V.error("排序保存失败"),w(!1)}},z=Re({data:x||[],columns:Vm(D),state:{sorting:c,columnVisibility:a,rowSelection:s,columnFilters:r,pagination:j},enableRowSelection:!0,onRowSelectionChange:t,onSortingChange:d,onColumnFiltersChange:l,onColumnVisibilityChange:n,getCoreRowModel:Me(),getFilteredRowModel:$e(),getPaginationRowModel:Ae(),getSortedRowModel:He(),getFacetedRowModel:es(),getFacetedUniqueValues:ss(),initialState:{columnPinning:{right:["actions"]}},pageCount:m?1:void 0});return e.jsx(Fm,{refreshData:D,children:e.jsxs("div",{className:"space-y-4",children:[e.jsx(qe,{table:z,toolbar:N=>e.jsx(Im,{table:N,refetch:D,saveOrder:_,isSortMode:m}),draggable:m,onDragStart:T,onDragEnd:N=>N.currentTarget.classList.remove("opacity-50"),onDragOver:N=>{N.preventDefault(),N.currentTarget.classList.add("bg-muted")},onDragLeave:N=>N.currentTarget.classList.remove("bg-muted"),onDrop:p,showPagination:!m}),e.jsx(zm,{})]})})}function Om(){return e.jsxs(fe,{children:[e.jsxs(pe,{children:[e.jsx(Ce,{}),e.jsxs("div",{className:"ml-auto flex items-center space-x-4",children:[e.jsx(Se,{}),e.jsx(ke,{})]})]}),e.jsxs(Ne,{className:"flex flex-col",fixedHeight:!0,children:[e.jsx("div",{className:"mb-2 flex items-center justify-between space-y-2",children:e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:"订阅管理"}),e.jsx("p",{className:"mt-2 text-muted-foreground",children:"在这里可以配置订阅计划,包括添加、删除、编辑等操作。"})]})}),e.jsx("div",{className:"-mx-4 flex-1 overflow-auto px-4 py-1 lg:flex-row lg:space-x-12 lg:space-y-0",children:e.jsx(Em,{})})]})]})}const Lm=Object.freeze(Object.defineProperty({__proto__:null,default:Om},Symbol.toStringTag,{value:"Module"})),Pr=[{value:ie.PENDING,label:ks[ie.PENDING],icon:so,color:Hs[ie.PENDING]},{value:ie.PROCESSING,label:ks[ie.PROCESSING],icon:Pn,color:Hs[ie.PROCESSING]},{value:ie.COMPLETED,label:ks[ie.COMPLETED],icon:Lt,color:Hs[ie.COMPLETED]},{value:ie.CANCELLED,label:ks[ie.CANCELLED],icon:Fn,color:Hs[ie.CANCELLED]},{value:ie.DISCOUNTED,label:ks[ie.DISCOUNTED],icon:Lt,color:Hs[ie.DISCOUNTED]}],Fr=[{value:xe.PENDING,label:at[xe.PENDING],icon:to,color:nt[xe.PENDING]},{value:xe.PROCESSING,label:at[xe.PROCESSING],icon:Pn,color:nt[xe.PROCESSING]},{value:xe.VALID,label:at[xe.VALID],icon:Lt,color:nt[xe.VALID]},{value:xe.INVALID,label:at[xe.INVALID],icon:Fn,color:nt[xe.INVALID]}];function Da({column:s,title:t,options:a}){const n=s?.getFacetedUniqueValues(),r=s?.getFilterValue(),l=Array.isArray(r)?new Set(r):r!==void 0?new Set([r]):new Set;return e.jsxs(Be,{children:[e.jsx(Ye,{asChild:!0,children:e.jsxs(k,{variant:"outline",size:"sm",className:"h-8 border-dashed",children:[e.jsx(Ms,{className:"mr-2 h-4 w-4"}),t,l?.size>0&&e.jsxs(e.Fragment,{children:[e.jsx(le,{orientation:"vertical",className:"mx-2 h-4"}),e.jsx(E,{variant:"secondary",className:"rounded-sm px-1 font-normal lg:hidden",children:l.size}),e.jsx("div",{className:"hidden space-x-1 lg:flex",children:l.size>2?e.jsxs(E,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:[l.size," selected"]}):a.filter(c=>l.has(c.value)).map(c=>e.jsx(E,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:c.label},c.value))})]})]})}),e.jsx(Ke,{className:"w-[200px] p-0",align:"start",children:e.jsxs(ts,{children:[e.jsx(hs,{placeholder:t}),e.jsxs(as,{children:[e.jsx(js,{children:"No results found."}),e.jsx(be,{children:a.map(c=>{const d=l.has(c.value);return e.jsxs(me,{onSelect:()=>{const m=new Set(l);d?m.delete(c.value):m.add(c.value);const w=Array.from(m);s?.setFilterValue(w.length?w:void 0)},children:[e.jsx("div",{className:f("mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary",d?"bg-primary text-primary-foreground":"opacity-50 [&_svg]:invisible"),children:e.jsx(us,{className:f("h-4 w-4")})}),c.icon&&e.jsx(c.icon,{className:`mr-2 h-4 w-4 text-muted-foreground text-${c.color}`}),e.jsx("span",{children:c.label}),n?.get(c.value)&&e.jsx("span",{className:"ml-auto flex h-4 w-4 items-center justify-center font-mono text-xs",children:n.get(c.value)})]},c.value)})}),l.size>0&&e.jsxs(e.Fragment,{children:[e.jsx(_s,{}),e.jsx(be,{children:e.jsx(me,{onSelect:()=>s?.setFilterValue(void 0),className:"justify-center text-center",children:"Clear filters"})})]})]})]})})]})}const $m=o.object({email:o.string().min(1),plan_id:o.number(),period:o.string(),total_amount:o.number()}),Am={email:"",plan_id:0,total_amount:0,period:""};function Ir({refetch:s,trigger:t,defaultValues:a}){const[n,r]=i.useState(!1),l=Z({resolver:ee($m),defaultValues:{...Am,...a},mode:"onChange"}),[c,d]=i.useState([]);return i.useEffect(()=>{n&&zs().then(({data:m})=>{d(m)})},[n]),e.jsxs(ue,{open:n,onOpenChange:r,children:[e.jsx(Pe,{asChild:!0,children:t||e.jsxs(k,{variant:"outline",size:"sm",className:" h-8 space-x-2",children:[e.jsx(ve,{icon:"ion:add"}),e.jsx("div",{children:"添加订单"})]})}),e.jsxs(de,{className:"sm:max-w-[425px]",children:[e.jsxs(ge,{children:[e.jsx(he,{children:"订单分配"}),e.jsx(ze,{})]}),e.jsxs(se,{...l,children:[e.jsx(h,{control:l.control,name:"email",render:({field:m})=>e.jsxs(u,{children:[e.jsx(g,{children:"用户邮箱"}),e.jsx(v,{children:e.jsx(C,{placeholder:"请输入用户邮箱",...m})})]})}),e.jsx(h,{control:l.control,name:"plan_id",render:({field:m})=>e.jsxs(u,{children:[e.jsx(g,{children:"订阅计划"}),e.jsx(v,{children:e.jsxs(B,{value:m.value?m.value?.toString():void 0,onValueChange:w=>m.onChange(parseInt(w)),children:[e.jsx(U,{children:e.jsx(Y,{placeholder:"请选择订阅计划"})}),e.jsx(G,{children:c.map(w=>e.jsx(A,{value:w.id.toString(),children:w.name},w.id))})]})})]})}),e.jsx(h,{control:l.control,name:"period",render:({field:m})=>e.jsxs(u,{children:[e.jsx(g,{children:"订阅时长"}),e.jsx(v,{children:e.jsxs(B,{value:m.value,onValueChange:m.onChange,children:[e.jsx(U,{children:e.jsx(Y,{placeholder:"请选择购买时长"})}),e.jsx(G,{children:Object.keys(ht).map(w=>e.jsx(A,{value:w,children:ht[w]},w))})]})})]})}),e.jsx(h,{control:l.control,name:"total_amount",render:({field:m})=>e.jsxs(u,{children:[e.jsx(g,{children:"支付金额"}),e.jsx(v,{children:e.jsx(C,{type:"number",placeholder:"请输入需要支付的金额",value:m.value/100,onChange:w=>m.onChange(parseFloat(w.currentTarget.value)*100)})}),e.jsx(S,{})]})}),e.jsxs(Fe,{children:[e.jsx(k,{variant:"outline",onClick:()=>r(!1),children:"取消"}),e.jsx(k,{type:"submit",onClick:()=>{l.handleSubmit(m=>{Yc(m).then(({data:w})=>{w&&(s&&s(),l.reset(),r(!1),V.success("添加成功"))})})()},children:"确定"})]})]})]})]})}function Hm({table:s,refetch:t}){const a=s.getState().columnFilters.length>0;return e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(Ir,{refetch:t}),e.jsx(C,{placeholder:"搜索订单...",value:s.getColumn("trade_no")?.getFilterValue()??"",onChange:n=>s.getColumn("trade_no")?.setFilterValue(n.target.value),className:"h-8 w-[150px] lg:w-[250px]"}),e.jsxs("div",{className:"flex gap-x-2",children:[s.getColumn("status")&&e.jsx(Da,{column:s.getColumn("status"),title:"订单状态",options:Pr}),s.getColumn("commission_status")&&e.jsx(Da,{column:s.getColumn("commission_status"),title:"佣金状态",options:Fr})]}),a&&e.jsxs(k,{variant:"ghost",onClick:()=>s.resetColumnFilters(),className:"h-8 px-2 lg:px-3",children:["重置",e.jsx(Le,{className:"ml-2 h-4 w-4"})]})]})}function Ee({label:s,value:t,className:a,valueClassName:n}){return e.jsxs("div",{className:f("flex items-center py-1.5",a),children:[e.jsx("div",{className:"w-28 shrink-0 text-sm text-muted-foreground",children:s}),e.jsx("div",{className:f("text-sm",n),children:t||"-"})]})}function Km({status:s}){const t={PENDING:"bg-yellow-100 text-yellow-800 hover:bg-yellow-100",PAID:"bg-green-100 text-green-800 hover:bg-green-100",FAILED:"bg-red-100 text-red-800 hover:bg-red-100",REFUNDED:"bg-gray-100 text-gray-800 hover:bg-gray-100"};return e.jsx(E,{variant:"secondary",className:f("font-medium",t[s]),children:ks[s]})}function qm({id:s,trigger:t}){const[a,n]=i.useState(!1),[r,l]=i.useState();return i.useEffect(()=>{(async()=>{if(a){const{data:d}=await Uc({id:s});l(d)}})()},[a,s]),e.jsxs(ue,{onOpenChange:n,open:a,children:[e.jsx(Pe,{asChild:!0,children:t}),e.jsxs(de,{className:"max-w-xl",children:[e.jsxs(ge,{className:"space-y-2",children:[e.jsx(he,{className:"text-lg font-medium",children:"订单信息"}),e.jsx("div",{className:"flex items-center justify-between text-sm",children:e.jsxs("div",{className:"flex items-center space-x-6",children:[e.jsxs("div",{className:"text-muted-foreground",children:["订单号:",r?.trade_no]}),r?.status&&e.jsx(Km,{status:r.status})]})})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"rounded-lg border p-4",children:[e.jsx("div",{className:"mb-2 text-sm font-medium",children:"基本信息"}),e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(Ee,{label:"用户邮箱",value:r?.user?.email?e.jsxs(Ns,{to:`/user/manage?email=${r.user.email}`,className:"group inline-flex items-center gap-1 text-primary hover:underline",children:[r.user.email,e.jsx(In,{className:"h-3.5 w-3.5 opacity-0 transition-opacity group-hover:opacity-100"})]}):"-"}),e.jsx(Ee,{label:"订单周期",value:r&&ht[r.period]}),e.jsx(Ee,{label:"订阅计划",value:r?.plan?.name,valueClassName:"font-medium"}),e.jsx(Ee,{label:"回调单号",value:r?.callback_no,valueClassName:"font-mono text-xs"})]})]}),e.jsxs("div",{className:"rounded-lg border p-4",children:[e.jsx("div",{className:"mb-2 text-sm font-medium",children:"金额信息"}),e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(Ee,{label:"支付金额",value:As(r?.total_amount||0),valueClassName:"font-medium text-primary"}),e.jsx(le,{className:"my-2"}),e.jsx(Ee,{label:"余额支付",value:As(r?.balance_amount||0)}),e.jsx(Ee,{label:"优惠金额",value:As(r?.discount_amount||0),valueClassName:"text-green-600"}),e.jsx(Ee,{label:"退回金额",value:As(r?.refund_amount||0),valueClassName:"text-red-600"}),e.jsx(Ee,{label:"折抵金额",value:As(r?.surplus_amount||0)})]})]}),e.jsxs("div",{className:"rounded-lg border p-4",children:[e.jsx("div",{className:"mb-2 text-sm font-medium",children:"时间信息"}),e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(Ee,{label:"创建时间",value:X(r?.created_at),valueClassName:"font-mono text-xs"}),e.jsx(Ee,{label:"更新时间",value:X(r?.updated_at),valueClassName:"font-mono text-xs"})]})]})]})]})]})}const Um=s=>[{accessorKey:"trade_no",header:({column:t})=>e.jsx(F,{column:t,title:"订单号"}),cell:({row:t})=>{const a=t.original.trade_no,n=a.length>6?`${a.slice(0,3)}...${a.slice(-3)}`:a;return e.jsx("div",{className:"flex items-center",children:e.jsx(qm,{trigger:e.jsxs(H,{variant:"ghost",size:"sm",className:"flex h-8 items-center gap-1.5 px-2 font-medium text-primary transition-colors hover:bg-primary/10 hover:text-primary/80",children:[e.jsx("span",{className:"font-mono",children:n}),e.jsx(In,{className:"h-3.5 w-3.5 opacity-70"})]}),id:t.original.id})})},enableSorting:!1,enableHiding:!1},{accessorKey:"type",header:({column:t})=>e.jsx(F,{column:t,title:"类型"}),cell:({row:t})=>e.jsx(E,{variant:"outline",className:"bg-muted/50 transition-colors hover:bg-muted/60",children:md[t.getValue("type")]}),enableSorting:!1,enableHiding:!1},{accessorKey:"plan.name",header:({column:t})=>e.jsx(F,{column:t,title:"订阅计划"}),cell:({row:t})=>e.jsx("div",{className:"flex space-x-2",children:e.jsx("span",{className:"max-w-32 truncate font-medium text-foreground/90 sm:max-w-72 md:max-w-[31rem]",children:t.original.plan?.name||"-"})}),enableSorting:!1,enableHiding:!1},{accessorKey:"period",header:({column:t})=>e.jsx(F,{column:t,title:"周期"}),cell:({row:t})=>e.jsx(E,{variant:"outline",className:"bg-muted/50 transition-colors hover:bg-muted/60",children:ht[t.getValue("period")]}),enableSorting:!1,enableHiding:!1},{accessorKey:"total_amount",header:({column:t})=>e.jsx(F,{column:t,title:"支付金额"}),cell:({row:t})=>{const a=t.getValue("total_amount"),n=typeof a=="number"?(a/100).toFixed(2):"N/A";return e.jsxs("div",{className:"flex items-center font-mono text-foreground/90",children:["¥",n]})},enableSorting:!0,enableHiding:!1},{accessorKey:"status",header:({column:t})=>e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(F,{column:t,title:"订单状态"}),e.jsx(ce,{delayDuration:100,children:e.jsxs(ne,{children:[e.jsx(re,{children:e.jsx(br,{className:"h-4 w-4 text-muted-foreground/70 transition-colors hover:text-muted-foreground"})}),e.jsx(te,{side:"top",className:"max-w-[200px] text-sm",children:"标记为[已支付]后将会由系统进行开通后并完成"})]})})]}),cell:({row:t})=>{const a=Pr.find(n=>n.value===t.getValue("status"));return a?e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[a.icon&&e.jsx(a.icon,{className:`h-4 w-4 text-${a.color}`}),e.jsx("span",{className:"text-sm font-medium",children:a.label})]}),a.value===ie.PENDING&&e.jsxs(vs,{modal:!0,children:[e.jsx(bs,{asChild:!0,children:e.jsxs(H,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0 hover:bg-muted/60",children:[e.jsx(ut,{className:"h-4 w-4"}),e.jsx("span",{className:"sr-only",children:"打开菜单"})]})}),e.jsxs(ms,{align:"end",className:"w-[140px]",children:[e.jsx(oe,{className:"cursor-pointer",onClick:async()=>{await Gc({trade_no:t.original.trade_no}),s()},children:"标记为已支付"}),e.jsx(oe,{className:"cursor-pointer text-destructive focus:text-destructive",onClick:async()=>{await Bc({trade_no:t.original.trade_no}),s()},children:"取消订单"})]})]})]}):null},enableSorting:!0,enableHiding:!1},{accessorKey:"commission_balance",header:({column:t})=>e.jsx(F,{column:t,title:"佣金金额"}),cell:({row:t})=>{const a=t.getValue("commission_balance"),n=a?(a/100).toFixed(2):"-";return e.jsx("div",{className:"flex items-center font-mono text-foreground/90",children:a?`¥${n}`:"-"})},enableSorting:!0,enableHiding:!1},{accessorKey:"commission_status",header:({column:t})=>e.jsx(F,{column:t,title:"佣金状态"}),cell:({row:t})=>{const a=t.original.commission_status,n=Fr.find(r=>r.value===t.getValue("commission_status"));return a==0||!n?e.jsx("span",{className:"text-muted-foreground",children:"-"}):e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[n.icon&&e.jsx(n.icon,{className:`h-4 w-4 text-${n.color}`}),e.jsx("span",{className:"text-sm font-medium",children:n.label})]}),n.value===xe.PENDING&&e.jsxs(vs,{modal:!0,children:[e.jsx(bs,{asChild:!0,children:e.jsxs(H,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0 hover:bg-muted/60",children:[e.jsx(ut,{className:"h-4 w-4"}),e.jsx("span",{className:"sr-only",children:"打开菜单"})]})}),e.jsxs(ms,{align:"end",className:"w-[120px]",children:[e.jsx(oe,{className:"cursor-pointer",onClick:async()=>{await Na({trade_no:t.original.trade_no,commission_status:xe.PROCESSING}),s()},children:"标记为有效"}),e.jsx(oe,{className:"cursor-pointer text-destructive focus:text-destructive",onClick:async()=>{await Na({trade_no:t.original.trade_no,commission_status:xe.INVALID}),s()},children:"标记为无效"})]})]})]})},enableSorting:!0,enableHiding:!1},{accessorKey:"created_at",header:({column:t})=>e.jsx(F,{column:t,title:"创建时间"}),cell:({row:t})=>e.jsx("div",{className:"text-nowrap font-mono text-sm text-muted-foreground",children:X(t.getValue("created_at"),"YYYY/MM/DD HH:mm:ss")}),enableSorting:!0,enableHiding:!1}];function Gm(){const s=gt(),t=new URLSearchParams(s.search),a=Array.from(t.entries()).map(([R,W])=>({id:R,value:parseInt(W)||W})),[n]=i.useState(!0),r=n&&s.state?.filters?s.state.filters:[],l=[...a,...r];i.useEffect(()=>{s.state?.filters&&window.history.replaceState({...s.state,filters:void 0},"")},[]);const[c,d]=i.useState({}),[m,w]=i.useState({}),[j,b]=i.useState(l),[x,y]=i.useState([]),[D,T]=i.useState({pageIndex:0,pageSize:10}),{refetch:p,data:_,isLoading:z}=K({queryKey:["orderList",D,j,x],queryFn:()=>ar({pageSize:D.pageSize,current:D.pageIndex+1,filter:j,sort:x})}),N=Re({data:_?.data??[],columns:Um(p),state:{sorting:x,columnVisibility:m,rowSelection:c,columnFilters:j,pagination:D},rowCount:_?.total??0,manualPagination:!0,manualFiltering:!0,manualSorting:!0,enableRowSelection:!0,onRowSelectionChange:d,onSortingChange:y,onColumnFiltersChange:b,onColumnVisibilityChange:w,getCoreRowModel:Me(),getFilteredRowModel:$e(),getPaginationRowModel:Ae(),onPaginationChange:T,getSortedRowModel:He(),getFacetedRowModel:es(),getFacetedUniqueValues:ss()});return e.jsx(qe,{table:N,toolbar:e.jsx(Hm,{table:N,refetch:p}),showPagination:!0})}function Bm(){return e.jsxs(fe,{children:[e.jsxs(pe,{children:[e.jsx(Ce,{}),e.jsxs("div",{className:"ml-auto flex items-center space-x-4",children:[e.jsx(Se,{}),e.jsx(ke,{})]})]}),e.jsxs(Ne,{className:"flex flex-col",fixedHeight:!0,children:[e.jsx("div",{className:"mb-2 flex items-center justify-between space-y-2",children:e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:" 订单管理"}),e.jsx("p",{className:"text-muted-foreground mt-2",children:"在这里可以查看用户订单,包括分配、查看、删除等操作。"})]})}),e.jsx("div",{className:"-mx-4 flex-1 overflow-auto px-4 py-1 lg:flex-row lg:space-x-12 lg:space-y-0",children:e.jsx(Gm,{})})]})]})}const Ym=Object.freeze(Object.defineProperty({__proto__:null,default:Bm},Symbol.toStringTag,{value:"Module"}));function Wm({column:s,title:t,options:a}){const n=s?.getFacetedUniqueValues(),r=new Set(s?.getFilterValue());return e.jsxs(Be,{children:[e.jsx(Ye,{asChild:!0,children:e.jsxs(k,{variant:"outline",size:"sm",className:"h-8 border-dashed",children:[e.jsx(Ms,{className:"mr-2 h-4 w-4"}),t,r?.size>0&&e.jsxs(e.Fragment,{children:[e.jsx(le,{orientation:"vertical",className:"mx-2 h-4"}),e.jsx(E,{variant:"secondary",className:"rounded-sm px-1 font-normal lg:hidden",children:r.size}),e.jsx("div",{className:"hidden space-x-1 lg:flex",children:r.size>2?e.jsxs(E,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:[r.size," selected"]}):a.filter(l=>r.has(l.value)).map(l=>e.jsx(E,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:l.label},l.value))})]})]})}),e.jsx(Ke,{className:"w-[200px] p-0",align:"start",children:e.jsxs(ts,{children:[e.jsx(hs,{placeholder:t}),e.jsxs(as,{children:[e.jsx(js,{children:"No results found."}),e.jsx(be,{children:a.map(l=>{const c=r.has(l.value);return e.jsxs(me,{onSelect:()=>{c?r.delete(l.value):r.add(l.value);const d=Array.from(r);s?.setFilterValue(d.length?d:void 0)},children:[e.jsx("div",{className:f("mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary",c?"bg-primary text-primary-foreground":"opacity-50 [&_svg]:invisible"),children:e.jsx(us,{className:f("h-4 w-4")})}),l.icon&&e.jsx(l.icon,{className:`mr-2 h-4 w-4 text-muted-foreground text-${l.color}`}),e.jsx("span",{children:l.label}),n?.get(l.value)&&e.jsx("span",{className:"ml-auto flex h-4 w-4 items-center justify-center font-mono text-xs",children:n.get(l.value)})]},l.value)})}),r.size>0&&e.jsxs(e.Fragment,{children:[e.jsx(_s,{}),e.jsx(be,{children:e.jsx(me,{onSelect:()=>s?.setFilterValue(void 0),className:"justify-center text-center",children:"Clear filters"})})]})]})]})})]})}const Jm=o.object({id:o.coerce.number().nullable().optional(),name:o.string().min(1,"请输入优惠券名称"),code:o.string().nullable(),type:o.union([o.string(),o.nativeEnum(kt)]),value:o.coerce.number(),started_at:o.coerce.number(),ended_at:o.coerce.number(),limit_use:o.union([o.string(),o.number()]).nullable(),limit_use_with_user:o.union([o.string(),o.number()]).nullable(),generate_count:o.coerce.number().nullable().optional(),limit_plan_ids:o.array(o.number()).default([]).nullable(),limit_period:o.array(o.nativeEnum(Ds)).default([]).nullable()}).refine(s=>s.ended_at>s.started_at,{message:"结束时间必须晚于开始时间",path:["ended_at"]}),Pa={name:"",code:"",type:kt.AMOUNT,value:0,started_at:Math.floor(Date.now()/1e3),ended_at:Math.floor(Date.now()/1e3)+7*24*60*60,limit_use:"",limit_use_with_user:"",limit_plan_ids:[],limit_period:[],generate_count:""};function Vr({defaultValues:s,refetch:t,type:a="create",dialogTrigger:n=e.jsxs(k,{variant:"outline",size:"sm",className:"h-8 space-x-2",children:[e.jsx(ve,{icon:"ion:add"}),e.jsx("div",{children:"添加优惠券"})]}),open:r,onOpenChange:l}){const[c,d]=i.useState(!1),m=r??c,w=l??d,[j,b]=i.useState([]),x=Z({resolver:ee(Jm),defaultValues:s||Pa});i.useEffect(()=>{s&&x.reset(s)},[s,x]),i.useEffect(()=>{zs().then(({data:p})=>b(p))},[]);const y=p=>{if(!p)return;const _=(z,N)=>{const R=new Date(N*1e3);return z.setHours(R.getHours(),R.getMinutes(),R.getSeconds()),Math.floor(z.getTime()/1e3)};p.from&&x.setValue("started_at",_(p.from,x.watch("started_at"))),p.to&&x.setValue("ended_at",_(p.to,x.watch("ended_at")))},D=async p=>{try{await Jc(p),w(!1),a==="create"&&x.reset(Pa),t()}catch(_){console.error("保存优惠券失败:",_)}},T=(p,_)=>e.jsxs("div",{className:"flex-1 space-y-1.5",children:[e.jsx("div",{className:"text-sm font-medium text-muted-foreground",children:_}),e.jsx(C,{type:"datetime-local",step:"1",value:X(x.watch(p),"YYYY-MM-DDTHH:mm:ss"),onChange:z=>{const N=new Date(z.target.value);x.setValue(p,Math.floor(N.getTime()/1e3))},className:"h-8 [&::-webkit-calendar-picker-indicator]:hidden"})]});return e.jsxs(ue,{open:m,onOpenChange:w,children:[n&&e.jsx(Pe,{asChild:!0,children:n}),e.jsxs(de,{className:"sm:max-w-[425px]",children:[e.jsx(ge,{children:e.jsx(he,{children:a==="create"?"添加优惠券":"编辑优惠券"})}),e.jsx(se,{...x,children:e.jsxs("form",{onSubmit:x.handleSubmit(D),className:"space-y-4",children:[e.jsx(h,{control:x.control,name:"name",render:({field:p})=>e.jsxs(u,{children:[e.jsx(g,{children:"优惠券名称"}),e.jsx(C,{placeholder:"请输入优惠券名称",...p}),e.jsx(S,{})]})}),e.jsxs(u,{children:[e.jsx(g,{children:"优惠券类型和值"}),e.jsxs("div",{className:"flex",children:[e.jsx(h,{control:x.control,name:"type",render:({field:p})=>e.jsxs(B,{value:p.value.toString(),onValueChange:p.onChange,children:[e.jsx(U,{className:"flex-[1.2] rounded-r-none border-r-0 focus:z-10",children:e.jsx(Y,{placeholder:"优惠券类型"})}),e.jsx(G,{children:Object.entries(Zt).map(([_,z])=>e.jsx(A,{value:_,children:z},_))})]})}),e.jsx(h,{control:x.control,name:"value",render:({field:p})=>e.jsx(C,{type:"number",placeholder:"请输入值",...p,onChange:_=>p.onChange(_.target.value===""?"":_.target.value),className:"flex-[2] rounded-none border-x-0 text-left"})}),e.jsx("div",{className:"flex min-w-[40px] items-center justify-center rounded-md rounded-l-none border border-l-0 border-input bg-muted/50 px-3 font-medium text-muted-foreground",children:e.jsx("span",{children:x.watch("type")===kt.AMOUNT?"¥":"%"})})]})]}),e.jsxs(u,{children:[e.jsx(g,{children:"优惠券有效期"}),e.jsxs(Be,{children:[e.jsx(Ye,{asChild:!0,children:e.jsxs(k,{variant:"outline",className:f("w-full justify-start text-left font-normal",!x.watch("started_at")&&"text-muted-foreground"),children:[e.jsx(yt,{className:"mr-2 h-4 w-4"}),X(x.watch("started_at"),"YYYY-MM-DD HH:mm:ss")," ","至"," ",X(x.watch("ended_at"),"YYYY-MM-DD HH:mm:ss")]})}),e.jsxs(Ke,{className:"w-auto p-0",align:"start",children:[e.jsx("div",{className:"border-b border-border",children:e.jsx(et,{mode:"range",selected:{from:new Date(x.watch("started_at")*1e3),to:new Date(x.watch("ended_at")*1e3)},onSelect:y,numberOfMonths:2})}),e.jsx("div",{className:"p-3",children:e.jsxs("div",{className:"flex items-center gap-4",children:[T("started_at","开始时间"),e.jsx("div",{className:"mt-6 text-sm text-muted-foreground",children:"至"}),T("ended_at","结束时间")]})})]})]}),e.jsx(S,{})]}),e.jsx(h,{control:x.control,name:"limit_use",render:({field:p})=>e.jsxs(u,{children:[e.jsx(g,{children:"最大使用次数"}),e.jsx(C,{type:"number",min:0,placeholder:"限制最大使用次数,留空则不限制",...p,value:p.value===void 0?"":p.value,onChange:_=>p.onChange(_.target.value===""?"":_.target.value),className:"h-9"}),e.jsx(P,{className:"text-xs",children:"设置优惠券的总使用次数限制,留空表示不限制使用次数"}),e.jsx(S,{})]})}),e.jsx(h,{control:x.control,name:"limit_use_with_user",render:({field:p})=>e.jsxs(u,{children:[e.jsx(g,{children:"每个用户可使用次数"}),e.jsx(C,{type:"number",min:0,placeholder:"限制每个用户可使用次数,留空则不限制",...p,value:p.value===void 0?"":p.value,onChange:_=>p.onChange(_.target.value===""?"":_.target.value),className:"h-9"}),e.jsx(P,{className:"text-xs",children:"限制每个用户可使用该优惠券的次数,留空表示不限制单用户使用次数"}),e.jsx(S,{})]})}),e.jsx(h,{control:x.control,name:"limit_period",render:({field:p})=>e.jsxs(u,{children:[e.jsx(g,{children:"指定周期"}),e.jsx(Qs,{options:Object.entries(Ds).filter(([_])=>isNaN(Number(_))).map(([_,z])=>({label:z,value:_})),onChange:_=>{if(_.length===0){p.onChange([]);return}const z=_.map(N=>Ds[N.value]);p.onChange(z)},value:(p.value||[]).map(_=>({label:Object.entries(Ds).find(([z,N])=>N===_)?.[1]||"",value:Object.entries(Ds).find(([z,N])=>N===_)?.[0]||""})),placeholder:"限制指定周期可以使用优惠,留空则不限制",emptyIndicator:e.jsx("p",{className:"text-center text-sm text-muted-foreground",children:"没有找到匹配的周期"})}),e.jsx(P,{className:"text-xs",children:"选择可以使用优惠券的订阅周期,留空表示不限制使用周期"}),e.jsx(S,{})]})}),e.jsx(h,{control:x.control,name:"limit_plan_ids",render:({field:p})=>e.jsxs(u,{children:[e.jsx(g,{children:"指定订阅"}),e.jsx(Qs,{options:j?.map(_=>({label:_.name,value:_.id.toString()}))||[],onChange:_=>p.onChange(_.map(z=>Number(z.value))),value:(j||[]).filter(_=>(p.value||[]).includes(_.id)).map(_=>({label:_.name,value:_.id.toString()})),placeholder:"限制指定订阅可以使用优惠,留空则不限制",emptyIndicator:e.jsx("p",{className:"text-center text-sm text-muted-foreground",children:"没有找到匹配的订阅"})}),e.jsx(S,{})]})}),a==="create"&&e.jsxs(e.Fragment,{children:[e.jsx(h,{control:x.control,name:"code",render:({field:p})=>e.jsxs(u,{children:[e.jsx(g,{children:"自定义优惠码"}),e.jsx(C,{placeholder:"自定义优惠码,留空则自动生成",...p,className:"h-9"}),e.jsx(P,{className:"text-xs",children:"可以自定义优惠码,留空则系统自动生成"}),e.jsx(S,{})]})}),e.jsx(h,{control:x.control,name:"generate_count",render:({field:p})=>e.jsxs(u,{children:[e.jsx(g,{children:"批量生成数量"}),e.jsx(C,{type:"number",min:0,placeholder:"批量生成优惠码数量,留空则生成单个",...p,value:p.value===void 0?"":p.value,onChange:_=>p.onChange(_.target.value===""?"":_.target.value),className:"h-9"}),e.jsx(P,{className:"text-xs",children:"批量生成多个优惠码,留空则只生成单个优惠码"}),e.jsx(S,{})]})})]}),e.jsx(Fe,{children:e.jsx(k,{type:"submit",disabled:x.formState.isSubmitting,children:x.formState.isSubmitting?"保存中...":"保存"})})]})})]})]})}function Qm({table:s,refetch:t}){const a=s.getState().columnFilters.length>0;return e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(Vr,{refetch:t}),e.jsx(C,{placeholder:"搜索优惠券...",value:s.getColumn("name")?.getFilterValue()??"",onChange:n=>s.getColumn("name")?.setFilterValue(n.target.value),className:"h-8 w-[150px] lg:w-[250px]"}),s.getColumn("type")&&e.jsx(Wm,{column:s.getColumn("type"),title:"类型",options:Object.entries(Zt).map(([n,r])=>({value:n,label:r}))}),a&&e.jsxs(k,{variant:"ghost",onClick:()=>s.resetColumnFilters(),className:"h-8 px-2 lg:px-3",children:["重置",e.jsx(Le,{className:"ml-2 h-4 w-4"})]})]})}const Rr=i.createContext(void 0);function Zm({children:s,refetch:t}){const[a,n]=i.useState(!1),[r,l]=i.useState(null),c=m=>{l(m),n(!0)},d=()=>{n(!1),l(null)};return e.jsxs(Rr.Provider,{value:{isOpen:a,currentCoupon:r,openEdit:c,closeEdit:d},children:[s,r&&e.jsx(Vr,{defaultValues:r,refetch:t,type:"edit",open:a,onOpenChange:n})]})}function Xm(){const s=i.useContext(Rr);if(s===void 0)throw new Error("useCouponEdit must be used within a CouponEditProvider");return s}const eu=s=>[{accessorKey:"id",header:({column:t})=>e.jsx(F,{column:t,title:"ID"}),cell:({row:t})=>e.jsx(E,{children:t.original.id}),enableSorting:!0},{accessorKey:"show",header:({column:t})=>e.jsx(F,{column:t,title:"启用"}),cell:({row:t})=>e.jsx(O,{defaultChecked:t.original.show,onCheckedChange:a=>{Zc({id:t.original.id,show:a}).then(({data:n})=>!n&&s())}}),enableSorting:!1},{accessorKey:"name",header:({column:t})=>e.jsx(F,{column:t,title:"卷名称"}),cell:({row:t})=>e.jsx("div",{className:"flex items-center",children:e.jsx("span",{children:t.original.name})}),enableSorting:!1,size:800},{accessorKey:"type",header:({column:t})=>e.jsx(F,{column:t,title:"类型"}),cell:({row:t})=>e.jsx(E,{variant:"outline",children:Zt[t.original.type]}),enableSorting:!0},{accessorKey:"code",header:({column:t})=>e.jsx(F,{column:t,title:"卷码"}),cell:({row:t})=>e.jsx(E,{variant:"secondary",children:t.original.code}),enableSorting:!0},{accessorKey:"limit_use",header:({column:t})=>e.jsx(F,{column:t,title:"剩余次数"}),cell:({row:t})=>e.jsx(E,{variant:"outline",children:t.original.limit_use===null?"无限次":t.original.limit_use}),enableSorting:!0},{accessorKey:"limit_use_with_user",header:({column:t})=>e.jsx(F,{column:t,title:"可用次数/用户"}),cell:({row:t})=>e.jsx(E,{variant:"outline",children:t.original.limit_use_with_user===null?"无限制":t.original.limit_use_with_user}),enableSorting:!0},{accessorKey:"#",header:({column:t})=>e.jsx(F,{column:t,title:"有效期"}),cell:({row:t})=>{const[a,n]=i.useState(!1),r=Date.now(),l=t.original.started_at*1e3,c=t.original.ended_at*1e3,d=r>c,m=re.jsx(F,{className:"justify-end",column:t,title:"操作"}),cell:({row:t})=>{const{openEdit:a}=Xm();return e.jsxs("div",{className:"flex items-center justify-center",children:[e.jsxs(k,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-muted",onClick:()=>a(t.original),children:[e.jsx(ws,{className:"h-4 w-4 text-muted-foreground hover:text-foreground"}),e.jsx("span",{className:"sr-only",children:"编辑"})]}),e.jsx(Ue,{title:"确认删除",description:"此操作将永久删除该优惠券,删除后无法恢复。确定要继续吗?",confirmText:"删除",variant:"destructive",onConfirm:async()=>{Qc({id:t.original.id}).then(({data:n})=>{n&&(V.success("删除成功"),s())})},children:e.jsxs(k,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-red-100 dark:hover:bg-red-900",children:[e.jsx(Xe,{className:"h-4 w-4 text-muted-foreground hover:text-red-600 dark:hover:text-red-400"}),e.jsx("span",{className:"sr-only",children:"删除"})]})})]})}}];function su(){const[s,t]=i.useState({}),[a,n]=i.useState({}),[r,l]=i.useState([]),[c,d]=i.useState([]),[m,w]=i.useState({pageIndex:0,pageSize:10}),{refetch:j,data:b}=K({queryKey:["couponList",m,r,c],queryFn:()=>Wc({pageSize:m.pageSize,current:m.pageIndex+1,filter:r,sort:c})}),x=Re({data:b?.data??[],columns:eu(j),state:{sorting:c,columnVisibility:a,rowSelection:s,columnFilters:r,pagination:m},pageCount:Math.ceil((b?.total??0)/m.pageSize),rowCount:b?.total??0,manualPagination:!0,manualFiltering:!0,manualSorting:!0,enableRowSelection:!0,onRowSelectionChange:t,onSortingChange:d,onColumnFiltersChange:l,onColumnVisibilityChange:n,onPaginationChange:w,getCoreRowModel:Me(),getFilteredRowModel:$e(),getPaginationRowModel:Ae(),getSortedRowModel:He(),getFacetedRowModel:es(),getFacetedUniqueValues:ss(),initialState:{columnPinning:{right:["actions"]}}});return e.jsx(Zm,{refetch:j,children:e.jsx("div",{className:"space-y-4",children:e.jsx(qe,{table:x,toolbar:e.jsx(Qm,{table:x,refetch:j})})})})}function tu(){return e.jsxs(fe,{children:[e.jsxs(pe,{children:[e.jsx(Ce,{}),e.jsxs("div",{className:"ml-auto flex items-center space-x-4",children:[e.jsx(Se,{}),e.jsx(ke,{})]})]}),e.jsxs(Ne,{className:"flex flex-col",fixedHeight:!0,children:[e.jsx("div",{className:"mb-2 flex items-center justify-between space-y-2",children:e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:"优惠券管理"}),e.jsx("p",{className:"text-muted-foreground mt-2",children:"在这里可以查看优惠券,包括增加、查看、删除等操作。"})]})}),e.jsx("div",{className:"-mx-4 flex-1 overflow-auto px-4 py-1 lg:flex-row lg:space-x-12 lg:space-y-0",children:e.jsx(su,{})})]})]})}const au=Object.freeze(Object.defineProperty({__proto__:null,default:tu},Symbol.toStringTag,{value:"Module"}));function Fa({column:s,title:t,options:a}){const n=s?.getFacetedUniqueValues(),r=new Set(s?.getFilterValue());return e.jsxs(Be,{children:[e.jsx(Ye,{asChild:!0,children:e.jsxs(k,{variant:"outline",size:"sm",className:"h-8 border-dashed",children:[e.jsx(Ms,{className:"mr-2 h-4 w-4"}),t,r?.size>0&&e.jsxs(e.Fragment,{children:[e.jsx(le,{orientation:"vertical",className:"mx-2 h-4"}),e.jsx(E,{variant:"secondary",className:"rounded-sm px-1 font-normal lg:hidden",children:r.size}),e.jsx("div",{className:"hidden space-x-1 lg:flex",children:r.size>2?e.jsxs(E,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:[r.size," selected"]}):a.filter(l=>r.has(l.value)).map(l=>e.jsx(E,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:l.label},l.value))})]})]})}),e.jsx(Ke,{className:"w-[200px] p-0",align:"start",children:e.jsxs(ts,{children:[e.jsx(hs,{placeholder:t}),e.jsxs(as,{children:[e.jsx(js,{children:"No results found."}),e.jsx(be,{children:a.map(l=>{const c=r.has(l.value);return e.jsxs(me,{onSelect:()=>{c?r.delete(l.value):r.add(l.value);const d=Array.from(r);s?.setFilterValue(d.length?d:void 0)},children:[e.jsx("div",{className:f("mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary",c?"bg-primary text-primary-foreground":"opacity-50 [&_svg]:invisible"),children:e.jsx(us,{className:f("h-4 w-4")})}),l.icon&&e.jsx(l.icon,{className:`mr-2 h-4 w-4 text-muted-foreground text-${l.color}`}),e.jsx("span",{children:l.label}),n?.get(l.value)&&e.jsx("span",{className:"ml-auto flex h-4 w-4 items-center justify-center font-mono text-xs",children:n.get(l.value)})]},l.value)})}),r.size>0&&e.jsxs(e.Fragment,{children:[e.jsx(_s,{}),e.jsx(be,{children:e.jsx(me,{onSelect:()=>s?.setFilterValue(void 0),className:"justify-center text-center",children:"Clear filters"})})]})]})]})})]})}const nu=o.object({email_prefix:o.string().optional(),email_suffix:o.string().min(1),password:o.string().optional(),expired_at:o.number().optional().nullable(),plan_id:o.number().nullable(),generate_count:o.number().optional().nullable()}).refine(s=>s.generate_count===null?s.email_prefix!==void 0&&s.email_prefix!=="":!0,{message:"Email prefix is required when generate_count is null",path:["email_prefix"]}),ru={email_prefix:"",email_suffix:"",password:"",expired_at:null,plan_id:null,generate_count:void 0};function lu({refetch:s}){const[t,a]=i.useState(!1),n=Z({resolver:ee(nu),defaultValues:ru,mode:"onChange"}),[r,l]=i.useState([]);return i.useEffect(()=>{t&&zs().then(({data:c})=>{c&&l(c)})},[t]),e.jsxs(ue,{open:t,onOpenChange:a,children:[e.jsx(Pe,{asChild:!0,children:e.jsxs(H,{size:"sm",variant:"outline",className:"space-x-2",children:[e.jsx(ve,{icon:"ion:add"}),e.jsx("div",{children:"创建用户"})]})}),e.jsxs(de,{className:"sm:max-w-[425px]",children:[e.jsxs(ge,{children:[e.jsx(he,{children:"创建用户"}),e.jsx(ze,{})]}),e.jsxs(se,{...n,children:[e.jsxs(u,{children:[e.jsx(g,{children:"邮箱"}),e.jsxs("div",{className:"flex",children:[!n.watch("generate_count")&&e.jsx(h,{control:n.control,name:"email_prefix",render:({field:c})=>e.jsx(C,{className:"flex-[5] rounded-r-none",placeholder:"帐号(批量生成请留空)",...c})}),e.jsx("div",{className:`z-[-1] border border-r-0 border-input px-3 py-1 shadow-sm ${n.watch("generate_count")?"rounded-l-md":"border-l-0"}`,children:"@"}),e.jsx(h,{control:n.control,name:"email_suffix",render:({field:c})=>e.jsx(C,{className:"flex-[4] rounded-l-none",placeholder:"域",...c})})]})]}),e.jsx(h,{control:n.control,name:"password",render:({field:c})=>e.jsxs(u,{children:[e.jsx(g,{children:"密码"}),e.jsx(C,{placeholder:"留空则密码与邮件相同",...c}),e.jsx(S,{})]})}),e.jsx(h,{control:n.control,name:"expired_at",render:({field:c})=>e.jsxs(u,{className:"flex flex-col",children:[e.jsx(g,{children:"到期时间"}),e.jsxs(Be,{children:[e.jsx(Ye,{asChild:!0,children:e.jsx(v,{children:e.jsxs(H,{variant:"outline",className:f("w-full pl-3 text-left font-normal",!c.value&&"text-muted-foreground"),children:[c.value?X(c.value):e.jsx("span",{children:"请选择用户到期日期,留空为长期有效"}),e.jsx(yt,{className:"ml-auto h-4 w-4 opacity-50"})]})})}),e.jsxs(Ke,{className:"flex w-auto flex-col space-y-2 p-2",children:[e.jsx(no,{asChild:!0,children:e.jsx(H,{variant:"outline",className:"w-full",onClick:()=>{c.onChange(null)},children:"长期有效"})}),e.jsx("div",{className:"rounded-md border",children:e.jsx(et,{mode:"single",selected:c.value?new Date(c.value*1e3):void 0,onSelect:d=>{d&&c.onChange(d?.getTime()/1e3)}})})]})]})]})}),e.jsx(h,{control:n.control,name:"plan_id",render:({field:c})=>e.jsxs(u,{children:[e.jsx(g,{children:"订阅计划"}),e.jsx(v,{children:e.jsxs(B,{value:c.value?c.value.toString():"null",onValueChange:d=>c.onChange(d==="null"?null:parseInt(d)),children:[e.jsx(U,{children:e.jsx(Y,{placeholder:"无"})}),e.jsxs(G,{children:[e.jsx(A,{value:"null",children:"无"}),r.map(d=>e.jsx(A,{value:d.id.toString(),children:d.name},d.id))]})]})})]})}),!n.watch("email_prefix")&&e.jsx(h,{control:n.control,name:"generate_count",render:({field:c})=>e.jsxs(u,{children:[e.jsx(g,{children:"生成数量"}),e.jsx(C,{type:"number",placeholder:"如果为批量生产请输入生成数量",value:c.value||"",onChange:d=>c.onChange(d.target.value?parseInt(d.target.value):null)})]})})]}),e.jsxs(Fe,{children:[e.jsx(H,{variant:"outline",onClick:()=>a(!1),children:"取消"}),e.jsx(H,{onClick:()=>n.handleSubmit(c=>{td(c).then(({data:d})=>{d&&(V.success("生成成功"),n.reset(),s(),a(!1))})})(),children:"生成"})]})]})]})}function iu({table:s,refetch:t,serverGroupList:a}){const n=s.getState().columnFilters.length>0;return e.jsx("div",{className:"flex flex-wrap items-center justify-between gap-2",children:e.jsxs("div",{className:"flex flex-1 flex-wrap items-center gap-2",children:[e.jsx(lu,{refetch:t}),e.jsx(C,{placeholder:"搜索用户邮箱...",value:s.getColumn("email")?.getFilterValue()??"",onChange:r=>s.getColumn("email")?.setFilterValue(r.target.value),className:"h-8 w-[150px] lg:w-[250px]"}),s.getColumn("banned")&&e.jsx(Fa,{column:s.getColumn("banned"),title:"用户状态",options:[{label:"正常",value:0},{label:"封禁",value:1}]}),s.getColumn("group_ids")&&e.jsx(Fa,{column:s.getColumn("group_ids"),title:"权限组",options:a.map(r=>({label:r.name,value:r.id}))}),n&&e.jsxs(k,{variant:"ghost",onClick:()=>s.resetColumnFilters(),className:"h-8 px-2 lg:px-3",children:["重置筛选",e.jsx(Le,{className:"ml-2 h-4 w-4"})]})]})})}const ou=Ra,cu=Ma,du=za,Mr=i.forwardRef(({className:s,...t},a)=>e.jsx(ft,{className:f("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",s),...t,ref:a}));Mr.displayName=ft.displayName;const xu=ys("fixed overflow-y-scroll z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-300 data-[state=open]:animate-in data-[state=closed]:animate-out",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-md",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-md"}},defaultVariants:{side:"right"}}),zr=i.forwardRef(({side:s="right",className:t,children:a,...n},r)=>e.jsxs(du,{children:[e.jsx(Mr,{}),e.jsxs(pt,{ref:r,className:f(xu({side:s}),t),...n,children:[e.jsxs(Bt,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[e.jsx(Le,{className:"h-4 w-4"}),e.jsx("span",{className:"sr-only",children:"Close"})]}),a]})]}));zr.displayName=pt.displayName;const Er=({className:s,...t})=>e.jsx("div",{className:f("flex flex-col space-y-2 text-center sm:text-left",s),...t});Er.displayName="SheetHeader";const Or=({className:s,...t})=>e.jsx("div",{className:f("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",s),...t});Or.displayName="SheetFooter";const Lr=i.forwardRef(({className:s,...t},a)=>e.jsx(vt,{ref:a,className:f("text-lg font-semibold text-foreground",s),...t}));Lr.displayName=vt.displayName;const $r=i.forwardRef(({className:s,...t},a)=>e.jsx(bt,{ref:a,className:f("text-sm text-muted-foreground",s),...t}));$r.displayName=bt.displayName;const mu=o.object({id:o.number(),email:o.string().email(),invite_user_email:o.string().email().nullable().optional(),password:o.string().optional().nullable(),balance:o.coerce.number(),commission_balance:o.coerce.number(),u:o.number(),d:o.number(),transfer_enable:o.number(),expired_at:o.number().nullable(),plan_id:o.number().nullable(),banned:o.number(),commission_type:o.number(),commission_rate:o.number().nullable(),discount:o.number().nullable(),speed_limit:o.number().nullable(),is_admin:o.number(),is_staff:o.number(),remarks:o.string().nullable()});function Ar({refetch:s,defaultValues:t,dialogTrigger:a=e.jsxs(k,{variant:"outline",size:"sm",className:"ml-auto hidden h-8 lg:flex",children:[e.jsx(Ms,{className:"mr-2 h-4 w-4"}),"编辑用户信息"]})}){const[n,r]=i.useState(!1),[l,c]=i.useState(!1),d=Z({resolver:ee(mu),defaultValues:t,mode:"onChange"}),[m,w]=i.useState([]);return i.useEffect(()=>{n&&zs().then(({data:j})=>{w(j)})},[n]),e.jsxs(ou,{open:n,onOpenChange:r,children:[e.jsx(cu,{asChild:!0,children:a}),e.jsxs(zr,{className:"max-w-[90%] space-y-4 ",children:[e.jsxs(Er,{children:[e.jsx(Lr,{children:"用户管理"}),e.jsx($r,{})]}),e.jsxs(se,{...d,children:[e.jsx(h,{control:d.control,name:"email",render:({field:j})=>e.jsxs(u,{children:[e.jsx(g,{children:"邮箱"}),e.jsx(C,{...j,placeholder:"请输入邮箱"}),e.jsx(S,{...j})]})}),e.jsx(h,{control:d.control,name:"invite_user_email",render:({field:j})=>e.jsxs(u,{children:[e.jsx(g,{children:"邀请人邮箱"}),e.jsx(C,{value:j.value||"",onChange:b=>j.onChange(b.target.value?b.target.value:null),placeholder:"请输入邮箱"}),e.jsx(S,{...j})]})}),e.jsx(h,{control:d.control,name:"password",render:({field:j})=>e.jsxs(u,{children:[e.jsx(g,{children:"密码"}),e.jsx(C,{value:j.value||"",onChange:j.onChange,placeholder:"如需修改密码请输入"}),e.jsx(S,{...j})]})}),e.jsxs("div",{className:"grid gap-2 md:grid-cols-2",children:[e.jsx(h,{control:d.control,name:"balance",render:({field:j})=>e.jsxs(u,{children:[e.jsx(g,{children:"余额"}),e.jsxs("div",{className:"flex",children:[e.jsx(C,{type:"number",value:j.value||"",onChange:j.onChange,placeholder:"请输入余额",className:"rounded-r-none"}),e.jsx("div",{className:"z-[-1] rounded-md rounded-l-none border border-l-0 border-input px-3 py-1 shadow-sm",children:"¥"})]}),e.jsx(S,{...j})]})}),e.jsx(h,{control:d.control,name:"commission_balance",render:({field:j})=>e.jsxs(u,{children:[e.jsx(g,{children:"佣金余额"}),e.jsxs("div",{className:"flex",children:[e.jsx(C,{type:"number",value:j.value||"",onChange:j.onChange,placeholder:"请输入佣金余额",className:"rounded-r-none"}),e.jsx("div",{className:"z-[-1] rounded-md rounded-l-none border border-l-0 border-input px-3 py-1 shadow-sm",children:"¥"})]}),e.jsx(S,{...j})]})}),e.jsx(h,{control:d.control,name:"u",render:({field:j})=>e.jsxs(u,{children:[e.jsx(g,{children:"已用上行"}),e.jsxs("div",{className:"flex",children:[e.jsx(C,{type:"number",value:(j.value/1024/1024/1024).toFixed(3)||"",onChange:b=>j.onChange(parseInt(b.target.value)*1024*1024*1024),placeholder:"已用上行",className:"rounded-r-none"}),e.jsx("div",{className:"z-[-1] rounded-md rounded-l-none border border-l-0 border-input px-3 py-1 shadow-sm",children:"GB"})]}),e.jsx(S,{...j})]})}),e.jsx(h,{control:d.control,name:"d",render:({field:j})=>e.jsxs(u,{children:[e.jsx(g,{children:"已用下行"}),e.jsxs("div",{className:"flex",children:[e.jsx(C,{type:"number",value:(j.value/1024/1024/1024).toFixed(3)||"",onChange:b=>j.onChange(parseInt(b.target.value)*1024*1024*1024),placeholder:"已用下行",className:"rounded-r-none"}),e.jsx("div",{className:"z-[-1] rounded-md rounded-l-none border border-l-0 border-input px-3 py-1 shadow-sm",children:"GB"})]}),e.jsx(S,{...j})]})})]}),e.jsx(h,{control:d.control,name:"transfer_enable",render:({field:j})=>e.jsxs(u,{children:[e.jsx(g,{children:"流量"}),e.jsxs("div",{className:"flex",children:[e.jsx(C,{type:"number",value:j.value/1024/1024/1024||"",onChange:b=>j.onChange(parseInt(b.target.value)*1024*1024*1024),placeholder:"请输入流量",className:"rounded-r-none "}),e.jsx("div",{className:"z-[-1] rounded-md rounded-l-none border border-l-0 border-input px-3 py-1 shadow-sm",children:"GB"})]}),e.jsx(S,{})]})}),e.jsx(h,{control:d.control,name:"expired_at",render:({field:j})=>e.jsxs(u,{className:"flex flex-col",children:[e.jsx(g,{children:"到期时间"}),e.jsxs(Be,{open:l,onOpenChange:c,children:[e.jsx(Ye,{asChild:!0,children:e.jsx(v,{children:e.jsxs(k,{type:"button",variant:"outline",className:f("w-full pl-3 text-left font-normal",!j.value&&"text-muted-foreground"),onClick:()=>c(!0),children:[j.value?X(j.value):e.jsx("span",{children:"请选择用户到期日期,留空为长期有效"}),e.jsx(yt,{className:"ml-auto h-4 w-4 opacity-50"})]})})}),e.jsx(Ke,{className:"w-auto p-0",align:"start",side:"top",sideOffset:4,onInteractOutside:b=>{b.preventDefault()},onEscapeKeyDown:b=>{b.preventDefault()},children:e.jsxs("div",{className:"flex flex-col space-y-3 p-3",children:[e.jsxs("div",{className:"flex gap-2",children:[e.jsx(k,{type:"button",variant:"outline",className:"flex-1",onClick:()=>{j.onChange(null),c(!1)},children:"长期有效"}),e.jsx(k,{type:"button",variant:"outline",className:"flex-1",onClick:()=>{const b=new Date;b.setMonth(b.getMonth()+1),b.setHours(23,59,59,999),j.onChange(Math.floor(b.getTime()/1e3)),c(!1)},children:"一个月"}),e.jsx(k,{type:"button",variant:"outline",className:"flex-1",onClick:()=>{const b=new Date;b.setMonth(b.getMonth()+3),b.setHours(23,59,59,999),j.onChange(Math.floor(b.getTime()/1e3)),c(!1)},children:"三个月"})]}),e.jsx("div",{className:"rounded-md border",children:e.jsx(et,{mode:"single",selected:j.value?new Date(j.value*1e3):void 0,onSelect:b=>{if(b){const x=new Date(j.value?j.value*1e3:Date.now());b.setHours(x.getHours(),x.getMinutes(),x.getSeconds()),j.onChange(Math.floor(b.getTime()/1e3))}},disabled:b=>b{const b=new Date;b.setHours(23,59,59,999),j.onChange(Math.floor(b.getTime()/1e3))},className:"h-6 px-2 text-xs",children:"设为当天结束"})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(C,{type:"datetime-local",step:"1",value:X(j.value,"YYYY-MM-DDTHH:mm:ss"),onChange:b=>{const x=new Date(b.target.value);isNaN(x.getTime())||j.onChange(Math.floor(x.getTime()/1e3))},className:"flex-1"}),e.jsx(k,{type:"button",variant:"outline",onClick:()=>c(!1),children:"确定"})]})]})]})})]}),e.jsx(S,{})]})}),e.jsx(h,{control:d.control,name:"plan_id",render:({field:j})=>e.jsxs(u,{children:[e.jsx(g,{children:"订阅计划"}),e.jsx(v,{children:e.jsxs(B,{value:j.value?j.value.toString():"null",onValueChange:b=>j.onChange(b==="null"?null:parseInt(b)),children:[e.jsx(U,{children:e.jsx(Y,{placeholder:"无"})}),e.jsxs(G,{children:[e.jsx(A,{value:"null",children:"无"}),m.map(b=>e.jsx(A,{value:b.id.toString(),children:b.name},b.id))]})]})})]})}),e.jsx(h,{control:d.control,name:"banned",render:({field:j})=>e.jsxs(u,{children:[e.jsx(g,{children:"账户状态"}),e.jsx(v,{children:e.jsxs(B,{value:j.value.toString(),onValueChange:b=>j.onChange(parseInt(b)),children:[e.jsx(U,{children:e.jsx(Y,{})}),e.jsxs(G,{children:[e.jsx(A,{value:"1",children:"封禁"}),e.jsx(A,{value:"0",children:"正常"})]})]})})]})}),e.jsx(h,{control:d.control,name:"commission_type",render:({field:j})=>e.jsxs(u,{children:[e.jsx(g,{children:"佣金类型"}),e.jsx(v,{children:e.jsxs(B,{value:j.value.toString(),onValueChange:b=>j.onChange(parseInt(b)),children:[e.jsx(U,{children:e.jsx(Y,{placeholder:"无"})}),e.jsxs(G,{children:[e.jsx(A,{value:"0",children:"跟随系统设置"}),e.jsx(A,{value:"1",children:"循环返利"}),e.jsx(A,{value:"2",children:"首次返利"})]})]})})]})}),e.jsx(h,{control:d.control,name:"commission_rate",render:({field:j})=>e.jsxs(u,{children:[e.jsx(g,{children:"推荐返利比例"}),e.jsxs("div",{className:"flex",children:[e.jsx(C,{type:"number",value:j.value||"",onChange:b=>j.onChange(parseInt(b.currentTarget.value)||null),placeholder:"请输入推荐返利比例(为空则跟随站点设置返利比例)",className:"rounded-r-none "}),e.jsx("div",{className:"z-[-1] rounded-md rounded-l-none border border-l-0 border-input px-3 py-1 shadow-sm",children:"%"})]}),e.jsx(S,{})]})}),e.jsx(h,{control:d.control,name:"discount",render:({field:j})=>e.jsxs(u,{children:[e.jsx(g,{children:"专享折扣比例"}),e.jsxs("div",{className:"flex",children:[e.jsx(C,{type:"number",value:j.value||"",onChange:b=>j.onChange(parseInt(b.currentTarget.value)||null),placeholder:"请输入专享折扣比例(为空则不享受专享折扣)",className:"rounded-r-none "}),e.jsx("div",{className:"z-[-1] rounded-md rounded-l-none border border-l-0 border-input px-3 py-1 shadow-sm",children:"%"})]}),e.jsx(S,{})]})}),e.jsx(h,{control:d.control,name:"speed_limit",render:({field:j})=>e.jsxs(u,{children:[e.jsx(g,{children:"限速"}),e.jsxs("div",{className:"flex",children:[e.jsx(C,{type:"number",value:j.value||"",onChange:b=>j.onChange(parseInt(b.currentTarget.value)||null),placeholder:"留空则不限速",className:"rounded-r-none "}),e.jsx("div",{className:"z-[-1] rounded-md rounded-l-none border border-l-0 border-input px-3 py-1 shadow-sm",children:"Mbps"})]}),e.jsx(S,{})]})}),e.jsx(h,{control:d.control,name:"is_admin",render:({field:j})=>e.jsxs(u,{children:[e.jsx(g,{children:"是否管理员"}),e.jsx("div",{className:"py-2",children:e.jsx(v,{children:e.jsx(O,{checked:j.value===1,onCheckedChange:b=>j.onChange(b?1:0)})})})]})}),e.jsx(h,{control:d.control,name:"is_staff",render:({field:j})=>e.jsxs(u,{children:[e.jsx(g,{children:"是否员工"}),e.jsx("div",{className:"py-2",children:e.jsx(v,{children:e.jsx(O,{checked:j.value===1,onCheckedChange:b=>j.onChange(b?1:0)})})})]})}),e.jsx(h,{control:d.control,name:"remarks",render:({field:j})=>e.jsxs(u,{children:[e.jsx(g,{children:"备注"}),e.jsx(gs,{className:"h-24",value:j.value||"",onChange:b=>j.onChange(b.currentTarget.value??null),placeholder:"请在这里记录"})]})})]}),e.jsxs(Or,{children:[e.jsx(k,{variant:"outline",onClick:()=>r(!1),children:"取消"}),e.jsx(k,{type:"submit",onClick:()=>{d.handleSubmit(j=>{ed(j).then(({data:b})=>{b&&(V.success("修改成功"),r(!1),s())}).catch(b=>{V.error("修改失败")})})()},children:"提交"})]})]})]})}const Hr=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"m17.71 11.29l-5-5a1 1 0 0 0-.33-.21a1 1 0 0 0-.76 0a1 1 0 0 0-.33.21l-5 5a1 1 0 0 0 1.42 1.42L11 9.41V17a1 1 0 0 0 2 0V9.41l3.29 3.3a1 1 0 0 0 1.42 0a1 1 0 0 0 0-1.42"})}),Kr=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M17.71 11.29a1 1 0 0 0-1.42 0L13 14.59V7a1 1 0 0 0-2 0v7.59l-3.29-3.3a1 1 0 0 0-1.42 1.42l5 5a1 1 0 0 0 .33.21a.94.94 0 0 0 .76 0a1 1 0 0 0 .33-.21l5-5a1 1 0 0 0 0-1.42"})}),uu=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M17 11H9.41l3.3-3.29a1 1 0 1 0-1.42-1.42l-5 5a1 1 0 0 0-.21.33a1 1 0 0 0 0 .76a1 1 0 0 0 .21.33l5 5a1 1 0 0 0 1.42 0a1 1 0 0 0 0-1.42L9.41 13H17a1 1 0 0 0 0-2"})}),hu=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M17.92 11.62a1 1 0 0 0-.21-.33l-5-5a1 1 0 0 0-1.42 1.42l3.3 3.29H7a1 1 0 0 0 0 2h7.59l-3.3 3.29a1 1 0 0 0 0 1.42a1 1 0 0 0 1.42 0l5-5a1 1 0 0 0 .21-.33a1 1 0 0 0 0-.76"})}),Rt=[{accessorKey:"record_at",header:"时间",cell:({row:s})=>e.jsx("div",{className:"flex items-center space-x-2",children:e.jsx("time",{className:"text-sm text-muted-foreground",children:Oo(s.original.record_at)})})},{accessorKey:"u",header:"上行流量",cell:({row:s})=>e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(Hr,{className:"h-4 w-4 text-emerald-500"}),e.jsx("span",{className:"font-mono text-sm",children:Fs(s.original.u)})]})},{accessorKey:"d",header:"下行流量",cell:({row:s})=>e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(Kr,{className:"h-4 w-4 text-blue-500"}),e.jsx("span",{className:"font-mono text-sm",children:Fs(s.original.d)})]})},{accessorKey:"server_rate",header:"倍率",cell:({row:s})=>{const t=s.original.server_rate;return e.jsx("div",{className:"flex items-center space-x-2",children:e.jsxs(E,{variant:"outline",className:"font-mono",children:[t,"x"]})})}},{id:"total",header:"总计",cell:({row:s})=>{const t=(s.original.u+s.original.d)*s.original.server_rate;return e.jsx("div",{className:"flex items-center justify-end font-mono text-sm",children:Fs(t)})}}];function qr({user_id:s,dialogTrigger:t}){const[a,n]=i.useState(!1),[r,l]=i.useState({pageIndex:0,pageSize:10}),{data:c,isLoading:d}=K({queryKey:["userStats",s,r,a],queryFn:()=>a?ad({user_id:s,pageSize:r.pageSize,page:r.pageIndex+1}):null}),m=Re({data:c?.data??[],columns:Rt,pageCount:Math.ceil((c?.total??0)/r.pageSize),state:{pagination:r},manualPagination:!0,getCoreRowModel:Me(),onPaginationChange:l});return e.jsxs(ue,{open:a,onOpenChange:n,children:[e.jsx(Pe,{asChild:!0,children:t}),e.jsxs(de,{className:"sm:max-w-[700px]",children:[e.jsx(ge,{children:e.jsx(he,{children:"流量使用记录"})}),e.jsxs("div",{className:"space-y-4",children:[e.jsx("div",{className:"rounded-md border",children:e.jsxs(Xt,{children:[e.jsx(ea,{children:m.getHeaderGroups().map(w=>e.jsx(xs,{children:w.headers.map(j=>e.jsx(ta,{className:f("h-10 px-2 text-xs",j.id==="total"&&"text-right"),children:j.isPlaceholder?null:mt(j.column.columnDef.header,j.getContext())},j.id))},w.id))}),e.jsx(sa,{children:d?Array.from({length:r.pageSize}).map((w,j)=>e.jsx(xs,{children:Array.from({length:Rt.length}).map((b,x)=>e.jsx(Is,{className:"p-2",children:e.jsx(Ve,{className:"h-6 w-full"})},x))},j)):m.getRowModel().rows?.length?m.getRowModel().rows.map(w=>e.jsx(xs,{"data-state":w.getIsSelected()&&"selected",className:"h-10",children:w.getVisibleCells().map(j=>e.jsx(Is,{className:"px-2",children:mt(j.column.columnDef.cell,j.getContext())},j.id))},w.id)):e.jsx(xs,{children:e.jsx(Is,{colSpan:Rt.length,className:"h-24 text-center",children:"暂无记录"})})})]})}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx("p",{className:"text-sm font-medium",children:"每页显示"}),e.jsxs(B,{value:`${m.getState().pagination.pageSize}`,onValueChange:w=>{m.setPageSize(Number(w))},children:[e.jsx(U,{className:"h-8 w-[70px]",children:e.jsx(Y,{placeholder:m.getState().pagination.pageSize})}),e.jsx(G,{side:"top",children:[10,20,30,40,50].map(w=>e.jsx(A,{value:`${w}`,children:w},w))})]}),e.jsx("p",{className:"text-sm font-medium",children:"条记录"})]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsxs("div",{className:"flex w-[100px] items-center justify-center text-sm",children:["第 ",m.getState().pagination.pageIndex+1," /"," ",m.getPageCount()," 页"]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(H,{variant:"outline",size:"icon",className:"h-8 w-8",onClick:()=>m.previousPage(),disabled:!m.getCanPreviousPage()||d,children:e.jsx(uu,{className:"h-4 w-4"})}),e.jsx(H,{variant:"outline",size:"icon",className:"h-8 w-8",onClick:()=>m.nextPage(),disabled:!m.getCanNextPage()||d,children:e.jsx(hu,{className:"h-4 w-4"})})]})]})]})]})]})]})}const ju=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M5 18h4.24a1 1 0 0 0 .71-.29l6.92-6.93L19.71 8a1 1 0 0 0 0-1.42l-4.24-4.29a1 1 0 0 0-1.42 0l-2.82 2.83l-6.94 6.93a1 1 0 0 0-.29.71V17a1 1 0 0 0 1 1m9.76-13.59l2.83 2.83l-1.42 1.42l-2.83-2.83ZM6 13.17l5.93-5.93l2.83 2.83L8.83 16H6ZM21 20H3a1 1 0 0 0 0 2h18a1 1 0 0 0 0-2"})}),gu=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M19 11h-6V5a1 1 0 0 0-2 0v6H5a1 1 0 0 0 0 2h6v6a1 1 0 0 0 2 0v-6h6a1 1 0 0 0 0-2"})}),fu=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M21 8.94a1.3 1.3 0 0 0-.06-.27v-.09a1 1 0 0 0-.19-.28l-6-6a1 1 0 0 0-.28-.19a.3.3 0 0 0-.09 0a.9.9 0 0 0-.33-.11H10a3 3 0 0 0-3 3v1H6a3 3 0 0 0-3 3v10a3 3 0 0 0 3 3h8a3 3 0 0 0 3-3v-1h1a3 3 0 0 0 3-3zm-6-3.53L17.59 8H16a1 1 0 0 1-1-1ZM15 19a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V9a1 1 0 0 1 1-1h1v7a3 3 0 0 0 3 3h5Zm4-4a1 1 0 0 1-1 1h-8a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h3v3a3 3 0 0 0 3 3h3Z"})}),pu=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M21 11a1 1 0 0 0-1 1a8.05 8.05 0 1 1-2.22-5.5h-2.4a1 1 0 0 0 0 2h4.53a1 1 0 0 0 1-1V3a1 1 0 0 0-2 0v1.77A10 10 0 1 0 22 12a1 1 0 0 0-1-1"})}),vu=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M9.5 10.5H12a1 1 0 0 0 0-2h-1V8a1 1 0 0 0-2 0v.55a2.5 2.5 0 0 0 .5 4.95h1a.5.5 0 0 1 0 1H8a1 1 0 0 0 0 2h1v.5a1 1 0 0 0 2 0v-.55a2.5 2.5 0 0 0-.5-4.95h-1a.5.5 0 0 1 0-1M21 12h-3V3a1 1 0 0 0-.5-.87a1 1 0 0 0-1 0l-3 1.72l-3-1.72a1 1 0 0 0-1 0l-3 1.72l-3-1.72a1 1 0 0 0-1 0A1 1 0 0 0 2 3v16a3 3 0 0 0 3 3h14a3 3 0 0 0 3-3v-6a1 1 0 0 0-1-1M5 20a1 1 0 0 1-1-1V4.73l2 1.14a1.08 1.08 0 0 0 1 0l3-1.72l3 1.72a1.08 1.08 0 0 0 1 0l2-1.14V19a3 3 0 0 0 .18 1Zm15-1a1 1 0 0 1-2 0v-5h2Z"})}),bu=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M12.3 12.22A4.92 4.92 0 0 0 14 8.5a5 5 0 0 0-10 0a4.92 4.92 0 0 0 1.7 3.72A8 8 0 0 0 1 19.5a1 1 0 0 0 2 0a6 6 0 0 1 12 0a1 1 0 0 0 2 0a8 8 0 0 0-4.7-7.28M9 11.5a3 3 0 1 1 3-3a3 3 0 0 1-3 3m9.74.32A5 5 0 0 0 15 3.5a1 1 0 0 0 0 2a3 3 0 0 1 3 3a3 3 0 0 1-1.5 2.59a1 1 0 0 0-.5.84a1 1 0 0 0 .45.86l.39.26l.13.07a7 7 0 0 1 4 6.38a1 1 0 0 0 2 0a9 9 0 0 0-4.23-7.68"})}),yu=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M12 2a10 10 0 0 0-6.88 2.77V3a1 1 0 0 0-2 0v4.5a1 1 0 0 0 1 1h4.5a1 1 0 0 0 0-2h-2.4A8 8 0 1 1 4 12a1 1 0 0 0-2 0A10 10 0 1 0 12 2m0 6a1 1 0 0 0-1 1v3a1 1 0 0 0 1 1h2a1 1 0 0 0 0-2h-1V9a1 1 0 0 0-1-1"})}),Nu=(s,t)=>[{accessorKey:"id",header:({column:a})=>e.jsx(F,{column:a,title:"ID"}),cell:({row:a})=>e.jsx(E,{variant:"outline",children:a.original.id}),enableSorting:!0,enableHiding:!1},{accessorKey:"email",header:({column:a})=>e.jsx(F,{column:a,title:"邮箱"}),cell:({row:a})=>{const n=a.original.t||0,r=Date.now()/1e3-n<120,l=Math.floor(Date.now()/1e3-n);let c=r?"当前在线":n===0?"从未在线":`最后在线时间: ${X(n)}`;if(!r&&n!==0){const d=Math.floor(l/60),m=Math.floor(d/60),w=Math.floor(m/24);w>0?c+=` +离线时长: ${w}天`:m>0?c+=` +离线时长: ${m}小时`:d>0?c+=` +离线时长: ${d}分钟`:c+=` +离线时长: ${l}秒`}return e.jsx(ce,{delayDuration:100,children:e.jsxs(ne,{children:[e.jsx(re,{children:e.jsxs("div",{className:"flex items-center gap-2.5",children:[e.jsx("div",{className:f("size-2.5 rounded-full ring-2 ring-offset-2",r?"bg-green-500 ring-green-500/20":"bg-gray-300 ring-gray-300/20","transition-all duration-300")}),e.jsx("span",{className:"font-medium text-foreground/90",children:a.original.email})]})}),e.jsx(te,{side:"bottom",className:"max-w-[280px]",children:e.jsx("p",{className:"whitespace-pre-line text-sm",children:c})})]})})},enableSorting:!1,enableHiding:!1},{accessorKey:"banned",header:({column:a})=>e.jsx(F,{column:a,title:"状态"}),cell:({row:a})=>{const n=a.original.banned;return e.jsx("div",{className:"flex justify-center",children:e.jsx(E,{className:f("min-w-20 justify-center transition-colors",n?"bg-destructive/15 text-destructive hover:bg-destructive/25":"bg-success/15 text-success hover:bg-success/25"),children:ud[n]})})},enableSorting:!0,filterFn:(a,n,r)=>r.includes(a.getValue(n))},{accessorKey:"plan.name",header:({column:a})=>e.jsx(F,{column:a,title:"订阅"}),cell:({row:a})=>e.jsx("div",{className:"min-w-[10em] break-all",children:a.original?.plan?.name||"-"}),enableSorting:!1,enableHiding:!1},{accessorKey:"group",header:({column:a})=>e.jsx(F,{column:a,title:"权限组"}),cell:({row:a})=>e.jsx("div",{className:"flex flex-wrap gap-1",children:e.jsx(E,{variant:"outline",className:f("px-2 py-0.5 font-medium","bg-secondary/50 hover:bg-secondary/70","border border-border/50","transition-all duration-200","cursor-default select-none","flex items-center gap-1.5 whitespace-nowrap"),children:a.original?.group?.name||"-"})}),enableSorting:!1,filterFn:(a,n,r)=>{const l=a.getValue(n);return r.some(c=>l?.includes(c))}},{accessorKey:"total_used",header:({column:a})=>e.jsx(F,{column:a,title:"已用流量"}),cell:({row:a})=>{const n=Fs(a.original?.total_used),r=Fs(a.original?.transfer_enable),l=a.original?.total_used/a.original?.transfer_enable*100||0;return e.jsx(ce,{delayDuration:100,children:e.jsxs(ne,{children:[e.jsx(re,{className:"w-full",children:e.jsxs("div",{className:"w-full space-y-1",children:[e.jsxs("div",{className:"flex justify-between text-sm",children:[e.jsx("span",{className:"text-muted-foreground",children:n}),e.jsxs("span",{className:"text-xs text-muted-foreground",children:[l.toFixed(1),"%"]})]}),e.jsx("div",{className:"h-1.5 w-full rounded-full bg-secondary",children:e.jsx("div",{className:f("h-full rounded-full transition-all",l>90?"bg-destructive":"bg-primary"),style:{width:`${Math.min(l,100)}%`}})})]})}),e.jsx(te,{side:"bottom",children:e.jsxs("p",{className:"text-sm",children:["总流量配额: ",r]})})]})})}},{accessorKey:"transfer_enable",header:({column:a})=>e.jsx(F,{column:a,title:"总流量"}),cell:({row:a})=>e.jsx("div",{className:"font-medium text-muted-foreground",children:Fs(a.original?.transfer_enable)})},{accessorKey:"expired_at",header:({column:a})=>e.jsx(F,{column:a,title:"到期时间"}),cell:({row:a})=>{const n=a.original.expired_at,r=Date.now()/1e3,l=n!=null&&ne.jsx(F,{column:a,title:"余额"}),cell:({row:a})=>{const n=Ts(a.original?.balance);return e.jsxs("div",{className:"flex items-center gap-1 font-medium",children:[e.jsx("span",{className:"text-sm text-muted-foreground",children:"¥"}),e.jsx("span",{className:"tabular-nums text-foreground",children:n})]})}},{accessorKey:"commission_balance",header:({column:a})=>e.jsx(F,{column:a,title:"佣金"}),cell:({row:a})=>{const n=Ts(a.original?.commission_balance);return e.jsxs("div",{className:"flex items-center gap-1 font-medium",children:[e.jsx("span",{className:"text-sm text-muted-foreground",children:"¥"}),e.jsx("span",{className:"tabular-nums text-foreground",children:n})]})}},{accessorKey:"created_at",header:({column:a})=>e.jsx(F,{column:a,title:"注册时间"}),cell:({row:a})=>e.jsx("div",{className:"truncate",children:X(a.original?.created_at)}),size:1e3},{id:"actions",header:({column:a})=>e.jsx(F,{column:a,className:"justify-end",title:"操作"}),cell:({row:a,table:n})=>e.jsxs(vs,{modal:!0,children:[e.jsx(bs,{asChild:!0,children:e.jsx("div",{className:"text-center",children:e.jsx(H,{variant:"ghost",className:"h-8 w-8 p-0 hover:bg-muted","aria-label":"打开操作菜单",children:e.jsx(ut,{className:"size-4"})})})}),e.jsxs(ms,{align:"end",className:"min-w-[40px]",children:[e.jsx(oe,{onSelect:r=>{r.preventDefault()},className:"p-0",children:e.jsx(Ar,{defaultValues:{...a.original,invite_user_email:a.original.invite_user?.email},refetch:s,dialogTrigger:e.jsxs(H,{variant:"ghost",className:"w-full justify-start px-2 py-1.5",children:[e.jsx(ju,{className:"mr-2"}),"编辑"]})})}),e.jsx(oe,{onSelect:r=>r.preventDefault(),className:"p-0",children:e.jsx(Ir,{defaultValues:{email:a.original.email},trigger:e.jsxs(H,{variant:"ghost",className:"w-full justify-start px-2 py-1.5",children:[e.jsx(gu,{className:"mr-2 "}),"分配订单"]})})}),e.jsx(oe,{onSelect:()=>{At(a.original.subscribe_url)},className:"p-0",children:e.jsxs(H,{variant:"ghost",className:"w-full justify-start px-2 py-1.5",children:[e.jsx(fu,{className:"mr-2"}),"复制订阅URL"]})}),e.jsx(oe,{onSelect:()=>{sd({id:a.original.id}).then(({data:r})=>{r&&V.success("重置成功")})},children:e.jsxs("div",{className:"flex items-center",children:[e.jsx(pu,{className:"mr-2 "}),"重置UUID及订阅URL"]})}),e.jsx(oe,{onSelect:()=>{},className:"p-0",children:e.jsxs(Ns,{className:"flex items-center px-2 py-1.5",to:`/finance/order?user_id=${a.original?.id}`,children:[e.jsx(vu,{className:"mr-2"}),"TA的订单"]})}),e.jsx(oe,{onSelect:()=>{n.setColumnFilters([{id:"invite_user_id",value:a.original?.id}])},children:e.jsxs("div",{className:"flex items-center",children:[e.jsx(bu,{className:"mr-2 "}),"TA的邀请"]})}),e.jsx(oe,{onSelect:r=>r.preventDefault(),className:"p-0",children:e.jsx(qr,{user_id:a.original?.id,dialogTrigger:e.jsxs(H,{variant:"ghost",className:"w-full justify-start px-2 py-1.5",children:[e.jsx(yu,{className:"mr-2 "}),"TA的流量记录"]})})})]})]})}];function wu(){const[s]=ro(),[t,a]=i.useState({}),[n,r]=i.useState({}),[l,c]=i.useState([]),[d,m]=i.useState([]),[w,j]=i.useState({pageIndex:0,pageSize:10});i.useEffect(()=>{const _=s.get("email");_&&c(z=>z.some(R=>R.id==="email")?z:[...z,{id:"email",value:_}])},[s]);const{refetch:b,data:x,isLoading:y}=K({queryKey:["userList",w,l,d],queryFn:()=>Xc({pageSize:w.pageSize,current:w.pageIndex+1,filter:l,sort:d})}),[D,T]=i.useState([]);i.useEffect(()=>{St().then(({data:_})=>{T(_)})},[]);const p=Re({data:x?.data??[],columns:Nu(b),state:{sorting:d,columnVisibility:n,rowSelection:t,columnFilters:l,pagination:w},rowCount:x?.total??0,manualPagination:!0,manualFiltering:!0,manualSorting:!0,enableRowSelection:!0,onRowSelectionChange:a,onSortingChange:m,onColumnFiltersChange:c,onColumnVisibilityChange:r,getCoreRowModel:Me(),getFilteredRowModel:$e(),getPaginationRowModel:Ae(),onPaginationChange:j,getSortedRowModel:He(),getFacetedRowModel:es(),getFacetedUniqueValues:ss(),initialState:{columnVisibility:{commission_balance:!1,created_at:!1},columnPinning:{right:["actions"]}}});return e.jsx(qe,{table:p,toolbar:e.jsx(iu,{table:p,refetch:b,serverGroupList:D})})}function _u(){return e.jsxs(fe,{children:[e.jsxs(pe,{children:[e.jsx(Ce,{}),e.jsxs("div",{className:"ml-auto flex items-center space-x-4",children:[e.jsx(Se,{}),e.jsx(ke,{})]})]}),e.jsxs(Ne,{className:"flex flex-col",fixedHeight:!0,children:[e.jsx("div",{className:"mb-2 flex items-center justify-between space-y-2",children:e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:"用户管理"}),e.jsx("p",{className:"mt-2 text-muted-foreground",children:"在这里可以管理用户,包括增加、删除、编辑、查询等操作。"})]})}),e.jsx("div",{className:"-mx-4 flex-1 overflow-auto px-4 py-1 lg:flex-row lg:space-x-12 lg:space-y-0",children:e.jsx("div",{className:"w-full",children:e.jsx(wu,{})})})]})]})}const Cu=Object.freeze(Object.defineProperty({__proto__:null,default:_u},Symbol.toStringTag,{value:"Module"}));function Su({column:s,title:t,options:a}){const n=new Set(s?.getFilterValue());return e.jsxs(Be,{children:[e.jsx(Ye,{asChild:!0,children:e.jsxs(H,{variant:"outline",size:"sm",className:"h-8 border-dashed",children:[e.jsx(lo,{className:"mr-2 h-4 w-4"}),t,n?.size>0&&e.jsxs(e.Fragment,{children:[e.jsx(le,{orientation:"vertical",className:"mx-2 h-4"}),e.jsx(E,{variant:"secondary",className:"rounded-sm px-1 font-normal lg:hidden",children:n.size}),e.jsx("div",{className:"hidden space-x-1 lg:flex",children:n.size>2?e.jsxs(E,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:[n.size," selected"]}):a.filter(r=>n.has(r.value)).map(r=>e.jsx(E,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:r.label},`selected-${r.value}`))})]})]})}),e.jsx(Ke,{className:"w-[200px] p-0",align:"start",children:e.jsxs(ts,{children:[e.jsx(hs,{placeholder:t}),e.jsxs(as,{children:[e.jsx(js,{children:"No results found."}),e.jsx(be,{children:a.map(r=>{const l=n.has(r.value);return e.jsxs(me,{onSelect:()=>{l?n.delete(r.value):n.add(r.value);const c=Array.from(n);s?.setFilterValue(c.length?c:void 0)},children:[e.jsx("div",{className:f("mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary",l?"bg-primary text-primary-foreground":"opacity-50 [&_svg]:invisible"),children:e.jsx(io,{className:f("h-4 w-4")})}),r.icon&&e.jsx(r.icon,{className:"mr-2 h-4 w-4 text-muted-foreground"}),e.jsx("span",{children:r.label})]},`option-${r.value}`)})}),n.size>0&&e.jsxs(e.Fragment,{children:[e.jsx(_s,{}),e.jsx(be,{children:e.jsx(me,{onSelect:()=>s?.setFilterValue(void 0),className:"justify-center text-center",children:"Clear filters"})})]})]})]})})]})}const ku=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M19 11H5a1 1 0 0 0 0 2h14a1 1 0 0 0 0-2"})});function Tu({table:s}){return e.jsx("div",{className:"flex items-center justify-between",children:e.jsxs("div",{className:"flex flex-1 flex-col-reverse items-start gap-y-2 sm:flex-row sm:items-center sm:space-x-4",children:[e.jsx(lr,{defaultValue:s.getColumn("status")?.getFilterValue(),onValueChange:t=>s.getColumn("status")?.setFilterValue(t),children:e.jsxs(Qt,{className:"grid w-full grid-cols-2",children:[e.jsx(Js,{value:"0",children:"已开始"}),e.jsx(Js,{value:"1",children:"已关闭"})]})}),s.getColumn("level")&&e.jsx(Su,{column:s.getColumn("level"),title:"优先级",options:[{label:Gs[We.LOW],value:We.LOW,icon:ku,color:"gray"},{label:Gs[We.MEDIUM],value:We.MEDIUM,icon:Hr,color:"yellow"},{label:Gs[We.HIGH],value:We.HIGH,icon:Kr,color:"red"}]})]})})}function Du(){return e.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",className:"text-foreground",children:[e.jsx("circle",{cx:"4",cy:"12",r:"2",fill:"currentColor",children:e.jsx("animate",{id:"spinner_qFRN",begin:"0;spinner_OcgL.end+0.25s",attributeName:"cy",calcMode:"spline",dur:"0.6s",values:"12;6;12",keySplines:".33,.66,.66,1;.33,0,.66,.33"})}),e.jsx("circle",{cx:"12",cy:"12",r:"2",fill:"currentColor",children:e.jsx("animate",{begin:"spinner_qFRN.begin+0.1s",attributeName:"cy",calcMode:"spline",dur:"0.6s",values:"12;6;12",keySplines:".33,.66,.66,1;.33,0,.66,.33"})}),e.jsx("circle",{cx:"20",cy:"12",r:"2",fill:"currentColor",children:e.jsx("animate",{id:"spinner_OcgL",begin:"spinner_qFRN.begin+0.2s",attributeName:"cy",calcMode:"spline",dur:"0.6s",values:"12;6;12",keySplines:".33,.66,.66,1;.33,0,.66,.33"})})]})}const Pu=ys("flex gap-2 max-w-[60%] items-end relative group",{variants:{variant:{received:"self-start",sent:"self-end flex-row-reverse"},layout:{default:"",ai:"max-w-full w-full items-center"}},defaultVariants:{variant:"received",layout:"default"}}),Ur=i.forwardRef(({className:s,variant:t,layout:a,children:n,...r},l)=>e.jsx("div",{className:f(Pu({variant:t,layout:a,className:s}),"relative group"),ref:l,...r,children:i.Children.map(n,c=>i.isValidElement(c)&&typeof c.type!="string"?i.cloneElement(c,{variant:t,layout:a}):c)}));Ur.displayName="ChatBubble";const Fu=ys("p-4",{variants:{variant:{received:"bg-secondary text-secondary-foreground rounded-r-lg rounded-tl-lg",sent:"bg-primary text-primary-foreground rounded-l-lg rounded-tr-lg"},layout:{default:"",ai:"border-t w-full rounded-none bg-transparent"}},defaultVariants:{variant:"received",layout:"default"}}),Gr=i.forwardRef(({className:s,variant:t,layout:a,isLoading:n=!1,children:r,...l},c)=>e.jsx("div",{className:f(Fu({variant:t,layout:a,className:s}),"break-words max-w-full whitespace-pre-wrap"),ref:c,...l,children:n?e.jsx("div",{className:"flex items-center space-x-2",children:e.jsx(Du,{})}):r}));Gr.displayName="ChatBubbleMessage";const Iu=i.forwardRef(({variant:s,className:t,children:a,...n},r)=>e.jsx("div",{ref:r,className:f("absolute top-1/2 -translate-y-1/2 flex opacity-0 group-hover:opacity-100 transition-opacity duration-200",s==="sent"?"-left-1 -translate-x-full flex-row-reverse":"-right-1 translate-x-full",t),...n,children:a}));Iu.displayName="ChatBubbleActionWrapper";const Br=i.forwardRef(({className:s,...t},a)=>e.jsx(gs,{autoComplete:"off",ref:a,name:"message",className:f("max-h-12 px-4 py-3 bg-background text-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 w-full rounded-md flex items-center h-16 resize-none",s),...t}));Br.displayName="ChatInput";const Yr=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"m13.41 12l4.3-4.29a1 1 0 1 0-1.42-1.42L12 10.59l-4.29-4.3a1 1 0 0 0-1.42 1.42l4.3 4.29l-4.3 4.29a1 1 0 0 0 0 1.42a1 1 0 0 0 1.42 0l4.29-4.3l4.29 4.3a1 1 0 0 0 1.42 0a1 1 0 0 0 0-1.42Z"})}),Wr=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M15.098 12.634L13 11.423V7a1 1 0 0 0-2 0v5a1 1 0 0 0 .5.866l2.598 1.5a1 1 0 1 0 1-1.732M12 2a10 10 0 1 0 10 10A10.01 10.01 0 0 0 12 2m0 18a8 8 0 1 1 8-8a8.01 8.01 0 0 1-8 8"})}),Vu=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M3.71 16.29a1 1 0 0 0-.33-.21a1 1 0 0 0-.76 0a1 1 0 0 0-.33.21a1 1 0 0 0-.21.33a1 1 0 0 0 .21 1.09a1.2 1.2 0 0 0 .33.21a.94.94 0 0 0 .76 0a1.2 1.2 0 0 0 .33-.21a1 1 0 0 0 .21-1.09a1 1 0 0 0-.21-.33M7 8h14a1 1 0 0 0 0-2H7a1 1 0 0 0 0 2m-3.29 3.29a1 1 0 0 0-1.09-.21a1.2 1.2 0 0 0-.33.21a1 1 0 0 0-.21.33a.94.94 0 0 0 0 .76a1.2 1.2 0 0 0 .21.33a1.2 1.2 0 0 0 .33.21a.94.94 0 0 0 .76 0a1.2 1.2 0 0 0 .33-.21a1.2 1.2 0 0 0 .21-.33a.94.94 0 0 0 0-.76a1 1 0 0 0-.21-.33M21 11H7a1 1 0 0 0 0 2h14a1 1 0 0 0 0-2M3.71 6.29a1 1 0 0 0-.33-.21a1 1 0 0 0-1.09.21a1.2 1.2 0 0 0-.21.33a.94.94 0 0 0 0 .76a1.2 1.2 0 0 0 .21.33a1.2 1.2 0 0 0 .33.21a1 1 0 0 0 1.09-.21a1.2 1.2 0 0 0 .21-.33a.94.94 0 0 0 0-.76a1.2 1.2 0 0 0-.21-.33M21 16H7a1 1 0 0 0 0 2h14a1 1 0 0 0 0-2"})}),Ru=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M9 12H7a1 1 0 0 0 0 2h2a1 1 0 0 0 0-2m-1-2h4a1 1 0 0 0 0-2H8a1 1 0 0 0 0 2m1 6H7a1 1 0 0 0 0 2h2a1 1 0 0 0 0-2m12-4h-3V3a1 1 0 0 0-.5-.87a1 1 0 0 0-1 0l-3 1.72l-3-1.72a1 1 0 0 0-1 0l-3 1.72l-3-1.72a1 1 0 0 0-1 0A1 1 0 0 0 2 3v16a3 3 0 0 0 3 3h14a3 3 0 0 0 3-3v-6a1 1 0 0 0-1-1M5 20a1 1 0 0 1-1-1V4.73l2 1.14a1.08 1.08 0 0 0 1 0l3-1.72l3 1.72a1.08 1.08 0 0 0 1 0l2-1.14V19a3 3 0 0 0 .18 1Zm15-1a1 1 0 0 1-2 0v-5h2Zm-6.44-2.83a.8.8 0 0 0-.18-.09a.6.6 0 0 0-.19-.06a1 1 0 0 0-.9.27A1.05 1.05 0 0 0 12 17a1 1 0 0 0 .07.38a1.2 1.2 0 0 0 .22.33a1.2 1.2 0 0 0 .33.21a.94.94 0 0 0 .76 0a1.2 1.2 0 0 0 .33-.21A1 1 0 0 0 14 17a1.05 1.05 0 0 0-.29-.71a2 2 0 0 0-.15-.12m.14-3.88a1 1 0 0 0-1.62.33A1 1 0 0 0 13 14a1 1 0 0 0 1-1a1 1 0 0 0-.08-.38a.9.9 0 0 0-.22-.33"})});function Mu(){return e.jsxs("div",{className:"flex h-full flex-col space-y-4 p-6",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(Ve,{className:"h-8 w-3/4"}),e.jsx(Ve,{className:"h-4 w-1/2"})]}),e.jsx("div",{className:"flex-1 space-y-4",children:[1,2,3].map(s=>e.jsx(Ve,{className:"h-20 w-2/3"},s))})]})}function zu({ticketId:s,dialogTrigger:t}){const a=Ze(),n=i.useRef(null),[r,l]=i.useState(!1),[c,d]=i.useState(""),[m,w]=i.useState(!1),{data:j,refetch:b,isLoading:x}=K({queryKey:["ticket",s,r],queryFn:()=>r?nd(s):Promise.resolve(null),refetchInterval:r?5e3:!1,retry:3}),y=j?.data,D=(N="smooth")=>{if(n.current){const{scrollHeight:R,clientHeight:W}=n.current;n.current.scrollTo({top:R-W,behavior:N})}};i.useEffect(()=>{if(!r)return;const N=requestAnimationFrame(()=>{D("instant"),setTimeout(()=>D(),1e3)});return()=>{cancelAnimationFrame(N)}},[r,y?.messages]);const T=async()=>{const N=c.trim();if(!(!N||m)){w(!0);try{await rd({id:s,message:N}),d(""),await b(),D()}catch(R){V.error(R instanceof Error?R.message:"回复失败")}finally{w(!1)}}},p=async()=>{try{await rr(s),V.success("工单已关闭"),await b()}catch(N){V.error(N instanceof Error?N.message:"关闭工单失败")}},_=()=>{y?.user&&a("/finance/order?user_id="+y.user.id)},z=y?.status===Ps.CLOSED;return e.jsxs(ue,{open:r,onOpenChange:l,children:[e.jsx(Pe,{asChild:!0,children:t??e.jsx(H,{variant:"outline",children:"查看工单"})}),e.jsxs(de,{className:"flex h-[90vh] max-w-4xl flex-col gap-0 p-0",children:[e.jsx(he,{}),x?e.jsx(Mu,{}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"flex flex-col space-y-4 border-b p-6",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx("h2",{className:"text-2xl font-semibold",children:y?.subject}),e.jsx(E,{variant:z?"secondary":"default",children:z?"已关闭":"处理中"}),!z&&e.jsx(Ue,{title:"确认关闭工单",description:"关闭后将无法继续回复,是否确认关闭该工单?",confirmText:"关闭工单",variant:"destructive",onConfirm:p,children:e.jsxs(H,{variant:"ghost",size:"sm",className:"gap-1 text-muted-foreground hover:text-destructive",children:[e.jsx(Yr,{className:"h-4 w-4"}),"关闭工单"]})})]}),e.jsxs("div",{className:"flex items-center space-x-4 text-sm text-muted-foreground",children:[e.jsxs("div",{className:"flex items-center space-x-1",children:[e.jsx(Zs,{className:"h-4 w-4"}),e.jsx("span",{children:y?.user?.email})]}),e.jsx(le,{orientation:"vertical",className:"h-4"}),e.jsxs("div",{className:"flex items-center space-x-1",children:[e.jsx(Wr,{className:"h-4 w-4"}),e.jsxs("span",{children:["创建于 ",X(y?.created_at)]})]}),e.jsx(le,{orientation:"vertical",className:"h-4"}),e.jsx(E,{variant:"outline",children:y?.level!=null&&Gs[y.level]})]})]}),y?.user&&e.jsxs("div",{className:"flex space-x-2",children:[e.jsx(Ar,{defaultValues:y.user,refetch:b,dialogTrigger:e.jsx(H,{variant:"outline",size:"icon",className:"h-8 w-8",title:"用户信息",children:e.jsx(Zs,{className:"h-4 w-4"})})}),e.jsx(qr,{user_id:y.user.id,dialogTrigger:e.jsx(H,{variant:"outline",size:"icon",className:"h-8 w-8",title:"流量记录",children:e.jsx(Vu,{className:"h-4 w-4"})})}),e.jsx(H,{variant:"outline",size:"icon",className:"h-8 w-8",title:"订单记录",onClick:_,children:e.jsx(Ru,{className:"h-4 w-4"})})]})]})}),e.jsx("div",{className:"flex-1 overflow-hidden",children:e.jsx("div",{ref:n,className:"h-full space-y-4 overflow-y-auto p-6",children:y?.messages?.length===0?e.jsx("div",{className:"flex h-full items-center justify-center text-muted-foreground",children:"暂无消息记录"}):y?.messages?.map(N=>e.jsx(Ur,{variant:N.is_me?"sent":"received",className:N.is_me?"ml-auto":"mr-auto",children:e.jsx(Gr,{children:e.jsxs("div",{className:"space-y-1",children:[e.jsx("div",{className:"whitespace-pre-wrap break-words",children:N.message}),e.jsx("div",{className:"text-right",children:e.jsx("time",{className:"text-[10px] text-muted-foreground",children:X(N.created_at)})})]})})},N.id))})}),e.jsx("div",{className:"border-t p-4",children:e.jsxs("div",{className:"relative flex items-center space-x-2",children:[e.jsx(Br,{disabled:z||m,placeholder:z?"工单已关闭":"请输入回复内容...",className:"flex-1 resize-none rounded-lg border bg-background p-3 focus-visible:ring-1",value:c,onChange:N=>d(N.target.value),onKeyDown:N=>{N.key==="Enter"&&!N.shiftKey&&(N.preventDefault(),T())}}),e.jsx(H,{disabled:z||m||!c.trim(),onClick:T,children:m?"发送中...":"发送"})]})})]})]})]})}const Eu=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M19 4H5a3 3 0 0 0-3 3v10a3 3 0 0 0 3 3h14a3 3 0 0 0 3-3V7a3 3 0 0 0-3-3m-.41 2l-5.88 5.88a1 1 0 0 1-1.42 0L5.41 6ZM20 17a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7.41l5.88 5.88a3 3 0 0 0 4.24 0L20 7.41Z"})}),Ou=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M21.92 11.6C19.9 6.91 16.1 4 12 4s-7.9 2.91-9.92 7.6a1 1 0 0 0 0 .8C4.1 17.09 7.9 20 12 20s7.9-2.91 9.92-7.6a1 1 0 0 0 0-.8M12 18c-3.17 0-6.17-2.29-7.9-6C5.83 8.29 8.83 6 12 6s6.17 2.29 7.9 6c-1.73 3.71-4.73 6-7.9 6m0-10a4 4 0 1 0 4 4a4 4 0 0 0-4-4m0 6a2 2 0 1 1 2-2a2 2 0 0 1-2 2"})}),Lu=s=>[{accessorKey:"id",header:({column:t})=>e.jsx(F,{column:t,title:"工单号"}),cell:({row:t})=>e.jsx(E,{variant:"outline",children:t.getValue("id")}),enableSorting:!1,enableHiding:!1},{accessorKey:"subject",header:({column:t})=>e.jsx(F,{column:t,title:"主题"}),cell:({row:t})=>e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(Eu,{className:"h-4 w-4 text-muted-foreground"}),e.jsx("span",{className:"max-w-[500px] truncate font-medium",children:t.getValue("subject")})]}),enableSorting:!1,enableHiding:!1,size:4e3},{accessorKey:"level",header:({column:t})=>e.jsx(F,{column:t,title:"优先级"}),cell:({row:t})=>{const a=t.getValue("level"),n=a===We.LOW?"default":a===We.MEDIUM?"secondary":"destructive";return e.jsx(E,{variant:n,className:"whitespace-nowrap",children:Gs[a]})},filterFn:(t,a,n)=>n.includes(t.getValue(a))},{accessorKey:"status",header:({column:t})=>e.jsx(F,{column:t,title:"状态"}),cell:({row:t})=>{const a=t.getValue("status"),n=t.original.reply_status,r=a===Ps.CLOSED?hd[Ps.CLOSED]:n===0?"已回复":"待回复",l=a===Ps.CLOSED?"default":n===0?"secondary":"destructive";return e.jsx(E,{variant:l,className:"whitespace-nowrap",children:r})}},{accessorKey:"updated_at",header:({column:t})=>e.jsx(F,{column:t,title:"最后更新"}),cell:({row:t})=>e.jsxs("div",{className:"flex items-center space-x-2 text-muted-foreground",children:[e.jsx(Wr,{className:"h-4 w-4"}),e.jsx("span",{className:"text-sm",children:X(t.getValue("updated_at"))})]}),enableSorting:!0},{accessorKey:"created_at",header:({column:t})=>e.jsx(F,{column:t,title:"创建时间"}),cell:({row:t})=>e.jsx("div",{className:"text-sm text-muted-foreground",children:X(t.getValue("created_at"))}),enableSorting:!0,meta:{isFlexGrow:!0}},{id:"actions",header:({column:t})=>e.jsx(F,{className:"justify-end",column:t,title:"操作"}),cell:({row:t})=>{const a=t.original.status!==Ps.CLOSED;return e.jsxs("div",{className:"flex items-center justify-center",children:[e.jsx(zu,{ticketId:t.original.id,dialogTrigger:e.jsx(H,{variant:"ghost",size:"icon",className:"h-8 w-8",title:"查看详情",children:e.jsx(Ou,{className:"h-4 w-4"})})}),a&&e.jsx(Ue,{title:"确认关闭工单",description:"关闭后将无法继续回复,是否确认关闭该工单?",confirmText:"关闭工单",variant:"destructive",onConfirm:async()=>{try{await rr(t.original.id),V.success("工单已关闭"),s()}catch{V.error("关闭工单失败")}},children:e.jsx(H,{variant:"ghost",size:"icon",className:"h-8 w-8",title:"关闭工单",children:e.jsx(Yr,{className:"h-4 w-4"})})})]})}}];function $u(){const[s,t]=i.useState({}),[a,n]=i.useState({}),[r,l]=i.useState([{id:"status",value:"0"}]),[c,d]=i.useState([]),[m,w]=i.useState({pageIndex:0,pageSize:10}),{refetch:j,data:b,isLoading:x}=K({queryKey:["orderList",m,r,c],queryFn:()=>nr({pageSize:m.pageSize,current:m.pageIndex+1,filter:r,sort:c})}),y=Re({data:b?.data??[],columns:Lu(j),state:{sorting:c,columnVisibility:a,rowSelection:s,columnFilters:r,pagination:m},rowCount:b?.total??0,manualPagination:!0,manualFiltering:!0,manualSorting:!0,enableRowSelection:!0,onRowSelectionChange:t,onSortingChange:d,onColumnFiltersChange:l,onColumnVisibilityChange:n,getCoreRowModel:Me(),getFilteredRowModel:$e(),getPaginationRowModel:Ae(),onPaginationChange:w,getSortedRowModel:He(),getFacetedRowModel:es(),getFacetedUniqueValues:ss(),initialState:{columnPinning:{right:["actions"]}}});return e.jsxs("div",{className:"space-y-4",children:[e.jsx(Tu,{table:y,refetch:j}),e.jsx(qe,{table:y,showPagination:!0})]})}function Au(){return e.jsxs(fe,{children:[e.jsxs(pe,{children:[e.jsx(Ce,{}),e.jsxs("div",{className:"ml-auto flex items-center space-x-4",children:[e.jsx(Se,{}),e.jsx(ke,{})]})]}),e.jsxs(Ne,{className:"flex flex-col",fixedHeight:!0,children:[e.jsx("div",{className:"mb-2 flex items-center justify-between space-y-2",children:e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:" 工单管理"}),e.jsx("p",{className:"mt-2 text-muted-foreground",children:"在这里可以查看用户工单,包括查看、回复、关闭等操作。"})]})}),e.jsx("div",{className:"-mx-4 flex-1 overflow-auto px-4 py-1 lg:flex-row lg:space-x-12 lg:space-y-0",children:e.jsx($u,{})})]})]})}const Hu=Object.freeze(Object.defineProperty({__proto__:null,default:Au},Symbol.toStringTag,{value:"Module"}));export{Bu as a,Uu as c,Gu as g,Yu as r}; diff --git a/public/assets/admin/assets/vendor.js b/public/assets/admin/assets/vendor.js index 2dede30..b91b249 100644 --- a/public/assets/admin/assets/vendor.js +++ b/public/assets/admin/assets/vendor.js @@ -1,4 +1,4 @@ -import{g as Vt,c as Yo}from"./index.js";function mI(e,t){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var gI={exports:{}},Lb={},vI={exports:{}},Ct={};/** +import{g as Pn,c as ua,a as fne,r as dne}from"./index.js";function PI(e,t){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var OI={exports:{}},ax={},kI={exports:{}},rn={};/** * @license React * react.production.min.js * @@ -6,7 +6,7 @@ import{g as Vt,c as Yo}from"./index.js";function mI(e,t){for(var n=0;n>>1,q=I[X];if(0>>1;Xi(ue,U))fei(ie,ue)?(I[X]=ie,I[fe]=U,X=fe):(I[X]=ue,I[ee]=U,X=ee);else if(fei(ie,U))I[X]=ie,I[fe]=U,X=fe;else break e}}return z}function i(I,z){var U=I.sortIndex-z.sortIndex;return U!==0?U:I.id-z.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var a=Date,u=a.now();e.unstable_now=function(){return a.now()-u}}var s=[],l=[],c=1,d=null,h=3,m=!1,g=!1,v=!1,y=typeof setTimeout=="function"?setTimeout:null,x=typeof clearTimeout=="function"?clearTimeout:null,w=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function S(I){for(var z=n(l);z!==null;){if(z.callback===null)r(l);else if(z.startTime<=I)r(l),z.sortIndex=z.expirationTime,t(s,z);else break;z=n(l)}}function A(I){if(v=!1,S(I),!g)if(n(s)!==null)g=!0,V(E);else{var z=n(l);z!==null&&j(A,z.startTime-I)}}function E(I,z){g=!1,v&&(v=!1,x(k),k=-1),m=!0;var U=h;try{for(S(z),d=n(s);d!==null&&(!(d.expirationTime>z)||I&&!B());){var X=d.callback;if(typeof X=="function"){d.callback=null,h=d.priorityLevel;var q=X(d.expirationTime<=z);z=e.unstable_now(),typeof q=="function"?d.callback=q:d===n(s)&&r(s),S(z)}else r(s);d=n(s)}if(d!==null)var G=!0;else{var ee=n(l);ee!==null&&j(A,ee.startTime-z),G=!1}return G}finally{d=null,h=U,m=!1}}var C=!1,P=null,k=-1,M=5,L=-1;function B(){return!(e.unstable_now()-LI||125X?(I.sortIndex=U,t(l,I),n(s)===null&&I===n(l)&&(v?(x(k),k=-1):v=!0,j(A,U-X))):(I.sortIndex=q,t(s,I),g||m||(g=!0,V(E))),I},e.unstable_shouldYield=B,e.unstable_wrapCallback=function(I){var z=h;return function(){var U=h;h=z;try{return I.apply(this,arguments)}finally{h=U}}}})(kI);PI.exports=kI;var fne=PI.exports;/** + */(function(e){function t(B,q){var Y=B.length;B.push(q);e:for(;0>>1,Q=B[ue];if(0>>1;uei(de,Y))Sei(ge,de)?(B[ue]=ge,B[Se]=Y,ue=Se):(B[ue]=de,B[se]=Y,ue=se);else if(Sei(ge,Y))B[ue]=ge,B[Se]=Y,ue=Se;else break e}}return q}function i(B,q){var Y=B.sortIndex-q.sortIndex;return Y!==0?Y:B.id-q.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var a=Date,u=a.now();e.unstable_now=function(){return a.now()-u}}var s=[],l=[],c=1,d=null,h=3,v=!1,g=!1,m=!1,b=typeof setTimeout=="function"?setTimeout:null,w=typeof clearTimeout=="function"?clearTimeout:null,x=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function S(B){for(var q=n(l);q!==null;){if(q.callback===null)r(l);else if(q.startTime<=B)r(l),q.sortIndex=q.expirationTime,t(s,q);else break;q=n(l)}}function A(B){if(m=!1,S(B),!g)if(n(s)!==null)g=!0,K(E);else{var q=n(l);q!==null&&V(A,q.startTime-B)}}function E(B,q){g=!1,m&&(m=!1,w(M),M=-1),v=!0;var Y=h;try{for(S(q),d=n(s);d!==null&&(!(d.expirationTime>q)||B&&!H());){var ue=d.callback;if(typeof ue=="function"){d.callback=null,h=d.priorityLevel;var Q=ue(d.expirationTime<=q);q=e.unstable_now(),typeof Q=="function"?d.callback=Q:d===n(s)&&r(s),S(q)}else r(s);d=n(s)}if(d!==null)var J=!0;else{var se=n(l);se!==null&&V(A,se.startTime-q),J=!1}return J}finally{d=null,h=Y,v=!1}}var C=!1,T=null,M=-1,F=5,U=-1;function H(){return!(e.unstable_now()-UB||125ue?(B.sortIndex=Y,t(l,B),n(s)===null&&B===n(l)&&(m?(w(M),M=-1):m=!0,V(A,Y-ue))):(B.sortIndex=Q,t(s,B),g||v||(g=!0,K(E))),B},e.unstable_shouldYield=H,e.unstable_wrapCallback=function(B){var q=h;return function(){var Y=h;h=q;try{return B.apply(this,arguments)}finally{h=Y}}}})(zI);BI.exports=zI;var $ne=BI.exports;/** * @license React * react-dom.production.min.js * @@ -30,14 +30,14 @@ import{g as Vt,c as Yo}from"./index.js";function mI(e,t){for(var n=0;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),oC=Object.prototype.hasOwnProperty,hne=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,s8={},l8={};function pne(e){return oC.call(l8,e)?!0:oC.call(s8,e)?!1:hne.test(e)?l8[e]=!0:(s8[e]=!0,!1)}function mne(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function gne(e,t,n,r){if(t===null||typeof t>"u"||mne(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function ni(e,t,n,r,i,o,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var Or={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Or[e]=new ni(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Or[t]=new ni(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Or[e]=new ni(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Or[e]=new ni(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Or[e]=new ni(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Or[e]=new ni(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Or[e]=new ni(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Or[e]=new ni(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Or[e]=new ni(e,5,!1,e.toLowerCase(),null,!1,!1)});var H6=/[\-:]([a-z])/g;function q6(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(H6,q6);Or[t]=new ni(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(H6,q6);Or[t]=new ni(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(H6,q6);Or[t]=new ni(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Or[e]=new ni(e,1,!1,e.toLowerCase(),null,!1,!1)});Or.xlinkHref=new ni("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Or[e]=new ni(e,1,!1,e.toLowerCase(),null,!0,!0)});function G6(e,t,n,r){var i=Or.hasOwnProperty(t)?Or[t]:null;(i!==null?i.type!==0:r||!(2"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),y3=Object.prototype.hasOwnProperty,Nne=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,yk={},bk={};function Fne(e){return y3.call(bk,e)?!0:y3.call(yk,e)?!1:Nne.test(e)?bk[e]=!0:(yk[e]=!0,!1)}function Lne(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function jne(e,t,n,r){if(t===null||typeof t>"u"||Lne(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Ki(e,t,n,r,i,o,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var gi={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){gi[e]=new Ki(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];gi[t]=new Ki(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){gi[e]=new Ki(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){gi[e]=new Ki(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){gi[e]=new Ki(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){gi[e]=new Ki(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){gi[e]=new Ki(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){gi[e]=new Ki(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){gi[e]=new Ki(e,5,!1,e.toLowerCase(),null,!1,!1)});var o4=/[\-:]([a-z])/g;function a4(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(o4,a4);gi[t]=new Ki(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(o4,a4);gi[t]=new Ki(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(o4,a4);gi[t]=new Ki(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){gi[e]=new Ki(e,1,!1,e.toLowerCase(),null,!1,!1)});gi.xlinkHref=new Ki("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){gi[e]=new Ki(e,1,!1,e.toLowerCase(),null,!0,!0)});function u4(e,t,n,r){var i=gi.hasOwnProperty(t)?gi[t]:null;(i!==null?i.type!==0:r||!(2u||i[a]!==o[u]){var s=` -`+i[a].replace(" at new "," at ");return e.displayName&&s.includes("")&&(s=s.replace("",e.displayName)),s}while(1<=a&&0<=u);break}}}finally{Q2=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?vp(e):""}function vne(e){switch(e.tag){case 5:return vp(e.type);case 16:return vp("Lazy");case 13:return vp("Suspense");case 19:return vp("SuspenseList");case 0:case 2:case 15:return e=J2(e.type,!1),e;case 11:return e=J2(e.type.render,!1),e;case 1:return e=J2(e.type,!0),e;default:return""}}function lC(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Ef:return"Fragment";case Cf:return"Portal";case aC:return"Profiler";case K6:return"StrictMode";case uC:return"Suspense";case sC:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case RI:return(e.displayName||"Context")+".Consumer";case MI:return(e._context.displayName||"Context")+".Provider";case Y6:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Z6:return t=e.displayName||null,t!==null?t:lC(e.type)||"Memo";case ms:t=e._payload,e=e._init;try{return lC(e(t))}catch{}}return null}function yne(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return lC(t);case 8:return t===K6?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Ws(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function $I(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function bne(e){var t=$I(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(a){r=""+a,o.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function rv(e){e._valueTracker||(e._valueTracker=bne(e))}function II(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=$I(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Oy(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function cC(e,t){var n=t.checked;return Mn({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function f8(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Ws(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function NI(e,t){t=t.checked,t!=null&&G6(e,"checked",t,!1)}function fC(e,t){NI(e,t);var n=Ws(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?dC(e,t.type,n):t.hasOwnProperty("defaultValue")&&dC(e,t.type,Ws(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function d8(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function dC(e,t,n){(t!=="number"||Oy(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var yp=Array.isArray;function Bf(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=iv.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Qp(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Tp={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},wne=["Webkit","ms","Moz","O"];Object.keys(Tp).forEach(function(e){wne.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Tp[t]=Tp[e]})});function BI(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Tp.hasOwnProperty(e)&&Tp[e]?(""+t).trim():t+"px"}function zI(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=BI(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var xne=Mn({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function mC(e,t){if(t){if(xne[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Oe(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Oe(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Oe(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Oe(62))}}function gC(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var vC=null;function X6(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var yC=null,zf=null,Uf=null;function m8(e){if(e=Rm(e)){if(typeof yC!="function")throw Error(Oe(280));var t=e.stateNode;t&&(t=Wb(t),yC(e.stateNode,e.type,t))}}function UI(e){zf?Uf?Uf.push(e):Uf=[e]:zf=e}function WI(){if(zf){var e=zf,t=Uf;if(Uf=zf=null,m8(e),t)for(e=0;e>>=0,e===0?32:31-(Rne(e)/Dne|0)|0}var ov=64,av=4194304;function bp(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function My(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,a=n&268435455;if(a!==0){var u=a&~i;u!==0?r=bp(u):(o&=a,o!==0&&(r=bp(o)))}else a=n&~i,a!==0?r=bp(a):o!==0&&(r=bp(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Tm(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-ta(t),e[t]=n}function Fne(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Rp),C8=" ",E8=!1;function lN(e,t){switch(e){case"keyup":return fre.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function cN(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Af=!1;function hre(e,t){switch(e){case"compositionend":return cN(t);case"keypress":return t.which!==32?null:(E8=!0,C8);case"textInput":return e=t.data,e===C8&&E8?null:e;default:return null}}function pre(e,t){if(Af)return e==="compositionend"||!oA&&lN(e,t)?(e=uN(),oy=nA=Cs=null,Af=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=k8(n)}}function pN(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?pN(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function mN(){for(var e=window,t=Oy();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Oy(e.document)}return t}function aA(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Sre(e){var t=mN(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&pN(n.ownerDocument.documentElement,n)){if(r!==null&&aA(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=T8(n,o);var a=T8(n,r);i&&a&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Of=null,CC=null,$p=null,EC=!1;function M8(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;EC||Of==null||Of!==Oy(r)||(r=Of,"selectionStart"in r&&aA(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),$p&&i0($p,r)||($p=r,r=$y(CC,"onSelect"),0Tf||(e.current=MC[Tf],MC[Tf]=null,Tf--)}function fn(e,t){Tf++,MC[Tf]=e.current,e.current=t}var Vs={},zr=rl(Vs),vi=rl(!1),ic=Vs;function ad(e,t){var n=e.type.contextTypes;if(!n)return Vs;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function yi(e){return e=e.childContextTypes,e!=null}function Ny(){wn(vi),wn(zr)}function L8(e,t,n){if(zr.current!==Vs)throw Error(Oe(168));fn(zr,t),fn(vi,n)}function CN(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(Oe(108,yne(e)||"Unknown",i));return Mn({},n,r)}function Fy(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Vs,ic=zr.current,fn(zr,e),fn(vi,vi.current),!0}function j8(e,t,n){var r=e.stateNode;if(!r)throw Error(Oe(169));n?(e=CN(e,t,ic),r.__reactInternalMemoizedMergedChildContext=e,wn(vi),wn(zr),fn(zr,e)):wn(vi),fn(vi,n)}var pu=null,Vb=!1,h_=!1;function EN(e){pu===null?pu=[e]:pu.push(e)}function Ire(e){Vb=!0,EN(e)}function il(){if(!h_&&pu!==null){h_=!0;var e=0,t=Kt;try{var n=pu;for(Kt=1;e>=a,i-=a,gu=1<<32-ta(t)+i|n<k?(M=P,P=null):M=P.sibling;var L=h(x,P,S[k],A);if(L===null){P===null&&(P=M);break}e&&P&&L.alternate===null&&t(x,P),w=o(L,w,k),C===null?E=L:C.sibling=L,C=L,P=M}if(k===S.length)return n(x,P),Cn&&Tl(x,k),E;if(P===null){for(;kk?(M=P,P=null):M=P.sibling;var B=h(x,P,L.value,A);if(B===null){P===null&&(P=M);break}e&&P&&B.alternate===null&&t(x,P),w=o(B,w,k),C===null?E=B:C.sibling=B,C=B,P=M}if(L.done)return n(x,P),Cn&&Tl(x,k),E;if(P===null){for(;!L.done;k++,L=S.next())L=d(x,L.value,A),L!==null&&(w=o(L,w,k),C===null?E=L:C.sibling=L,C=L);return Cn&&Tl(x,k),E}for(P=r(x,P);!L.done;k++,L=S.next())L=m(P,x,k,L.value,A),L!==null&&(e&&L.alternate!==null&&P.delete(L.key===null?k:L.key),w=o(L,w,k),C===null?E=L:C.sibling=L,C=L);return e&&P.forEach(function(F){return t(x,F)}),Cn&&Tl(x,k),E}function y(x,w,S,A){if(typeof S=="object"&&S!==null&&S.type===Ef&&S.key===null&&(S=S.props.children),typeof S=="object"&&S!==null){switch(S.$$typeof){case nv:e:{for(var E=S.key,C=w;C!==null;){if(C.key===E){if(E=S.type,E===Ef){if(C.tag===7){n(x,C.sibling),w=i(C,S.props.children),w.return=x,x=w;break e}}else if(C.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===ms&&U8(E)===C.type){n(x,C.sibling),w=i(C,S.props),w.ref=Vh(x,C,S),w.return=x,x=w;break e}n(x,C);break}else t(x,C);C=C.sibling}S.type===Ef?(w=Ql(S.props.children,x.mode,A,S.key),w.return=x,x=w):(A=hy(S.type,S.key,S.props,null,x.mode,A),A.ref=Vh(x,w,S),A.return=x,x=A)}return a(x);case Cf:e:{for(C=S.key;w!==null;){if(w.key===C)if(w.tag===4&&w.stateNode.containerInfo===S.containerInfo&&w.stateNode.implementation===S.implementation){n(x,w.sibling),w=i(w,S.children||[]),w.return=x,x=w;break e}else{n(x,w);break}else t(x,w);w=w.sibling}w=x_(S,x.mode,A),w.return=x,x=w}return a(x);case ms:return C=S._init,y(x,w,C(S._payload),A)}if(yp(S))return g(x,w,S,A);if(jh(S))return v(x,w,S,A);hv(x,S)}return typeof S=="string"&&S!==""||typeof S=="number"?(S=""+S,w!==null&&w.tag===6?(n(x,w.sibling),w=i(w,S),w.return=x,x=w):(n(x,w),w=w_(S,x.mode,A),w.return=x,x=w),a(x)):n(x,w)}return y}var sd=kN(!0),TN=kN(!1),By=rl(null),zy=null,Df=null,cA=null;function fA(){cA=Df=zy=null}function dA(e){var t=By.current;wn(By),e._currentValue=t}function $C(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Vf(e,t){zy=e,cA=Df=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(pi=!0),e.firstContext=null)}function Oo(e){var t=e._currentValue;if(cA!==e)if(e={context:e,memoizedValue:t,next:null},Df===null){if(zy===null)throw Error(Oe(308));Df=e,zy.dependencies={lanes:0,firstContext:e}}else Df=Df.next=e;return t}var zl=null;function hA(e){zl===null?zl=[e]:zl.push(e)}function MN(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,hA(t)):(n.next=i.next,i.next=n),t.interleaved=n,ku(e,r)}function ku(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var gs=!1;function pA(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function RN(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function xu(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Fs(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Nt&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,ku(e,n)}return i=r.interleaved,i===null?(t.next=t,hA(r)):(t.next=i.next,i.next=t),r.interleaved=t,ku(e,n)}function uy(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,J6(e,n)}}function W8(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?i=o=a:o=o.next=a,n=n.next}while(n!==null);o===null?i=o=t:o=o.next=t}else i=o=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Uy(e,t,n,r){var i=e.updateQueue;gs=!1;var o=i.firstBaseUpdate,a=i.lastBaseUpdate,u=i.shared.pending;if(u!==null){i.shared.pending=null;var s=u,l=s.next;s.next=null,a===null?o=l:a.next=l,a=s;var c=e.alternate;c!==null&&(c=c.updateQueue,u=c.lastBaseUpdate,u!==a&&(u===null?c.firstBaseUpdate=l:u.next=l,c.lastBaseUpdate=s))}if(o!==null){var d=i.baseState;a=0,c=l=s=null,u=o;do{var h=u.lane,m=u.eventTime;if((r&h)===h){c!==null&&(c=c.next={eventTime:m,lane:0,tag:u.tag,payload:u.payload,callback:u.callback,next:null});e:{var g=e,v=u;switch(h=t,m=n,v.tag){case 1:if(g=v.payload,typeof g=="function"){d=g.call(m,d,h);break e}d=g;break e;case 3:g.flags=g.flags&-65537|128;case 0:if(g=v.payload,h=typeof g=="function"?g.call(m,d,h):g,h==null)break e;d=Mn({},d,h);break e;case 2:gs=!0}}u.callback!==null&&u.lane!==0&&(e.flags|=64,h=i.effects,h===null?i.effects=[u]:h.push(u))}else m={eventTime:m,lane:h,tag:u.tag,payload:u.payload,callback:u.callback,next:null},c===null?(l=c=m,s=d):c=c.next=m,a|=h;if(u=u.next,u===null){if(u=i.shared.pending,u===null)break;h=u,u=h.next,h.next=null,i.lastBaseUpdate=h,i.shared.pending=null}}while(!0);if(c===null&&(s=d),i.baseState=s,i.firstBaseUpdate=l,i.lastBaseUpdate=c,t=i.shared.interleaved,t!==null){i=t;do a|=i.lane,i=i.next;while(i!==t)}else o===null&&(i.shared.lanes=0);uc|=a,e.lanes=a,e.memoizedState=d}}function V8(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=m_.transition;m_.transition={};try{e(!1),t()}finally{Kt=n,m_.transition=r}}function YN(){return Po().memoizedState}function jre(e,t,n){var r=js(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},ZN(e))XN(t,n);else if(n=MN(e,t,n,r),n!==null){var i=Jr();na(n,e,r,i),QN(n,t,r)}}function Bre(e,t,n){var r=js(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(ZN(e))XN(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var a=t.lastRenderedState,u=o(a,n);if(i.hasEagerState=!0,i.eagerState=u,aa(u,a)){var s=t.interleaved;s===null?(i.next=i,hA(t)):(i.next=s.next,s.next=i),t.interleaved=i;return}}catch{}finally{}n=MN(e,t,i,r),n!==null&&(i=Jr(),na(n,e,r,i),QN(n,t,r))}}function ZN(e){var t=e.alternate;return e===Tn||t!==null&&t===Tn}function XN(e,t){Ip=Vy=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function QN(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,J6(e,n)}}var Hy={readContext:Oo,useCallback:Mr,useContext:Mr,useEffect:Mr,useImperativeHandle:Mr,useInsertionEffect:Mr,useLayoutEffect:Mr,useMemo:Mr,useReducer:Mr,useRef:Mr,useState:Mr,useDebugValue:Mr,useDeferredValue:Mr,useTransition:Mr,useMutableSource:Mr,useSyncExternalStore:Mr,useId:Mr,unstable_isNewReconciler:!1},zre={readContext:Oo,useCallback:function(e,t){return Ca().memoizedState=[e,t===void 0?null:t],e},useContext:Oo,useEffect:q8,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,ly(4194308,4,VN.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ly(4194308,4,e,t)},useInsertionEffect:function(e,t){return ly(4,2,e,t)},useMemo:function(e,t){var n=Ca();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Ca();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=jre.bind(null,Tn,e),[r.memoizedState,e]},useRef:function(e){var t=Ca();return e={current:e},t.memoizedState=e},useState:H8,useDebugValue:_A,useDeferredValue:function(e){return Ca().memoizedState=e},useTransition:function(){var e=H8(!1),t=e[0];return e=Lre.bind(null,e[1]),Ca().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Tn,i=Ca();if(Cn){if(n===void 0)throw Error(Oe(407));n=n()}else{if(n=t(),pr===null)throw Error(Oe(349));ac&30||NN(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,q8(LN.bind(null,r,o,e),[e]),r.flags|=2048,d0(9,FN.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=Ca(),t=pr.identifierPrefix;if(Cn){var n=vu,r=gu;n=(r&~(1<<32-ta(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=c0++,0")&&(s=s.replace("",e.displayName)),s}while(1<=a&&0<=u);break}}}finally{h_=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Up(e):""}function Bne(e){switch(e.tag){case 5:return Up(e.type);case 16:return Up("Lazy");case 13:return Up("Suspense");case 19:return Up("SuspenseList");case 0:case 2:case 15:return e=p_(e.type,!1),e;case 11:return e=p_(e.type.render,!1),e;case 1:return e=p_(e.type,!0),e;default:return""}}function _3(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Xf:return"Fragment";case Zf:return"Portal";case b3:return"Profiler";case s4:return"StrictMode";case x3:return"Suspense";case w3:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case VI:return(e.displayName||"Context")+".Consumer";case WI:return(e._context.displayName||"Context")+".Provider";case l4:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case c4:return t=e.displayName||null,t!==null?t:_3(e.type)||"Memo";case qs:t=e._payload,e=e._init;try{return _3(e(t))}catch{}}return null}function zne(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return _3(t);case 8:return t===s4?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function xl(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function qI(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Une(e){var t=qI(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(a){r=""+a,o.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Cm(e){e._valueTracker||(e._valueTracker=Une(e))}function KI(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=qI(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function qy(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function S3(e,t){var n=t.checked;return hr({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function wk(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=xl(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function GI(e,t){t=t.checked,t!=null&&u4(e,"checked",t,!1)}function C3(e,t){GI(e,t);var n=xl(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?E3(e,t.type,n):t.hasOwnProperty("defaultValue")&&E3(e,t.type,xl(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function _k(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function E3(e,t,n){(t!=="number"||qy(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Wp=Array.isArray;function dd(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=Em.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function w0(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Jp={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Wne=["Webkit","ms","Moz","O"];Object.keys(Jp).forEach(function(e){Wne.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Jp[t]=Jp[e]})});function QI(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Jp.hasOwnProperty(e)&&Jp[e]?(""+t).trim():t+"px"}function JI(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=QI(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var Vne=hr({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function O3(e,t){if(t){if(Vne[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Ve(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Ve(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Ve(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Ve(62))}}function k3(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var T3=null;function f4(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var M3=null,hd=null,pd=null;function Ek(e){if(e=eg(e)){if(typeof M3!="function")throw Error(Ve(280));var t=e.stateNode;t&&(t=fx(t),M3(e.stateNode,e.type,t))}}function eN(e){hd?pd?pd.push(e):pd=[e]:hd=e}function tN(){if(hd){var e=hd,t=pd;if(pd=hd=null,Ek(e),t)for(e=0;e>>=0,e===0?32:31-(tre(e)/nre|0)|0}var Am=64,Pm=4194304;function Vp(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Zy(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,a=n&268435455;if(a!==0){var u=a&~i;u!==0?r=Vp(u):(o&=a,o!==0&&(r=Vp(o)))}else a=n&~i,a!==0?r=Vp(a):o!==0&&(r=Vp(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Qv(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-za(t),e[t]=n}function are(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=t0),$k=" ",Ik=!1;function wN(e,t){switch(e){case"keyup":return $re.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function _N(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Qf=!1;function Nre(e,t){switch(e){case"compositionend":return _N(t);case"keypress":return t.which!==32?null:(Ik=!0,$k);case"textInput":return e=t.data,e===$k&&Ik?null:e;default:return null}}function Fre(e,t){if(Qf)return e==="compositionend"||!b4&&wN(e,t)?(e=bN(),Cy=g4=tl=null,Qf=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=jk(n)}}function AN(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?AN(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function PN(){for(var e=window,t=qy();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=qy(e.document)}return t}function x4(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function qre(e){var t=PN(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&AN(n.ownerDocument.documentElement,n)){if(r!==null&&x4(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=Bk(n,o);var a=Bk(n,r);i&&a&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Jf=null,F3=null,r0=null,L3=!1;function zk(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;L3||Jf==null||Jf!==qy(r)||(r=Jf,"selectionStart"in r&&x4(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),r0&&P0(r0,r)||(r0=r,r=Jy(F3,"onSelect"),0nd||(e.current=V3[nd],V3[nd]=null,nd--)}function Wn(e,t){nd++,V3[nd]=e.current,e.current=t}var wl={},Di=$l(wl),uo=$l(!1),Mc=wl;function Dd(e,t){var n=e.type.contextTypes;if(!n)return wl;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function so(e){return e=e.childContextTypes,e!=null}function t1(){tr(uo),tr(Di)}function Gk(e,t,n){if(Di.current!==wl)throw Error(Ve(168));Wn(Di,t),Wn(uo,n)}function NN(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(Ve(108,zne(e)||"Unknown",i));return hr({},n,r)}function n1(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||wl,Mc=Di.current,Wn(Di,e),Wn(uo,uo.current),!0}function Yk(e,t,n){var r=e.stateNode;if(!r)throw Error(Ve(169));n?(e=NN(e,t,Mc),r.__reactInternalMemoizedMergedChildContext=e,tr(uo),tr(Di),Wn(Di,e)):tr(uo),Wn(uo,n)}var Xu=null,dx=!1,O_=!1;function FN(e){Xu===null?Xu=[e]:Xu.push(e)}function iie(e){dx=!0,FN(e)}function Il(){if(!O_&&Xu!==null){O_=!0;var e=0,t=Mn;try{var n=Xu;for(Mn=1;e>=a,i-=a,Ju=1<<32-za(t)+i|n<M?(F=T,T=null):F=T.sibling;var U=h(w,T,S[M],A);if(U===null){T===null&&(T=F);break}e&&T&&U.alternate===null&&t(w,T),x=o(U,x,M),C===null?E=U:C.sibling=U,C=U,T=F}if(M===S.length)return n(w,T),ir&&rc(w,M),E;if(T===null){for(;MM?(F=T,T=null):F=T.sibling;var H=h(w,T,U.value,A);if(H===null){T===null&&(T=F);break}e&&T&&H.alternate===null&&t(w,T),x=o(H,x,M),C===null?E=H:C.sibling=H,C=H,T=F}if(U.done)return n(w,T),ir&&rc(w,M),E;if(T===null){for(;!U.done;M++,U=S.next())U=d(w,U.value,A),U!==null&&(x=o(U,x,M),C===null?E=U:C.sibling=U,C=U);return ir&&rc(w,M),E}for(T=r(w,T);!U.done;M++,U=S.next())U=v(T,w,M,U.value,A),U!==null&&(e&&U.alternate!==null&&T.delete(U.key===null?M:U.key),x=o(U,x,M),C===null?E=U:C.sibling=U,C=U);return e&&T.forEach(function(W){return t(w,W)}),ir&&rc(w,M),E}function b(w,x,S,A){if(typeof S=="object"&&S!==null&&S.type===Xf&&S.key===null&&(S=S.props.children),typeof S=="object"&&S!==null){switch(S.$$typeof){case Sm:e:{for(var E=S.key,C=x;C!==null;){if(C.key===E){if(E=S.type,E===Xf){if(C.tag===7){n(w,C.sibling),x=i(C,S.props.children),x.return=w,w=x;break e}}else if(C.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===qs&&Qk(E)===C.type){n(w,C.sibling),x=i(C,S.props),x.ref=mp(w,C,S),x.return=w,w=x;break e}n(w,C);break}else t(w,C);C=C.sibling}S.type===Xf?(x=Ec(S.props.children,w.mode,A,S.key),x.return=w,w=x):(A=Ry(S.type,S.key,S.props,null,w.mode,A),A.ref=mp(w,x,S),A.return=w,w=A)}return a(w);case Zf:e:{for(C=S.key;x!==null;){if(x.key===C)if(x.tag===4&&x.stateNode.containerInfo===S.containerInfo&&x.stateNode.implementation===S.implementation){n(w,x.sibling),x=i(x,S.children||[]),x.return=w,w=x;break e}else{n(w,x);break}else t(w,x);x=x.sibling}x=N_(S,w.mode,A),x.return=w,w=x}return a(w);case qs:return C=S._init,b(w,x,C(S._payload),A)}if(Wp(S))return g(w,x,S,A);if(dp(S))return m(w,x,S,A);$m(w,S)}return typeof S=="string"&&S!==""||typeof S=="number"?(S=""+S,x!==null&&x.tag===6?(n(w,x.sibling),x=i(x,S),x.return=w,w=x):(n(w,x),x=I_(S,w.mode,A),x.return=w,w=x),a(w)):n(w,x)}return b}var Id=zN(!0),UN=zN(!1),o1=$l(null),a1=null,od=null,C4=null;function E4(){C4=od=a1=null}function A4(e){var t=o1.current;tr(o1),e._currentValue=t}function K3(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function gd(e,t){a1=e,C4=od=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(io=!0),e.firstContext=null)}function ha(e){var t=e._currentValue;if(C4!==e)if(e={context:e,memoizedValue:t,next:null},od===null){if(a1===null)throw Error(Ve(308));od=e,a1.dependencies={lanes:0,firstContext:e}}else od=od.next=e;return t}var pc=null;function P4(e){pc===null?pc=[e]:pc.push(e)}function WN(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,P4(t)):(n.next=i.next,i.next=n),t.interleaved=n,ds(e,r)}function ds(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Ks=!1;function O4(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function VN(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function is(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function pl(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,vn&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,ds(e,n)}return i=r.interleaved,i===null?(t.next=t,P4(r)):(t.next=i.next,i.next=t),r.interleaved=t,ds(e,n)}function Ay(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,h4(e,n)}}function Jk(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?i=o=a:o=o.next=a,n=n.next}while(n!==null);o===null?i=o=t:o=o.next=t}else i=o=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function u1(e,t,n,r){var i=e.updateQueue;Ks=!1;var o=i.firstBaseUpdate,a=i.lastBaseUpdate,u=i.shared.pending;if(u!==null){i.shared.pending=null;var s=u,l=s.next;s.next=null,a===null?o=l:a.next=l,a=s;var c=e.alternate;c!==null&&(c=c.updateQueue,u=c.lastBaseUpdate,u!==a&&(u===null?c.firstBaseUpdate=l:u.next=l,c.lastBaseUpdate=s))}if(o!==null){var d=i.baseState;a=0,c=l=s=null,u=o;do{var h=u.lane,v=u.eventTime;if((r&h)===h){c!==null&&(c=c.next={eventTime:v,lane:0,tag:u.tag,payload:u.payload,callback:u.callback,next:null});e:{var g=e,m=u;switch(h=t,v=n,m.tag){case 1:if(g=m.payload,typeof g=="function"){d=g.call(v,d,h);break e}d=g;break e;case 3:g.flags=g.flags&-65537|128;case 0:if(g=m.payload,h=typeof g=="function"?g.call(v,d,h):g,h==null)break e;d=hr({},d,h);break e;case 2:Ks=!0}}u.callback!==null&&u.lane!==0&&(e.flags|=64,h=i.effects,h===null?i.effects=[u]:h.push(u))}else v={eventTime:v,lane:h,tag:u.tag,payload:u.payload,callback:u.callback,next:null},c===null?(l=c=v,s=d):c=c.next=v,a|=h;if(u=u.next,u===null){if(u=i.shared.pending,u===null)break;h=u,u=h.next,h.next=null,i.lastBaseUpdate=h,i.shared.pending=null}}while(!0);if(c===null&&(s=d),i.baseState=s,i.firstBaseUpdate=l,i.lastBaseUpdate=c,t=i.shared.interleaved,t!==null){i=t;do a|=i.lane,i=i.next;while(i!==t)}else o===null&&(i.shared.lanes=0);$c|=a,e.lanes=a,e.memoizedState=d}}function eT(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=T_.transition;T_.transition={};try{e(!1),t()}finally{Mn=n,T_.transition=r}}function uF(){return pa().memoizedState}function sie(e,t,n){var r=gl(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},sF(e))lF(t,n);else if(n=WN(e,t,n,r),n!==null){var i=Vi();Ua(n,e,r,i),cF(n,t,r)}}function lie(e,t,n){var r=gl(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(sF(e))lF(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var a=t.lastRenderedState,u=o(a,n);if(i.hasEagerState=!0,i.eagerState=u,qa(u,a)){var s=t.interleaved;s===null?(i.next=i,P4(t)):(i.next=s.next,s.next=i),t.interleaved=i;return}}catch{}finally{}n=WN(e,t,i,r),n!==null&&(i=Vi(),Ua(n,e,r,i),cF(n,t,r))}}function sF(e){var t=e.alternate;return e===dr||t!==null&&t===dr}function lF(e,t){i0=l1=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function cF(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,h4(e,n)}}var c1={readContext:ha,useCallback:Si,useContext:Si,useEffect:Si,useImperativeHandle:Si,useInsertionEffect:Si,useLayoutEffect:Si,useMemo:Si,useReducer:Si,useRef:Si,useState:Si,useDebugValue:Si,useDeferredValue:Si,useTransition:Si,useMutableSource:Si,useSyncExternalStore:Si,useId:Si,unstable_isNewReconciler:!1},cie={readContext:ha,useCallback:function(e,t){return su().memoizedState=[e,t===void 0?null:t],e},useContext:ha,useEffect:nT,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Oy(4194308,4,nF.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Oy(4194308,4,e,t)},useInsertionEffect:function(e,t){return Oy(4,2,e,t)},useMemo:function(e,t){var n=su();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=su();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=sie.bind(null,dr,e),[r.memoizedState,e]},useRef:function(e){var t=su();return e={current:e},t.memoizedState=e},useState:tT,useDebugValue:N4,useDeferredValue:function(e){return su().memoizedState=e},useTransition:function(){var e=tT(!1),t=e[0];return e=uie.bind(null,e[1]),su().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=dr,i=su();if(ir){if(n===void 0)throw Error(Ve(407));n=n()}else{if(n=t(),ti===null)throw Error(Ve(349));Dc&30||GN(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,nT(ZN.bind(null,r,o,e),[e]),r.flags|=2048,I0(9,YN.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=su(),t=ti.identifierPrefix;if(ir){var n=es,r=Ju;n=(r&~(1<<32-za(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=D0++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[Ea]=t,e[u0]=r,sF(e,t,!1,!1),t.stateNode=e;e:{switch(a=gC(n,r),n){case"dialog":vn("cancel",e),vn("close",e),i=r;break;case"iframe":case"object":case"embed":vn("load",e),i=r;break;case"video":case"audio":for(i=0;ifd&&(t.flags|=128,r=!0,Hh(o,!1),t.lanes=4194304)}else{if(!r)if(e=Wy(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Hh(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!Cn)return Rr(t),null}else 2*zn()-o.renderingStartTime>fd&&n!==1073741824&&(t.flags|=128,r=!0,Hh(o,!1),t.lanes=4194304);o.isBackwards?(a.sibling=t.child,t.child=a):(n=o.last,n!==null?n.sibling=a:t.child=a,o.last=a)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=zn(),t.sibling=null,n=Pn.current,fn(Pn,r?n&1|2:n&1),t):(Rr(t),null);case 22:case 23:return PA(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Ni&1073741824&&(Rr(t),t.subtreeFlags&6&&(t.flags|=8192)):Rr(t),null;case 24:return null;case 25:return null}throw Error(Oe(156,t.tag))}function Yre(e,t){switch(sA(t),t.tag){case 1:return yi(t.type)&&Ny(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ld(),wn(vi),wn(zr),vA(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return gA(t),null;case 13:if(wn(Pn),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Oe(340));ud()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return wn(Pn),null;case 4:return ld(),null;case 10:return dA(t.type._context),null;case 22:case 23:return PA(),null;case 24:return null;default:return null}}var mv=!1,Nr=!1,Zre=typeof WeakSet=="function"?WeakSet:Set,Be=null;function $f(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){$n(e,t,r)}else n.current=null}function WC(e,t,n){try{n()}catch(r){$n(e,t,r)}}var rT=!1;function Xre(e,t){if(AC=Ry,e=mN(),aA(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var a=0,u=-1,s=-1,l=0,c=0,d=e,h=null;t:for(;;){for(var m;d!==n||i!==0&&d.nodeType!==3||(u=a+i),d!==o||r!==0&&d.nodeType!==3||(s=a+r),d.nodeType===3&&(a+=d.nodeValue.length),(m=d.firstChild)!==null;)h=d,d=m;for(;;){if(d===e)break t;if(h===n&&++l===i&&(u=a),h===o&&++c===r&&(s=a),(m=d.nextSibling)!==null)break;d=h,h=d.parentNode}d=m}n=u===-1||s===-1?null:{start:u,end:s}}else n=null}n=n||{start:0,end:0}}else n=null;for(OC={focusedElem:e,selectionRange:n},Ry=!1,Be=t;Be!==null;)if(t=Be,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Be=e;else for(;Be!==null;){t=Be;try{var g=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var v=g.memoizedProps,y=g.memoizedState,x=t.stateNode,w=x.getSnapshotBeforeUpdate(t.elementType===t.type?v:Uo(t.type,v),y);x.__reactInternalSnapshotBeforeUpdate=w}break;case 3:var S=t.stateNode.containerInfo;S.nodeType===1?S.textContent="":S.nodeType===9&&S.documentElement&&S.removeChild(S.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Oe(163))}}catch(A){$n(t,t.return,A)}if(e=t.sibling,e!==null){e.return=t.return,Be=e;break}Be=t.return}return g=rT,rT=!1,g}function Np(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&WC(t,n,o)}i=i.next}while(i!==r)}}function Gb(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function VC(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function fF(e){var t=e.alternate;t!==null&&(e.alternate=null,fF(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Ea],delete t[u0],delete t[TC],delete t[Dre],delete t[$re])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function dF(e){return e.tag===5||e.tag===3||e.tag===4}function iT(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||dF(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function HC(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Iy));else if(r!==4&&(e=e.child,e!==null))for(HC(e,t,n),e=e.sibling;e!==null;)HC(e,t,n),e=e.sibling}function qC(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(qC(e,t,n),e=e.sibling;e!==null;)qC(e,t,n),e=e.sibling}var Sr=null,Wo=!1;function ss(e,t,n){for(n=n.child;n!==null;)hF(e,t,n),n=n.sibling}function hF(e,t,n){if(Da&&typeof Da.onCommitFiberUnmount=="function")try{Da.onCommitFiberUnmount(jb,n)}catch{}switch(n.tag){case 5:Nr||$f(n,t);case 6:var r=Sr,i=Wo;Sr=null,ss(e,t,n),Sr=r,Wo=i,Sr!==null&&(Wo?(e=Sr,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Sr.removeChild(n.stateNode));break;case 18:Sr!==null&&(Wo?(e=Sr,n=n.stateNode,e.nodeType===8?d_(e.parentNode,n):e.nodeType===1&&d_(e,n),n0(e)):d_(Sr,n.stateNode));break;case 4:r=Sr,i=Wo,Sr=n.stateNode.containerInfo,Wo=!0,ss(e,t,n),Sr=r,Wo=i;break;case 0:case 11:case 14:case 15:if(!Nr&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,a=o.destroy;o=o.tag,a!==void 0&&(o&2||o&4)&&WC(n,t,a),i=i.next}while(i!==r)}ss(e,t,n);break;case 1:if(!Nr&&($f(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(u){$n(n,t,u)}ss(e,t,n);break;case 21:ss(e,t,n);break;case 22:n.mode&1?(Nr=(r=Nr)||n.memoizedState!==null,ss(e,t,n),Nr=r):ss(e,t,n);break;default:ss(e,t,n)}}function oT(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Zre),t.forEach(function(r){var i=aie.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function jo(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=a),r&=~o}if(r=i,r=zn()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Jre(r/1960))-r,10e?16:e,Es===null)var r=!1;else{if(e=Es,Es=null,Ky=0,Nt&6)throw Error(Oe(331));var i=Nt;for(Nt|=4,Be=e.current;Be!==null;){var o=Be,a=o.child;if(Be.flags&16){var u=o.deletions;if(u!==null){for(var s=0;szn()-AA?Xl(e,0):EA|=n),bi(e,t)}function xF(e,t){t===0&&(e.mode&1?(t=av,av<<=1,!(av&130023424)&&(av=4194304)):t=1);var n=Jr();e=ku(e,t),e!==null&&(Tm(e,t,n),bi(e,n))}function oie(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),xF(e,n)}function aie(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(Oe(314))}r!==null&&r.delete(t),xF(e,n)}var _F;_F=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||vi.current)pi=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return pi=!1,Gre(e,t,n);pi=!!(e.flags&131072)}else pi=!1,Cn&&t.flags&1048576&&AN(t,jy,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;cy(e,t),e=t.pendingProps;var i=ad(t,zr.current);Vf(t,n),i=bA(null,t,r,e,i,n);var o=wA();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,yi(r)?(o=!0,Fy(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,pA(t),i.updater=qb,t.stateNode=i,i._reactInternals=t,NC(t,r,e,n),t=jC(null,t,r,!0,o,n)):(t.tag=0,Cn&&o&&uA(t),Yr(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(cy(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=sie(r),e=Uo(r,e),i){case 0:t=LC(null,t,r,e,n);break e;case 1:t=eT(null,t,r,e,n);break e;case 11:t=Q8(null,t,r,e,n);break e;case 14:t=J8(null,t,r,Uo(r.type,e),n);break e}throw Error(Oe(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Uo(r,i),LC(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Uo(r,i),eT(e,t,r,i,n);case 3:e:{if(oF(t),e===null)throw Error(Oe(387));r=t.pendingProps,o=t.memoizedState,i=o.element,RN(e,t),Uy(t,r,null,n);var a=t.memoizedState;if(r=a.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=cd(Error(Oe(423)),t),t=tT(e,t,r,n,i);break e}else if(r!==i){i=cd(Error(Oe(424)),t),t=tT(e,t,r,n,i);break e}else for(zi=Ns(t.stateNode.containerInfo.firstChild),Ui=t,Cn=!0,Go=null,n=TN(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(ud(),r===i){t=Tu(e,t,n);break e}Yr(e,t,r,n)}t=t.child}return t;case 5:return DN(t),e===null&&DC(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,a=i.children,PC(r,i)?a=null:o!==null&&PC(r,o)&&(t.flags|=32),iF(e,t),Yr(e,t,a,n),t.child;case 6:return e===null&&DC(t),null;case 13:return aF(e,t,n);case 4:return mA(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=sd(t,null,r,n):Yr(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Uo(r,i),Q8(e,t,r,i,n);case 7:return Yr(e,t,t.pendingProps,n),t.child;case 8:return Yr(e,t,t.pendingProps.children,n),t.child;case 12:return Yr(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,a=i.value,fn(By,r._currentValue),r._currentValue=a,o!==null)if(aa(o.value,a)){if(o.children===i.children&&!vi.current){t=Tu(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var u=o.dependencies;if(u!==null){a=o.child;for(var s=u.firstContext;s!==null;){if(s.context===r){if(o.tag===1){s=xu(-1,n&-n),s.tag=2;var l=o.updateQueue;if(l!==null){l=l.shared;var c=l.pending;c===null?s.next=s:(s.next=c.next,c.next=s),l.pending=s}}o.lanes|=n,s=o.alternate,s!==null&&(s.lanes|=n),$C(o.return,n,t),u.lanes|=n;break}s=s.next}}else if(o.tag===10)a=o.type===t.type?null:o.child;else if(o.tag===18){if(a=o.return,a===null)throw Error(Oe(341));a.lanes|=n,u=a.alternate,u!==null&&(u.lanes|=n),$C(a,n,t),a=o.sibling}else a=o.child;if(a!==null)a.return=o;else for(a=o;a!==null;){if(a===t){a=null;break}if(o=a.sibling,o!==null){o.return=a.return,a=o;break}a=a.return}o=a}Yr(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Vf(t,n),i=Oo(i),r=r(i),t.flags|=1,Yr(e,t,r,n),t.child;case 14:return r=t.type,i=Uo(r,t.pendingProps),i=Uo(r.type,i),J8(e,t,r,i,n);case 15:return nF(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Uo(r,i),cy(e,t),t.tag=1,yi(r)?(e=!0,Fy(t)):e=!1,Vf(t,n),JN(t,r,i),NC(t,r,i,n),jC(null,t,r,!0,e,n);case 19:return uF(e,t,n);case 22:return rF(e,t,n)}throw Error(Oe(156,t.tag))};function SF(e,t){return ZI(e,t)}function uie(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function _o(e,t,n,r){return new uie(e,t,n,r)}function TA(e){return e=e.prototype,!(!e||!e.isReactComponent)}function sie(e){if(typeof e=="function")return TA(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Y6)return 11;if(e===Z6)return 14}return 2}function Bs(e,t){var n=e.alternate;return n===null?(n=_o(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function hy(e,t,n,r,i,o){var a=2;if(r=e,typeof e=="function")TA(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case Ef:return Ql(n.children,i,o,t);case K6:a=8,i|=8;break;case aC:return e=_o(12,n,t,i|2),e.elementType=aC,e.lanes=o,e;case uC:return e=_o(13,n,t,i),e.elementType=uC,e.lanes=o,e;case sC:return e=_o(19,n,t,i),e.elementType=sC,e.lanes=o,e;case DI:return Yb(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case MI:a=10;break e;case RI:a=9;break e;case Y6:a=11;break e;case Z6:a=14;break e;case ms:a=16,r=null;break e}throw Error(Oe(130,e==null?e:typeof e,""))}return t=_o(a,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function Ql(e,t,n,r){return e=_o(7,e,r,t),e.lanes=n,e}function Yb(e,t,n,r){return e=_o(22,e,r,t),e.elementType=DI,e.lanes=n,e.stateNode={isHidden:!1},e}function w_(e,t,n){return e=_o(6,e,null,t),e.lanes=n,e}function x_(e,t,n){return t=_o(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function lie(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=t_(0),this.expirationTimes=t_(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=t_(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function MA(e,t,n,r,i,o,a,u,s){return e=new lie(e,t,n,u,s),t===1?(t=1,o===!0&&(t|=8)):t=0,o=_o(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},pA(o),e}function cie(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(OF)}catch(e){console.error(e)}}OF(),OI.exports=Qi;var Bu=OI.exports;const ew=Vt(Bu),pie=mI({__proto__:null,default:ew},[Bu]);var hT=Bu;u8.createRoot=hT.createRoot,u8.hydrateRoot=hT.hydrateRoot;/** +`+o.stack}return{value:e,source:t,stack:i,digest:null}}function D_(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Z3(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var hie=typeof WeakMap=="function"?WeakMap:Map;function dF(e,t,n){n=is(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){d1||(d1=!0,aC=r),Z3(e,t)},n}function hF(e,t,n){n=is(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){Z3(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){Z3(e,t),typeof r!="function"&&(vl===null?vl=new Set([this]):vl.add(this));var a=t.stack;this.componentDidCatch(t.value,{componentStack:a!==null?a:""})}),n}function oT(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new hie;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=Pie.bind(null,e,t,n),t.then(e,e))}function aT(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function uT(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=is(-1,1),t.tag=2,pl(n,t,1))),n.lanes|=1),e)}var pie=_s.ReactCurrentOwner,io=!1;function Bi(e,t,n,r){t.child=e===null?UN(t,null,n,r):Id(t,e.child,n,r)}function sT(e,t,n,r,i){n=n.render;var o=t.ref;return gd(t,i),r=D4(e,t,n,r,o,i),n=$4(),e!==null&&!io?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,hs(e,t,i)):(ir&&n&&w4(t),t.flags|=1,Bi(e,t,r,i),t.child)}function lT(e,t,n,r,i){if(e===null){var o=n.type;return typeof o=="function"&&!V4(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,pF(e,t,o,r,i)):(e=Ry(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&i)){var a=o.memoizedProps;if(n=n.compare,n=n!==null?n:P0,n(a,r)&&e.ref===t.ref)return hs(e,t,i)}return t.flags|=1,e=ml(o,r),e.ref=t.ref,e.return=t,t.child=e}function pF(e,t,n,r,i){if(e!==null){var o=e.memoizedProps;if(P0(o,r)&&e.ref===t.ref)if(io=!1,t.pendingProps=r=o,(e.lanes&i)!==0)e.flags&131072&&(io=!0);else return t.lanes=e.lanes,hs(e,t,i)}return X3(e,t,n,r,i)}function vF(e,t,n){var r=t.pendingProps,i=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Wn(ud,Po),Po|=n;else{if(!(n&1073741824))return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Wn(ud,Po),Po|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,Wn(ud,Po),Po|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,Wn(ud,Po),Po|=r;return Bi(e,t,i,n),t.child}function gF(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function X3(e,t,n,r,i){var o=so(n)?Mc:Di.current;return o=Dd(t,o),gd(t,i),n=D4(e,t,n,r,o,i),r=$4(),e!==null&&!io?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,hs(e,t,i)):(ir&&r&&w4(t),t.flags|=1,Bi(e,t,n,i),t.child)}function cT(e,t,n,r,i){if(so(n)){var o=!0;n1(t)}else o=!1;if(gd(t,i),t.stateNode===null)ky(e,t),fF(t,n,r),Y3(t,n,r,i),r=!0;else if(e===null){var a=t.stateNode,u=t.memoizedProps;a.props=u;var s=a.context,l=n.contextType;typeof l=="object"&&l!==null?l=ha(l):(l=so(n)?Mc:Di.current,l=Dd(t,l));var c=n.getDerivedStateFromProps,d=typeof c=="function"||typeof a.getSnapshotBeforeUpdate=="function";d||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(u!==r||s!==l)&&iT(t,a,r,l),Ks=!1;var h=t.memoizedState;a.state=h,u1(t,r,a,i),s=t.memoizedState,u!==r||h!==s||uo.current||Ks?(typeof c=="function"&&(G3(t,n,c,r),s=t.memoizedState),(u=Ks||rT(t,n,u,r,h,s,l))?(d||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(t.flags|=4194308)):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=s),a.props=r,a.state=s,a.context=l,r=u):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,VN(e,t),u=t.memoizedProps,l=t.type===t.elementType?u:ka(t.type,u),a.props=l,d=t.pendingProps,h=a.context,s=n.contextType,typeof s=="object"&&s!==null?s=ha(s):(s=so(n)?Mc:Di.current,s=Dd(t,s));var v=n.getDerivedStateFromProps;(c=typeof v=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(u!==d||h!==s)&&iT(t,a,r,s),Ks=!1,h=t.memoizedState,a.state=h,u1(t,r,a,i);var g=t.memoizedState;u!==d||h!==g||uo.current||Ks?(typeof v=="function"&&(G3(t,n,v,r),g=t.memoizedState),(l=Ks||rT(t,n,l,r,h,g,s)||!1)?(c||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(r,g,s),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(r,g,s)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||u===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||u===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=g),a.props=r,a.state=g,a.context=s,r=l):(typeof a.componentDidUpdate!="function"||u===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||u===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),r=!1)}return Q3(e,t,n,r,o,i)}function Q3(e,t,n,r,i,o){gF(e,t);var a=(t.flags&128)!==0;if(!r&&!a)return i&&Yk(t,n,!1),hs(e,t,o);r=t.stateNode,pie.current=t;var u=a&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&a?(t.child=Id(t,e.child,null,o),t.child=Id(t,null,u,o)):Bi(e,t,u,o),t.memoizedState=r.state,i&&Yk(t,n,!0),t.child}function mF(e){var t=e.stateNode;t.pendingContext?Gk(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Gk(e,t.context,!1),k4(e,t.containerInfo)}function fT(e,t,n,r,i){return $d(),S4(i),t.flags|=256,Bi(e,t,n,r),t.child}var J3={dehydrated:null,treeContext:null,retryLane:0};function eC(e){return{baseLanes:e,cachePool:null,transitions:null}}function yF(e,t,n){var r=t.pendingProps,i=cr.current,o=!1,a=(t.flags&128)!==0,u;if((u=a)||(u=e!==null&&e.memoizedState===null?!1:(i&2)!==0),u?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),Wn(cr,i&1),e===null)return q3(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(a=r.children,e=r.fallback,o?(r=t.mode,o=t.child,a={mode:"hidden",children:a},!(r&1)&&o!==null?(o.childLanes=0,o.pendingProps=a):o=mx(a,r,0,null),e=Ec(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=eC(n),t.memoizedState=J3,e):F4(t,a));if(i=e.memoizedState,i!==null&&(u=i.dehydrated,u!==null))return vie(e,t,a,r,u,i,n);if(o){o=r.fallback,a=t.mode,i=e.child,u=i.sibling;var s={mode:"hidden",children:r.children};return!(a&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=s,t.deletions=null):(r=ml(i,s),r.subtreeFlags=i.subtreeFlags&14680064),u!==null?o=ml(u,o):(o=Ec(o,a,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,r=o,o=t.child,a=e.child.memoizedState,a=a===null?eC(n):{baseLanes:a.baseLanes|n,cachePool:null,transitions:a.transitions},o.memoizedState=a,o.childLanes=e.childLanes&~n,t.memoizedState=J3,r}return o=e.child,e=o.sibling,r=ml(o,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function F4(e,t){return t=mx({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Im(e,t,n,r){return r!==null&&S4(r),Id(t,e.child,null,n),e=F4(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function vie(e,t,n,r,i,o,a){if(n)return t.flags&256?(t.flags&=-257,r=D_(Error(Ve(422))),Im(e,t,a,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,i=t.mode,r=mx({mode:"visible",children:r.children},i,0,null),o=Ec(o,i,a,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,t.mode&1&&Id(t,e.child,null,a),t.child.memoizedState=eC(a),t.memoizedState=J3,o);if(!(t.mode&1))return Im(e,t,a,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var u=r.dgst;return r=u,o=Error(Ve(419)),r=D_(o,r,void 0),Im(e,t,a,r)}if(u=(a&e.childLanes)!==0,io||u){if(r=ti,r!==null){switch(a&-a){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|a)?0:i,i!==0&&i!==o.retryLane&&(o.retryLane=i,ds(e,i),Ua(r,e,i,-1))}return W4(),r=D_(Error(Ve(421))),Im(e,t,a,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=Oie.bind(null,e),i._reactRetry=t,null):(e=o.treeContext,Ro=hl(i.nextSibling),Do=t,ir=!0,$a=null,e!==null&&(oa[aa++]=Ju,oa[aa++]=es,oa[aa++]=Rc,Ju=e.id,es=e.overflow,Rc=t),t=F4(t,r.children),t.flags|=4096,t)}function dT(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),K3(e.return,t,n)}function $_(e,t,n,r,i){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function bF(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(Bi(e,t,r.children,n),r=cr.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&dT(e,n,t);else if(e.tag===19)dT(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Wn(cr,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&s1(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),$_(t,!1,i,n,o);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&s1(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}$_(t,!0,n,null,o);break;case"together":$_(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function ky(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function hs(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),$c|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(Ve(153));if(t.child!==null){for(e=t.child,n=ml(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ml(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function gie(e,t,n){switch(t.tag){case 3:mF(t),$d();break;case 5:HN(t);break;case 1:so(t.type)&&n1(t);break;case 4:k4(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;Wn(o1,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Wn(cr,cr.current&1),t.flags|=128,null):n&t.child.childLanes?yF(e,t,n):(Wn(cr,cr.current&1),e=hs(e,t,n),e!==null?e.sibling:null);Wn(cr,cr.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return bF(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Wn(cr,cr.current),r)break;return null;case 22:case 23:return t.lanes=0,vF(e,t,n)}return hs(e,t,n)}var xF,tC,wF,_F;xF=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};tC=function(){};wF=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,vc(xu.current);var o=null;switch(n){case"input":i=S3(e,i),r=S3(e,r),o=[];break;case"select":i=hr({},i,{value:void 0}),r=hr({},r,{value:void 0}),o=[];break;case"textarea":i=A3(e,i),r=A3(e,r),o=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=e1)}O3(n,r);var a;n=null;for(l in i)if(!r.hasOwnProperty(l)&&i.hasOwnProperty(l)&&i[l]!=null)if(l==="style"){var u=i[l];for(a in u)u.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else l!=="dangerouslySetInnerHTML"&&l!=="children"&&l!=="suppressContentEditableWarning"&&l!=="suppressHydrationWarning"&&l!=="autoFocus"&&(x0.hasOwnProperty(l)?o||(o=[]):(o=o||[]).push(l,null));for(l in r){var s=r[l];if(u=i?.[l],r.hasOwnProperty(l)&&s!==u&&(s!=null||u!=null))if(l==="style")if(u){for(a in u)!u.hasOwnProperty(a)||s&&s.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in s)s.hasOwnProperty(a)&&u[a]!==s[a]&&(n||(n={}),n[a]=s[a])}else n||(o||(o=[]),o.push(l,n)),n=s;else l==="dangerouslySetInnerHTML"?(s=s?s.__html:void 0,u=u?u.__html:void 0,s!=null&&u!==s&&(o=o||[]).push(l,s)):l==="children"?typeof s!="string"&&typeof s!="number"||(o=o||[]).push(l,""+s):l!=="suppressContentEditableWarning"&&l!=="suppressHydrationWarning"&&(x0.hasOwnProperty(l)?(s!=null&&l==="onScroll"&&Qn("scroll",e),o||u===s||(o=[])):(o=o||[]).push(l,s))}n&&(o=o||[]).push("style",n);var l=o;(t.updateQueue=l)&&(t.flags|=4)}};_F=function(e,t,n,r){n!==r&&(t.flags|=4)};function yp(e,t){if(!ir)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Ci(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function mie(e,t,n){var r=t.pendingProps;switch(_4(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ci(t),null;case 1:return so(t.type)&&t1(),Ci(t),null;case 3:return r=t.stateNode,Nd(),tr(uo),tr(Di),M4(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Dm(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,$a!==null&&(lC($a),$a=null))),tC(e,t),Ci(t),null;case 5:T4(t);var i=vc(R0.current);if(n=t.type,e!==null&&t.stateNode!=null)wF(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(Ve(166));return Ci(t),null}if(e=vc(xu.current),Dm(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[lu]=t,r[T0]=o,e=(t.mode&1)!==0,n){case"dialog":Qn("cancel",r),Qn("close",r);break;case"iframe":case"object":case"embed":Qn("load",r);break;case"video":case"audio":for(i=0;i<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[lu]=t,e[T0]=r,xF(e,t,!1,!1),t.stateNode=e;e:{switch(a=k3(n,r),n){case"dialog":Qn("cancel",e),Qn("close",e),i=r;break;case"iframe":case"object":case"embed":Qn("load",e),i=r;break;case"video":case"audio":for(i=0;iLd&&(t.flags|=128,r=!0,yp(o,!1),t.lanes=4194304)}else{if(!r)if(e=s1(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),yp(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!ir)return Ci(t),null}else 2*Cr()-o.renderingStartTime>Ld&&n!==1073741824&&(t.flags|=128,r=!0,yp(o,!1),t.lanes=4194304);o.isBackwards?(a.sibling=t.child,t.child=a):(n=o.last,n!==null?n.sibling=a:t.child=a,o.last=a)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Cr(),t.sibling=null,n=cr.current,Wn(cr,r?n&1|2:n&1),t):(Ci(t),null);case 22:case 23:return U4(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Po&1073741824&&(Ci(t),t.subtreeFlags&6&&(t.flags|=8192)):Ci(t),null;case 24:return null;case 25:return null}throw Error(Ve(156,t.tag))}function yie(e,t){switch(_4(t),t.tag){case 1:return so(t.type)&&t1(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Nd(),tr(uo),tr(Di),M4(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return T4(t),null;case 13:if(tr(cr),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Ve(340));$d()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return tr(cr),null;case 4:return Nd(),null;case 10:return A4(t.type._context),null;case 22:case 23:return U4(),null;case 24:return null;default:return null}}var Nm=!1,Oi=!1,bie=typeof WeakSet=="function"?WeakSet:Set,at=null;function ad(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){vr(e,t,r)}else n.current=null}function nC(e,t,n){try{n()}catch(r){vr(e,t,r)}}var hT=!1;function xie(e,t){if(j3=Xy,e=PN(),x4(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var a=0,u=-1,s=-1,l=0,c=0,d=e,h=null;t:for(;;){for(var v;d!==n||i!==0&&d.nodeType!==3||(u=a+i),d!==o||r!==0&&d.nodeType!==3||(s=a+r),d.nodeType===3&&(a+=d.nodeValue.length),(v=d.firstChild)!==null;)h=d,d=v;for(;;){if(d===e)break t;if(h===n&&++l===i&&(u=a),h===o&&++c===r&&(s=a),(v=d.nextSibling)!==null)break;d=h,h=d.parentNode}d=v}n=u===-1||s===-1?null:{start:u,end:s}}else n=null}n=n||{start:0,end:0}}else n=null;for(B3={focusedElem:e,selectionRange:n},Xy=!1,at=t;at!==null;)if(t=at,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,at=e;else for(;at!==null;){t=at;try{var g=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var m=g.memoizedProps,b=g.memoizedState,w=t.stateNode,x=w.getSnapshotBeforeUpdate(t.elementType===t.type?m:ka(t.type,m),b);w.__reactInternalSnapshotBeforeUpdate=x}break;case 3:var S=t.stateNode.containerInfo;S.nodeType===1?S.textContent="":S.nodeType===9&&S.documentElement&&S.removeChild(S.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Ve(163))}}catch(A){vr(t,t.return,A)}if(e=t.sibling,e!==null){e.return=t.return,at=e;break}at=t.return}return g=hT,hT=!1,g}function o0(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&nC(t,n,o)}i=i.next}while(i!==r)}}function vx(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function rC(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function SF(e){var t=e.alternate;t!==null&&(e.alternate=null,SF(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[lu],delete t[T0],delete t[W3],delete t[nie],delete t[rie])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function CF(e){return e.tag===5||e.tag===3||e.tag===4}function pT(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||CF(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function iC(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=e1));else if(r!==4&&(e=e.child,e!==null))for(iC(e,t,n),e=e.sibling;e!==null;)iC(e,t,n),e=e.sibling}function oC(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(oC(e,t,n),e=e.sibling;e!==null;)oC(e,t,n),e=e.sibling}var hi=null,Ta=!1;function js(e,t,n){for(n=n.child;n!==null;)EF(e,t,n),n=n.sibling}function EF(e,t,n){if(bu&&typeof bu.onCommitFiberUnmount=="function")try{bu.onCommitFiberUnmount(ux,n)}catch{}switch(n.tag){case 5:Oi||ad(n,t);case 6:var r=hi,i=Ta;hi=null,js(e,t,n),hi=r,Ta=i,hi!==null&&(Ta?(e=hi,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):hi.removeChild(n.stateNode));break;case 18:hi!==null&&(Ta?(e=hi,n=n.stateNode,e.nodeType===8?P_(e.parentNode,n):e.nodeType===1&&P_(e,n),E0(e)):P_(hi,n.stateNode));break;case 4:r=hi,i=Ta,hi=n.stateNode.containerInfo,Ta=!0,js(e,t,n),hi=r,Ta=i;break;case 0:case 11:case 14:case 15:if(!Oi&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,a=o.destroy;o=o.tag,a!==void 0&&(o&2||o&4)&&nC(n,t,a),i=i.next}while(i!==r)}js(e,t,n);break;case 1:if(!Oi&&(ad(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(u){vr(n,t,u)}js(e,t,n);break;case 21:js(e,t,n);break;case 22:n.mode&1?(Oi=(r=Oi)||n.memoizedState!==null,js(e,t,n),Oi=r):js(e,t,n);break;default:js(e,t,n)}}function vT(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new bie),t.forEach(function(r){var i=kie.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Aa(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=a),r&=~o}if(r=i,r=Cr()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*_ie(r/1960))-r,10e?16:e,nl===null)var r=!1;else{if(e=nl,nl=null,h1=0,vn&6)throw Error(Ve(331));var i=vn;for(vn|=4,at=e.current;at!==null;){var o=at,a=o.child;if(at.flags&16){var u=o.deletions;if(u!==null){for(var s=0;sCr()-B4?Cc(e,0):j4|=n),lo(e,t)}function DF(e,t){t===0&&(e.mode&1?(t=Pm,Pm<<=1,!(Pm&130023424)&&(Pm=4194304)):t=1);var n=Vi();e=ds(e,t),e!==null&&(Qv(e,t,n),lo(e,n))}function Oie(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),DF(e,n)}function kie(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(Ve(314))}r!==null&&r.delete(t),DF(e,n)}var $F;$F=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||uo.current)io=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return io=!1,gie(e,t,n);io=!!(e.flags&131072)}else io=!1,ir&&t.flags&1048576&&LN(t,i1,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;ky(e,t),e=t.pendingProps;var i=Dd(t,Di.current);gd(t,n),i=D4(null,t,r,e,i,n);var o=$4();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,so(r)?(o=!0,n1(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,O4(t),i.updater=px,t.stateNode=i,i._reactInternals=t,Y3(t,r,e,n),t=Q3(null,t,r,!0,o,n)):(t.tag=0,ir&&o&&w4(t),Bi(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(ky(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=Mie(r),e=ka(r,e),i){case 0:t=X3(null,t,r,e,n);break e;case 1:t=cT(null,t,r,e,n);break e;case 11:t=sT(null,t,r,e,n);break e;case 14:t=lT(null,t,r,ka(r.type,e),n);break e}throw Error(Ve(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ka(r,i),X3(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ka(r,i),cT(e,t,r,i,n);case 3:e:{if(mF(t),e===null)throw Error(Ve(387));r=t.pendingProps,o=t.memoizedState,i=o.element,VN(e,t),u1(t,r,null,n);var a=t.memoizedState;if(r=a.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=Fd(Error(Ve(423)),t),t=fT(e,t,r,n,i);break e}else if(r!==i){i=Fd(Error(Ve(424)),t),t=fT(e,t,r,n,i);break e}else for(Ro=hl(t.stateNode.containerInfo.firstChild),Do=t,ir=!0,$a=null,n=UN(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if($d(),r===i){t=hs(e,t,n);break e}Bi(e,t,r,n)}t=t.child}return t;case 5:return HN(t),e===null&&q3(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,a=i.children,z3(r,i)?a=null:o!==null&&z3(r,o)&&(t.flags|=32),gF(e,t),Bi(e,t,a,n),t.child;case 6:return e===null&&q3(t),null;case 13:return yF(e,t,n);case 4:return k4(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Id(t,null,r,n):Bi(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ka(r,i),sT(e,t,r,i,n);case 7:return Bi(e,t,t.pendingProps,n),t.child;case 8:return Bi(e,t,t.pendingProps.children,n),t.child;case 12:return Bi(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,a=i.value,Wn(o1,r._currentValue),r._currentValue=a,o!==null)if(qa(o.value,a)){if(o.children===i.children&&!uo.current){t=hs(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var u=o.dependencies;if(u!==null){a=o.child;for(var s=u.firstContext;s!==null;){if(s.context===r){if(o.tag===1){s=is(-1,n&-n),s.tag=2;var l=o.updateQueue;if(l!==null){l=l.shared;var c=l.pending;c===null?s.next=s:(s.next=c.next,c.next=s),l.pending=s}}o.lanes|=n,s=o.alternate,s!==null&&(s.lanes|=n),K3(o.return,n,t),u.lanes|=n;break}s=s.next}}else if(o.tag===10)a=o.type===t.type?null:o.child;else if(o.tag===18){if(a=o.return,a===null)throw Error(Ve(341));a.lanes|=n,u=a.alternate,u!==null&&(u.lanes|=n),K3(a,n,t),a=o.sibling}else a=o.child;if(a!==null)a.return=o;else for(a=o;a!==null;){if(a===t){a=null;break}if(o=a.sibling,o!==null){o.return=a.return,a=o;break}a=a.return}o=a}Bi(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,gd(t,n),i=ha(i),r=r(i),t.flags|=1,Bi(e,t,r,n),t.child;case 14:return r=t.type,i=ka(r,t.pendingProps),i=ka(r.type,i),lT(e,t,r,i,n);case 15:return pF(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ka(r,i),ky(e,t),t.tag=1,so(r)?(e=!0,n1(t)):e=!1,gd(t,n),fF(t,r,i),Y3(t,r,i,n),Q3(null,t,r,!0,e,n);case 19:return bF(e,t,n);case 22:return vF(e,t,n)}throw Error(Ve(156,t.tag))};function IF(e,t){return sN(e,t)}function Tie(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function sa(e,t,n,r){return new Tie(e,t,n,r)}function V4(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Mie(e){if(typeof e=="function")return V4(e)?1:0;if(e!=null){if(e=e.$$typeof,e===l4)return 11;if(e===c4)return 14}return 2}function ml(e,t){var n=e.alternate;return n===null?(n=sa(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Ry(e,t,n,r,i,o){var a=2;if(r=e,typeof e=="function")V4(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case Xf:return Ec(n.children,i,o,t);case s4:a=8,i|=8;break;case b3:return e=sa(12,n,t,i|2),e.elementType=b3,e.lanes=o,e;case x3:return e=sa(13,n,t,i),e.elementType=x3,e.lanes=o,e;case w3:return e=sa(19,n,t,i),e.elementType=w3,e.lanes=o,e;case HI:return mx(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case WI:a=10;break e;case VI:a=9;break e;case l4:a=11;break e;case c4:a=14;break e;case qs:a=16,r=null;break e}throw Error(Ve(130,e==null?e:typeof e,""))}return t=sa(a,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function Ec(e,t,n,r){return e=sa(7,e,r,t),e.lanes=n,e}function mx(e,t,n,r){return e=sa(22,e,r,t),e.elementType=HI,e.lanes=n,e.stateNode={isHidden:!1},e}function I_(e,t,n){return e=sa(6,e,null,t),e.lanes=n,e}function N_(e,t,n){return t=sa(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Rie(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=g_(0),this.expirationTimes=g_(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=g_(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function H4(e,t,n,r,i,o,a,u,s){return e=new Rie(e,t,n,u,s),t===1?(t=1,o===!0&&(t|=8)):t=0,o=sa(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},O4(o),e}function Die(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(jF)}catch(e){console.error(e)}}jF(),jI.exports=Wo;var Ss=jI.exports;const _x=Pn(Ss),Fie=PI({__proto__:null,default:_x},[Ss]);var ST=Ss;mk.createRoot=ST.createRoot,mk.hydrateRoot=ST.hydrateRoot;/** * @remix-run/router v1.21.0 * * Copyright (c) Remix Software Inc. @@ -46,8 +46,8 @@ Error generating stack: `+o.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function Sn(){return Sn=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function lc(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function gie(){return Math.random().toString(36).substr(2,8)}function mT(e,t){return{usr:e.state,key:e.key,idx:t}}function p0(e,t,n,r){return n===void 0&&(n=null),Sn({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?zu(t):t,{state:n,key:t&&t.key||r||gie()})}function cc(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function zu(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function vie(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:o=!1}=r,a=i.history,u=qn.Pop,s=null,l=c();l==null&&(l=0,a.replaceState(Sn({},a.state,{idx:l}),""));function c(){return(a.state||{idx:null}).idx}function d(){u=qn.Pop;let y=c(),x=y==null?null:y-l;l=y,s&&s({action:u,location:v.location,delta:x})}function h(y,x){u=qn.Push;let w=p0(v.location,y,x);n(w,y),l=c()+1;let S=mT(w,l),A=v.createHref(w);try{a.pushState(S,"",A)}catch(E){if(E instanceof DOMException&&E.name==="DataCloneError")throw E;i.location.assign(A)}o&&s&&s({action:u,location:v.location,delta:1})}function m(y,x){u=qn.Replace;let w=p0(v.location,y,x);n(w,y),l=c();let S=mT(w,l),A=v.createHref(w);a.replaceState(S,"",A),o&&s&&s({action:u,location:v.location,delta:0})}function g(y){let x=i.location.origin!=="null"?i.location.origin:i.location.href,w=typeof y=="string"?y:cc(y);return w=w.replace(/ $/,"%20"),Ot(x,"No window.location.(origin|href) available to create URL for href: "+w),new URL(w,x)}let v={get action(){return u},get location(){return e(i,a)},listen(y){if(s)throw new Error("A history only accepts one active listener");return i.addEventListener(pT,d),s=y,()=>{i.removeEventListener(pT,d),s=null}},createHref(y){return t(i,y)},createURL:g,encodeLocation(y){let x=g(y);return{pathname:x.pathname,search:x.search,hash:x.hash}},push:h,replace:m,go(y){return a.go(y)}};return v}var Qt;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Qt||(Qt={}));const yie=new Set(["lazy","caseSensitive","path","id","index","children"]);function bie(e){return e.index===!0}function Xy(e,t,n,r){return n===void 0&&(n=[]),r===void 0&&(r={}),e.map((i,o)=>{let a=[...n,String(o)],u=typeof i.id=="string"?i.id:a.join("-");if(Ot(i.index!==!0||!i.children,"Cannot specify children on an index route"),Ot(!r[u],'Found a route id collision on id "'+u+`". Route id's must be globally unique within Data Router usages`),bie(i)){let s=Sn({},i,t(i),{id:u});return r[u]=s,s}else{let s=Sn({},i,t(i),{id:u,children:void 0});return r[u]=s,i.children&&(s.children=Xy(i.children,t,a,r)),s}})}function Ll(e,t,n){return n===void 0&&(n="/"),py(e,t,n,!1)}function py(e,t,n,r){let i=typeof t=="string"?zu(t):t,o=Zd(i.pathname||"/",n);if(o==null)return null;let a=PF(e);xie(a);let u=null;for(let s=0;u==null&&s{let s={relativePath:u===void 0?o.path||"":u,caseSensitive:o.caseSensitive===!0,childrenIndex:a,route:o};s.relativePath.startsWith("/")&&(Ot(s.relativePath.startsWith(r),'Absolute route path "'+s.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),s.relativePath=s.relativePath.slice(r.length));let l=_u([r,s.relativePath]),c=n.concat(s);o.children&&o.children.length>0&&(Ot(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+l+'".')),PF(o.children,t,c,l)),!(o.path==null&&!o.index)&&t.push({path:l,score:Pie(l,o.index),routesMeta:c})};return e.forEach((o,a)=>{var u;if(o.path===""||!((u=o.path)!=null&&u.includes("?")))i(o,a);else for(let s of kF(o.path))i(o,a,s)}),t}function kF(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return i?[o,""]:[o];let a=kF(r.join("/")),u=[];return u.push(...a.map(s=>s===""?o:[o,s].join("/"))),i&&u.push(...a),u.map(s=>e.startsWith("/")&&s===""?"/":s)}function xie(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:kie(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const _ie=/^:[\w-]+$/,Sie=3,Cie=2,Eie=1,Aie=10,Oie=-2,gT=e=>e==="*";function Pie(e,t){let n=e.split("/"),r=n.length;return n.some(gT)&&(r+=Oie),t&&(r+=Cie),n.filter(i=>!gT(i)).reduce((i,o)=>i+(_ie.test(o)?Sie:o===""?Eie:Aie),r)}function kie(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function Tie(e,t,n){n===void 0&&(n=!1);let{routesMeta:r}=e,i={},o="/",a=[];for(let u=0;u{let{paramName:h,isOptional:m}=c;if(h==="*"){let v=u[d]||"";a=o.slice(0,o.length-v.length).replace(/(.)\/+$/,"$1")}const g=u[d];return m&&!g?l[h]=void 0:l[h]=(g||"").replace(/%2F/g,"/"),l},{}),pathname:o,pathnameBase:a,pattern:e}}function Mie(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),lc(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(a,u,s)=>(r.push({paramName:u,isOptional:s!=null}),s?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function Rie(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return lc(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Zd(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function Die(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?zu(e):e;return{pathname:n?n.startsWith("/")?n:$ie(n,t):t,search:Nie(r),hash:Fie(i)}}function $ie(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function __(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function TF(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function IA(e,t){let n=TF(e);return t?n.map((r,i)=>i===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function NA(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=zu(e):(i=Sn({},e),Ot(!i.pathname||!i.pathname.includes("?"),__("?","pathname","search",i)),Ot(!i.pathname||!i.pathname.includes("#"),__("#","pathname","hash",i)),Ot(!i.search||!i.search.includes("#"),__("#","search","hash",i)));let o=e===""||i.pathname==="",a=o?"/":i.pathname,u;if(a==null)u=n;else{let d=t.length-1;if(!r&&a.startsWith("..")){let h=a.split("/");for(;h[0]==="..";)h.shift(),d-=1;i.pathname=h.join("/")}u=d>=0?t[d]:"/"}let s=Die(i,u),l=a&&a!=="/"&&a.endsWith("/"),c=(o||a===".")&&n.endsWith("/");return!s.pathname.endsWith("/")&&(l||c)&&(s.pathname+="/"),s}const _u=e=>e.join("/").replace(/\/\/+/g,"/"),Iie=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Nie=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Fie=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class Qy{constructor(t,n,r,i){i===void 0&&(i=!1),this.status=t,this.statusText=n||"",this.internal=i,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function tw(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const MF=["post","put","patch","delete"],Lie=new Set(MF),jie=["get",...MF],Bie=new Set(jie),zie=new Set([301,302,303,307,308]),Uie=new Set([307,308]),S_={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Wie={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Gh={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},FA=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Vie=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),RF="remix-router-transitions";function Hie(e){const t=e.window?e.window:typeof window<"u"?window:void 0,n=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u",r=!n;Ot(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let i;if(e.mapRouteProperties)i=e.mapRouteProperties;else if(e.detectErrorBoundary){let J=e.detectErrorBoundary;i=re=>({hasErrorBoundary:J(re)})}else i=Vie;let o={},a=Xy(e.routes,i,void 0,o),u,s=e.basename||"/",l=e.dataStrategy||Yie,c=e.patchRoutesOnNavigation,d=Sn({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},e.future),h=null,m=new Set,g=null,v=null,y=null,x=e.hydrationData!=null,w=Ll(a,e.history.location,s),S=null;if(w==null&&!c){let J=fi(404,{pathname:e.history.location.pathname}),{matches:re,route:le}=PT(a);w=re,S={[le.id]:J}}w&&!e.hydrationData&&$o(w,a,e.history.location.pathname).active&&(w=null);let A;if(w)if(w.some(J=>J.route.lazy))A=!1;else if(!w.some(J=>J.route.loader))A=!0;else if(d.v7_partialHydration){let J=e.hydrationData?e.hydrationData.loaderData:null,re=e.hydrationData?e.hydrationData.errors:null;if(re){let le=w.findIndex(xe=>re[xe.route.id]!==void 0);A=w.slice(0,le+1).every(xe=>!QC(xe.route,J,re))}else A=w.every(le=>!QC(le.route,J,re))}else A=e.hydrationData!=null;else if(A=!1,w=[],d.v7_partialHydration){let J=$o(null,a,e.history.location.pathname);J.active&&J.matches&&(w=J.matches)}let E,C={historyAction:e.history.action,location:e.history.location,matches:w,initialized:A,navigation:S_,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||S,fetchers:new Map,blockers:new Map},P=qn.Pop,k=!1,M,L=!1,B=new Map,F=null,Y=!1,H=!1,W=[],V=new Set,j=new Map,I=0,z=-1,U=new Map,X=new Set,q=new Map,G=new Map,ee=new Set,ue=new Map,fe=new Map,ie;function Ae(){if(h=e.history.listen(J=>{let{action:re,location:le,delta:xe}=J;if(ie){ie(),ie=void 0;return}lc(fe.size===0||xe!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let Fe=Ai({currentLocation:C.location,nextLocation:le,historyAction:re});if(Fe&&xe!=null){let Ge=new Promise(st=>{ie=st});e.history.go(xe*-1),ya(Fe,{state:"blocked",location:le,proceed(){ya(Fe,{state:"proceeding",proceed:void 0,reset:void 0,location:le}),Ge.then(()=>e.history.go(xe))},reset(){let st=new Map(C.blockers);st.set(Fe,Gh),ge({blockers:st})}});return}return qe(re,le)}),n){loe(t,B);let J=()=>coe(t,B);t.addEventListener("pagehide",J),F=()=>t.removeEventListener("pagehide",J)}return C.initialized||qe(qn.Pop,C.location,{initialHydration:!0}),E}function de(){h&&h(),F&&F(),m.clear(),M&&M.abort(),C.fetchers.forEach((J,re)=>Yn(re)),C.blockers.forEach((J,re)=>Ku(re))}function we(J){return m.add(J),()=>m.delete(J)}function ge(J,re){re===void 0&&(re={}),C=Sn({},C,J);let le=[],xe=[];d.v7_fetcherPersist&&C.fetchers.forEach((Fe,Ge)=>{Fe.state==="idle"&&(ee.has(Ge)?xe.push(Ge):le.push(Ge))}),[...m].forEach(Fe=>Fe(C,{deletedFetchers:xe,viewTransitionOpts:re.viewTransitionOpts,flushSync:re.flushSync===!0})),d.v7_fetcherPersist&&(le.forEach(Fe=>C.fetchers.delete(Fe)),xe.forEach(Fe=>Yn(Fe)))}function ae(J,re,le){var xe,Fe;let{flushSync:Ge}=le===void 0?{}:le,st=C.actionData!=null&&C.navigation.formMethod!=null&&Vo(C.navigation.formMethod)&&C.navigation.state==="loading"&&((xe=J.state)==null?void 0:xe._isRedirect)!==!0,Ue;re.actionData?Object.keys(re.actionData).length>0?Ue=re.actionData:Ue=null:st?Ue=C.actionData:Ue=null;let We=re.loaderData?AT(C.loaderData,re.loaderData,re.matches||[],re.errors):C.loaderData,Le=C.blockers;Le.size>0&&(Le=new Map(Le),Le.forEach((Et,Xn)=>Le.set(Xn,Gh)));let Ke=k===!0||C.navigation.formMethod!=null&&Vo(C.navigation.formMethod)&&((Fe=J.state)==null?void 0:Fe._isRedirect)!==!0;u&&(a=u,u=void 0),Y||P===qn.Pop||(P===qn.Push?e.history.push(J,J.state):P===qn.Replace&&e.history.replace(J,J.state));let _t;if(P===qn.Pop){let Et=B.get(C.location.pathname);Et&&Et.has(J.pathname)?_t={currentLocation:C.location,nextLocation:J}:B.has(J.pathname)&&(_t={currentLocation:J,nextLocation:C.location})}else if(L){let Et=B.get(C.location.pathname);Et?Et.add(J.pathname):(Et=new Set([J.pathname]),B.set(C.location.pathname,Et)),_t={currentLocation:C.location,nextLocation:J}}ge(Sn({},re,{actionData:Ue,loaderData:We,historyAction:P,location:J,initialized:!0,navigation:S_,revalidation:"idle",restoreScrollPosition:Vr(J,re.matches||C.matches),preventScrollReset:Ke,blockers:Le}),{viewTransitionOpts:_t,flushSync:Ge===!0}),P=qn.Pop,k=!1,L=!1,Y=!1,H=!1,W=[]}async function $e(J,re){if(typeof J=="number"){e.history.go(J);return}let le=XC(C.location,C.matches,s,d.v7_prependBasename,J,d.v7_relativeSplatPath,re?.fromRouteId,re?.relative),{path:xe,submission:Fe,error:Ge}=yT(d.v7_normalizeFormMethod,!1,le,re),st=C.location,Ue=p0(C.location,xe,re&&re.state);Ue=Sn({},Ue,e.history.encodeLocation(Ue));let We=re&&re.replace!=null?re.replace:void 0,Le=qn.Push;We===!0?Le=qn.Replace:We===!1||Fe!=null&&Vo(Fe.formMethod)&&Fe.formAction===C.location.pathname+C.location.search&&(Le=qn.Replace);let Ke=re&&"preventScrollReset"in re?re.preventScrollReset===!0:void 0,_t=(re&&re.flushSync)===!0,Et=Ai({currentLocation:st,nextLocation:Ue,historyAction:Le});if(Et){ya(Et,{state:"blocked",location:Ue,proceed(){ya(Et,{state:"proceeding",proceed:void 0,reset:void 0,location:Ue}),$e(J,re)},reset(){let Xn=new Map(C.blockers);Xn.set(Et,Gh),ge({blockers:Xn})}});return}return await qe(Le,Ue,{submission:Fe,pendingError:Ge,preventScrollReset:Ke,replace:re&&re.replace,enableViewTransition:re&&re.viewTransition,flushSync:_t})}function Te(){if(sn(),ge({revalidation:"loading"}),C.navigation.state!=="submitting"){if(C.navigation.state==="idle"){qe(C.historyAction,C.location,{startUninterruptedRevalidation:!0});return}qe(P||C.historyAction,C.navigation.location,{overrideNavigation:C.navigation,enableViewTransition:L===!0})}}async function qe(J,re,le){M&&M.abort(),M=null,P=J,Y=(le&&le.startUninterruptedRevalidation)===!0,Wr(C.location,C.matches),k=(le&&le.preventScrollReset)===!0,L=(le&&le.enableViewTransition)===!0;let xe=u||a,Fe=le&&le.overrideNavigation,Ge=Ll(xe,re,s),st=(le&&le.flushSync)===!0,Ue=$o(Ge,xe,re.pathname);if(Ue.active&&Ue.matches&&(Ge=Ue.matches),!Ge){let{error:Xt,notFoundMatches:It,route:xn}=ml(re.pathname);ae(re,{matches:It,loaderData:{},errors:{[xn.id]:Xt}},{flushSync:st});return}if(C.initialized&&!H&&toe(C.location,re)&&!(le&&le.submission&&Vo(le.submission.formMethod))){ae(re,{matches:Ge},{flushSync:st});return}M=new AbortController;let We=uf(e.history,re,M.signal,le&&le.submission),Le;if(le&&le.pendingError)Le=[jl(Ge).route.id,{type:Qt.error,error:le.pendingError}];else if(le&&le.submission&&Vo(le.submission.formMethod)){let Xt=await zt(We,re,le.submission,Ge,Ue.active,{replace:le.replace,flushSync:st});if(Xt.shortCircuited)return;if(Xt.pendingActionResult){let[It,xn]=Xt.pendingActionResult;if(Li(xn)&&tw(xn.error)&&xn.error.status===404){M=null,ae(re,{matches:Xt.matches,loaderData:{},errors:{[It]:xn.error}});return}}Ge=Xt.matches||Ge,Le=Xt.pendingActionResult,Fe=C_(re,le.submission),st=!1,Ue.active=!1,We=uf(e.history,We.url,We.signal)}let{shortCircuited:Ke,matches:_t,loaderData:Et,errors:Xn}=await Rt(We,re,Ge,Ue.active,Fe,le&&le.submission,le&&le.fetcherSubmission,le&&le.replace,le&&le.initialHydration===!0,st,Le);Ke||(M=null,ae(re,Sn({matches:_t||Ge},OT(Le),{loaderData:Et,errors:Xn})))}async function zt(J,re,le,xe,Fe,Ge){Ge===void 0&&(Ge={}),sn();let st=uoe(re,le);if(ge({navigation:st},{flushSync:Ge.flushSync===!0}),Fe){let Le=await Ga(xe,re.pathname,J.signal);if(Le.type==="aborted")return{shortCircuited:!0};if(Le.type==="error"){let Ke=jl(Le.partialMatches).route.id;return{matches:Le.partialMatches,pendingActionResult:[Ke,{type:Qt.error,error:Le.error}]}}else if(Le.matches)xe=Le.matches;else{let{notFoundMatches:Ke,error:_t,route:Et}=ml(re.pathname);return{matches:Ke,pendingActionResult:[Et.id,{type:Qt.error,error:_t}]}}}let Ue,We=xp(xe,re);if(!We.route.action&&!We.route.lazy)Ue={type:Qt.error,error:fi(405,{method:J.method,pathname:re.pathname,routeId:We.route.id})};else if(Ue=(await Ie("action",C,J,[We],xe,null))[We.route.id],J.signal.aborted)return{shortCircuited:!0};if(Wl(Ue)){let Le;return Ge&&Ge.replace!=null?Le=Ge.replace:Le=ST(Ue.response.headers.get("Location"),new URL(J.url),s)===C.location.pathname+C.location.search,await ye(J,Ue,!0,{submission:le,replace:Le}),{shortCircuited:!0}}if(As(Ue))throw fi(400,{type:"defer-action"});if(Li(Ue)){let Le=jl(xe,We.route.id);return(Ge&&Ge.replace)!==!0&&(P=qn.Push),{matches:xe,pendingActionResult:[Le.route.id,Ue]}}return{matches:xe,pendingActionResult:[We.route.id,Ue]}}async function Rt(J,re,le,xe,Fe,Ge,st,Ue,We,Le,Ke){let _t=Fe||C_(re,Ge),Et=Ge||st||TT(_t),Xn=!Y&&(!d.v7_partialHydration||!We);if(xe){if(Xn){let pn=Z(Ke);ge(Sn({navigation:_t},pn!==void 0?{actionData:pn}:{}),{flushSync:Le})}let Tt=await Ga(le,re.pathname,J.signal);if(Tt.type==="aborted")return{shortCircuited:!0};if(Tt.type==="error"){let pn=jl(Tt.partialMatches).route.id;return{matches:Tt.partialMatches,loaderData:{},errors:{[pn]:Tt.error}}}else if(Tt.matches)le=Tt.matches;else{let{error:pn,notFoundMatches:Xu,route:bl}=ml(re.pathname);return{matches:Xu,loaderData:{},errors:{[bl.id]:pn}}}}let Xt=u||a,[It,xn]=wT(e.history,C,le,Et,re,d.v7_partialHydration&&We===!0,d.v7_skipActionErrorRevalidation,H,W,V,ee,q,X,Xt,s,Ke);if(rt(Tt=>!(le&&le.some(pn=>pn.route.id===Tt))||It&&It.some(pn=>pn.route.id===Tt)),z=++I,It.length===0&&xn.length===0){let Tt=va();return ae(re,Sn({matches:le,loaderData:{},errors:Ke&&Li(Ke[1])?{[Ke[0]]:Ke[1].error}:null},OT(Ke),Tt?{fetchers:new Map(C.fetchers)}:{}),{flushSync:Le}),{shortCircuited:!0}}if(Xn){let Tt={};if(!xe){Tt.navigation=_t;let pn=Z(Ke);pn!==void 0&&(Tt.actionData=pn)}xn.length>0&&(Tt.fetchers=oe(xn)),ge(Tt,{flushSync:Le})}xn.forEach(Tt=>{Zn(Tt.key),Tt.controller&&j.set(Tt.key,Tt.controller)});let Yu=()=>xn.forEach(Tt=>Zn(Tt.key));M&&M.signal.addEventListener("abort",Yu);let{loaderResults:gl,fetcherResults:oi}=await Ye(C,le,It,xn,J);if(J.signal.aborted)return{shortCircuited:!0};M&&M.signal.removeEventListener("abort",Yu),xn.forEach(Tt=>j.delete(Tt.key));let io=yv(gl);if(io)return await ye(J,io.result,!0,{replace:Ue}),{shortCircuited:!0};if(io=yv(oi),io)return X.add(io.key),await ye(J,io.result,!0,{replace:Ue}),{shortCircuited:!0};let{loaderData:Zu,errors:vl}=ET(C,le,gl,Ke,xn,oi,ue);ue.forEach((Tt,pn)=>{Tt.subscribe(Xu=>{(Xu||Tt.done)&&ue.delete(pn)})}),d.v7_partialHydration&&We&&C.errors&&(vl=Sn({},C.errors,vl));let Ka=va(),Vc=ro(z),yl=Ka||Vc||xn.length>0;return Sn({matches:le,loaderData:Zu,errors:vl},yl?{fetchers:new Map(C.fetchers)}:{})}function Z(J){if(J&&!Li(J[1]))return{[J[0]]:J[1].data};if(C.actionData)return Object.keys(C.actionData).length===0?null:C.actionData}function oe(J){return J.forEach(re=>{let le=C.fetchers.get(re.key),xe=Kh(void 0,le?le.data:void 0);C.fetchers.set(re.key,xe)}),new Map(C.fetchers)}function se(J,re,le,xe){if(r)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");Zn(J);let Fe=(xe&&xe.flushSync)===!0,Ge=u||a,st=XC(C.location,C.matches,s,d.v7_prependBasename,le,d.v7_relativeSplatPath,re,xe?.relative),Ue=Ll(Ge,st,s),We=$o(Ue,Ge,st);if(We.active&&We.matches&&(Ue=We.matches),!Ue){rn(J,re,fi(404,{pathname:st}),{flushSync:Fe});return}let{path:Le,submission:Ke,error:_t}=yT(d.v7_normalizeFormMethod,!0,st,xe);if(_t){rn(J,re,_t,{flushSync:Fe});return}let Et=xp(Ue,Le),Xn=(xe&&xe.preventScrollReset)===!0;if(Ke&&Vo(Ke.formMethod)){Ce(J,re,Le,Et,Ue,We.active,Fe,Xn,Ke);return}q.set(J,{routeId:re,path:Le}),Ee(J,re,Le,Et,Ue,We.active,Fe,Xn,Ke)}async function Ce(J,re,le,xe,Fe,Ge,st,Ue,We){sn(),q.delete(J);function Le(Rn){if(!Rn.route.action&&!Rn.route.lazy){let Qu=fi(405,{method:We.formMethod,pathname:le,routeId:re});return rn(J,re,Qu,{flushSync:st}),!0}return!1}if(!Ge&&Le(xe))return;let Ke=C.fetchers.get(J);xt(J,soe(We,Ke),{flushSync:st});let _t=new AbortController,Et=uf(e.history,le,_t.signal,We);if(Ge){let Rn=await Ga(Fe,le,Et.signal);if(Rn.type==="aborted")return;if(Rn.type==="error"){rn(J,re,Rn.error,{flushSync:st});return}else if(Rn.matches){if(Fe=Rn.matches,xe=xp(Fe,le),Le(xe))return}else{rn(J,re,fi(404,{pathname:le}),{flushSync:st});return}}j.set(J,_t);let Xn=I,It=(await Ie("action",C,Et,[xe],Fe,J))[xe.route.id];if(Et.signal.aborted){j.get(J)===_t&&j.delete(J);return}if(d.v7_fetcherPersist&&ee.has(J)){if(Wl(It)||Li(It)){xt(J,ds(void 0));return}}else{if(Wl(It))if(j.delete(J),z>Xn){xt(J,ds(void 0));return}else return X.add(J),xt(J,Kh(We)),ye(Et,It,!1,{fetcherSubmission:We,preventScrollReset:Ue});if(Li(It)){rn(J,re,It.error);return}}if(As(It))throw fi(400,{type:"defer-action"});let xn=C.navigation.location||C.location,Yu=uf(e.history,xn,_t.signal),gl=u||a,oi=C.navigation.state!=="idle"?Ll(gl,C.navigation.location,s):C.matches;Ot(oi,"Didn't find any matches after fetcher action");let io=++I;U.set(J,io);let Zu=Kh(We,It.data);C.fetchers.set(J,Zu);let[vl,Ka]=wT(e.history,C,oi,We,xn,!1,d.v7_skipActionErrorRevalidation,H,W,V,ee,q,X,gl,s,[xe.route.id,It]);Ka.filter(Rn=>Rn.key!==J).forEach(Rn=>{let Qu=Rn.key,Sh=C.fetchers.get(Qu),pg=Kh(void 0,Sh?Sh.data:void 0);C.fetchers.set(Qu,pg),Zn(Qu),Rn.controller&&j.set(Qu,Rn.controller)}),ge({fetchers:new Map(C.fetchers)});let Vc=()=>Ka.forEach(Rn=>Zn(Rn.key));_t.signal.addEventListener("abort",Vc);let{loaderResults:yl,fetcherResults:Tt}=await Ye(C,oi,vl,Ka,Yu);if(_t.signal.aborted)return;_t.signal.removeEventListener("abort",Vc),U.delete(J),j.delete(J),Ka.forEach(Rn=>j.delete(Rn.key));let pn=yv(yl);if(pn)return ye(Yu,pn.result,!1,{preventScrollReset:Ue});if(pn=yv(Tt),pn)return X.add(pn.key),ye(Yu,pn.result,!1,{preventScrollReset:Ue});let{loaderData:Xu,errors:bl}=ET(C,oi,yl,void 0,Ka,Tt,ue);if(C.fetchers.has(J)){let Rn=ds(It.data);C.fetchers.set(J,Rn)}ro(io),C.navigation.state==="loading"&&io>z?(Ot(P,"Expected pending action"),M&&M.abort(),ae(C.navigation.location,{matches:oi,loaderData:Xu,errors:bl,fetchers:new Map(C.fetchers)})):(ge({errors:bl,loaderData:AT(C.loaderData,Xu,oi,bl),fetchers:new Map(C.fetchers)}),H=!1)}async function Ee(J,re,le,xe,Fe,Ge,st,Ue,We){let Le=C.fetchers.get(J);xt(J,Kh(We,Le?Le.data:void 0),{flushSync:st});let Ke=new AbortController,_t=uf(e.history,le,Ke.signal);if(Ge){let It=await Ga(Fe,le,_t.signal);if(It.type==="aborted")return;if(It.type==="error"){rn(J,re,It.error,{flushSync:st});return}else if(It.matches)Fe=It.matches,xe=xp(Fe,le);else{rn(J,re,fi(404,{pathname:le}),{flushSync:st});return}}j.set(J,Ke);let Et=I,Xt=(await Ie("loader",C,_t,[xe],Fe,J))[xe.route.id];if(As(Xt)&&(Xt=await LA(Xt,_t.signal,!0)||Xt),j.get(J)===Ke&&j.delete(J),!_t.signal.aborted){if(ee.has(J)){xt(J,ds(void 0));return}if(Wl(Xt))if(z>Et){xt(J,ds(void 0));return}else{X.add(J),await ye(_t,Xt,!1,{preventScrollReset:Ue});return}if(Li(Xt)){rn(J,re,Xt.error);return}Ot(!As(Xt),"Unhandled fetcher deferred data"),xt(J,ds(Xt.data))}}async function ye(J,re,le,xe){let{submission:Fe,fetcherSubmission:Ge,preventScrollReset:st,replace:Ue}=xe===void 0?{}:xe;re.response.headers.has("X-Remix-Revalidate")&&(H=!0);let We=re.response.headers.get("Location");Ot(We,"Expected a Location header on the redirect Response"),We=ST(We,new URL(J.url),s);let Le=p0(C.location,We,{_isRedirect:!0});if(n){let It=!1;if(re.response.headers.has("X-Remix-Reload-Document"))It=!0;else if(FA.test(We)){const xn=e.history.createURL(We);It=xn.origin!==t.location.origin||Zd(xn.pathname,s)==null}if(It){Ue?t.location.replace(We):t.location.assign(We);return}}M=null;let Ke=Ue===!0||re.response.headers.has("X-Remix-Replace")?qn.Replace:qn.Push,{formMethod:_t,formAction:Et,formEncType:Xn}=C.navigation;!Fe&&!Ge&&_t&&Et&&Xn&&(Fe=TT(C.navigation));let Xt=Fe||Ge;if(Uie.has(re.response.status)&&Xt&&Vo(Xt.formMethod))await qe(Ke,Le,{submission:Sn({},Xt,{formAction:We}),preventScrollReset:st||k,enableViewTransition:le?L:void 0});else{let It=C_(Le,Fe);await qe(Ke,Le,{overrideNavigation:It,fetcherSubmission:Ge,preventScrollReset:st||k,enableViewTransition:le?L:void 0})}}async function Ie(J,re,le,xe,Fe,Ge){let st,Ue={};try{st=await Zie(l,J,re,le,xe,Fe,Ge,o,i)}catch(We){return xe.forEach(Le=>{Ue[Le.route.id]={type:Qt.error,error:We}}),Ue}for(let[We,Le]of Object.entries(st))if(noe(Le)){let Ke=Le.result;Ue[We]={type:Qt.redirect,response:Jie(Ke,le,We,Fe,s,d.v7_relativeSplatPath)}}else Ue[We]=await Qie(Le);return Ue}async function Ye(J,re,le,xe,Fe){let Ge=J.matches,st=Ie("loader",J,Fe,le,re,null),Ue=Promise.all(xe.map(async Ke=>{if(Ke.matches&&Ke.match&&Ke.controller){let Et=(await Ie("loader",J,uf(e.history,Ke.path,Ke.controller.signal),[Ke.match],Ke.matches,Ke.key))[Ke.match.route.id];return{[Ke.key]:Et}}else return Promise.resolve({[Ke.key]:{type:Qt.error,error:fi(404,{pathname:Ke.path})}})})),We=await st,Le=(await Ue).reduce((Ke,_t)=>Object.assign(Ke,_t),{});return await Promise.all([ooe(re,We,Fe.signal,Ge,J.loaderData),aoe(re,Le,xe)]),{loaderResults:We,fetcherResults:Le}}function sn(){H=!0,W.push(...rt()),q.forEach((J,re)=>{j.has(re)&&V.add(re),Zn(re)})}function xt(J,re,le){le===void 0&&(le={}),C.fetchers.set(J,re),ge({fetchers:new Map(C.fetchers)},{flushSync:(le&&le.flushSync)===!0})}function rn(J,re,le,xe){xe===void 0&&(xe={});let Fe=jl(C.matches,re);Yn(J),ge({errors:{[Fe.route.id]:le},fetchers:new Map(C.fetchers)},{flushSync:(xe&&xe.flushSync)===!0})}function eo(J){return d.v7_fetcherPersist&&(G.set(J,(G.get(J)||0)+1),ee.has(J)&&ee.delete(J)),C.fetchers.get(J)||Wie}function Yn(J){let re=C.fetchers.get(J);j.has(J)&&!(re&&re.state==="loading"&&U.has(J))&&Zn(J),q.delete(J),U.delete(J),X.delete(J),ee.delete(J),V.delete(J),C.fetchers.delete(J)}function to(J){if(d.v7_fetcherPersist){let re=(G.get(J)||0)-1;re<=0?(G.delete(J),ee.add(J)):G.set(J,re)}else Yn(J);ge({fetchers:new Map(C.fetchers)})}function Zn(J){let re=j.get(J);re&&(re.abort(),j.delete(J))}function no(J){for(let re of J){let le=eo(re),xe=ds(le.data);C.fetchers.set(re,xe)}}function va(){let J=[],re=!1;for(let le of X){let xe=C.fetchers.get(le);Ot(xe,"Expected fetcher: "+le),xe.state==="loading"&&(X.delete(le),J.push(le),re=!0)}return no(J),re}function ro(J){let re=[];for(let[le,xe]of U)if(xe0}function Gu(J,re){let le=C.blockers.get(J)||Gh;return fe.get(J)!==re&&fe.set(J,re),le}function Ku(J){C.blockers.delete(J),fe.delete(J)}function ya(J,re){let le=C.blockers.get(J)||Gh;Ot(le.state==="unblocked"&&re.state==="blocked"||le.state==="blocked"&&re.state==="blocked"||le.state==="blocked"&&re.state==="proceeding"||le.state==="blocked"&&re.state==="unblocked"||le.state==="proceeding"&&re.state==="unblocked","Invalid blocker state transition: "+le.state+" -> "+re.state);let xe=new Map(C.blockers);xe.set(J,re),ge({blockers:xe})}function Ai(J){let{currentLocation:re,nextLocation:le,historyAction:xe}=J;if(fe.size===0)return;fe.size>1&&lc(!1,"A router only supports one blocker at a time");let Fe=Array.from(fe.entries()),[Ge,st]=Fe[Fe.length-1],Ue=C.blockers.get(Ge);if(!(Ue&&Ue.state==="proceeding")&&st({currentLocation:re,nextLocation:le,historyAction:xe}))return Ge}function ml(J){let re=fi(404,{pathname:J}),le=u||a,{matches:xe,route:Fe}=PT(le);return rt(),{notFoundMatches:xe,route:Fe,error:re}}function rt(J){let re=[];return ue.forEach((le,xe)=>{(!J||J(xe))&&(le.cancel(),re.push(xe),ue.delete(xe))}),re}function $t(J,re,le){if(g=J,y=re,v=le||null,!x&&C.navigation===S_){x=!0;let xe=Vr(C.location,C.matches);xe!=null&&ge({restoreScrollPosition:xe})}return()=>{g=null,y=null,v=null}}function Ht(J,re){return v&&v(J,re.map(xe=>wie(xe,C.loaderData)))||J.key}function Wr(J,re){if(g&&y){let le=Ht(J,re);g[le]=y()}}function Vr(J,re){if(g){let le=Ht(J,re),xe=g[le];if(typeof xe=="number")return xe}return null}function $o(J,re,le){if(c)if(J){if(Object.keys(J[0].params).length>0)return{active:!0,matches:py(re,le,s,!0)}}else return{active:!0,matches:py(re,le,s,!0)||[]};return{active:!1,matches:null}}async function Ga(J,re,le){if(!c)return{type:"success",matches:J};let xe=J;for(;;){let Fe=u==null,Ge=u||a,st=o;try{await c({path:re,matches:xe,patch:(Le,Ke)=>{le.aborted||_T(Le,Ke,Ge,st,i)}})}catch(Le){return{type:"error",error:Le,partialMatches:xe}}finally{Fe&&!le.aborted&&(a=[...a])}if(le.aborted)return{type:"aborted"};let Ue=Ll(Ge,re,s);if(Ue)return{type:"success",matches:Ue};let We=py(Ge,re,s,!0);if(!We||xe.length===We.length&&xe.every((Le,Ke)=>Le.route.id===We[Ke].route.id))return{type:"success",matches:null};xe=We}}function Lx(J){o={},u=Xy(J,i,void 0,o)}function jx(J,re){let le=u==null;_T(J,re,u||a,o,i),le&&(a=[...a],ge({}))}return E={get basename(){return s},get future(){return d},get state(){return C},get routes(){return a},get window(){return t},initialize:Ae,subscribe:we,enableScrollRestoration:$t,navigate:$e,fetch:se,revalidate:Te,createHref:J=>e.history.createHref(J),encodeLocation:J=>e.history.encodeLocation(J),getFetcher:eo,deleteFetcher:to,dispose:de,getBlocker:Gu,deleteBlocker:Ku,patchRoutes:jx,_internalFetchControllers:j,_internalActiveDeferreds:ue,_internalSetRoutes:Lx},E}function qie(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function XC(e,t,n,r,i,o,a,u){let s,l;if(a){s=[];for(let d of t)if(s.push(d),d.route.id===a){l=d;break}}else s=t,l=t[t.length-1];let c=NA(i||".",IA(s,o),Zd(e.pathname,n)||e.pathname,u==="path");if(i==null&&(c.search=e.search,c.hash=e.hash),(i==null||i===""||i===".")&&l){let d=jA(c.search);if(l.route.index&&!d)c.search=c.search?c.search.replace(/^\?/,"?index&"):"?index";else if(!l.route.index&&d){let h=new URLSearchParams(c.search),m=h.getAll("index");h.delete("index"),m.filter(v=>v).forEach(v=>h.append("index",v));let g=h.toString();c.search=g?"?"+g:""}}return r&&n!=="/"&&(c.pathname=c.pathname==="/"?n:_u([n,c.pathname])),cc(c)}function yT(e,t,n,r){if(!r||!qie(r))return{path:n};if(r.formMethod&&!ioe(r.formMethod))return{path:n,error:fi(405,{method:r.formMethod})};let i=()=>({path:n,error:fi(400,{type:"invalid-body"})}),o=r.formMethod||"get",a=e?o.toUpperCase():o.toLowerCase(),u=IF(n);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!Vo(a))return i();let h=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((m,g)=>{let[v,y]=g;return""+m+v+"="+y+` -`},""):String(r.body);return{path:n,submission:{formMethod:a,formAction:u,formEncType:r.formEncType,formData:void 0,json:void 0,text:h}}}else if(r.formEncType==="application/json"){if(!Vo(a))return i();try{let h=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:n,submission:{formMethod:a,formAction:u,formEncType:r.formEncType,formData:void 0,json:h,text:void 0}}}catch{return i()}}}Ot(typeof FormData=="function","FormData is not available in this environment");let s,l;if(r.formData)s=JC(r.formData),l=r.formData;else if(r.body instanceof FormData)s=JC(r.body),l=r.body;else if(r.body instanceof URLSearchParams)s=r.body,l=CT(s);else if(r.body==null)s=new URLSearchParams,l=new FormData;else try{s=new URLSearchParams(r.body),l=CT(s)}catch{return i()}let c={formMethod:a,formAction:u,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:l,json:void 0,text:void 0};if(Vo(c.formMethod))return{path:n,submission:c};let d=zu(n);return t&&d.search&&jA(d.search)&&s.append("index",""),d.search="?"+s,{path:cc(d),submission:c}}function bT(e,t,n){n===void 0&&(n=!1);let r=e.findIndex(i=>i.route.id===t);return r>=0?e.slice(0,n?r+1:r):e}function wT(e,t,n,r,i,o,a,u,s,l,c,d,h,m,g,v){let y=v?Li(v[1])?v[1].error:v[1].data:void 0,x=e.createURL(t.location),w=e.createURL(i),S=n;o&&t.errors?S=bT(n,Object.keys(t.errors)[0],!0):v&&Li(v[1])&&(S=bT(n,v[0]));let A=v?v[1].statusCode:void 0,E=a&&A&&A>=400,C=S.filter((k,M)=>{let{route:L}=k;if(L.lazy)return!0;if(L.loader==null)return!1;if(o)return QC(L,t.loaderData,t.errors);if(Gie(t.loaderData,t.matches[M],k)||s.some(Y=>Y===k.route.id))return!0;let B=t.matches[M],F=k;return xT(k,Sn({currentUrl:x,currentParams:B.params,nextUrl:w,nextParams:F.params},r,{actionResult:y,actionStatus:A,defaultShouldRevalidate:E?!1:u||x.pathname+x.search===w.pathname+w.search||x.search!==w.search||DF(B,F)}))}),P=[];return d.forEach((k,M)=>{if(o||!n.some(H=>H.route.id===k.routeId)||c.has(M))return;let L=Ll(m,k.path,g);if(!L){P.push({key:M,routeId:k.routeId,path:k.path,matches:null,match:null,controller:null});return}let B=t.fetchers.get(M),F=xp(L,k.path),Y=!1;h.has(M)?Y=!1:l.has(M)?(l.delete(M),Y=!0):B&&B.state!=="idle"&&B.data===void 0?Y=u:Y=xT(F,Sn({currentUrl:x,currentParams:t.matches[t.matches.length-1].params,nextUrl:w,nextParams:n[n.length-1].params},r,{actionResult:y,actionStatus:A,defaultShouldRevalidate:E?!1:u})),Y&&P.push({key:M,routeId:k.routeId,path:k.path,matches:L,match:F,controller:new AbortController})}),[C,P]}function QC(e,t,n){if(e.lazy)return!0;if(!e.loader)return!1;let r=t!=null&&t[e.id]!==void 0,i=n!=null&&n[e.id]!==void 0;return!r&&i?!1:typeof e.loader=="function"&&e.loader.hydrate===!0?!0:!r&&!i}function Gie(e,t,n){let r=!t||n.route.id!==t.route.id,i=e[n.route.id]===void 0;return r||i}function DF(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function xT(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n=="boolean")return n}return t.defaultShouldRevalidate}function _T(e,t,n,r,i){var o;let a;if(e){let l=r[e];Ot(l,"No route found to patch children into: routeId = "+e),l.children||(l.children=[]),a=l.children}else a=n;let u=t.filter(l=>!a.some(c=>$F(l,c))),s=Xy(u,i,[e||"_","patch",String(((o=a)==null?void 0:o.length)||"0")],r);a.push(...s)}function $F(e,t){return"id"in e&&"id"in t&&e.id===t.id?!0:e.index===t.index&&e.path===t.path&&e.caseSensitive===t.caseSensitive?(!e.children||e.children.length===0)&&(!t.children||t.children.length===0)?!0:e.children.every((n,r)=>{var i;return(i=t.children)==null?void 0:i.some(o=>$F(n,o))}):!1}async function Kie(e,t,n){if(!e.lazy)return;let r=await e.lazy();if(!e.lazy)return;let i=n[e.id];Ot(i,"No route found in manifest");let o={};for(let a in r){let s=i[a]!==void 0&&a!=="hasErrorBoundary";lc(!s,'Route "'+i.id+'" has a static property "'+a+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+a+'" will be ignored.')),!s&&!yie.has(a)&&(o[a]=r[a])}Object.assign(i,o),Object.assign(i,Sn({},t(i),{lazy:void 0}))}async function Yie(e){let{matches:t}=e,n=t.filter(i=>i.shouldLoad);return(await Promise.all(n.map(i=>i.resolve()))).reduce((i,o,a)=>Object.assign(i,{[n[a].route.id]:o}),{})}async function Zie(e,t,n,r,i,o,a,u,s,l){let c=o.map(m=>m.route.lazy?Kie(m.route,s,u):void 0),d=o.map((m,g)=>{let v=c[g],y=i.some(w=>w.route.id===m.route.id);return Sn({},m,{shouldLoad:y,resolve:async w=>(w&&r.method==="GET"&&(m.route.lazy||m.route.loader)&&(y=!0),y?Xie(t,r,m,v,w,l):Promise.resolve({type:Qt.data,result:void 0}))})}),h=await e({matches:d,request:r,params:o[0].params,fetcherKey:a,context:l});try{await Promise.all(c)}catch{}return h}async function Xie(e,t,n,r,i,o){let a,u,s=l=>{let c,d=new Promise((g,v)=>c=v);u=()=>c(),t.signal.addEventListener("abort",u);let h=g=>typeof l!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+e+'" [routeId: '+n.route.id+"]"))):l({request:t,params:n.params,context:o},...g!==void 0?[g]:[]),m=(async()=>{try{return{type:"data",result:await(i?i(v=>h(v)):h())}}catch(g){return{type:"error",result:g}}})();return Promise.race([m,d])};try{let l=n.route[e];if(r)if(l){let c,[d]=await Promise.all([s(l).catch(h=>{c=h}),r]);if(c!==void 0)throw c;a=d}else if(await r,l=n.route[e],l)a=await s(l);else if(e==="action"){let c=new URL(t.url),d=c.pathname+c.search;throw fi(405,{method:t.method,pathname:d,routeId:n.route.id})}else return{type:Qt.data,result:void 0};else if(l)a=await s(l);else{let c=new URL(t.url),d=c.pathname+c.search;throw fi(404,{pathname:d})}Ot(a.result!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+n.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(l){return{type:Qt.error,result:l}}finally{u&&t.signal.removeEventListener("abort",u)}return a}async function Qie(e){let{result:t,type:n}=e;if(NF(t)){let l;try{let c=t.headers.get("Content-Type");c&&/\bapplication\/json\b/.test(c)?t.body==null?l=null:l=await t.json():l=await t.text()}catch(c){return{type:Qt.error,error:c}}return n===Qt.error?{type:Qt.error,error:new Qy(t.status,t.statusText,l),statusCode:t.status,headers:t.headers}:{type:Qt.data,data:l,statusCode:t.status,headers:t.headers}}if(n===Qt.error){if(kT(t)){var r;if(t.data instanceof Error){var i;return{type:Qt.error,error:t.data,statusCode:(i=t.init)==null?void 0:i.status}}t=new Qy(((r=t.init)==null?void 0:r.status)||500,void 0,t.data)}return{type:Qt.error,error:t,statusCode:tw(t)?t.status:void 0}}if(roe(t)){var o,a;return{type:Qt.deferred,deferredData:t,statusCode:(o=t.init)==null?void 0:o.status,headers:((a=t.init)==null?void 0:a.headers)&&new Headers(t.init.headers)}}if(kT(t)){var u,s;return{type:Qt.data,data:t.data,statusCode:(u=t.init)==null?void 0:u.status,headers:(s=t.init)!=null&&s.headers?new Headers(t.init.headers):void 0}}return{type:Qt.data,data:t}}function Jie(e,t,n,r,i,o){let a=e.headers.get("Location");if(Ot(a,"Redirects returned/thrown from loaders/actions must have a Location header"),!FA.test(a)){let u=r.slice(0,r.findIndex(s=>s.route.id===n)+1);a=XC(new URL(t.url),u,i,!0,a,o),e.headers.set("Location",a)}return e}function ST(e,t,n){if(FA.test(e)){let r=e,i=r.startsWith("//")?new URL(t.protocol+r):new URL(r),o=Zd(i.pathname,n)!=null;if(i.origin===t.origin&&o)return i.pathname+i.search+i.hash}return e}function uf(e,t,n,r){let i=e.createURL(IF(t)).toString(),o={signal:n};if(r&&Vo(r.formMethod)){let{formMethod:a,formEncType:u}=r;o.method=a.toUpperCase(),u==="application/json"?(o.headers=new Headers({"Content-Type":u}),o.body=JSON.stringify(r.json)):u==="text/plain"?o.body=r.text:u==="application/x-www-form-urlencoded"&&r.formData?o.body=JC(r.formData):o.body=r.formData}return new Request(i,o)}function JC(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r=="string"?r:r.name);return t}function CT(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function eoe(e,t,n,r,i){let o={},a=null,u,s=!1,l={},c=n&&Li(n[1])?n[1].error:void 0;return e.forEach(d=>{if(!(d.route.id in t))return;let h=d.route.id,m=t[h];if(Ot(!Wl(m),"Cannot handle redirect results in processLoaderData"),Li(m)){let g=m.error;c!==void 0&&(g=c,c=void 0),a=a||{};{let v=jl(e,h);a[v.route.id]==null&&(a[v.route.id]=g)}o[h]=void 0,s||(s=!0,u=tw(m.error)?m.error.status:500),m.headers&&(l[h]=m.headers)}else As(m)?(r.set(h,m.deferredData),o[h]=m.deferredData.data,m.statusCode!=null&&m.statusCode!==200&&!s&&(u=m.statusCode),m.headers&&(l[h]=m.headers)):(o[h]=m.data,m.statusCode&&m.statusCode!==200&&!s&&(u=m.statusCode),m.headers&&(l[h]=m.headers))}),c!==void 0&&n&&(a={[n[0]]:c},o[n[0]]=void 0),{loaderData:o,errors:a,statusCode:u||200,loaderHeaders:l}}function ET(e,t,n,r,i,o,a){let{loaderData:u,errors:s}=eoe(t,n,r,a);return i.forEach(l=>{let{key:c,match:d,controller:h}=l,m=o[c];if(Ot(m,"Did not find corresponding fetcher result"),!(h&&h.signal.aborted))if(Li(m)){let g=jl(e.matches,d?.route.id);s&&s[g.route.id]||(s=Sn({},s,{[g.route.id]:m.error})),e.fetchers.delete(c)}else if(Wl(m))Ot(!1,"Unhandled fetcher revalidation redirect");else if(As(m))Ot(!1,"Unhandled fetcher deferred data");else{let g=ds(m.data);e.fetchers.set(c,g)}}),{loaderData:u,errors:s}}function AT(e,t,n,r){let i=Sn({},t);for(let o of n){let a=o.route.id;if(t.hasOwnProperty(a)?t[a]!==void 0&&(i[a]=t[a]):e[a]!==void 0&&o.route.loader&&(i[a]=e[a]),r&&r.hasOwnProperty(a))break}return i}function OT(e){return e?Li(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function jl(e,t){return(t?e.slice(0,e.findIndex(r=>r.route.id===t)+1):[...e]).reverse().find(r=>r.route.hasErrorBoundary===!0)||e[0]}function PT(e){let t=e.length===1?e[0]:e.find(n=>n.index||!n.path||n.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function fi(e,t){let{pathname:n,routeId:r,method:i,type:o,message:a}=t===void 0?{}:t,u="Unknown Server Error",s="Unknown @remix-run/router error";return e===400?(u="Bad Request",i&&n&&r?s="You made a "+i+' request to "'+n+'" but '+('did not provide a `loader` for route "'+r+'", ')+"so there is no way to handle the request.":o==="defer-action"?s="defer() is not supported in actions":o==="invalid-body"&&(s="Unable to encode submission body")):e===403?(u="Forbidden",s='Route "'+r+'" does not match URL "'+n+'"'):e===404?(u="Not Found",s='No route matches URL "'+n+'"'):e===405&&(u="Method Not Allowed",i&&n&&r?s="You made a "+i.toUpperCase()+' request to "'+n+'" but '+('did not provide an `action` for route "'+r+'", ')+"so there is no way to handle the request.":i&&(s='Invalid request method "'+i.toUpperCase()+'"')),new Qy(e||500,u,new Error(s),!0)}function yv(e){let t=Object.entries(e);for(let n=t.length-1;n>=0;n--){let[r,i]=t[n];if(Wl(i))return{key:r,result:i}}}function IF(e){let t=typeof e=="string"?zu(e):e;return cc(Sn({},t,{hash:""}))}function toe(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function noe(e){return NF(e.result)&&zie.has(e.result.status)}function As(e){return e.type===Qt.deferred}function Li(e){return e.type===Qt.error}function Wl(e){return(e&&e.type)===Qt.redirect}function kT(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function roe(e){let t=e;return t&&typeof t=="object"&&typeof t.data=="object"&&typeof t.subscribe=="function"&&typeof t.cancel=="function"&&typeof t.resolveData=="function"}function NF(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function ioe(e){return Bie.has(e.toLowerCase())}function Vo(e){return Lie.has(e.toLowerCase())}async function ooe(e,t,n,r,i){let o=Object.entries(t);for(let a=0;ah?.route.id===u);if(!l)continue;let c=r.find(h=>h.route.id===l.route.id),d=c!=null&&!DF(c,l)&&(i&&i[l.route.id])!==void 0;As(s)&&d&&await LA(s,n,!1).then(h=>{h&&(t[u]=h)})}}async function aoe(e,t,n){for(let r=0;rl?.route.id===o)&&As(u)&&(Ot(a,"Expected an AbortController for revalidating fetcher deferred result"),await LA(u,a.signal,!0).then(l=>{l&&(t[i]=l)}))}}async function LA(e,t,n){if(n===void 0&&(n=!1),!await e.deferredData.resolveData(t)){if(n)try{return{type:Qt.data,data:e.deferredData.unwrappedData}}catch(i){return{type:Qt.error,error:i}}return{type:Qt.data,data:e.deferredData.data}}}function jA(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function xp(e,t){let n=typeof t=="string"?zu(t).search:t.search;if(e[e.length-1].route.index&&jA(n||""))return e[e.length-1];let r=TF(e);return r[r.length-1]}function TT(e){let{formMethod:t,formAction:n,formEncType:r,text:i,formData:o,json:a}=e;if(!(!t||!n||!r)){if(i!=null)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:i};if(o!=null)return{formMethod:t,formAction:n,formEncType:r,formData:o,json:void 0,text:void 0};if(a!==void 0)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:a,text:void 0}}}function C_(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function uoe(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function Kh(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function soe(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function ds(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function loe(e,t){try{let n=e.sessionStorage.getItem(RF);if(n){let r=JSON.parse(n);for(let[i,o]of Object.entries(r||{}))o&&Array.isArray(o)&&t.set(i,new Set(o||[]))}}catch{}}function coe(e,t){if(t.size>0){let n={};for(let[r,i]of t)n[r]=[...i];try{e.sessionStorage.setItem(RF,JSON.stringify(n))}catch(r){lc(!1,"Failed to save applied view transitions in sessionStorage ("+r+").")}}}/** + */function rr(){return rr=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function Nc(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function jie(){return Math.random().toString(36).substr(2,8)}function ET(e,t){return{usr:e.state,key:e.key,idx:t}}function F0(e,t,n,r){return n===void 0&&(n=null),rr({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Cs(t):t,{state:n,key:t&&t.key||r||jie()})}function Fc(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Cs(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function Bie(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:o=!1}=r,a=i.history,u=kr.Pop,s=null,l=c();l==null&&(l=0,a.replaceState(rr({},a.state,{idx:l}),""));function c(){return(a.state||{idx:null}).idx}function d(){u=kr.Pop;let b=c(),w=b==null?null:b-l;l=b,s&&s({action:u,location:m.location,delta:w})}function h(b,w){u=kr.Push;let x=F0(m.location,b,w);n(x,b),l=c()+1;let S=ET(x,l),A=m.createHref(x);try{a.pushState(S,"",A)}catch(E){if(E instanceof DOMException&&E.name==="DataCloneError")throw E;i.location.assign(A)}o&&s&&s({action:u,location:m.location,delta:1})}function v(b,w){u=kr.Replace;let x=F0(m.location,b,w);n(x,b),l=c();let S=ET(x,l),A=m.createHref(x);a.replaceState(S,"",A),o&&s&&s({action:u,location:m.location,delta:0})}function g(b){let w=i.location.origin!=="null"?i.location.origin:i.location.href,x=typeof b=="string"?b:Fc(b);return x=x.replace(/ $/,"%20"),ln(w,"No window.location.(origin|href) available to create URL for href: "+x),new URL(x,w)}let m={get action(){return u},get location(){return e(i,a)},listen(b){if(s)throw new Error("A history only accepts one active listener");return i.addEventListener(CT,d),s=b,()=>{i.removeEventListener(CT,d),s=null}},createHref(b){return t(i,b)},createURL:g,encodeLocation(b){let w=g(b);return{pathname:w.pathname,search:w.search,hash:w.hash}},push:h,replace:v,go(b){return a.go(b)}};return m}var $n;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})($n||($n={}));const zie=new Set(["lazy","caseSensitive","path","id","index","children"]);function Uie(e){return e.index===!0}function g1(e,t,n,r){return n===void 0&&(n=[]),r===void 0&&(r={}),e.map((i,o)=>{let a=[...n,String(o)],u=typeof i.id=="string"?i.id:a.join("-");if(ln(i.index!==!0||!i.children,"Cannot specify children on an index route"),ln(!r[u],'Found a route id collision on id "'+u+`". Route id's must be globally unique within Data Router usages`),Uie(i)){let s=rr({},i,t(i),{id:u});return r[u]=s,s}else{let s=rr({},i,t(i),{id:u,children:void 0});return r[u]=s,i.children&&(s.children=g1(i.children,t,a,r)),s}})}function fc(e,t,n){return n===void 0&&(n="/"),Dy(e,t,n,!1)}function Dy(e,t,n,r){let i=typeof t=="string"?Cs(t):t,o=Ch(i.pathname||"/",n);if(o==null)return null;let a=BF(e);Vie(a);let u=null;for(let s=0;u==null&&s{let s={relativePath:u===void 0?o.path||"":u,caseSensitive:o.caseSensitive===!0,childrenIndex:a,route:o};s.relativePath.startsWith("/")&&(ln(s.relativePath.startsWith(r),'Absolute route path "'+s.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),s.relativePath=s.relativePath.slice(r.length));let l=os([r,s.relativePath]),c=n.concat(s);o.children&&o.children.length>0&&(ln(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+l+'".')),BF(o.children,t,c,l)),!(o.path==null&&!o.index)&&t.push({path:l,score:Xie(l,o.index),routesMeta:c})};return e.forEach((o,a)=>{var u;if(o.path===""||!((u=o.path)!=null&&u.includes("?")))i(o,a);else for(let s of zF(o.path))i(o,a,s)}),t}function zF(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return i?[o,""]:[o];let a=zF(r.join("/")),u=[];return u.push(...a.map(s=>s===""?o:[o,s].join("/"))),i&&u.push(...a),u.map(s=>e.startsWith("/")&&s===""?"/":s)}function Vie(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:Qie(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const Hie=/^:[\w-]+$/,qie=3,Kie=2,Gie=1,Yie=10,Zie=-2,AT=e=>e==="*";function Xie(e,t){let n=e.split("/"),r=n.length;return n.some(AT)&&(r+=Zie),t&&(r+=Kie),n.filter(i=>!AT(i)).reduce((i,o)=>i+(Hie.test(o)?qie:o===""?Gie:Yie),r)}function Qie(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function Jie(e,t,n){n===void 0&&(n=!1);let{routesMeta:r}=e,i={},o="/",a=[];for(let u=0;u{let{paramName:h,isOptional:v}=c;if(h==="*"){let m=u[d]||"";a=o.slice(0,o.length-m.length).replace(/(.)\/+$/,"$1")}const g=u[d];return v&&!g?l[h]=void 0:l[h]=(g||"").replace(/%2F/g,"/"),l},{}),pathname:o,pathnameBase:a,pattern:e}}function eoe(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),Nc(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(a,u,s)=>(r.push({paramName:u,isOptional:s!=null}),s?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function toe(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Nc(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Ch(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function noe(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?Cs(e):e;return{pathname:n?n.startsWith("/")?n:roe(n,t):t,search:ooe(r),hash:aoe(i)}}function roe(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function F_(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function UF(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Y4(e,t){let n=UF(e);return t?n.map((r,i)=>i===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function Z4(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=Cs(e):(i=rr({},e),ln(!i.pathname||!i.pathname.includes("?"),F_("?","pathname","search",i)),ln(!i.pathname||!i.pathname.includes("#"),F_("#","pathname","hash",i)),ln(!i.search||!i.search.includes("#"),F_("#","search","hash",i)));let o=e===""||i.pathname==="",a=o?"/":i.pathname,u;if(a==null)u=n;else{let d=t.length-1;if(!r&&a.startsWith("..")){let h=a.split("/");for(;h[0]==="..";)h.shift(),d-=1;i.pathname=h.join("/")}u=d>=0?t[d]:"/"}let s=noe(i,u),l=a&&a!=="/"&&a.endsWith("/"),c=(o||a===".")&&n.endsWith("/");return!s.pathname.endsWith("/")&&(l||c)&&(s.pathname+="/"),s}const os=e=>e.join("/").replace(/\/\/+/g,"/"),ioe=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),ooe=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,aoe=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class m1{constructor(t,n,r,i){i===void 0&&(i=!1),this.status=t,this.statusText=n||"",this.internal=i,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function Sx(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const WF=["post","put","patch","delete"],uoe=new Set(WF),soe=["get",...WF],loe=new Set(soe),coe=new Set([301,302,303,307,308]),foe=new Set([307,308]),L_={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},doe={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},xp={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},X4=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,hoe=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),VF="remix-router-transitions";function poe(e){const t=e.window?e.window:typeof window<"u"?window:void 0,n=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u",r=!n;ln(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let i;if(e.mapRouteProperties)i=e.mapRouteProperties;else if(e.detectErrorBoundary){let oe=e.detectErrorBoundary;i=le=>({hasErrorBoundary:oe(le)})}else i=hoe;let o={},a=g1(e.routes,i,void 0,o),u,s=e.basename||"/",l=e.dataStrategy||yoe,c=e.patchRoutesOnNavigation,d=rr({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},e.future),h=null,v=new Set,g=null,m=null,b=null,w=e.hydrationData!=null,x=fc(a,e.history.location,s),S=null;if(x==null&&!c){let oe=to(404,{pathname:e.history.location.pathname}),{matches:le,route:xe}=LT(a);x=le,S={[xe.id]:oe}}x&&!e.hydrationData&&Yr(x,a,e.history.location.pathname).active&&(x=null);let A;if(x)if(x.some(oe=>oe.route.lazy))A=!1;else if(!x.some(oe=>oe.route.loader))A=!0;else if(d.v7_partialHydration){let oe=e.hydrationData?e.hydrationData.loaderData:null,le=e.hydrationData?e.hydrationData.errors:null;if(le){let xe=x.findIndex(k=>le[k.route.id]!==void 0);A=x.slice(0,xe+1).every(k=>!fC(k.route,oe,le))}else A=x.every(xe=>!fC(xe.route,oe,le))}else A=e.hydrationData!=null;else if(A=!1,x=[],d.v7_partialHydration){let oe=Yr(null,a,e.history.location.pathname);oe.active&&oe.matches&&(x=oe.matches)}let E,C={historyAction:e.history.action,location:e.history.location,matches:x,initialized:A,navigation:L_,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||S,fetchers:new Map,blockers:new Map},T=kr.Pop,M=!1,F,U=!1,H=new Map,W=null,ie=!1,Z=!1,G=[],K=new Set,V=new Map,B=0,q=-1,Y=new Map,ue=new Set,Q=new Map,J=new Map,se=new Set,de=new Map,Se=new Map,ge;function Ze(){if(h=e.history.listen(oe=>{let{action:le,location:xe,delta:k}=oe;if(ge){ge(),ge=void 0;return}Nc(Se.size===0||k!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let D=Dr({currentLocation:C.location,nextLocation:xe,historyAction:le});if(D&&k!=null){let $=new Promise(P=>{ge=P});e.history.go(k*-1),xi(D,{state:"blocked",location:xe,proceed(){xi(D,{state:"proceeding",proceed:void 0,reset:void 0,location:xe}),$.then(()=>e.history.go(k))},reset(){let P=new Map(C.blockers);P.set(D,xp),$e({blockers:P})}});return}return It(le,xe)}),n){Roe(t,H);let oe=()=>Doe(t,H);t.addEventListener("pagehide",oe),W=()=>t.removeEventListener("pagehide",oe)}return C.initialized||It(kr.Pop,C.location,{initialHydration:!0}),E}function Pe(){h&&h(),W&&W(),v.clear(),F&&F.abort(),C.fetchers.forEach((oe,le)=>br(le)),C.blockers.forEach((oe,le)=>go(le))}function Fe(oe){return v.add(oe),()=>v.delete(oe)}function $e(oe,le){le===void 0&&(le={}),C=rr({},C,oe);let xe=[],k=[];d.v7_fetcherPersist&&C.fetchers.forEach((D,$)=>{D.state==="idle"&&(se.has($)?k.push($):xe.push($))}),[...v].forEach(D=>D(C,{deletedFetchers:k,viewTransitionOpts:le.viewTransitionOpts,flushSync:le.flushSync===!0})),d.v7_fetcherPersist&&(xe.forEach(D=>C.fetchers.delete(D)),k.forEach(D=>br(D)))}function be(oe,le,xe){var k,D;let{flushSync:$}=xe===void 0?{}:xe,P=C.actionData!=null&&C.navigation.formMethod!=null&&Ma(C.navigation.formMethod)&&C.navigation.state==="loading"&&((k=oe.state)==null?void 0:k._isRedirect)!==!0,N;le.actionData?Object.keys(le.actionData).length>0?N=le.actionData:N=null:P?N=C.actionData:N=null;let ee=le.loaderData?NT(C.loaderData,le.loaderData,le.matches||[],le.errors):C.loaderData,ne=C.blockers;ne.size>0&&(ne=new Map(ne),ne.forEach((Be,He)=>ne.set(He,xp)));let he=M===!0||C.navigation.formMethod!=null&&Ma(C.navigation.formMethod)&&((D=oe.state)==null?void 0:D._isRedirect)!==!0;u&&(a=u,u=void 0),ie||T===kr.Pop||(T===kr.Push?e.history.push(oe,oe.state):T===kr.Replace&&e.history.replace(oe,oe.state));let Ce;if(T===kr.Pop){let Be=H.get(C.location.pathname);Be&&Be.has(oe.pathname)?Ce={currentLocation:C.location,nextLocation:oe}:H.has(oe.pathname)&&(Ce={currentLocation:oe,nextLocation:C.location})}else if(U){let Be=H.get(C.location.pathname);Be?Be.add(oe.pathname):(Be=new Set([oe.pathname]),H.set(C.location.pathname,Be)),Ce={currentLocation:C.location,nextLocation:oe}}$e(rr({},le,{actionData:N,loaderData:ee,historyAction:T,location:oe,initialized:!0,navigation:L_,revalidation:"idle",restoreScrollPosition:ur(oe,le.matches||C.matches),preventScrollReset:he,blockers:ne}),{viewTransitionOpts:Ce,flushSync:$===!0}),T=kr.Pop,M=!1,U=!1,ie=!1,Z=!1,G=[]}async function yt(oe,le){if(typeof oe=="number"){e.history.go(oe);return}let xe=cC(C.location,C.matches,s,d.v7_prependBasename,oe,d.v7_relativeSplatPath,le?.fromRouteId,le?.relative),{path:k,submission:D,error:$}=OT(d.v7_normalizeFormMethod,!1,xe,le),P=C.location,N=F0(C.location,k,le&&le.state);N=rr({},N,e.history.encodeLocation(N));let ee=le&&le.replace!=null?le.replace:void 0,ne=kr.Push;ee===!0?ne=kr.Replace:ee===!1||D!=null&&Ma(D.formMethod)&&D.formAction===C.location.pathname+C.location.search&&(ne=kr.Replace);let he=le&&"preventScrollReset"in le?le.preventScrollReset===!0:void 0,Ce=(le&&le.flushSync)===!0,Be=Dr({currentLocation:P,nextLocation:N,historyAction:ne});if(Be){xi(Be,{state:"blocked",location:N,proceed(){xi(Be,{state:"proceeding",proceed:void 0,reset:void 0,location:N}),yt(oe,le)},reset(){let He=new Map(C.blockers);He.set(Be,xp),$e({blockers:He})}});return}return await It(ne,N,{submission:D,pendingError:$,preventScrollReset:he,replace:le&&le.replace,enableViewTransition:le&&le.viewTransition,flushSync:Ce})}function lt(){if(bn(),$e({revalidation:"loading"}),C.navigation.state!=="submitting"){if(C.navigation.state==="idle"){It(C.historyAction,C.location,{startUninterruptedRevalidation:!0});return}It(T||C.historyAction,C.navigation.location,{overrideNavigation:C.navigation,enableViewTransition:U===!0})}}async function It(oe,le,xe){F&&F.abort(),F=null,T=oe,ie=(xe&&xe.startUninterruptedRevalidation)===!0,qn(C.location,C.matches),M=(xe&&xe.preventScrollReset)===!0,U=(xe&&xe.enableViewTransition)===!0;let k=u||a,D=xe&&xe.overrideNavigation,$=fc(k,le,s),P=(xe&&xe.flushSync)===!0,N=Yr($,k,le.pathname);if(N.active&&N.matches&&($=N.matches),!$){let{error:ct,notFoundMatches:Ne,route:rt}=wa(le.pathname);be(le,{matches:Ne,loaderData:{},errors:{[rt.id]:ct}},{flushSync:P});return}if(C.initialized&&!Z&&Coe(C.location,le)&&!(xe&&xe.submission&&Ma(xe.submission.formMethod))){be(le,{matches:$},{flushSync:P});return}F=new AbortController;let ee=Df(e.history,le,F.signal,xe&&xe.submission),ne;if(xe&&xe.pendingError)ne=[dc($).route.id,{type:$n.error,error:xe.pendingError}];else if(xe&&xe.submission&&Ma(xe.submission.formMethod)){let ct=await mn(ee,le,xe.submission,$,N.active,{replace:xe.replace,flushSync:P});if(ct.shortCircuited)return;if(ct.pendingActionResult){let[Ne,rt]=ct.pendingActionResult;if(ko(rt)&&Sx(rt.error)&&rt.error.status===404){F=null,be(le,{matches:ct.matches,loaderData:{},errors:{[Ne]:rt.error}});return}}$=ct.matches||$,ne=ct.pendingActionResult,D=j_(le,xe.submission),P=!1,N.active=!1,ee=Df(e.history,ee.url,ee.signal)}let{shortCircuited:he,matches:Ce,loaderData:Be,errors:He}=await en(ee,le,$,N.active,D,xe&&xe.submission,xe&&xe.fetcherSubmission,xe&&xe.replace,xe&&xe.initialHydration===!0,P,ne);he||(F=null,be(le,rr({matches:Ce||$},FT(ne),{loaderData:Be,errors:He})))}async function mn(oe,le,xe,k,D,$){$===void 0&&($={}),bn();let P=Toe(le,xe);if($e({navigation:P},{flushSync:$.flushSync===!0}),D){let ne=await mo(k,le.pathname,oe.signal);if(ne.type==="aborted")return{shortCircuited:!0};if(ne.type==="error"){let he=dc(ne.partialMatches).route.id;return{matches:ne.partialMatches,pendingActionResult:[he,{type:$n.error,error:ne.error}]}}else if(ne.matches)k=ne.matches;else{let{notFoundMatches:he,error:Ce,route:Be}=wa(le.pathname);return{matches:he,pendingActionResult:[Be.id,{type:$n.error,error:Ce}]}}}let N,ee=qp(k,le);if(!ee.route.action&&!ee.route.lazy)N={type:$n.error,error:to(405,{method:oe.method,pathname:le.pathname,routeId:ee.route.id})};else if(N=(await nt("action",C,oe,[ee],k,null))[ee.route.id],oe.signal.aborted)return{shortCircuited:!0};if(gc(N)){let ne;return $&&$.replace!=null?ne=$.replace:ne=DT(N.response.headers.get("Location"),new URL(oe.url),s)===C.location.pathname+C.location.search,await ke(oe,N,!0,{submission:xe,replace:ne}),{shortCircuited:!0}}if(rl(N))throw to(400,{type:"defer-action"});if(ko(N)){let ne=dc(k,ee.route.id);return($&&$.replace)!==!0&&(T=kr.Push),{matches:k,pendingActionResult:[ne.route.id,N]}}return{matches:k,pendingActionResult:[ee.route.id,N]}}async function en(oe,le,xe,k,D,$,P,N,ee,ne,he){let Ce=D||j_(le,$),Be=$||P||BT(Ce),He=!ie&&(!d.v7_partialHydration||!ee);if(k){if(He){let qe=re(he);$e(rr({navigation:Ce},qe!==void 0?{actionData:qe}:{}),{flushSync:ne})}let Le=await mo(xe,le.pathname,oe.signal);if(Le.type==="aborted")return{shortCircuited:!0};if(Le.type==="error"){let qe=dc(Le.partialMatches).route.id;return{matches:Le.partialMatches,loaderData:{},errors:{[qe]:Le.error}}}else if(Le.matches)xe=Le.matches;else{let{error:qe,notFoundMatches:Ge,route:me}=wa(le.pathname);return{matches:Ge,loaderData:{},errors:{[me.id]:qe}}}}let ct=u||a,[Ne,rt]=TT(e.history,C,xe,Be,le,d.v7_partialHydration&&ee===!0,d.v7_skipActionErrorRevalidation,Z,G,K,se,Q,ue,ct,s,he);if(_t(Le=>!(xe&&xe.some(qe=>qe.route.id===Le))||Ne&&Ne.some(qe=>qe.route.id===Le)),q=++B,Ne.length===0&&rt.length===0){let Le=bi();return be(le,rr({matches:xe,loaderData:{},errors:he&&ko(he[1])?{[he[0]]:he[1].error}:null},FT(he),Le?{fetchers:new Map(C.fetchers)}:{}),{flushSync:ne}),{shortCircuited:!0}}if(He){let Le={};if(!k){Le.navigation=Ce;let qe=re(he);qe!==void 0&&(Le.actionData=qe)}rt.length>0&&(Le.fetchers=pe(rt)),$e(Le,{flushSync:ne})}rt.forEach(Le=>{ar(Le.key),Le.controller&&V.set(Le.key,Le.controller)});let bt=()=>rt.forEach(Le=>ar(Le.key));F&&F.signal.addEventListener("abort",bt);let{loaderResults:At,fetcherResults:vt}=await gt(C,xe,Ne,rt,oe);if(oe.signal.aborted)return{shortCircuited:!0};F&&F.signal.removeEventListener("abort",bt),rt.forEach(Le=>V.delete(Le.key));let ht=jm(At);if(ht)return await ke(oe,ht.result,!0,{replace:N}),{shortCircuited:!0};if(ht=jm(vt),ht)return ue.add(ht.key),await ke(oe,ht.result,!0,{replace:N}),{shortCircuited:!0};let{loaderData:xt,errors:wt}=IT(C,xe,At,he,rt,vt,de);de.forEach((Le,qe)=>{Le.subscribe(Ge=>{(Ge||Le.done)&&de.delete(qe)})}),d.v7_partialHydration&&ee&&C.errors&&(wt=rr({},C.errors,wt));let Je=bi(),st=Rr(q),Qe=Je||st||rt.length>0;return rr({matches:xe,loaderData:xt,errors:wt},Qe?{fetchers:new Map(C.fetchers)}:{})}function re(oe){if(oe&&!ko(oe[1]))return{[oe[0]]:oe[1].data};if(C.actionData)return Object.keys(C.actionData).length===0?null:C.actionData}function pe(oe){return oe.forEach(le=>{let xe=C.fetchers.get(le.key),k=wp(void 0,xe?xe.data:void 0);C.fetchers.set(le.key,k)}),new Map(C.fetchers)}function ye(oe,le,xe,k){if(r)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");ar(oe);let D=(k&&k.flushSync)===!0,$=u||a,P=cC(C.location,C.matches,s,d.v7_prependBasename,xe,d.v7_relativeSplatPath,le,k?.relative),N=fc($,P,s),ee=Yr(N,$,P);if(ee.active&&ee.matches&&(N=ee.matches),!N){xn(oe,le,to(404,{pathname:P}),{flushSync:D});return}let{path:ne,submission:he,error:Ce}=OT(d.v7_normalizeFormMethod,!0,P,k);if(Ce){xn(oe,le,Ce,{flushSync:D});return}let Be=qp(N,ne),He=(k&&k.preventScrollReset)===!0;if(he&&Ma(he.formMethod)){Ue(oe,le,ne,Be,N,ee.active,D,He,he);return}Q.set(oe,{routeId:le,path:ne}),je(oe,le,ne,Be,N,ee.active,D,He,he)}async function Ue(oe,le,xe,k,D,$,P,N,ee){bn(),Q.delete(oe);function ne(ve){if(!ve.route.action&&!ve.route.lazy){let De=to(405,{method:ee.formMethod,pathname:xe,routeId:le});return xn(oe,le,De,{flushSync:P}),!0}return!1}if(!$&&ne(k))return;let he=C.fetchers.get(oe);Vt(oe,Moe(ee,he),{flushSync:P});let Ce=new AbortController,Be=Df(e.history,xe,Ce.signal,ee);if($){let ve=await mo(D,xe,Be.signal);if(ve.type==="aborted")return;if(ve.type==="error"){xn(oe,le,ve.error,{flushSync:P});return}else if(ve.matches){if(D=ve.matches,k=qp(D,xe),ne(k))return}else{xn(oe,le,to(404,{pathname:xe}),{flushSync:P});return}}V.set(oe,Ce);let He=B,Ne=(await nt("action",C,Be,[k],D,oe))[k.route.id];if(Be.signal.aborted){V.get(oe)===Ce&&V.delete(oe);return}if(d.v7_fetcherPersist&&se.has(oe)){if(gc(Ne)||ko(Ne)){Vt(oe,Ws(void 0));return}}else{if(gc(Ne))if(V.delete(oe),q>He){Vt(oe,Ws(void 0));return}else return ue.add(oe),Vt(oe,wp(ee)),ke(Be,Ne,!1,{fetcherSubmission:ee,preventScrollReset:N});if(ko(Ne)){xn(oe,le,Ne.error);return}}if(rl(Ne))throw to(400,{type:"defer-action"});let rt=C.navigation.location||C.location,bt=Df(e.history,rt,Ce.signal),At=u||a,vt=C.navigation.state!=="idle"?fc(At,C.navigation.location,s):C.matches;ln(vt,"Didn't find any matches after fetcher action");let ht=++B;Y.set(oe,ht);let xt=wp(ee,Ne.data);C.fetchers.set(oe,xt);let[wt,Je]=TT(e.history,C,vt,ee,rt,!1,d.v7_skipActionErrorRevalidation,Z,G,K,se,Q,ue,At,s,[k.route.id,Ne]);Je.filter(ve=>ve.key!==oe).forEach(ve=>{let De=ve.key,Oe=C.fetchers.get(De),Te=wp(void 0,Oe?Oe.data:void 0);C.fetchers.set(De,Te),ar(De),ve.controller&&V.set(De,ve.controller)}),$e({fetchers:new Map(C.fetchers)});let st=()=>Je.forEach(ve=>ar(ve.key));Ce.signal.addEventListener("abort",st);let{loaderResults:Qe,fetcherResults:Le}=await gt(C,vt,wt,Je,bt);if(Ce.signal.aborted)return;Ce.signal.removeEventListener("abort",st),Y.delete(oe),V.delete(oe),Je.forEach(ve=>V.delete(ve.key));let qe=jm(Qe);if(qe)return ke(bt,qe.result,!1,{preventScrollReset:N});if(qe=jm(Le),qe)return ue.add(qe.key),ke(bt,qe.result,!1,{preventScrollReset:N});let{loaderData:Ge,errors:me}=IT(C,vt,Qe,void 0,Je,Le,de);if(C.fetchers.has(oe)){let ve=Ws(Ne.data);C.fetchers.set(oe,ve)}Rr(ht),C.navigation.state==="loading"&&ht>q?(ln(T,"Expected pending action"),F&&F.abort(),be(C.navigation.location,{matches:vt,loaderData:Ge,errors:me,fetchers:new Map(C.fetchers)})):($e({errors:me,loaderData:NT(C.loaderData,Ge,vt,me),fetchers:new Map(C.fetchers)}),Z=!1)}async function je(oe,le,xe,k,D,$,P,N,ee){let ne=C.fetchers.get(oe);Vt(oe,wp(ee,ne?ne.data:void 0),{flushSync:P});let he=new AbortController,Ce=Df(e.history,xe,he.signal);if($){let Ne=await mo(D,xe,Ce.signal);if(Ne.type==="aborted")return;if(Ne.type==="error"){xn(oe,le,Ne.error,{flushSync:P});return}else if(Ne.matches)D=Ne.matches,k=qp(D,xe);else{xn(oe,le,to(404,{pathname:xe}),{flushSync:P});return}}V.set(oe,he);let Be=B,ct=(await nt("loader",C,Ce,[k],D,oe))[k.route.id];if(rl(ct)&&(ct=await Q4(ct,Ce.signal,!0)||ct),V.get(oe)===he&&V.delete(oe),!Ce.signal.aborted){if(se.has(oe)){Vt(oe,Ws(void 0));return}if(gc(ct))if(q>Be){Vt(oe,Ws(void 0));return}else{ue.add(oe),await ke(Ce,ct,!1,{preventScrollReset:N});return}if(ko(ct)){xn(oe,le,ct.error);return}ln(!rl(ct),"Unhandled fetcher deferred data"),Vt(oe,Ws(ct.data))}}async function ke(oe,le,xe,k){let{submission:D,fetcherSubmission:$,preventScrollReset:P,replace:N}=k===void 0?{}:k;le.response.headers.has("X-Remix-Revalidate")&&(Z=!0);let ee=le.response.headers.get("Location");ln(ee,"Expected a Location header on the redirect Response"),ee=DT(ee,new URL(oe.url),s);let ne=F0(C.location,ee,{_isRedirect:!0});if(n){let Ne=!1;if(le.response.headers.has("X-Remix-Reload-Document"))Ne=!0;else if(X4.test(ee)){const rt=e.history.createURL(ee);Ne=rt.origin!==t.location.origin||Ch(rt.pathname,s)==null}if(Ne){N?t.location.replace(ee):t.location.assign(ee);return}}F=null;let he=N===!0||le.response.headers.has("X-Remix-Replace")?kr.Replace:kr.Push,{formMethod:Ce,formAction:Be,formEncType:He}=C.navigation;!D&&!$&&Ce&&Be&&He&&(D=BT(C.navigation));let ct=D||$;if(foe.has(le.response.status)&&ct&&Ma(ct.formMethod))await It(he,ne,{submission:rr({},ct,{formAction:ee}),preventScrollReset:P||M,enableViewTransition:xe?U:void 0});else{let Ne=j_(ne,D);await It(he,ne,{overrideNavigation:Ne,fetcherSubmission:$,preventScrollReset:P||M,enableViewTransition:xe?U:void 0})}}async function nt(oe,le,xe,k,D,$){let P,N={};try{P=await boe(l,oe,le,xe,k,D,$,o,i)}catch(ee){return k.forEach(ne=>{N[ne.route.id]={type:$n.error,error:ee}}),N}for(let[ee,ne]of Object.entries(P))if(Eoe(ne)){let he=ne.result;N[ee]={type:$n.redirect,response:_oe(he,xe,ee,D,s,d.v7_relativeSplatPath)}}else N[ee]=await woe(ne);return N}async function gt(oe,le,xe,k,D){let $=oe.matches,P=nt("loader",oe,D,xe,le,null),N=Promise.all(k.map(async he=>{if(he.matches&&he.match&&he.controller){let Be=(await nt("loader",oe,Df(e.history,he.path,he.controller.signal),[he.match],he.matches,he.key))[he.match.route.id];return{[he.key]:Be}}else return Promise.resolve({[he.key]:{type:$n.error,error:to(404,{pathname:he.path})}})})),ee=await P,ne=(await N).reduce((he,Ce)=>Object.assign(he,Ce),{});return await Promise.all([Ooe(le,ee,D.signal,$,oe.loaderData),koe(le,ne,k)]),{loaderResults:ee,fetcherResults:ne}}function bn(){Z=!0,G.push(..._t()),Q.forEach((oe,le)=>{V.has(le)&&K.add(le),ar(le)})}function Vt(oe,le,xe){xe===void 0&&(xe={}),C.fetchers.set(oe,le),$e({fetchers:new Map(C.fetchers)},{flushSync:(xe&&xe.flushSync)===!0})}function xn(oe,le,xe,k){k===void 0&&(k={});let D=dc(C.matches,le);br(oe),$e({errors:{[D.route.id]:xe},fetchers:new Map(C.fetchers)},{flushSync:(k&&k.flushSync)===!0})}function Ii(oe){return d.v7_fetcherPersist&&(J.set(oe,(J.get(oe)||0)+1),se.has(oe)&&se.delete(oe)),C.fetchers.get(oe)||doe}function br(oe){let le=C.fetchers.get(oe);V.has(oe)&&!(le&&le.state==="loading"&&Y.has(oe))&&ar(oe),Q.delete(oe),Y.delete(oe),ue.delete(oe),se.delete(oe),K.delete(oe),C.fetchers.delete(oe)}function yi(oe){if(d.v7_fetcherPersist){let le=(J.get(oe)||0)-1;le<=0?(J.delete(oe),se.add(oe)):J.set(oe,le)}else br(oe);$e({fetchers:new Map(C.fetchers)})}function ar(oe){let le=V.get(oe);le&&(le.abort(),V.delete(oe))}function ui(oe){for(let le of oe){let xe=Ii(le),k=Ws(xe.data);C.fetchers.set(le,k)}}function bi(){let oe=[],le=!1;for(let xe of ue){let k=C.fetchers.get(xe);ln(k,"Expected fetcher: "+xe),k.state==="loading"&&(ue.delete(xe),oe.push(xe),le=!0)}return ui(oe),le}function Rr(oe){let le=[];for(let[xe,k]of Y)if(k0}function Yi(oe,le){let xe=C.blockers.get(oe)||xp;return Se.get(oe)!==le&&Se.set(oe,le),xe}function go(oe){C.blockers.delete(oe),Se.delete(oe)}function xi(oe,le){let xe=C.blockers.get(oe)||xp;ln(xe.state==="unblocked"&&le.state==="blocked"||xe.state==="blocked"&&le.state==="blocked"||xe.state==="blocked"&&le.state==="proceeding"||xe.state==="blocked"&&le.state==="unblocked"||xe.state==="proceeding"&&le.state==="unblocked","Invalid blocker state transition: "+xe.state+" -> "+le.state);let k=new Map(C.blockers);k.set(oe,le),$e({blockers:k})}function Dr(oe){let{currentLocation:le,nextLocation:xe,historyAction:k}=oe;if(Se.size===0)return;Se.size>1&&Nc(!1,"A router only supports one blocker at a time");let D=Array.from(Se.entries()),[$,P]=D[D.length-1],N=C.blockers.get($);if(!(N&&N.state==="proceeding")&&P({currentLocation:le,nextLocation:xe,historyAction:k}))return $}function wa(oe){let le=to(404,{pathname:oe}),xe=u||a,{matches:k,route:D}=LT(xe);return _t(),{notFoundMatches:k,route:D,error:le}}function _t(oe){let le=[];return de.forEach((xe,k)=>{(!oe||oe(k))&&(xe.cancel(),le.push(k),de.delete(k))}),le}function fn(oe,le,xe){if(g=oe,b=le,m=xe||null,!w&&C.navigation===L_){w=!0;let k=ur(C.location,C.matches);k!=null&&$e({restoreScrollPosition:k})}return()=>{g=null,b=null,m=null}}function wn(oe,le){return m&&m(oe,le.map(k=>Wie(k,C.loaderData)))||oe.key}function qn(oe,le){if(g&&b){let xe=wn(oe,le);g[xe]=b()}}function ur(oe,le){if(g){let xe=wn(oe,le),k=g[xe];if(typeof k=="number")return k}return null}function Yr(oe,le,xe){if(c)if(oe){if(Object.keys(oe[0].params).length>0)return{active:!0,matches:Dy(le,xe,s,!0)}}else return{active:!0,matches:Dy(le,xe,s,!0)||[]};return{active:!1,matches:null}}async function mo(oe,le,xe){if(!c)return{type:"success",matches:oe};let k=oe;for(;;){let D=u==null,$=u||a,P=o;try{await c({path:le,matches:k,patch:(ne,he)=>{xe.aborted||RT(ne,he,$,P,i)}})}catch(ne){return{type:"error",error:ne,partialMatches:k}}finally{D&&!xe.aborted&&(a=[...a])}if(xe.aborted)return{type:"aborted"};let N=fc($,le,s);if(N)return{type:"success",matches:N};let ee=Dy($,le,s,!0);if(!ee||k.length===ee.length&&k.every((ne,he)=>ne.route.id===ee[he].route.id))return{type:"success",matches:null};k=ee}}function ql(oe){o={},u=g1(oe,i,void 0,o)}function yf(oe,le){let xe=u==null;RT(oe,le,u||a,o,i),xe&&(a=[...a],$e({}))}return E={get basename(){return s},get future(){return d},get state(){return C},get routes(){return a},get window(){return t},initialize:Ze,subscribe:Fe,enableScrollRestoration:fn,navigate:yt,fetch:ye,revalidate:lt,createHref:oe=>e.history.createHref(oe),encodeLocation:oe=>e.history.encodeLocation(oe),getFetcher:Ii,deleteFetcher:yi,dispose:Pe,getBlocker:Yi,deleteBlocker:go,patchRoutes:yf,_internalFetchControllers:V,_internalActiveDeferreds:de,_internalSetRoutes:ql},E}function voe(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function cC(e,t,n,r,i,o,a,u){let s,l;if(a){s=[];for(let d of t)if(s.push(d),d.route.id===a){l=d;break}}else s=t,l=t[t.length-1];let c=Z4(i||".",Y4(s,o),Ch(e.pathname,n)||e.pathname,u==="path");if(i==null&&(c.search=e.search,c.hash=e.hash),(i==null||i===""||i===".")&&l){let d=J4(c.search);if(l.route.index&&!d)c.search=c.search?c.search.replace(/^\?/,"?index&"):"?index";else if(!l.route.index&&d){let h=new URLSearchParams(c.search),v=h.getAll("index");h.delete("index"),v.filter(m=>m).forEach(m=>h.append("index",m));let g=h.toString();c.search=g?"?"+g:""}}return r&&n!=="/"&&(c.pathname=c.pathname==="/"?n:os([n,c.pathname])),Fc(c)}function OT(e,t,n,r){if(!r||!voe(r))return{path:n};if(r.formMethod&&!Poe(r.formMethod))return{path:n,error:to(405,{method:r.formMethod})};let i=()=>({path:n,error:to(400,{type:"invalid-body"})}),o=r.formMethod||"get",a=e?o.toUpperCase():o.toLowerCase(),u=KF(n);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!Ma(a))return i();let h=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((v,g)=>{let[m,b]=g;return""+v+m+"="+b+` +`},""):String(r.body);return{path:n,submission:{formMethod:a,formAction:u,formEncType:r.formEncType,formData:void 0,json:void 0,text:h}}}else if(r.formEncType==="application/json"){if(!Ma(a))return i();try{let h=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:n,submission:{formMethod:a,formAction:u,formEncType:r.formEncType,formData:void 0,json:h,text:void 0}}}catch{return i()}}}ln(typeof FormData=="function","FormData is not available in this environment");let s,l;if(r.formData)s=dC(r.formData),l=r.formData;else if(r.body instanceof FormData)s=dC(r.body),l=r.body;else if(r.body instanceof URLSearchParams)s=r.body,l=$T(s);else if(r.body==null)s=new URLSearchParams,l=new FormData;else try{s=new URLSearchParams(r.body),l=$T(s)}catch{return i()}let c={formMethod:a,formAction:u,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:l,json:void 0,text:void 0};if(Ma(c.formMethod))return{path:n,submission:c};let d=Cs(n);return t&&d.search&&J4(d.search)&&s.append("index",""),d.search="?"+s,{path:Fc(d),submission:c}}function kT(e,t,n){n===void 0&&(n=!1);let r=e.findIndex(i=>i.route.id===t);return r>=0?e.slice(0,n?r+1:r):e}function TT(e,t,n,r,i,o,a,u,s,l,c,d,h,v,g,m){let b=m?ko(m[1])?m[1].error:m[1].data:void 0,w=e.createURL(t.location),x=e.createURL(i),S=n;o&&t.errors?S=kT(n,Object.keys(t.errors)[0],!0):m&&ko(m[1])&&(S=kT(n,m[0]));let A=m?m[1].statusCode:void 0,E=a&&A&&A>=400,C=S.filter((M,F)=>{let{route:U}=M;if(U.lazy)return!0;if(U.loader==null)return!1;if(o)return fC(U,t.loaderData,t.errors);if(goe(t.loaderData,t.matches[F],M)||s.some(ie=>ie===M.route.id))return!0;let H=t.matches[F],W=M;return MT(M,rr({currentUrl:w,currentParams:H.params,nextUrl:x,nextParams:W.params},r,{actionResult:b,actionStatus:A,defaultShouldRevalidate:E?!1:u||w.pathname+w.search===x.pathname+x.search||w.search!==x.search||HF(H,W)}))}),T=[];return d.forEach((M,F)=>{if(o||!n.some(Z=>Z.route.id===M.routeId)||c.has(F))return;let U=fc(v,M.path,g);if(!U){T.push({key:F,routeId:M.routeId,path:M.path,matches:null,match:null,controller:null});return}let H=t.fetchers.get(F),W=qp(U,M.path),ie=!1;h.has(F)?ie=!1:l.has(F)?(l.delete(F),ie=!0):H&&H.state!=="idle"&&H.data===void 0?ie=u:ie=MT(W,rr({currentUrl:w,currentParams:t.matches[t.matches.length-1].params,nextUrl:x,nextParams:n[n.length-1].params},r,{actionResult:b,actionStatus:A,defaultShouldRevalidate:E?!1:u})),ie&&T.push({key:F,routeId:M.routeId,path:M.path,matches:U,match:W,controller:new AbortController})}),[C,T]}function fC(e,t,n){if(e.lazy)return!0;if(!e.loader)return!1;let r=t!=null&&t[e.id]!==void 0,i=n!=null&&n[e.id]!==void 0;return!r&&i?!1:typeof e.loader=="function"&&e.loader.hydrate===!0?!0:!r&&!i}function goe(e,t,n){let r=!t||n.route.id!==t.route.id,i=e[n.route.id]===void 0;return r||i}function HF(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function MT(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n=="boolean")return n}return t.defaultShouldRevalidate}function RT(e,t,n,r,i){var o;let a;if(e){let l=r[e];ln(l,"No route found to patch children into: routeId = "+e),l.children||(l.children=[]),a=l.children}else a=n;let u=t.filter(l=>!a.some(c=>qF(l,c))),s=g1(u,i,[e||"_","patch",String(((o=a)==null?void 0:o.length)||"0")],r);a.push(...s)}function qF(e,t){return"id"in e&&"id"in t&&e.id===t.id?!0:e.index===t.index&&e.path===t.path&&e.caseSensitive===t.caseSensitive?(!e.children||e.children.length===0)&&(!t.children||t.children.length===0)?!0:e.children.every((n,r)=>{var i;return(i=t.children)==null?void 0:i.some(o=>qF(n,o))}):!1}async function moe(e,t,n){if(!e.lazy)return;let r=await e.lazy();if(!e.lazy)return;let i=n[e.id];ln(i,"No route found in manifest");let o={};for(let a in r){let s=i[a]!==void 0&&a!=="hasErrorBoundary";Nc(!s,'Route "'+i.id+'" has a static property "'+a+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+a+'" will be ignored.')),!s&&!zie.has(a)&&(o[a]=r[a])}Object.assign(i,o),Object.assign(i,rr({},t(i),{lazy:void 0}))}async function yoe(e){let{matches:t}=e,n=t.filter(i=>i.shouldLoad);return(await Promise.all(n.map(i=>i.resolve()))).reduce((i,o,a)=>Object.assign(i,{[n[a].route.id]:o}),{})}async function boe(e,t,n,r,i,o,a,u,s,l){let c=o.map(v=>v.route.lazy?moe(v.route,s,u):void 0),d=o.map((v,g)=>{let m=c[g],b=i.some(x=>x.route.id===v.route.id);return rr({},v,{shouldLoad:b,resolve:async x=>(x&&r.method==="GET"&&(v.route.lazy||v.route.loader)&&(b=!0),b?xoe(t,r,v,m,x,l):Promise.resolve({type:$n.data,result:void 0}))})}),h=await e({matches:d,request:r,params:o[0].params,fetcherKey:a,context:l});try{await Promise.all(c)}catch{}return h}async function xoe(e,t,n,r,i,o){let a,u,s=l=>{let c,d=new Promise((g,m)=>c=m);u=()=>c(),t.signal.addEventListener("abort",u);let h=g=>typeof l!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+e+'" [routeId: '+n.route.id+"]"))):l({request:t,params:n.params,context:o},...g!==void 0?[g]:[]),v=(async()=>{try{return{type:"data",result:await(i?i(m=>h(m)):h())}}catch(g){return{type:"error",result:g}}})();return Promise.race([v,d])};try{let l=n.route[e];if(r)if(l){let c,[d]=await Promise.all([s(l).catch(h=>{c=h}),r]);if(c!==void 0)throw c;a=d}else if(await r,l=n.route[e],l)a=await s(l);else if(e==="action"){let c=new URL(t.url),d=c.pathname+c.search;throw to(405,{method:t.method,pathname:d,routeId:n.route.id})}else return{type:$n.data,result:void 0};else if(l)a=await s(l);else{let c=new URL(t.url),d=c.pathname+c.search;throw to(404,{pathname:d})}ln(a.result!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+n.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(l){return{type:$n.error,result:l}}finally{u&&t.signal.removeEventListener("abort",u)}return a}async function woe(e){let{result:t,type:n}=e;if(GF(t)){let l;try{let c=t.headers.get("Content-Type");c&&/\bapplication\/json\b/.test(c)?t.body==null?l=null:l=await t.json():l=await t.text()}catch(c){return{type:$n.error,error:c}}return n===$n.error?{type:$n.error,error:new m1(t.status,t.statusText,l),statusCode:t.status,headers:t.headers}:{type:$n.data,data:l,statusCode:t.status,headers:t.headers}}if(n===$n.error){if(jT(t)){var r;if(t.data instanceof Error){var i;return{type:$n.error,error:t.data,statusCode:(i=t.init)==null?void 0:i.status}}t=new m1(((r=t.init)==null?void 0:r.status)||500,void 0,t.data)}return{type:$n.error,error:t,statusCode:Sx(t)?t.status:void 0}}if(Aoe(t)){var o,a;return{type:$n.deferred,deferredData:t,statusCode:(o=t.init)==null?void 0:o.status,headers:((a=t.init)==null?void 0:a.headers)&&new Headers(t.init.headers)}}if(jT(t)){var u,s;return{type:$n.data,data:t.data,statusCode:(u=t.init)==null?void 0:u.status,headers:(s=t.init)!=null&&s.headers?new Headers(t.init.headers):void 0}}return{type:$n.data,data:t}}function _oe(e,t,n,r,i,o){let a=e.headers.get("Location");if(ln(a,"Redirects returned/thrown from loaders/actions must have a Location header"),!X4.test(a)){let u=r.slice(0,r.findIndex(s=>s.route.id===n)+1);a=cC(new URL(t.url),u,i,!0,a,o),e.headers.set("Location",a)}return e}function DT(e,t,n){if(X4.test(e)){let r=e,i=r.startsWith("//")?new URL(t.protocol+r):new URL(r),o=Ch(i.pathname,n)!=null;if(i.origin===t.origin&&o)return i.pathname+i.search+i.hash}return e}function Df(e,t,n,r){let i=e.createURL(KF(t)).toString(),o={signal:n};if(r&&Ma(r.formMethod)){let{formMethod:a,formEncType:u}=r;o.method=a.toUpperCase(),u==="application/json"?(o.headers=new Headers({"Content-Type":u}),o.body=JSON.stringify(r.json)):u==="text/plain"?o.body=r.text:u==="application/x-www-form-urlencoded"&&r.formData?o.body=dC(r.formData):o.body=r.formData}return new Request(i,o)}function dC(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r=="string"?r:r.name);return t}function $T(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function Soe(e,t,n,r,i){let o={},a=null,u,s=!1,l={},c=n&&ko(n[1])?n[1].error:void 0;return e.forEach(d=>{if(!(d.route.id in t))return;let h=d.route.id,v=t[h];if(ln(!gc(v),"Cannot handle redirect results in processLoaderData"),ko(v)){let g=v.error;c!==void 0&&(g=c,c=void 0),a=a||{};{let m=dc(e,h);a[m.route.id]==null&&(a[m.route.id]=g)}o[h]=void 0,s||(s=!0,u=Sx(v.error)?v.error.status:500),v.headers&&(l[h]=v.headers)}else rl(v)?(r.set(h,v.deferredData),o[h]=v.deferredData.data,v.statusCode!=null&&v.statusCode!==200&&!s&&(u=v.statusCode),v.headers&&(l[h]=v.headers)):(o[h]=v.data,v.statusCode&&v.statusCode!==200&&!s&&(u=v.statusCode),v.headers&&(l[h]=v.headers))}),c!==void 0&&n&&(a={[n[0]]:c},o[n[0]]=void 0),{loaderData:o,errors:a,statusCode:u||200,loaderHeaders:l}}function IT(e,t,n,r,i,o,a){let{loaderData:u,errors:s}=Soe(t,n,r,a);return i.forEach(l=>{let{key:c,match:d,controller:h}=l,v=o[c];if(ln(v,"Did not find corresponding fetcher result"),!(h&&h.signal.aborted))if(ko(v)){let g=dc(e.matches,d?.route.id);s&&s[g.route.id]||(s=rr({},s,{[g.route.id]:v.error})),e.fetchers.delete(c)}else if(gc(v))ln(!1,"Unhandled fetcher revalidation redirect");else if(rl(v))ln(!1,"Unhandled fetcher deferred data");else{let g=Ws(v.data);e.fetchers.set(c,g)}}),{loaderData:u,errors:s}}function NT(e,t,n,r){let i=rr({},t);for(let o of n){let a=o.route.id;if(t.hasOwnProperty(a)?t[a]!==void 0&&(i[a]=t[a]):e[a]!==void 0&&o.route.loader&&(i[a]=e[a]),r&&r.hasOwnProperty(a))break}return i}function FT(e){return e?ko(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function dc(e,t){return(t?e.slice(0,e.findIndex(r=>r.route.id===t)+1):[...e]).reverse().find(r=>r.route.hasErrorBoundary===!0)||e[0]}function LT(e){let t=e.length===1?e[0]:e.find(n=>n.index||!n.path||n.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function to(e,t){let{pathname:n,routeId:r,method:i,type:o,message:a}=t===void 0?{}:t,u="Unknown Server Error",s="Unknown @remix-run/router error";return e===400?(u="Bad Request",i&&n&&r?s="You made a "+i+' request to "'+n+'" but '+('did not provide a `loader` for route "'+r+'", ')+"so there is no way to handle the request.":o==="defer-action"?s="defer() is not supported in actions":o==="invalid-body"&&(s="Unable to encode submission body")):e===403?(u="Forbidden",s='Route "'+r+'" does not match URL "'+n+'"'):e===404?(u="Not Found",s='No route matches URL "'+n+'"'):e===405&&(u="Method Not Allowed",i&&n&&r?s="You made a "+i.toUpperCase()+' request to "'+n+'" but '+('did not provide an `action` for route "'+r+'", ')+"so there is no way to handle the request.":i&&(s='Invalid request method "'+i.toUpperCase()+'"')),new m1(e||500,u,new Error(s),!0)}function jm(e){let t=Object.entries(e);for(let n=t.length-1;n>=0;n--){let[r,i]=t[n];if(gc(i))return{key:r,result:i}}}function KF(e){let t=typeof e=="string"?Cs(e):e;return Fc(rr({},t,{hash:""}))}function Coe(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function Eoe(e){return GF(e.result)&&coe.has(e.result.status)}function rl(e){return e.type===$n.deferred}function ko(e){return e.type===$n.error}function gc(e){return(e&&e.type)===$n.redirect}function jT(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function Aoe(e){let t=e;return t&&typeof t=="object"&&typeof t.data=="object"&&typeof t.subscribe=="function"&&typeof t.cancel=="function"&&typeof t.resolveData=="function"}function GF(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function Poe(e){return loe.has(e.toLowerCase())}function Ma(e){return uoe.has(e.toLowerCase())}async function Ooe(e,t,n,r,i){let o=Object.entries(t);for(let a=0;ah?.route.id===u);if(!l)continue;let c=r.find(h=>h.route.id===l.route.id),d=c!=null&&!HF(c,l)&&(i&&i[l.route.id])!==void 0;rl(s)&&d&&await Q4(s,n,!1).then(h=>{h&&(t[u]=h)})}}async function koe(e,t,n){for(let r=0;rl?.route.id===o)&&rl(u)&&(ln(a,"Expected an AbortController for revalidating fetcher deferred result"),await Q4(u,a.signal,!0).then(l=>{l&&(t[i]=l)}))}}async function Q4(e,t,n){if(n===void 0&&(n=!1),!await e.deferredData.resolveData(t)){if(n)try{return{type:$n.data,data:e.deferredData.unwrappedData}}catch(i){return{type:$n.error,error:i}}return{type:$n.data,data:e.deferredData.data}}}function J4(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function qp(e,t){let n=typeof t=="string"?Cs(t).search:t.search;if(e[e.length-1].route.index&&J4(n||""))return e[e.length-1];let r=UF(e);return r[r.length-1]}function BT(e){let{formMethod:t,formAction:n,formEncType:r,text:i,formData:o,json:a}=e;if(!(!t||!n||!r)){if(i!=null)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:i};if(o!=null)return{formMethod:t,formAction:n,formEncType:r,formData:o,json:void 0,text:void 0};if(a!==void 0)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:a,text:void 0}}}function j_(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function Toe(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function wp(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function Moe(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function Ws(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function Roe(e,t){try{let n=e.sessionStorage.getItem(VF);if(n){let r=JSON.parse(n);for(let[i,o]of Object.entries(r||{}))o&&Array.isArray(o)&&t.set(i,new Set(o||[]))}}catch{}}function Doe(e,t){if(t.size>0){let n={};for(let[r,i]of t)n[r]=[...i];try{e.sessionStorage.setItem(VF,JSON.stringify(n))}catch(r){Nc(!1,"Failed to save applied view transitions in sessionStorage ("+r+").")}}}/** * React Router v6.28.1 * * Copyright (c) Remix Software Inc. @@ -56,7 +56,7 @@ Error generating stack: `+o.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function Jy(){return Jy=Object.assign?Object.assign.bind():function(e){for(var t=1;t{u.current=!0}),b.useCallback(function(l,c){if(c===void 0&&(c={}),!u.current)return;if(typeof l=="number"){r.go(l);return}let d=NA(l,JSON.parse(a),o,c.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:_u([t,d.pathname])),(c.replace?r.replace:r.push)(d,c.state,c)},[t,r,a,o,e])}const hoe=b.createContext(null);function poe(e){let t=b.useContext(ol).outlet;return t&&b.createElement(hoe.Provider,{value:e},t)}function zF(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=b.useContext(Dc),{matches:i}=b.useContext(ol),{pathname:o}=Im(),a=JSON.stringify(IA(i,r.v7_relativeSplatPath));return b.useMemo(()=>NA(e,JSON.parse(a),o,n==="path"),[e,a,o,n])}function moe(e,t,n,r){$m()||Ot(!1);let{navigator:i}=b.useContext(Dc),{matches:o}=b.useContext(ol),a=o[o.length-1],u=a?a.params:{};a&&a.pathname;let s=a?a.pathnameBase:"/";a&&a.route;let l=Im(),c;c=l;let d=c.pathname||"/",h=d;if(s!=="/"){let v=s.replace(/^\//,"").split("/");h="/"+d.replace(/^\//,"").split("/").slice(v.length).join("/")}let m=Ll(e,{pathname:h});return woe(m&&m.map(v=>Object.assign({},v,{params:Object.assign({},u,v.params),pathname:_u([s,i.encodeLocation?i.encodeLocation(v.pathname).pathname:v.pathname]),pathnameBase:v.pathnameBase==="/"?s:_u([s,i.encodeLocation?i.encodeLocation(v.pathnameBase).pathname:v.pathnameBase])})),o,n,r)}function goe(){let e=Coe(),t=tw(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return b.createElement(b.Fragment,null,b.createElement("h2",null,"Unexpected Application Error!"),b.createElement("h3",{style:{fontStyle:"italic"}},t),n?b.createElement("pre",{style:i},n):null,null)}const voe=b.createElement(goe,null);class yoe extends b.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?b.createElement(ol.Provider,{value:this.props.routeContext},b.createElement(LF.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function boe(e){let{routeContext:t,match:n,children:r}=e,i=b.useContext(nw);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),b.createElement(ol.Provider,{value:t},r)}function woe(e,t,n,r){var i;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var o;if(!n)return null;if(n.errors)e=n.matches;else if((o=r)!=null&&o.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let a=e,u=(i=n)==null?void 0:i.errors;if(u!=null){let c=a.findIndex(d=>d.route.id&&u?.[d.route.id]!==void 0);c>=0||Ot(!1),a=a.slice(0,Math.min(a.length,c+1))}let s=!1,l=-1;if(n&&r&&r.v7_partialHydration)for(let c=0;c=0?a=a.slice(0,l+1):a=[a[0]];break}}}return a.reduceRight((c,d,h)=>{let m,g=!1,v=null,y=null;n&&(m=u&&d.route.id?u[d.route.id]:void 0,v=d.route.errorElement||voe,s&&(l<0&&h===0?(Aoe("route-fallback"),g=!0,y=null):l===h&&(g=!0,y=d.route.hydrateFallbackElement||null)));let x=t.concat(a.slice(0,h+1)),w=()=>{let S;return m?S=v:g?S=y:d.route.Component?S=b.createElement(d.route.Component,null):d.route.element?S=d.route.element:S=c,b.createElement(boe,{match:d,routeContext:{outlet:c,matches:x,isDataRoute:n!=null},children:S})};return n&&(d.route.ErrorBoundary||d.route.errorElement||h===0)?b.createElement(yoe,{location:n.location,revalidation:n.revalidation,component:v,error:m,children:w(),routeContext:{outlet:null,matches:x,isDataRoute:!0}}):w()},null)}var UF=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(UF||{}),e1=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(e1||{});function xoe(e){let t=b.useContext(nw);return t||Ot(!1),t}function _oe(e){let t=b.useContext(FF);return t||Ot(!1),t}function Soe(e){let t=b.useContext(ol);return t||Ot(!1),t}function WF(e){let t=Soe(),n=t.matches[t.matches.length-1];return n.route.id||Ot(!1),n.route.id}function Coe(){var e;let t=b.useContext(LF),n=_oe(e1.UseRouteError),r=WF(e1.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function Eoe(){let{router:e}=xoe(UF.UseNavigateStable),t=WF(e1.UseNavigateStable),n=b.useRef(!1);return jF(()=>{n.current=!0}),b.useCallback(function(i,o){o===void 0&&(o={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,Jy({fromRouteId:t},o)))},[e,t])}const MT={};function Aoe(e,t,n){MT[e]||(MT[e]=!0)}const RT={};function Ooe(e,t){RT[t]||(RT[t]=!0,console.warn(t))}const sf=(e,t,n)=>Ooe(e,"⚠️ React Router Future Flag Warning: "+t+". "+("You can use the `"+e+"` future flag to opt-in early. ")+("For more information, see "+n+"."));function Poe(e,t){e?.v7_startTransition===void 0&&sf("v7_startTransition","React Router will begin wrapping state updates in `React.startTransition` in v7","https://reactrouter.com/v6/upgrading/future#v7_starttransition"),e?.v7_relativeSplatPath===void 0&&(!t||!t.v7_relativeSplatPath)&&sf("v7_relativeSplatPath","Relative route resolution within Splat routes is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_relativesplatpath"),t&&(t.v7_fetcherPersist===void 0&&sf("v7_fetcherPersist","The persistence behavior of fetchers is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_fetcherpersist"),t.v7_normalizeFormMethod===void 0&&sf("v7_normalizeFormMethod","Casing of `formMethod` fields is being normalized to uppercase in v7","https://reactrouter.com/v6/upgrading/future#v7_normalizeformmethod"),t.v7_partialHydration===void 0&&sf("v7_partialHydration","`RouterProvider` hydration behavior is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_partialhydration"),t.v7_skipActionErrorRevalidation===void 0&&sf("v7_skipActionErrorRevalidation","The revalidation behavior after 4xx/5xx `action` responses is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_skipactionerrorrevalidation"))}function kHe(e){return poe(e.context)}function koe(e){let{basename:t="/",children:n=null,location:r,navigationType:i=qn.Pop,navigator:o,static:a=!1,future:u}=e;$m()&&Ot(!1);let s=t.replace(/^\/*/,"/"),l=b.useMemo(()=>({basename:s,navigator:o,static:a,future:Jy({v7_relativeSplatPath:!1},u)}),[s,u,o,a]);typeof r=="string"&&(r=zu(r));let{pathname:c="/",search:d="",hash:h="",state:m=null,key:g="default"}=r,v=b.useMemo(()=>{let y=Zd(c,s);return y==null?null:{location:{pathname:y,search:d,hash:h,state:m,key:g},navigationType:i}},[s,c,d,h,m,g,i]);return v==null?null:b.createElement(Dc.Provider,{value:l},b.createElement(BA.Provider,{children:n,value:v}))}new Promise(()=>{});function Toe(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(t,{element:b.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:b.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:b.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}/** + */function y1(){return y1=Object.assign?Object.assign.bind():function(e){for(var t=1;t{u.current=!0}),y.useCallback(function(l,c){if(c===void 0&&(c={}),!u.current)return;if(typeof l=="number"){r.go(l);return}let d=Z4(l,JSON.parse(a),o,c.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:os([t,d.pathname])),(c.replace?r.replace:r.push)(d,c.state,c)},[t,r,a,o,e])}const Noe=y.createContext(null);function Foe(e){let t=y.useContext(Nl).outlet;return t&&y.createElement(Noe.Provider,{value:e},t)}function JF(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=y.useContext(uf),{matches:i}=y.useContext(Nl),{pathname:o}=rg(),a=JSON.stringify(Y4(i,r.v7_relativeSplatPath));return y.useMemo(()=>Z4(e,JSON.parse(a),o,n==="path"),[e,a,o,n])}function Loe(e,t,n,r){ng()||ln(!1);let{navigator:i}=y.useContext(uf),{matches:o}=y.useContext(Nl),a=o[o.length-1],u=a?a.params:{};a&&a.pathname;let s=a?a.pathnameBase:"/";a&&a.route;let l=rg(),c;c=l;let d=c.pathname||"/",h=d;if(s!=="/"){let m=s.replace(/^\//,"").split("/");h="/"+d.replace(/^\//,"").split("/").slice(m.length).join("/")}let v=fc(e,{pathname:h});return Woe(v&&v.map(m=>Object.assign({},m,{params:Object.assign({},u,m.params),pathname:os([s,i.encodeLocation?i.encodeLocation(m.pathname).pathname:m.pathname]),pathnameBase:m.pathnameBase==="/"?s:os([s,i.encodeLocation?i.encodeLocation(m.pathnameBase).pathname:m.pathnameBase])})),o,n,r)}function joe(){let e=Koe(),t=Sx(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return y.createElement(y.Fragment,null,y.createElement("h2",null,"Unexpected Application Error!"),y.createElement("h3",{style:{fontStyle:"italic"}},t),n?y.createElement("pre",{style:i},n):null,null)}const Boe=y.createElement(joe,null);class zoe extends y.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?y.createElement(Nl.Provider,{value:this.props.routeContext},y.createElement(ZF.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Uoe(e){let{routeContext:t,match:n,children:r}=e,i=y.useContext(Cx);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),y.createElement(Nl.Provider,{value:t},r)}function Woe(e,t,n,r){var i;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var o;if(!n)return null;if(n.errors)e=n.matches;else if((o=r)!=null&&o.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let a=e,u=(i=n)==null?void 0:i.errors;if(u!=null){let c=a.findIndex(d=>d.route.id&&u?.[d.route.id]!==void 0);c>=0||ln(!1),a=a.slice(0,Math.min(a.length,c+1))}let s=!1,l=-1;if(n&&r&&r.v7_partialHydration)for(let c=0;c=0?a=a.slice(0,l+1):a=[a[0]];break}}}return a.reduceRight((c,d,h)=>{let v,g=!1,m=null,b=null;n&&(v=u&&d.route.id?u[d.route.id]:void 0,m=d.route.errorElement||Boe,s&&(l<0&&h===0?(Yoe("route-fallback"),g=!0,b=null):l===h&&(g=!0,b=d.route.hydrateFallbackElement||null)));let w=t.concat(a.slice(0,h+1)),x=()=>{let S;return v?S=m:g?S=b:d.route.Component?S=y.createElement(d.route.Component,null):d.route.element?S=d.route.element:S=c,y.createElement(Uoe,{match:d,routeContext:{outlet:c,matches:w,isDataRoute:n!=null},children:S})};return n&&(d.route.ErrorBoundary||d.route.errorElement||h===0)?y.createElement(zoe,{location:n.location,revalidation:n.revalidation,component:m,error:v,children:x(),routeContext:{outlet:null,matches:w,isDataRoute:!0}}):x()},null)}var eL=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(eL||{}),b1=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(b1||{});function Voe(e){let t=y.useContext(Cx);return t||ln(!1),t}function Hoe(e){let t=y.useContext(YF);return t||ln(!1),t}function qoe(e){let t=y.useContext(Nl);return t||ln(!1),t}function tL(e){let t=qoe(),n=t.matches[t.matches.length-1];return n.route.id||ln(!1),n.route.id}function Koe(){var e;let t=y.useContext(ZF),n=Hoe(b1.UseRouteError),r=tL(b1.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function Goe(){let{router:e}=Voe(eL.UseNavigateStable),t=tL(b1.UseNavigateStable),n=y.useRef(!1);return XF(()=>{n.current=!0}),y.useCallback(function(i,o){o===void 0&&(o={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,y1({fromRouteId:t},o)))},[e,t])}const zT={};function Yoe(e,t,n){zT[e]||(zT[e]=!0)}const UT={};function Zoe(e,t){UT[t]||(UT[t]=!0,console.warn(t))}const $f=(e,t,n)=>Zoe(e,"⚠️ React Router Future Flag Warning: "+t+". "+("You can use the `"+e+"` future flag to opt-in early. ")+("For more information, see "+n+"."));function Xoe(e,t){e?.v7_startTransition===void 0&&$f("v7_startTransition","React Router will begin wrapping state updates in `React.startTransition` in v7","https://reactrouter.com/v6/upgrading/future#v7_starttransition"),e?.v7_relativeSplatPath===void 0&&(!t||!t.v7_relativeSplatPath)&&$f("v7_relativeSplatPath","Relative route resolution within Splat routes is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_relativesplatpath"),t&&(t.v7_fetcherPersist===void 0&&$f("v7_fetcherPersist","The persistence behavior of fetchers is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_fetcherpersist"),t.v7_normalizeFormMethod===void 0&&$f("v7_normalizeFormMethod","Casing of `formMethod` fields is being normalized to uppercase in v7","https://reactrouter.com/v6/upgrading/future#v7_normalizeformmethod"),t.v7_partialHydration===void 0&&$f("v7_partialHydration","`RouterProvider` hydration behavior is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_partialhydration"),t.v7_skipActionErrorRevalidation===void 0&&$f("v7_skipActionErrorRevalidation","The revalidation behavior after 4xx/5xx `action` responses is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_skipactionerrorrevalidation"))}function zqe(e){return Foe(e.context)}function Qoe(e){let{basename:t="/",children:n=null,location:r,navigationType:i=kr.Pop,navigator:o,static:a=!1,future:u}=e;ng()&&ln(!1);let s=t.replace(/^\/*/,"/"),l=y.useMemo(()=>({basename:s,navigator:o,static:a,future:y1({v7_relativeSplatPath:!1},u)}),[s,u,o,a]);typeof r=="string"&&(r=Cs(r));let{pathname:c="/",search:d="",hash:h="",state:v=null,key:g="default"}=r,m=y.useMemo(()=>{let b=Ch(c,s);return b==null?null:{location:{pathname:b,search:d,hash:h,state:v,key:g},navigationType:i}},[s,c,d,h,v,g,i]);return m==null?null:y.createElement(uf.Provider,{value:l},y.createElement(eA.Provider,{children:n,value:m}))}new Promise(()=>{});function Joe(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(t,{element:y.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:y.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:y.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}/** * React Router DOM v6.28.1 * * Copyright (c) Remix Software Inc. @@ -65,7 +65,7 @@ Error generating stack: `+o.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function m0(){return m0=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}function Roe(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Doe(e,t){return e.button===0&&(!t||t==="_self")&&!Roe(e)}function e3(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(i=>[n,i]):[[n,r]])},[]))}function $oe(e,t){let n=e3(e);return t&&t.forEach((r,i)=>{n.has(i)||t.getAll(i).forEach(o=>{n.append(i,o)})}),n}const Ioe=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],Noe="6";try{window.__reactRouterVersion=Noe}catch{}function THe(e,t){return Hie({basename:void 0,future:m0({},void 0,{v7_prependBasename:!0}),history:mie({window:void 0}),hydrationData:Foe(),routes:e,mapRouteProperties:Toe,dataStrategy:void 0,patchRoutesOnNavigation:void 0,window:void 0}).initialize()}function Foe(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=m0({},t,{errors:Loe(t.errors)})),t}function Loe(e){if(!e)return null;let t=Object.entries(e),n={};for(let[r,i]of t)if(i&&i.__type==="RouteErrorResponse")n[r]=new Qy(i.status,i.statusText,i.data,i.internal===!0);else if(i&&i.__type==="Error"){if(i.__subType){let o=window[i.__subType];if(typeof o=="function")try{let a=new o(i.message);a.stack="",n[r]=a}catch{}}if(n[r]==null){let o=new Error(i.message);o.stack="",n[r]=o}}else n[r]=i;return n}const joe=b.createContext({isTransitioning:!1}),Boe=b.createContext(new Map),zoe="startTransition",DT=V6[zoe],Uoe="flushSync",$T=pie[Uoe];function Woe(e){DT?DT(e):e()}function Yh(e){$T?$T(e):e()}class Voe{constructor(){this.status="pending",this.promise=new Promise((t,n)=>{this.resolve=r=>{this.status==="pending"&&(this.status="resolved",t(r))},this.reject=r=>{this.status==="pending"&&(this.status="rejected",n(r))}})}}function MHe(e){let{fallbackElement:t,router:n,future:r}=e,[i,o]=b.useState(n.state),[a,u]=b.useState(),[s,l]=b.useState({isTransitioning:!1}),[c,d]=b.useState(),[h,m]=b.useState(),[g,v]=b.useState(),y=b.useRef(new Map),{v7_startTransition:x}=r||{},w=b.useCallback(k=>{x?Woe(k):k()},[x]),S=b.useCallback((k,M)=>{let{deletedFetchers:L,flushSync:B,viewTransitionOpts:F}=M;L.forEach(H=>y.current.delete(H)),k.fetchers.forEach((H,W)=>{H.data!==void 0&&y.current.set(W,H.data)});let Y=n.window==null||n.window.document==null||typeof n.window.document.startViewTransition!="function";if(!F||Y){B?Yh(()=>o(k)):w(()=>o(k));return}if(B){Yh(()=>{h&&(c&&c.resolve(),h.skipTransition()),l({isTransitioning:!0,flushSync:!0,currentLocation:F.currentLocation,nextLocation:F.nextLocation})});let H=n.window.document.startViewTransition(()=>{Yh(()=>o(k))});H.finished.finally(()=>{Yh(()=>{d(void 0),m(void 0),u(void 0),l({isTransitioning:!1})})}),Yh(()=>m(H));return}h?(c&&c.resolve(),h.skipTransition(),v({state:k,currentLocation:F.currentLocation,nextLocation:F.nextLocation})):(u(k),l({isTransitioning:!0,flushSync:!1,currentLocation:F.currentLocation,nextLocation:F.nextLocation}))},[n.window,h,c,y,w]);b.useLayoutEffect(()=>n.subscribe(S),[n,S]),b.useEffect(()=>{s.isTransitioning&&!s.flushSync&&d(new Voe)},[s]),b.useEffect(()=>{if(c&&a&&n.window){let k=a,M=c.promise,L=n.window.document.startViewTransition(async()=>{w(()=>o(k)),await M});L.finished.finally(()=>{d(void 0),m(void 0),u(void 0),l({isTransitioning:!1})}),m(L)}},[w,a,c,n.window]),b.useEffect(()=>{c&&a&&i.location.key===a.location.key&&c.resolve()},[c,h,i.location,a]),b.useEffect(()=>{!s.isTransitioning&&g&&(u(g.state),l({isTransitioning:!0,flushSync:!1,currentLocation:g.currentLocation,nextLocation:g.nextLocation}),v(void 0))},[s.isTransitioning,g]),b.useEffect(()=>{},[]);let A=b.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:k=>n.navigate(k),push:(k,M,L)=>n.navigate(k,{state:M,preventScrollReset:L?.preventScrollReset}),replace:(k,M,L)=>n.navigate(k,{replace:!0,state:M,preventScrollReset:L?.preventScrollReset})}),[n]),E=n.basename||"/",C=b.useMemo(()=>({router:n,navigator:A,static:!1,basename:E}),[n,A,E]),P=b.useMemo(()=>({v7_relativeSplatPath:n.future.v7_relativeSplatPath}),[n.future.v7_relativeSplatPath]);return b.useEffect(()=>Poe(r,n.future),[r,n.future]),b.createElement(b.Fragment,null,b.createElement(nw.Provider,{value:C},b.createElement(FF.Provider,{value:i},b.createElement(Boe.Provider,{value:y.current},b.createElement(joe.Provider,{value:s},b.createElement(koe,{basename:E,location:i.location,navigationType:i.historyAction,navigator:A,future:P},i.initialized||n.future.v7_partialHydration?b.createElement(Hoe,{routes:n.routes,future:n.future,state:i}):t))))),null)}const Hoe=b.memo(qoe);function qoe(e){let{routes:t,future:n,state:r}=e;return moe(t,void 0,r,n)}const Goe=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Koe=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,RHe=b.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:o,replace:a,state:u,target:s,to:l,preventScrollReset:c,viewTransition:d}=t,h=Moe(t,Ioe),{basename:m}=b.useContext(Dc),g,v=!1;if(typeof l=="string"&&Koe.test(l)&&(g=l,Goe))try{let S=new URL(window.location.href),A=l.startsWith("//")?new URL(S.protocol+l):new URL(l),E=Zd(A.pathname,m);A.origin===S.origin&&E!=null?l=E+A.search+A.hash:v=!0}catch{}let y=foe(l,{relative:i}),x=Yoe(l,{replace:a,state:u,target:s,preventScrollReset:c,relative:i,viewTransition:d});function w(S){r&&r(S),S.defaultPrevented||x(S)}return b.createElement("a",m0({},h,{href:g||y,onClick:v||o?r:w,ref:n,target:s}))});var IT;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(IT||(IT={}));var NT;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(NT||(NT={}));function Yoe(e,t){let{target:n,replace:r,state:i,preventScrollReset:o,relative:a,viewTransition:u}=t===void 0?{}:t,s=BF(),l=Im(),c=zF(e,{relative:a});return b.useCallback(d=>{if(Doe(d,n)){d.preventDefault();let h=r!==void 0?r:cc(l)===cc(c);s(e,{replace:h,state:i,preventScrollReset:o,relative:a,viewTransition:u})}},[l,s,c,r,i,n,e,o,a,u])}function DHe(e){let t=b.useRef(e3(e)),n=b.useRef(!1),r=Im(),i=b.useMemo(()=>$oe(r.search,n.current?null:t.current),[r.search]),o=BF(),a=b.useCallback((u,s)=>{const l=e3(typeof u=="function"?u(i):u);n.current=!0,o("?"+l,s)},[o,i]);return[i,a]}var VF={exports:{}},HF={};/** + */function L0(){return L0=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}function tae(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function nae(e,t){return e.button===0&&(!t||t==="_self")&&!tae(e)}function hC(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(i=>[n,i]):[[n,r]])},[]))}function rae(e,t){let n=hC(e);return t&&t.forEach((r,i)=>{n.has(i)||t.getAll(i).forEach(o=>{n.append(i,o)})}),n}const iae=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],oae="6";try{window.__reactRouterVersion=oae}catch{}function Uqe(e,t){return poe({basename:void 0,future:L0({},void 0,{v7_prependBasename:!0}),history:Lie({window:void 0}),hydrationData:aae(),routes:e,mapRouteProperties:Joe,dataStrategy:void 0,patchRoutesOnNavigation:void 0,window:void 0}).initialize()}function aae(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=L0({},t,{errors:uae(t.errors)})),t}function uae(e){if(!e)return null;let t=Object.entries(e),n={};for(let[r,i]of t)if(i&&i.__type==="RouteErrorResponse")n[r]=new m1(i.status,i.statusText,i.data,i.internal===!0);else if(i&&i.__type==="Error"){if(i.__subType){let o=window[i.__subType];if(typeof o=="function")try{let a=new o(i.message);a.stack="",n[r]=a}catch{}}if(n[r]==null){let o=new Error(i.message);o.stack="",n[r]=o}}else n[r]=i;return n}const sae=y.createContext({isTransitioning:!1}),lae=y.createContext(new Map),cae="startTransition",WT=i4[cae],fae="flushSync",VT=Fie[fae];function dae(e){WT?WT(e):e()}function _p(e){VT?VT(e):e()}class hae{constructor(){this.status="pending",this.promise=new Promise((t,n)=>{this.resolve=r=>{this.status==="pending"&&(this.status="resolved",t(r))},this.reject=r=>{this.status==="pending"&&(this.status="rejected",n(r))}})}}function Wqe(e){let{fallbackElement:t,router:n,future:r}=e,[i,o]=y.useState(n.state),[a,u]=y.useState(),[s,l]=y.useState({isTransitioning:!1}),[c,d]=y.useState(),[h,v]=y.useState(),[g,m]=y.useState(),b=y.useRef(new Map),{v7_startTransition:w}=r||{},x=y.useCallback(M=>{w?dae(M):M()},[w]),S=y.useCallback((M,F)=>{let{deletedFetchers:U,flushSync:H,viewTransitionOpts:W}=F;U.forEach(Z=>b.current.delete(Z)),M.fetchers.forEach((Z,G)=>{Z.data!==void 0&&b.current.set(G,Z.data)});let ie=n.window==null||n.window.document==null||typeof n.window.document.startViewTransition!="function";if(!W||ie){H?_p(()=>o(M)):x(()=>o(M));return}if(H){_p(()=>{h&&(c&&c.resolve(),h.skipTransition()),l({isTransitioning:!0,flushSync:!0,currentLocation:W.currentLocation,nextLocation:W.nextLocation})});let Z=n.window.document.startViewTransition(()=>{_p(()=>o(M))});Z.finished.finally(()=>{_p(()=>{d(void 0),v(void 0),u(void 0),l({isTransitioning:!1})})}),_p(()=>v(Z));return}h?(c&&c.resolve(),h.skipTransition(),m({state:M,currentLocation:W.currentLocation,nextLocation:W.nextLocation})):(u(M),l({isTransitioning:!0,flushSync:!1,currentLocation:W.currentLocation,nextLocation:W.nextLocation}))},[n.window,h,c,b,x]);y.useLayoutEffect(()=>n.subscribe(S),[n,S]),y.useEffect(()=>{s.isTransitioning&&!s.flushSync&&d(new hae)},[s]),y.useEffect(()=>{if(c&&a&&n.window){let M=a,F=c.promise,U=n.window.document.startViewTransition(async()=>{x(()=>o(M)),await F});U.finished.finally(()=>{d(void 0),v(void 0),u(void 0),l({isTransitioning:!1})}),v(U)}},[x,a,c,n.window]),y.useEffect(()=>{c&&a&&i.location.key===a.location.key&&c.resolve()},[c,h,i.location,a]),y.useEffect(()=>{!s.isTransitioning&&g&&(u(g.state),l({isTransitioning:!0,flushSync:!1,currentLocation:g.currentLocation,nextLocation:g.nextLocation}),m(void 0))},[s.isTransitioning,g]),y.useEffect(()=>{},[]);let A=y.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:M=>n.navigate(M),push:(M,F,U)=>n.navigate(M,{state:F,preventScrollReset:U?.preventScrollReset}),replace:(M,F,U)=>n.navigate(M,{replace:!0,state:F,preventScrollReset:U?.preventScrollReset})}),[n]),E=n.basename||"/",C=y.useMemo(()=>({router:n,navigator:A,static:!1,basename:E}),[n,A,E]),T=y.useMemo(()=>({v7_relativeSplatPath:n.future.v7_relativeSplatPath}),[n.future.v7_relativeSplatPath]);return y.useEffect(()=>Xoe(r,n.future),[r,n.future]),y.createElement(y.Fragment,null,y.createElement(Cx.Provider,{value:C},y.createElement(YF.Provider,{value:i},y.createElement(lae.Provider,{value:b.current},y.createElement(sae.Provider,{value:s},y.createElement(Qoe,{basename:E,location:i.location,navigationType:i.historyAction,navigator:A,future:T},i.initialized||n.future.v7_partialHydration?y.createElement(pae,{routes:n.routes,future:n.future,state:i}):t))))),null)}const pae=y.memo(vae);function vae(e){let{routes:t,future:n,state:r}=e;return Loe(t,void 0,r,n)}const gae=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",mae=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Vqe=y.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:o,replace:a,state:u,target:s,to:l,preventScrollReset:c,viewTransition:d}=t,h=eae(t,iae),{basename:v}=y.useContext(uf),g,m=!1;if(typeof l=="string"&&mae.test(l)&&(g=l,gae))try{let S=new URL(window.location.href),A=l.startsWith("//")?new URL(S.protocol+l):new URL(l),E=Ch(A.pathname,v);A.origin===S.origin&&E!=null?l=E+A.search+A.hash:m=!0}catch{}let b=$oe(l,{relative:i}),w=yae(l,{replace:a,state:u,target:s,preventScrollReset:c,relative:i,viewTransition:d});function x(S){r&&r(S),S.defaultPrevented||w(S)}return y.createElement("a",L0({},h,{href:g||b,onClick:m||o?r:x,ref:n,target:s}))});var HT;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(HT||(HT={}));var qT;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(qT||(qT={}));function yae(e,t){let{target:n,replace:r,state:i,preventScrollReset:o,relative:a,viewTransition:u}=t===void 0?{}:t,s=QF(),l=rg(),c=JF(e,{relative:a});return y.useCallback(d=>{if(nae(d,n)){d.preventDefault();let h=r!==void 0?r:Fc(l)===Fc(c);s(e,{replace:h,state:i,preventScrollReset:o,relative:a,viewTransition:u})}},[l,s,c,r,i,n,e,o,a,u])}function Hqe(e){let t=y.useRef(hC(e)),n=y.useRef(!1),r=rg(),i=y.useMemo(()=>rae(r.search,n.current?null:t.current),[r.search]),o=QF(),a=y.useCallback((u,s)=>{const l=hC(typeof u=="function"?u(i):u);n.current=!0,o("?"+l,s)},[o,i]);return[i,a]}var nL={exports:{}},rL={};/** * @license React * use-sync-external-store-with-selector.production.js * @@ -73,23 +73,23 @@ Error generating stack: `+o.message+` * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Nm=b;function Zoe(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Xoe=typeof Object.is=="function"?Object.is:Zoe,Qoe=Nm.useSyncExternalStore,Joe=Nm.useRef,eae=Nm.useEffect,tae=Nm.useMemo,nae=Nm.useDebugValue;HF.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var o=Joe(null);if(o.current===null){var a={hasValue:!1,value:null};o.current=a}else a=o.current;o=tae(function(){function s(m){if(!l){if(l=!0,c=m,m=r(m),i!==void 0&&a.hasValue){var g=a.value;if(i(g,m))return d=g}return d=m}if(g=d,Xoe(c,m))return g;var v=r(m);return i!==void 0&&i(g,v)?(c=m,g):(c=m,d=v)}var l=!1,c,d,h=n===void 0?null:n;return[function(){return s(t())},h===null?void 0:function(){return s(h())}]},[t,n,r,i]);var u=Qoe(e,o[0],o[1]);return eae(function(){a.hasValue=!0,a.value=u},[u]),nae(u),u};VF.exports=HF;var rae=VF.exports;function iae(e){e()}function oae(){let e=null,t=null;return{clear(){e=null,t=null},notify(){iae(()=>{let n=e;for(;n;)n.callback(),n=n.next})},get(){const n=[];let r=e;for(;r;)n.push(r),r=r.next;return n},subscribe(n){let r=!0;const i=t={callback:n,next:null,prev:t};return i.prev?i.prev.next=i:e=i,function(){!r||e===null||(r=!1,i.next?i.next.prev=i.prev:t=i.prev,i.prev?i.prev.next=i.next:e=i.next)}}}}var FT={notify(){},get:()=>[]};function aae(e,t){let n,r=FT,i=0,o=!1;function a(v){c();const y=r.subscribe(v);let x=!1;return()=>{x||(x=!0,y(),d())}}function u(){r.notify()}function s(){g.onStateChange&&g.onStateChange()}function l(){return o}function c(){i++,n||(n=e.subscribe(s),r=oae())}function d(){i--,n&&i===0&&(n(),n=void 0,r.clear(),r=FT)}function h(){o||(o=!0,c())}function m(){o&&(o=!1,d())}const g={addNestedSub:a,notifyNestedSubs:u,handleChangeWrapper:s,isSubscribed:l,trySubscribe:h,tryUnsubscribe:m,getListeners:()=>r};return g}var uae=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",sae=uae(),lae=()=>typeof navigator<"u"&&navigator.product==="ReactNative",cae=lae(),fae=()=>sae||cae?b.useLayoutEffect:b.useEffect,dae=fae(),hae=Symbol.for("react-redux-context"),pae=typeof globalThis<"u"?globalThis:{};function mae(){if(!b.createContext)return{};const e=pae[hae]??=new Map;let t=e.get(b.createContext);return t||(t=b.createContext(null),e.set(b.createContext,t)),t}var Hs=mae();function gae(e){const{children:t,context:n,serverState:r,store:i}=e,o=b.useMemo(()=>{const s=aae(i);return{store:i,subscription:s,getServerState:r?()=>r:void 0}},[i,r]),a=b.useMemo(()=>i.getState(),[i]);dae(()=>{const{subscription:s}=o;return s.onStateChange=s.notifyNestedSubs,s.trySubscribe(),a!==i.getState()&&s.notifyNestedSubs(),()=>{s.tryUnsubscribe(),s.onStateChange=void 0}},[o,a]);const u=n||Hs;return b.createElement(u.Provider,{value:o},t)}var $He=gae;function zA(e=Hs){return function(){return b.useContext(e)}}var qF=zA();function GF(e=Hs){const t=e===Hs?qF:zA(e),n=()=>{const{store:r}=t();return r};return Object.assign(n,{withTypes:()=>n}),n}var vae=GF();function yae(e=Hs){const t=e===Hs?vae:GF(e),n=()=>t().dispatch;return Object.assign(n,{withTypes:()=>n}),n}var IHe=yae(),bae=(e,t)=>e===t;function wae(e=Hs){const t=e===Hs?qF:zA(e),n=(r,i={})=>{const{equalityFn:o=bae}=typeof i=="function"?{equalityFn:i}:i,a=t(),{store:u,subscription:s,getServerState:l}=a;b.useRef(!0);const c=b.useCallback({[r.name](h){return r(h)}}[r.name],[r]),d=rae.useSyncExternalStoreWithSelector(s.addNestedSub,u.getState,l||u.getState,c,o);return b.useDebugValue(d),d};return Object.assign(n,{withTypes:()=>n}),n}var NHe=wae();function LT(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function rw(...e){return t=>{let n=!1;const r=e.map(i=>{const o=LT(i,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let i=0;i{const{children:n,...r}=e,i=b.Children.toArray(n),o=i.find(xae);if(o){const a=o.props.children,u=i.map(s=>s===o?b.Children.count(a)>1?b.Children.only(null):b.isValidElement(a)?a.props.children:null:s);return R.jsx(t3,{...r,ref:t,children:b.isValidElement(a)?b.cloneElement(a,void 0,u):null})}return R.jsx(t3,{...r,ref:t,children:n})});qs.displayName="Slot";var t3=b.forwardRef((e,t)=>{const{children:n,...r}=e;if(b.isValidElement(n)){const i=Sae(n);return b.cloneElement(n,{..._ae(r,n.props),ref:t?rw(t,i):i})}return b.Children.count(n)>1?b.Children.only(null):null});t3.displayName="SlotClone";var UA=({children:e})=>R.jsx(R.Fragment,{children:e});function xae(e){return b.isValidElement(e)&&e.type===UA}function _ae(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...u)=>{o(...u),i(...u)}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}function Sae(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function KF(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;ttypeof e=="boolean"?`${e}`:e===0?"0":e,BT=Pt,FHe=(e,t)=>n=>{var r;if(t?.variants==null)return BT(e,n?.class,n?.className);const{variants:i,defaultVariants:o}=t,a=Object.keys(i).map(l=>{const c=n?.[l],d=o?.[l];if(c===null)return null;const h=jT(c)||jT(d);return i[l][h]}),u=n&&Object.entries(n).reduce((l,c)=>{let[d,h]=c;return h===void 0||(l[d]=h),l},{}),s=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((l,c)=>{let{class:d,className:h,...m}=c;return Object.entries(m).every(g=>{let[v,y]=g;return Array.isArray(y)?y.includes({...o,...u}[v]):{...o,...u}[v]===y})?[...l,d,h]:l},[]);return BT(e,a,s,n?.class,n?.className)},WA="-",Cae=e=>{const t=Aae(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{const u=a.split(WA);return u[0]===""&&u.length!==1&&u.shift(),YF(u,t)||Eae(a)},getConflictingClassGroupIds:(a,u)=>{const s=n[a]||[];return u&&r[a]?[...s,...r[a]]:s}}},YF=(e,t)=>{if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),i=r?YF(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;const o=e.join(WA);return t.validators.find(({validator:a})=>a(o))?.classGroupId},zT=/^\[(.+)\]$/,Eae=e=>{if(zT.test(e)){const t=zT.exec(e)[1],n=t?.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},Aae=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return Pae(Object.entries(e.classGroups),n).forEach(([o,a])=>{n3(a,r,o,t)}),r},n3=(e,t,n,r)=>{e.forEach(i=>{if(typeof i=="string"){const o=i===""?t:UT(t,i);o.classGroupId=n;return}if(typeof i=="function"){if(Oae(i)){n3(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([o,a])=>{n3(a,UT(t,o),n,r)})})},UT=(e,t)=>{let n=e;return t.split(WA).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},Oae=e=>e.isThemeGetter,Pae=(e,t)=>t?e.map(([n,r])=>{const i=r.map(o=>typeof o=="string"?t+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([a,u])=>[t+a,u])):o);return[n,i]}):e,kae=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const i=(o,a)=>{n.set(o,a),t++,t>e&&(t=0,r=n,n=new Map)};return{get(o){let a=n.get(o);if(a!==void 0)return a;if((a=r.get(o))!==void 0)return i(o,a),a},set(o,a){n.has(o)?n.set(o,a):i(o,a)}}},ZF="!",Tae=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,i=t[0],o=t.length,a=u=>{const s=[];let l=0,c=0,d;for(let y=0;yc?d-c:void 0;return{modifiers:s,hasImportantModifier:m,baseClassName:g,maybePostfixModifierPosition:v}};return n?u=>n({className:u,parseClassName:a}):a},Mae=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},Rae=e=>({cache:kae(e.cacheSize),parseClassName:Tae(e),...Cae(e)}),Dae=/\s+/,$ae=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i}=t,o=[],a=e.trim().split(Dae);let u="";for(let s=a.length-1;s>=0;s-=1){const l=a[s],{modifiers:c,hasImportantModifier:d,baseClassName:h,maybePostfixModifierPosition:m}=n(l);let g=!!m,v=r(g?h.substring(0,m):h);if(!v){if(!g){u=l+(u.length>0?" "+u:u);continue}if(v=r(h),!v){u=l+(u.length>0?" "+u:u);continue}g=!1}const y=Mae(c).join(":"),x=d?y+ZF:y,w=x+v;if(o.includes(w))continue;o.push(w);const S=i(v,g);for(let A=0;A0?" "+u:u)}return u};function Iae(){let e=0,t,n,r="";for(;e{if(typeof e=="string")return e;let t,n="";for(let r=0;rd(c),e());return n=Rae(l),r=n.cache.get,i=n.cache.set,o=u,u(s)}function u(s){const l=r(s);if(l)return l;const c=$ae(s,n);return i(s,c),c}return function(){return o(Iae.apply(null,arguments))}}const gn=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},QF=/^\[(?:([a-z-]+):)?(.+)\]$/i,Fae=/^\d+\/\d+$/,Lae=new Set(["px","full","screen"]),jae=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Bae=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,zae=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Uae=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Wae=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,iu=e=>qf(e)||Lae.has(e)||Fae.test(e),ls=e=>Xd(e,"length",Xae),qf=e=>!!e&&!Number.isNaN(Number(e)),E_=e=>Xd(e,"number",qf),Zh=e=>!!e&&Number.isInteger(Number(e)),Vae=e=>e.endsWith("%")&&qf(e.slice(0,-1)),vt=e=>QF.test(e),cs=e=>jae.test(e),Hae=new Set(["length","size","percentage"]),qae=e=>Xd(e,Hae,JF),Gae=e=>Xd(e,"position",JF),Kae=new Set(["image","url"]),Yae=e=>Xd(e,Kae,Jae),Zae=e=>Xd(e,"",Qae),Xh=()=>!0,Xd=(e,t,n)=>{const r=QF.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},Xae=e=>Bae.test(e)&&!zae.test(e),JF=()=>!1,Qae=e=>Uae.test(e),Jae=e=>Wae.test(e),eue=()=>{const e=gn("colors"),t=gn("spacing"),n=gn("blur"),r=gn("brightness"),i=gn("borderColor"),o=gn("borderRadius"),a=gn("borderSpacing"),u=gn("borderWidth"),s=gn("contrast"),l=gn("grayscale"),c=gn("hueRotate"),d=gn("invert"),h=gn("gap"),m=gn("gradientColorStops"),g=gn("gradientColorStopPositions"),v=gn("inset"),y=gn("margin"),x=gn("opacity"),w=gn("padding"),S=gn("saturate"),A=gn("scale"),E=gn("sepia"),C=gn("skew"),P=gn("space"),k=gn("translate"),M=()=>["auto","contain","none"],L=()=>["auto","hidden","clip","visible","scroll"],B=()=>["auto",vt,t],F=()=>[vt,t],Y=()=>["",iu,ls],H=()=>["auto",qf,vt],W=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],V=()=>["solid","dashed","dotted","double","none"],j=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],I=()=>["start","end","center","between","around","evenly","stretch"],z=()=>["","0",vt],U=()=>["auto","avoid","all","avoid-page","page","left","right","column"],X=()=>[qf,vt];return{cacheSize:500,separator:":",theme:{colors:[Xh],spacing:[iu,ls],blur:["none","",cs,vt],brightness:X(),borderColor:[e],borderRadius:["none","","full",cs,vt],borderSpacing:F(),borderWidth:Y(),contrast:X(),grayscale:z(),hueRotate:X(),invert:z(),gap:F(),gradientColorStops:[e],gradientColorStopPositions:[Vae,ls],inset:B(),margin:B(),opacity:X(),padding:F(),saturate:X(),scale:X(),sepia:z(),skew:X(),space:F(),translate:F()},classGroups:{aspect:[{aspect:["auto","square","video",vt]}],container:["container"],columns:[{columns:[cs]}],"break-after":[{"break-after":U()}],"break-before":[{"break-before":U()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...W(),vt]}],overflow:[{overflow:L()}],"overflow-x":[{"overflow-x":L()}],"overflow-y":[{"overflow-y":L()}],overscroll:[{overscroll:M()}],"overscroll-x":[{"overscroll-x":M()}],"overscroll-y":[{"overscroll-y":M()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[v]}],"inset-x":[{"inset-x":[v]}],"inset-y":[{"inset-y":[v]}],start:[{start:[v]}],end:[{end:[v]}],top:[{top:[v]}],right:[{right:[v]}],bottom:[{bottom:[v]}],left:[{left:[v]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Zh,vt]}],basis:[{basis:B()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",vt]}],grow:[{grow:z()}],shrink:[{shrink:z()}],order:[{order:["first","last","none",Zh,vt]}],"grid-cols":[{"grid-cols":[Xh]}],"col-start-end":[{col:["auto",{span:["full",Zh,vt]},vt]}],"col-start":[{"col-start":H()}],"col-end":[{"col-end":H()}],"grid-rows":[{"grid-rows":[Xh]}],"row-start-end":[{row:["auto",{span:[Zh,vt]},vt]}],"row-start":[{"row-start":H()}],"row-end":[{"row-end":H()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",vt]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",vt]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...I()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...I(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...I(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[w]}],px:[{px:[w]}],py:[{py:[w]}],ps:[{ps:[w]}],pe:[{pe:[w]}],pt:[{pt:[w]}],pr:[{pr:[w]}],pb:[{pb:[w]}],pl:[{pl:[w]}],m:[{m:[y]}],mx:[{mx:[y]}],my:[{my:[y]}],ms:[{ms:[y]}],me:[{me:[y]}],mt:[{mt:[y]}],mr:[{mr:[y]}],mb:[{mb:[y]}],ml:[{ml:[y]}],"space-x":[{"space-x":[P]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[P]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",vt,t]}],"min-w":[{"min-w":[vt,t,"min","max","fit"]}],"max-w":[{"max-w":[vt,t,"none","full","min","max","fit","prose",{screen:[cs]},cs]}],h:[{h:[vt,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[vt,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[vt,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[vt,t,"auto","min","max","fit"]}],"font-size":[{text:["base",cs,ls]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",E_]}],"font-family":[{font:[Xh]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",vt]}],"line-clamp":[{"line-clamp":["none",qf,E_]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",iu,vt]}],"list-image":[{"list-image":["none",vt]}],"list-style-type":[{list:["none","disc","decimal",vt]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[x]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[x]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...V(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",iu,ls]}],"underline-offset":[{"underline-offset":["auto",iu,vt]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:F()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",vt]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",vt]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[x]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...W(),Gae]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",qae]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Yae]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[g]}],"gradient-via-pos":[{via:[g]}],"gradient-to-pos":[{to:[g]}],"gradient-from":[{from:[m]}],"gradient-via":[{via:[m]}],"gradient-to":[{to:[m]}],rounded:[{rounded:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-se":[{"rounded-se":[o]}],"rounded-ee":[{"rounded-ee":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"border-w":[{border:[u]}],"border-w-x":[{"border-x":[u]}],"border-w-y":[{"border-y":[u]}],"border-w-s":[{"border-s":[u]}],"border-w-e":[{"border-e":[u]}],"border-w-t":[{"border-t":[u]}],"border-w-r":[{"border-r":[u]}],"border-w-b":[{"border-b":[u]}],"border-w-l":[{"border-l":[u]}],"border-opacity":[{"border-opacity":[x]}],"border-style":[{border:[...V(),"hidden"]}],"divide-x":[{"divide-x":[u]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[u]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[x]}],"divide-style":[{divide:V()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...V()]}],"outline-offset":[{"outline-offset":[iu,vt]}],"outline-w":[{outline:[iu,ls]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:Y()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[x]}],"ring-offset-w":[{"ring-offset":[iu,ls]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",cs,Zae]}],"shadow-color":[{shadow:[Xh]}],opacity:[{opacity:[x]}],"mix-blend":[{"mix-blend":[...j(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":j()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[s]}],"drop-shadow":[{"drop-shadow":["","none",cs,vt]}],grayscale:[{grayscale:[l]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[d]}],saturate:[{saturate:[S]}],sepia:[{sepia:[E]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[s]}],"backdrop-grayscale":[{"backdrop-grayscale":[l]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[c]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[x]}],"backdrop-saturate":[{"backdrop-saturate":[S]}],"backdrop-sepia":[{"backdrop-sepia":[E]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",vt]}],duration:[{duration:X()}],ease:[{ease:["linear","in","out","in-out",vt]}],delay:[{delay:X()}],animate:[{animate:["none","spin","ping","pulse","bounce",vt]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[A]}],"scale-x":[{"scale-x":[A]}],"scale-y":[{"scale-y":[A]}],rotate:[{rotate:[Zh,vt]}],"translate-x":[{"translate-x":[k]}],"translate-y":[{"translate-y":[k]}],"skew-x":[{"skew-x":[C]}],"skew-y":[{"skew-y":[C]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",vt]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",vt]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":F()}],"scroll-mx":[{"scroll-mx":F()}],"scroll-my":[{"scroll-my":F()}],"scroll-ms":[{"scroll-ms":F()}],"scroll-me":[{"scroll-me":F()}],"scroll-mt":[{"scroll-mt":F()}],"scroll-mr":[{"scroll-mr":F()}],"scroll-mb":[{"scroll-mb":F()}],"scroll-ml":[{"scroll-ml":F()}],"scroll-p":[{"scroll-p":F()}],"scroll-px":[{"scroll-px":F()}],"scroll-py":[{"scroll-py":F()}],"scroll-ps":[{"scroll-ps":F()}],"scroll-pe":[{"scroll-pe":F()}],"scroll-pt":[{"scroll-pt":F()}],"scroll-pr":[{"scroll-pr":F()}],"scroll-pb":[{"scroll-pb":F()}],"scroll-pl":[{"scroll-pl":F()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",vt]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[iu,ls,E_]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},LHe=Nae(eue);var eL={exports:{}},tue="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",nue=tue,rue=nue;function tL(){}function nL(){}nL.resetWarningCache=tL;var iue=function(){function e(r,i,o,a,u,s){if(s!==rue){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:nL,resetWarningCache:tL};return n.PropTypes=n,n};eL.exports=iue();var oue=eL.exports;const ot=Vt(oue);var aue={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},uue=Object.defineProperty,sue=Object.defineProperties,lue=Object.getOwnPropertyDescriptors,t1=Object.getOwnPropertySymbols,rL=Object.prototype.hasOwnProperty,iL=Object.prototype.propertyIsEnumerable,WT=(e,t,n)=>t in e?uue(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,VT=(e,t)=>{for(var n in t||(t={}))rL.call(t,n)&&WT(e,n,t[n]);if(t1)for(var n of t1(t))iL.call(t,n)&&WT(e,n,t[n]);return e},cue=(e,t)=>sue(e,lue(t)),fue=(e,t)=>{var n={};for(var r in e)rL.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&t1)for(var r of t1(e))t.indexOf(r)<0&&iL.call(e,r)&&(n[r]=e[r]);return n},Bt=(e,t,n)=>{const r=b.forwardRef((i,o)=>{var a=i,{color:u="currentColor",size:s=24,stroke:l=2,children:c}=a,d=fue(a,["color","size","stroke","children"]);return b.createElement("svg",VT(cue(VT({ref:o},aue),{width:s,height:s,stroke:u,strokeWidth:l,className:`tabler-icon tabler-icon-${e}`}),d),[...n.map(([h,m])=>b.createElement(h,m)),...c||[]])});return r.propTypes={color:ot.string,size:ot.oneOfType([ot.string,ot.number]),stroke:ot.oneOfType([ot.string,ot.number])},r.displayName=`${t}`,r},jHe=Bt("adjustments","IconAdjustments",[["path",{d:"M4 10a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-0"}],["path",{d:"M6 4v4",key:"svg-1"}],["path",{d:"M6 12v8",key:"svg-2"}],["path",{d:"M10 16a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-3"}],["path",{d:"M12 4v10",key:"svg-4"}],["path",{d:"M12 18v2",key:"svg-5"}],["path",{d:"M16 7a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-6"}],["path",{d:"M18 4v1",key:"svg-7"}],["path",{d:"M18 9v11",key:"svg-8"}]]),BHe=Bt("brand-telegram","IconBrandTelegram",[["path",{d:"M15 10l-4 4l6 6l4 -16l-18 7l4 2l2 6l3 -4",key:"svg-0"}]]),zHe=Bt("building-store","IconBuildingStore",[["path",{d:"M3 21l18 0",key:"svg-0"}],["path",{d:"M3 7v1a3 3 0 0 0 6 0v-1m0 1a3 3 0 0 0 6 0v-1m0 1a3 3 0 0 0 6 0v-1h-18l2 -4h14l2 4",key:"svg-1"}],["path",{d:"M5 21l0 -10.15",key:"svg-2"}],["path",{d:"M19 21l0 -10.15",key:"svg-3"}],["path",{d:"M9 21v-4a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v4",key:"svg-4"}]]),UHe=Bt("building","IconBuilding",[["path",{d:"M3 21l18 0",key:"svg-0"}],["path",{d:"M9 8l1 0",key:"svg-1"}],["path",{d:"M9 12l1 0",key:"svg-2"}],["path",{d:"M9 16l1 0",key:"svg-3"}],["path",{d:"M14 8l1 0",key:"svg-4"}],["path",{d:"M14 12l1 0",key:"svg-5"}],["path",{d:"M14 16l1 0",key:"svg-6"}],["path",{d:"M5 21v-16a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v16",key:"svg-7"}]]),WHe=Bt("cash","IconCash",[["path",{d:"M7 9m0 2a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v6a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2z",key:"svg-0"}],["path",{d:"M14 14m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0",key:"svg-1"}],["path",{d:"M17 9v-2a2 2 0 0 0 -2 -2h-10a2 2 0 0 0 -2 2v6a2 2 0 0 0 2 2h2",key:"svg-2"}]]),VHe=Bt("chevron-down","IconChevronDown",[["path",{d:"M6 9l6 6l6 -6",key:"svg-0"}]]),HHe=Bt("chevrons-left","IconChevronsLeft",[["path",{d:"M11 7l-5 5l5 5",key:"svg-0"}],["path",{d:"M17 7l-5 5l5 5",key:"svg-1"}]]),qHe=Bt("copy","IconCopy",[["path",{d:"M7 7m0 2.667a2.667 2.667 0 0 1 2.667 -2.667h8.666a2.667 2.667 0 0 1 2.667 2.667v8.666a2.667 2.667 0 0 1 -2.667 2.667h-8.666a2.667 2.667 0 0 1 -2.667 -2.667z",key:"svg-0"}],["path",{d:"M4.012 16.737a2.005 2.005 0 0 1 -1.012 -1.737v-10c0 -1.1 .9 -2 2 -2h10c.75 0 1.158 .385 1.5 1",key:"svg-1"}]]),GHe=Bt("credit-card","IconCreditCard",[["path",{d:"M3 5m0 3a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v8a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3z",key:"svg-0"}],["path",{d:"M3 10l18 0",key:"svg-1"}],["path",{d:"M7 15l.01 0",key:"svg-2"}],["path",{d:"M11 15l2 0",key:"svg-3"}]]),KHe=Bt("dashboard","IconDashboard",[["path",{d:"M12 13m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0",key:"svg-0"}],["path",{d:"M13.45 11.55l2.05 -2.05",key:"svg-1"}],["path",{d:"M6.4 20a9 9 0 1 1 11.2 0z",key:"svg-2"}]]),YHe=Bt("device-desktop","IconDeviceDesktop",[["path",{d:"M3 5a1 1 0 0 1 1 -1h16a1 1 0 0 1 1 1v10a1 1 0 0 1 -1 1h-16a1 1 0 0 1 -1 -1v-10z",key:"svg-0"}],["path",{d:"M7 20h10",key:"svg-1"}],["path",{d:"M9 16v4",key:"svg-2"}],["path",{d:"M15 16v4",key:"svg-3"}]]),ZHe=Bt("discount-check","IconDiscountCheck",[["path",{d:"M5 7.2a2.2 2.2 0 0 1 2.2 -2.2h1a2.2 2.2 0 0 0 1.55 -.64l.7 -.7a2.2 2.2 0 0 1 3.12 0l.7 .7c.412 .41 .97 .64 1.55 .64h1a2.2 2.2 0 0 1 2.2 2.2v1c0 .58 .23 1.138 .64 1.55l.7 .7a2.2 2.2 0 0 1 0 3.12l-.7 .7a2.2 2.2 0 0 0 -.64 1.55v1a2.2 2.2 0 0 1 -2.2 2.2h-1a2.2 2.2 0 0 0 -1.55 .64l-.7 .7a2.2 2.2 0 0 1 -3.12 0l-.7 -.7a2.2 2.2 0 0 0 -1.55 -.64h-1a2.2 2.2 0 0 1 -2.2 -2.2v-1a2.2 2.2 0 0 0 -.64 -1.55l-.7 -.7a2.2 2.2 0 0 1 0 -3.12l.7 -.7a2.2 2.2 0 0 0 .64 -1.55v-1",key:"svg-0"}],["path",{d:"M9 12l2 2l4 -4",key:"svg-1"}]]),XHe=Bt("eye-off","IconEyeOff",[["path",{d:"M10.585 10.587a2 2 0 0 0 2.829 2.828",key:"svg-0"}],["path",{d:"M16.681 16.673a8.717 8.717 0 0 1 -4.681 1.327c-3.6 0 -6.6 -2 -9 -6c1.272 -2.12 2.712 -3.678 4.32 -4.674m2.86 -1.146a9.055 9.055 0 0 1 1.82 -.18c3.6 0 6.6 2 9 6c-.666 1.11 -1.379 2.067 -2.138 2.87",key:"svg-1"}],["path",{d:"M3 3l18 18",key:"svg-2"}]]),QHe=Bt("eye","IconEye",[["path",{d:"M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-0"}],["path",{d:"M21 12c-2.4 4 -5.4 6 -9 6c-3.6 0 -6.6 -2 -9 -6c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6",key:"svg-1"}]]),JHe=Bt("file-text","IconFileText",[["path",{d:"M14 3v4a1 1 0 0 0 1 1h4",key:"svg-0"}],["path",{d:"M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z",key:"svg-1"}],["path",{d:"M9 9l1 0",key:"svg-2"}],["path",{d:"M9 13l6 0",key:"svg-3"}],["path",{d:"M9 17l6 0",key:"svg-4"}]]),eqe=Bt("loader-2","IconLoader2",[["path",{d:"M12 3a9 9 0 1 0 9 9",key:"svg-0"}]]),tqe=Bt("lock","IconLock",[["path",{d:"M5 13a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v6a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-6z",key:"svg-0"}],["path",{d:"M11 16a1 1 0 1 0 2 0a1 1 0 0 0 -2 0",key:"svg-1"}],["path",{d:"M8 11v-4a4 4 0 1 1 8 0v4",key:"svg-2"}]]),nqe=Bt("mail","IconMail",[["path",{d:"M3 7a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-10z",key:"svg-0"}],["path",{d:"M3 7l9 6l9 -6",key:"svg-1"}]]),rqe=Bt("menu-2","IconMenu2",[["path",{d:"M4 6l16 0",key:"svg-0"}],["path",{d:"M4 12l16 0",key:"svg-1"}],["path",{d:"M4 18l16 0",key:"svg-2"}]]),iqe=Bt("moon","IconMoon",[["path",{d:"M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454z",key:"svg-0"}]]),oqe=Bt("news","IconNews",[["path",{d:"M16 6h3a1 1 0 0 1 1 1v11a2 2 0 0 1 -4 0v-13a1 1 0 0 0 -1 -1h-10a1 1 0 0 0 -1 1v12a3 3 0 0 0 3 3h11",key:"svg-0"}],["path",{d:"M8 8l4 0",key:"svg-1"}],["path",{d:"M8 12l4 0",key:"svg-2"}],["path",{d:"M8 16l4 0",key:"svg-3"}]]),aqe=Bt("route","IconRoute",[["path",{d:"M3 19a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-0"}],["path",{d:"M19 7a2 2 0 1 0 0 -4a2 2 0 0 0 0 4z",key:"svg-1"}],["path",{d:"M11 19h5.5a3.5 3.5 0 0 0 0 -7h-8a3.5 3.5 0 0 1 0 -7h4.5",key:"svg-2"}]]),uqe=Bt("server-bolt","IconServerBolt",[["path",{d:"M3 4m0 3a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v2a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3z",key:"svg-0"}],["path",{d:"M15 20h-9a3 3 0 0 1 -3 -3v-2a3 3 0 0 1 3 -3h12",key:"svg-1"}],["path",{d:"M7 8v.01",key:"svg-2"}],["path",{d:"M7 16v.01",key:"svg-3"}],["path",{d:"M20 15l-2 3h3l-2 3",key:"svg-4"}]]),sqe=Bt("server","IconServer",[["path",{d:"M3 4m0 3a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v2a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3z",key:"svg-0"}],["path",{d:"M3 12m0 3a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v2a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3z",key:"svg-1"}],["path",{d:"M7 8l0 .01",key:"svg-2"}],["path",{d:"M7 16l0 .01",key:"svg-3"}]]),lqe=Bt("settings","IconSettings",[["path",{d:"M10.325 4.317c.426 -1.756 2.924 -1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543 -.94 3.31 .826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756 .426 1.756 2.924 0 3.35a1.724 1.724 0 0 0 -1.066 2.573c.94 1.543 -.826 3.31 -2.37 2.37a1.724 1.724 0 0 0 -2.572 1.065c-.426 1.756 -2.924 1.756 -3.35 0a1.724 1.724 0 0 0 -2.573 -1.066c-1.543 .94 -3.31 -.826 -2.37 -2.37a1.724 1.724 0 0 0 -1.065 -2.572c-1.756 -.426 -1.756 -2.924 0 -3.35a1.724 1.724 0 0 0 1.066 -2.573c-.94 -1.543 .826 -3.31 2.37 -2.37c1 .608 2.296 .07 2.572 -1.065z",key:"svg-0"}],["path",{d:"M9 12a3 3 0 1 0 6 0a3 3 0 0 0 -6 0",key:"svg-1"}]]),cqe=Bt("sun","IconSun",[["path",{d:"M12 12m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0",key:"svg-0"}],["path",{d:"M3 12h1m8 -9v1m8 8h1m-9 8v1m-6.4 -15.4l.7 .7m12.1 -.7l-.7 .7m0 11.4l.7 .7m-12.1 -.7l-.7 .7",key:"svg-1"}]]),fqe=Bt("ticket","IconTicket",[["path",{d:"M15 5l0 2",key:"svg-0"}],["path",{d:"M15 11l0 2",key:"svg-1"}],["path",{d:"M15 17l0 2",key:"svg-2"}],["path",{d:"M5 5h14a2 2 0 0 1 2 2v3a2 2 0 0 0 0 4v3a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-3a2 2 0 0 0 0 -4v-3a2 2 0 0 1 2 -2",key:"svg-3"}]]),dqe=Bt("user-circle","IconUserCircle",[["path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",key:"svg-0"}],["path",{d:"M12 10m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0",key:"svg-1"}],["path",{d:"M6.168 18.849a4 4 0 0 1 3.832 -2.849h4a4 4 0 0 1 3.834 2.855",key:"svg-2"}]]),hqe=Bt("user","IconUser",[["path",{d:"M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0",key:"svg-0"}],["path",{d:"M6 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2",key:"svg-1"}]]),pqe=Bt("users","IconUsers",[["path",{d:"M9 7m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0",key:"svg-0"}],["path",{d:"M3 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2",key:"svg-1"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"svg-2"}],["path",{d:"M21 21v-2a4 4 0 0 0 -3 -3.85",key:"svg-3"}]]),mqe=Bt("x","IconX",[["path",{d:"M18 6l-12 12",key:"svg-0"}],["path",{d:"M6 6l12 12",key:"svg-1"}]]);function xr(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var due=typeof Symbol=="function"&&Symbol.observable||"@@observable",HT=due,A_=()=>Math.random().toString(36).substring(7).split("").join("."),hue={INIT:`@@redux/INIT${A_()}`,REPLACE:`@@redux/REPLACE${A_()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${A_()}`},n1=hue;function VA(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function oL(e,t,n){if(typeof e!="function")throw new Error(xr(2));if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(xr(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(xr(1));return n(oL)(e,t)}let r=e,i=t,o=new Map,a=o,u=0,s=!1;function l(){a===o&&(a=new Map,o.forEach((y,x)=>{a.set(x,y)}))}function c(){if(s)throw new Error(xr(3));return i}function d(y){if(typeof y!="function")throw new Error(xr(4));if(s)throw new Error(xr(5));let x=!0;l();const w=u++;return a.set(w,y),function(){if(x){if(s)throw new Error(xr(6));x=!1,l(),a.delete(w),o=null}}}function h(y){if(!VA(y))throw new Error(xr(7));if(typeof y.type>"u")throw new Error(xr(8));if(typeof y.type!="string")throw new Error(xr(17));if(s)throw new Error(xr(9));try{s=!0,i=r(i,y)}finally{s=!1}return(o=a).forEach(w=>{w()}),y}function m(y){if(typeof y!="function")throw new Error(xr(10));r=y,h({type:n1.REPLACE})}function g(){const y=d;return{subscribe(x){if(typeof x!="object"||x===null)throw new Error(xr(11));function w(){const A=x;A.next&&A.next(c())}return w(),{unsubscribe:y(w)}},[HT](){return this}}}return h({type:n1.INIT}),{dispatch:h,subscribe:d,getState:c,replaceReducer:m,[HT]:g}}function pue(e){Object.keys(e).forEach(t=>{const n=e[t];if(typeof n(void 0,{type:n1.INIT})>"u")throw new Error(xr(12));if(typeof n(void 0,{type:n1.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(xr(13))})}function mue(e){const t=Object.keys(e),n={};for(let o=0;o"u")throw u&&u.type,new Error(xr(14));l[d]=g,s=s||g!==m}return s=s||r.length!==Object.keys(a).length,s?l:a}}function r1(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function gue(...e){return t=>(n,r)=>{const i=t(n,r);let o=()=>{throw new Error(xr(15))};const a={getState:i.getState,dispatch:(s,...l)=>o(s,...l)},u=e.map(s=>s(a));return o=r1(...u)(i.dispatch),{...i,dispatch:o}}}function vue(e){return VA(e)&&"type"in e&&typeof e.type=="string"}var aL=Symbol.for("immer-nothing"),qT=Symbol.for("immer-draftable"),Ki=Symbol.for("immer-state");function Zo(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var dd=Object.getPrototypeOf;function fc(e){return!!e&&!!e[Ki]}function Mu(e){return e?uL(e)||Array.isArray(e)||!!e[qT]||!!e.constructor?.[qT]||ow(e)||aw(e):!1}var yue=Object.prototype.constructor.toString();function uL(e){if(!e||typeof e!="object")return!1;const t=dd(e);if(t===null)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===yue}function i1(e,t){iw(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function iw(e){const t=e[Ki];return t?t.type_:Array.isArray(e)?1:ow(e)?2:aw(e)?3:0}function r3(e,t){return iw(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function sL(e,t,n){const r=iw(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function bue(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function ow(e){return e instanceof Map}function aw(e){return e instanceof Set}function Rl(e){return e.copy_||e.base_}function i3(e,t){if(ow(e))return new Map(e);if(aw(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);if(!t&&uL(e))return dd(e)?{...e}:Object.assign(Object.create(null),e);const n=Object.getOwnPropertyDescriptors(e);delete n[Ki];let r=Reflect.ownKeys(n);for(let i=0;i1&&(e.set=e.add=e.clear=e.delete=wue),Object.freeze(e),t&&Object.entries(e).forEach(([n,r])=>HA(r,!0))),e}function wue(){Zo(2)}function uw(e){return Object.isFrozen(e)}var xue={};function dc(e){const t=xue[e];return t||Zo(0,e),t}var g0;function lL(){return g0}function _ue(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function GT(e,t){t&&(dc("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function o3(e){a3(e),e.drafts_.forEach(Sue),e.drafts_=null}function a3(e){e===g0&&(g0=e.parent_)}function KT(e){return g0=_ue(g0,e)}function Sue(e){const t=e[Ki];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function YT(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[Ki].modified_&&(o3(t),Zo(4)),Mu(e)&&(e=o1(t,e),t.parent_||a1(t,e)),t.patches_&&dc("Patches").generateReplacementPatches_(n[Ki].base_,e,t.patches_,t.inversePatches_)):e=o1(t,n,[]),o3(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==aL?e:void 0}function o1(e,t,n){if(uw(t))return t;const r=t[Ki];if(!r)return i1(t,(i,o)=>ZT(e,r,t,i,o,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return a1(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const i=r.copy_;let o=i,a=!1;r.type_===3&&(o=new Set(i),i.clear(),a=!0),i1(o,(u,s)=>ZT(e,r,i,u,s,n,a)),a1(e,i,!1),n&&e.patches_&&dc("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function ZT(e,t,n,r,i,o,a){if(fc(i)){const u=o&&t&&t.type_!==3&&!r3(t.assigned_,r)?o.concat(r):void 0,s=o1(e,i,u);if(sL(n,r,s),fc(s))e.canAutoFreeze_=!1;else return}else a&&n.add(i);if(Mu(i)&&!uw(i)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;o1(e,i),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&a1(e,i)}}function a1(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&HA(t,n)}function Cue(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:lL(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=r,o=qA;n&&(i=[r],o=v0);const{revoke:a,proxy:u}=Proxy.revocable(i,o);return r.draft_=u,r.revoke_=a,u}var qA={get(e,t){if(t===Ki)return e;const n=Rl(e);if(!r3(n,t))return Eue(e,n,t);const r=n[t];return e.finalized_||!Mu(r)?r:r===O_(e.base_,t)?(P_(e),e.copy_[t]=s3(r,e)):r},has(e,t){return t in Rl(e)},ownKeys(e){return Reflect.ownKeys(Rl(e))},set(e,t,n){const r=cL(Rl(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const i=O_(Rl(e),t),o=i?.[Ki];if(o&&o.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(bue(n,i)&&(n!==void 0||r3(e.base_,t)))return!0;P_(e),u3(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return O_(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,P_(e),u3(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Rl(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){Zo(11)},getPrototypeOf(e){return dd(e.base_)},setPrototypeOf(){Zo(12)}},v0={};i1(qA,(e,t)=>{v0[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});v0.deleteProperty=function(e,t){return v0.set.call(this,e,t,void 0)};v0.set=function(e,t,n){return qA.set.call(this,e[0],t,n,e[0])};function O_(e,t){const n=e[Ki];return(n?Rl(n):e)[t]}function Eue(e,t,n){const r=cL(t,n);return r?"value"in r?r.value:r.get?.call(e.draft_):void 0}function cL(e,t){if(!(t in e))return;let n=dd(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=dd(n)}}function u3(e){e.modified_||(e.modified_=!0,e.parent_&&u3(e.parent_))}function P_(e){e.copy_||(e.copy_=i3(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Aue=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const o=n;n=t;const a=this;return function(s=o,...l){return a.produce(s,c=>n.call(this,c,...l))}}typeof n!="function"&&Zo(6),r!==void 0&&typeof r!="function"&&Zo(7);let i;if(Mu(t)){const o=KT(this),a=s3(t,void 0);let u=!0;try{i=n(a),u=!1}finally{u?o3(o):a3(o)}return GT(o,r),YT(i,o)}else if(!t||typeof t!="object"){if(i=n(t),i===void 0&&(i=t),i===aL&&(i=void 0),this.autoFreeze_&&HA(i,!0),r){const o=[],a=[];dc("Patches").generateReplacementPatches_(t,i,o,a),r(o,a)}return i}else Zo(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(a,...u)=>this.produceWithPatches(a,s=>t(s,...u));let r,i;return[this.produce(t,n,(a,u)=>{r=a,i=u}),r,i]},typeof e?.autoFreeze=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof e?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){Mu(e)||Zo(8),fc(e)&&(e=Oue(e));const t=KT(this),n=s3(e,void 0);return n[Ki].isManual_=!0,a3(t),n}finishDraft(e,t){const n=e&&e[Ki];(!n||!n.isManual_)&&Zo(9);const{scope_:r}=n;return GT(r,t),YT(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const i=t[n];if(i.path.length===0&&i.op==="replace"){e=i.value;break}}n>-1&&(t=t.slice(n+1));const r=dc("Patches").applyPatches_;return fc(e)?r(e,t):this.produce(e,i=>r(i,t))}};function s3(e,t){const n=ow(e)?dc("MapSet").proxyMap_(e,t):aw(e)?dc("MapSet").proxySet_(e,t):Cue(e,t);return(t?t.scope_:lL()).drafts_.push(n),n}function Oue(e){return fc(e)||Zo(10,e),fL(e)}function fL(e){if(!Mu(e)||uw(e))return e;const t=e[Ki];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=i3(e,t.scope_.immer_.useStrictShallowCopy_)}else n=i3(e,!0);return i1(n,(r,i)=>{sL(n,r,fL(i))}),t&&(t.finalized_=!1),n}var Yi=new Aue,dL=Yi.produce;Yi.produceWithPatches.bind(Yi);Yi.setAutoFreeze.bind(Yi);Yi.setUseStrictShallowCopy.bind(Yi);Yi.applyPatches.bind(Yi);Yi.createDraft.bind(Yi);Yi.finishDraft.bind(Yi);function Pue(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function kue(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function Tue(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var XT=e=>Array.isArray(e)?e:[e];function Mue(e){const t=Array.isArray(e[0])?e[0]:e;return Tue(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function Rue(e,t){const n=[],{length:r}=e;for(let i=0;i{n=bv(),a.resetResultsCount()},a.resultsCount=()=>o,a.resetResultsCount=()=>{o=0},a}function Nue(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...i)=>{let o=0,a=0,u,s={},l=i.pop();typeof l=="object"&&(s=l,l=i.pop()),Pue(l,`createSelector expects an output function after the inputs, but received: [${typeof l}]`);const c={...n,...s},{memoize:d,memoizeOptions:h=[],argsMemoize:m=hL,argsMemoizeOptions:g=[],devModeChecks:v={}}=c,y=XT(h),x=XT(g),w=Mue(i),S=d(function(){return o++,l.apply(null,arguments)},...y),A=m(function(){a++;const C=Rue(w,arguments);return u=S.apply(null,C),u},...x);return Object.assign(A,{resultFunc:l,memoizedResultFunc:S,dependencies:w,dependencyRecomputations:()=>a,resetDependencyRecomputations:()=>{a=0},lastResult:()=>u,recomputations:()=>o,resetRecomputations:()=>{o=0},memoize:d,argsMemoize:m})};return Object.assign(r,{withTypes:()=>r}),r}var Fue=Nue(hL),Lue=Object.assign((e,t=Fue)=>{kue(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const n=Object.keys(e),r=n.map(o=>e[o]);return t(r,(...o)=>o.reduce((a,u,s)=>(a[n[s]]=u,a),{}))},{withTypes:()=>Lue});function pL(e){return({dispatch:n,getState:r})=>i=>o=>typeof o=="function"?o(n,r,e):i(o)}var jue=pL(),Bue=pL,zue=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?r1:r1.apply(null,arguments)},Uue=e=>e&&typeof e.match=="function";function jp(e,t){function n(...r){if(t){let i=t(...r);if(!i)throw new Error(Su(0));return{type:e,payload:i.payload,..."meta"in i&&{meta:i.meta},..."error"in i&&{error:i.error}}}return{type:e,payload:r[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=r=>vue(r)&&r.type===e,n}var mL=class _p extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,_p.prototype)}static get[Symbol.species](){return _p}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new _p(...t[0].concat(this)):new _p(...t.concat(this))}};function JT(e){return Mu(e)?dL(e,()=>{}):e}function eM(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}function Wue(e){return typeof e=="boolean"}var Vue=()=>function(t){const{thunk:n=!0,immutableCheck:r=!0,serializableCheck:i=!0,actionCreatorCheck:o=!0}=t??{};let a=new mL;return n&&(Wue(n)?a.push(jue):a.push(Bue(n.extraArgument))),a},Hue="RTK_autoBatch",tM=e=>t=>{setTimeout(t,e)},que=(e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let i=!0,o=!1,a=!1;const u=new Set,s=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:tM(10):e.type==="callback"?e.queueNotification:tM(e.timeout),l=()=>{a=!1,o&&(o=!1,u.forEach(c=>c()))};return Object.assign({},r,{subscribe(c){const d=()=>i&&c(),h=r.subscribe(d);return u.add(c),()=>{h(),u.delete(c)}},dispatch(c){try{return i=!c?.meta?.[Hue],o=!i,o&&(a||(a=!0,s(l))),r.dispatch(c)}finally{i=!0}}})},Gue=e=>function(n){const{autoBatch:r=!0}=n??{};let i=new mL(e);return r&&i.push(que(typeof r=="object"?r:void 0)),i};function gqe(e){const t=Vue(),{reducer:n=void 0,middleware:r,devTools:i=!0,preloadedState:o=void 0,enhancers:a=void 0}=e;let u;if(typeof n=="function")u=n;else if(VA(n))u=mue(n);else throw new Error(Su(1));let s;typeof r=="function"?s=r(t):s=t();let l=r1;i&&(l=zue({trace:!1,...typeof i=="object"&&i}));const c=gue(...s),d=Gue(c);let h=typeof a=="function"?a(d):d();const m=l(...h);return oL(u,o,m)}function gL(e){const t={},n=[];let r;const i={addCase(o,a){const u=typeof o=="string"?o:o.type;if(!u)throw new Error(Su(28));if(u in t)throw new Error(Su(29));return t[u]=a,i},addMatcher(o,a){return n.push({matcher:o,reducer:a}),i},addDefaultCase(o){return r=o,i}};return e(i),[t,n,r]}function Kue(e){return typeof e=="function"}function Yue(e,t){let[n,r,i]=gL(t),o;if(Kue(e))o=()=>JT(e());else{const u=JT(e);o=()=>u}function a(u=o(),s){let l=[n[s.type],...r.filter(({matcher:c})=>c(s)).map(({reducer:c})=>c)];return l.filter(c=>!!c).length===0&&(l=[i]),l.reduce((c,d)=>{if(d)if(fc(c)){const m=d(c,s);return m===void 0?c:m}else{if(Mu(c))return dL(c,h=>d(h,s));{const h=d(c,s);if(h===void 0){if(c===null)return c;throw Error("A case reducer on a non-draftable value must not return undefined")}return h}}return c},u)}return a.getInitialState=o,a}var Zue=(e,t)=>Uue(e)?e.match(t):e(t);function Xue(...e){return t=>e.some(n=>Zue(n,t))}var Que="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Jue=(e=21)=>{let t="",n=e;for(;n--;)t+=Que[Math.random()*64|0];return t},ese=["name","message","stack","code"],k_=class{constructor(e,t){this.payload=e,this.meta=t}_type},nM=class{constructor(e,t){this.payload=e,this.meta=t}_type},tse=e=>{if(typeof e=="object"&&e!==null){const t={};for(const n of ese)typeof e[n]=="string"&&(t[n]=e[n]);return t}return{message:String(e)}},vqe=(()=>{function e(t,n,r){const i=jp(t+"/fulfilled",(s,l,c,d)=>({payload:s,meta:{...d||{},arg:c,requestId:l,requestStatus:"fulfilled"}})),o=jp(t+"/pending",(s,l,c)=>({payload:void 0,meta:{...c||{},arg:l,requestId:s,requestStatus:"pending"}})),a=jp(t+"/rejected",(s,l,c,d,h)=>({payload:d,error:(r&&r.serializeError||tse)(s||"Rejected"),meta:{...h||{},arg:c,requestId:l,rejectedWithValue:!!d,requestStatus:"rejected",aborted:s?.name==="AbortError",condition:s?.name==="ConditionError"}}));function u(s){return(l,c,d)=>{const h=r?.idGenerator?r.idGenerator(s):Jue(),m=new AbortController;let g,v;function y(w){v=w,m.abort()}const x=async function(){let w;try{let A=r?.condition?.(s,{getState:c,extra:d});if(rse(A)&&(A=await A),A===!1||m.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};const E=new Promise((C,P)=>{g=()=>{P({name:"AbortError",message:v||"Aborted"})},m.signal.addEventListener("abort",g)});l(o(h,s,r?.getPendingMeta?.({requestId:h,arg:s},{getState:c,extra:d}))),w=await Promise.race([E,Promise.resolve(n(s,{dispatch:l,getState:c,extra:d,requestId:h,signal:m.signal,abort:y,rejectWithValue:(C,P)=>new k_(C,P),fulfillWithValue:(C,P)=>new nM(C,P)})).then(C=>{if(C instanceof k_)throw C;return C instanceof nM?i(C.payload,h,s,C.meta):i(C,h,s)})])}catch(A){w=A instanceof k_?a(null,h,s,A.payload,A.meta):a(A,h,s)}finally{g&&m.signal.removeEventListener("abort",g)}return r&&!r.dispatchConditionRejection&&a.match(w)&&w.meta.condition||l(w),w}();return Object.assign(x,{abort:y,requestId:h,arg:s,unwrap(){return x.then(nse)}})}}return Object.assign(u,{pending:o,rejected:a,fulfilled:i,settled:Xue(a,i),typePrefix:t})}return e.withTypes=()=>e,e})();function nse(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function rse(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var ise=Symbol.for("rtk-slice-createasyncthunk");function ose(e,t){return`${e}/${t}`}function ase({creators:e}={}){const t=e?.asyncThunk?.[ise];return function(r){const{name:i,reducerPath:o=i}=r;if(!i)throw new Error(Su(11));const a=(typeof r.reducers=="function"?r.reducers(sse()):r.reducers)||{},u=Object.keys(a),s={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},l={addCase(w,S){const A=typeof w=="string"?w:w.type;if(!A)throw new Error(Su(12));if(A in s.sliceCaseReducersByType)throw new Error(Su(13));return s.sliceCaseReducersByType[A]=S,l},addMatcher(w,S){return s.sliceMatchers.push({matcher:w,reducer:S}),l},exposeAction(w,S){return s.actionCreators[w]=S,l},exposeCaseReducer(w,S){return s.sliceCaseReducersByName[w]=S,l}};u.forEach(w=>{const S=a[w],A={reducerName:w,type:ose(i,w),createNotation:typeof r.reducers=="function"};cse(S)?dse(A,S,l,t):lse(A,S,l)});function c(){const[w={},S=[],A=void 0]=typeof r.extraReducers=="function"?gL(r.extraReducers):[r.extraReducers],E={...w,...s.sliceCaseReducersByType};return Yue(r.initialState,C=>{for(let P in E)C.addCase(P,E[P]);for(let P of s.sliceMatchers)C.addMatcher(P.matcher,P.reducer);for(let P of S)C.addMatcher(P.matcher,P.reducer);A&&C.addDefaultCase(A)})}const d=w=>w,h=new Map;let m;function g(w,S){return m||(m=c()),m(w,S)}function v(){return m||(m=c()),m.getInitialState()}function y(w,S=!1){function A(C){let P=C[w];return typeof P>"u"&&S&&(P=v()),P}function E(C=d){const P=eM(h,S,()=>new WeakMap);return eM(P,C,()=>{const k={};for(const[M,L]of Object.entries(r.selectors??{}))k[M]=use(L,C,v,S);return k})}return{reducerPath:w,getSelectors:E,get selectors(){return E(A)},selectSlice:A}}const x={name:i,reducer:g,actions:s.actionCreators,caseReducers:s.sliceCaseReducersByName,getInitialState:v,...y(o),injectInto(w,{reducerPath:S,...A}={}){const E=S??o;return w.inject({reducerPath:E,reducer:g},A),{...x,...y(E,!0)}}};return x}}function use(e,t,n,r){function i(o,...a){let u=t(o);return typeof u>"u"&&r&&(u=n()),e(u,...a)}return i.unwrapped=e,i}var yqe=ase();function sse(){function e(t,n){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...n}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...n){return t(...n)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,n){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:n}},asyncThunk:e}}function lse({type:e,reducerName:t,createNotation:n},r,i){let o,a;if("reducer"in r){if(n&&!fse(r))throw new Error(Su(17));o=r.reducer,a=r.prepare}else o=r;i.addCase(e,o).exposeCaseReducer(t,o).exposeAction(t,a?jp(e,a):jp(e))}function cse(e){return e._reducerDefinitionType==="asyncThunk"}function fse(e){return e._reducerDefinitionType==="reducerWithPrepare"}function dse({type:e,reducerName:t},n,r,i){if(!i)throw new Error(Su(18));const{payloadCreator:o,fulfilled:a,pending:u,rejected:s,settled:l,options:c}=n,d=i(e,o,c);r.exposeAction(t,d),a&&r.addCase(d.fulfilled,a),u&&r.addCase(d.pending,u),s&&r.addCase(d.rejected,s),l&&r.addMatcher(d.settled,l),r.exposeCaseReducer(t,{fulfilled:a||wv,pending:u||wv,rejected:s||wv,settled:l||wv})}function wv(){}function Su(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}function vL(e,t){return function(){return e.apply(t,arguments)}}const{toString:hse}=Object.prototype,{getPrototypeOf:GA}=Object,sw=(e=>t=>{const n=hse.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),ha=e=>(e=e.toLowerCase(),t=>sw(t)===e),lw=e=>t=>typeof t===e,{isArray:Qd}=Array,y0=lw("undefined");function pse(e){return e!==null&&!y0(e)&&e.constructor!==null&&!y0(e.constructor)&&Wi(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const yL=ha("ArrayBuffer");function mse(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&yL(e.buffer),t}const gse=lw("string"),Wi=lw("function"),bL=lw("number"),cw=e=>e!==null&&typeof e=="object",vse=e=>e===!0||e===!1,my=e=>{if(sw(e)!=="object")return!1;const t=GA(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},yse=ha("Date"),bse=ha("File"),wse=ha("Blob"),xse=ha("FileList"),_se=e=>cw(e)&&Wi(e.pipe),Sse=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Wi(e.append)&&((t=sw(e))==="formdata"||t==="object"&&Wi(e.toString)&&e.toString()==="[object FormData]"))},Cse=ha("URLSearchParams"),[Ese,Ase,Ose,Pse]=["ReadableStream","Request","Response","Headers"].map(ha),kse=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Fm(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),Qd(e))for(r=0,i=e.length;r0;)if(i=n[r],t===i.toLowerCase())return i;return null}const Vl=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,xL=e=>!y0(e)&&e!==Vl;function l3(){const{caseless:e}=xL(this)&&this||{},t={},n=(r,i)=>{const o=e&&wL(t,i)||i;my(t[o])&&my(r)?t[o]=l3(t[o],r):my(r)?t[o]=l3({},r):Qd(r)?t[o]=r.slice():t[o]=r};for(let r=0,i=arguments.length;r(Fm(t,(i,o)=>{n&&Wi(i)?e[o]=vL(i,n):e[o]=i},{allOwnKeys:r}),e),Mse=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Rse=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},Dse=(e,t,n,r)=>{let i,o,a;const u={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-- >0;)a=i[o],(!r||r(a,e,t))&&!u[a]&&(t[a]=e[a],u[a]=!0);e=n!==!1&&GA(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},$se=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},Ise=e=>{if(!e)return null;if(Qd(e))return e;let t=e.length;if(!bL(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Nse=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&GA(Uint8Array)),Fse=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let i;for(;(i=r.next())&&!i.done;){const o=i.value;t.call(e,o[0],o[1])}},Lse=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},jse=ha("HTMLFormElement"),Bse=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),rM=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),zse=ha("RegExp"),_L=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Fm(n,(i,o)=>{let a;(a=t(i,o,e))!==!1&&(r[o]=a||i)}),Object.defineProperties(e,r)},Use=e=>{_L(e,(t,n)=>{if(Wi(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(Wi(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Wse=(e,t)=>{const n={},r=i=>{i.forEach(o=>{n[o]=!0})};return Qd(e)?r(e):r(String(e).split(t)),n},Vse=()=>{},Hse=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,T_="abcdefghijklmnopqrstuvwxyz",iM="0123456789",SL={DIGIT:iM,ALPHA:T_,ALPHA_DIGIT:T_+T_.toUpperCase()+iM},qse=(e=16,t=SL.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function Gse(e){return!!(e&&Wi(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const Kse=e=>{const t=new Array(10),n=(r,i)=>{if(cw(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[i]=r;const o=Qd(r)?[]:{};return Fm(r,(a,u)=>{const s=n(a,i+1);!y0(s)&&(o[u]=s)}),t[i]=void 0,o}}return r};return n(e,0)},Yse=ha("AsyncFunction"),Zse=e=>e&&(cw(e)||Wi(e))&&Wi(e.then)&&Wi(e.catch),CL=((e,t)=>e?setImmediate:t?((n,r)=>(Vl.addEventListener("message",({source:i,data:o})=>{i===Vl&&o===n&&r.length&&r.shift()()},!1),i=>{r.push(i),Vl.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Wi(Vl.postMessage)),Xse=typeof queueMicrotask<"u"?queueMicrotask.bind(Vl):typeof process<"u"&&process.nextTick||CL,he={isArray:Qd,isArrayBuffer:yL,isBuffer:pse,isFormData:Sse,isArrayBufferView:mse,isString:gse,isNumber:bL,isBoolean:vse,isObject:cw,isPlainObject:my,isReadableStream:Ese,isRequest:Ase,isResponse:Ose,isHeaders:Pse,isUndefined:y0,isDate:yse,isFile:bse,isBlob:wse,isRegExp:zse,isFunction:Wi,isStream:_se,isURLSearchParams:Cse,isTypedArray:Nse,isFileList:xse,forEach:Fm,merge:l3,extend:Tse,trim:kse,stripBOM:Mse,inherits:Rse,toFlatObject:Dse,kindOf:sw,kindOfTest:ha,endsWith:$se,toArray:Ise,forEachEntry:Fse,matchAll:Lse,isHTMLForm:jse,hasOwnProperty:rM,hasOwnProp:rM,reduceDescriptors:_L,freezeMethods:Use,toObjectSet:Wse,toCamelCase:Bse,noop:Vse,toFiniteNumber:Hse,findKey:wL,global:Vl,isContextDefined:xL,ALPHABET:SL,generateString:qse,isSpecCompliantForm:Gse,toJSONObject:Kse,isAsyncFn:Yse,isThenable:Zse,setImmediate:CL,asap:Xse};function pt(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status?i.status:null)}he.inherits(pt,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:he.toJSONObject(this.config),code:this.code,status:this.status}}});const EL=pt.prototype,AL={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{AL[e]={value:e}});Object.defineProperties(pt,AL);Object.defineProperty(EL,"isAxiosError",{value:!0});pt.from=(e,t,n,r,i,o)=>{const a=Object.create(EL);return he.toFlatObject(e,a,function(s){return s!==Error.prototype},u=>u!=="isAxiosError"),pt.call(a,e.message,t,n,r,i),a.cause=e,a.name=e.name,o&&Object.assign(a,o),a};const Qse=null;function c3(e){return he.isPlainObject(e)||he.isArray(e)}function OL(e){return he.endsWith(e,"[]")?e.slice(0,-2):e}function oM(e,t,n){return e?e.concat(t).map(function(i,o){return i=OL(i),!n&&o?"["+i+"]":i}).join(n?".":""):t}function Jse(e){return he.isArray(e)&&!e.some(c3)}const ele=he.toFlatObject(he,{},null,function(t){return/^is[A-Z]/.test(t)});function fw(e,t,n){if(!he.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=he.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(v,y){return!he.isUndefined(y[v])});const r=n.metaTokens,i=n.visitor||c,o=n.dots,a=n.indexes,s=(n.Blob||typeof Blob<"u"&&Blob)&&he.isSpecCompliantForm(t);if(!he.isFunction(i))throw new TypeError("visitor must be a function");function l(g){if(g===null)return"";if(he.isDate(g))return g.toISOString();if(!s&&he.isBlob(g))throw new pt("Blob is not supported. Use a Buffer instead.");return he.isArrayBuffer(g)||he.isTypedArray(g)?s&&typeof Blob=="function"?new Blob([g]):Buffer.from(g):g}function c(g,v,y){let x=g;if(g&&!y&&typeof g=="object"){if(he.endsWith(v,"{}"))v=r?v:v.slice(0,-2),g=JSON.stringify(g);else if(he.isArray(g)&&Jse(g)||(he.isFileList(g)||he.endsWith(v,"[]"))&&(x=he.toArray(g)))return v=OL(v),x.forEach(function(S,A){!(he.isUndefined(S)||S===null)&&t.append(a===!0?oM([v],A,o):a===null?v:v+"[]",l(S))}),!1}return c3(g)?!0:(t.append(oM(y,v,o),l(g)),!1)}const d=[],h=Object.assign(ele,{defaultVisitor:c,convertValue:l,isVisitable:c3});function m(g,v){if(!he.isUndefined(g)){if(d.indexOf(g)!==-1)throw Error("Circular reference detected in "+v.join("."));d.push(g),he.forEach(g,function(x,w){(!(he.isUndefined(x)||x===null)&&i.call(t,x,he.isString(w)?w.trim():w,v,h))===!0&&m(x,v?v.concat(w):[w])}),d.pop()}}if(!he.isObject(e))throw new TypeError("data must be an object");return m(e),t}function aM(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function KA(e,t){this._pairs=[],e&&fw(e,this,t)}const PL=KA.prototype;PL.append=function(t,n){this._pairs.push([t,n])};PL.toString=function(t){const n=t?function(r){return t.call(this,r,aM)}:aM;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function tle(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function kL(e,t,n){if(!t)return e;const r=n&&n.encode||tle;he.isFunction(n)&&(n={serialize:n});const i=n&&n.serialize;let o;if(i?o=i(t,n):o=he.isURLSearchParams(t)?t.toString():new KA(t,n).toString(r),o){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class uM{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){he.forEach(this.handlers,function(r){r!==null&&t(r)})}}const TL={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},nle=typeof URLSearchParams<"u"?URLSearchParams:KA,rle=typeof FormData<"u"?FormData:null,ile=typeof Blob<"u"?Blob:null,ole={isBrowser:!0,classes:{URLSearchParams:nle,FormData:rle,Blob:ile},protocols:["http","https","file","blob","url","data"]},YA=typeof window<"u"&&typeof document<"u",f3=typeof navigator=="object"&&navigator||void 0,ale=YA&&(!f3||["ReactNative","NativeScript","NS"].indexOf(f3.product)<0),ule=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",sle=YA&&window.location.href||"http://localhost",lle=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:YA,hasStandardBrowserEnv:ale,hasStandardBrowserWebWorkerEnv:ule,navigator:f3,origin:sle},Symbol.toStringTag,{value:"Module"})),jr={...lle,...ole};function cle(e,t){return fw(e,new jr.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,o){return jr.isNode&&he.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},t))}function fle(e){return he.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function dle(e){const t={},n=Object.keys(e);let r;const i=n.length;let o;for(r=0;r=n.length;return a=!a&&he.isArray(i)?i.length:a,s?(he.hasOwnProp(i,a)?i[a]=[i[a],r]:i[a]=r,!u):((!i[a]||!he.isObject(i[a]))&&(i[a]=[]),t(n,r,i[a],o)&&he.isArray(i[a])&&(i[a]=dle(i[a])),!u)}if(he.isFormData(e)&&he.isFunction(e.entries)){const n={};return he.forEachEntry(e,(r,i)=>{t(fle(r),i,n,0)}),n}return null}function hle(e,t,n){if(he.isString(e))try{return(t||JSON.parse)(e),he.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(0,JSON.stringify)(e)}const Lm={transitional:TL,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,o=he.isObject(t);if(o&&he.isHTMLForm(t)&&(t=new FormData(t)),he.isFormData(t))return i?JSON.stringify(ML(t)):t;if(he.isArrayBuffer(t)||he.isBuffer(t)||he.isStream(t)||he.isFile(t)||he.isBlob(t)||he.isReadableStream(t))return t;if(he.isArrayBufferView(t))return t.buffer;if(he.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let u;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return cle(t,this.formSerializer).toString();if((u=he.isFileList(t))||r.indexOf("multipart/form-data")>-1){const s=this.env&&this.env.FormData;return fw(u?{"files[]":t}:t,s&&new s,this.formSerializer)}}return o||i?(n.setContentType("application/json",!1),hle(t)):t}],transformResponse:[function(t){const n=this.transitional||Lm.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(he.isResponse(t)||he.isReadableStream(t))return t;if(t&&he.isString(t)&&(r&&!this.responseType||i)){const a=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(u){if(a)throw u.name==="SyntaxError"?pt.from(u,pt.ERR_BAD_RESPONSE,this,null,this.response):u}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:jr.classes.FormData,Blob:jr.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};he.forEach(["delete","get","head","post","put","patch"],e=>{Lm.headers[e]={}});const ple=he.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),mle=e=>{const t={};let n,r,i;return e&&e.split(` -`).forEach(function(a){i=a.indexOf(":"),n=a.substring(0,i).trim().toLowerCase(),r=a.substring(i+1).trim(),!(!n||t[n]&&ple[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},sM=Symbol("internals");function Qh(e){return e&&String(e).trim().toLowerCase()}function gy(e){return e===!1||e==null?e:he.isArray(e)?e.map(gy):String(e)}function gle(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const vle=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function M_(e,t,n,r,i){if(he.isFunction(r))return r.call(this,t,n);if(i&&(t=n),!!he.isString(t)){if(he.isString(r))return t.indexOf(r)!==-1;if(he.isRegExp(r))return r.test(t)}}function yle(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function ble(e,t){const n=he.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(i,o,a){return this[r].call(this,t,i,o,a)},configurable:!0})})}class wi{constructor(t){t&&this.set(t)}set(t,n,r){const i=this;function o(u,s,l){const c=Qh(s);if(!c)throw new Error("header name must be a non-empty string");const d=he.findKey(i,c);(!d||i[d]===void 0||l===!0||l===void 0&&i[d]!==!1)&&(i[d||s]=gy(u))}const a=(u,s)=>he.forEach(u,(l,c)=>o(l,c,s));if(he.isPlainObject(t)||t instanceof this.constructor)a(t,n);else if(he.isString(t)&&(t=t.trim())&&!vle(t))a(mle(t),n);else if(he.isHeaders(t))for(const[u,s]of t.entries())o(s,u,r);else t!=null&&o(n,t,r);return this}get(t,n){if(t=Qh(t),t){const r=he.findKey(this,t);if(r){const i=this[r];if(!n)return i;if(n===!0)return gle(i);if(he.isFunction(n))return n.call(this,i,r);if(he.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Qh(t),t){const r=he.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||M_(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let i=!1;function o(a){if(a=Qh(a),a){const u=he.findKey(r,a);u&&(!n||M_(r,r[u],u,n))&&(delete r[u],i=!0)}}return he.isArray(t)?t.forEach(o):o(t),i}clear(t){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const o=n[r];(!t||M_(this,this[o],o,t,!0))&&(delete this[o],i=!0)}return i}normalize(t){const n=this,r={};return he.forEach(this,(i,o)=>{const a=he.findKey(r,o);if(a){n[a]=gy(i),delete n[o];return}const u=t?yle(o):String(o).trim();u!==o&&delete n[o],n[u]=gy(i),r[u]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return he.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=t&&he.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` -`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(i=>r.set(i)),r}static accessor(t){const r=(this[sM]=this[sM]={accessors:{}}).accessors,i=this.prototype;function o(a){const u=Qh(a);r[u]||(ble(i,a),r[u]=!0)}return he.isArray(t)?t.forEach(o):o(t),this}}wi.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);he.reduceDescriptors(wi.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});he.freezeMethods(wi);function R_(e,t){const n=this||Lm,r=t||n,i=wi.from(r.headers);let o=r.data;return he.forEach(e,function(u){o=u.call(n,o,i.normalize(),t?t.status:void 0)}),i.normalize(),o}function RL(e){return!!(e&&e.__CANCEL__)}function Jd(e,t,n){pt.call(this,e??"canceled",pt.ERR_CANCELED,t,n),this.name="CanceledError"}he.inherits(Jd,pt,{__CANCEL__:!0});function DL(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new pt("Request failed with status code "+n.status,[pt.ERR_BAD_REQUEST,pt.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function wle(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function xle(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,o=0,a;return t=t!==void 0?t:1e3,function(s){const l=Date.now(),c=r[o];a||(a=l),n[i]=s,r[i]=l;let d=o,h=0;for(;d!==i;)h+=n[d++],d=d%e;if(i=(i+1)%e,i===o&&(o=(o+1)%e),l-a{n=c,i=null,o&&(clearTimeout(o),o=null),e.apply(null,l)};return[(...l)=>{const c=Date.now(),d=c-n;d>=r?a(l,c):(i=l,o||(o=setTimeout(()=>{o=null,a(i)},r-d)))},()=>i&&a(i)]}const u1=(e,t,n=3)=>{let r=0;const i=xle(50,250);return _le(o=>{const a=o.loaded,u=o.lengthComputable?o.total:void 0,s=a-r,l=i(s),c=a<=u;r=a;const d={loaded:a,total:u,progress:u?a/u:void 0,bytes:s,rate:l||void 0,estimated:l&&u&&c?(u-a)/l:void 0,event:o,lengthComputable:u!=null,[t?"download":"upload"]:!0};e(d)},n)},lM=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},cM=e=>(...t)=>he.asap(()=>e(...t)),Sle=jr.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,jr.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(jr.origin),jr.navigator&&/(msie|trident)/i.test(jr.navigator.userAgent)):()=>!0,Cle=jr.hasStandardBrowserEnv?{write(e,t,n,r,i,o){const a=[e+"="+encodeURIComponent(t)];he.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),he.isString(r)&&a.push("path="+r),he.isString(i)&&a.push("domain="+i),o===!0&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Ele(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Ale(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function $L(e,t){return e&&!Ele(t)?Ale(e,t):t}const fM=e=>e instanceof wi?{...e}:e;function hc(e,t){t=t||{};const n={};function r(l,c,d,h){return he.isPlainObject(l)&&he.isPlainObject(c)?he.merge.call({caseless:h},l,c):he.isPlainObject(c)?he.merge({},c):he.isArray(c)?c.slice():c}function i(l,c,d,h){if(he.isUndefined(c)){if(!he.isUndefined(l))return r(void 0,l,d,h)}else return r(l,c,d,h)}function o(l,c){if(!he.isUndefined(c))return r(void 0,c)}function a(l,c){if(he.isUndefined(c)){if(!he.isUndefined(l))return r(void 0,l)}else return r(void 0,c)}function u(l,c,d){if(d in t)return r(l,c);if(d in e)return r(void 0,l)}const s={url:o,method:o,data:o,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:u,headers:(l,c,d)=>i(fM(l),fM(c),d,!0)};return he.forEach(Object.keys(Object.assign({},e,t)),function(c){const d=s[c]||i,h=d(e[c],t[c],c);he.isUndefined(h)&&d!==u||(n[c]=h)}),n}const IL=e=>{const t=hc({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:o,headers:a,auth:u}=t;t.headers=a=wi.from(a),t.url=kL($L(t.baseURL,t.url),e.params,e.paramsSerializer),u&&a.set("Authorization","Basic "+btoa((u.username||"")+":"+(u.password?unescape(encodeURIComponent(u.password)):"")));let s;if(he.isFormData(n)){if(jr.hasStandardBrowserEnv||jr.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((s=a.getContentType())!==!1){const[l,...c]=s?s.split(";").map(d=>d.trim()).filter(Boolean):[];a.setContentType([l||"multipart/form-data",...c].join("; "))}}if(jr.hasStandardBrowserEnv&&(r&&he.isFunction(r)&&(r=r(t)),r||r!==!1&&Sle(t.url))){const l=i&&o&&Cle.read(o);l&&a.set(i,l)}return t},Ole=typeof XMLHttpRequest<"u",Ple=Ole&&function(e){return new Promise(function(n,r){const i=IL(e);let o=i.data;const a=wi.from(i.headers).normalize();let{responseType:u,onUploadProgress:s,onDownloadProgress:l}=i,c,d,h,m,g;function v(){m&&m(),g&&g(),i.cancelToken&&i.cancelToken.unsubscribe(c),i.signal&&i.signal.removeEventListener("abort",c)}let y=new XMLHttpRequest;y.open(i.method.toUpperCase(),i.url,!0),y.timeout=i.timeout;function x(){if(!y)return;const S=wi.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders()),E={data:!u||u==="text"||u==="json"?y.responseText:y.response,status:y.status,statusText:y.statusText,headers:S,config:e,request:y};DL(function(P){n(P),v()},function(P){r(P),v()},E),y=null}"onloadend"in y?y.onloadend=x:y.onreadystatechange=function(){!y||y.readyState!==4||y.status===0&&!(y.responseURL&&y.responseURL.indexOf("file:")===0)||setTimeout(x)},y.onabort=function(){y&&(r(new pt("Request aborted",pt.ECONNABORTED,e,y)),y=null)},y.onerror=function(){r(new pt("Network Error",pt.ERR_NETWORK,e,y)),y=null},y.ontimeout=function(){let A=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const E=i.transitional||TL;i.timeoutErrorMessage&&(A=i.timeoutErrorMessage),r(new pt(A,E.clarifyTimeoutError?pt.ETIMEDOUT:pt.ECONNABORTED,e,y)),y=null},o===void 0&&a.setContentType(null),"setRequestHeader"in y&&he.forEach(a.toJSON(),function(A,E){y.setRequestHeader(E,A)}),he.isUndefined(i.withCredentials)||(y.withCredentials=!!i.withCredentials),u&&u!=="json"&&(y.responseType=i.responseType),l&&([h,g]=u1(l,!0),y.addEventListener("progress",h)),s&&y.upload&&([d,m]=u1(s),y.upload.addEventListener("progress",d),y.upload.addEventListener("loadend",m)),(i.cancelToken||i.signal)&&(c=S=>{y&&(r(!S||S.type?new Jd(null,e,y):S),y.abort(),y=null)},i.cancelToken&&i.cancelToken.subscribe(c),i.signal&&(i.signal.aborted?c():i.signal.addEventListener("abort",c)));const w=wle(i.url);if(w&&jr.protocols.indexOf(w)===-1){r(new pt("Unsupported protocol "+w+":",pt.ERR_BAD_REQUEST,e));return}y.send(o||null)})},kle=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,i;const o=function(l){if(!i){i=!0,u();const c=l instanceof Error?l:this.reason;r.abort(c instanceof pt?c:new Jd(c instanceof Error?c.message:c))}};let a=t&&setTimeout(()=>{a=null,o(new pt(`timeout ${t} of ms exceeded`,pt.ETIMEDOUT))},t);const u=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(l=>{l.unsubscribe?l.unsubscribe(o):l.removeEventListener("abort",o)}),e=null)};e.forEach(l=>l.addEventListener("abort",o));const{signal:s}=r;return s.unsubscribe=()=>he.asap(u),s}},Tle=function*(e,t){let n=e.byteLength;if(n{const i=Mle(e,t);let o=0,a,u=s=>{a||(a=!0,r&&r(s))};return new ReadableStream({async pull(s){try{const{done:l,value:c}=await i.next();if(l){u(),s.close();return}let d=c.byteLength;if(n){let h=o+=d;n(h)}s.enqueue(new Uint8Array(c))}catch(l){throw u(l),l}},cancel(s){return u(s),i.return()}},{highWaterMark:2})},dw=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",NL=dw&&typeof ReadableStream=="function",Dle=dw&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),FL=(e,...t)=>{try{return!!e(...t)}catch{return!1}},$le=NL&&FL(()=>{let e=!1;const t=new Request(jr.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),hM=64*1024,d3=NL&&FL(()=>he.isReadableStream(new Response("").body)),s1={stream:d3&&(e=>e.body)};dw&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!s1[t]&&(s1[t]=he.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new pt(`Response type '${t}' is not supported`,pt.ERR_NOT_SUPPORT,r)})})})(new Response);const Ile=async e=>{if(e==null)return 0;if(he.isBlob(e))return e.size;if(he.isSpecCompliantForm(e))return(await new Request(jr.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(he.isArrayBufferView(e)||he.isArrayBuffer(e))return e.byteLength;if(he.isURLSearchParams(e)&&(e=e+""),he.isString(e))return(await Dle(e)).byteLength},Nle=async(e,t)=>{const n=he.toFiniteNumber(e.getContentLength());return n??Ile(t)},Fle=dw&&(async e=>{let{url:t,method:n,data:r,signal:i,cancelToken:o,timeout:a,onDownloadProgress:u,onUploadProgress:s,responseType:l,headers:c,withCredentials:d="same-origin",fetchOptions:h}=IL(e);l=l?(l+"").toLowerCase():"text";let m=kle([i,o&&o.toAbortSignal()],a),g;const v=m&&m.unsubscribe&&(()=>{m.unsubscribe()});let y;try{if(s&&$le&&n!=="get"&&n!=="head"&&(y=await Nle(c,r))!==0){let E=new Request(t,{method:"POST",body:r,duplex:"half"}),C;if(he.isFormData(r)&&(C=E.headers.get("content-type"))&&c.setContentType(C),E.body){const[P,k]=lM(y,u1(cM(s)));r=dM(E.body,hM,P,k)}}he.isString(d)||(d=d?"include":"omit");const x="credentials"in Request.prototype;g=new Request(t,{...h,signal:m,method:n.toUpperCase(),headers:c.normalize().toJSON(),body:r,duplex:"half",credentials:x?d:void 0});let w=await fetch(g);const S=d3&&(l==="stream"||l==="response");if(d3&&(u||S&&v)){const E={};["status","statusText","headers"].forEach(M=>{E[M]=w[M]});const C=he.toFiniteNumber(w.headers.get("content-length")),[P,k]=u&&lM(C,u1(cM(u),!0))||[];w=new Response(dM(w.body,hM,P,()=>{k&&k(),v&&v()}),E)}l=l||"text";let A=await s1[he.findKey(s1,l)||"text"](w,e);return!S&&v&&v(),await new Promise((E,C)=>{DL(E,C,{data:A,headers:wi.from(w.headers),status:w.status,statusText:w.statusText,config:e,request:g})})}catch(x){throw v&&v(),x&&x.name==="TypeError"&&/fetch/i.test(x.message)?Object.assign(new pt("Network Error",pt.ERR_NETWORK,e,g),{cause:x.cause||x}):pt.from(x,x&&x.code,e,g)}}),h3={http:Qse,xhr:Ple,fetch:Fle};he.forEach(h3,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const pM=e=>`- ${e}`,Lle=e=>he.isFunction(e)||e===null||e===!1,LL={getAdapter:e=>{e=he.isArray(e)?e:[e];const{length:t}=e;let n,r;const i={};for(let o=0;o`adapter ${u} `+(s===!1?"is not supported by the environment":"is not available in the build"));let a=t?o.length>1?`since : -`+o.map(pM).join(` -`):" "+pM(o[0]):"as no adapter specified";throw new pt("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return r},adapters:h3};function D_(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Jd(null,e)}function mM(e){return D_(e),e.headers=wi.from(e.headers),e.data=R_.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),LL.getAdapter(e.adapter||Lm.adapter)(e).then(function(r){return D_(e),r.data=R_.call(e,e.transformResponse,r),r.headers=wi.from(r.headers),r},function(r){return RL(r)||(D_(e),r&&r.response&&(r.response.data=R_.call(e,e.transformResponse,r.response),r.response.headers=wi.from(r.response.headers))),Promise.reject(r)})}const jL="1.7.9",hw={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{hw[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const gM={};hw.transitional=function(t,n,r){function i(o,a){return"[Axios v"+jL+"] Transitional option '"+o+"'"+a+(r?". "+r:"")}return(o,a,u)=>{if(t===!1)throw new pt(i(a," has been removed"+(n?" in "+n:"")),pt.ERR_DEPRECATED);return n&&!gM[a]&&(gM[a]=!0,console.warn(i(a," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,a,u):!0}};hw.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function jle(e,t,n){if(typeof e!="object")throw new pt("options must be an object",pt.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const o=r[i],a=t[o];if(a){const u=e[o],s=u===void 0||a(u,o,e);if(s!==!0)throw new pt("option "+o+" must be "+s,pt.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new pt("Unknown option "+o,pt.ERR_BAD_OPTION)}}const vy={assertOptions:jle,validators:hw},Sa=vy.validators;class Jl{constructor(t){this.defaults=t,this.interceptors={request:new uM,response:new uM}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const o=i.stack?i.stack.replace(/^.+\n/,""):"";try{r.stack?o&&!String(r.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(r.stack+=` -`+o):r.stack=o}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=hc(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&vy.assertOptions(r,{silentJSONParsing:Sa.transitional(Sa.boolean),forcedJSONParsing:Sa.transitional(Sa.boolean),clarifyTimeoutError:Sa.transitional(Sa.boolean)},!1),i!=null&&(he.isFunction(i)?n.paramsSerializer={serialize:i}:vy.assertOptions(i,{encode:Sa.function,serialize:Sa.function},!0)),vy.assertOptions(n,{baseUrl:Sa.spelling("baseURL"),withXsrfToken:Sa.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=o&&he.merge(o.common,o[n.method]);o&&he.forEach(["delete","get","head","post","put","patch","common"],g=>{delete o[g]}),n.headers=wi.concat(a,o);const u=[];let s=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(n)===!1||(s=s&&v.synchronous,u.unshift(v.fulfilled,v.rejected))});const l=[];this.interceptors.response.forEach(function(v){l.push(v.fulfilled,v.rejected)});let c,d=0,h;if(!s){const g=[mM.bind(this),void 0];for(g.unshift.apply(g,u),g.push.apply(g,l),h=g.length,c=Promise.resolve(n);d{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](i);r._listeners=null}),this.promise.then=i=>{let o;const a=new Promise(u=>{r.subscribe(u),o=u}).then(i);return a.cancel=function(){r.unsubscribe(o)},a},t(function(o,a,u){r.reason||(r.reason=new Jd(o,a,u),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new ZA(function(i){t=i}),cancel:t}}}function Ble(e){return function(n){return e.apply(null,n)}}function zle(e){return he.isObject(e)&&e.isAxiosError===!0}const p3={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(p3).forEach(([e,t])=>{p3[t]=e});function BL(e){const t=new Jl(e),n=vL(Jl.prototype.request,t);return he.extend(n,Jl.prototype,t,{allOwnKeys:!0}),he.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return BL(hc(e,i))},n}const ur=BL(Lm);ur.Axios=Jl;ur.CanceledError=Jd;ur.CancelToken=ZA;ur.isCancel=RL;ur.VERSION=jL;ur.toFormData=fw;ur.AxiosError=pt;ur.Cancel=ur.CanceledError;ur.all=function(t){return Promise.all(t)};ur.spread=Ble;ur.isAxiosError=zle;ur.mergeConfig=hc;ur.AxiosHeaders=wi;ur.formToJSON=e=>ML(he.isHTMLForm(e)?new FormData(e):e);ur.getAdapter=LL.getAdapter;ur.HttpStatusCode=p3;ur.default=ur;var Ule=e=>{switch(e){case"success":return Hle;case"info":return Gle;case"warning":return qle;case"error":return Kle;default:return null}},Wle=Array(12).fill(0),Vle=({visible:e,className:t})=>$.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},$.createElement("div",{className:"sonner-spinner"},Wle.map((n,r)=>$.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),Hle=$.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},$.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),qle=$.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},$.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),Gle=$.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},$.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),Kle=$.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},$.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),Yle=$.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},$.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),$.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),Zle=()=>{let[e,t]=$.useState(document.hidden);return $.useEffect(()=>{let n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e},m3=1,Xle=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:n,...r}=e,i=typeof e?.id=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:m3++,o=this.toasts.find(u=>u.id===i),a=e.dismissible===void 0?!0:e.dismissible;return o?this.toasts=this.toasts.map(u=>u.id===i?(this.publish({...u,...e,id:i,title:n}),{...u,...e,id:i,dismissible:a,title:n}):u):this.addToast({title:n,...r,dismissible:a,id:i}),i},this.dismiss=e=>(e||this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let r=e instanceof Promise?e:e(),i=n!==void 0,o,a=r.then(async s=>{if(o=["resolve",s],$.isValidElement(s))i=!1,this.create({id:n,type:"default",message:s});else if(Jle(s)&&!s.ok){i=!1;let l=typeof t.error=="function"?await t.error(`HTTP error! status: ${s.status}`):t.error,c=typeof t.description=="function"?await t.description(`HTTP error! status: ${s.status}`):t.description;this.create({id:n,type:"error",message:l,description:c})}else if(t.success!==void 0){i=!1;let l=typeof t.success=="function"?await t.success(s):t.success,c=typeof t.description=="function"?await t.description(s):t.description;this.create({id:n,type:"success",message:l,description:c})}}).catch(async s=>{if(o=["reject",s],t.error!==void 0){i=!1;let l=typeof t.error=="function"?await t.error(s):t.error,c=typeof t.description=="function"?await t.description(s):t.description;this.create({id:n,type:"error",message:l,description:c})}}).finally(()=>{var s;i&&(this.dismiss(n),n=void 0),(s=t.finally)==null||s.call(t)}),u=()=>new Promise((s,l)=>a.then(()=>o[0]==="reject"?l(o[1]):s(o[1])).catch(l));return typeof n!="string"&&typeof n!="number"?{unwrap:u}:Object.assign(n,{unwrap:u})},this.custom=(e,t)=>{let n=t?.id||m3++;return this.create({jsx:e(n),id:n,...t}),n},this.subscribers=[],this.toasts=[]}},Ii=new Xle,Qle=(e,t)=>{let n=t?.id||m3++;return Ii.addToast({title:e,...t,id:n}),n},Jle=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",ece=Qle,tce=()=>Ii.toasts,bqe=Object.assign(ece,{success:Ii.success,info:Ii.info,warning:Ii.warning,error:Ii.error,custom:Ii.custom,message:Ii.message,promise:Ii.promise,dismiss:Ii.dismiss,loading:Ii.loading},{getHistory:tce});function nce(e,{insertAt:t}={}){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}nce(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:max(var(--offset),env(safe-area-inset-right))}:where([data-sonner-toaster][data-x-position="left"]){left:max(var(--offset),env(safe-area-inset-left))}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:max(var(--offset),env(safe-area-inset-top))}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:max(var(--offset),env(safe-area-inset-bottom))}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:0;right:0;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation:swipe-out .2s ease-out forwards}@keyframes swipe-out{0%{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount)));opacity:1}to{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount) + var(--lift) * -100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;--mobile-offset: 16px;right:var(--mobile-offset);left:var(--mobile-offset);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset)}[data-sonner-toaster][data-y-position=bottom]{bottom:20px}[data-sonner-toaster][data-y-position=top]{top:20px}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset);right:var(--mobile-offset);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)} -`);function xv(e){return e.label!==void 0}var rce=3,ice="32px",vM=4e3,oce=356,ace=14,uce=20,sce=200;function lce(...e){return e.filter(Boolean).join(" ")}var cce=e=>{var t,n,r,i,o,a,u,s,l,c,d;let{invert:h,toast:m,unstyled:g,interacting:v,setHeights:y,visibleToasts:x,heights:w,index:S,toasts:A,expanded:E,removeToast:C,defaultRichColors:P,closeButton:k,style:M,cancelButtonStyle:L,actionButtonStyle:B,className:F="",descriptionClassName:Y="",duration:H,position:W,gap:V,loadingIcon:j,expandByDefault:I,classNames:z,icons:U,closeButtonAriaLabel:X="Close toast",pauseWhenPageIsHidden:q,cn:G}=e,[ee,ue]=$.useState(!1),[fe,ie]=$.useState(!1),[Ae,de]=$.useState(!1),[we,ge]=$.useState(!1),[ae,$e]=$.useState(!1),[Te,qe]=$.useState(0),[zt,Rt]=$.useState(0),Z=$.useRef(m.duration||H||vM),oe=$.useRef(null),se=$.useRef(null),Ce=S===0,Ee=S+1<=x,ye=m.type,Ie=m.dismissible!==!1,Ye=m.className||"",sn=m.descriptionClassName||"",xt=$.useMemo(()=>w.findIndex(rt=>rt.toastId===m.id)||0,[w,m.id]),rn=$.useMemo(()=>{var rt;return(rt=m.closeButton)!=null?rt:k},[m.closeButton,k]);$.useMemo(()=>m.duration||H||vM,[m.duration,H]);let eo=$.useRef(0),Yn=$.useRef(0),to=$.useRef(0),Zn=$.useRef(null),[no,va]=W.split("-"),ro=$.useMemo(()=>w.reduce((rt,$t,Ht)=>Ht>=xt?rt:rt+$t.height,0),[w,xt]),Gu=Zle(),Ku=m.invert||h,ya=ye==="loading";Yn.current=$.useMemo(()=>xt*V+ro,[xt,ro]),$.useEffect(()=>{ue(!0)},[]),$.useEffect(()=>{let rt=se.current;if(rt){let $t=rt.getBoundingClientRect().height;return Rt($t),y(Ht=>[{toastId:m.id,height:$t,position:m.position},...Ht]),()=>y(Ht=>Ht.filter(Wr=>Wr.toastId!==m.id))}},[y,m.id]),$.useLayoutEffect(()=>{if(!ee)return;let rt=se.current,$t=rt.style.height;rt.style.height="auto";let Ht=rt.getBoundingClientRect().height;rt.style.height=$t,Rt(Ht),y(Wr=>Wr.find(Vr=>Vr.toastId===m.id)?Wr.map(Vr=>Vr.toastId===m.id?{...Vr,height:Ht}:Vr):[{toastId:m.id,height:Ht,position:m.position},...Wr])},[ee,m.title,m.description,y,m.id]);let Ai=$.useCallback(()=>{ie(!0),qe(Yn.current),y(rt=>rt.filter($t=>$t.toastId!==m.id)),setTimeout(()=>{C(m)},sce)},[m,C,y,Yn]);$.useEffect(()=>{if(m.promise&&ye==="loading"||m.duration===1/0||m.type==="loading")return;let rt;return E||v||q&&Gu?(()=>{if(to.current{var $t;($t=m.onAutoClose)==null||$t.call(m,m),Ai()},Z.current)),()=>clearTimeout(rt)},[E,v,m,ye,q,Gu,Ai]),$.useEffect(()=>{m.delete&&Ai()},[Ai,m.delete]);function ml(){var rt,$t,Ht;return U!=null&&U.loading?$.createElement("div",{className:G(z?.loader,(rt=m?.classNames)==null?void 0:rt.loader,"sonner-loader"),"data-visible":ye==="loading"},U.loading):j?$.createElement("div",{className:G(z?.loader,($t=m?.classNames)==null?void 0:$t.loader,"sonner-loader"),"data-visible":ye==="loading"},j):$.createElement(Vle,{className:G(z?.loader,(Ht=m?.classNames)==null?void 0:Ht.loader),visible:ye==="loading"})}return $.createElement("li",{tabIndex:0,ref:se,className:G(F,Ye,z?.toast,(t=m?.classNames)==null?void 0:t.toast,z?.default,z?.[ye],(n=m?.classNames)==null?void 0:n[ye]),"data-sonner-toast":"","data-rich-colors":(r=m.richColors)!=null?r:P,"data-styled":!(m.jsx||m.unstyled||g),"data-mounted":ee,"data-promise":!!m.promise,"data-swiped":ae,"data-removed":fe,"data-visible":Ee,"data-y-position":no,"data-x-position":va,"data-index":S,"data-front":Ce,"data-swiping":Ae,"data-dismissible":Ie,"data-type":ye,"data-invert":Ku,"data-swipe-out":we,"data-expanded":!!(E||I&&ee),style:{"--index":S,"--toasts-before":S,"--z-index":A.length-S,"--offset":`${fe?Te:Yn.current}px`,"--initial-height":I?"auto":`${zt}px`,...M,...m.style},onPointerDown:rt=>{ya||!Ie||(oe.current=new Date,qe(Yn.current),rt.target.setPointerCapture(rt.pointerId),rt.target.tagName!=="BUTTON"&&(de(!0),Zn.current={x:rt.clientX,y:rt.clientY}))},onPointerUp:()=>{var rt,$t,Ht,Wr;if(we||!Ie)return;Zn.current=null;let Vr=Number(((rt=se.current)==null?void 0:rt.style.getPropertyValue("--swipe-amount").replace("px",""))||0),$o=new Date().getTime()-(($t=oe.current)==null?void 0:$t.getTime()),Ga=Math.abs(Vr)/$o;if(Math.abs(Vr)>=uce||Ga>.11){qe(Yn.current),(Ht=m.onDismiss)==null||Ht.call(m,m),Ai(),ge(!0),$e(!1);return}(Wr=se.current)==null||Wr.style.setProperty("--swipe-amount","0px"),de(!1)},onPointerMove:rt=>{var $t,Ht;if(!Zn.current||!Ie)return;let Wr=rt.clientY-Zn.current.y,Vr=(($t=window.getSelection())==null?void 0:$t.toString().length)>0,$o=no==="top"?Math.min(0,Wr):Math.max(0,Wr);Math.abs($o)>0&&$e(!0),!Vr&&((Ht=se.current)==null||Ht.style.setProperty("--swipe-amount",`${$o}px`))}},rn&&!m.jsx?$.createElement("button",{"aria-label":X,"data-disabled":ya,"data-close-button":!0,onClick:ya||!Ie?()=>{}:()=>{var rt;Ai(),(rt=m.onDismiss)==null||rt.call(m,m)},className:G(z?.closeButton,(i=m?.classNames)==null?void 0:i.closeButton)},(o=U?.close)!=null?o:Yle):null,m.jsx||$.isValidElement(m.title)?m.jsx?m.jsx:typeof m.title=="function"?m.title():m.title:$.createElement($.Fragment,null,ye||m.icon||m.promise?$.createElement("div",{"data-icon":"",className:G(z?.icon,(a=m?.classNames)==null?void 0:a.icon)},m.promise||m.type==="loading"&&!m.icon?m.icon||ml():null,m.type!=="loading"?m.icon||U?.[ye]||Ule(ye):null):null,$.createElement("div",{"data-content":"",className:G(z?.content,(u=m?.classNames)==null?void 0:u.content)},$.createElement("div",{"data-title":"",className:G(z?.title,(s=m?.classNames)==null?void 0:s.title)},typeof m.title=="function"?m.title():m.title),m.description?$.createElement("div",{"data-description":"",className:G(Y,sn,z?.description,(l=m?.classNames)==null?void 0:l.description)},typeof m.description=="function"?m.description():m.description):null),$.isValidElement(m.cancel)?m.cancel:m.cancel&&xv(m.cancel)?$.createElement("button",{"data-button":!0,"data-cancel":!0,style:m.cancelButtonStyle||L,onClick:rt=>{var $t,Ht;xv(m.cancel)&&Ie&&((Ht=($t=m.cancel).onClick)==null||Ht.call($t,rt),Ai())},className:G(z?.cancelButton,(c=m?.classNames)==null?void 0:c.cancelButton)},m.cancel.label):null,$.isValidElement(m.action)?m.action:m.action&&xv(m.action)?$.createElement("button",{"data-button":!0,"data-action":!0,style:m.actionButtonStyle||B,onClick:rt=>{var $t,Ht;xv(m.action)&&((Ht=($t=m.action).onClick)==null||Ht.call($t,rt),!rt.defaultPrevented&&Ai())},className:G(z?.actionButton,(d=m?.classNames)==null?void 0:d.actionButton)},m.action.label):null))};function yM(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}var wqe=b.forwardRef(function(e,t){let{invert:n,position:r="bottom-right",hotkey:i=["altKey","KeyT"],expand:o,closeButton:a,className:u,offset:s,theme:l="light",richColors:c,duration:d,style:h,visibleToasts:m=rce,toastOptions:g,dir:v=yM(),gap:y=ace,loadingIcon:x,icons:w,containerAriaLabel:S="Notifications",pauseWhenPageIsHidden:A,cn:E=lce}=e,[C,P]=$.useState([]),k=$.useMemo(()=>Array.from(new Set([r].concat(C.filter(q=>q.position).map(q=>q.position)))),[C,r]),[M,L]=$.useState([]),[B,F]=$.useState(!1),[Y,H]=$.useState(!1),[W,V]=$.useState(l!=="system"?l:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),j=$.useRef(null),I=i.join("+").replace(/Key/g,"").replace(/Digit/g,""),z=$.useRef(null),U=$.useRef(!1),X=$.useCallback(q=>{P(G=>{var ee;return(ee=G.find(ue=>ue.id===q.id))!=null&&ee.delete||Ii.dismiss(q.id),G.filter(({id:ue})=>ue!==q.id)})},[]);return $.useEffect(()=>Ii.subscribe(q=>{if(q.dismiss){P(G=>G.map(ee=>ee.id===q.id?{...ee,delete:!0}:ee));return}setTimeout(()=>{ew.flushSync(()=>{P(G=>{let ee=G.findIndex(ue=>ue.id===q.id);return ee!==-1?[...G.slice(0,ee),{...G[ee],...q},...G.slice(ee+1)]:[q,...G]})})})}),[]),$.useEffect(()=>{if(l!=="system"){V(l);return}if(l==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?V("dark"):V("light")),typeof window>"u")return;let q=window.matchMedia("(prefers-color-scheme: dark)");try{q.addEventListener("change",({matches:G})=>{V(G?"dark":"light")})}catch{q.addListener(({matches:ee})=>{try{V(ee?"dark":"light")}catch(ue){console.error(ue)}})}},[l]),$.useEffect(()=>{C.length<=1&&F(!1)},[C]),$.useEffect(()=>{let q=G=>{var ee,ue;i.every(fe=>G[fe]||G.code===fe)&&(F(!0),(ee=j.current)==null||ee.focus()),G.code==="Escape"&&(document.activeElement===j.current||(ue=j.current)!=null&&ue.contains(document.activeElement))&&F(!1)};return document.addEventListener("keydown",q),()=>document.removeEventListener("keydown",q)},[i]),$.useEffect(()=>{if(j.current)return()=>{z.current&&(z.current.focus({preventScroll:!0}),z.current=null,U.current=!1)}},[j.current]),$.createElement("section",{"aria-label":`${S} ${I}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false"},k.map((q,G)=>{var ee;let[ue,fe]=q.split("-");return C.length?$.createElement("ol",{key:q,dir:v==="auto"?yM():v,tabIndex:-1,ref:j,className:u,"data-sonner-toaster":!0,"data-theme":W,"data-y-position":ue,"data-lifted":B&&C.length>1&&!o,"data-x-position":fe,style:{"--front-toast-height":`${((ee=M[0])==null?void 0:ee.height)||0}px`,"--offset":typeof s=="number"?`${s}px`:s||ice,"--width":`${oce}px`,"--gap":`${y}px`,...h},onBlur:ie=>{U.current&&!ie.currentTarget.contains(ie.relatedTarget)&&(U.current=!1,z.current&&(z.current.focus({preventScroll:!0}),z.current=null))},onFocus:ie=>{ie.target instanceof HTMLElement&&ie.target.dataset.dismissible==="false"||U.current||(U.current=!0,z.current=ie.relatedTarget)},onMouseEnter:()=>F(!0),onMouseMove:()=>F(!0),onMouseLeave:()=>{Y||F(!1)},onPointerDown:ie=>{ie.target instanceof HTMLElement&&ie.target.dataset.dismissible==="false"||H(!0)},onPointerUp:()=>H(!1)},C.filter(ie=>!ie.position&&G===0||ie.position===q).map((ie,Ae)=>{var de,we;return $.createElement(cce,{key:ie.id,icons:w,index:Ae,toast:ie,defaultRichColors:c,duration:(de=g?.duration)!=null?de:d,className:g?.className,descriptionClassName:g?.descriptionClassName,invert:n,visibleToasts:m,closeButton:(we=g?.closeButton)!=null?we:a,interacting:Y,position:q,style:g?.style,unstyled:g?.unstyled,classNames:g?.classNames,cancelButtonStyle:g?.cancelButtonStyle,actionButtonStyle:g?.actionButtonStyle,removeToast:X,toasts:C.filter(ge=>ge.position==ie.position),heights:M.filter(ge=>ge.position==ie.position),setHeights:L,expandByDefault:o,gap:y,loadingIcon:x,expanded:B,pauseWhenPageIsHidden:A,cn:E})})):null}))}),eh=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},pc=typeof window>"u"||"Deno"in globalThis;function yo(){}function fce(e,t){return typeof e=="function"?e(t):e}function g3(e){return typeof e=="number"&&e>=0&&e!==1/0}function zL(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Gf(e,t){return typeof e=="function"?e(t):e}function Ko(e,t){return typeof e=="function"?e(t):e}function bM(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:o,queryKey:a,stale:u}=e;if(a){if(r){if(t.queryHash!==XA(a,t.options))return!1}else if(!b0(t.queryKey,a))return!1}if(n!=="all"){const s=t.isActive();if(n==="active"&&!s||n==="inactive"&&s)return!1}return!(typeof u=="boolean"&&t.isStale()!==u||i&&i!==t.state.fetchStatus||o&&!o(t))}function wM(e,t){const{exact:n,status:r,predicate:i,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(n){if(mc(t.options.mutationKey)!==mc(o))return!1}else if(!b0(t.options.mutationKey,o))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function XA(e,t){return(t?.queryKeyHashFn||mc)(e)}function mc(e){return JSON.stringify(e,(t,n)=>v3(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function b0(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!b0(e[n],t[n])):!1}function UL(e,t){if(e===t)return e;const n=xM(e)&&xM(t);if(n||v3(e)&&v3(t)){const r=n?e:Object.keys(e),i=r.length,o=n?t:Object.keys(t),a=o.length,u=n?[]:{};let s=0;for(let l=0;l{setTimeout(t,e)})}function y3(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?UL(e,t):t}function hce(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function pce(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var QA=Symbol();function WL(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===QA?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var mce=class extends eh{#e;#t;#r;constructor(){super(),this.#r=e=>{if(!pc&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#r)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#r=e,this.#t?.(),this.#t=e(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},JA=new mce,gce=class extends eh{#e=!0;#t;#r;constructor(){super(),this.#r=e=>{if(!pc&&window.addEventListener){const t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#r)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#r=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(n=>{n(e)}))}isOnline(){return this.#e}},c1=new gce;function b3(){let e,t;const n=new Promise((i,o)=>{e=i,t=o});n.status="pending",n.catch(()=>{});function r(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{r({status:"fulfilled",value:i}),e(i)},n.reject=i=>{r({status:"rejected",reason:i}),t(i)},n}function vce(e){return Math.min(1e3*2**e,3e4)}function VL(e){return(e??"online")==="online"?c1.isOnline():!0}var HL=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function $_(e){return e instanceof HL}function qL(e){let t=!1,n=0,r=!1,i;const o=b3(),a=v=>{r||(h(new HL(v)),e.abort?.())},u=()=>{t=!0},s=()=>{t=!1},l=()=>JA.isFocused()&&(e.networkMode==="always"||c1.isOnline())&&e.canRun(),c=()=>VL(e.networkMode)&&e.canRun(),d=v=>{r||(r=!0,e.onSuccess?.(v),i?.(),o.resolve(v))},h=v=>{r||(r=!0,e.onError?.(v),i?.(),o.reject(v))},m=()=>new Promise(v=>{i=y=>{(r||l())&&v(y)},e.onPause?.()}).then(()=>{i=void 0,r||e.onContinue?.()}),g=()=>{if(r)return;let v;const y=n===0?e.initialPromise:void 0;try{v=y??e.fn()}catch(x){v=Promise.reject(x)}Promise.resolve(v).then(d).catch(x=>{if(r)return;const w=e.retry??(pc?0:3),S=e.retryDelay??vce,A=typeof S=="function"?S(n,x):S,E=w===!0||typeof w=="number"&&nl()?void 0:m()).then(()=>{t?h(x):g()})})};return{promise:o,cancel:a,continue:()=>(i?.(),o),cancelRetry:u,continueRetry:s,canStart:c,start:()=>(c()?g():m().then(g),o)}}function yce(){let e=[],t=0,n=u=>{u()},r=u=>{u()},i=u=>setTimeout(u,0);const o=u=>{t?e.push(u):i(()=>{n(u)})},a=()=>{const u=e;e=[],u.length&&i(()=>{r(()=>{u.forEach(s=>{n(s)})})})};return{batch:u=>{let s;t++;try{s=u()}finally{t--,t||a()}return s},batchCalls:u=>(...s)=>{o(()=>{u(...s)})},schedule:o,setNotifyFunction:u=>{n=u},setBatchNotifyFunction:u=>{r=u},setScheduler:u=>{i=u}}}var rr=yce(),GL=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),g3(this.gcTime)&&(this.#e=setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(pc?1/0:5*60*1e3))}clearGcTimeout(){this.#e&&(clearTimeout(this.#e),this.#e=void 0)}},bce=class extends GL{#e;#t;#r;#n;#a;#o;constructor(e){super(),this.#o=!1,this.#a=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#r=e.cache,this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=wce(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#n?.promise}setOptions(e){this.options={...this.#a,...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#r.remove(this)}setData(e,t){const n=y3(this.state.data,e,this.options);return this.#i({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#i({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#n?.promise;return this.#n?.cancel(e),t?t.then(yo).catch(yo):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>Ko(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===QA||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(e=0){return this.state.isInvalidated||this.state.data===void 0||!zL(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#n?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#n?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#n&&(this.#o?this.#n.cancel({revert:!0}):this.#n.cancelRetry()),this.scheduleGc()),this.#r.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#i({type:"invalidate"})}fetch(e,t){if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#n)return this.#n.continueRetry(),this.#n.promise}if(e&&this.setOptions(e),!this.options.queryFn){const u=this.observers.find(s=>s.options.queryFn);u&&this.setOptions(u.options)}const n=new AbortController,r=u=>{Object.defineProperty(u,"signal",{enumerable:!0,get:()=>(this.#o=!0,n.signal)})},i=()=>{const u=WL(this.options,t),s={queryKey:this.queryKey,meta:this.meta};return r(s),this.#o=!1,this.options.persister?this.options.persister(u,s,this):u(s)},o={fetchOptions:t,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:i};r(o),this.options.behavior?.onFetch(o,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==o.fetchOptions?.meta)&&this.#i({type:"fetch",meta:o.fetchOptions?.meta});const a=u=>{$_(u)&&u.silent||this.#i({type:"error",error:u}),$_(u)||(this.#r.config.onError?.(u,this),this.#r.config.onSettled?.(this.state.data,u,this)),this.scheduleGc()};return this.#n=qL({initialPromise:t?.initialPromise,fn:o.fetchFn,abort:n.abort.bind(n),onSuccess:u=>{if(u===void 0){a(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(u)}catch(s){a(s);return}this.#r.config.onSuccess?.(u,this),this.#r.config.onSettled?.(u,this.state.error,this),this.scheduleGc()},onError:a,onFail:(u,s)=>{this.#i({type:"failed",failureCount:u,error:s})},onPause:()=>{this.#i({type:"pause"})},onContinue:()=>{this.#i({type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0}),this.#n.start()}#i(e){const t=n=>{switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...KL(n.data,this.options),fetchMeta:e.meta??null};case"success":return{...n,data:e.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const r=e.error;return $_(r)&&r.revert&&this.#t?{...this.#t,fetchStatus:"idle"}:{...n,error:r,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=t(this.state),rr.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#r.notify({query:this,type:"updated",action:e})})}};function KL(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:VL(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function wce(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var xce=class extends eh{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){const r=t.queryKey,i=t.queryHash??XA(r,t);let o=this.get(i);return o||(o=new bce({cache:this,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(o)),o}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){rr.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(n=>bM(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>bM(e,n)):t}notify(e){rr.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){rr.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){rr.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},_ce=class extends GL{#e;#t;#r;constructor(e){super(),this.mutationId=e.mutationId,this.#t=e.mutationCache,this.#e=[],this.state=e.state||YL(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#e.includes(e)||(this.#e.push(e),this.clearGcTimeout(),this.#t.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#e=this.#e.filter(t=>t!==e),this.scheduleGc(),this.#t.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#e.length||(this.state.status==="pending"?this.scheduleGc():this.#t.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(e){this.#r=qL({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(new Error("No mutationFn found")),onFail:(r,i)=>{this.#n({type:"failed",failureCount:r,error:i})},onPause:()=>{this.#n({type:"pause"})},onContinue:()=>{this.#n({type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#t.canRun(this)});const t=this.state.status==="pending",n=!this.#r.canStart();try{if(!t){this.#n({type:"pending",variables:e,isPaused:n}),await this.#t.config.onMutate?.(e,this);const i=await this.options.onMutate?.(e);i!==this.state.context&&this.#n({type:"pending",context:i,variables:e,isPaused:n})}const r=await this.#r.start();return await this.#t.config.onSuccess?.(r,e,this.state.context,this),await this.options.onSuccess?.(r,e,this.state.context),await this.#t.config.onSettled?.(r,null,this.state.variables,this.state.context,this),await this.options.onSettled?.(r,null,e,this.state.context),this.#n({type:"success",data:r}),r}catch(r){try{throw await this.#t.config.onError?.(r,e,this.state.context,this),await this.options.onError?.(r,e,this.state.context),await this.#t.config.onSettled?.(void 0,r,this.state.variables,this.state.context,this),await this.options.onSettled?.(void 0,r,e,this.state.context),r}finally{this.#n({type:"error",error:r})}}finally{this.#t.runNext(this)}}#n(e){const t=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),rr.batch(()=>{this.#e.forEach(n=>{n.onMutationUpdate(e)}),this.#t.notify({mutation:this,type:"updated",action:e})})}};function YL(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Sce=class extends eh{constructor(e={}){super(),this.config=e,this.#e=new Map,this.#t=Date.now()}#e;#t;build(e,t,n){const r=new _ce({mutationCache:this,mutationId:++this.#t,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){const t=_v(e),n=this.#e.get(t)??[];n.push(e),this.#e.set(t,n),this.notify({type:"added",mutation:e})}remove(e){const t=_v(e);if(this.#e.has(t)){const n=this.#e.get(t)?.filter(r=>r!==e);n&&(n.length===0?this.#e.delete(t):this.#e.set(t,n))}this.notify({type:"removed",mutation:e})}canRun(e){const t=this.#e.get(_v(e))?.find(n=>n.state.status==="pending");return!t||t===e}runNext(e){return this.#e.get(_v(e))?.find(n=>n!==e&&n.state.isPaused)?.continue()??Promise.resolve()}clear(){rr.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}getAll(){return[...this.#e.values()].flat()}find(e){const t={exact:!0,...e};return this.getAll().find(n=>wM(t,n))}findAll(e={}){return this.getAll().filter(t=>wM(e,t))}notify(e){rr.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return rr.batch(()=>Promise.all(e.map(t=>t.continue().catch(yo))))}};function _v(e){return e.options.scope?.id??String(e.mutationId)}function SM(e){return{onFetch:(t,n)=>{const r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,o=t.state.data?.pages||[],a=t.state.data?.pageParams||[];let u={pages:[],pageParams:[]},s=0;const l=async()=>{let c=!1;const d=g=>{Object.defineProperty(g,"signal",{enumerable:!0,get:()=>(t.signal.aborted?c=!0:t.signal.addEventListener("abort",()=>{c=!0}),t.signal)})},h=WL(t.options,t.fetchOptions),m=async(g,v,y)=>{if(c)return Promise.reject();if(v==null&&g.pages.length)return Promise.resolve(g);const x={queryKey:t.queryKey,pageParam:v,direction:y?"backward":"forward",meta:t.options.meta};d(x);const w=await h(x),{maxPages:S}=t.options,A=y?pce:hce;return{pages:A(g.pages,w,S),pageParams:A(g.pageParams,v,S)}};if(i&&o.length){const g=i==="backward",v=g?Cce:CM,y={pages:o,pageParams:a},x=v(r,y);u=await m(y,x,g)}else{const g=e??o.length;do{const v=s===0?a[0]??r.initialPageParam:CM(r,u);if(s>0&&v==null)break;u=await m(u,v),s++}while(st.options.persister?.(l,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=l}}}function CM(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function Cce(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var xqe=class{#e;#t;#r;#n;#a;#o;#i;#u;constructor(e={}){this.#e=e.queryCache||new xce,this.#t=e.mutationCache||new Sce,this.#r=e.defaultOptions||{},this.#n=new Map,this.#a=new Map,this.#o=0}mount(){this.#o++,this.#o===1&&(this.#i=JA.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#u=c1.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#o--,this.#o===0&&(this.#i?.(),this.#i=void 0,this.#u?.(),this.#u=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#t.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Gf(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),o=this.#e.get(r.queryHash)?.state.data,a=fce(t,o);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return rr.batch(()=>this.#e.findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){const t=this.#e;rr.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=this.#e,r={type:"active",...e};return rr.batch(()=>(n.findAll(e).forEach(i=>{i.reset()}),this.refetchQueries(r,t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=rr.batch(()=>this.#e.findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(yo).catch(yo)}invalidateQueries(e,t={}){return rr.batch(()=>{if(this.#e.findAll(e).forEach(r=>{r.invalidate()}),e?.refetchType==="none")return Promise.resolve();const n={...e,type:e?.refetchType??e?.type??"active"};return this.refetchQueries(n,t)})}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=rr.batch(()=>this.#e.findAll(e).filter(i=>!i.isDisabled()).map(i=>{let o=i.fetch(void 0,n);return n.throwOnError||(o=o.catch(yo)),i.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(r).then(yo)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=this.#e.build(this,t);return n.isStaleByTime(Gf(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(yo).catch(yo)}fetchInfiniteQuery(e){return e.behavior=SM(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(yo).catch(yo)}ensureInfiniteQueryData(e){return e.behavior=SM(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return c1.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#r}setDefaultOptions(e){this.#r=e}setQueryDefaults(e,t){this.#n.set(mc(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#n.values()],n={};return t.forEach(r=>{b0(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){this.#a.set(mc(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#a.values()];let n={};return t.forEach(r=>{b0(e,r.mutationKey)&&(n={...n,...r.defaultOptions})}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#r.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=XA(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===QA&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#r.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},Ece=class extends eh{constructor(e,t){super(),this.options=t,this.#e=e,this.#u=null,this.#i=b3(),this.options.experimental_prefetchInRender||this.#i.reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#r=void 0;#n=void 0;#a;#o;#i;#u;#m;#d;#h;#l;#c;#s;#p=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),EM(this.#t,this.options)?this.#f():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return w3(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return w3(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#w(),this.#x(),this.#t.removeObserver(this)}setOptions(e,t){const n=this.options,r=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Ko(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#_(),this.#t.setOptions(this.options),n._defaulted&&!l1(this.options,n)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const i=this.hasListeners();i&&AM(this.#t,r,this.options,n)&&this.#f(),this.updateResult(t),i&&(this.#t!==r||Ko(this.options.enabled,this.#t)!==Ko(n.enabled,this.#t)||Gf(this.options.staleTime,this.#t)!==Gf(n.staleTime,this.#t))&&this.#g();const o=this.#v();i&&(this.#t!==r||Ko(this.options.enabled,this.#t)!==Ko(n.enabled,this.#t)||o!==this.#s)&&this.#y(o)}getOptimisticResult(e){const t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return Oce(this,n)&&(this.#n=n,this.#o=this.options,this.#a=this.#t.state),n}getCurrentResult(){return this.#n}trackResult(e,t){const n={};return Object.keys(e).forEach(r=>{Object.defineProperty(n,r,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(r),t?.(r),e[r])})}),n}trackProp(e){this.#p.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#f({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#n))}#f(e){this.#_();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(yo)),t}#g(){this.#w();const e=Gf(this.options.staleTime,this.#t);if(pc||this.#n.isStale||!g3(e))return;const n=zL(this.#n.dataUpdatedAt,e)+1;this.#l=setTimeout(()=>{this.#n.isStale||this.updateResult()},n)}#v(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#y(e){this.#x(),this.#s=e,!(pc||Ko(this.options.enabled,this.#t)===!1||!g3(this.#s)||this.#s===0)&&(this.#c=setInterval(()=>{(this.options.refetchIntervalInBackground||JA.isFocused())&&this.#f()},this.#s))}#b(){this.#g(),this.#y(this.#v())}#w(){this.#l&&(clearTimeout(this.#l),this.#l=void 0)}#x(){this.#c&&(clearInterval(this.#c),this.#c=void 0)}createResult(e,t){const n=this.#t,r=this.options,i=this.#n,o=this.#a,a=this.#o,s=e!==n?e.state:this.#r,{state:l}=e;let c={...l},d=!1,h;if(t._optimisticResults){const P=this.hasListeners(),k=!P&&EM(e,t),M=P&&AM(e,n,t,r);(k||M)&&(c={...c,...KL(l.data,e.options)}),t._optimisticResults==="isRestoring"&&(c.fetchStatus="idle")}let{error:m,errorUpdatedAt:g,status:v}=c;if(t.select&&c.data!==void 0)if(i&&c.data===o?.data&&t.select===this.#m)h=this.#d;else try{this.#m=t.select,h=t.select(c.data),h=y3(i?.data,h,t),this.#d=h,this.#u=null}catch(P){this.#u=P}else h=c.data;if(t.placeholderData!==void 0&&h===void 0&&v==="pending"){let P;if(i?.isPlaceholderData&&t.placeholderData===a?.placeholderData)P=i.data;else if(P=typeof t.placeholderData=="function"?t.placeholderData(this.#h?.state.data,this.#h):t.placeholderData,t.select&&P!==void 0)try{P=t.select(P),this.#u=null}catch(k){this.#u=k}P!==void 0&&(v="success",h=y3(i?.data,P,t),d=!0)}this.#u&&(m=this.#u,h=this.#d,g=Date.now(),v="error");const y=c.fetchStatus==="fetching",x=v==="pending",w=v==="error",S=x&&y,A=h!==void 0,C={status:v,fetchStatus:c.fetchStatus,isPending:x,isSuccess:v==="success",isError:w,isInitialLoading:S,isLoading:S,data:h,dataUpdatedAt:c.dataUpdatedAt,error:m,errorUpdatedAt:g,failureCount:c.fetchFailureCount,failureReason:c.fetchFailureReason,errorUpdateCount:c.errorUpdateCount,isFetched:c.dataUpdateCount>0||c.errorUpdateCount>0,isFetchedAfterMount:c.dataUpdateCount>s.dataUpdateCount||c.errorUpdateCount>s.errorUpdateCount,isFetching:y,isRefetching:y&&!x,isLoadingError:w&&!A,isPaused:c.fetchStatus==="paused",isPlaceholderData:d,isRefetchError:w&&A,isStale:eO(e,t),refetch:this.refetch,promise:this.#i};if(this.options.experimental_prefetchInRender){const P=L=>{C.status==="error"?L.reject(C.error):C.data!==void 0&&L.resolve(C.data)},k=()=>{const L=this.#i=C.promise=b3();P(L)},M=this.#i;switch(M.status){case"pending":e.queryHash===n.queryHash&&P(M);break;case"fulfilled":(C.status==="error"||C.data!==M.value)&&k();break;case"rejected":(C.status!=="error"||C.error!==M.reason)&&k();break}}return C}updateResult(e){const t=this.#n,n=this.createResult(this.#t,this.options);if(this.#a=this.#t.state,this.#o=this.options,this.#a.data!==void 0&&(this.#h=this.#t),l1(n,t))return;this.#n=n;const r={},i=()=>{if(!t)return!0;const{notifyOnChangeProps:o}=this.options,a=typeof o=="function"?o():o;if(a==="all"||!a&&!this.#p.size)return!0;const u=new Set(a??this.#p);return this.options.throwOnError&&u.add("error"),Object.keys(this.#n).some(s=>{const l=s;return this.#n[l]!==t[l]&&u.has(l)})};e?.listeners!==!1&&i()&&(r.listeners=!0),this.#S({...r,...e})}#_(){const e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;const t=this.#t;this.#t=e,this.#r=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#b()}#S(e){rr.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#n)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function Ace(e,t){return Ko(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function EM(e,t){return Ace(e,t)||e.state.data!==void 0&&w3(e,t,t.refetchOnMount)}function w3(e,t,n){if(Ko(t.enabled,e)!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&eO(e,t)}return!1}function AM(e,t,n,r){return(e!==t||Ko(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&eO(e,n)}function eO(e,t){return Ko(t.enabled,e)!==!1&&e.isStaleByTime(Gf(t.staleTime,e))}function Oce(e,t){return!l1(e.getCurrentResult(),t)}var Pce=class extends eh{#e;#t=void 0;#r;#n;constructor(t,n){super(),this.#e=t,this.setOptions(n),this.bindMethods(),this.#a()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const n=this.options;this.options=this.#e.defaultMutationOptions(t),l1(this.options,n)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#r,observer:this}),n?.mutationKey&&this.options.mutationKey&&mc(n.mutationKey)!==mc(this.options.mutationKey)?this.reset():this.#r?.state.status==="pending"&&this.#r.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#r?.removeObserver(this)}onMutationUpdate(t){this.#a(),this.#o(t)}getCurrentResult(){return this.#t}reset(){this.#r?.removeObserver(this),this.#r=void 0,this.#a(),this.#o()}mutate(t,n){return this.#n=n,this.#r?.removeObserver(this),this.#r=this.#e.getMutationCache().build(this.#e,this.options),this.#r.addObserver(this),this.#r.execute(t)}#a(){const t=this.#r?.state??YL();this.#t={...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset}}#o(t){rr.batch(()=>{if(this.#n&&this.hasListeners()){const n=this.#t.variables,r=this.#t.context;t?.type==="success"?(this.#n.onSuccess?.(t.data,n,r),this.#n.onSettled?.(t.data,null,n,r)):t?.type==="error"&&(this.#n.onError?.(t.error,n,r),this.#n.onSettled?.(void 0,t.error,n,r))}this.listeners.forEach(n=>{n(this.#t)})})}},ZL=b.createContext(void 0),XL=e=>{const t=b.useContext(ZL);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Sqe=({client:e,children:t})=>(b.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),R.jsx(ZL.Provider,{value:e,children:t})),QL=b.createContext(!1),kce=()=>b.useContext(QL);QL.Provider;function Tce(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Mce=b.createContext(Tce()),Rce=()=>b.useContext(Mce);function JL(e,t){return typeof e=="function"?e(...t):!!e}function x3(){}var Dce=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},$ce=e=>{b.useEffect(()=>{e.clearReset()},[e])},Ice=({result:e,errorResetBoundary:t,throwOnError:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&JL(n,[e.error,r]),Nce=e=>{e.suspense&&(e.staleTime===void 0&&(e.staleTime=1e3),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3)))},Fce=(e,t)=>e.isLoading&&e.isFetching&&!t,Lce=(e,t)=>e?.suspense&&t.isPending,OM=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function jce(e,t,n){const r=XL(),i=kce(),o=Rce(),a=r.defaultQueryOptions(e);r.getDefaultOptions().queries?._experimental_beforeQuery?.(a),a._optimisticResults=i?"isRestoring":"optimistic",Nce(a),Dce(a,o),$ce(o);const u=!r.getQueryCache().get(a.queryHash),[s]=b.useState(()=>new t(r,a)),l=s.getOptimisticResult(a);if(b.useSyncExternalStore(b.useCallback(c=>{const d=i?x3:s.subscribe(rr.batchCalls(c));return s.updateResult(),d},[s,i]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),b.useEffect(()=>{s.setOptions(a,{listeners:!1})},[a,s]),Lce(a,l))throw OM(a,s,o);if(Ice({result:l,errorResetBoundary:o,throwOnError:a.throwOnError,query:r.getQueryCache().get(a.queryHash)}))throw l.error;return r.getDefaultOptions().queries?._experimental_afterQuery?.(a,l),a.experimental_prefetchInRender&&!pc&&Fce(l,i)&&(u?OM(a,s,o):r.getQueryCache().get(a.queryHash)?.promise)?.catch(x3).finally(()=>{s.updateResult()}),a.notifyOnChangeProps?l:s.trackResult(l)}function Cqe(e,t){return jce(e,Ece)}function Eqe(e,t){const n=XL(),[r]=b.useState(()=>new Pce(n,e));b.useEffect(()=>{r.setOptions(e)},[r,e]);const i=b.useSyncExternalStore(b.useCallback(a=>r.subscribe(rr.batchCalls(a)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),o=b.useCallback((a,u)=>{r.mutate(a,u).catch(x3)},[r]);if(i.error&&JL(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:o,mutateAsync:i.mutate}}var jm=e=>e.type==="checkbox",Hl=e=>e instanceof Date,Zr=e=>e==null;const ej=e=>typeof e=="object";var Wn=e=>!Zr(e)&&!Array.isArray(e)&&ej(e)&&!Hl(e),tj=e=>Wn(e)&&e.target?jm(e.target)?e.target.checked:e.target.value:e,Bce=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,nj=(e,t)=>e.has(Bce(t)),zce=e=>{const t=e.constructor&&e.constructor.prototype;return Wn(t)&&t.hasOwnProperty("isPrototypeOf")},tO=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function ci(e){let t;const n=Array.isArray(e),r=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(tO&&(e instanceof Blob||r))&&(n||Wn(e)))if(t=n?[]:{},!n&&!zce(e))t=e;else for(const i in e)e.hasOwnProperty(i)&&(t[i]=ci(e[i]));else return e;return t}var pw=e=>Array.isArray(e)?e.filter(Boolean):[],Bn=e=>e===void 0,ke=(e,t,n)=>{if(!t||!Wn(e))return n;const r=pw(t.split(/[,[\].]+?/)).reduce((i,o)=>Zr(i)?i:i[o],e);return Bn(r)||r===e?Bn(e[t])?n:e[t]:r},bo=e=>typeof e=="boolean",nO=e=>/^\w*$/.test(e),rj=e=>pw(e.replace(/["|']|\]/g,"").split(/\.|\[/)),Wt=(e,t,n)=>{let r=-1;const i=nO(t)?[t]:rj(t),o=i.length,a=o-1;for(;++r$.useContext(ij),Aqe=e=>{const{children:t,...n}=e;return $.createElement(ij.Provider,{value:n},t)};var oj=(e,t,n,r=!0)=>{const i={defaultValues:t._defaultValues};for(const o in e)Object.defineProperty(i,o,{get:()=>{const a=o;return t._proxyFormState[a]!==Xo.all&&(t._proxyFormState[a]=!r||Xo.all),n&&(n[a]=!0),e[a]}});return i},di=e=>Wn(e)&&!Object.keys(e).length,aj=(e,t,n,r)=>{n(e);const{name:i,...o}=e;return di(o)||Object.keys(o).length>=Object.keys(t).length||Object.keys(o).find(a=>t[a]===(!r||Xo.all))},Bp=e=>Array.isArray(e)?e:[e],uj=(e,t,n)=>!e||!t||e===t||Bp(e).some(r=>r&&(n?r===t:r.startsWith(t)||t.startsWith(r)));function iO(e){const t=$.useRef(e);t.current=e,$.useEffect(()=>{const n=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{n&&n.unsubscribe()}},[e.disabled])}function Uce(e){const t=rO(),{control:n=t.control,disabled:r,name:i,exact:o}=e,[a,u]=$.useState(n._formState),s=$.useRef(!0),l=$.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),c=$.useRef(i);return c.current=i,iO({disabled:r,next:d=>s.current&&uj(c.current,d.name,o)&&aj(d,l.current,n._updateFormState)&&u({...n._formState,...d}),subject:n._subjects.state}),$.useEffect(()=>(s.current=!0,l.current.isValid&&n._updateValid(!0),()=>{s.current=!1}),[n]),$.useMemo(()=>oj(a,n,l.current,!1),[a,n])}var Oa=e=>typeof e=="string",sj=(e,t,n,r,i)=>Oa(e)?(r&&t.watch.add(e),ke(n,e,i)):Array.isArray(e)?e.map(o=>(r&&t.watch.add(o),ke(n,o))):(r&&(t.watchAll=!0),n);function Wce(e){const t=rO(),{control:n=t.control,name:r,defaultValue:i,disabled:o,exact:a}=e,u=$.useRef(r);u.current=r,iO({disabled:o,subject:n._subjects.values,next:c=>{uj(u.current,c.name,a)&&l(ci(sj(u.current,n._names,c.values||n._formValues,!1,i)))}});const[s,l]=$.useState(n._getWatch(r,i));return $.useEffect(()=>n._removeUnmounted()),s}function Vce(e){const t=rO(),{name:n,disabled:r,control:i=t.control,shouldUnregister:o}=e,a=nj(i._names.array,n),u=Wce({control:i,name:n,defaultValue:ke(i._formValues,n,ke(i._defaultValues,n,e.defaultValue)),exact:!0}),s=Uce({control:i,name:n,exact:!0}),l=$.useRef(i.register(n,{...e.rules,value:u,...bo(e.disabled)?{disabled:e.disabled}:{}})),c=$.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!ke(s.errors,n)},isDirty:{enumerable:!0,get:()=>!!ke(s.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!ke(s.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!ke(s.validatingFields,n)},error:{enumerable:!0,get:()=>ke(s.errors,n)}}),[s,n]),d=$.useMemo(()=>({name:n,value:u,...bo(r)||s.disabled?{disabled:s.disabled||r}:{},onChange:h=>l.current.onChange({target:{value:tj(h),name:n},type:f1.CHANGE}),onBlur:()=>l.current.onBlur({target:{value:ke(i._formValues,n),name:n},type:f1.BLUR}),ref:h=>{const m=ke(i._fields,n);m&&h&&(m._f.ref={focus:()=>h.focus(),select:()=>h.select(),setCustomValidity:g=>h.setCustomValidity(g),reportValidity:()=>h.reportValidity()})}}),[n,i._formValues,r,s.disabled,u,i._fields]);return $.useEffect(()=>{const h=i._options.shouldUnregister||o,m=(g,v)=>{const y=ke(i._fields,g);y&&y._f&&(y._f.mount=v)};if(m(n,!0),h){const g=ci(ke(i._options.defaultValues,n));Wt(i._defaultValues,n,g),Bn(ke(i._formValues,n))&&Wt(i._formValues,n,g)}return!a&&i.register(n),()=>{(a?h&&!i._state.action:h)?i.unregister(n):m(n,!1)}},[n,i,a,o]),$.useEffect(()=>{i._updateDisabledField({disabled:r,fields:i._fields,name:n})},[r,n,i]),$.useMemo(()=>({field:d,formState:s,fieldState:c}),[d,s,c])}const Oqe=e=>e.render(Vce(e));var lj=(e,t,n,r,i)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:i||!0}}:{},PM=e=>({isOnSubmit:!e||e===Xo.onSubmit,isOnBlur:e===Xo.onBlur,isOnChange:e===Xo.onChange,isOnAll:e===Xo.all,isOnTouch:e===Xo.onTouched}),kM=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const zp=(e,t,n,r)=>{for(const i of n||Object.keys(e)){const o=ke(e,i);if(o){const{_f:a,...u}=o;if(a){if(a.refs&&a.refs[0]&&t(a.refs[0],i)&&!r)return!0;if(a.ref&&t(a.ref,a.name)&&!r)return!0;if(zp(u,t))break}else if(Wn(u)&&zp(u,t))break}}};var Hce=(e,t,n)=>{const r=Bp(ke(e,n));return Wt(r,"root",t[n]),Wt(e,n,r),e},oO=e=>e.type==="file",Aa=e=>typeof e=="function",d1=e=>{if(!tO)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},yy=e=>Oa(e),aO=e=>e.type==="radio",h1=e=>e instanceof RegExp;const TM={value:!1,isValid:!1},MM={value:!0,isValid:!0};var cj=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!Bn(e[0].attributes.value)?Bn(e[0].value)||e[0].value===""?MM:{value:e[0].value,isValid:!0}:MM:TM}return TM};const RM={isValid:!1,value:null};var fj=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,RM):RM;function DM(e,t,n="validate"){if(yy(e)||Array.isArray(e)&&e.every(yy)||bo(e)&&!e)return{type:n,message:yy(e)?e:"",ref:t}}var lf=e=>Wn(e)&&!h1(e)?e:{value:e,message:""},$M=async(e,t,n,r,i,o)=>{const{ref:a,refs:u,required:s,maxLength:l,minLength:c,min:d,max:h,pattern:m,validate:g,name:v,valueAsNumber:y,mount:x}=e._f,w=ke(n,v);if(!x||t.has(v))return{};const S=u?u[0]:a,A=F=>{i&&S.reportValidity&&(S.setCustomValidity(bo(F)?"":F||""),S.reportValidity())},E={},C=aO(a),P=jm(a),k=C||P,M=(y||oO(a))&&Bn(a.value)&&Bn(w)||d1(a)&&a.value===""||w===""||Array.isArray(w)&&!w.length,L=lj.bind(null,v,r,E),B=(F,Y,H,W=ou.maxLength,V=ou.minLength)=>{const j=F?Y:H;E[v]={type:F?W:V,message:j,ref:a,...L(F?W:V,j)}};if(o?!Array.isArray(w)||!w.length:s&&(!k&&(M||Zr(w))||bo(w)&&!w||P&&!cj(u).isValid||C&&!fj(u).isValid)){const{value:F,message:Y}=yy(s)?{value:!!s,message:s}:lf(s);if(F&&(E[v]={type:ou.required,message:Y,ref:S,...L(ou.required,Y)},!r))return A(Y),E}if(!M&&(!Zr(d)||!Zr(h))){let F,Y;const H=lf(h),W=lf(d);if(!Zr(w)&&!isNaN(w)){const V=a.valueAsNumber||w&&+w;Zr(H.value)||(F=V>H.value),Zr(W.value)||(Y=Vnew Date(new Date().toDateString()+" "+U),I=a.type=="time",z=a.type=="week";Oa(H.value)&&w&&(F=I?j(w)>j(H.value):z?w>H.value:V>new Date(H.value)),Oa(W.value)&&w&&(Y=I?j(w)+F.value,W=!Zr(Y.value)&&w.length<+Y.value;if((H||W)&&(B(H,F.message,Y.message),!r))return A(E[v].message),E}if(m&&!M&&Oa(w)){const{value:F,message:Y}=lf(m);if(h1(F)&&!w.match(F)&&(E[v]={type:ou.pattern,message:Y,ref:a,...L(ou.pattern,Y)},!r))return A(Y),E}if(g){if(Aa(g)){const F=await g(w,n),Y=DM(F,S);if(Y&&(E[v]={...Y,...L(ou.validate,Y.message)},!r))return A(Y.message),E}else if(Wn(g)){let F={};for(const Y in g){if(!di(F)&&!r)break;const H=DM(await g[Y](w,n),S,Y);H&&(F={...H,...L(Y,H.message)},A(H.message),r&&(E[v]=F))}if(!di(F)&&(E[v]={ref:S,...F},!r))return E}}return A(!0),E};function qce(e,t){const n=t.slice(0,-1).length;let r=0;for(;r{let e=[];return{get observers(){return e},next:i=>{for(const o of e)o.next&&o.next(i)},subscribe:i=>(e.push(i),{unsubscribe:()=>{e=e.filter(o=>o!==i)}}),unsubscribe:()=>{e=[]}}},_3=e=>Zr(e)||!ej(e);function xs(e,t){if(_3(e)||_3(t))return e===t;if(Hl(e)&&Hl(t))return e.getTime()===t.getTime();const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const i of n){const o=e[i];if(!r.includes(i))return!1;if(i!=="ref"){const a=t[i];if(Hl(o)&&Hl(a)||Wn(o)&&Wn(a)||Array.isArray(o)&&Array.isArray(a)?!xs(o,a):o!==a)return!1}}return!0}var dj=e=>e.type==="select-multiple",Kce=e=>aO(e)||jm(e),N_=e=>d1(e)&&e.isConnected,hj=e=>{for(const t in e)if(Aa(e[t]))return!0;return!1};function p1(e,t={}){const n=Array.isArray(e);if(Wn(e)||n)for(const r in e)Array.isArray(e[r])||Wn(e[r])&&!hj(e[r])?(t[r]=Array.isArray(e[r])?[]:{},p1(e[r],t[r])):Zr(e[r])||(t[r]=!0);return t}function pj(e,t,n){const r=Array.isArray(e);if(Wn(e)||r)for(const i in e)Array.isArray(e[i])||Wn(e[i])&&!hj(e[i])?Bn(t)||_3(n[i])?n[i]=Array.isArray(e[i])?p1(e[i],[]):{...p1(e[i])}:pj(e[i],Zr(t)?{}:t[i],n[i]):n[i]=!xs(e[i],t[i]);return n}var Jh=(e,t)=>pj(e,t,p1(t)),mj=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>Bn(e)?e:t?e===""?NaN:e&&+e:n&&Oa(e)?new Date(e):r?r(e):e;function F_(e){const t=e.ref;return oO(t)?t.files:aO(t)?fj(e.refs).value:dj(t)?[...t.selectedOptions].map(({value:n})=>n):jm(t)?cj(e.refs).value:mj(Bn(t.value)?e.ref.value:t.value,e)}var Yce=(e,t,n,r)=>{const i={};for(const o of e){const a=ke(t,o);a&&Wt(i,o,a._f)}return{criteriaMode:n,names:[...e],fields:i,shouldUseNativeValidation:r}},ep=e=>Bn(e)?e:h1(e)?e.source:Wn(e)?h1(e.value)?e.value.source:e.value:e;const IM="AsyncFunction";var Zce=e=>!!e&&!!e.validate&&!!(Aa(e.validate)&&e.validate.constructor.name===IM||Wn(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===IM)),Xce=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function NM(e,t,n){const r=ke(e,n);if(r||nO(n))return{error:r,name:n};const i=n.split(".");for(;i.length;){const o=i.join("."),a=ke(t,o),u=ke(e,o);if(a&&!Array.isArray(a)&&n!==o)return{name:n};if(u&&u.type)return{name:o,error:u};i.pop()}return{name:n}}var Qce=(e,t,n,r,i)=>i.isOnAll?!1:!n&&i.isOnTouch?!(t||e):(n?r.isOnBlur:i.isOnBlur)?!e:(n?r.isOnChange:i.isOnChange)?e:!0,Jce=(e,t)=>!pw(ke(e,t)).length&&tr(e,t);const efe={mode:Xo.onSubmit,reValidateMode:Xo.onChange,shouldFocusError:!0};function tfe(e={}){let t={...efe,...e},n={submitCount:0,isDirty:!1,isLoading:Aa(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},r={},i=Wn(t.defaultValues)||Wn(t.values)?ci(t.defaultValues||t.values)||{}:{},o=t.shouldUnregister?{}:ci(i),a={action:!1,mount:!1,watch:!1},u={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},s,l=0;const c={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},d={values:I_(),array:I_(),state:I_()},h=PM(t.mode),m=PM(t.reValidateMode),g=t.criteriaMode===Xo.all,v=Z=>oe=>{clearTimeout(l),l=setTimeout(Z,oe)},y=async Z=>{if(!t.disabled&&(c.isValid||Z)){const oe=t.resolver?di((await k()).errors):await L(r,!0);oe!==n.isValid&&d.state.next({isValid:oe})}},x=(Z,oe)=>{!t.disabled&&(c.isValidating||c.validatingFields)&&((Z||Array.from(u.mount)).forEach(se=>{se&&(oe?Wt(n.validatingFields,se,oe):tr(n.validatingFields,se))}),d.state.next({validatingFields:n.validatingFields,isValidating:!di(n.validatingFields)}))},w=(Z,oe=[],se,Ce,Ee=!0,ye=!0)=>{if(Ce&&se&&!t.disabled){if(a.action=!0,ye&&Array.isArray(ke(r,Z))){const Ie=se(ke(r,Z),Ce.argA,Ce.argB);Ee&&Wt(r,Z,Ie)}if(ye&&Array.isArray(ke(n.errors,Z))){const Ie=se(ke(n.errors,Z),Ce.argA,Ce.argB);Ee&&Wt(n.errors,Z,Ie),Jce(n.errors,Z)}if(c.touchedFields&&ye&&Array.isArray(ke(n.touchedFields,Z))){const Ie=se(ke(n.touchedFields,Z),Ce.argA,Ce.argB);Ee&&Wt(n.touchedFields,Z,Ie)}c.dirtyFields&&(n.dirtyFields=Jh(i,o)),d.state.next({name:Z,isDirty:F(Z,oe),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else Wt(o,Z,oe)},S=(Z,oe)=>{Wt(n.errors,Z,oe),d.state.next({errors:n.errors})},A=Z=>{n.errors=Z,d.state.next({errors:n.errors,isValid:!1})},E=(Z,oe,se,Ce)=>{const Ee=ke(r,Z);if(Ee){const ye=ke(o,Z,Bn(se)?ke(i,Z):se);Bn(ye)||Ce&&Ce.defaultChecked||oe?Wt(o,Z,oe?ye:F_(Ee._f)):W(Z,ye),a.mount&&y()}},C=(Z,oe,se,Ce,Ee)=>{let ye=!1,Ie=!1;const Ye={name:Z};if(!t.disabled){const sn=!!(ke(r,Z)&&ke(r,Z)._f&&ke(r,Z)._f.disabled);if(!se||Ce){c.isDirty&&(Ie=n.isDirty,n.isDirty=Ye.isDirty=F(),ye=Ie!==Ye.isDirty);const xt=sn||xs(ke(i,Z),oe);Ie=!!(!sn&&ke(n.dirtyFields,Z)),xt||sn?tr(n.dirtyFields,Z):Wt(n.dirtyFields,Z,!0),Ye.dirtyFields=n.dirtyFields,ye=ye||c.dirtyFields&&Ie!==!xt}if(se){const xt=ke(n.touchedFields,Z);xt||(Wt(n.touchedFields,Z,se),Ye.touchedFields=n.touchedFields,ye=ye||c.touchedFields&&xt!==se)}ye&&Ee&&d.state.next(Ye)}return ye?Ye:{}},P=(Z,oe,se,Ce)=>{const Ee=ke(n.errors,Z),ye=c.isValid&&bo(oe)&&n.isValid!==oe;if(t.delayError&&se?(s=v(()=>S(Z,se)),s(t.delayError)):(clearTimeout(l),s=null,se?Wt(n.errors,Z,se):tr(n.errors,Z)),(se?!xs(Ee,se):Ee)||!di(Ce)||ye){const Ie={...Ce,...ye&&bo(oe)?{isValid:oe}:{},errors:n.errors,name:Z};n={...n,...Ie},d.state.next(Ie)}},k=async Z=>{x(Z,!0);const oe=await t.resolver(o,t.context,Yce(Z||u.mount,r,t.criteriaMode,t.shouldUseNativeValidation));return x(Z),oe},M=async Z=>{const{errors:oe}=await k(Z);if(Z)for(const se of Z){const Ce=ke(oe,se);Ce?Wt(n.errors,se,Ce):tr(n.errors,se)}else n.errors=oe;return oe},L=async(Z,oe,se={valid:!0})=>{for(const Ce in Z){const Ee=Z[Ce];if(Ee){const{_f:ye,...Ie}=Ee;if(ye){const Ye=u.array.has(ye.name),sn=Ee._f&&Zce(Ee._f);sn&&c.validatingFields&&x([Ce],!0);const xt=await $M(Ee,u.disabled,o,g,t.shouldUseNativeValidation&&!oe,Ye);if(sn&&c.validatingFields&&x([Ce]),xt[ye.name]&&(se.valid=!1,oe))break;!oe&&(ke(xt,ye.name)?Ye?Hce(n.errors,xt,ye.name):Wt(n.errors,ye.name,xt[ye.name]):tr(n.errors,ye.name))}!di(Ie)&&await L(Ie,oe,se)}}return se.valid},B=()=>{for(const Z of u.unMount){const oe=ke(r,Z);oe&&(oe._f.refs?oe._f.refs.every(se=>!N_(se)):!N_(oe._f.ref))&&fe(Z)}u.unMount=new Set},F=(Z,oe)=>!t.disabled&&(Z&&oe&&Wt(o,Z,oe),!xs(X(),i)),Y=(Z,oe,se)=>sj(Z,u,{...a.mount?o:Bn(oe)?i:Oa(Z)?{[Z]:oe}:oe},se,oe),H=Z=>pw(ke(a.mount?o:i,Z,t.shouldUnregister?ke(i,Z,[]):[])),W=(Z,oe,se={})=>{const Ce=ke(r,Z);let Ee=oe;if(Ce){const ye=Ce._f;ye&&(!ye.disabled&&Wt(o,Z,mj(oe,ye)),Ee=d1(ye.ref)&&Zr(oe)?"":oe,dj(ye.ref)?[...ye.ref.options].forEach(Ie=>Ie.selected=Ee.includes(Ie.value)):ye.refs?jm(ye.ref)?ye.refs.length>1?ye.refs.forEach(Ie=>(!Ie.defaultChecked||!Ie.disabled)&&(Ie.checked=Array.isArray(Ee)?!!Ee.find(Ye=>Ye===Ie.value):Ee===Ie.value)):ye.refs[0]&&(ye.refs[0].checked=!!Ee):ye.refs.forEach(Ie=>Ie.checked=Ie.value===Ee):oO(ye.ref)?ye.ref.value="":(ye.ref.value=Ee,ye.ref.type||d.values.next({name:Z,values:{...o}})))}(se.shouldDirty||se.shouldTouch)&&C(Z,Ee,se.shouldTouch,se.shouldDirty,!0),se.shouldValidate&&U(Z)},V=(Z,oe,se)=>{for(const Ce in oe){const Ee=oe[Ce],ye=`${Z}.${Ce}`,Ie=ke(r,ye);(u.array.has(Z)||Wn(Ee)||Ie&&!Ie._f)&&!Hl(Ee)?V(ye,Ee,se):W(ye,Ee,se)}},j=(Z,oe,se={})=>{const Ce=ke(r,Z),Ee=u.array.has(Z),ye=ci(oe);Wt(o,Z,ye),Ee?(d.array.next({name:Z,values:{...o}}),(c.isDirty||c.dirtyFields)&&se.shouldDirty&&d.state.next({name:Z,dirtyFields:Jh(i,o),isDirty:F(Z,ye)})):Ce&&!Ce._f&&!Zr(ye)?V(Z,ye,se):W(Z,ye,se),kM(Z,u)&&d.state.next({...n}),d.values.next({name:a.mount?Z:void 0,values:{...o}})},I=async Z=>{a.mount=!0;const oe=Z.target;let se=oe.name,Ce=!0;const Ee=ke(r,se),ye=()=>oe.type?F_(Ee._f):tj(Z),Ie=Ye=>{Ce=Number.isNaN(Ye)||Hl(Ye)&&isNaN(Ye.getTime())||xs(Ye,ke(o,se,Ye))};if(Ee){let Ye,sn;const xt=ye(),rn=Z.type===f1.BLUR||Z.type===f1.FOCUS_OUT,eo=!Xce(Ee._f)&&!t.resolver&&!ke(n.errors,se)&&!Ee._f.deps||Qce(rn,ke(n.touchedFields,se),n.isSubmitted,m,h),Yn=kM(se,u,rn);Wt(o,se,xt),rn?(Ee._f.onBlur&&Ee._f.onBlur(Z),s&&s(0)):Ee._f.onChange&&Ee._f.onChange(Z);const to=C(se,xt,rn,!1),Zn=!di(to)||Yn;if(!rn&&d.values.next({name:se,type:Z.type,values:{...o}}),eo)return c.isValid&&(t.mode==="onBlur"&&rn?y():rn||y()),Zn&&d.state.next({name:se,...Yn?{}:to});if(!rn&&Yn&&d.state.next({...n}),t.resolver){const{errors:no}=await k([se]);if(Ie(xt),Ce){const va=NM(n.errors,r,se),ro=NM(no,r,va.name||se);Ye=ro.error,se=ro.name,sn=di(no)}}else x([se],!0),Ye=(await $M(Ee,u.disabled,o,g,t.shouldUseNativeValidation))[se],x([se]),Ie(xt),Ce&&(Ye?sn=!1:c.isValid&&(sn=await L(r,!0)));Ce&&(Ee._f.deps&&U(Ee._f.deps),P(se,sn,Ye,to))}},z=(Z,oe)=>{if(ke(n.errors,oe)&&Z.focus)return Z.focus(),1},U=async(Z,oe={})=>{let se,Ce;const Ee=Bp(Z);if(t.resolver){const ye=await M(Bn(Z)?Z:Ee);se=di(ye),Ce=Z?!Ee.some(Ie=>ke(ye,Ie)):se}else Z?(Ce=(await Promise.all(Ee.map(async ye=>{const Ie=ke(r,ye);return await L(Ie&&Ie._f?{[ye]:Ie}:Ie)}))).every(Boolean),!(!Ce&&!n.isValid)&&y()):Ce=se=await L(r);return d.state.next({...!Oa(Z)||c.isValid&&se!==n.isValid?{}:{name:Z},...t.resolver||!Z?{isValid:se}:{},errors:n.errors}),oe.shouldFocus&&!Ce&&zp(r,z,Z?Ee:u.mount),Ce},X=Z=>{const oe={...a.mount?o:i};return Bn(Z)?oe:Oa(Z)?ke(oe,Z):Z.map(se=>ke(oe,se))},q=(Z,oe)=>({invalid:!!ke((oe||n).errors,Z),isDirty:!!ke((oe||n).dirtyFields,Z),error:ke((oe||n).errors,Z),isValidating:!!ke(n.validatingFields,Z),isTouched:!!ke((oe||n).touchedFields,Z)}),G=Z=>{Z&&Bp(Z).forEach(oe=>tr(n.errors,oe)),d.state.next({errors:Z?n.errors:{}})},ee=(Z,oe,se)=>{const Ce=(ke(r,Z,{_f:{}})._f||{}).ref,Ee=ke(n.errors,Z)||{},{ref:ye,message:Ie,type:Ye,...sn}=Ee;Wt(n.errors,Z,{...sn,...oe,ref:Ce}),d.state.next({name:Z,errors:n.errors,isValid:!1}),se&&se.shouldFocus&&Ce&&Ce.focus&&Ce.focus()},ue=(Z,oe)=>Aa(Z)?d.values.subscribe({next:se=>Z(Y(void 0,oe),se)}):Y(Z,oe,!0),fe=(Z,oe={})=>{for(const se of Z?Bp(Z):u.mount)u.mount.delete(se),u.array.delete(se),oe.keepValue||(tr(r,se),tr(o,se)),!oe.keepError&&tr(n.errors,se),!oe.keepDirty&&tr(n.dirtyFields,se),!oe.keepTouched&&tr(n.touchedFields,se),!oe.keepIsValidating&&tr(n.validatingFields,se),!t.shouldUnregister&&!oe.keepDefaultValue&&tr(i,se);d.values.next({values:{...o}}),d.state.next({...n,...oe.keepDirty?{isDirty:F()}:{}}),!oe.keepIsValid&&y()},ie=({disabled:Z,name:oe,field:se,fields:Ce})=>{(bo(Z)&&a.mount||Z||u.disabled.has(oe))&&(Z?u.disabled.add(oe):u.disabled.delete(oe),C(oe,F_(se?se._f:ke(Ce,oe)._f),!1,!1,!0))},Ae=(Z,oe={})=>{let se=ke(r,Z);const Ce=bo(oe.disabled)||bo(t.disabled);return Wt(r,Z,{...se||{},_f:{...se&&se._f?se._f:{ref:{name:Z}},name:Z,mount:!0,...oe}}),u.mount.add(Z),se?ie({field:se,disabled:bo(oe.disabled)?oe.disabled:t.disabled,name:Z}):E(Z,!0,oe.value),{...Ce?{disabled:oe.disabled||t.disabled}:{},...t.progressive?{required:!!oe.required,min:ep(oe.min),max:ep(oe.max),minLength:ep(oe.minLength),maxLength:ep(oe.maxLength),pattern:ep(oe.pattern)}:{},name:Z,onChange:I,onBlur:I,ref:Ee=>{if(Ee){Ae(Z,oe),se=ke(r,Z);const ye=Bn(Ee.value)&&Ee.querySelectorAll&&Ee.querySelectorAll("input,select,textarea")[0]||Ee,Ie=Kce(ye),Ye=se._f.refs||[];if(Ie?Ye.find(sn=>sn===ye):ye===se._f.ref)return;Wt(r,Z,{_f:{...se._f,...Ie?{refs:[...Ye.filter(N_),ye,...Array.isArray(ke(i,Z))?[{}]:[]],ref:{type:ye.type,name:Z}}:{ref:ye}}}),E(Z,!1,void 0,ye)}else se=ke(r,Z,{}),se._f&&(se._f.mount=!1),(t.shouldUnregister||oe.shouldUnregister)&&!(nj(u.array,Z)&&a.action)&&u.unMount.add(Z)}}},de=()=>t.shouldFocusError&&zp(r,z,u.mount),we=Z=>{bo(Z)&&(d.state.next({disabled:Z}),zp(r,(oe,se)=>{const Ce=ke(r,se);Ce&&(oe.disabled=Ce._f.disabled||Z,Array.isArray(Ce._f.refs)&&Ce._f.refs.forEach(Ee=>{Ee.disabled=Ce._f.disabled||Z}))},0,!1))},ge=(Z,oe)=>async se=>{let Ce;se&&(se.preventDefault&&se.preventDefault(),se.persist&&se.persist());let Ee=ci(o);if(u.disabled.size)for(const ye of u.disabled)Wt(Ee,ye,void 0);if(d.state.next({isSubmitting:!0}),t.resolver){const{errors:ye,values:Ie}=await k();n.errors=ye,Ee=Ie}else await L(r);if(tr(n.errors,"root"),di(n.errors)){d.state.next({errors:{}});try{await Z(Ee,se)}catch(ye){Ce=ye}}else oe&&await oe({...n.errors},se),de(),setTimeout(de);if(d.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:di(n.errors)&&!Ce,submitCount:n.submitCount+1,errors:n.errors}),Ce)throw Ce},ae=(Z,oe={})=>{ke(r,Z)&&(Bn(oe.defaultValue)?j(Z,ci(ke(i,Z))):(j(Z,oe.defaultValue),Wt(i,Z,ci(oe.defaultValue))),oe.keepTouched||tr(n.touchedFields,Z),oe.keepDirty||(tr(n.dirtyFields,Z),n.isDirty=oe.defaultValue?F(Z,ci(ke(i,Z))):F()),oe.keepError||(tr(n.errors,Z),c.isValid&&y()),d.state.next({...n}))},$e=(Z,oe={})=>{const se=Z?ci(Z):i,Ce=ci(se),Ee=di(Z),ye=Ee?i:Ce;if(oe.keepDefaultValues||(i=se),!oe.keepValues){if(oe.keepDirtyValues){const Ie=new Set([...u.mount,...Object.keys(Jh(i,o))]);for(const Ye of Array.from(Ie))ke(n.dirtyFields,Ye)?Wt(ye,Ye,ke(o,Ye)):j(Ye,ke(ye,Ye))}else{if(tO&&Bn(Z))for(const Ie of u.mount){const Ye=ke(r,Ie);if(Ye&&Ye._f){const sn=Array.isArray(Ye._f.refs)?Ye._f.refs[0]:Ye._f.ref;if(d1(sn)){const xt=sn.closest("form");if(xt){xt.reset();break}}}}r={}}o=t.shouldUnregister?oe.keepDefaultValues?ci(i):{}:ci(ye),d.array.next({values:{...ye}}),d.values.next({values:{...ye}})}u={mount:oe.keepDirtyValues?u.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},a.mount=!c.isValid||!!oe.keepIsValid||!!oe.keepDirtyValues,a.watch=!!t.shouldUnregister,d.state.next({submitCount:oe.keepSubmitCount?n.submitCount:0,isDirty:Ee?!1:oe.keepDirty?n.isDirty:!!(oe.keepDefaultValues&&!xs(Z,i)),isSubmitted:oe.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:Ee?{}:oe.keepDirtyValues?oe.keepDefaultValues&&o?Jh(i,o):n.dirtyFields:oe.keepDefaultValues&&Z?Jh(i,Z):oe.keepDirty?n.dirtyFields:{},touchedFields:oe.keepTouched?n.touchedFields:{},errors:oe.keepErrors?n.errors:{},isSubmitSuccessful:oe.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1})},Te=(Z,oe)=>$e(Aa(Z)?Z(o):Z,oe);return{control:{register:Ae,unregister:fe,getFieldState:q,handleSubmit:ge,setError:ee,_executeSchema:k,_getWatch:Y,_getDirty:F,_updateValid:y,_removeUnmounted:B,_updateFieldArray:w,_updateDisabledField:ie,_getFieldArray:H,_reset:$e,_resetDefaultValues:()=>Aa(t.defaultValues)&&t.defaultValues().then(Z=>{Te(Z,t.resetOptions),d.state.next({isLoading:!1})}),_updateFormState:Z=>{n={...n,...Z}},_disableForm:we,_subjects:d,_proxyFormState:c,_setErrors:A,get _fields(){return r},get _formValues(){return o},get _state(){return a},set _state(Z){a=Z},get _defaultValues(){return i},get _names(){return u},set _names(Z){u=Z},get _formState(){return n},set _formState(Z){n=Z},get _options(){return t},set _options(Z){t={...t,...Z}}},trigger:U,register:Ae,handleSubmit:ge,watch:ue,setValue:j,getValues:X,reset:Te,resetField:ae,clearErrors:G,unregister:fe,setError:ee,setFocus:(Z,oe={})=>{const se=ke(r,Z),Ce=se&&se._f;if(Ce){const Ee=Ce.refs?Ce.refs[0]:Ce.ref;Ee.focus&&(Ee.focus(),oe.shouldSelect&&Aa(Ee.select)&&Ee.select())}},getFieldState:q}}function Pqe(e={}){const t=$.useRef(void 0),n=$.useRef(void 0),[r,i]=$.useState({isDirty:!1,isValidating:!1,isLoading:Aa(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:Aa(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...tfe(e),formState:r});const o=t.current.control;return o._options=e,iO({subject:o._subjects.state,next:a=>{aj(a,o._proxyFormState,o._updateFormState,!0)&&i({...o._formState})}}),$.useEffect(()=>o._disableForm(e.disabled),[o,e.disabled]),$.useEffect(()=>{if(o._proxyFormState.isDirty){const a=o._getDirty();a!==r.isDirty&&o._subjects.state.next({isDirty:a})}},[o,r.isDirty]),$.useEffect(()=>{e.values&&!xs(e.values,n.current)?(o._reset(e.values,o._options.resetOptions),n.current=e.values,i(a=>({...a}))):o._resetDefaultValues()},[e.values,o]),$.useEffect(()=>{e.errors&&o._setErrors(e.errors)},[e.errors,o]),$.useEffect(()=>{o._state.mount||(o._updateValid(),o._state.mount=!0),o._state.watch&&(o._state.watch=!1,o._subjects.state.next({...o._formState})),o._removeUnmounted()}),$.useEffect(()=>{e.shouldUnregister&&o._subjects.values.next({values:o._getWatch()})},[e.shouldUnregister,o]),t.current.formState=oj(r,o),t.current}var Dt;(function(e){e.assertEqual=i=>i;function t(i){}e.assertIs=t;function n(i){throw new Error}e.assertNever=n,e.arrayToEnum=i=>{const o={};for(const a of i)o[a]=a;return o},e.getValidEnumValues=i=>{const o=e.objectKeys(i).filter(u=>typeof i[i[u]]!="number"),a={};for(const u of o)a[u]=i[u];return e.objectValues(a)},e.objectValues=i=>e.objectKeys(i).map(function(o){return i[o]}),e.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const o=[];for(const a in i)Object.prototype.hasOwnProperty.call(i,a)&&o.push(a);return o},e.find=(i,o)=>{for(const a of i)if(o(a))return a},e.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function r(i,o=" | "){return i.map(a=>typeof a=="string"?`'${a}'`:a).join(o)}e.joinValues=r,e.jsonStringifyReplacer=(i,o)=>typeof o=="bigint"?o.toString():o})(Dt||(Dt={}));var S3;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(S3||(S3={}));const Ne=Dt.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),mu=e=>{switch(typeof e){case"undefined":return Ne.undefined;case"string":return Ne.string;case"number":return isNaN(e)?Ne.nan:Ne.number;case"boolean":return Ne.boolean;case"function":return Ne.function;case"bigint":return Ne.bigint;case"symbol":return Ne.symbol;case"object":return Array.isArray(e)?Ne.array:e===null?Ne.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?Ne.promise:typeof Map<"u"&&e instanceof Map?Ne.map:typeof Set<"u"&&e instanceof Set?Ne.set:typeof Date<"u"&&e instanceof Date?Ne.date:Ne.object;default:return Ne.unknown}},Se=Dt.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),nfe=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class Vi extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}format(t){const n=t||function(o){return o.message},r={_errors:[]},i=o=>{for(const a of o.issues)if(a.code==="invalid_union")a.unionErrors.map(i);else if(a.code==="invalid_return_type")i(a.returnTypeError);else if(a.code==="invalid_arguments")i(a.argumentsError);else if(a.path.length===0)r._errors.push(n(a));else{let u=r,s=0;for(;sn.message){const n={},r=[];for(const i of this.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}Vi.create=e=>new Vi(e);const hd=(e,t)=>{let n;switch(e.code){case Se.invalid_type:e.received===Ne.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case Se.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,Dt.jsonStringifyReplacer)}`;break;case Se.unrecognized_keys:n=`Unrecognized key(s) in object: ${Dt.joinValues(e.keys,", ")}`;break;case Se.invalid_union:n="Invalid input";break;case Se.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Dt.joinValues(e.options)}`;break;case Se.invalid_enum_value:n=`Invalid enum value. Expected ${Dt.joinValues(e.options)}, received '${e.received}'`;break;case Se.invalid_arguments:n="Invalid function arguments";break;case Se.invalid_return_type:n="Invalid function return type";break;case Se.invalid_date:n="Invalid date";break;case Se.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:Dt.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case Se.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case Se.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case Se.custom:n="Invalid input";break;case Se.invalid_intersection_types:n="Intersection results could not be merged";break;case Se.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case Se.not_finite:n="Number must be finite";break;default:n=t.defaultError,Dt.assertNever(e)}return{message:n}};let gj=hd;function rfe(e){gj=e}function m1(){return gj}const g1=e=>{const{data:t,path:n,errorMaps:r,issueData:i}=e,o=[...n,...i.path||[]],a={...i,path:o};if(i.message!==void 0)return{...i,path:o,message:i.message};let u="";const s=r.filter(l=>!!l).slice().reverse();for(const l of s)u=l(a,{data:t,defaultError:u}).message;return{...i,path:o,message:u}},ife=[];function Re(e,t){const n=m1(),r=g1({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===hd?void 0:hd].filter(i=>!!i)});e.common.issues.push(r)}class Ur{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const i of n){if(i.status==="aborted")return ut;i.status==="dirty"&&t.dirty(),r.push(i.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const i of n){const o=await i.key,a=await i.value;r.push({key:o,value:a})}return Ur.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const i of n){const{key:o,value:a}=i;if(o.status==="aborted"||a.status==="aborted")return ut;o.status==="dirty"&&t.dirty(),a.status==="dirty"&&t.dirty(),o.value!=="__proto__"&&(typeof a.value<"u"||i.alwaysSet)&&(r[o.value]=a.value)}return{status:t.value,value:r}}}const ut=Object.freeze({status:"aborted"}),Nf=e=>({status:"dirty",value:e}),ei=e=>({status:"valid",value:e}),C3=e=>e.status==="aborted",E3=e=>e.status==="dirty",gc=e=>e.status==="valid",w0=e=>typeof Promise<"u"&&e instanceof Promise;function v1(e,t,n,r){if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function vj(e,t,n,r,i){if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,n),n}var He;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(He||(He={}));var Sp,Cp;class ja{constructor(t,n,r,i){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=i}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const FM=(e,t)=>{if(gc(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Vi(e.common.issues);return this._error=n,this._error}}};function mt(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(a,u)=>{var s,l;const{message:c}=e;return a.code==="invalid_enum_value"?{message:c??u.defaultError}:typeof u.data>"u"?{message:(s=c??r)!==null&&s!==void 0?s:u.defaultError}:a.code!=="invalid_type"?{message:u.defaultError}:{message:(l=c??n)!==null&&l!==void 0?l:u.defaultError}},description:i}}class bt{get description(){return this._def.description}_getType(t){return mu(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:mu(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Ur,ctx:{common:t.parent.common,data:t.data,parsedType:mu(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(w0(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const i={common:{issues:[],async:(r=n?.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n?.errorMap},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:mu(t)},o=this._parseSync({data:t,path:i.path,parent:i});return FM(i,o)}"~validate"(t){var n,r;const i={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:mu(t)};if(!this["~standard"].async)try{const o=this._parseSync({data:t,path:[],parent:i});return gc(o)?{value:o.value}:{issues:i.common.issues}}catch(o){!((r=(n=o?.message)===null||n===void 0?void 0:n.toLowerCase())===null||r===void 0)&&r.includes("encountered")&&(this["~standard"].async=!0),i.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:i}).then(o=>gc(o)?{value:o.value}:{issues:i.common.issues})}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n?.errorMap,async:!0},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:mu(t)},i=this._parse({data:t,path:r.path,parent:r}),o=await(w0(i)?i:Promise.resolve(i));return FM(r,o)}refine(t,n){const r=i=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(i):n;return this._refinement((i,o)=>{const a=t(i),u=()=>o.addIssue({code:Se.custom,...r(i)});return typeof Promise<"u"&&a instanceof Promise?a.then(s=>s?!0:(u(),!1)):a?!0:(u(),!1)})}refinement(t,n){return this._refinement((r,i)=>t(r)?!0:(i.addIssue(typeof n=="function"?n(r,i):n),!1))}_refinement(t){return new ua({schema:this,typeName:it.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return Ia.create(this,this._def)}nullable(){return Zs.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ra.create(this)}promise(){return md.create(this,this._def)}or(t){return C0.create([this,t],this._def)}and(t){return E0.create(this,t,this._def)}transform(t){return new ua({...mt(this._def),schema:this,typeName:it.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new T0({...mt(this._def),innerType:this,defaultValue:n,typeName:it.ZodDefault})}brand(){return new uO({typeName:it.ZodBranded,type:this,...mt(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new M0({...mt(this._def),innerType:this,catchValue:n,typeName:it.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return Bm.create(this,t)}readonly(){return R0.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const ofe=/^c[^\s-]{8,}$/i,afe=/^[0-9a-z]+$/,ufe=/^[0-9A-HJKMNP-TV-Z]{26}$/i,sfe=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,lfe=/^[a-z0-9_-]{21}$/i,cfe=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,ffe=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,dfe=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,hfe="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let L_;const pfe=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,mfe=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,gfe=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,vfe=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,yfe=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,bfe=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,yj="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",wfe=new RegExp(`^${yj}$`);function bj(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`),t}function xfe(e){return new RegExp(`^${bj(e)}$`)}function wj(e){let t=`${yj}T${bj(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function _fe(e,t){return!!((t==="v4"||!t)&&pfe.test(e)||(t==="v6"||!t)&&gfe.test(e))}function Sfe(e,t){if(!cfe.test(e))return!1;try{const[n]=e.split("."),r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),i=JSON.parse(atob(r));return!(typeof i!="object"||i===null||!i.typ||!i.alg||t&&i.alg!==t)}catch{return!1}}function Cfe(e,t){return!!((t==="v4"||!t)&&mfe.test(e)||(t==="v6"||!t)&&vfe.test(e))}class Jo extends bt{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==Ne.string){const o=this._getOrReturnCtx(t);return Re(o,{code:Se.invalid_type,expected:Ne.string,received:o.parsedType}),ut}const r=new Ur;let i;for(const o of this._def.checks)if(o.kind==="min")t.data.lengtho.value&&(i=this._getOrReturnCtx(t,i),Re(i,{code:Se.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="length"){const a=t.data.length>o.value,u=t.data.lengtht.test(i),{validation:n,code:Se.invalid_string,...He.errToObj(r)})}_addCheck(t){return new Jo({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...He.errToObj(t)})}url(t){return this._addCheck({kind:"url",...He.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...He.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...He.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...He.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...He.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...He.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...He.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...He.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...He.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...He.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...He.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...He.errToObj(t)})}datetime(t){var n,r;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:(n=t?.offset)!==null&&n!==void 0?n:!1,local:(r=t?.local)!==null&&r!==void 0?r:!1,...He.errToObj(t?.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof t?.precision>"u"?null:t?.precision,...He.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...He.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...He.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n?.position,...He.errToObj(n?.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...He.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...He.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...He.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...He.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...He.errToObj(n)})}nonempty(t){return this.min(1,He.errToObj(t))}trim(){return new Jo({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Jo({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Jo({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value{var t;return new Jo({checks:[],typeName:it.ZodString,coerce:(t=e?.coerce)!==null&&t!==void 0?t:!1,...mt(e)})};function Efe(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,i=n>r?n:r,o=parseInt(e.toFixed(i).replace(".","")),a=parseInt(t.toFixed(i).replace(".",""));return o%a/Math.pow(10,i)}class Gs extends bt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==Ne.number){const o=this._getOrReturnCtx(t);return Re(o,{code:Se.invalid_type,expected:Ne.number,received:o.parsedType}),ut}let r;const i=new Ur;for(const o of this._def.checks)o.kind==="int"?Dt.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),Re(r,{code:Se.invalid_type,expected:"integer",received:"float",message:o.message}),i.dirty()):o.kind==="min"?(o.inclusive?t.datao.value:t.data>=o.value)&&(r=this._getOrReturnCtx(t,r),Re(r,{code:Se.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind==="multipleOf"?Efe(t.data,o.value)!==0&&(r=this._getOrReturnCtx(t,r),Re(r,{code:Se.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):o.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),Re(r,{code:Se.not_finite,message:o.message}),i.dirty()):Dt.assertNever(o);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,He.toString(n))}gt(t,n){return this.setLimit("min",t,!1,He.toString(n))}lte(t,n){return this.setLimit("max",t,!0,He.toString(n))}lt(t,n){return this.setLimit("max",t,!1,He.toString(n))}setLimit(t,n,r,i){return new Gs({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:He.toString(i)}]})}_addCheck(t){return new Gs({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:He.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:He.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:He.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:He.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:He.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:He.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:He.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:He.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:He.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.valuet.kind==="int"||t.kind==="multipleOf"&&Dt.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.valuenew Gs({checks:[],typeName:it.ZodNumber,coerce:e?.coerce||!1,...mt(e)});class Ks extends bt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==Ne.bigint)return this._getInvalidInput(t);let r;const i=new Ur;for(const o of this._def.checks)o.kind==="min"?(o.inclusive?t.datao.value:t.data>=o.value)&&(r=this._getOrReturnCtx(t,r),Re(r,{code:Se.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),i.dirty()):o.kind==="multipleOf"?t.data%o.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),Re(r,{code:Se.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):Dt.assertNever(o);return{status:i.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return Re(n,{code:Se.invalid_type,expected:Ne.bigint,received:n.parsedType}),ut}gte(t,n){return this.setLimit("min",t,!0,He.toString(n))}gt(t,n){return this.setLimit("min",t,!1,He.toString(n))}lte(t,n){return this.setLimit("max",t,!0,He.toString(n))}lt(t,n){return this.setLimit("max",t,!1,He.toString(n))}setLimit(t,n,r,i){return new Ks({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:He.toString(i)}]})}_addCheck(t){return new Ks({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:He.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:He.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:He.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:He.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:He.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value{var t;return new Ks({checks:[],typeName:it.ZodBigInt,coerce:(t=e?.coerce)!==null&&t!==void 0?t:!1,...mt(e)})};class x0 extends bt{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==Ne.boolean){const r=this._getOrReturnCtx(t);return Re(r,{code:Se.invalid_type,expected:Ne.boolean,received:r.parsedType}),ut}return ei(t.data)}}x0.create=e=>new x0({typeName:it.ZodBoolean,coerce:e?.coerce||!1,...mt(e)});class vc extends bt{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==Ne.date){const o=this._getOrReturnCtx(t);return Re(o,{code:Se.invalid_type,expected:Ne.date,received:o.parsedType}),ut}if(isNaN(t.data.getTime())){const o=this._getOrReturnCtx(t);return Re(o,{code:Se.invalid_date}),ut}const r=new Ur;let i;for(const o of this._def.checks)o.kind==="min"?t.data.getTime()o.value&&(i=this._getOrReturnCtx(t,i),Re(i,{code:Se.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),r.dirty()):Dt.assertNever(o);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new vc({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:He.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:He.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.valuenew vc({checks:[],coerce:e?.coerce||!1,typeName:it.ZodDate,...mt(e)});class y1 extends bt{_parse(t){if(this._getType(t)!==Ne.symbol){const r=this._getOrReturnCtx(t);return Re(r,{code:Se.invalid_type,expected:Ne.symbol,received:r.parsedType}),ut}return ei(t.data)}}y1.create=e=>new y1({typeName:it.ZodSymbol,...mt(e)});class _0 extends bt{_parse(t){if(this._getType(t)!==Ne.undefined){const r=this._getOrReturnCtx(t);return Re(r,{code:Se.invalid_type,expected:Ne.undefined,received:r.parsedType}),ut}return ei(t.data)}}_0.create=e=>new _0({typeName:it.ZodUndefined,...mt(e)});class S0 extends bt{_parse(t){if(this._getType(t)!==Ne.null){const r=this._getOrReturnCtx(t);return Re(r,{code:Se.invalid_type,expected:Ne.null,received:r.parsedType}),ut}return ei(t.data)}}S0.create=e=>new S0({typeName:it.ZodNull,...mt(e)});class pd extends bt{constructor(){super(...arguments),this._any=!0}_parse(t){return ei(t.data)}}pd.create=e=>new pd({typeName:it.ZodAny,...mt(e)});class ec extends bt{constructor(){super(...arguments),this._unknown=!0}_parse(t){return ei(t.data)}}ec.create=e=>new ec({typeName:it.ZodUnknown,...mt(e)});class Ru extends bt{_parse(t){const n=this._getOrReturnCtx(t);return Re(n,{code:Se.invalid_type,expected:Ne.never,received:n.parsedType}),ut}}Ru.create=e=>new Ru({typeName:it.ZodNever,...mt(e)});class b1 extends bt{_parse(t){if(this._getType(t)!==Ne.undefined){const r=this._getOrReturnCtx(t);return Re(r,{code:Se.invalid_type,expected:Ne.void,received:r.parsedType}),ut}return ei(t.data)}}b1.create=e=>new b1({typeName:it.ZodVoid,...mt(e)});class ra extends bt{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),i=this._def;if(n.parsedType!==Ne.array)return Re(n,{code:Se.invalid_type,expected:Ne.array,received:n.parsedType}),ut;if(i.exactLength!==null){const a=n.data.length>i.exactLength.value,u=n.data.lengthi.maxLength.value&&(Re(n,{code:Se.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((a,u)=>i.type._parseAsync(new ja(n,a,n.path,u)))).then(a=>Ur.mergeArray(r,a));const o=[...n.data].map((a,u)=>i.type._parseSync(new ja(n,a,n.path,u)));return Ur.mergeArray(r,o)}get element(){return this._def.type}min(t,n){return new ra({...this._def,minLength:{value:t,message:He.toString(n)}})}max(t,n){return new ra({...this._def,maxLength:{value:t,message:He.toString(n)}})}length(t,n){return new ra({...this._def,exactLength:{value:t,message:He.toString(n)}})}nonempty(t){return this.min(1,t)}}ra.create=(e,t)=>new ra({type:e,minLength:null,maxLength:null,exactLength:null,typeName:it.ZodArray,...mt(t)});function xf(e){if(e instanceof On){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Ia.create(xf(r))}return new On({...e._def,shape:()=>t})}else return e instanceof ra?new ra({...e._def,type:xf(e.element)}):e instanceof Ia?Ia.create(xf(e.unwrap())):e instanceof Zs?Zs.create(xf(e.unwrap())):e instanceof Ba?Ba.create(e.items.map(t=>xf(t))):e}class On extends bt{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=Dt.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==Ne.object){const l=this._getOrReturnCtx(t);return Re(l,{code:Se.invalid_type,expected:Ne.object,received:l.parsedType}),ut}const{status:r,ctx:i}=this._processInputParams(t),{shape:o,keys:a}=this._getCached(),u=[];if(!(this._def.catchall instanceof Ru&&this._def.unknownKeys==="strip"))for(const l in i.data)a.includes(l)||u.push(l);const s=[];for(const l of a){const c=o[l],d=i.data[l];s.push({key:{status:"valid",value:l},value:c._parse(new ja(i,d,i.path,l)),alwaysSet:l in i.data})}if(this._def.catchall instanceof Ru){const l=this._def.unknownKeys;if(l==="passthrough")for(const c of u)s.push({key:{status:"valid",value:c},value:{status:"valid",value:i.data[c]}});else if(l==="strict")u.length>0&&(Re(i,{code:Se.unrecognized_keys,keys:u}),r.dirty());else if(l!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const l=this._def.catchall;for(const c of u){const d=i.data[c];s.push({key:{status:"valid",value:c},value:l._parse(new ja(i,d,i.path,c)),alwaysSet:c in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const l=[];for(const c of s){const d=await c.key,h=await c.value;l.push({key:d,value:h,alwaysSet:c.alwaysSet})}return l}).then(l=>Ur.mergeObjectSync(r,l)):Ur.mergeObjectSync(r,s)}get shape(){return this._def.shape()}strict(t){return He.errToObj,new On({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var i,o,a,u;const s=(a=(o=(i=this._def).errorMap)===null||o===void 0?void 0:o.call(i,n,r).message)!==null&&a!==void 0?a:r.defaultError;return n.code==="unrecognized_keys"?{message:(u=He.errToObj(t).message)!==null&&u!==void 0?u:s}:{message:s}}}:{}})}strip(){return new On({...this._def,unknownKeys:"strip"})}passthrough(){return new On({...this._def,unknownKeys:"passthrough"})}extend(t){return new On({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new On({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:it.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new On({...this._def,catchall:t})}pick(t){const n={};return Dt.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new On({...this._def,shape:()=>n})}omit(t){const n={};return Dt.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new On({...this._def,shape:()=>n})}deepPartial(){return xf(this)}partial(t){const n={};return Dt.objectKeys(this.shape).forEach(r=>{const i=this.shape[r];t&&!t[r]?n[r]=i:n[r]=i.optional()}),new On({...this._def,shape:()=>n})}required(t){const n={};return Dt.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let o=this.shape[r];for(;o instanceof Ia;)o=o._def.innerType;n[r]=o}}),new On({...this._def,shape:()=>n})}keyof(){return xj(Dt.objectKeys(this.shape))}}On.create=(e,t)=>new On({shape:()=>e,unknownKeys:"strip",catchall:Ru.create(),typeName:it.ZodObject,...mt(t)});On.strictCreate=(e,t)=>new On({shape:()=>e,unknownKeys:"strict",catchall:Ru.create(),typeName:it.ZodObject,...mt(t)});On.lazycreate=(e,t)=>new On({shape:e,unknownKeys:"strip",catchall:Ru.create(),typeName:it.ZodObject,...mt(t)});class C0 extends bt{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function i(o){for(const u of o)if(u.result.status==="valid")return u.result;for(const u of o)if(u.result.status==="dirty")return n.common.issues.push(...u.ctx.common.issues),u.result;const a=o.map(u=>new Vi(u.ctx.common.issues));return Re(n,{code:Se.invalid_union,unionErrors:a}),ut}if(n.common.async)return Promise.all(r.map(async o=>{const a={...n,common:{...n.common,issues:[]},parent:null};return{result:await o._parseAsync({data:n.data,path:n.path,parent:a}),ctx:a}})).then(i);{let o;const a=[];for(const s of r){const l={...n,common:{...n.common,issues:[]},parent:null},c=s._parseSync({data:n.data,path:n.path,parent:l});if(c.status==="valid")return c;c.status==="dirty"&&!o&&(o={result:c,ctx:l}),l.common.issues.length&&a.push(l.common.issues)}if(o)return n.common.issues.push(...o.ctx.common.issues),o.result;const u=a.map(s=>new Vi(s));return Re(n,{code:Se.invalid_union,unionErrors:u}),ut}}get options(){return this._def.options}}C0.create=(e,t)=>new C0({options:e,typeName:it.ZodUnion,...mt(t)});const su=e=>e instanceof O0?su(e.schema):e instanceof ua?su(e.innerType()):e instanceof P0?[e.value]:e instanceof Ys?e.options:e instanceof k0?Dt.objectValues(e.enum):e instanceof T0?su(e._def.innerType):e instanceof _0?[void 0]:e instanceof S0?[null]:e instanceof Ia?[void 0,...su(e.unwrap())]:e instanceof Zs?[null,...su(e.unwrap())]:e instanceof uO||e instanceof R0?su(e.unwrap()):e instanceof M0?su(e._def.innerType):[];class mw extends bt{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Ne.object)return Re(n,{code:Se.invalid_type,expected:Ne.object,received:n.parsedType}),ut;const r=this.discriminator,i=n.data[r],o=this.optionsMap.get(i);return o?n.common.async?o._parseAsync({data:n.data,path:n.path,parent:n}):o._parseSync({data:n.data,path:n.path,parent:n}):(Re(n,{code:Se.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),ut)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const i=new Map;for(const o of n){const a=su(o.shape[t]);if(!a.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const u of a){if(i.has(u))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(u)}`);i.set(u,o)}}return new mw({typeName:it.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:i,...mt(r)})}}function A3(e,t){const n=mu(e),r=mu(t);if(e===t)return{valid:!0,data:e};if(n===Ne.object&&r===Ne.object){const i=Dt.objectKeys(t),o=Dt.objectKeys(e).filter(u=>i.indexOf(u)!==-1),a={...e,...t};for(const u of o){const s=A3(e[u],t[u]);if(!s.valid)return{valid:!1};a[u]=s.data}return{valid:!0,data:a}}else if(n===Ne.array&&r===Ne.array){if(e.length!==t.length)return{valid:!1};const i=[];for(let o=0;o{if(C3(o)||C3(a))return ut;const u=A3(o.value,a.value);return u.valid?((E3(o)||E3(a))&&n.dirty(),{status:n.value,value:u.data}):(Re(r,{code:Se.invalid_intersection_types}),ut)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([o,a])=>i(o,a)):i(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}E0.create=(e,t,n)=>new E0({left:e,right:t,typeName:it.ZodIntersection,...mt(n)});class Ba extends bt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Ne.array)return Re(r,{code:Se.invalid_type,expected:Ne.array,received:r.parsedType}),ut;if(r.data.lengththis._def.items.length&&(Re(r,{code:Se.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const o=[...r.data].map((a,u)=>{const s=this._def.items[u]||this._def.rest;return s?s._parse(new ja(r,a,r.path,u)):null}).filter(a=>!!a);return r.common.async?Promise.all(o).then(a=>Ur.mergeArray(n,a)):Ur.mergeArray(n,o)}get items(){return this._def.items}rest(t){return new Ba({...this._def,rest:t})}}Ba.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Ba({items:e,typeName:it.ZodTuple,rest:null,...mt(t)})};class A0 extends bt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Ne.object)return Re(r,{code:Se.invalid_type,expected:Ne.object,received:r.parsedType}),ut;const i=[],o=this._def.keyType,a=this._def.valueType;for(const u in r.data)i.push({key:o._parse(new ja(r,u,r.path,u)),value:a._parse(new ja(r,r.data[u],r.path,u)),alwaysSet:u in r.data});return r.common.async?Ur.mergeObjectAsync(n,i):Ur.mergeObjectSync(n,i)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof bt?new A0({keyType:t,valueType:n,typeName:it.ZodRecord,...mt(r)}):new A0({keyType:Jo.create(),valueType:t,typeName:it.ZodRecord,...mt(n)})}}class w1 extends bt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Ne.map)return Re(r,{code:Se.invalid_type,expected:Ne.map,received:r.parsedType}),ut;const i=this._def.keyType,o=this._def.valueType,a=[...r.data.entries()].map(([u,s],l)=>({key:i._parse(new ja(r,u,r.path,[l,"key"])),value:o._parse(new ja(r,s,r.path,[l,"value"]))}));if(r.common.async){const u=new Map;return Promise.resolve().then(async()=>{for(const s of a){const l=await s.key,c=await s.value;if(l.status==="aborted"||c.status==="aborted")return ut;(l.status==="dirty"||c.status==="dirty")&&n.dirty(),u.set(l.value,c.value)}return{status:n.value,value:u}})}else{const u=new Map;for(const s of a){const l=s.key,c=s.value;if(l.status==="aborted"||c.status==="aborted")return ut;(l.status==="dirty"||c.status==="dirty")&&n.dirty(),u.set(l.value,c.value)}return{status:n.value,value:u}}}}w1.create=(e,t,n)=>new w1({valueType:t,keyType:e,typeName:it.ZodMap,...mt(n)});class yc extends bt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Ne.set)return Re(r,{code:Se.invalid_type,expected:Ne.set,received:r.parsedType}),ut;const i=this._def;i.minSize!==null&&r.data.sizei.maxSize.value&&(Re(r,{code:Se.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),n.dirty());const o=this._def.valueType;function a(s){const l=new Set;for(const c of s){if(c.status==="aborted")return ut;c.status==="dirty"&&n.dirty(),l.add(c.value)}return{status:n.value,value:l}}const u=[...r.data.values()].map((s,l)=>o._parse(new ja(r,s,r.path,l)));return r.common.async?Promise.all(u).then(s=>a(s)):a(u)}min(t,n){return new yc({...this._def,minSize:{value:t,message:He.toString(n)}})}max(t,n){return new yc({...this._def,maxSize:{value:t,message:He.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}yc.create=(e,t)=>new yc({valueType:e,minSize:null,maxSize:null,typeName:it.ZodSet,...mt(t)});class Kf extends bt{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Ne.function)return Re(n,{code:Se.invalid_type,expected:Ne.function,received:n.parsedType}),ut;function r(u,s){return g1({data:u,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,m1(),hd].filter(l=>!!l),issueData:{code:Se.invalid_arguments,argumentsError:s}})}function i(u,s){return g1({data:u,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,m1(),hd].filter(l=>!!l),issueData:{code:Se.invalid_return_type,returnTypeError:s}})}const o={errorMap:n.common.contextualErrorMap},a=n.data;if(this._def.returns instanceof md){const u=this;return ei(async function(...s){const l=new Vi([]),c=await u._def.args.parseAsync(s,o).catch(m=>{throw l.addIssue(r(s,m)),l}),d=await Reflect.apply(a,this,c);return await u._def.returns._def.type.parseAsync(d,o).catch(m=>{throw l.addIssue(i(d,m)),l})})}else{const u=this;return ei(function(...s){const l=u._def.args.safeParse(s,o);if(!l.success)throw new Vi([r(s,l.error)]);const c=Reflect.apply(a,this,l.data),d=u._def.returns.safeParse(c,o);if(!d.success)throw new Vi([i(c,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new Kf({...this._def,args:Ba.create(t).rest(ec.create())})}returns(t){return new Kf({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new Kf({args:t||Ba.create([]).rest(ec.create()),returns:n||ec.create(),typeName:it.ZodFunction,...mt(r)})}}class O0 extends bt{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}O0.create=(e,t)=>new O0({getter:e,typeName:it.ZodLazy,...mt(t)});class P0 extends bt{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return Re(n,{received:n.data,code:Se.invalid_literal,expected:this._def.value}),ut}return{status:"valid",value:t.data}}get value(){return this._def.value}}P0.create=(e,t)=>new P0({value:e,typeName:it.ZodLiteral,...mt(t)});function xj(e,t){return new Ys({values:e,typeName:it.ZodEnum,...mt(t)})}class Ys extends bt{constructor(){super(...arguments),Sp.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return Re(n,{expected:Dt.joinValues(r),received:n.parsedType,code:Se.invalid_type}),ut}if(v1(this,Sp)||vj(this,Sp,new Set(this._def.values)),!v1(this,Sp).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return Re(n,{received:n.data,code:Se.invalid_enum_value,options:r}),ut}return ei(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return Ys.create(t,{...this._def,...n})}exclude(t,n=this._def){return Ys.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}Sp=new WeakMap;Ys.create=xj;class k0 extends bt{constructor(){super(...arguments),Cp.set(this,void 0)}_parse(t){const n=Dt.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==Ne.string&&r.parsedType!==Ne.number){const i=Dt.objectValues(n);return Re(r,{expected:Dt.joinValues(i),received:r.parsedType,code:Se.invalid_type}),ut}if(v1(this,Cp)||vj(this,Cp,new Set(Dt.getValidEnumValues(this._def.values))),!v1(this,Cp).has(t.data)){const i=Dt.objectValues(n);return Re(r,{received:r.data,code:Se.invalid_enum_value,options:i}),ut}return ei(t.data)}get enum(){return this._def.values}}Cp=new WeakMap;k0.create=(e,t)=>new k0({values:e,typeName:it.ZodNativeEnum,...mt(t)});class md extends bt{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Ne.promise&&n.common.async===!1)return Re(n,{code:Se.invalid_type,expected:Ne.promise,received:n.parsedType}),ut;const r=n.parsedType===Ne.promise?n.data:Promise.resolve(n.data);return ei(r.then(i=>this._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}}md.create=(e,t)=>new md({type:e,typeName:it.ZodPromise,...mt(t)});class ua extends bt{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===it.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=this._def.effect||null,o={addIssue:a=>{Re(r,a),a.fatal?n.abort():n.dirty()},get path(){return r.path}};if(o.addIssue=o.addIssue.bind(o),i.type==="preprocess"){const a=i.transform(r.data,o);if(r.common.async)return Promise.resolve(a).then(async u=>{if(n.value==="aborted")return ut;const s=await this._def.schema._parseAsync({data:u,path:r.path,parent:r});return s.status==="aborted"?ut:s.status==="dirty"||n.value==="dirty"?Nf(s.value):s});{if(n.value==="aborted")return ut;const u=this._def.schema._parseSync({data:a,path:r.path,parent:r});return u.status==="aborted"?ut:u.status==="dirty"||n.value==="dirty"?Nf(u.value):u}}if(i.type==="refinement"){const a=u=>{const s=i.refinement(u,o);if(r.common.async)return Promise.resolve(s);if(s instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return u};if(r.common.async===!1){const u=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return u.status==="aborted"?ut:(u.status==="dirty"&&n.dirty(),a(u.value),{status:n.value,value:u.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(u=>u.status==="aborted"?ut:(u.status==="dirty"&&n.dirty(),a(u.value).then(()=>({status:n.value,value:u.value}))))}if(i.type==="transform")if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!gc(a))return a;const u=i.transform(a.value,o);if(u instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:u}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>gc(a)?Promise.resolve(i.transform(a.value,o)).then(u=>({status:n.value,value:u})):a);Dt.assertNever(i)}}ua.create=(e,t,n)=>new ua({schema:e,typeName:it.ZodEffects,effect:t,...mt(n)});ua.createWithPreprocess=(e,t,n)=>new ua({schema:t,effect:{type:"preprocess",transform:e},typeName:it.ZodEffects,...mt(n)});class Ia extends bt{_parse(t){return this._getType(t)===Ne.undefined?ei(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Ia.create=(e,t)=>new Ia({innerType:e,typeName:it.ZodOptional,...mt(t)});class Zs extends bt{_parse(t){return this._getType(t)===Ne.null?ei(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Zs.create=(e,t)=>new Zs({innerType:e,typeName:it.ZodNullable,...mt(t)});class T0 extends bt{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===Ne.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}T0.create=(e,t)=>new T0({innerType:e,typeName:it.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...mt(t)});class M0 extends bt{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},i=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return w0(i)?i.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Vi(r.common.issues)},input:r.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Vi(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}M0.create=(e,t)=>new M0({innerType:e,typeName:it.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...mt(t)});class x1 extends bt{_parse(t){if(this._getType(t)!==Ne.nan){const r=this._getOrReturnCtx(t);return Re(r,{code:Se.invalid_type,expected:Ne.nan,received:r.parsedType}),ut}return{status:"valid",value:t.data}}}x1.create=e=>new x1({typeName:it.ZodNaN,...mt(e)});const Afe=Symbol("zod_brand");class uO extends bt{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class Bm extends bt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const o=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?ut:o.status==="dirty"?(n.dirty(),Nf(o.value)):this._def.out._parseAsync({data:o.value,path:r.path,parent:r})})();{const i=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?ut:i.status==="dirty"?(n.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:r.path,parent:r})}}static create(t,n){return new Bm({in:t,out:n,typeName:it.ZodPipeline})}}class R0 extends bt{_parse(t){const n=this._def.innerType._parse(t),r=i=>(gc(i)&&(i.value=Object.freeze(i.value)),i);return w0(n)?n.then(i=>r(i)):r(n)}unwrap(){return this._def.innerType}}R0.create=(e,t)=>new R0({innerType:e,typeName:it.ZodReadonly,...mt(t)});function _j(e,t={},n){return e?pd.create().superRefine((r,i)=>{var o,a;if(!e(r)){const u=typeof t=="function"?t(r):typeof t=="string"?{message:t}:t,s=(a=(o=u.fatal)!==null&&o!==void 0?o:n)!==null&&a!==void 0?a:!0,l=typeof u=="string"?{message:u}:u;i.addIssue({code:"custom",...l,fatal:s})}}):pd.create()}const Ofe={object:On.lazycreate};var it;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(it||(it={}));const Pfe=(e,t={message:`Input not instance of ${e.name}`})=>_j(n=>n instanceof e,t),Sj=Jo.create,Cj=Gs.create,kfe=x1.create,Tfe=Ks.create,Ej=x0.create,Mfe=vc.create,Rfe=y1.create,Dfe=_0.create,$fe=S0.create,Ife=pd.create,Nfe=ec.create,Ffe=Ru.create,Lfe=b1.create,jfe=ra.create,Bfe=On.create,zfe=On.strictCreate,Ufe=C0.create,Wfe=mw.create,Vfe=E0.create,Hfe=Ba.create,qfe=A0.create,Gfe=w1.create,Kfe=yc.create,Yfe=Kf.create,Zfe=O0.create,Xfe=P0.create,Qfe=Ys.create,Jfe=k0.create,ede=md.create,LM=ua.create,tde=Ia.create,nde=Zs.create,rde=ua.createWithPreprocess,ide=Bm.create,ode=()=>Sj().optional(),ade=()=>Cj().optional(),ude=()=>Ej().optional(),sde={string:e=>Jo.create({...e,coerce:!0}),number:e=>Gs.create({...e,coerce:!0}),boolean:e=>x0.create({...e,coerce:!0}),bigint:e=>Ks.create({...e,coerce:!0}),date:e=>vc.create({...e,coerce:!0})},lde=ut;var kqe=Object.freeze({__proto__:null,defaultErrorMap:hd,setErrorMap:rfe,getErrorMap:m1,makeIssue:g1,EMPTY_PATH:ife,addIssueToContext:Re,ParseStatus:Ur,INVALID:ut,DIRTY:Nf,OK:ei,isAborted:C3,isDirty:E3,isValid:gc,isAsync:w0,get util(){return Dt},get objectUtil(){return S3},ZodParsedType:Ne,getParsedType:mu,ZodType:bt,datetimeRegex:wj,ZodString:Jo,ZodNumber:Gs,ZodBigInt:Ks,ZodBoolean:x0,ZodDate:vc,ZodSymbol:y1,ZodUndefined:_0,ZodNull:S0,ZodAny:pd,ZodUnknown:ec,ZodNever:Ru,ZodVoid:b1,ZodArray:ra,ZodObject:On,ZodUnion:C0,ZodDiscriminatedUnion:mw,ZodIntersection:E0,ZodTuple:Ba,ZodRecord:A0,ZodMap:w1,ZodSet:yc,ZodFunction:Kf,ZodLazy:O0,ZodLiteral:P0,ZodEnum:Ys,ZodNativeEnum:k0,ZodPromise:md,ZodEffects:ua,ZodTransformer:ua,ZodOptional:Ia,ZodNullable:Zs,ZodDefault:T0,ZodCatch:M0,ZodNaN:x1,BRAND:Afe,ZodBranded:uO,ZodPipeline:Bm,ZodReadonly:R0,custom:_j,Schema:bt,ZodSchema:bt,late:Ofe,get ZodFirstPartyTypeKind(){return it},coerce:sde,any:Ife,array:jfe,bigint:Tfe,boolean:Ej,date:Mfe,discriminatedUnion:Wfe,effect:LM,enum:Qfe,function:Yfe,instanceof:Pfe,intersection:Vfe,lazy:Zfe,literal:Xfe,map:Gfe,nan:kfe,nativeEnum:Jfe,never:Ffe,null:$fe,nullable:nde,number:Cj,object:Bfe,oboolean:ude,onumber:ade,optional:tde,ostring:ode,pipeline:ide,preprocess:rde,promise:ede,record:qfe,set:Kfe,strictObject:zfe,string:Sj,symbol:Rfe,transformer:LM,tuple:Hfe,undefined:Dfe,union:Ufe,unknown:Nfe,void:Lfe,NEVER:lde,ZodIssueCode:Se,quotelessJson:nfe,ZodError:Vi});const jM=(e,t,n)=>{if(e&&"reportValidity"in e){const r=ke(n,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},Aj=(e,t)=>{for(const n in t.fields){const r=t.fields[n];r&&r.ref&&"reportValidity"in r.ref?jM(r.ref,n,e):r.refs&&r.refs.forEach(i=>jM(i,n,e))}},cde=(e,t)=>{t.shouldUseNativeValidation&&Aj(e,t);const n={};for(const r in e){const i=ke(t.fields,r),o=Object.assign(e[r]||{},{ref:i&&i.ref});if(fde(t.names||Object.keys(e),r)){const a=Object.assign({},ke(n,r));Wt(a,"root",o),Wt(n,r,a)}else Wt(n,r,o)}return n},fde=(e,t)=>e.some(n=>n.startsWith(t+"."));var dde=function(e,t){for(var n={};e.length;){var r=e[0],i=r.code,o=r.message,a=r.path.join(".");if(!n[a])if("unionErrors"in r){var u=r.unionErrors[0].errors[0];n[a]={message:u.message,type:u.code}}else n[a]={message:o,type:i};if("unionErrors"in r&&r.unionErrors.forEach(function(c){return c.errors.forEach(function(d){return e.push(d)})}),t){var s=n[a].types,l=s&&s[r.code];n[a]=lj(a,t,n,i,l?[].concat(l,r.message):r.message)}e.shift()}return n},Tqe=function(e,t,n){return n===void 0&&(n={}),function(r,i,o){try{return Promise.resolve(function(a,u){try{var s=Promise.resolve(e[n.mode==="sync"?"parse":"parseAsync"](r,t)).then(function(l){return o.shouldUseNativeValidation&&Aj({},o),{errors:{},values:n.raw?r:l}})}catch(l){return u(l)}return s&&s.then?s.then(void 0,u):s}(0,function(a){if(function(u){return Array.isArray(u?.errors)}(a))return{values:{},errors:cde(dde(a.errors,!o.shouldUseNativeValidation&&o.criteriaMode==="all"),o)};throw a}))}catch(a){return Promise.reject(a)}}},hde=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Qe=hde.reduce((e,t)=>{const n=b.forwardRef((r,i)=>{const{asChild:o,...a}=r,u=o?qs:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),R.jsx(u,{...a,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Oj(e,t){e&&Bu.flushSync(()=>e.dispatchEvent(t))}var pde="Label",Pj=b.forwardRef((e,t)=>R.jsx(Qe.label,{...e,ref:t,onMouseDown:n=>{n.target.closest("button, input, select, textarea")||(e.onMouseDown?.(n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));Pj.displayName=pde;var Mqe=Pj,kj={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Yo,function(){var n=1e3,r=6e4,i=36e5,o="millisecond",a="second",u="minute",s="hour",l="day",c="week",d="month",h="quarter",m="year",g="date",v="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,x=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,w={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(H){var W=["th","st","nd","rd"],V=H%100;return"["+H+(W[(V-20)%10]||W[V]||W[0])+"]"}},S=function(H,W,V){var j=String(H);return!j||j.length>=W?H:""+Array(W+1-j.length).join(V)+H},A={s:S,z:function(H){var W=-H.utcOffset(),V=Math.abs(W),j=Math.floor(V/60),I=V%60;return(W<=0?"+":"-")+S(j,2,"0")+":"+S(I,2,"0")},m:function H(W,V){if(W.date()1)return H(U[0])}else{var X=W.name;C[X]=W,I=X}return!j&&I&&(E=I),I||!j&&E},L=function(H,W){if(k(H))return H.clone();var V=typeof W=="object"?W:{};return V.date=H,V.args=arguments,new F(V)},B=A;B.l=M,B.i=k,B.w=function(H,W){return L(H,{locale:W.$L,utc:W.$u,x:W.$x,$offset:W.$offset})};var F=function(){function H(V){this.$L=M(V.locale,null,!0),this.parse(V),this.$x=this.$x||V.x||{},this[P]=!0}var W=H.prototype;return W.parse=function(V){this.$d=function(j){var I=j.date,z=j.utc;if(I===null)return new Date(NaN);if(B.u(I))return new Date;if(I instanceof Date)return new Date(I);if(typeof I=="string"&&!/Z$/i.test(I)){var U=I.match(y);if(U){var X=U[2]-1||0,q=(U[7]||"0").substring(0,3);return z?new Date(Date.UTC(U[1],X,U[3]||1,U[4]||0,U[5]||0,U[6]||0,q)):new Date(U[1],X,U[3]||1,U[4]||0,U[5]||0,U[6]||0,q)}}return new Date(I)}(V),this.init()},W.init=function(){var V=this.$d;this.$y=V.getFullYear(),this.$M=V.getMonth(),this.$D=V.getDate(),this.$W=V.getDay(),this.$H=V.getHours(),this.$m=V.getMinutes(),this.$s=V.getSeconds(),this.$ms=V.getMilliseconds()},W.$utils=function(){return B},W.isValid=function(){return this.$d.toString()!==v},W.isSame=function(V,j){var I=L(V);return this.startOf(j)<=I&&I<=this.endOf(j)},W.isAfter=function(V,j){return L(V){let n=e;for(;n;)n.callback(),n=n.next})},get(){const n=[];let r=e;for(;r;)n.push(r),r=r.next;return n},subscribe(n){let r=!0;const i=t={callback:n,next:null,prev:t};return i.prev?i.prev.next=i:e=i,function(){!r||e===null||(r=!1,i.next?i.next.prev=i.prev:t=i.prev,i.prev?i.prev.next=i.next:e=i.next)}}}}var KT={notify(){},get:()=>[]};function kae(e,t){let n,r=KT,i=0,o=!1;function a(m){c();const b=r.subscribe(m);let w=!1;return()=>{w||(w=!0,b(),d())}}function u(){r.notify()}function s(){g.onStateChange&&g.onStateChange()}function l(){return o}function c(){i++,n||(n=e.subscribe(s),r=Oae())}function d(){i--,n&&i===0&&(n(),n=void 0,r.clear(),r=KT)}function h(){o||(o=!0,c())}function v(){o&&(o=!1,d())}const g={addNestedSub:a,notifyNestedSubs:u,handleChangeWrapper:s,isSubscribed:l,trySubscribe:h,tryUnsubscribe:v,getListeners:()=>r};return g}var Tae=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Mae=Tae(),Rae=()=>typeof navigator<"u"&&navigator.product==="ReactNative",Dae=Rae(),$ae=()=>Mae||Dae?y.useLayoutEffect:y.useEffect,Iae=$ae(),Nae=Symbol.for("react-redux-context"),Fae=typeof globalThis<"u"?globalThis:{};function Lae(){if(!y.createContext)return{};const e=Fae[Nae]??=new Map;let t=e.get(y.createContext);return t||(t=y.createContext(null),e.set(y.createContext,t)),t}var _l=Lae();function jae(e){const{children:t,context:n,serverState:r,store:i}=e,o=y.useMemo(()=>{const s=kae(i);return{store:i,subscription:s,getServerState:r?()=>r:void 0}},[i,r]),a=y.useMemo(()=>i.getState(),[i]);Iae(()=>{const{subscription:s}=o;return s.onStateChange=s.notifyNestedSubs,s.trySubscribe(),a!==i.getState()&&s.notifyNestedSubs(),()=>{s.tryUnsubscribe(),s.onStateChange=void 0}},[o,a]);const u=n||_l;return y.createElement(u.Provider,{value:o},t)}var qqe=jae;function tA(e=_l){return function(){return y.useContext(e)}}var iL=tA();function oL(e=_l){const t=e===_l?iL:tA(e),n=()=>{const{store:r}=t();return r};return Object.assign(n,{withTypes:()=>n}),n}var Bae=oL();function zae(e=_l){const t=e===_l?Bae:oL(e),n=()=>t().dispatch;return Object.assign(n,{withTypes:()=>n}),n}var Kqe=zae(),Uae=(e,t)=>e===t;function Wae(e=_l){const t=e===_l?iL:tA(e),n=(r,i={})=>{const{equalityFn:o=Uae}=typeof i=="function"?{equalityFn:i}:i,a=t(),{store:u,subscription:s,getServerState:l}=a;y.useRef(!0);const c=y.useCallback({[r.name](h){return r(h)}}[r.name],[r]),d=Aae.useSyncExternalStoreWithSelector(s.addNestedSub,u.getState,l||u.getState,c,o);return y.useDebugValue(d),d};return Object.assign(n,{withTypes:()=>n}),n}var Gqe=Wae();function GT(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Ex(...e){return t=>{let n=!1;const r=e.map(i=>{const o=GT(i,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let i=0;i{const{children:n,...r}=e,i=y.Children.toArray(n),o=i.find(Vae);if(o){const a=o.props.children,u=i.map(s=>s===o?y.Children.count(a)>1?y.Children.only(null):y.isValidElement(a)?a.props.children:null:s);return I.jsx(pC,{...r,ref:t,children:y.isValidElement(a)?y.cloneElement(a,void 0,u):null})}return I.jsx(pC,{...r,ref:t,children:n})});Sl.displayName="Slot";var pC=y.forwardRef((e,t)=>{const{children:n,...r}=e;if(y.isValidElement(n)){const i=qae(n);return y.cloneElement(n,{...Hae(r,n.props),ref:t?Ex(t,i):i})}return y.Children.count(n)>1?y.Children.only(null):null});pC.displayName="SlotClone";var nA=({children:e})=>I.jsx(I.Fragment,{children:e});function Vae(e){return y.isValidElement(e)&&e.type===nA}function Hae(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...u)=>{o(...u),i(...u)}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}function qae(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function aL(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;ttypeof e=="boolean"?`${e}`:e===0?"0":e,ZT=cn,Yqe=(e,t)=>n=>{var r;if(t?.variants==null)return ZT(e,n?.class,n?.className);const{variants:i,defaultVariants:o}=t,a=Object.keys(i).map(l=>{const c=n?.[l],d=o?.[l];if(c===null)return null;const h=YT(c)||YT(d);return i[l][h]}),u=n&&Object.entries(n).reduce((l,c)=>{let[d,h]=c;return h===void 0||(l[d]=h),l},{}),s=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((l,c)=>{let{class:d,className:h,...v}=c;return Object.entries(v).every(g=>{let[m,b]=g;return Array.isArray(b)?b.includes({...o,...u}[m]):{...o,...u}[m]===b})?[...l,d,h]:l},[]);return ZT(e,a,s,n?.class,n?.className)},rA="-",Kae=e=>{const t=Yae(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{const u=a.split(rA);return u[0]===""&&u.length!==1&&u.shift(),uL(u,t)||Gae(a)},getConflictingClassGroupIds:(a,u)=>{const s=n[a]||[];return u&&r[a]?[...s,...r[a]]:s}}},uL=(e,t)=>{if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),i=r?uL(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;const o=e.join(rA);return t.validators.find(({validator:a})=>a(o))?.classGroupId},XT=/^\[(.+)\]$/,Gae=e=>{if(XT.test(e)){const t=XT.exec(e)[1],n=t?.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},Yae=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return Xae(Object.entries(e.classGroups),n).forEach(([o,a])=>{vC(a,r,o,t)}),r},vC=(e,t,n,r)=>{e.forEach(i=>{if(typeof i=="string"){const o=i===""?t:QT(t,i);o.classGroupId=n;return}if(typeof i=="function"){if(Zae(i)){vC(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([o,a])=>{vC(a,QT(t,o),n,r)})})},QT=(e,t)=>{let n=e;return t.split(rA).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},Zae=e=>e.isThemeGetter,Xae=(e,t)=>t?e.map(([n,r])=>{const i=r.map(o=>typeof o=="string"?t+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([a,u])=>[t+a,u])):o);return[n,i]}):e,Qae=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const i=(o,a)=>{n.set(o,a),t++,t>e&&(t=0,r=n,n=new Map)};return{get(o){let a=n.get(o);if(a!==void 0)return a;if((a=r.get(o))!==void 0)return i(o,a),a},set(o,a){n.has(o)?n.set(o,a):i(o,a)}}},sL="!",Jae=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,i=t[0],o=t.length,a=u=>{const s=[];let l=0,c=0,d;for(let b=0;bc?d-c:void 0;return{modifiers:s,hasImportantModifier:v,baseClassName:g,maybePostfixModifierPosition:m}};return n?u=>n({className:u,parseClassName:a}):a},eue=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},tue=e=>({cache:Qae(e.cacheSize),parseClassName:Jae(e),...Kae(e)}),nue=/\s+/,rue=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i}=t,o=[],a=e.trim().split(nue);let u="";for(let s=a.length-1;s>=0;s-=1){const l=a[s],{modifiers:c,hasImportantModifier:d,baseClassName:h,maybePostfixModifierPosition:v}=n(l);let g=!!v,m=r(g?h.substring(0,v):h);if(!m){if(!g){u=l+(u.length>0?" "+u:u);continue}if(m=r(h),!m){u=l+(u.length>0?" "+u:u);continue}g=!1}const b=eue(c).join(":"),w=d?b+sL:b,x=w+m;if(o.includes(x))continue;o.push(x);const S=i(m,g);for(let A=0;A0?" "+u:u)}return u};function iue(){let e=0,t,n,r="";for(;e{if(typeof e=="string")return e;let t,n="";for(let r=0;rd(c),e());return n=tue(l),r=n.cache.get,i=n.cache.set,o=u,u(s)}function u(s){const l=r(s);if(l)return l;const c=rue(s,n);return i(s,c),c}return function(){return o(iue.apply(null,arguments))}}const Xn=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},cL=/^\[(?:([a-z-]+):)?(.+)\]$/i,aue=/^\d+\/\d+$/,uue=new Set(["px","full","screen"]),sue=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,lue=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,cue=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,fue=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,due=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Uu=e=>yd(e)||uue.has(e)||aue.test(e),Bs=e=>Eh(e,"length",xue),yd=e=>!!e&&!Number.isNaN(Number(e)),B_=e=>Eh(e,"number",yd),Sp=e=>!!e&&Number.isInteger(Number(e)),hue=e=>e.endsWith("%")&&yd(e.slice(0,-1)),Zt=e=>cL.test(e),zs=e=>sue.test(e),pue=new Set(["length","size","percentage"]),vue=e=>Eh(e,pue,fL),gue=e=>Eh(e,"position",fL),mue=new Set(["image","url"]),yue=e=>Eh(e,mue,_ue),bue=e=>Eh(e,"",wue),Cp=()=>!0,Eh=(e,t,n)=>{const r=cL.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},xue=e=>lue.test(e)&&!cue.test(e),fL=()=>!1,wue=e=>fue.test(e),_ue=e=>due.test(e),Sue=()=>{const e=Xn("colors"),t=Xn("spacing"),n=Xn("blur"),r=Xn("brightness"),i=Xn("borderColor"),o=Xn("borderRadius"),a=Xn("borderSpacing"),u=Xn("borderWidth"),s=Xn("contrast"),l=Xn("grayscale"),c=Xn("hueRotate"),d=Xn("invert"),h=Xn("gap"),v=Xn("gradientColorStops"),g=Xn("gradientColorStopPositions"),m=Xn("inset"),b=Xn("margin"),w=Xn("opacity"),x=Xn("padding"),S=Xn("saturate"),A=Xn("scale"),E=Xn("sepia"),C=Xn("skew"),T=Xn("space"),M=Xn("translate"),F=()=>["auto","contain","none"],U=()=>["auto","hidden","clip","visible","scroll"],H=()=>["auto",Zt,t],W=()=>[Zt,t],ie=()=>["",Uu,Bs],Z=()=>["auto",yd,Zt],G=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],K=()=>["solid","dashed","dotted","double","none"],V=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],B=()=>["start","end","center","between","around","evenly","stretch"],q=()=>["","0",Zt],Y=()=>["auto","avoid","all","avoid-page","page","left","right","column"],ue=()=>[yd,Zt];return{cacheSize:500,separator:":",theme:{colors:[Cp],spacing:[Uu,Bs],blur:["none","",zs,Zt],brightness:ue(),borderColor:[e],borderRadius:["none","","full",zs,Zt],borderSpacing:W(),borderWidth:ie(),contrast:ue(),grayscale:q(),hueRotate:ue(),invert:q(),gap:W(),gradientColorStops:[e],gradientColorStopPositions:[hue,Bs],inset:H(),margin:H(),opacity:ue(),padding:W(),saturate:ue(),scale:ue(),sepia:q(),skew:ue(),space:W(),translate:W()},classGroups:{aspect:[{aspect:["auto","square","video",Zt]}],container:["container"],columns:[{columns:[zs]}],"break-after":[{"break-after":Y()}],"break-before":[{"break-before":Y()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...G(),Zt]}],overflow:[{overflow:U()}],"overflow-x":[{"overflow-x":U()}],"overflow-y":[{"overflow-y":U()}],overscroll:[{overscroll:F()}],"overscroll-x":[{"overscroll-x":F()}],"overscroll-y":[{"overscroll-y":F()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Sp,Zt]}],basis:[{basis:H()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Zt]}],grow:[{grow:q()}],shrink:[{shrink:q()}],order:[{order:["first","last","none",Sp,Zt]}],"grid-cols":[{"grid-cols":[Cp]}],"col-start-end":[{col:["auto",{span:["full",Sp,Zt]},Zt]}],"col-start":[{"col-start":Z()}],"col-end":[{"col-end":Z()}],"grid-rows":[{"grid-rows":[Cp]}],"row-start-end":[{row:["auto",{span:[Sp,Zt]},Zt]}],"row-start":[{"row-start":Z()}],"row-end":[{"row-end":Z()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Zt]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Zt]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...B()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...B(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...B(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[x]}],px:[{px:[x]}],py:[{py:[x]}],ps:[{ps:[x]}],pe:[{pe:[x]}],pt:[{pt:[x]}],pr:[{pr:[x]}],pb:[{pb:[x]}],pl:[{pl:[x]}],m:[{m:[b]}],mx:[{mx:[b]}],my:[{my:[b]}],ms:[{ms:[b]}],me:[{me:[b]}],mt:[{mt:[b]}],mr:[{mr:[b]}],mb:[{mb:[b]}],ml:[{ml:[b]}],"space-x":[{"space-x":[T]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[T]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Zt,t]}],"min-w":[{"min-w":[Zt,t,"min","max","fit"]}],"max-w":[{"max-w":[Zt,t,"none","full","min","max","fit","prose",{screen:[zs]},zs]}],h:[{h:[Zt,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Zt,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Zt,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Zt,t,"auto","min","max","fit"]}],"font-size":[{text:["base",zs,Bs]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",B_]}],"font-family":[{font:[Cp]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Zt]}],"line-clamp":[{"line-clamp":["none",yd,B_]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Uu,Zt]}],"list-image":[{"list-image":["none",Zt]}],"list-style-type":[{list:["none","disc","decimal",Zt]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[w]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[w]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...K(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Uu,Bs]}],"underline-offset":[{"underline-offset":["auto",Uu,Zt]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:W()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Zt]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Zt]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[w]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...G(),gue]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",vue]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},yue]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[g]}],"gradient-via-pos":[{via:[g]}],"gradient-to-pos":[{to:[g]}],"gradient-from":[{from:[v]}],"gradient-via":[{via:[v]}],"gradient-to":[{to:[v]}],rounded:[{rounded:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-se":[{"rounded-se":[o]}],"rounded-ee":[{"rounded-ee":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"border-w":[{border:[u]}],"border-w-x":[{"border-x":[u]}],"border-w-y":[{"border-y":[u]}],"border-w-s":[{"border-s":[u]}],"border-w-e":[{"border-e":[u]}],"border-w-t":[{"border-t":[u]}],"border-w-r":[{"border-r":[u]}],"border-w-b":[{"border-b":[u]}],"border-w-l":[{"border-l":[u]}],"border-opacity":[{"border-opacity":[w]}],"border-style":[{border:[...K(),"hidden"]}],"divide-x":[{"divide-x":[u]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[u]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[w]}],"divide-style":[{divide:K()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...K()]}],"outline-offset":[{"outline-offset":[Uu,Zt]}],"outline-w":[{outline:[Uu,Bs]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:ie()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[w]}],"ring-offset-w":[{"ring-offset":[Uu,Bs]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",zs,bue]}],"shadow-color":[{shadow:[Cp]}],opacity:[{opacity:[w]}],"mix-blend":[{"mix-blend":[...V(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":V()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[s]}],"drop-shadow":[{"drop-shadow":["","none",zs,Zt]}],grayscale:[{grayscale:[l]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[d]}],saturate:[{saturate:[S]}],sepia:[{sepia:[E]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[s]}],"backdrop-grayscale":[{"backdrop-grayscale":[l]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[c]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[w]}],"backdrop-saturate":[{"backdrop-saturate":[S]}],"backdrop-sepia":[{"backdrop-sepia":[E]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Zt]}],duration:[{duration:ue()}],ease:[{ease:["linear","in","out","in-out",Zt]}],delay:[{delay:ue()}],animate:[{animate:["none","spin","ping","pulse","bounce",Zt]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[A]}],"scale-x":[{"scale-x":[A]}],"scale-y":[{"scale-y":[A]}],rotate:[{rotate:[Sp,Zt]}],"translate-x":[{"translate-x":[M]}],"translate-y":[{"translate-y":[M]}],"skew-x":[{"skew-x":[C]}],"skew-y":[{"skew-y":[C]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Zt]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Zt]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":W()}],"scroll-mx":[{"scroll-mx":W()}],"scroll-my":[{"scroll-my":W()}],"scroll-ms":[{"scroll-ms":W()}],"scroll-me":[{"scroll-me":W()}],"scroll-mt":[{"scroll-mt":W()}],"scroll-mr":[{"scroll-mr":W()}],"scroll-mb":[{"scroll-mb":W()}],"scroll-ml":[{"scroll-ml":W()}],"scroll-p":[{"scroll-p":W()}],"scroll-px":[{"scroll-px":W()}],"scroll-py":[{"scroll-py":W()}],"scroll-ps":[{"scroll-ps":W()}],"scroll-pe":[{"scroll-pe":W()}],"scroll-pt":[{"scroll-pt":W()}],"scroll-pr":[{"scroll-pr":W()}],"scroll-pb":[{"scroll-pb":W()}],"scroll-pl":[{"scroll-pl":W()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Zt]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Uu,Bs,B_]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},Zqe=oue(Sue);var dL={exports:{}},Cue="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",Eue=Cue,Aue=Eue;function hL(){}function pL(){}pL.resetWarningCache=hL;var Pue=function(){function e(r,i,o,a,u,s){if(s!==Aue){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:pL,resetWarningCache:hL};return n.PropTypes=n,n};dL.exports=Pue();var Oue=dL.exports;const Mt=Pn(Oue);var kue={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},Tue=Object.defineProperty,Mue=Object.defineProperties,Rue=Object.getOwnPropertyDescriptors,x1=Object.getOwnPropertySymbols,vL=Object.prototype.hasOwnProperty,gL=Object.prototype.propertyIsEnumerable,JT=(e,t,n)=>t in e?Tue(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,eM=(e,t)=>{for(var n in t||(t={}))vL.call(t,n)&&JT(e,n,t[n]);if(x1)for(var n of x1(t))gL.call(t,n)&&JT(e,n,t[n]);return e},Due=(e,t)=>Mue(e,Rue(t)),$ue=(e,t)=>{var n={};for(var r in e)vL.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&x1)for(var r of x1(e))t.indexOf(r)<0&&gL.call(e,r)&&(n[r]=e[r]);return n},Cn=(e,t,n)=>{const r=y.forwardRef((i,o)=>{var a=i,{color:u="currentColor",size:s=24,stroke:l=2,children:c}=a,d=$ue(a,["color","size","stroke","children"]);return y.createElement("svg",eM(Due(eM({ref:o},kue),{width:s,height:s,stroke:u,strokeWidth:l,className:`tabler-icon tabler-icon-${e}`}),d),[...n.map(([h,v])=>y.createElement(h,v)),...c||[]])});return r.propTypes={color:Mt.string,size:Mt.oneOfType([Mt.string,Mt.number]),stroke:Mt.oneOfType([Mt.string,Mt.number])},r.displayName=`${t}`,r},Xqe=Cn("adjustments","IconAdjustments",[["path",{d:"M4 10a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-0"}],["path",{d:"M6 4v4",key:"svg-1"}],["path",{d:"M6 12v8",key:"svg-2"}],["path",{d:"M10 16a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-3"}],["path",{d:"M12 4v10",key:"svg-4"}],["path",{d:"M12 18v2",key:"svg-5"}],["path",{d:"M16 7a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-6"}],["path",{d:"M18 4v1",key:"svg-7"}],["path",{d:"M18 9v11",key:"svg-8"}]]),Qqe=Cn("brand-telegram","IconBrandTelegram",[["path",{d:"M15 10l-4 4l6 6l4 -16l-18 7l4 2l2 6l3 -4",key:"svg-0"}]]),Jqe=Cn("building-store","IconBuildingStore",[["path",{d:"M3 21l18 0",key:"svg-0"}],["path",{d:"M3 7v1a3 3 0 0 0 6 0v-1m0 1a3 3 0 0 0 6 0v-1m0 1a3 3 0 0 0 6 0v-1h-18l2 -4h14l2 4",key:"svg-1"}],["path",{d:"M5 21l0 -10.15",key:"svg-2"}],["path",{d:"M19 21l0 -10.15",key:"svg-3"}],["path",{d:"M9 21v-4a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v4",key:"svg-4"}]]),eKe=Cn("building","IconBuilding",[["path",{d:"M3 21l18 0",key:"svg-0"}],["path",{d:"M9 8l1 0",key:"svg-1"}],["path",{d:"M9 12l1 0",key:"svg-2"}],["path",{d:"M9 16l1 0",key:"svg-3"}],["path",{d:"M14 8l1 0",key:"svg-4"}],["path",{d:"M14 12l1 0",key:"svg-5"}],["path",{d:"M14 16l1 0",key:"svg-6"}],["path",{d:"M5 21v-16a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v16",key:"svg-7"}]]),tKe=Cn("cash","IconCash",[["path",{d:"M7 9m0 2a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v6a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2z",key:"svg-0"}],["path",{d:"M14 14m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0",key:"svg-1"}],["path",{d:"M17 9v-2a2 2 0 0 0 -2 -2h-10a2 2 0 0 0 -2 2v6a2 2 0 0 0 2 2h2",key:"svg-2"}]]),nKe=Cn("chevron-down","IconChevronDown",[["path",{d:"M6 9l6 6l6 -6",key:"svg-0"}]]),rKe=Cn("chevrons-left","IconChevronsLeft",[["path",{d:"M11 7l-5 5l5 5",key:"svg-0"}],["path",{d:"M17 7l-5 5l5 5",key:"svg-1"}]]),iKe=Cn("copy","IconCopy",[["path",{d:"M7 7m0 2.667a2.667 2.667 0 0 1 2.667 -2.667h8.666a2.667 2.667 0 0 1 2.667 2.667v8.666a2.667 2.667 0 0 1 -2.667 2.667h-8.666a2.667 2.667 0 0 1 -2.667 -2.667z",key:"svg-0"}],["path",{d:"M4.012 16.737a2.005 2.005 0 0 1 -1.012 -1.737v-10c0 -1.1 .9 -2 2 -2h10c.75 0 1.158 .385 1.5 1",key:"svg-1"}]]),oKe=Cn("credit-card","IconCreditCard",[["path",{d:"M3 5m0 3a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v8a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3z",key:"svg-0"}],["path",{d:"M3 10l18 0",key:"svg-1"}],["path",{d:"M7 15l.01 0",key:"svg-2"}],["path",{d:"M11 15l2 0",key:"svg-3"}]]),aKe=Cn("dashboard","IconDashboard",[["path",{d:"M12 13m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0",key:"svg-0"}],["path",{d:"M13.45 11.55l2.05 -2.05",key:"svg-1"}],["path",{d:"M6.4 20a9 9 0 1 1 11.2 0z",key:"svg-2"}]]),uKe=Cn("device-desktop","IconDeviceDesktop",[["path",{d:"M3 5a1 1 0 0 1 1 -1h16a1 1 0 0 1 1 1v10a1 1 0 0 1 -1 1h-16a1 1 0 0 1 -1 -1v-10z",key:"svg-0"}],["path",{d:"M7 20h10",key:"svg-1"}],["path",{d:"M9 16v4",key:"svg-2"}],["path",{d:"M15 16v4",key:"svg-3"}]]),sKe=Cn("discount-check","IconDiscountCheck",[["path",{d:"M5 7.2a2.2 2.2 0 0 1 2.2 -2.2h1a2.2 2.2 0 0 0 1.55 -.64l.7 -.7a2.2 2.2 0 0 1 3.12 0l.7 .7c.412 .41 .97 .64 1.55 .64h1a2.2 2.2 0 0 1 2.2 2.2v1c0 .58 .23 1.138 .64 1.55l.7 .7a2.2 2.2 0 0 1 0 3.12l-.7 .7a2.2 2.2 0 0 0 -.64 1.55v1a2.2 2.2 0 0 1 -2.2 2.2h-1a2.2 2.2 0 0 0 -1.55 .64l-.7 .7a2.2 2.2 0 0 1 -3.12 0l-.7 -.7a2.2 2.2 0 0 0 -1.55 -.64h-1a2.2 2.2 0 0 1 -2.2 -2.2v-1a2.2 2.2 0 0 0 -.64 -1.55l-.7 -.7a2.2 2.2 0 0 1 0 -3.12l.7 -.7a2.2 2.2 0 0 0 .64 -1.55v-1",key:"svg-0"}],["path",{d:"M9 12l2 2l4 -4",key:"svg-1"}]]),lKe=Cn("eye-off","IconEyeOff",[["path",{d:"M10.585 10.587a2 2 0 0 0 2.829 2.828",key:"svg-0"}],["path",{d:"M16.681 16.673a8.717 8.717 0 0 1 -4.681 1.327c-3.6 0 -6.6 -2 -9 -6c1.272 -2.12 2.712 -3.678 4.32 -4.674m2.86 -1.146a9.055 9.055 0 0 1 1.82 -.18c3.6 0 6.6 2 9 6c-.666 1.11 -1.379 2.067 -2.138 2.87",key:"svg-1"}],["path",{d:"M3 3l18 18",key:"svg-2"}]]),cKe=Cn("eye","IconEye",[["path",{d:"M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-0"}],["path",{d:"M21 12c-2.4 4 -5.4 6 -9 6c-3.6 0 -6.6 -2 -9 -6c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6",key:"svg-1"}]]),fKe=Cn("file-text","IconFileText",[["path",{d:"M14 3v4a1 1 0 0 0 1 1h4",key:"svg-0"}],["path",{d:"M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z",key:"svg-1"}],["path",{d:"M9 9l1 0",key:"svg-2"}],["path",{d:"M9 13l6 0",key:"svg-3"}],["path",{d:"M9 17l6 0",key:"svg-4"}]]),dKe=Cn("loader-2","IconLoader2",[["path",{d:"M12 3a9 9 0 1 0 9 9",key:"svg-0"}]]),hKe=Cn("lock","IconLock",[["path",{d:"M5 13a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v6a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-6z",key:"svg-0"}],["path",{d:"M11 16a1 1 0 1 0 2 0a1 1 0 0 0 -2 0",key:"svg-1"}],["path",{d:"M8 11v-4a4 4 0 1 1 8 0v4",key:"svg-2"}]]),pKe=Cn("mail","IconMail",[["path",{d:"M3 7a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-10z",key:"svg-0"}],["path",{d:"M3 7l9 6l9 -6",key:"svg-1"}]]),vKe=Cn("menu-2","IconMenu2",[["path",{d:"M4 6l16 0",key:"svg-0"}],["path",{d:"M4 12l16 0",key:"svg-1"}],["path",{d:"M4 18l16 0",key:"svg-2"}]]),gKe=Cn("moon","IconMoon",[["path",{d:"M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454z",key:"svg-0"}]]),mKe=Cn("news","IconNews",[["path",{d:"M16 6h3a1 1 0 0 1 1 1v11a2 2 0 0 1 -4 0v-13a1 1 0 0 0 -1 -1h-10a1 1 0 0 0 -1 1v12a3 3 0 0 0 3 3h11",key:"svg-0"}],["path",{d:"M8 8l4 0",key:"svg-1"}],["path",{d:"M8 12l4 0",key:"svg-2"}],["path",{d:"M8 16l4 0",key:"svg-3"}]]),yKe=Cn("route","IconRoute",[["path",{d:"M3 19a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-0"}],["path",{d:"M19 7a2 2 0 1 0 0 -4a2 2 0 0 0 0 4z",key:"svg-1"}],["path",{d:"M11 19h5.5a3.5 3.5 0 0 0 0 -7h-8a3.5 3.5 0 0 1 0 -7h4.5",key:"svg-2"}]]),bKe=Cn("server-bolt","IconServerBolt",[["path",{d:"M3 4m0 3a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v2a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3z",key:"svg-0"}],["path",{d:"M15 20h-9a3 3 0 0 1 -3 -3v-2a3 3 0 0 1 3 -3h12",key:"svg-1"}],["path",{d:"M7 8v.01",key:"svg-2"}],["path",{d:"M7 16v.01",key:"svg-3"}],["path",{d:"M20 15l-2 3h3l-2 3",key:"svg-4"}]]),xKe=Cn("server","IconServer",[["path",{d:"M3 4m0 3a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v2a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3z",key:"svg-0"}],["path",{d:"M3 12m0 3a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v2a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3z",key:"svg-1"}],["path",{d:"M7 8l0 .01",key:"svg-2"}],["path",{d:"M7 16l0 .01",key:"svg-3"}]]),wKe=Cn("settings","IconSettings",[["path",{d:"M10.325 4.317c.426 -1.756 2.924 -1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543 -.94 3.31 .826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756 .426 1.756 2.924 0 3.35a1.724 1.724 0 0 0 -1.066 2.573c.94 1.543 -.826 3.31 -2.37 2.37a1.724 1.724 0 0 0 -2.572 1.065c-.426 1.756 -2.924 1.756 -3.35 0a1.724 1.724 0 0 0 -2.573 -1.066c-1.543 .94 -3.31 -.826 -2.37 -2.37a1.724 1.724 0 0 0 -1.065 -2.572c-1.756 -.426 -1.756 -2.924 0 -3.35a1.724 1.724 0 0 0 1.066 -2.573c-.94 -1.543 .826 -3.31 2.37 -2.37c1 .608 2.296 .07 2.572 -1.065z",key:"svg-0"}],["path",{d:"M9 12a3 3 0 1 0 6 0a3 3 0 0 0 -6 0",key:"svg-1"}]]),_Ke=Cn("sun","IconSun",[["path",{d:"M12 12m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0",key:"svg-0"}],["path",{d:"M3 12h1m8 -9v1m8 8h1m-9 8v1m-6.4 -15.4l.7 .7m12.1 -.7l-.7 .7m0 11.4l.7 .7m-12.1 -.7l-.7 .7",key:"svg-1"}]]),SKe=Cn("ticket","IconTicket",[["path",{d:"M15 5l0 2",key:"svg-0"}],["path",{d:"M15 11l0 2",key:"svg-1"}],["path",{d:"M15 17l0 2",key:"svg-2"}],["path",{d:"M5 5h14a2 2 0 0 1 2 2v3a2 2 0 0 0 0 4v3a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-3a2 2 0 0 0 0 -4v-3a2 2 0 0 1 2 -2",key:"svg-3"}]]),CKe=Cn("user-circle","IconUserCircle",[["path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",key:"svg-0"}],["path",{d:"M12 10m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0",key:"svg-1"}],["path",{d:"M6.168 18.849a4 4 0 0 1 3.832 -2.849h4a4 4 0 0 1 3.834 2.855",key:"svg-2"}]]),EKe=Cn("user","IconUser",[["path",{d:"M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0",key:"svg-0"}],["path",{d:"M6 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2",key:"svg-1"}]]),AKe=Cn("users","IconUsers",[["path",{d:"M9 7m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0",key:"svg-0"}],["path",{d:"M3 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2",key:"svg-1"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"svg-2"}],["path",{d:"M21 21v-2a4 4 0 0 0 -3 -3.85",key:"svg-3"}]]),PKe=Cn("x","IconX",[["path",{d:"M18 6l-12 12",key:"svg-0"}],["path",{d:"M6 6l12 12",key:"svg-1"}]]);function fi(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var Iue=typeof Symbol=="function"&&Symbol.observable||"@@observable",tM=Iue,z_=()=>Math.random().toString(36).substring(7).split("").join("."),Nue={INIT:`@@redux/INIT${z_()}`,REPLACE:`@@redux/REPLACE${z_()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${z_()}`},w1=Nue;function iA(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function mL(e,t,n){if(typeof e!="function")throw new Error(fi(2));if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(fi(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(fi(1));return n(mL)(e,t)}let r=e,i=t,o=new Map,a=o,u=0,s=!1;function l(){a===o&&(a=new Map,o.forEach((b,w)=>{a.set(w,b)}))}function c(){if(s)throw new Error(fi(3));return i}function d(b){if(typeof b!="function")throw new Error(fi(4));if(s)throw new Error(fi(5));let w=!0;l();const x=u++;return a.set(x,b),function(){if(w){if(s)throw new Error(fi(6));w=!1,l(),a.delete(x),o=null}}}function h(b){if(!iA(b))throw new Error(fi(7));if(typeof b.type>"u")throw new Error(fi(8));if(typeof b.type!="string")throw new Error(fi(17));if(s)throw new Error(fi(9));try{s=!0,i=r(i,b)}finally{s=!1}return(o=a).forEach(x=>{x()}),b}function v(b){if(typeof b!="function")throw new Error(fi(10));r=b,h({type:w1.REPLACE})}function g(){const b=d;return{subscribe(w){if(typeof w!="object"||w===null)throw new Error(fi(11));function x(){const A=w;A.next&&A.next(c())}return x(),{unsubscribe:b(x)}},[tM](){return this}}}return h({type:w1.INIT}),{dispatch:h,subscribe:d,getState:c,replaceReducer:v,[tM]:g}}function Fue(e){Object.keys(e).forEach(t=>{const n=e[t];if(typeof n(void 0,{type:w1.INIT})>"u")throw new Error(fi(12));if(typeof n(void 0,{type:w1.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(fi(13))})}function Lue(e){const t=Object.keys(e),n={};for(let o=0;o"u")throw u&&u.type,new Error(fi(14));l[d]=g,s=s||g!==v}return s=s||r.length!==Object.keys(a).length,s?l:a}}function _1(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function jue(...e){return t=>(n,r)=>{const i=t(n,r);let o=()=>{throw new Error(fi(15))};const a={getState:i.getState,dispatch:(s,...l)=>o(s,...l)},u=e.map(s=>s(a));return o=_1(...u)(i.dispatch),{...i,dispatch:o}}}function Bue(e){return iA(e)&&"type"in e&&typeof e.type=="string"}var yL=Symbol.for("immer-nothing"),nM=Symbol.for("immer-draftable"),jo=Symbol.for("immer-state");function Na(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var jd=Object.getPrototypeOf;function Lc(e){return!!e&&!!e[jo]}function ps(e){return e?bL(e)||Array.isArray(e)||!!e[nM]||!!e.constructor?.[nM]||Px(e)||Ox(e):!1}var zue=Object.prototype.constructor.toString();function bL(e){if(!e||typeof e!="object")return!1;const t=jd(e);if(t===null)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===zue}function S1(e,t){Ax(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function Ax(e){const t=e[jo];return t?t.type_:Array.isArray(e)?1:Px(e)?2:Ox(e)?3:0}function gC(e,t){return Ax(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function xL(e,t,n){const r=Ax(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function Uue(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Px(e){return e instanceof Map}function Ox(e){return e instanceof Set}function oc(e){return e.copy_||e.base_}function mC(e,t){if(Px(e))return new Map(e);if(Ox(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);if(!t&&bL(e))return jd(e)?{...e}:Object.assign(Object.create(null),e);const n=Object.getOwnPropertyDescriptors(e);delete n[jo];let r=Reflect.ownKeys(n);for(let i=0;i1&&(e.set=e.add=e.clear=e.delete=Wue),Object.freeze(e),t&&Object.entries(e).forEach(([n,r])=>oA(r,!0))),e}function Wue(){Na(2)}function kx(e){return Object.isFrozen(e)}var Vue={};function jc(e){const t=Vue[e];return t||Na(0,e),t}var j0;function wL(){return j0}function Hue(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function rM(e,t){t&&(jc("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function yC(e){bC(e),e.drafts_.forEach(que),e.drafts_=null}function bC(e){e===j0&&(j0=e.parent_)}function iM(e){return j0=Hue(j0,e)}function que(e){const t=e[jo];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function oM(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[jo].modified_&&(yC(t),Na(4)),ps(e)&&(e=C1(t,e),t.parent_||E1(t,e)),t.patches_&&jc("Patches").generateReplacementPatches_(n[jo].base_,e,t.patches_,t.inversePatches_)):e=C1(t,n,[]),yC(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==yL?e:void 0}function C1(e,t,n){if(kx(t))return t;const r=t[jo];if(!r)return S1(t,(i,o)=>aM(e,r,t,i,o,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return E1(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const i=r.copy_;let o=i,a=!1;r.type_===3&&(o=new Set(i),i.clear(),a=!0),S1(o,(u,s)=>aM(e,r,i,u,s,n,a)),E1(e,i,!1),n&&e.patches_&&jc("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function aM(e,t,n,r,i,o,a){if(Lc(i)){const u=o&&t&&t.type_!==3&&!gC(t.assigned_,r)?o.concat(r):void 0,s=C1(e,i,u);if(xL(n,r,s),Lc(s))e.canAutoFreeze_=!1;else return}else a&&n.add(i);if(ps(i)&&!kx(i)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;C1(e,i),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&E1(e,i)}}function E1(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&oA(t,n)}function Kue(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:wL(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=r,o=aA;n&&(i=[r],o=B0);const{revoke:a,proxy:u}=Proxy.revocable(i,o);return r.draft_=u,r.revoke_=a,u}var aA={get(e,t){if(t===jo)return e;const n=oc(e);if(!gC(n,t))return Gue(e,n,t);const r=n[t];return e.finalized_||!ps(r)?r:r===U_(e.base_,t)?(W_(e),e.copy_[t]=wC(r,e)):r},has(e,t){return t in oc(e)},ownKeys(e){return Reflect.ownKeys(oc(e))},set(e,t,n){const r=_L(oc(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const i=U_(oc(e),t),o=i?.[jo];if(o&&o.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(Uue(n,i)&&(n!==void 0||gC(e.base_,t)))return!0;W_(e),xC(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return U_(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,W_(e),xC(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=oc(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){Na(11)},getPrototypeOf(e){return jd(e.base_)},setPrototypeOf(){Na(12)}},B0={};S1(aA,(e,t)=>{B0[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});B0.deleteProperty=function(e,t){return B0.set.call(this,e,t,void 0)};B0.set=function(e,t,n){return aA.set.call(this,e[0],t,n,e[0])};function U_(e,t){const n=e[jo];return(n?oc(n):e)[t]}function Gue(e,t,n){const r=_L(t,n);return r?"value"in r?r.value:r.get?.call(e.draft_):void 0}function _L(e,t){if(!(t in e))return;let n=jd(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=jd(n)}}function xC(e){e.modified_||(e.modified_=!0,e.parent_&&xC(e.parent_))}function W_(e){e.copy_||(e.copy_=mC(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Yue=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const o=n;n=t;const a=this;return function(s=o,...l){return a.produce(s,c=>n.call(this,c,...l))}}typeof n!="function"&&Na(6),r!==void 0&&typeof r!="function"&&Na(7);let i;if(ps(t)){const o=iM(this),a=wC(t,void 0);let u=!0;try{i=n(a),u=!1}finally{u?yC(o):bC(o)}return rM(o,r),oM(i,o)}else if(!t||typeof t!="object"){if(i=n(t),i===void 0&&(i=t),i===yL&&(i=void 0),this.autoFreeze_&&oA(i,!0),r){const o=[],a=[];jc("Patches").generateReplacementPatches_(t,i,o,a),r(o,a)}return i}else Na(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(a,...u)=>this.produceWithPatches(a,s=>t(s,...u));let r,i;return[this.produce(t,n,(a,u)=>{r=a,i=u}),r,i]},typeof e?.autoFreeze=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof e?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){ps(e)||Na(8),Lc(e)&&(e=Zue(e));const t=iM(this),n=wC(e,void 0);return n[jo].isManual_=!0,bC(t),n}finishDraft(e,t){const n=e&&e[jo];(!n||!n.isManual_)&&Na(9);const{scope_:r}=n;return rM(r,t),oM(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const i=t[n];if(i.path.length===0&&i.op==="replace"){e=i.value;break}}n>-1&&(t=t.slice(n+1));const r=jc("Patches").applyPatches_;return Lc(e)?r(e,t):this.produce(e,i=>r(i,t))}};function wC(e,t){const n=Px(e)?jc("MapSet").proxyMap_(e,t):Ox(e)?jc("MapSet").proxySet_(e,t):Kue(e,t);return(t?t.scope_:wL()).drafts_.push(n),n}function Zue(e){return Lc(e)||Na(10,e),SL(e)}function SL(e){if(!ps(e)||kx(e))return e;const t=e[jo];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=mC(e,t.scope_.immer_.useStrictShallowCopy_)}else n=mC(e,!0);return S1(n,(r,i)=>{xL(n,r,SL(i))}),t&&(t.finalized_=!1),n}var Bo=new Yue,CL=Bo.produce;Bo.produceWithPatches.bind(Bo);Bo.setAutoFreeze.bind(Bo);Bo.setUseStrictShallowCopy.bind(Bo);Bo.applyPatches.bind(Bo);Bo.createDraft.bind(Bo);Bo.finishDraft.bind(Bo);function Xue(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function Que(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function Jue(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var uM=e=>Array.isArray(e)?e:[e];function ese(e){const t=Array.isArray(e[0])?e[0]:e;return Jue(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function tse(e,t){const n=[],{length:r}=e;for(let i=0;i{n=Bm(),a.resetResultsCount()},a.resultsCount=()=>o,a.resetResultsCount=()=>{o=0},a}function ose(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...i)=>{let o=0,a=0,u,s={},l=i.pop();typeof l=="object"&&(s=l,l=i.pop()),Xue(l,`createSelector expects an output function after the inputs, but received: [${typeof l}]`);const c={...n,...s},{memoize:d,memoizeOptions:h=[],argsMemoize:v=EL,argsMemoizeOptions:g=[],devModeChecks:m={}}=c,b=uM(h),w=uM(g),x=ese(i),S=d(function(){return o++,l.apply(null,arguments)},...b),A=v(function(){a++;const C=tse(x,arguments);return u=S.apply(null,C),u},...w);return Object.assign(A,{resultFunc:l,memoizedResultFunc:S,dependencies:x,dependencyRecomputations:()=>a,resetDependencyRecomputations:()=>{a=0},lastResult:()=>u,recomputations:()=>o,resetRecomputations:()=>{o=0},memoize:d,argsMemoize:v})};return Object.assign(r,{withTypes:()=>r}),r}var ase=ose(EL),use=Object.assign((e,t=ase)=>{Que(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const n=Object.keys(e),r=n.map(o=>e[o]);return t(r,(...o)=>o.reduce((a,u,s)=>(a[n[s]]=u,a),{}))},{withTypes:()=>use});function AL(e){return({dispatch:n,getState:r})=>i=>o=>typeof o=="function"?o(n,r,e):i(o)}var sse=AL(),lse=AL,cse=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?_1:_1.apply(null,arguments)},fse=e=>e&&typeof e.match=="function";function s0(e,t){function n(...r){if(t){let i=t(...r);if(!i)throw new Error(as(0));return{type:e,payload:i.payload,..."meta"in i&&{meta:i.meta},..."error"in i&&{error:i.error}}}return{type:e,payload:r[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=r=>Bue(r)&&r.type===e,n}var PL=class Kp extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,Kp.prototype)}static get[Symbol.species](){return Kp}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Kp(...t[0].concat(this)):new Kp(...t.concat(this))}};function lM(e){return ps(e)?CL(e,()=>{}):e}function cM(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}function dse(e){return typeof e=="boolean"}var hse=()=>function(t){const{thunk:n=!0,immutableCheck:r=!0,serializableCheck:i=!0,actionCreatorCheck:o=!0}=t??{};let a=new PL;return n&&(dse(n)?a.push(sse):a.push(lse(n.extraArgument))),a},pse="RTK_autoBatch",fM=e=>t=>{setTimeout(t,e)},vse=(e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let i=!0,o=!1,a=!1;const u=new Set,s=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:fM(10):e.type==="callback"?e.queueNotification:fM(e.timeout),l=()=>{a=!1,o&&(o=!1,u.forEach(c=>c()))};return Object.assign({},r,{subscribe(c){const d=()=>i&&c(),h=r.subscribe(d);return u.add(c),()=>{h(),u.delete(c)}},dispatch(c){try{return i=!c?.meta?.[pse],o=!i,o&&(a||(a=!0,s(l))),r.dispatch(c)}finally{i=!0}}})},gse=e=>function(n){const{autoBatch:r=!0}=n??{};let i=new PL(e);return r&&i.push(vse(typeof r=="object"?r:void 0)),i};function OKe(e){const t=hse(),{reducer:n=void 0,middleware:r,devTools:i=!0,preloadedState:o=void 0,enhancers:a=void 0}=e;let u;if(typeof n=="function")u=n;else if(iA(n))u=Lue(n);else throw new Error(as(1));let s;typeof r=="function"?s=r(t):s=t();let l=_1;i&&(l=cse({trace:!1,...typeof i=="object"&&i}));const c=jue(...s),d=gse(c);let h=typeof a=="function"?a(d):d();const v=l(...h);return mL(u,o,v)}function OL(e){const t={},n=[];let r;const i={addCase(o,a){const u=typeof o=="string"?o:o.type;if(!u)throw new Error(as(28));if(u in t)throw new Error(as(29));return t[u]=a,i},addMatcher(o,a){return n.push({matcher:o,reducer:a}),i},addDefaultCase(o){return r=o,i}};return e(i),[t,n,r]}function mse(e){return typeof e=="function"}function yse(e,t){let[n,r,i]=OL(t),o;if(mse(e))o=()=>lM(e());else{const u=lM(e);o=()=>u}function a(u=o(),s){let l=[n[s.type],...r.filter(({matcher:c})=>c(s)).map(({reducer:c})=>c)];return l.filter(c=>!!c).length===0&&(l=[i]),l.reduce((c,d)=>{if(d)if(Lc(c)){const v=d(c,s);return v===void 0?c:v}else{if(ps(c))return CL(c,h=>d(h,s));{const h=d(c,s);if(h===void 0){if(c===null)return c;throw Error("A case reducer on a non-draftable value must not return undefined")}return h}}return c},u)}return a.getInitialState=o,a}var bse=(e,t)=>fse(e)?e.match(t):e(t);function xse(...e){return t=>e.some(n=>bse(n,t))}var wse="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",_se=(e=21)=>{let t="",n=e;for(;n--;)t+=wse[Math.random()*64|0];return t},Sse=["name","message","stack","code"],V_=class{constructor(e,t){this.payload=e,this.meta=t}_type},dM=class{constructor(e,t){this.payload=e,this.meta=t}_type},Cse=e=>{if(typeof e=="object"&&e!==null){const t={};for(const n of Sse)typeof e[n]=="string"&&(t[n]=e[n]);return t}return{message:String(e)}},kKe=(()=>{function e(t,n,r){const i=s0(t+"/fulfilled",(s,l,c,d)=>({payload:s,meta:{...d||{},arg:c,requestId:l,requestStatus:"fulfilled"}})),o=s0(t+"/pending",(s,l,c)=>({payload:void 0,meta:{...c||{},arg:l,requestId:s,requestStatus:"pending"}})),a=s0(t+"/rejected",(s,l,c,d,h)=>({payload:d,error:(r&&r.serializeError||Cse)(s||"Rejected"),meta:{...h||{},arg:c,requestId:l,rejectedWithValue:!!d,requestStatus:"rejected",aborted:s?.name==="AbortError",condition:s?.name==="ConditionError"}}));function u(s){return(l,c,d)=>{const h=r?.idGenerator?r.idGenerator(s):_se(),v=new AbortController;let g,m;function b(x){m=x,v.abort()}const w=async function(){let x;try{let A=r?.condition?.(s,{getState:c,extra:d});if(Ase(A)&&(A=await A),A===!1||v.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};const E=new Promise((C,T)=>{g=()=>{T({name:"AbortError",message:m||"Aborted"})},v.signal.addEventListener("abort",g)});l(o(h,s,r?.getPendingMeta?.({requestId:h,arg:s},{getState:c,extra:d}))),x=await Promise.race([E,Promise.resolve(n(s,{dispatch:l,getState:c,extra:d,requestId:h,signal:v.signal,abort:b,rejectWithValue:(C,T)=>new V_(C,T),fulfillWithValue:(C,T)=>new dM(C,T)})).then(C=>{if(C instanceof V_)throw C;return C instanceof dM?i(C.payload,h,s,C.meta):i(C,h,s)})])}catch(A){x=A instanceof V_?a(null,h,s,A.payload,A.meta):a(A,h,s)}finally{g&&v.signal.removeEventListener("abort",g)}return r&&!r.dispatchConditionRejection&&a.match(x)&&x.meta.condition||l(x),x}();return Object.assign(w,{abort:b,requestId:h,arg:s,unwrap(){return w.then(Ese)}})}}return Object.assign(u,{pending:o,rejected:a,fulfilled:i,settled:xse(a,i),typePrefix:t})}return e.withTypes=()=>e,e})();function Ese(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function Ase(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var Pse=Symbol.for("rtk-slice-createasyncthunk");function Ose(e,t){return`${e}/${t}`}function kse({creators:e}={}){const t=e?.asyncThunk?.[Pse];return function(r){const{name:i,reducerPath:o=i}=r;if(!i)throw new Error(as(11));const a=(typeof r.reducers=="function"?r.reducers(Mse()):r.reducers)||{},u=Object.keys(a),s={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},l={addCase(x,S){const A=typeof x=="string"?x:x.type;if(!A)throw new Error(as(12));if(A in s.sliceCaseReducersByType)throw new Error(as(13));return s.sliceCaseReducersByType[A]=S,l},addMatcher(x,S){return s.sliceMatchers.push({matcher:x,reducer:S}),l},exposeAction(x,S){return s.actionCreators[x]=S,l},exposeCaseReducer(x,S){return s.sliceCaseReducersByName[x]=S,l}};u.forEach(x=>{const S=a[x],A={reducerName:x,type:Ose(i,x),createNotation:typeof r.reducers=="function"};Dse(S)?Ise(A,S,l,t):Rse(A,S,l)});function c(){const[x={},S=[],A=void 0]=typeof r.extraReducers=="function"?OL(r.extraReducers):[r.extraReducers],E={...x,...s.sliceCaseReducersByType};return yse(r.initialState,C=>{for(let T in E)C.addCase(T,E[T]);for(let T of s.sliceMatchers)C.addMatcher(T.matcher,T.reducer);for(let T of S)C.addMatcher(T.matcher,T.reducer);A&&C.addDefaultCase(A)})}const d=x=>x,h=new Map;let v;function g(x,S){return v||(v=c()),v(x,S)}function m(){return v||(v=c()),v.getInitialState()}function b(x,S=!1){function A(C){let T=C[x];return typeof T>"u"&&S&&(T=m()),T}function E(C=d){const T=cM(h,S,()=>new WeakMap);return cM(T,C,()=>{const M={};for(const[F,U]of Object.entries(r.selectors??{}))M[F]=Tse(U,C,m,S);return M})}return{reducerPath:x,getSelectors:E,get selectors(){return E(A)},selectSlice:A}}const w={name:i,reducer:g,actions:s.actionCreators,caseReducers:s.sliceCaseReducersByName,getInitialState:m,...b(o),injectInto(x,{reducerPath:S,...A}={}){const E=S??o;return x.inject({reducerPath:E,reducer:g},A),{...w,...b(E,!0)}}};return w}}function Tse(e,t,n,r){function i(o,...a){let u=t(o);return typeof u>"u"&&r&&(u=n()),e(u,...a)}return i.unwrapped=e,i}var TKe=kse();function Mse(){function e(t,n){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...n}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...n){return t(...n)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,n){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:n}},asyncThunk:e}}function Rse({type:e,reducerName:t,createNotation:n},r,i){let o,a;if("reducer"in r){if(n&&!$se(r))throw new Error(as(17));o=r.reducer,a=r.prepare}else o=r;i.addCase(e,o).exposeCaseReducer(t,o).exposeAction(t,a?s0(e,a):s0(e))}function Dse(e){return e._reducerDefinitionType==="asyncThunk"}function $se(e){return e._reducerDefinitionType==="reducerWithPrepare"}function Ise({type:e,reducerName:t},n,r,i){if(!i)throw new Error(as(18));const{payloadCreator:o,fulfilled:a,pending:u,rejected:s,settled:l,options:c}=n,d=i(e,o,c);r.exposeAction(t,d),a&&r.addCase(d.fulfilled,a),u&&r.addCase(d.pending,u),s&&r.addCase(d.rejected,s),l&&r.addMatcher(d.settled,l),r.exposeCaseReducer(t,{fulfilled:a||zm,pending:u||zm,rejected:s||zm,settled:l||zm})}function zm(){}function as(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}function kL(e,t){return function(){return e.apply(t,arguments)}}const{toString:Nse}=Object.prototype,{getPrototypeOf:uA}=Object,Tx=(e=>t=>{const n=Nse.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Ja=e=>(e=e.toLowerCase(),t=>Tx(t)===e),Mx=e=>t=>typeof t===e,{isArray:Ah}=Array,z0=Mx("undefined");function Fse(e){return e!==null&&!z0(e)&&e.constructor!==null&&!z0(e.constructor)&&$o(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const TL=Ja("ArrayBuffer");function Lse(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&TL(e.buffer),t}const jse=Mx("string"),$o=Mx("function"),ML=Mx("number"),Rx=e=>e!==null&&typeof e=="object",Bse=e=>e===!0||e===!1,$y=e=>{if(Tx(e)!=="object")return!1;const t=uA(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},zse=Ja("Date"),Use=Ja("File"),Wse=Ja("Blob"),Vse=Ja("FileList"),Hse=e=>Rx(e)&&$o(e.pipe),qse=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||$o(e.append)&&((t=Tx(e))==="formdata"||t==="object"&&$o(e.toString)&&e.toString()==="[object FormData]"))},Kse=Ja("URLSearchParams"),[Gse,Yse,Zse,Xse]=["ReadableStream","Request","Response","Headers"].map(Ja),Qse=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function og(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),Ah(e))for(r=0,i=e.length;r0;)if(i=n[r],t===i.toLowerCase())return i;return null}const mc=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,DL=e=>!z0(e)&&e!==mc;function _C(){const{caseless:e}=DL(this)&&this||{},t={},n=(r,i)=>{const o=e&&RL(t,i)||i;$y(t[o])&&$y(r)?t[o]=_C(t[o],r):$y(r)?t[o]=_C({},r):Ah(r)?t[o]=r.slice():t[o]=r};for(let r=0,i=arguments.length;r(og(t,(i,o)=>{n&&$o(i)?e[o]=kL(i,n):e[o]=i},{allOwnKeys:r}),e),ele=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),tle=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},nle=(e,t,n,r)=>{let i,o,a;const u={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-- >0;)a=i[o],(!r||r(a,e,t))&&!u[a]&&(t[a]=e[a],u[a]=!0);e=n!==!1&&uA(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},rle=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},ile=e=>{if(!e)return null;if(Ah(e))return e;let t=e.length;if(!ML(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},ole=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&uA(Uint8Array)),ale=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let i;for(;(i=r.next())&&!i.done;){const o=i.value;t.call(e,o[0],o[1])}},ule=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},sle=Ja("HTMLFormElement"),lle=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),hM=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),cle=Ja("RegExp"),$L=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};og(n,(i,o)=>{let a;(a=t(i,o,e))!==!1&&(r[o]=a||i)}),Object.defineProperties(e,r)},fle=e=>{$L(e,(t,n)=>{if($o(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if($o(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},dle=(e,t)=>{const n={},r=i=>{i.forEach(o=>{n[o]=!0})};return Ah(e)?r(e):r(String(e).split(t)),n},hle=()=>{},ple=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,H_="abcdefghijklmnopqrstuvwxyz",pM="0123456789",IL={DIGIT:pM,ALPHA:H_,ALPHA_DIGIT:H_+H_.toUpperCase()+pM},vle=(e=16,t=IL.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function gle(e){return!!(e&&$o(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const mle=e=>{const t=new Array(10),n=(r,i)=>{if(Rx(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[i]=r;const o=Ah(r)?[]:{};return og(r,(a,u)=>{const s=n(a,i+1);!z0(s)&&(o[u]=s)}),t[i]=void 0,o}}return r};return n(e,0)},yle=Ja("AsyncFunction"),ble=e=>e&&(Rx(e)||$o(e))&&$o(e.then)&&$o(e.catch),NL=((e,t)=>e?setImmediate:t?((n,r)=>(mc.addEventListener("message",({source:i,data:o})=>{i===mc&&o===n&&r.length&&r.shift()()},!1),i=>{r.push(i),mc.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",$o(mc.postMessage)),xle=typeof queueMicrotask<"u"?queueMicrotask.bind(mc):typeof process<"u"&&process.nextTick||NL,_e={isArray:Ah,isArrayBuffer:TL,isBuffer:Fse,isFormData:qse,isArrayBufferView:Lse,isString:jse,isNumber:ML,isBoolean:Bse,isObject:Rx,isPlainObject:$y,isReadableStream:Gse,isRequest:Yse,isResponse:Zse,isHeaders:Xse,isUndefined:z0,isDate:zse,isFile:Use,isBlob:Wse,isRegExp:cle,isFunction:$o,isStream:Hse,isURLSearchParams:Kse,isTypedArray:ole,isFileList:Vse,forEach:og,merge:_C,extend:Jse,trim:Qse,stripBOM:ele,inherits:tle,toFlatObject:nle,kindOf:Tx,kindOfTest:Ja,endsWith:rle,toArray:ile,forEachEntry:ale,matchAll:ule,isHTMLForm:sle,hasOwnProperty:hM,hasOwnProp:hM,reduceDescriptors:$L,freezeMethods:fle,toObjectSet:dle,toCamelCase:lle,noop:hle,toFiniteNumber:ple,findKey:RL,global:mc,isContextDefined:DL,ALPHABET:IL,generateString:vle,isSpecCompliantForm:gle,toJSONObject:mle,isAsyncFn:yle,isThenable:ble,setImmediate:NL,asap:xle};function Ht(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status?i.status:null)}_e.inherits(Ht,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:_e.toJSONObject(this.config),code:this.code,status:this.status}}});const FL=Ht.prototype,LL={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{LL[e]={value:e}});Object.defineProperties(Ht,LL);Object.defineProperty(FL,"isAxiosError",{value:!0});Ht.from=(e,t,n,r,i,o)=>{const a=Object.create(FL);return _e.toFlatObject(e,a,function(s){return s!==Error.prototype},u=>u!=="isAxiosError"),Ht.call(a,e.message,t,n,r,i),a.cause=e,a.name=e.name,o&&Object.assign(a,o),a};const wle=null;function SC(e){return _e.isPlainObject(e)||_e.isArray(e)}function jL(e){return _e.endsWith(e,"[]")?e.slice(0,-2):e}function vM(e,t,n){return e?e.concat(t).map(function(i,o){return i=jL(i),!n&&o?"["+i+"]":i}).join(n?".":""):t}function _le(e){return _e.isArray(e)&&!e.some(SC)}const Sle=_e.toFlatObject(_e,{},null,function(t){return/^is[A-Z]/.test(t)});function Dx(e,t,n){if(!_e.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=_e.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,b){return!_e.isUndefined(b[m])});const r=n.metaTokens,i=n.visitor||c,o=n.dots,a=n.indexes,s=(n.Blob||typeof Blob<"u"&&Blob)&&_e.isSpecCompliantForm(t);if(!_e.isFunction(i))throw new TypeError("visitor must be a function");function l(g){if(g===null)return"";if(_e.isDate(g))return g.toISOString();if(!s&&_e.isBlob(g))throw new Ht("Blob is not supported. Use a Buffer instead.");return _e.isArrayBuffer(g)||_e.isTypedArray(g)?s&&typeof Blob=="function"?new Blob([g]):Buffer.from(g):g}function c(g,m,b){let w=g;if(g&&!b&&typeof g=="object"){if(_e.endsWith(m,"{}"))m=r?m:m.slice(0,-2),g=JSON.stringify(g);else if(_e.isArray(g)&&_le(g)||(_e.isFileList(g)||_e.endsWith(m,"[]"))&&(w=_e.toArray(g)))return m=jL(m),w.forEach(function(S,A){!(_e.isUndefined(S)||S===null)&&t.append(a===!0?vM([m],A,o):a===null?m:m+"[]",l(S))}),!1}return SC(g)?!0:(t.append(vM(b,m,o),l(g)),!1)}const d=[],h=Object.assign(Sle,{defaultVisitor:c,convertValue:l,isVisitable:SC});function v(g,m){if(!_e.isUndefined(g)){if(d.indexOf(g)!==-1)throw Error("Circular reference detected in "+m.join("."));d.push(g),_e.forEach(g,function(w,x){(!(_e.isUndefined(w)||w===null)&&i.call(t,w,_e.isString(x)?x.trim():x,m,h))===!0&&v(w,m?m.concat(x):[x])}),d.pop()}}if(!_e.isObject(e))throw new TypeError("data must be an object");return v(e),t}function gM(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function sA(e,t){this._pairs=[],e&&Dx(e,this,t)}const BL=sA.prototype;BL.append=function(t,n){this._pairs.push([t,n])};BL.toString=function(t){const n=t?function(r){return t.call(this,r,gM)}:gM;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function Cle(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function zL(e,t,n){if(!t)return e;const r=n&&n.encode||Cle;_e.isFunction(n)&&(n={serialize:n});const i=n&&n.serialize;let o;if(i?o=i(t,n):o=_e.isURLSearchParams(t)?t.toString():new sA(t,n).toString(r),o){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class mM{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){_e.forEach(this.handlers,function(r){r!==null&&t(r)})}}const UL={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Ele=typeof URLSearchParams<"u"?URLSearchParams:sA,Ale=typeof FormData<"u"?FormData:null,Ple=typeof Blob<"u"?Blob:null,Ole={isBrowser:!0,classes:{URLSearchParams:Ele,FormData:Ale,Blob:Ple},protocols:["http","https","file","blob","url","data"]},lA=typeof window<"u"&&typeof document<"u",CC=typeof navigator=="object"&&navigator||void 0,kle=lA&&(!CC||["ReactNative","NativeScript","NS"].indexOf(CC.product)<0),Tle=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Mle=lA&&window.location.href||"http://localhost",Rle=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:lA,hasStandardBrowserEnv:kle,hasStandardBrowserWebWorkerEnv:Tle,navigator:CC,origin:Mle},Symbol.toStringTag,{value:"Module"})),Mi={...Rle,...Ole};function Dle(e,t){return Dx(e,new Mi.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,o){return Mi.isNode&&_e.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},t))}function $le(e){return _e.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Ile(e){const t={},n=Object.keys(e);let r;const i=n.length;let o;for(r=0;r=n.length;return a=!a&&_e.isArray(i)?i.length:a,s?(_e.hasOwnProp(i,a)?i[a]=[i[a],r]:i[a]=r,!u):((!i[a]||!_e.isObject(i[a]))&&(i[a]=[]),t(n,r,i[a],o)&&_e.isArray(i[a])&&(i[a]=Ile(i[a])),!u)}if(_e.isFormData(e)&&_e.isFunction(e.entries)){const n={};return _e.forEachEntry(e,(r,i)=>{t($le(r),i,n,0)}),n}return null}function Nle(e,t,n){if(_e.isString(e))try{return(t||JSON.parse)(e),_e.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(0,JSON.stringify)(e)}const ag={transitional:UL,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,o=_e.isObject(t);if(o&&_e.isHTMLForm(t)&&(t=new FormData(t)),_e.isFormData(t))return i?JSON.stringify(WL(t)):t;if(_e.isArrayBuffer(t)||_e.isBuffer(t)||_e.isStream(t)||_e.isFile(t)||_e.isBlob(t)||_e.isReadableStream(t))return t;if(_e.isArrayBufferView(t))return t.buffer;if(_e.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let u;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Dle(t,this.formSerializer).toString();if((u=_e.isFileList(t))||r.indexOf("multipart/form-data")>-1){const s=this.env&&this.env.FormData;return Dx(u?{"files[]":t}:t,s&&new s,this.formSerializer)}}return o||i?(n.setContentType("application/json",!1),Nle(t)):t}],transformResponse:[function(t){const n=this.transitional||ag.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(_e.isResponse(t)||_e.isReadableStream(t))return t;if(t&&_e.isString(t)&&(r&&!this.responseType||i)){const a=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(u){if(a)throw u.name==="SyntaxError"?Ht.from(u,Ht.ERR_BAD_RESPONSE,this,null,this.response):u}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Mi.classes.FormData,Blob:Mi.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};_e.forEach(["delete","get","head","post","put","patch"],e=>{ag.headers[e]={}});const Fle=_e.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Lle=e=>{const t={};let n,r,i;return e&&e.split(` +`).forEach(function(a){i=a.indexOf(":"),n=a.substring(0,i).trim().toLowerCase(),r=a.substring(i+1).trim(),!(!n||t[n]&&Fle[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},yM=Symbol("internals");function Ep(e){return e&&String(e).trim().toLowerCase()}function Iy(e){return e===!1||e==null?e:_e.isArray(e)?e.map(Iy):String(e)}function jle(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const Ble=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function q_(e,t,n,r,i){if(_e.isFunction(r))return r.call(this,t,n);if(i&&(t=n),!!_e.isString(t)){if(_e.isString(r))return t.indexOf(r)!==-1;if(_e.isRegExp(r))return r.test(t)}}function zle(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function Ule(e,t){const n=_e.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(i,o,a){return this[r].call(this,t,i,o,a)},configurable:!0})})}class co{constructor(t){t&&this.set(t)}set(t,n,r){const i=this;function o(u,s,l){const c=Ep(s);if(!c)throw new Error("header name must be a non-empty string");const d=_e.findKey(i,c);(!d||i[d]===void 0||l===!0||l===void 0&&i[d]!==!1)&&(i[d||s]=Iy(u))}const a=(u,s)=>_e.forEach(u,(l,c)=>o(l,c,s));if(_e.isPlainObject(t)||t instanceof this.constructor)a(t,n);else if(_e.isString(t)&&(t=t.trim())&&!Ble(t))a(Lle(t),n);else if(_e.isHeaders(t))for(const[u,s]of t.entries())o(s,u,r);else t!=null&&o(n,t,r);return this}get(t,n){if(t=Ep(t),t){const r=_e.findKey(this,t);if(r){const i=this[r];if(!n)return i;if(n===!0)return jle(i);if(_e.isFunction(n))return n.call(this,i,r);if(_e.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Ep(t),t){const r=_e.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||q_(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let i=!1;function o(a){if(a=Ep(a),a){const u=_e.findKey(r,a);u&&(!n||q_(r,r[u],u,n))&&(delete r[u],i=!0)}}return _e.isArray(t)?t.forEach(o):o(t),i}clear(t){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const o=n[r];(!t||q_(this,this[o],o,t,!0))&&(delete this[o],i=!0)}return i}normalize(t){const n=this,r={};return _e.forEach(this,(i,o)=>{const a=_e.findKey(r,o);if(a){n[a]=Iy(i),delete n[o];return}const u=t?zle(o):String(o).trim();u!==o&&delete n[o],n[u]=Iy(i),r[u]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return _e.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=t&&_e.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` +`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(i=>r.set(i)),r}static accessor(t){const r=(this[yM]=this[yM]={accessors:{}}).accessors,i=this.prototype;function o(a){const u=Ep(a);r[u]||(Ule(i,a),r[u]=!0)}return _e.isArray(t)?t.forEach(o):o(t),this}}co.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);_e.reduceDescriptors(co.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});_e.freezeMethods(co);function K_(e,t){const n=this||ag,r=t||n,i=co.from(r.headers);let o=r.data;return _e.forEach(e,function(u){o=u.call(n,o,i.normalize(),t?t.status:void 0)}),i.normalize(),o}function VL(e){return!!(e&&e.__CANCEL__)}function Ph(e,t,n){Ht.call(this,e??"canceled",Ht.ERR_CANCELED,t,n),this.name="CanceledError"}_e.inherits(Ph,Ht,{__CANCEL__:!0});function HL(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new Ht("Request failed with status code "+n.status,[Ht.ERR_BAD_REQUEST,Ht.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Wle(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Vle(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,o=0,a;return t=t!==void 0?t:1e3,function(s){const l=Date.now(),c=r[o];a||(a=l),n[i]=s,r[i]=l;let d=o,h=0;for(;d!==i;)h+=n[d++],d=d%e;if(i=(i+1)%e,i===o&&(o=(o+1)%e),l-a{n=c,i=null,o&&(clearTimeout(o),o=null),e.apply(null,l)};return[(...l)=>{const c=Date.now(),d=c-n;d>=r?a(l,c):(i=l,o||(o=setTimeout(()=>{o=null,a(i)},r-d)))},()=>i&&a(i)]}const A1=(e,t,n=3)=>{let r=0;const i=Vle(50,250);return Hle(o=>{const a=o.loaded,u=o.lengthComputable?o.total:void 0,s=a-r,l=i(s),c=a<=u;r=a;const d={loaded:a,total:u,progress:u?a/u:void 0,bytes:s,rate:l||void 0,estimated:l&&u&&c?(u-a)/l:void 0,event:o,lengthComputable:u!=null,[t?"download":"upload"]:!0};e(d)},n)},bM=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},xM=e=>(...t)=>_e.asap(()=>e(...t)),qle=Mi.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Mi.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Mi.origin),Mi.navigator&&/(msie|trident)/i.test(Mi.navigator.userAgent)):()=>!0,Kle=Mi.hasStandardBrowserEnv?{write(e,t,n,r,i,o){const a=[e+"="+encodeURIComponent(t)];_e.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),_e.isString(r)&&a.push("path="+r),_e.isString(i)&&a.push("domain="+i),o===!0&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Gle(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Yle(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function qL(e,t){return e&&!Gle(t)?Yle(e,t):t}const wM=e=>e instanceof co?{...e}:e;function Bc(e,t){t=t||{};const n={};function r(l,c,d,h){return _e.isPlainObject(l)&&_e.isPlainObject(c)?_e.merge.call({caseless:h},l,c):_e.isPlainObject(c)?_e.merge({},c):_e.isArray(c)?c.slice():c}function i(l,c,d,h){if(_e.isUndefined(c)){if(!_e.isUndefined(l))return r(void 0,l,d,h)}else return r(l,c,d,h)}function o(l,c){if(!_e.isUndefined(c))return r(void 0,c)}function a(l,c){if(_e.isUndefined(c)){if(!_e.isUndefined(l))return r(void 0,l)}else return r(void 0,c)}function u(l,c,d){if(d in t)return r(l,c);if(d in e)return r(void 0,l)}const s={url:o,method:o,data:o,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:u,headers:(l,c,d)=>i(wM(l),wM(c),d,!0)};return _e.forEach(Object.keys(Object.assign({},e,t)),function(c){const d=s[c]||i,h=d(e[c],t[c],c);_e.isUndefined(h)&&d!==u||(n[c]=h)}),n}const KL=e=>{const t=Bc({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:o,headers:a,auth:u}=t;t.headers=a=co.from(a),t.url=zL(qL(t.baseURL,t.url),e.params,e.paramsSerializer),u&&a.set("Authorization","Basic "+btoa((u.username||"")+":"+(u.password?unescape(encodeURIComponent(u.password)):"")));let s;if(_e.isFormData(n)){if(Mi.hasStandardBrowserEnv||Mi.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((s=a.getContentType())!==!1){const[l,...c]=s?s.split(";").map(d=>d.trim()).filter(Boolean):[];a.setContentType([l||"multipart/form-data",...c].join("; "))}}if(Mi.hasStandardBrowserEnv&&(r&&_e.isFunction(r)&&(r=r(t)),r||r!==!1&&qle(t.url))){const l=i&&o&&Kle.read(o);l&&a.set(i,l)}return t},Zle=typeof XMLHttpRequest<"u",Xle=Zle&&function(e){return new Promise(function(n,r){const i=KL(e);let o=i.data;const a=co.from(i.headers).normalize();let{responseType:u,onUploadProgress:s,onDownloadProgress:l}=i,c,d,h,v,g;function m(){v&&v(),g&&g(),i.cancelToken&&i.cancelToken.unsubscribe(c),i.signal&&i.signal.removeEventListener("abort",c)}let b=new XMLHttpRequest;b.open(i.method.toUpperCase(),i.url,!0),b.timeout=i.timeout;function w(){if(!b)return;const S=co.from("getAllResponseHeaders"in b&&b.getAllResponseHeaders()),E={data:!u||u==="text"||u==="json"?b.responseText:b.response,status:b.status,statusText:b.statusText,headers:S,config:e,request:b};HL(function(T){n(T),m()},function(T){r(T),m()},E),b=null}"onloadend"in b?b.onloadend=w:b.onreadystatechange=function(){!b||b.readyState!==4||b.status===0&&!(b.responseURL&&b.responseURL.indexOf("file:")===0)||setTimeout(w)},b.onabort=function(){b&&(r(new Ht("Request aborted",Ht.ECONNABORTED,e,b)),b=null)},b.onerror=function(){r(new Ht("Network Error",Ht.ERR_NETWORK,e,b)),b=null},b.ontimeout=function(){let A=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const E=i.transitional||UL;i.timeoutErrorMessage&&(A=i.timeoutErrorMessage),r(new Ht(A,E.clarifyTimeoutError?Ht.ETIMEDOUT:Ht.ECONNABORTED,e,b)),b=null},o===void 0&&a.setContentType(null),"setRequestHeader"in b&&_e.forEach(a.toJSON(),function(A,E){b.setRequestHeader(E,A)}),_e.isUndefined(i.withCredentials)||(b.withCredentials=!!i.withCredentials),u&&u!=="json"&&(b.responseType=i.responseType),l&&([h,g]=A1(l,!0),b.addEventListener("progress",h)),s&&b.upload&&([d,v]=A1(s),b.upload.addEventListener("progress",d),b.upload.addEventListener("loadend",v)),(i.cancelToken||i.signal)&&(c=S=>{b&&(r(!S||S.type?new Ph(null,e,b):S),b.abort(),b=null)},i.cancelToken&&i.cancelToken.subscribe(c),i.signal&&(i.signal.aborted?c():i.signal.addEventListener("abort",c)));const x=Wle(i.url);if(x&&Mi.protocols.indexOf(x)===-1){r(new Ht("Unsupported protocol "+x+":",Ht.ERR_BAD_REQUEST,e));return}b.send(o||null)})},Qle=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,i;const o=function(l){if(!i){i=!0,u();const c=l instanceof Error?l:this.reason;r.abort(c instanceof Ht?c:new Ph(c instanceof Error?c.message:c))}};let a=t&&setTimeout(()=>{a=null,o(new Ht(`timeout ${t} of ms exceeded`,Ht.ETIMEDOUT))},t);const u=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(l=>{l.unsubscribe?l.unsubscribe(o):l.removeEventListener("abort",o)}),e=null)};e.forEach(l=>l.addEventListener("abort",o));const{signal:s}=r;return s.unsubscribe=()=>_e.asap(u),s}},Jle=function*(e,t){let n=e.byteLength;if(n{const i=ece(e,t);let o=0,a,u=s=>{a||(a=!0,r&&r(s))};return new ReadableStream({async pull(s){try{const{done:l,value:c}=await i.next();if(l){u(),s.close();return}let d=c.byteLength;if(n){let h=o+=d;n(h)}s.enqueue(new Uint8Array(c))}catch(l){throw u(l),l}},cancel(s){return u(s),i.return()}},{highWaterMark:2})},$x=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",GL=$x&&typeof ReadableStream=="function",nce=$x&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),YL=(e,...t)=>{try{return!!e(...t)}catch{return!1}},rce=GL&&YL(()=>{let e=!1;const t=new Request(Mi.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),SM=64*1024,EC=GL&&YL(()=>_e.isReadableStream(new Response("").body)),P1={stream:EC&&(e=>e.body)};$x&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!P1[t]&&(P1[t]=_e.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new Ht(`Response type '${t}' is not supported`,Ht.ERR_NOT_SUPPORT,r)})})})(new Response);const ice=async e=>{if(e==null)return 0;if(_e.isBlob(e))return e.size;if(_e.isSpecCompliantForm(e))return(await new Request(Mi.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(_e.isArrayBufferView(e)||_e.isArrayBuffer(e))return e.byteLength;if(_e.isURLSearchParams(e)&&(e=e+""),_e.isString(e))return(await nce(e)).byteLength},oce=async(e,t)=>{const n=_e.toFiniteNumber(e.getContentLength());return n??ice(t)},ace=$x&&(async e=>{let{url:t,method:n,data:r,signal:i,cancelToken:o,timeout:a,onDownloadProgress:u,onUploadProgress:s,responseType:l,headers:c,withCredentials:d="same-origin",fetchOptions:h}=KL(e);l=l?(l+"").toLowerCase():"text";let v=Qle([i,o&&o.toAbortSignal()],a),g;const m=v&&v.unsubscribe&&(()=>{v.unsubscribe()});let b;try{if(s&&rce&&n!=="get"&&n!=="head"&&(b=await oce(c,r))!==0){let E=new Request(t,{method:"POST",body:r,duplex:"half"}),C;if(_e.isFormData(r)&&(C=E.headers.get("content-type"))&&c.setContentType(C),E.body){const[T,M]=bM(b,A1(xM(s)));r=_M(E.body,SM,T,M)}}_e.isString(d)||(d=d?"include":"omit");const w="credentials"in Request.prototype;g=new Request(t,{...h,signal:v,method:n.toUpperCase(),headers:c.normalize().toJSON(),body:r,duplex:"half",credentials:w?d:void 0});let x=await fetch(g);const S=EC&&(l==="stream"||l==="response");if(EC&&(u||S&&m)){const E={};["status","statusText","headers"].forEach(F=>{E[F]=x[F]});const C=_e.toFiniteNumber(x.headers.get("content-length")),[T,M]=u&&bM(C,A1(xM(u),!0))||[];x=new Response(_M(x.body,SM,T,()=>{M&&M(),m&&m()}),E)}l=l||"text";let A=await P1[_e.findKey(P1,l)||"text"](x,e);return!S&&m&&m(),await new Promise((E,C)=>{HL(E,C,{data:A,headers:co.from(x.headers),status:x.status,statusText:x.statusText,config:e,request:g})})}catch(w){throw m&&m(),w&&w.name==="TypeError"&&/fetch/i.test(w.message)?Object.assign(new Ht("Network Error",Ht.ERR_NETWORK,e,g),{cause:w.cause||w}):Ht.from(w,w&&w.code,e,g)}}),AC={http:wle,xhr:Xle,fetch:ace};_e.forEach(AC,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const CM=e=>`- ${e}`,uce=e=>_e.isFunction(e)||e===null||e===!1,ZL={getAdapter:e=>{e=_e.isArray(e)?e:[e];const{length:t}=e;let n,r;const i={};for(let o=0;o`adapter ${u} `+(s===!1?"is not supported by the environment":"is not available in the build"));let a=t?o.length>1?`since : +`+o.map(CM).join(` +`):" "+CM(o[0]):"as no adapter specified";throw new Ht("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return r},adapters:AC};function G_(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ph(null,e)}function EM(e){return G_(e),e.headers=co.from(e.headers),e.data=K_.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),ZL.getAdapter(e.adapter||ag.adapter)(e).then(function(r){return G_(e),r.data=K_.call(e,e.transformResponse,r),r.headers=co.from(r.headers),r},function(r){return VL(r)||(G_(e),r&&r.response&&(r.response.data=K_.call(e,e.transformResponse,r.response),r.response.headers=co.from(r.response.headers))),Promise.reject(r)})}const XL="1.7.9",Ix={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Ix[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const AM={};Ix.transitional=function(t,n,r){function i(o,a){return"[Axios v"+XL+"] Transitional option '"+o+"'"+a+(r?". "+r:"")}return(o,a,u)=>{if(t===!1)throw new Ht(i(a," has been removed"+(n?" in "+n:"")),Ht.ERR_DEPRECATED);return n&&!AM[a]&&(AM[a]=!0,console.warn(i(a," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,a,u):!0}};Ix.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function sce(e,t,n){if(typeof e!="object")throw new Ht("options must be an object",Ht.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const o=r[i],a=t[o];if(a){const u=e[o],s=u===void 0||a(u,o,e);if(s!==!0)throw new Ht("option "+o+" must be "+s,Ht.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Ht("Unknown option "+o,Ht.ERR_BAD_OPTION)}}const Ny={assertOptions:sce,validators:Ix},uu=Ny.validators;class Ac{constructor(t){this.defaults=t,this.interceptors={request:new mM,response:new mM}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const o=i.stack?i.stack.replace(/^.+\n/,""):"";try{r.stack?o&&!String(r.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(r.stack+=` +`+o):r.stack=o}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Bc(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&Ny.assertOptions(r,{silentJSONParsing:uu.transitional(uu.boolean),forcedJSONParsing:uu.transitional(uu.boolean),clarifyTimeoutError:uu.transitional(uu.boolean)},!1),i!=null&&(_e.isFunction(i)?n.paramsSerializer={serialize:i}:Ny.assertOptions(i,{encode:uu.function,serialize:uu.function},!0)),Ny.assertOptions(n,{baseUrl:uu.spelling("baseURL"),withXsrfToken:uu.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=o&&_e.merge(o.common,o[n.method]);o&&_e.forEach(["delete","get","head","post","put","patch","common"],g=>{delete o[g]}),n.headers=co.concat(a,o);const u=[];let s=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(n)===!1||(s=s&&m.synchronous,u.unshift(m.fulfilled,m.rejected))});const l=[];this.interceptors.response.forEach(function(m){l.push(m.fulfilled,m.rejected)});let c,d=0,h;if(!s){const g=[EM.bind(this),void 0];for(g.unshift.apply(g,u),g.push.apply(g,l),h=g.length,c=Promise.resolve(n);d{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](i);r._listeners=null}),this.promise.then=i=>{let o;const a=new Promise(u=>{r.subscribe(u),o=u}).then(i);return a.cancel=function(){r.unsubscribe(o)},a},t(function(o,a,u){r.reason||(r.reason=new Ph(o,a,u),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new cA(function(i){t=i}),cancel:t}}}function lce(e){return function(n){return e.apply(null,n)}}function cce(e){return _e.isObject(e)&&e.isAxiosError===!0}const PC={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(PC).forEach(([e,t])=>{PC[t]=e});function QL(e){const t=new Ac(e),n=kL(Ac.prototype.request,t);return _e.extend(n,Ac.prototype,t,{allOwnKeys:!0}),_e.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return QL(Bc(e,i))},n}const Kr=QL(ag);Kr.Axios=Ac;Kr.CanceledError=Ph;Kr.CancelToken=cA;Kr.isCancel=VL;Kr.VERSION=XL;Kr.toFormData=Dx;Kr.AxiosError=Ht;Kr.Cancel=Kr.CanceledError;Kr.all=function(t){return Promise.all(t)};Kr.spread=lce;Kr.isAxiosError=cce;Kr.mergeConfig=Bc;Kr.AxiosHeaders=co;Kr.formToJSON=e=>WL(_e.isHTMLForm(e)?new FormData(e):e);Kr.getAdapter=ZL.getAdapter;Kr.HttpStatusCode=PC;Kr.default=Kr;var fce=e=>{switch(e){case"success":return pce;case"info":return gce;case"warning":return vce;case"error":return mce;default:return null}},dce=Array(12).fill(0),hce=({visible:e,className:t})=>j.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},j.createElement("div",{className:"sonner-spinner"},dce.map((n,r)=>j.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),pce=j.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},j.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),vce=j.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},j.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),gce=j.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},j.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),mce=j.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},j.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),yce=j.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},j.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),j.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),bce=()=>{let[e,t]=j.useState(document.hidden);return j.useEffect(()=>{let n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e},OC=1,xce=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:n,...r}=e,i=typeof e?.id=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:OC++,o=this.toasts.find(u=>u.id===i),a=e.dismissible===void 0?!0:e.dismissible;return o?this.toasts=this.toasts.map(u=>u.id===i?(this.publish({...u,...e,id:i,title:n}),{...u,...e,id:i,dismissible:a,title:n}):u):this.addToast({title:n,...r,dismissible:a,id:i}),i},this.dismiss=e=>(e||this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let r=e instanceof Promise?e:e(),i=n!==void 0,o,a=r.then(async s=>{if(o=["resolve",s],j.isValidElement(s))i=!1,this.create({id:n,type:"default",message:s});else if(_ce(s)&&!s.ok){i=!1;let l=typeof t.error=="function"?await t.error(`HTTP error! status: ${s.status}`):t.error,c=typeof t.description=="function"?await t.description(`HTTP error! status: ${s.status}`):t.description;this.create({id:n,type:"error",message:l,description:c})}else if(t.success!==void 0){i=!1;let l=typeof t.success=="function"?await t.success(s):t.success,c=typeof t.description=="function"?await t.description(s):t.description;this.create({id:n,type:"success",message:l,description:c})}}).catch(async s=>{if(o=["reject",s],t.error!==void 0){i=!1;let l=typeof t.error=="function"?await t.error(s):t.error,c=typeof t.description=="function"?await t.description(s):t.description;this.create({id:n,type:"error",message:l,description:c})}}).finally(()=>{var s;i&&(this.dismiss(n),n=void 0),(s=t.finally)==null||s.call(t)}),u=()=>new Promise((s,l)=>a.then(()=>o[0]==="reject"?l(o[1]):s(o[1])).catch(l));return typeof n!="string"&&typeof n!="number"?{unwrap:u}:Object.assign(n,{unwrap:u})},this.custom=(e,t)=>{let n=t?.id||OC++;return this.create({jsx:e(n),id:n,...t}),n},this.subscribers=[],this.toasts=[]}},Ao=new xce,wce=(e,t)=>{let n=t?.id||OC++;return Ao.addToast({title:e,...t,id:n}),n},_ce=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",Sce=wce,Cce=()=>Ao.toasts,MKe=Object.assign(Sce,{success:Ao.success,info:Ao.info,warning:Ao.warning,error:Ao.error,custom:Ao.custom,message:Ao.message,promise:Ao.promise,dismiss:Ao.dismiss,loading:Ao.loading},{getHistory:Cce});function Ece(e,{insertAt:t}={}){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}Ece(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:max(var(--offset),env(safe-area-inset-right))}:where([data-sonner-toaster][data-x-position="left"]){left:max(var(--offset),env(safe-area-inset-left))}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:max(var(--offset),env(safe-area-inset-top))}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:max(var(--offset),env(safe-area-inset-bottom))}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:0;right:0;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation:swipe-out .2s ease-out forwards}@keyframes swipe-out{0%{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount)));opacity:1}to{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount) + var(--lift) * -100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;--mobile-offset: 16px;right:var(--mobile-offset);left:var(--mobile-offset);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset)}[data-sonner-toaster][data-y-position=bottom]{bottom:20px}[data-sonner-toaster][data-y-position=top]{top:20px}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset);right:var(--mobile-offset);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)} +`);function Um(e){return e.label!==void 0}var Ace=3,Pce="32px",PM=4e3,Oce=356,kce=14,Tce=20,Mce=200;function Rce(...e){return e.filter(Boolean).join(" ")}var Dce=e=>{var t,n,r,i,o,a,u,s,l,c,d;let{invert:h,toast:v,unstyled:g,interacting:m,setHeights:b,visibleToasts:w,heights:x,index:S,toasts:A,expanded:E,removeToast:C,defaultRichColors:T,closeButton:M,style:F,cancelButtonStyle:U,actionButtonStyle:H,className:W="",descriptionClassName:ie="",duration:Z,position:G,gap:K,loadingIcon:V,expandByDefault:B,classNames:q,icons:Y,closeButtonAriaLabel:ue="Close toast",pauseWhenPageIsHidden:Q,cn:J}=e,[se,de]=j.useState(!1),[Se,ge]=j.useState(!1),[Ze,Pe]=j.useState(!1),[Fe,$e]=j.useState(!1),[be,yt]=j.useState(!1),[lt,It]=j.useState(0),[mn,en]=j.useState(0),re=j.useRef(v.duration||Z||PM),pe=j.useRef(null),ye=j.useRef(null),Ue=S===0,je=S+1<=w,ke=v.type,nt=v.dismissible!==!1,gt=v.className||"",bn=v.descriptionClassName||"",Vt=j.useMemo(()=>x.findIndex(_t=>_t.toastId===v.id)||0,[x,v.id]),xn=j.useMemo(()=>{var _t;return(_t=v.closeButton)!=null?_t:M},[v.closeButton,M]);j.useMemo(()=>v.duration||Z||PM,[v.duration,Z]);let Ii=j.useRef(0),br=j.useRef(0),yi=j.useRef(0),ar=j.useRef(null),[ui,bi]=G.split("-"),Rr=j.useMemo(()=>x.reduce((_t,fn,wn)=>wn>=Vt?_t:_t+fn.height,0),[x,Vt]),Yi=bce(),go=v.invert||h,xi=ke==="loading";br.current=j.useMemo(()=>Vt*K+Rr,[Vt,Rr]),j.useEffect(()=>{de(!0)},[]),j.useEffect(()=>{let _t=ye.current;if(_t){let fn=_t.getBoundingClientRect().height;return en(fn),b(wn=>[{toastId:v.id,height:fn,position:v.position},...wn]),()=>b(wn=>wn.filter(qn=>qn.toastId!==v.id))}},[b,v.id]),j.useLayoutEffect(()=>{if(!se)return;let _t=ye.current,fn=_t.style.height;_t.style.height="auto";let wn=_t.getBoundingClientRect().height;_t.style.height=fn,en(wn),b(qn=>qn.find(ur=>ur.toastId===v.id)?qn.map(ur=>ur.toastId===v.id?{...ur,height:wn}:ur):[{toastId:v.id,height:wn,position:v.position},...qn])},[se,v.title,v.description,b,v.id]);let Dr=j.useCallback(()=>{ge(!0),It(br.current),b(_t=>_t.filter(fn=>fn.toastId!==v.id)),setTimeout(()=>{C(v)},Mce)},[v,C,b,br]);j.useEffect(()=>{if(v.promise&&ke==="loading"||v.duration===1/0||v.type==="loading")return;let _t;return E||m||Q&&Yi?(()=>{if(yi.current{var fn;(fn=v.onAutoClose)==null||fn.call(v,v),Dr()},re.current)),()=>clearTimeout(_t)},[E,m,v,ke,Q,Yi,Dr]),j.useEffect(()=>{v.delete&&Dr()},[Dr,v.delete]);function wa(){var _t,fn,wn;return Y!=null&&Y.loading?j.createElement("div",{className:J(q?.loader,(_t=v?.classNames)==null?void 0:_t.loader,"sonner-loader"),"data-visible":ke==="loading"},Y.loading):V?j.createElement("div",{className:J(q?.loader,(fn=v?.classNames)==null?void 0:fn.loader,"sonner-loader"),"data-visible":ke==="loading"},V):j.createElement(hce,{className:J(q?.loader,(wn=v?.classNames)==null?void 0:wn.loader),visible:ke==="loading"})}return j.createElement("li",{tabIndex:0,ref:ye,className:J(W,gt,q?.toast,(t=v?.classNames)==null?void 0:t.toast,q?.default,q?.[ke],(n=v?.classNames)==null?void 0:n[ke]),"data-sonner-toast":"","data-rich-colors":(r=v.richColors)!=null?r:T,"data-styled":!(v.jsx||v.unstyled||g),"data-mounted":se,"data-promise":!!v.promise,"data-swiped":be,"data-removed":Se,"data-visible":je,"data-y-position":ui,"data-x-position":bi,"data-index":S,"data-front":Ue,"data-swiping":Ze,"data-dismissible":nt,"data-type":ke,"data-invert":go,"data-swipe-out":Fe,"data-expanded":!!(E||B&&se),style:{"--index":S,"--toasts-before":S,"--z-index":A.length-S,"--offset":`${Se?lt:br.current}px`,"--initial-height":B?"auto":`${mn}px`,...F,...v.style},onPointerDown:_t=>{xi||!nt||(pe.current=new Date,It(br.current),_t.target.setPointerCapture(_t.pointerId),_t.target.tagName!=="BUTTON"&&(Pe(!0),ar.current={x:_t.clientX,y:_t.clientY}))},onPointerUp:()=>{var _t,fn,wn,qn;if(Fe||!nt)return;ar.current=null;let ur=Number(((_t=ye.current)==null?void 0:_t.style.getPropertyValue("--swipe-amount").replace("px",""))||0),Yr=new Date().getTime()-((fn=pe.current)==null?void 0:fn.getTime()),mo=Math.abs(ur)/Yr;if(Math.abs(ur)>=Tce||mo>.11){It(br.current),(wn=v.onDismiss)==null||wn.call(v,v),Dr(),$e(!0),yt(!1);return}(qn=ye.current)==null||qn.style.setProperty("--swipe-amount","0px"),Pe(!1)},onPointerMove:_t=>{var fn,wn;if(!ar.current||!nt)return;let qn=_t.clientY-ar.current.y,ur=((fn=window.getSelection())==null?void 0:fn.toString().length)>0,Yr=ui==="top"?Math.min(0,qn):Math.max(0,qn);Math.abs(Yr)>0&&yt(!0),!ur&&((wn=ye.current)==null||wn.style.setProperty("--swipe-amount",`${Yr}px`))}},xn&&!v.jsx?j.createElement("button",{"aria-label":ue,"data-disabled":xi,"data-close-button":!0,onClick:xi||!nt?()=>{}:()=>{var _t;Dr(),(_t=v.onDismiss)==null||_t.call(v,v)},className:J(q?.closeButton,(i=v?.classNames)==null?void 0:i.closeButton)},(o=Y?.close)!=null?o:yce):null,v.jsx||j.isValidElement(v.title)?v.jsx?v.jsx:typeof v.title=="function"?v.title():v.title:j.createElement(j.Fragment,null,ke||v.icon||v.promise?j.createElement("div",{"data-icon":"",className:J(q?.icon,(a=v?.classNames)==null?void 0:a.icon)},v.promise||v.type==="loading"&&!v.icon?v.icon||wa():null,v.type!=="loading"?v.icon||Y?.[ke]||fce(ke):null):null,j.createElement("div",{"data-content":"",className:J(q?.content,(u=v?.classNames)==null?void 0:u.content)},j.createElement("div",{"data-title":"",className:J(q?.title,(s=v?.classNames)==null?void 0:s.title)},typeof v.title=="function"?v.title():v.title),v.description?j.createElement("div",{"data-description":"",className:J(ie,bn,q?.description,(l=v?.classNames)==null?void 0:l.description)},typeof v.description=="function"?v.description():v.description):null),j.isValidElement(v.cancel)?v.cancel:v.cancel&&Um(v.cancel)?j.createElement("button",{"data-button":!0,"data-cancel":!0,style:v.cancelButtonStyle||U,onClick:_t=>{var fn,wn;Um(v.cancel)&&nt&&((wn=(fn=v.cancel).onClick)==null||wn.call(fn,_t),Dr())},className:J(q?.cancelButton,(c=v?.classNames)==null?void 0:c.cancelButton)},v.cancel.label):null,j.isValidElement(v.action)?v.action:v.action&&Um(v.action)?j.createElement("button",{"data-button":!0,"data-action":!0,style:v.actionButtonStyle||H,onClick:_t=>{var fn,wn;Um(v.action)&&((wn=(fn=v.action).onClick)==null||wn.call(fn,_t),!_t.defaultPrevented&&Dr())},className:J(q?.actionButton,(d=v?.classNames)==null?void 0:d.actionButton)},v.action.label):null))};function OM(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}var RKe=y.forwardRef(function(e,t){let{invert:n,position:r="bottom-right",hotkey:i=["altKey","KeyT"],expand:o,closeButton:a,className:u,offset:s,theme:l="light",richColors:c,duration:d,style:h,visibleToasts:v=Ace,toastOptions:g,dir:m=OM(),gap:b=kce,loadingIcon:w,icons:x,containerAriaLabel:S="Notifications",pauseWhenPageIsHidden:A,cn:E=Rce}=e,[C,T]=j.useState([]),M=j.useMemo(()=>Array.from(new Set([r].concat(C.filter(Q=>Q.position).map(Q=>Q.position)))),[C,r]),[F,U]=j.useState([]),[H,W]=j.useState(!1),[ie,Z]=j.useState(!1),[G,K]=j.useState(l!=="system"?l:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),V=j.useRef(null),B=i.join("+").replace(/Key/g,"").replace(/Digit/g,""),q=j.useRef(null),Y=j.useRef(!1),ue=j.useCallback(Q=>{T(J=>{var se;return(se=J.find(de=>de.id===Q.id))!=null&&se.delete||Ao.dismiss(Q.id),J.filter(({id:de})=>de!==Q.id)})},[]);return j.useEffect(()=>Ao.subscribe(Q=>{if(Q.dismiss){T(J=>J.map(se=>se.id===Q.id?{...se,delete:!0}:se));return}setTimeout(()=>{_x.flushSync(()=>{T(J=>{let se=J.findIndex(de=>de.id===Q.id);return se!==-1?[...J.slice(0,se),{...J[se],...Q},...J.slice(se+1)]:[Q,...J]})})})}),[]),j.useEffect(()=>{if(l!=="system"){K(l);return}if(l==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?K("dark"):K("light")),typeof window>"u")return;let Q=window.matchMedia("(prefers-color-scheme: dark)");try{Q.addEventListener("change",({matches:J})=>{K(J?"dark":"light")})}catch{Q.addListener(({matches:se})=>{try{K(se?"dark":"light")}catch(de){console.error(de)}})}},[l]),j.useEffect(()=>{C.length<=1&&W(!1)},[C]),j.useEffect(()=>{let Q=J=>{var se,de;i.every(Se=>J[Se]||J.code===Se)&&(W(!0),(se=V.current)==null||se.focus()),J.code==="Escape"&&(document.activeElement===V.current||(de=V.current)!=null&&de.contains(document.activeElement))&&W(!1)};return document.addEventListener("keydown",Q),()=>document.removeEventListener("keydown",Q)},[i]),j.useEffect(()=>{if(V.current)return()=>{q.current&&(q.current.focus({preventScroll:!0}),q.current=null,Y.current=!1)}},[V.current]),j.createElement("section",{"aria-label":`${S} ${B}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false"},M.map((Q,J)=>{var se;let[de,Se]=Q.split("-");return C.length?j.createElement("ol",{key:Q,dir:m==="auto"?OM():m,tabIndex:-1,ref:V,className:u,"data-sonner-toaster":!0,"data-theme":G,"data-y-position":de,"data-lifted":H&&C.length>1&&!o,"data-x-position":Se,style:{"--front-toast-height":`${((se=F[0])==null?void 0:se.height)||0}px`,"--offset":typeof s=="number"?`${s}px`:s||Pce,"--width":`${Oce}px`,"--gap":`${b}px`,...h},onBlur:ge=>{Y.current&&!ge.currentTarget.contains(ge.relatedTarget)&&(Y.current=!1,q.current&&(q.current.focus({preventScroll:!0}),q.current=null))},onFocus:ge=>{ge.target instanceof HTMLElement&&ge.target.dataset.dismissible==="false"||Y.current||(Y.current=!0,q.current=ge.relatedTarget)},onMouseEnter:()=>W(!0),onMouseMove:()=>W(!0),onMouseLeave:()=>{ie||W(!1)},onPointerDown:ge=>{ge.target instanceof HTMLElement&&ge.target.dataset.dismissible==="false"||Z(!0)},onPointerUp:()=>Z(!1)},C.filter(ge=>!ge.position&&J===0||ge.position===Q).map((ge,Ze)=>{var Pe,Fe;return j.createElement(Dce,{key:ge.id,icons:x,index:Ze,toast:ge,defaultRichColors:c,duration:(Pe=g?.duration)!=null?Pe:d,className:g?.className,descriptionClassName:g?.descriptionClassName,invert:n,visibleToasts:v,closeButton:(Fe=g?.closeButton)!=null?Fe:a,interacting:ie,position:Q,style:g?.style,unstyled:g?.unstyled,classNames:g?.classNames,cancelButtonStyle:g?.cancelButtonStyle,actionButtonStyle:g?.actionButtonStyle,removeToast:ue,toasts:C.filter($e=>$e.position==ge.position),heights:F.filter($e=>$e.position==ge.position),setHeights:U,expandByDefault:o,gap:b,loadingIcon:w,expanded:H,pauseWhenPageIsHidden:A,cn:E})})):null}))}),Oh=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},zc=typeof window>"u"||"Deno"in globalThis;function ra(){}function $ce(e,t){return typeof e=="function"?e(t):e}function kC(e){return typeof e=="number"&&e>=0&&e!==1/0}function JL(e,t){return Math.max(e+(t||0)-Date.now(),0)}function bd(e,t){return typeof e=="function"?e(t):e}function Ia(e,t){return typeof e=="function"?e(t):e}function kM(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:o,queryKey:a,stale:u}=e;if(a){if(r){if(t.queryHash!==fA(a,t.options))return!1}else if(!U0(t.queryKey,a))return!1}if(n!=="all"){const s=t.isActive();if(n==="active"&&!s||n==="inactive"&&s)return!1}return!(typeof u=="boolean"&&t.isStale()!==u||i&&i!==t.state.fetchStatus||o&&!o(t))}function TM(e,t){const{exact:n,status:r,predicate:i,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(n){if(Uc(t.options.mutationKey)!==Uc(o))return!1}else if(!U0(t.options.mutationKey,o))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function fA(e,t){return(t?.queryKeyHashFn||Uc)(e)}function Uc(e){return JSON.stringify(e,(t,n)=>TC(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function U0(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!U0(e[n],t[n])):!1}function ej(e,t){if(e===t)return e;const n=MM(e)&&MM(t);if(n||TC(e)&&TC(t)){const r=n?e:Object.keys(e),i=r.length,o=n?t:Object.keys(t),a=o.length,u=n?[]:{};let s=0;for(let l=0;l{setTimeout(t,e)})}function MC(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?ej(e,t):t}function Nce(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function Fce(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var dA=Symbol();function tj(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===dA?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var Lce=class extends Oh{#e;#t;#r;constructor(){super(),this.#r=e=>{if(!zc&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#r)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#r=e,this.#t?.(),this.#t=e(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},hA=new Lce,jce=class extends Oh{#e=!0;#t;#r;constructor(){super(),this.#r=e=>{if(!zc&&window.addEventListener){const t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#r)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#r=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(n=>{n(e)}))}isOnline(){return this.#e}},k1=new jce;function RC(){let e,t;const n=new Promise((i,o)=>{e=i,t=o});n.status="pending",n.catch(()=>{});function r(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{r({status:"fulfilled",value:i}),e(i)},n.reject=i=>{r({status:"rejected",reason:i}),t(i)},n}function Bce(e){return Math.min(1e3*2**e,3e4)}function nj(e){return(e??"online")==="online"?k1.isOnline():!0}var rj=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function Y_(e){return e instanceof rj}function ij(e){let t=!1,n=0,r=!1,i;const o=RC(),a=m=>{r||(h(new rj(m)),e.abort?.())},u=()=>{t=!0},s=()=>{t=!1},l=()=>hA.isFocused()&&(e.networkMode==="always"||k1.isOnline())&&e.canRun(),c=()=>nj(e.networkMode)&&e.canRun(),d=m=>{r||(r=!0,e.onSuccess?.(m),i?.(),o.resolve(m))},h=m=>{r||(r=!0,e.onError?.(m),i?.(),o.reject(m))},v=()=>new Promise(m=>{i=b=>{(r||l())&&m(b)},e.onPause?.()}).then(()=>{i=void 0,r||e.onContinue?.()}),g=()=>{if(r)return;let m;const b=n===0?e.initialPromise:void 0;try{m=b??e.fn()}catch(w){m=Promise.reject(w)}Promise.resolve(m).then(d).catch(w=>{if(r)return;const x=e.retry??(zc?0:3),S=e.retryDelay??Bce,A=typeof S=="function"?S(n,w):S,E=x===!0||typeof x=="number"&&nl()?void 0:v()).then(()=>{t?h(w):g()})})};return{promise:o,cancel:a,continue:()=>(i?.(),o),cancelRetry:u,continueRetry:s,canStart:c,start:()=>(c()?g():v().then(g),o)}}function zce(){let e=[],t=0,n=u=>{u()},r=u=>{u()},i=u=>setTimeout(u,0);const o=u=>{t?e.push(u):i(()=>{n(u)})},a=()=>{const u=e;e=[],u.length&&i(()=>{r(()=>{u.forEach(s=>{n(s)})})})};return{batch:u=>{let s;t++;try{s=u()}finally{t--,t||a()}return s},batchCalls:u=>(...s)=>{o(()=>{u(...s)})},schedule:o,setNotifyFunction:u=>{n=u},setBatchNotifyFunction:u=>{r=u},setScheduler:u=>{i=u}}}var Ur=zce(),oj=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),kC(this.gcTime)&&(this.#e=setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(zc?1/0:5*60*1e3))}clearGcTimeout(){this.#e&&(clearTimeout(this.#e),this.#e=void 0)}},Uce=class extends oj{#e;#t;#r;#n;#a;#o;constructor(e){super(),this.#o=!1,this.#a=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#r=e.cache,this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=Wce(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#n?.promise}setOptions(e){this.options={...this.#a,...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#r.remove(this)}setData(e,t){const n=MC(this.state.data,e,this.options);return this.#i({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#i({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#n?.promise;return this.#n?.cancel(e),t?t.then(ra).catch(ra):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>Ia(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===dA||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(e=0){return this.state.isInvalidated||this.state.data===void 0||!JL(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#n?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#n?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#n&&(this.#o?this.#n.cancel({revert:!0}):this.#n.cancelRetry()),this.scheduleGc()),this.#r.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#i({type:"invalidate"})}fetch(e,t){if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#n)return this.#n.continueRetry(),this.#n.promise}if(e&&this.setOptions(e),!this.options.queryFn){const u=this.observers.find(s=>s.options.queryFn);u&&this.setOptions(u.options)}const n=new AbortController,r=u=>{Object.defineProperty(u,"signal",{enumerable:!0,get:()=>(this.#o=!0,n.signal)})},i=()=>{const u=tj(this.options,t),s={queryKey:this.queryKey,meta:this.meta};return r(s),this.#o=!1,this.options.persister?this.options.persister(u,s,this):u(s)},o={fetchOptions:t,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:i};r(o),this.options.behavior?.onFetch(o,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==o.fetchOptions?.meta)&&this.#i({type:"fetch",meta:o.fetchOptions?.meta});const a=u=>{Y_(u)&&u.silent||this.#i({type:"error",error:u}),Y_(u)||(this.#r.config.onError?.(u,this),this.#r.config.onSettled?.(this.state.data,u,this)),this.scheduleGc()};return this.#n=ij({initialPromise:t?.initialPromise,fn:o.fetchFn,abort:n.abort.bind(n),onSuccess:u=>{if(u===void 0){a(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(u)}catch(s){a(s);return}this.#r.config.onSuccess?.(u,this),this.#r.config.onSettled?.(u,this.state.error,this),this.scheduleGc()},onError:a,onFail:(u,s)=>{this.#i({type:"failed",failureCount:u,error:s})},onPause:()=>{this.#i({type:"pause"})},onContinue:()=>{this.#i({type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0}),this.#n.start()}#i(e){const t=n=>{switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...aj(n.data,this.options),fetchMeta:e.meta??null};case"success":return{...n,data:e.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const r=e.error;return Y_(r)&&r.revert&&this.#t?{...this.#t,fetchStatus:"idle"}:{...n,error:r,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=t(this.state),Ur.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#r.notify({query:this,type:"updated",action:e})})}};function aj(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:nj(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Wce(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Vce=class extends Oh{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){const r=t.queryKey,i=t.queryHash??fA(r,t);let o=this.get(i);return o||(o=new Uce({cache:this,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(o)),o}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){Ur.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(n=>kM(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>kM(e,n)):t}notify(e){Ur.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Ur.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Ur.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Hce=class extends oj{#e;#t;#r;constructor(e){super(),this.mutationId=e.mutationId,this.#t=e.mutationCache,this.#e=[],this.state=e.state||uj(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#e.includes(e)||(this.#e.push(e),this.clearGcTimeout(),this.#t.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#e=this.#e.filter(t=>t!==e),this.scheduleGc(),this.#t.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#e.length||(this.state.status==="pending"?this.scheduleGc():this.#t.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(e){this.#r=ij({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(new Error("No mutationFn found")),onFail:(r,i)=>{this.#n({type:"failed",failureCount:r,error:i})},onPause:()=>{this.#n({type:"pause"})},onContinue:()=>{this.#n({type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#t.canRun(this)});const t=this.state.status==="pending",n=!this.#r.canStart();try{if(!t){this.#n({type:"pending",variables:e,isPaused:n}),await this.#t.config.onMutate?.(e,this);const i=await this.options.onMutate?.(e);i!==this.state.context&&this.#n({type:"pending",context:i,variables:e,isPaused:n})}const r=await this.#r.start();return await this.#t.config.onSuccess?.(r,e,this.state.context,this),await this.options.onSuccess?.(r,e,this.state.context),await this.#t.config.onSettled?.(r,null,this.state.variables,this.state.context,this),await this.options.onSettled?.(r,null,e,this.state.context),this.#n({type:"success",data:r}),r}catch(r){try{throw await this.#t.config.onError?.(r,e,this.state.context,this),await this.options.onError?.(r,e,this.state.context),await this.#t.config.onSettled?.(void 0,r,this.state.variables,this.state.context,this),await this.options.onSettled?.(void 0,r,e,this.state.context),r}finally{this.#n({type:"error",error:r})}}finally{this.#t.runNext(this)}}#n(e){const t=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),Ur.batch(()=>{this.#e.forEach(n=>{n.onMutationUpdate(e)}),this.#t.notify({mutation:this,type:"updated",action:e})})}};function uj(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var qce=class extends Oh{constructor(e={}){super(),this.config=e,this.#e=new Map,this.#t=Date.now()}#e;#t;build(e,t,n){const r=new Hce({mutationCache:this,mutationId:++this.#t,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){const t=Wm(e),n=this.#e.get(t)??[];n.push(e),this.#e.set(t,n),this.notify({type:"added",mutation:e})}remove(e){const t=Wm(e);if(this.#e.has(t)){const n=this.#e.get(t)?.filter(r=>r!==e);n&&(n.length===0?this.#e.delete(t):this.#e.set(t,n))}this.notify({type:"removed",mutation:e})}canRun(e){const t=this.#e.get(Wm(e))?.find(n=>n.state.status==="pending");return!t||t===e}runNext(e){return this.#e.get(Wm(e))?.find(n=>n!==e&&n.state.isPaused)?.continue()??Promise.resolve()}clear(){Ur.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}getAll(){return[...this.#e.values()].flat()}find(e){const t={exact:!0,...e};return this.getAll().find(n=>TM(t,n))}findAll(e={}){return this.getAll().filter(t=>TM(e,t))}notify(e){Ur.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return Ur.batch(()=>Promise.all(e.map(t=>t.continue().catch(ra))))}};function Wm(e){return e.options.scope?.id??String(e.mutationId)}function DM(e){return{onFetch:(t,n)=>{const r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,o=t.state.data?.pages||[],a=t.state.data?.pageParams||[];let u={pages:[],pageParams:[]},s=0;const l=async()=>{let c=!1;const d=g=>{Object.defineProperty(g,"signal",{enumerable:!0,get:()=>(t.signal.aborted?c=!0:t.signal.addEventListener("abort",()=>{c=!0}),t.signal)})},h=tj(t.options,t.fetchOptions),v=async(g,m,b)=>{if(c)return Promise.reject();if(m==null&&g.pages.length)return Promise.resolve(g);const w={queryKey:t.queryKey,pageParam:m,direction:b?"backward":"forward",meta:t.options.meta};d(w);const x=await h(w),{maxPages:S}=t.options,A=b?Fce:Nce;return{pages:A(g.pages,x,S),pageParams:A(g.pageParams,m,S)}};if(i&&o.length){const g=i==="backward",m=g?Kce:$M,b={pages:o,pageParams:a},w=m(r,b);u=await v(b,w,g)}else{const g=e??o.length;do{const m=s===0?a[0]??r.initialPageParam:$M(r,u);if(s>0&&m==null)break;u=await v(u,m),s++}while(st.options.persister?.(l,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=l}}}function $M(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function Kce(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var DKe=class{#e;#t;#r;#n;#a;#o;#i;#u;constructor(e={}){this.#e=e.queryCache||new Vce,this.#t=e.mutationCache||new qce,this.#r=e.defaultOptions||{},this.#n=new Map,this.#a=new Map,this.#o=0}mount(){this.#o++,this.#o===1&&(this.#i=hA.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#u=k1.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#o--,this.#o===0&&(this.#i?.(),this.#i=void 0,this.#u?.(),this.#u=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#t.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(bd(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),o=this.#e.get(r.queryHash)?.state.data,a=$ce(t,o);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return Ur.batch(()=>this.#e.findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){const t=this.#e;Ur.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=this.#e,r={type:"active",...e};return Ur.batch(()=>(n.findAll(e).forEach(i=>{i.reset()}),this.refetchQueries(r,t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Ur.batch(()=>this.#e.findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(ra).catch(ra)}invalidateQueries(e,t={}){return Ur.batch(()=>{if(this.#e.findAll(e).forEach(r=>{r.invalidate()}),e?.refetchType==="none")return Promise.resolve();const n={...e,type:e?.refetchType??e?.type??"active"};return this.refetchQueries(n,t)})}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=Ur.batch(()=>this.#e.findAll(e).filter(i=>!i.isDisabled()).map(i=>{let o=i.fetch(void 0,n);return n.throwOnError||(o=o.catch(ra)),i.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(r).then(ra)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=this.#e.build(this,t);return n.isStaleByTime(bd(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(ra).catch(ra)}fetchInfiniteQuery(e){return e.behavior=DM(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(ra).catch(ra)}ensureInfiniteQueryData(e){return e.behavior=DM(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return k1.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#r}setDefaultOptions(e){this.#r=e}setQueryDefaults(e,t){this.#n.set(Uc(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#n.values()],n={};return t.forEach(r=>{U0(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){this.#a.set(Uc(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#a.values()];let n={};return t.forEach(r=>{U0(e,r.mutationKey)&&(n={...n,...r.defaultOptions})}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#r.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=fA(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===dA&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#r.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},Gce=class extends Oh{constructor(e,t){super(),this.options=t,this.#e=e,this.#u=null,this.#i=RC(),this.options.experimental_prefetchInRender||this.#i.reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#r=void 0;#n=void 0;#a;#o;#i;#u;#v;#d;#h;#l;#c;#s;#p=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),IM(this.#t,this.options)?this.#f():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return DC(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return DC(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#x(),this.#w(),this.#t.removeObserver(this)}setOptions(e,t){const n=this.options,r=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Ia(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#_(),this.#t.setOptions(this.options),n._defaulted&&!O1(this.options,n)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const i=this.hasListeners();i&&NM(this.#t,r,this.options,n)&&this.#f(),this.updateResult(t),i&&(this.#t!==r||Ia(this.options.enabled,this.#t)!==Ia(n.enabled,this.#t)||bd(this.options.staleTime,this.#t)!==bd(n.staleTime,this.#t))&&this.#g();const o=this.#m();i&&(this.#t!==r||Ia(this.options.enabled,this.#t)!==Ia(n.enabled,this.#t)||o!==this.#s)&&this.#y(o)}getOptimisticResult(e){const t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return Zce(this,n)&&(this.#n=n,this.#o=this.options,this.#a=this.#t.state),n}getCurrentResult(){return this.#n}trackResult(e,t){const n={};return Object.keys(e).forEach(r=>{Object.defineProperty(n,r,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(r),t?.(r),e[r])})}),n}trackProp(e){this.#p.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#f({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#n))}#f(e){this.#_();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(ra)),t}#g(){this.#x();const e=bd(this.options.staleTime,this.#t);if(zc||this.#n.isStale||!kC(e))return;const n=JL(this.#n.dataUpdatedAt,e)+1;this.#l=setTimeout(()=>{this.#n.isStale||this.updateResult()},n)}#m(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#y(e){this.#w(),this.#s=e,!(zc||Ia(this.options.enabled,this.#t)===!1||!kC(this.#s)||this.#s===0)&&(this.#c=setInterval(()=>{(this.options.refetchIntervalInBackground||hA.isFocused())&&this.#f()},this.#s))}#b(){this.#g(),this.#y(this.#m())}#x(){this.#l&&(clearTimeout(this.#l),this.#l=void 0)}#w(){this.#c&&(clearInterval(this.#c),this.#c=void 0)}createResult(e,t){const n=this.#t,r=this.options,i=this.#n,o=this.#a,a=this.#o,s=e!==n?e.state:this.#r,{state:l}=e;let c={...l},d=!1,h;if(t._optimisticResults){const T=this.hasListeners(),M=!T&&IM(e,t),F=T&&NM(e,n,t,r);(M||F)&&(c={...c,...aj(l.data,e.options)}),t._optimisticResults==="isRestoring"&&(c.fetchStatus="idle")}let{error:v,errorUpdatedAt:g,status:m}=c;if(t.select&&c.data!==void 0)if(i&&c.data===o?.data&&t.select===this.#v)h=this.#d;else try{this.#v=t.select,h=t.select(c.data),h=MC(i?.data,h,t),this.#d=h,this.#u=null}catch(T){this.#u=T}else h=c.data;if(t.placeholderData!==void 0&&h===void 0&&m==="pending"){let T;if(i?.isPlaceholderData&&t.placeholderData===a?.placeholderData)T=i.data;else if(T=typeof t.placeholderData=="function"?t.placeholderData(this.#h?.state.data,this.#h):t.placeholderData,t.select&&T!==void 0)try{T=t.select(T),this.#u=null}catch(M){this.#u=M}T!==void 0&&(m="success",h=MC(i?.data,T,t),d=!0)}this.#u&&(v=this.#u,h=this.#d,g=Date.now(),m="error");const b=c.fetchStatus==="fetching",w=m==="pending",x=m==="error",S=w&&b,A=h!==void 0,C={status:m,fetchStatus:c.fetchStatus,isPending:w,isSuccess:m==="success",isError:x,isInitialLoading:S,isLoading:S,data:h,dataUpdatedAt:c.dataUpdatedAt,error:v,errorUpdatedAt:g,failureCount:c.fetchFailureCount,failureReason:c.fetchFailureReason,errorUpdateCount:c.errorUpdateCount,isFetched:c.dataUpdateCount>0||c.errorUpdateCount>0,isFetchedAfterMount:c.dataUpdateCount>s.dataUpdateCount||c.errorUpdateCount>s.errorUpdateCount,isFetching:b,isRefetching:b&&!w,isLoadingError:x&&!A,isPaused:c.fetchStatus==="paused",isPlaceholderData:d,isRefetchError:x&&A,isStale:pA(e,t),refetch:this.refetch,promise:this.#i};if(this.options.experimental_prefetchInRender){const T=U=>{C.status==="error"?U.reject(C.error):C.data!==void 0&&U.resolve(C.data)},M=()=>{const U=this.#i=C.promise=RC();T(U)},F=this.#i;switch(F.status){case"pending":e.queryHash===n.queryHash&&T(F);break;case"fulfilled":(C.status==="error"||C.data!==F.value)&&M();break;case"rejected":(C.status!=="error"||C.error!==F.reason)&&M();break}}return C}updateResult(e){const t=this.#n,n=this.createResult(this.#t,this.options);if(this.#a=this.#t.state,this.#o=this.options,this.#a.data!==void 0&&(this.#h=this.#t),O1(n,t))return;this.#n=n;const r={},i=()=>{if(!t)return!0;const{notifyOnChangeProps:o}=this.options,a=typeof o=="function"?o():o;if(a==="all"||!a&&!this.#p.size)return!0;const u=new Set(a??this.#p);return this.options.throwOnError&&u.add("error"),Object.keys(this.#n).some(s=>{const l=s;return this.#n[l]!==t[l]&&u.has(l)})};e?.listeners!==!1&&i()&&(r.listeners=!0),this.#S({...r,...e})}#_(){const e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;const t=this.#t;this.#t=e,this.#r=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#b()}#S(e){Ur.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#n)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function Yce(e,t){return Ia(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function IM(e,t){return Yce(e,t)||e.state.data!==void 0&&DC(e,t,t.refetchOnMount)}function DC(e,t,n){if(Ia(t.enabled,e)!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&pA(e,t)}return!1}function NM(e,t,n,r){return(e!==t||Ia(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&pA(e,n)}function pA(e,t){return Ia(t.enabled,e)!==!1&&e.isStaleByTime(bd(t.staleTime,e))}function Zce(e,t){return!O1(e.getCurrentResult(),t)}var Xce=class extends Oh{#e;#t=void 0;#r;#n;constructor(t,n){super(),this.#e=t,this.setOptions(n),this.bindMethods(),this.#a()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const n=this.options;this.options=this.#e.defaultMutationOptions(t),O1(this.options,n)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#r,observer:this}),n?.mutationKey&&this.options.mutationKey&&Uc(n.mutationKey)!==Uc(this.options.mutationKey)?this.reset():this.#r?.state.status==="pending"&&this.#r.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#r?.removeObserver(this)}onMutationUpdate(t){this.#a(),this.#o(t)}getCurrentResult(){return this.#t}reset(){this.#r?.removeObserver(this),this.#r=void 0,this.#a(),this.#o()}mutate(t,n){return this.#n=n,this.#r?.removeObserver(this),this.#r=this.#e.getMutationCache().build(this.#e,this.options),this.#r.addObserver(this),this.#r.execute(t)}#a(){const t=this.#r?.state??uj();this.#t={...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset}}#o(t){Ur.batch(()=>{if(this.#n&&this.hasListeners()){const n=this.#t.variables,r=this.#t.context;t?.type==="success"?(this.#n.onSuccess?.(t.data,n,r),this.#n.onSettled?.(t.data,null,n,r)):t?.type==="error"&&(this.#n.onError?.(t.error,n,r),this.#n.onSettled?.(void 0,t.error,n,r))}this.listeners.forEach(n=>{n(this.#t)})})}},sj=y.createContext(void 0),lj=e=>{const t=y.useContext(sj);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},IKe=({client:e,children:t})=>(y.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),I.jsx(sj.Provider,{value:e,children:t})),cj=y.createContext(!1),Qce=()=>y.useContext(cj);cj.Provider;function Jce(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var efe=y.createContext(Jce()),tfe=()=>y.useContext(efe);function fj(e,t){return typeof e=="function"?e(...t):!!e}function $C(){}var nfe=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},rfe=e=>{y.useEffect(()=>{e.clearReset()},[e])},ife=({result:e,errorResetBoundary:t,throwOnError:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&fj(n,[e.error,r]),ofe=e=>{e.suspense&&(e.staleTime===void 0&&(e.staleTime=1e3),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3)))},afe=(e,t)=>e.isLoading&&e.isFetching&&!t,ufe=(e,t)=>e?.suspense&&t.isPending,FM=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function sfe(e,t,n){const r=lj(),i=Qce(),o=tfe(),a=r.defaultQueryOptions(e);r.getDefaultOptions().queries?._experimental_beforeQuery?.(a),a._optimisticResults=i?"isRestoring":"optimistic",ofe(a),nfe(a,o),rfe(o);const u=!r.getQueryCache().get(a.queryHash),[s]=y.useState(()=>new t(r,a)),l=s.getOptimisticResult(a);if(y.useSyncExternalStore(y.useCallback(c=>{const d=i?$C:s.subscribe(Ur.batchCalls(c));return s.updateResult(),d},[s,i]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),y.useEffect(()=>{s.setOptions(a,{listeners:!1})},[a,s]),ufe(a,l))throw FM(a,s,o);if(ife({result:l,errorResetBoundary:o,throwOnError:a.throwOnError,query:r.getQueryCache().get(a.queryHash)}))throw l.error;return r.getDefaultOptions().queries?._experimental_afterQuery?.(a,l),a.experimental_prefetchInRender&&!zc&&afe(l,i)&&(u?FM(a,s,o):r.getQueryCache().get(a.queryHash)?.promise)?.catch($C).finally(()=>{s.updateResult()}),a.notifyOnChangeProps?l:s.trackResult(l)}function NKe(e,t){return sfe(e,Gce)}function FKe(e,t){const n=lj(),[r]=y.useState(()=>new Xce(n,e));y.useEffect(()=>{r.setOptions(e)},[r,e]);const i=y.useSyncExternalStore(y.useCallback(a=>r.subscribe(Ur.batchCalls(a)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),o=y.useCallback((a,u)=>{r.mutate(a,u).catch($C)},[r]);if(i.error&&fj(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:o,mutateAsync:i.mutate}}var ug=e=>e.type==="checkbox",yc=e=>e instanceof Date,zi=e=>e==null;const dj=e=>typeof e=="object";var Ar=e=>!zi(e)&&!Array.isArray(e)&&dj(e)&&!yc(e),hj=e=>Ar(e)&&e.target?ug(e.target)?e.target.checked:e.target.value:e,lfe=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,pj=(e,t)=>e.has(lfe(t)),cfe=e=>{const t=e.constructor&&e.constructor.prototype;return Ar(t)&&t.hasOwnProperty("isPrototypeOf")},vA=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function eo(e){let t;const n=Array.isArray(e),r=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(vA&&(e instanceof Blob||r))&&(n||Ar(e)))if(t=n?[]:{},!n&&!cfe(e))t=e;else for(const i in e)e.hasOwnProperty(i)&&(t[i]=eo(e[i]));else return e;return t}var Nx=e=>Array.isArray(e)?e.filter(Boolean):[],Sr=e=>e===void 0,Xe=(e,t,n)=>{if(!t||!Ar(e))return n;const r=Nx(t.split(/[,[\].]+?/)).reduce((i,o)=>zi(i)?i:i[o],e);return Sr(r)||r===e?Sr(e[t])?n:e[t]:r},ia=e=>typeof e=="boolean",gA=e=>/^\w*$/.test(e),vj=e=>Nx(e.replace(/["|']|\]/g,"").split(/\.|\[/)),An=(e,t,n)=>{let r=-1;const i=gA(t)?[t]:vj(t),o=i.length,a=o-1;for(;++rj.useContext(gj),LKe=e=>{const{children:t,...n}=e;return j.createElement(gj.Provider,{value:n},t)};var mj=(e,t,n,r=!0)=>{const i={defaultValues:t._defaultValues};for(const o in e)Object.defineProperty(i,o,{get:()=>{const a=o;return t._proxyFormState[a]!==Fa.all&&(t._proxyFormState[a]=!r||Fa.all),n&&(n[a]=!0),e[a]}});return i},no=e=>Ar(e)&&!Object.keys(e).length,yj=(e,t,n,r)=>{n(e);const{name:i,...o}=e;return no(o)||Object.keys(o).length>=Object.keys(t).length||Object.keys(o).find(a=>t[a]===(!r||Fa.all))},l0=e=>Array.isArray(e)?e:[e],bj=(e,t,n)=>!e||!t||e===t||l0(e).some(r=>r&&(n?r===t:r.startsWith(t)||t.startsWith(r)));function yA(e){const t=j.useRef(e);t.current=e,j.useEffect(()=>{const n=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{n&&n.unsubscribe()}},[e.disabled])}function ffe(e){const t=mA(),{control:n=t.control,disabled:r,name:i,exact:o}=e,[a,u]=j.useState(n._formState),s=j.useRef(!0),l=j.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),c=j.useRef(i);return c.current=i,yA({disabled:r,next:d=>s.current&&bj(c.current,d.name,o)&&yj(d,l.current,n._updateFormState)&&u({...n._formState,...d}),subject:n._subjects.state}),j.useEffect(()=>(s.current=!0,l.current.isValid&&n._updateValid(!0),()=>{s.current=!1}),[n]),j.useMemo(()=>mj(a,n,l.current,!1),[a,n])}var hu=e=>typeof e=="string",xj=(e,t,n,r,i)=>hu(e)?(r&&t.watch.add(e),Xe(n,e,i)):Array.isArray(e)?e.map(o=>(r&&t.watch.add(o),Xe(n,o))):(r&&(t.watchAll=!0),n);function dfe(e){const t=mA(),{control:n=t.control,name:r,defaultValue:i,disabled:o,exact:a}=e,u=j.useRef(r);u.current=r,yA({disabled:o,subject:n._subjects.values,next:c=>{bj(u.current,c.name,a)&&l(eo(xj(u.current,n._names,c.values||n._formValues,!1,i)))}});const[s,l]=j.useState(n._getWatch(r,i));return j.useEffect(()=>n._removeUnmounted()),s}function hfe(e){const t=mA(),{name:n,disabled:r,control:i=t.control,shouldUnregister:o}=e,a=pj(i._names.array,n),u=dfe({control:i,name:n,defaultValue:Xe(i._formValues,n,Xe(i._defaultValues,n,e.defaultValue)),exact:!0}),s=ffe({control:i,name:n,exact:!0}),l=j.useRef(i.register(n,{...e.rules,value:u,...ia(e.disabled)?{disabled:e.disabled}:{}})),c=j.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!Xe(s.errors,n)},isDirty:{enumerable:!0,get:()=>!!Xe(s.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!Xe(s.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!Xe(s.validatingFields,n)},error:{enumerable:!0,get:()=>Xe(s.errors,n)}}),[s,n]),d=j.useMemo(()=>({name:n,value:u,...ia(r)||s.disabled?{disabled:s.disabled||r}:{},onChange:h=>l.current.onChange({target:{value:hj(h),name:n},type:T1.CHANGE}),onBlur:()=>l.current.onBlur({target:{value:Xe(i._formValues,n),name:n},type:T1.BLUR}),ref:h=>{const v=Xe(i._fields,n);v&&h&&(v._f.ref={focus:()=>h.focus(),select:()=>h.select(),setCustomValidity:g=>h.setCustomValidity(g),reportValidity:()=>h.reportValidity()})}}),[n,i._formValues,r,s.disabled,u,i._fields]);return j.useEffect(()=>{const h=i._options.shouldUnregister||o,v=(g,m)=>{const b=Xe(i._fields,g);b&&b._f&&(b._f.mount=m)};if(v(n,!0),h){const g=eo(Xe(i._options.defaultValues,n));An(i._defaultValues,n,g),Sr(Xe(i._formValues,n))&&An(i._formValues,n,g)}return!a&&i.register(n),()=>{(a?h&&!i._state.action:h)?i.unregister(n):v(n,!1)}},[n,i,a,o]),j.useEffect(()=>{i._updateDisabledField({disabled:r,fields:i._fields,name:n})},[r,n,i]),j.useMemo(()=>({field:d,formState:s,fieldState:c}),[d,s,c])}const jKe=e=>e.render(hfe(e));var wj=(e,t,n,r,i)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:i||!0}}:{},LM=e=>({isOnSubmit:!e||e===Fa.onSubmit,isOnBlur:e===Fa.onBlur,isOnChange:e===Fa.onChange,isOnAll:e===Fa.all,isOnTouch:e===Fa.onTouched}),jM=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const c0=(e,t,n,r)=>{for(const i of n||Object.keys(e)){const o=Xe(e,i);if(o){const{_f:a,...u}=o;if(a){if(a.refs&&a.refs[0]&&t(a.refs[0],i)&&!r)return!0;if(a.ref&&t(a.ref,a.name)&&!r)return!0;if(c0(u,t))break}else if(Ar(u)&&c0(u,t))break}}};var pfe=(e,t,n)=>{const r=l0(Xe(e,n));return An(r,"root",t[n]),An(e,n,r),e},bA=e=>e.type==="file",cu=e=>typeof e=="function",M1=e=>{if(!vA)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Fy=e=>hu(e),xA=e=>e.type==="radio",R1=e=>e instanceof RegExp;const BM={value:!1,isValid:!1},zM={value:!0,isValid:!0};var _j=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!Sr(e[0].attributes.value)?Sr(e[0].value)||e[0].value===""?zM:{value:e[0].value,isValid:!0}:zM:BM}return BM};const UM={isValid:!1,value:null};var Sj=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,UM):UM;function WM(e,t,n="validate"){if(Fy(e)||Array.isArray(e)&&e.every(Fy)||ia(e)&&!e)return{type:n,message:Fy(e)?e:"",ref:t}}var If=e=>Ar(e)&&!R1(e)?e:{value:e,message:""},VM=async(e,t,n,r,i,o)=>{const{ref:a,refs:u,required:s,maxLength:l,minLength:c,min:d,max:h,pattern:v,validate:g,name:m,valueAsNumber:b,mount:w}=e._f,x=Xe(n,m);if(!w||t.has(m))return{};const S=u?u[0]:a,A=W=>{i&&S.reportValidity&&(S.setCustomValidity(ia(W)?"":W||""),S.reportValidity())},E={},C=xA(a),T=ug(a),M=C||T,F=(b||bA(a))&&Sr(a.value)&&Sr(x)||M1(a)&&a.value===""||x===""||Array.isArray(x)&&!x.length,U=wj.bind(null,m,r,E),H=(W,ie,Z,G=Wu.maxLength,K=Wu.minLength)=>{const V=W?ie:Z;E[m]={type:W?G:K,message:V,ref:a,...U(W?G:K,V)}};if(o?!Array.isArray(x)||!x.length:s&&(!M&&(F||zi(x))||ia(x)&&!x||T&&!_j(u).isValid||C&&!Sj(u).isValid)){const{value:W,message:ie}=Fy(s)?{value:!!s,message:s}:If(s);if(W&&(E[m]={type:Wu.required,message:ie,ref:S,...U(Wu.required,ie)},!r))return A(ie),E}if(!F&&(!zi(d)||!zi(h))){let W,ie;const Z=If(h),G=If(d);if(!zi(x)&&!isNaN(x)){const K=a.valueAsNumber||x&&+x;zi(Z.value)||(W=K>Z.value),zi(G.value)||(ie=Knew Date(new Date().toDateString()+" "+Y),B=a.type=="time",q=a.type=="week";hu(Z.value)&&x&&(W=B?V(x)>V(Z.value):q?x>Z.value:K>new Date(Z.value)),hu(G.value)&&x&&(ie=B?V(x)+W.value,G=!zi(ie.value)&&x.length<+ie.value;if((Z||G)&&(H(Z,W.message,ie.message),!r))return A(E[m].message),E}if(v&&!F&&hu(x)){const{value:W,message:ie}=If(v);if(R1(W)&&!x.match(W)&&(E[m]={type:Wu.pattern,message:ie,ref:a,...U(Wu.pattern,ie)},!r))return A(ie),E}if(g){if(cu(g)){const W=await g(x,n),ie=WM(W,S);if(ie&&(E[m]={...ie,...U(Wu.validate,ie.message)},!r))return A(ie.message),E}else if(Ar(g)){let W={};for(const ie in g){if(!no(W)&&!r)break;const Z=WM(await g[ie](x,n),S,ie);Z&&(W={...Z,...U(ie,Z.message)},A(Z.message),r&&(E[m]=W))}if(!no(W)&&(E[m]={ref:S,...W},!r))return E}}return A(!0),E};function vfe(e,t){const n=t.slice(0,-1).length;let r=0;for(;r{let e=[];return{get observers(){return e},next:i=>{for(const o of e)o.next&&o.next(i)},subscribe:i=>(e.push(i),{unsubscribe:()=>{e=e.filter(o=>o!==i)}}),unsubscribe:()=>{e=[]}}},IC=e=>zi(e)||!dj(e);function Qs(e,t){if(IC(e)||IC(t))return e===t;if(yc(e)&&yc(t))return e.getTime()===t.getTime();const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const i of n){const o=e[i];if(!r.includes(i))return!1;if(i!=="ref"){const a=t[i];if(yc(o)&&yc(a)||Ar(o)&&Ar(a)||Array.isArray(o)&&Array.isArray(a)?!Qs(o,a):o!==a)return!1}}return!0}var Cj=e=>e.type==="select-multiple",mfe=e=>xA(e)||ug(e),X_=e=>M1(e)&&e.isConnected,Ej=e=>{for(const t in e)if(cu(e[t]))return!0;return!1};function D1(e,t={}){const n=Array.isArray(e);if(Ar(e)||n)for(const r in e)Array.isArray(e[r])||Ar(e[r])&&!Ej(e[r])?(t[r]=Array.isArray(e[r])?[]:{},D1(e[r],t[r])):zi(e[r])||(t[r]=!0);return t}function Aj(e,t,n){const r=Array.isArray(e);if(Ar(e)||r)for(const i in e)Array.isArray(e[i])||Ar(e[i])&&!Ej(e[i])?Sr(t)||IC(n[i])?n[i]=Array.isArray(e[i])?D1(e[i],[]):{...D1(e[i])}:Aj(e[i],zi(t)?{}:t[i],n[i]):n[i]=!Qs(e[i],t[i]);return n}var Ap=(e,t)=>Aj(e,t,D1(t)),Pj=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>Sr(e)?e:t?e===""?NaN:e&&+e:n&&hu(e)?new Date(e):r?r(e):e;function Q_(e){const t=e.ref;return bA(t)?t.files:xA(t)?Sj(e.refs).value:Cj(t)?[...t.selectedOptions].map(({value:n})=>n):ug(t)?_j(e.refs).value:Pj(Sr(t.value)?e.ref.value:t.value,e)}var yfe=(e,t,n,r)=>{const i={};for(const o of e){const a=Xe(t,o);a&&An(i,o,a._f)}return{criteriaMode:n,names:[...e],fields:i,shouldUseNativeValidation:r}},Pp=e=>Sr(e)?e:R1(e)?e.source:Ar(e)?R1(e.value)?e.value.source:e.value:e;const HM="AsyncFunction";var bfe=e=>!!e&&!!e.validate&&!!(cu(e.validate)&&e.validate.constructor.name===HM||Ar(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===HM)),xfe=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function qM(e,t,n){const r=Xe(e,n);if(r||gA(n))return{error:r,name:n};const i=n.split(".");for(;i.length;){const o=i.join("."),a=Xe(t,o),u=Xe(e,o);if(a&&!Array.isArray(a)&&n!==o)return{name:n};if(u&&u.type)return{name:o,error:u};i.pop()}return{name:n}}var wfe=(e,t,n,r,i)=>i.isOnAll?!1:!n&&i.isOnTouch?!(t||e):(n?r.isOnBlur:i.isOnBlur)?!e:(n?r.isOnChange:i.isOnChange)?e:!0,_fe=(e,t)=>!Nx(Xe(e,t)).length&&Br(e,t);const Sfe={mode:Fa.onSubmit,reValidateMode:Fa.onChange,shouldFocusError:!0};function Cfe(e={}){let t={...Sfe,...e},n={submitCount:0,isDirty:!1,isLoading:cu(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},r={},i=Ar(t.defaultValues)||Ar(t.values)?eo(t.defaultValues||t.values)||{}:{},o=t.shouldUnregister?{}:eo(i),a={action:!1,mount:!1,watch:!1},u={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},s,l=0;const c={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},d={values:Z_(),array:Z_(),state:Z_()},h=LM(t.mode),v=LM(t.reValidateMode),g=t.criteriaMode===Fa.all,m=re=>pe=>{clearTimeout(l),l=setTimeout(re,pe)},b=async re=>{if(!t.disabled&&(c.isValid||re)){const pe=t.resolver?no((await M()).errors):await U(r,!0);pe!==n.isValid&&d.state.next({isValid:pe})}},w=(re,pe)=>{!t.disabled&&(c.isValidating||c.validatingFields)&&((re||Array.from(u.mount)).forEach(ye=>{ye&&(pe?An(n.validatingFields,ye,pe):Br(n.validatingFields,ye))}),d.state.next({validatingFields:n.validatingFields,isValidating:!no(n.validatingFields)}))},x=(re,pe=[],ye,Ue,je=!0,ke=!0)=>{if(Ue&&ye&&!t.disabled){if(a.action=!0,ke&&Array.isArray(Xe(r,re))){const nt=ye(Xe(r,re),Ue.argA,Ue.argB);je&&An(r,re,nt)}if(ke&&Array.isArray(Xe(n.errors,re))){const nt=ye(Xe(n.errors,re),Ue.argA,Ue.argB);je&&An(n.errors,re,nt),_fe(n.errors,re)}if(c.touchedFields&&ke&&Array.isArray(Xe(n.touchedFields,re))){const nt=ye(Xe(n.touchedFields,re),Ue.argA,Ue.argB);je&&An(n.touchedFields,re,nt)}c.dirtyFields&&(n.dirtyFields=Ap(i,o)),d.state.next({name:re,isDirty:W(re,pe),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else An(o,re,pe)},S=(re,pe)=>{An(n.errors,re,pe),d.state.next({errors:n.errors})},A=re=>{n.errors=re,d.state.next({errors:n.errors,isValid:!1})},E=(re,pe,ye,Ue)=>{const je=Xe(r,re);if(je){const ke=Xe(o,re,Sr(ye)?Xe(i,re):ye);Sr(ke)||Ue&&Ue.defaultChecked||pe?An(o,re,pe?ke:Q_(je._f)):G(re,ke),a.mount&&b()}},C=(re,pe,ye,Ue,je)=>{let ke=!1,nt=!1;const gt={name:re};if(!t.disabled){const bn=!!(Xe(r,re)&&Xe(r,re)._f&&Xe(r,re)._f.disabled);if(!ye||Ue){c.isDirty&&(nt=n.isDirty,n.isDirty=gt.isDirty=W(),ke=nt!==gt.isDirty);const Vt=bn||Qs(Xe(i,re),pe);nt=!!(!bn&&Xe(n.dirtyFields,re)),Vt||bn?Br(n.dirtyFields,re):An(n.dirtyFields,re,!0),gt.dirtyFields=n.dirtyFields,ke=ke||c.dirtyFields&&nt!==!Vt}if(ye){const Vt=Xe(n.touchedFields,re);Vt||(An(n.touchedFields,re,ye),gt.touchedFields=n.touchedFields,ke=ke||c.touchedFields&&Vt!==ye)}ke&&je&&d.state.next(gt)}return ke?gt:{}},T=(re,pe,ye,Ue)=>{const je=Xe(n.errors,re),ke=c.isValid&&ia(pe)&&n.isValid!==pe;if(t.delayError&&ye?(s=m(()=>S(re,ye)),s(t.delayError)):(clearTimeout(l),s=null,ye?An(n.errors,re,ye):Br(n.errors,re)),(ye?!Qs(je,ye):je)||!no(Ue)||ke){const nt={...Ue,...ke&&ia(pe)?{isValid:pe}:{},errors:n.errors,name:re};n={...n,...nt},d.state.next(nt)}},M=async re=>{w(re,!0);const pe=await t.resolver(o,t.context,yfe(re||u.mount,r,t.criteriaMode,t.shouldUseNativeValidation));return w(re),pe},F=async re=>{const{errors:pe}=await M(re);if(re)for(const ye of re){const Ue=Xe(pe,ye);Ue?An(n.errors,ye,Ue):Br(n.errors,ye)}else n.errors=pe;return pe},U=async(re,pe,ye={valid:!0})=>{for(const Ue in re){const je=re[Ue];if(je){const{_f:ke,...nt}=je;if(ke){const gt=u.array.has(ke.name),bn=je._f&&bfe(je._f);bn&&c.validatingFields&&w([Ue],!0);const Vt=await VM(je,u.disabled,o,g,t.shouldUseNativeValidation&&!pe,gt);if(bn&&c.validatingFields&&w([Ue]),Vt[ke.name]&&(ye.valid=!1,pe))break;!pe&&(Xe(Vt,ke.name)?gt?pfe(n.errors,Vt,ke.name):An(n.errors,ke.name,Vt[ke.name]):Br(n.errors,ke.name))}!no(nt)&&await U(nt,pe,ye)}}return ye.valid},H=()=>{for(const re of u.unMount){const pe=Xe(r,re);pe&&(pe._f.refs?pe._f.refs.every(ye=>!X_(ye)):!X_(pe._f.ref))&&Se(re)}u.unMount=new Set},W=(re,pe)=>!t.disabled&&(re&&pe&&An(o,re,pe),!Qs(ue(),i)),ie=(re,pe,ye)=>xj(re,u,{...a.mount?o:Sr(pe)?i:hu(re)?{[re]:pe}:pe},ye,pe),Z=re=>Nx(Xe(a.mount?o:i,re,t.shouldUnregister?Xe(i,re,[]):[])),G=(re,pe,ye={})=>{const Ue=Xe(r,re);let je=pe;if(Ue){const ke=Ue._f;ke&&(!ke.disabled&&An(o,re,Pj(pe,ke)),je=M1(ke.ref)&&zi(pe)?"":pe,Cj(ke.ref)?[...ke.ref.options].forEach(nt=>nt.selected=je.includes(nt.value)):ke.refs?ug(ke.ref)?ke.refs.length>1?ke.refs.forEach(nt=>(!nt.defaultChecked||!nt.disabled)&&(nt.checked=Array.isArray(je)?!!je.find(gt=>gt===nt.value):je===nt.value)):ke.refs[0]&&(ke.refs[0].checked=!!je):ke.refs.forEach(nt=>nt.checked=nt.value===je):bA(ke.ref)?ke.ref.value="":(ke.ref.value=je,ke.ref.type||d.values.next({name:re,values:{...o}})))}(ye.shouldDirty||ye.shouldTouch)&&C(re,je,ye.shouldTouch,ye.shouldDirty,!0),ye.shouldValidate&&Y(re)},K=(re,pe,ye)=>{for(const Ue in pe){const je=pe[Ue],ke=`${re}.${Ue}`,nt=Xe(r,ke);(u.array.has(re)||Ar(je)||nt&&!nt._f)&&!yc(je)?K(ke,je,ye):G(ke,je,ye)}},V=(re,pe,ye={})=>{const Ue=Xe(r,re),je=u.array.has(re),ke=eo(pe);An(o,re,ke),je?(d.array.next({name:re,values:{...o}}),(c.isDirty||c.dirtyFields)&&ye.shouldDirty&&d.state.next({name:re,dirtyFields:Ap(i,o),isDirty:W(re,ke)})):Ue&&!Ue._f&&!zi(ke)?K(re,ke,ye):G(re,ke,ye),jM(re,u)&&d.state.next({...n}),d.values.next({name:a.mount?re:void 0,values:{...o}})},B=async re=>{a.mount=!0;const pe=re.target;let ye=pe.name,Ue=!0;const je=Xe(r,ye),ke=()=>pe.type?Q_(je._f):hj(re),nt=gt=>{Ue=Number.isNaN(gt)||yc(gt)&&isNaN(gt.getTime())||Qs(gt,Xe(o,ye,gt))};if(je){let gt,bn;const Vt=ke(),xn=re.type===T1.BLUR||re.type===T1.FOCUS_OUT,Ii=!xfe(je._f)&&!t.resolver&&!Xe(n.errors,ye)&&!je._f.deps||wfe(xn,Xe(n.touchedFields,ye),n.isSubmitted,v,h),br=jM(ye,u,xn);An(o,ye,Vt),xn?(je._f.onBlur&&je._f.onBlur(re),s&&s(0)):je._f.onChange&&je._f.onChange(re);const yi=C(ye,Vt,xn,!1),ar=!no(yi)||br;if(!xn&&d.values.next({name:ye,type:re.type,values:{...o}}),Ii)return c.isValid&&(t.mode==="onBlur"&&xn?b():xn||b()),ar&&d.state.next({name:ye,...br?{}:yi});if(!xn&&br&&d.state.next({...n}),t.resolver){const{errors:ui}=await M([ye]);if(nt(Vt),Ue){const bi=qM(n.errors,r,ye),Rr=qM(ui,r,bi.name||ye);gt=Rr.error,ye=Rr.name,bn=no(ui)}}else w([ye],!0),gt=(await VM(je,u.disabled,o,g,t.shouldUseNativeValidation))[ye],w([ye]),nt(Vt),Ue&&(gt?bn=!1:c.isValid&&(bn=await U(r,!0)));Ue&&(je._f.deps&&Y(je._f.deps),T(ye,bn,gt,yi))}},q=(re,pe)=>{if(Xe(n.errors,pe)&&re.focus)return re.focus(),1},Y=async(re,pe={})=>{let ye,Ue;const je=l0(re);if(t.resolver){const ke=await F(Sr(re)?re:je);ye=no(ke),Ue=re?!je.some(nt=>Xe(ke,nt)):ye}else re?(Ue=(await Promise.all(je.map(async ke=>{const nt=Xe(r,ke);return await U(nt&&nt._f?{[ke]:nt}:nt)}))).every(Boolean),!(!Ue&&!n.isValid)&&b()):Ue=ye=await U(r);return d.state.next({...!hu(re)||c.isValid&&ye!==n.isValid?{}:{name:re},...t.resolver||!re?{isValid:ye}:{},errors:n.errors}),pe.shouldFocus&&!Ue&&c0(r,q,re?je:u.mount),Ue},ue=re=>{const pe={...a.mount?o:i};return Sr(re)?pe:hu(re)?Xe(pe,re):re.map(ye=>Xe(pe,ye))},Q=(re,pe)=>({invalid:!!Xe((pe||n).errors,re),isDirty:!!Xe((pe||n).dirtyFields,re),error:Xe((pe||n).errors,re),isValidating:!!Xe(n.validatingFields,re),isTouched:!!Xe((pe||n).touchedFields,re)}),J=re=>{re&&l0(re).forEach(pe=>Br(n.errors,pe)),d.state.next({errors:re?n.errors:{}})},se=(re,pe,ye)=>{const Ue=(Xe(r,re,{_f:{}})._f||{}).ref,je=Xe(n.errors,re)||{},{ref:ke,message:nt,type:gt,...bn}=je;An(n.errors,re,{...bn,...pe,ref:Ue}),d.state.next({name:re,errors:n.errors,isValid:!1}),ye&&ye.shouldFocus&&Ue&&Ue.focus&&Ue.focus()},de=(re,pe)=>cu(re)?d.values.subscribe({next:ye=>re(ie(void 0,pe),ye)}):ie(re,pe,!0),Se=(re,pe={})=>{for(const ye of re?l0(re):u.mount)u.mount.delete(ye),u.array.delete(ye),pe.keepValue||(Br(r,ye),Br(o,ye)),!pe.keepError&&Br(n.errors,ye),!pe.keepDirty&&Br(n.dirtyFields,ye),!pe.keepTouched&&Br(n.touchedFields,ye),!pe.keepIsValidating&&Br(n.validatingFields,ye),!t.shouldUnregister&&!pe.keepDefaultValue&&Br(i,ye);d.values.next({values:{...o}}),d.state.next({...n,...pe.keepDirty?{isDirty:W()}:{}}),!pe.keepIsValid&&b()},ge=({disabled:re,name:pe,field:ye,fields:Ue})=>{(ia(re)&&a.mount||re||u.disabled.has(pe))&&(re?u.disabled.add(pe):u.disabled.delete(pe),C(pe,Q_(ye?ye._f:Xe(Ue,pe)._f),!1,!1,!0))},Ze=(re,pe={})=>{let ye=Xe(r,re);const Ue=ia(pe.disabled)||ia(t.disabled);return An(r,re,{...ye||{},_f:{...ye&&ye._f?ye._f:{ref:{name:re}},name:re,mount:!0,...pe}}),u.mount.add(re),ye?ge({field:ye,disabled:ia(pe.disabled)?pe.disabled:t.disabled,name:re}):E(re,!0,pe.value),{...Ue?{disabled:pe.disabled||t.disabled}:{},...t.progressive?{required:!!pe.required,min:Pp(pe.min),max:Pp(pe.max),minLength:Pp(pe.minLength),maxLength:Pp(pe.maxLength),pattern:Pp(pe.pattern)}:{},name:re,onChange:B,onBlur:B,ref:je=>{if(je){Ze(re,pe),ye=Xe(r,re);const ke=Sr(je.value)&&je.querySelectorAll&&je.querySelectorAll("input,select,textarea")[0]||je,nt=mfe(ke),gt=ye._f.refs||[];if(nt?gt.find(bn=>bn===ke):ke===ye._f.ref)return;An(r,re,{_f:{...ye._f,...nt?{refs:[...gt.filter(X_),ke,...Array.isArray(Xe(i,re))?[{}]:[]],ref:{type:ke.type,name:re}}:{ref:ke}}}),E(re,!1,void 0,ke)}else ye=Xe(r,re,{}),ye._f&&(ye._f.mount=!1),(t.shouldUnregister||pe.shouldUnregister)&&!(pj(u.array,re)&&a.action)&&u.unMount.add(re)}}},Pe=()=>t.shouldFocusError&&c0(r,q,u.mount),Fe=re=>{ia(re)&&(d.state.next({disabled:re}),c0(r,(pe,ye)=>{const Ue=Xe(r,ye);Ue&&(pe.disabled=Ue._f.disabled||re,Array.isArray(Ue._f.refs)&&Ue._f.refs.forEach(je=>{je.disabled=Ue._f.disabled||re}))},0,!1))},$e=(re,pe)=>async ye=>{let Ue;ye&&(ye.preventDefault&&ye.preventDefault(),ye.persist&&ye.persist());let je=eo(o);if(u.disabled.size)for(const ke of u.disabled)An(je,ke,void 0);if(d.state.next({isSubmitting:!0}),t.resolver){const{errors:ke,values:nt}=await M();n.errors=ke,je=nt}else await U(r);if(Br(n.errors,"root"),no(n.errors)){d.state.next({errors:{}});try{await re(je,ye)}catch(ke){Ue=ke}}else pe&&await pe({...n.errors},ye),Pe(),setTimeout(Pe);if(d.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:no(n.errors)&&!Ue,submitCount:n.submitCount+1,errors:n.errors}),Ue)throw Ue},be=(re,pe={})=>{Xe(r,re)&&(Sr(pe.defaultValue)?V(re,eo(Xe(i,re))):(V(re,pe.defaultValue),An(i,re,eo(pe.defaultValue))),pe.keepTouched||Br(n.touchedFields,re),pe.keepDirty||(Br(n.dirtyFields,re),n.isDirty=pe.defaultValue?W(re,eo(Xe(i,re))):W()),pe.keepError||(Br(n.errors,re),c.isValid&&b()),d.state.next({...n}))},yt=(re,pe={})=>{const ye=re?eo(re):i,Ue=eo(ye),je=no(re),ke=je?i:Ue;if(pe.keepDefaultValues||(i=ye),!pe.keepValues){if(pe.keepDirtyValues){const nt=new Set([...u.mount,...Object.keys(Ap(i,o))]);for(const gt of Array.from(nt))Xe(n.dirtyFields,gt)?An(ke,gt,Xe(o,gt)):V(gt,Xe(ke,gt))}else{if(vA&&Sr(re))for(const nt of u.mount){const gt=Xe(r,nt);if(gt&>._f){const bn=Array.isArray(gt._f.refs)?gt._f.refs[0]:gt._f.ref;if(M1(bn)){const Vt=bn.closest("form");if(Vt){Vt.reset();break}}}}r={}}o=t.shouldUnregister?pe.keepDefaultValues?eo(i):{}:eo(ke),d.array.next({values:{...ke}}),d.values.next({values:{...ke}})}u={mount:pe.keepDirtyValues?u.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},a.mount=!c.isValid||!!pe.keepIsValid||!!pe.keepDirtyValues,a.watch=!!t.shouldUnregister,d.state.next({submitCount:pe.keepSubmitCount?n.submitCount:0,isDirty:je?!1:pe.keepDirty?n.isDirty:!!(pe.keepDefaultValues&&!Qs(re,i)),isSubmitted:pe.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:je?{}:pe.keepDirtyValues?pe.keepDefaultValues&&o?Ap(i,o):n.dirtyFields:pe.keepDefaultValues&&re?Ap(i,re):pe.keepDirty?n.dirtyFields:{},touchedFields:pe.keepTouched?n.touchedFields:{},errors:pe.keepErrors?n.errors:{},isSubmitSuccessful:pe.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1})},lt=(re,pe)=>yt(cu(re)?re(o):re,pe);return{control:{register:Ze,unregister:Se,getFieldState:Q,handleSubmit:$e,setError:se,_executeSchema:M,_getWatch:ie,_getDirty:W,_updateValid:b,_removeUnmounted:H,_updateFieldArray:x,_updateDisabledField:ge,_getFieldArray:Z,_reset:yt,_resetDefaultValues:()=>cu(t.defaultValues)&&t.defaultValues().then(re=>{lt(re,t.resetOptions),d.state.next({isLoading:!1})}),_updateFormState:re=>{n={...n,...re}},_disableForm:Fe,_subjects:d,_proxyFormState:c,_setErrors:A,get _fields(){return r},get _formValues(){return o},get _state(){return a},set _state(re){a=re},get _defaultValues(){return i},get _names(){return u},set _names(re){u=re},get _formState(){return n},set _formState(re){n=re},get _options(){return t},set _options(re){t={...t,...re}}},trigger:Y,register:Ze,handleSubmit:$e,watch:de,setValue:V,getValues:ue,reset:lt,resetField:be,clearErrors:J,unregister:Se,setError:se,setFocus:(re,pe={})=>{const ye=Xe(r,re),Ue=ye&&ye._f;if(Ue){const je=Ue.refs?Ue.refs[0]:Ue.ref;je.focus&&(je.focus(),pe.shouldSelect&&cu(je.select)&&je.select())}},getFieldState:Q}}function BKe(e={}){const t=j.useRef(void 0),n=j.useRef(void 0),[r,i]=j.useState({isDirty:!1,isValidating:!1,isLoading:cu(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:cu(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...Cfe(e),formState:r});const o=t.current.control;return o._options=e,yA({subject:o._subjects.state,next:a=>{yj(a,o._proxyFormState,o._updateFormState,!0)&&i({...o._formState})}}),j.useEffect(()=>o._disableForm(e.disabled),[o,e.disabled]),j.useEffect(()=>{if(o._proxyFormState.isDirty){const a=o._getDirty();a!==r.isDirty&&o._subjects.state.next({isDirty:a})}},[o,r.isDirty]),j.useEffect(()=>{e.values&&!Qs(e.values,n.current)?(o._reset(e.values,o._options.resetOptions),n.current=e.values,i(a=>({...a}))):o._resetDefaultValues()},[e.values,o]),j.useEffect(()=>{e.errors&&o._setErrors(e.errors)},[e.errors,o]),j.useEffect(()=>{o._state.mount||(o._updateValid(),o._state.mount=!0),o._state.watch&&(o._state.watch=!1,o._subjects.state.next({...o._formState})),o._removeUnmounted()}),j.useEffect(()=>{e.shouldUnregister&&o._subjects.values.next({values:o._getWatch()})},[e.shouldUnregister,o]),t.current.formState=mj(r,o),t.current}var hn;(function(e){e.assertEqual=i=>i;function t(i){}e.assertIs=t;function n(i){throw new Error}e.assertNever=n,e.arrayToEnum=i=>{const o={};for(const a of i)o[a]=a;return o},e.getValidEnumValues=i=>{const o=e.objectKeys(i).filter(u=>typeof i[i[u]]!="number"),a={};for(const u of o)a[u]=i[u];return e.objectValues(a)},e.objectValues=i=>e.objectKeys(i).map(function(o){return i[o]}),e.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const o=[];for(const a in i)Object.prototype.hasOwnProperty.call(i,a)&&o.push(a);return o},e.find=(i,o)=>{for(const a of i)if(o(a))return a},e.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function r(i,o=" | "){return i.map(a=>typeof a=="string"?`'${a}'`:a).join(o)}e.joinValues=r,e.jsonStringifyReplacer=(i,o)=>typeof o=="bigint"?o.toString():o})(hn||(hn={}));var NC;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(NC||(NC={}));const it=hn.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Qu=e=>{switch(typeof e){case"undefined":return it.undefined;case"string":return it.string;case"number":return isNaN(e)?it.nan:it.number;case"boolean":return it.boolean;case"function":return it.function;case"bigint":return it.bigint;case"symbol":return it.symbol;case"object":return Array.isArray(e)?it.array:e===null?it.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?it.promise:typeof Map<"u"&&e instanceof Map?it.map:typeof Set<"u"&&e instanceof Set?it.set:typeof Date<"u"&&e instanceof Date?it.date:it.object;default:return it.unknown}},We=hn.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),Efe=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class Io extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}format(t){const n=t||function(o){return o.message},r={_errors:[]},i=o=>{for(const a of o.issues)if(a.code==="invalid_union")a.unionErrors.map(i);else if(a.code==="invalid_return_type")i(a.returnTypeError);else if(a.code==="invalid_arguments")i(a.argumentsError);else if(a.path.length===0)r._errors.push(n(a));else{let u=r,s=0;for(;sn.message){const n={},r=[];for(const i of this.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}Io.create=e=>new Io(e);const Bd=(e,t)=>{let n;switch(e.code){case We.invalid_type:e.received===it.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case We.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,hn.jsonStringifyReplacer)}`;break;case We.unrecognized_keys:n=`Unrecognized key(s) in object: ${hn.joinValues(e.keys,", ")}`;break;case We.invalid_union:n="Invalid input";break;case We.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${hn.joinValues(e.options)}`;break;case We.invalid_enum_value:n=`Invalid enum value. Expected ${hn.joinValues(e.options)}, received '${e.received}'`;break;case We.invalid_arguments:n="Invalid function arguments";break;case We.invalid_return_type:n="Invalid function return type";break;case We.invalid_date:n="Invalid date";break;case We.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:hn.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case We.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case We.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case We.custom:n="Invalid input";break;case We.invalid_intersection_types:n="Intersection results could not be merged";break;case We.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case We.not_finite:n="Number must be finite";break;default:n=t.defaultError,hn.assertNever(e)}return{message:n}};let Oj=Bd;function Afe(e){Oj=e}function $1(){return Oj}const I1=e=>{const{data:t,path:n,errorMaps:r,issueData:i}=e,o=[...n,...i.path||[]],a={...i,path:o};if(i.message!==void 0)return{...i,path:o,message:i.message};let u="";const s=r.filter(l=>!!l).slice().reverse();for(const l of s)u=l(a,{data:t,defaultError:u}).message;return{...i,path:o,message:u}},Pfe=[];function tt(e,t){const n=$1(),r=I1({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Bd?void 0:Bd].filter(i=>!!i)});e.common.issues.push(r)}class $i{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const i of n){if(i.status==="aborted")return Dt;i.status==="dirty"&&t.dirty(),r.push(i.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const i of n){const o=await i.key,a=await i.value;r.push({key:o,value:a})}return $i.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const i of n){const{key:o,value:a}=i;if(o.status==="aborted"||a.status==="aborted")return Dt;o.status==="dirty"&&t.dirty(),a.status==="dirty"&&t.dirty(),o.value!=="__proto__"&&(typeof a.value<"u"||i.alwaysSet)&&(r[o.value]=a.value)}return{status:t.value,value:r}}}const Dt=Object.freeze({status:"aborted"}),sd=e=>({status:"dirty",value:e}),Hi=e=>({status:"valid",value:e}),FC=e=>e.status==="aborted",LC=e=>e.status==="dirty",Wc=e=>e.status==="valid",W0=e=>typeof Promise<"u"&&e instanceof Promise;function N1(e,t,n,r){if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function kj(e,t,n,r,i){if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,n),n}var dt;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(dt||(dt={}));var Gp,Yp;class Eu{constructor(t,n,r,i){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=i}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const KM=(e,t)=>{if(Wc(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Io(e.common.issues);return this._error=n,this._error}}};function qt(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(a,u)=>{var s,l;const{message:c}=e;return a.code==="invalid_enum_value"?{message:c??u.defaultError}:typeof u.data>"u"?{message:(s=c??r)!==null&&s!==void 0?s:u.defaultError}:a.code!=="invalid_type"?{message:u.defaultError}:{message:(l=c??n)!==null&&l!==void 0?l:u.defaultError}},description:i}}class Qt{get description(){return this._def.description}_getType(t){return Qu(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Qu(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new $i,ctx:{common:t.parent.common,data:t.data,parsedType:Qu(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(W0(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const i={common:{issues:[],async:(r=n?.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n?.errorMap},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Qu(t)},o=this._parseSync({data:t,path:i.path,parent:i});return KM(i,o)}"~validate"(t){var n,r;const i={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Qu(t)};if(!this["~standard"].async)try{const o=this._parseSync({data:t,path:[],parent:i});return Wc(o)?{value:o.value}:{issues:i.common.issues}}catch(o){!((r=(n=o?.message)===null||n===void 0?void 0:n.toLowerCase())===null||r===void 0)&&r.includes("encountered")&&(this["~standard"].async=!0),i.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:i}).then(o=>Wc(o)?{value:o.value}:{issues:i.common.issues})}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n?.errorMap,async:!0},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Qu(t)},i=this._parse({data:t,path:r.path,parent:r}),o=await(W0(i)?i:Promise.resolve(i));return KM(r,o)}refine(t,n){const r=i=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(i):n;return this._refinement((i,o)=>{const a=t(i),u=()=>o.addIssue({code:We.custom,...r(i)});return typeof Promise<"u"&&a instanceof Promise?a.then(s=>s?!0:(u(),!1)):a?!0:(u(),!1)})}refinement(t,n){return this._refinement((r,i)=>t(r)?!0:(i.addIssue(typeof n=="function"?n(r,i):n),!1))}_refinement(t){return new Ka({schema:this,typeName:Tt.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return wu.create(this,this._def)}nullable(){return Pl.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Wa.create(this)}promise(){return Ud.create(this,this._def)}or(t){return K0.create([this,t],this._def)}and(t){return G0.create(this,t,this._def)}transform(t){return new Ka({...qt(this._def),schema:this,typeName:Tt.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new J0({...qt(this._def),innerType:this,defaultValue:n,typeName:Tt.ZodDefault})}brand(){return new wA({typeName:Tt.ZodBranded,type:this,...qt(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new ev({...qt(this._def),innerType:this,catchValue:n,typeName:Tt.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return sg.create(this,t)}readonly(){return tv.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Ofe=/^c[^\s-]{8,}$/i,kfe=/^[0-9a-z]+$/,Tfe=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Mfe=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Rfe=/^[a-z0-9_-]{21}$/i,Dfe=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,$fe=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Ife=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Nfe="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let J_;const Ffe=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Lfe=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,jfe=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,Bfe=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,zfe=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Ufe=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Tj="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",Wfe=new RegExp(`^${Tj}$`);function Mj(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`),t}function Vfe(e){return new RegExp(`^${Mj(e)}$`)}function Rj(e){let t=`${Tj}T${Mj(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function Hfe(e,t){return!!((t==="v4"||!t)&&Ffe.test(e)||(t==="v6"||!t)&&jfe.test(e))}function qfe(e,t){if(!Dfe.test(e))return!1;try{const[n]=e.split("."),r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),i=JSON.parse(atob(r));return!(typeof i!="object"||i===null||!i.typ||!i.alg||t&&i.alg!==t)}catch{return!1}}function Kfe(e,t){return!!((t==="v4"||!t)&&Lfe.test(e)||(t==="v6"||!t)&&Bfe.test(e))}class ja extends Qt{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==it.string){const o=this._getOrReturnCtx(t);return tt(o,{code:We.invalid_type,expected:it.string,received:o.parsedType}),Dt}const r=new $i;let i;for(const o of this._def.checks)if(o.kind==="min")t.data.lengtho.value&&(i=this._getOrReturnCtx(t,i),tt(i,{code:We.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="length"){const a=t.data.length>o.value,u=t.data.lengtht.test(i),{validation:n,code:We.invalid_string,...dt.errToObj(r)})}_addCheck(t){return new ja({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...dt.errToObj(t)})}url(t){return this._addCheck({kind:"url",...dt.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...dt.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...dt.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...dt.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...dt.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...dt.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...dt.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...dt.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...dt.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...dt.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...dt.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...dt.errToObj(t)})}datetime(t){var n,r;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:(n=t?.offset)!==null&&n!==void 0?n:!1,local:(r=t?.local)!==null&&r!==void 0?r:!1,...dt.errToObj(t?.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof t?.precision>"u"?null:t?.precision,...dt.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...dt.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...dt.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n?.position,...dt.errToObj(n?.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...dt.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...dt.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...dt.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...dt.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...dt.errToObj(n)})}nonempty(t){return this.min(1,dt.errToObj(t))}trim(){return new ja({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new ja({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new ja({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value{var t;return new ja({checks:[],typeName:Tt.ZodString,coerce:(t=e?.coerce)!==null&&t!==void 0?t:!1,...qt(e)})};function Gfe(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,i=n>r?n:r,o=parseInt(e.toFixed(i).replace(".","")),a=parseInt(t.toFixed(i).replace(".",""));return o%a/Math.pow(10,i)}class Cl extends Qt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==it.number){const o=this._getOrReturnCtx(t);return tt(o,{code:We.invalid_type,expected:it.number,received:o.parsedType}),Dt}let r;const i=new $i;for(const o of this._def.checks)o.kind==="int"?hn.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),tt(r,{code:We.invalid_type,expected:"integer",received:"float",message:o.message}),i.dirty()):o.kind==="min"?(o.inclusive?t.datao.value:t.data>=o.value)&&(r=this._getOrReturnCtx(t,r),tt(r,{code:We.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind==="multipleOf"?Gfe(t.data,o.value)!==0&&(r=this._getOrReturnCtx(t,r),tt(r,{code:We.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):o.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),tt(r,{code:We.not_finite,message:o.message}),i.dirty()):hn.assertNever(o);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,dt.toString(n))}gt(t,n){return this.setLimit("min",t,!1,dt.toString(n))}lte(t,n){return this.setLimit("max",t,!0,dt.toString(n))}lt(t,n){return this.setLimit("max",t,!1,dt.toString(n))}setLimit(t,n,r,i){return new Cl({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:dt.toString(i)}]})}_addCheck(t){return new Cl({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:dt.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:dt.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:dt.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:dt.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:dt.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:dt.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:dt.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:dt.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:dt.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.valuet.kind==="int"||t.kind==="multipleOf"&&hn.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.valuenew Cl({checks:[],typeName:Tt.ZodNumber,coerce:e?.coerce||!1,...qt(e)});class El extends Qt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==it.bigint)return this._getInvalidInput(t);let r;const i=new $i;for(const o of this._def.checks)o.kind==="min"?(o.inclusive?t.datao.value:t.data>=o.value)&&(r=this._getOrReturnCtx(t,r),tt(r,{code:We.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),i.dirty()):o.kind==="multipleOf"?t.data%o.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),tt(r,{code:We.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):hn.assertNever(o);return{status:i.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return tt(n,{code:We.invalid_type,expected:it.bigint,received:n.parsedType}),Dt}gte(t,n){return this.setLimit("min",t,!0,dt.toString(n))}gt(t,n){return this.setLimit("min",t,!1,dt.toString(n))}lte(t,n){return this.setLimit("max",t,!0,dt.toString(n))}lt(t,n){return this.setLimit("max",t,!1,dt.toString(n))}setLimit(t,n,r,i){return new El({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:dt.toString(i)}]})}_addCheck(t){return new El({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:dt.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:dt.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:dt.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:dt.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:dt.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value{var t;return new El({checks:[],typeName:Tt.ZodBigInt,coerce:(t=e?.coerce)!==null&&t!==void 0?t:!1,...qt(e)})};class V0 extends Qt{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==it.boolean){const r=this._getOrReturnCtx(t);return tt(r,{code:We.invalid_type,expected:it.boolean,received:r.parsedType}),Dt}return Hi(t.data)}}V0.create=e=>new V0({typeName:Tt.ZodBoolean,coerce:e?.coerce||!1,...qt(e)});class Vc extends Qt{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==it.date){const o=this._getOrReturnCtx(t);return tt(o,{code:We.invalid_type,expected:it.date,received:o.parsedType}),Dt}if(isNaN(t.data.getTime())){const o=this._getOrReturnCtx(t);return tt(o,{code:We.invalid_date}),Dt}const r=new $i;let i;for(const o of this._def.checks)o.kind==="min"?t.data.getTime()o.value&&(i=this._getOrReturnCtx(t,i),tt(i,{code:We.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),r.dirty()):hn.assertNever(o);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Vc({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:dt.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:dt.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.valuenew Vc({checks:[],coerce:e?.coerce||!1,typeName:Tt.ZodDate,...qt(e)});class F1 extends Qt{_parse(t){if(this._getType(t)!==it.symbol){const r=this._getOrReturnCtx(t);return tt(r,{code:We.invalid_type,expected:it.symbol,received:r.parsedType}),Dt}return Hi(t.data)}}F1.create=e=>new F1({typeName:Tt.ZodSymbol,...qt(e)});class H0 extends Qt{_parse(t){if(this._getType(t)!==it.undefined){const r=this._getOrReturnCtx(t);return tt(r,{code:We.invalid_type,expected:it.undefined,received:r.parsedType}),Dt}return Hi(t.data)}}H0.create=e=>new H0({typeName:Tt.ZodUndefined,...qt(e)});class q0 extends Qt{_parse(t){if(this._getType(t)!==it.null){const r=this._getOrReturnCtx(t);return tt(r,{code:We.invalid_type,expected:it.null,received:r.parsedType}),Dt}return Hi(t.data)}}q0.create=e=>new q0({typeName:Tt.ZodNull,...qt(e)});class zd extends Qt{constructor(){super(...arguments),this._any=!0}_parse(t){return Hi(t.data)}}zd.create=e=>new zd({typeName:Tt.ZodAny,...qt(e)});class Pc extends Qt{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Hi(t.data)}}Pc.create=e=>new Pc({typeName:Tt.ZodUnknown,...qt(e)});class vs extends Qt{_parse(t){const n=this._getOrReturnCtx(t);return tt(n,{code:We.invalid_type,expected:it.never,received:n.parsedType}),Dt}}vs.create=e=>new vs({typeName:Tt.ZodNever,...qt(e)});class L1 extends Qt{_parse(t){if(this._getType(t)!==it.undefined){const r=this._getOrReturnCtx(t);return tt(r,{code:We.invalid_type,expected:it.void,received:r.parsedType}),Dt}return Hi(t.data)}}L1.create=e=>new L1({typeName:Tt.ZodVoid,...qt(e)});class Wa extends Qt{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),i=this._def;if(n.parsedType!==it.array)return tt(n,{code:We.invalid_type,expected:it.array,received:n.parsedType}),Dt;if(i.exactLength!==null){const a=n.data.length>i.exactLength.value,u=n.data.lengthi.maxLength.value&&(tt(n,{code:We.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((a,u)=>i.type._parseAsync(new Eu(n,a,n.path,u)))).then(a=>$i.mergeArray(r,a));const o=[...n.data].map((a,u)=>i.type._parseSync(new Eu(n,a,n.path,u)));return $i.mergeArray(r,o)}get element(){return this._def.type}min(t,n){return new Wa({...this._def,minLength:{value:t,message:dt.toString(n)}})}max(t,n){return new Wa({...this._def,maxLength:{value:t,message:dt.toString(n)}})}length(t,n){return new Wa({...this._def,exactLength:{value:t,message:dt.toString(n)}})}nonempty(t){return this.min(1,t)}}Wa.create=(e,t)=>new Wa({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Tt.ZodArray,...qt(t)});function Kf(e){if(e instanceof lr){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=wu.create(Kf(r))}return new lr({...e._def,shape:()=>t})}else return e instanceof Wa?new Wa({...e._def,type:Kf(e.element)}):e instanceof wu?wu.create(Kf(e.unwrap())):e instanceof Pl?Pl.create(Kf(e.unwrap())):e instanceof Au?Au.create(e.items.map(t=>Kf(t))):e}class lr extends Qt{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=hn.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==it.object){const l=this._getOrReturnCtx(t);return tt(l,{code:We.invalid_type,expected:it.object,received:l.parsedType}),Dt}const{status:r,ctx:i}=this._processInputParams(t),{shape:o,keys:a}=this._getCached(),u=[];if(!(this._def.catchall instanceof vs&&this._def.unknownKeys==="strip"))for(const l in i.data)a.includes(l)||u.push(l);const s=[];for(const l of a){const c=o[l],d=i.data[l];s.push({key:{status:"valid",value:l},value:c._parse(new Eu(i,d,i.path,l)),alwaysSet:l in i.data})}if(this._def.catchall instanceof vs){const l=this._def.unknownKeys;if(l==="passthrough")for(const c of u)s.push({key:{status:"valid",value:c},value:{status:"valid",value:i.data[c]}});else if(l==="strict")u.length>0&&(tt(i,{code:We.unrecognized_keys,keys:u}),r.dirty());else if(l!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const l=this._def.catchall;for(const c of u){const d=i.data[c];s.push({key:{status:"valid",value:c},value:l._parse(new Eu(i,d,i.path,c)),alwaysSet:c in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const l=[];for(const c of s){const d=await c.key,h=await c.value;l.push({key:d,value:h,alwaysSet:c.alwaysSet})}return l}).then(l=>$i.mergeObjectSync(r,l)):$i.mergeObjectSync(r,s)}get shape(){return this._def.shape()}strict(t){return dt.errToObj,new lr({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var i,o,a,u;const s=(a=(o=(i=this._def).errorMap)===null||o===void 0?void 0:o.call(i,n,r).message)!==null&&a!==void 0?a:r.defaultError;return n.code==="unrecognized_keys"?{message:(u=dt.errToObj(t).message)!==null&&u!==void 0?u:s}:{message:s}}}:{}})}strip(){return new lr({...this._def,unknownKeys:"strip"})}passthrough(){return new lr({...this._def,unknownKeys:"passthrough"})}extend(t){return new lr({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new lr({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Tt.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new lr({...this._def,catchall:t})}pick(t){const n={};return hn.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new lr({...this._def,shape:()=>n})}omit(t){const n={};return hn.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new lr({...this._def,shape:()=>n})}deepPartial(){return Kf(this)}partial(t){const n={};return hn.objectKeys(this.shape).forEach(r=>{const i=this.shape[r];t&&!t[r]?n[r]=i:n[r]=i.optional()}),new lr({...this._def,shape:()=>n})}required(t){const n={};return hn.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let o=this.shape[r];for(;o instanceof wu;)o=o._def.innerType;n[r]=o}}),new lr({...this._def,shape:()=>n})}keyof(){return Dj(hn.objectKeys(this.shape))}}lr.create=(e,t)=>new lr({shape:()=>e,unknownKeys:"strip",catchall:vs.create(),typeName:Tt.ZodObject,...qt(t)});lr.strictCreate=(e,t)=>new lr({shape:()=>e,unknownKeys:"strict",catchall:vs.create(),typeName:Tt.ZodObject,...qt(t)});lr.lazycreate=(e,t)=>new lr({shape:e,unknownKeys:"strip",catchall:vs.create(),typeName:Tt.ZodObject,...qt(t)});class K0 extends Qt{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function i(o){for(const u of o)if(u.result.status==="valid")return u.result;for(const u of o)if(u.result.status==="dirty")return n.common.issues.push(...u.ctx.common.issues),u.result;const a=o.map(u=>new Io(u.ctx.common.issues));return tt(n,{code:We.invalid_union,unionErrors:a}),Dt}if(n.common.async)return Promise.all(r.map(async o=>{const a={...n,common:{...n.common,issues:[]},parent:null};return{result:await o._parseAsync({data:n.data,path:n.path,parent:a}),ctx:a}})).then(i);{let o;const a=[];for(const s of r){const l={...n,common:{...n.common,issues:[]},parent:null},c=s._parseSync({data:n.data,path:n.path,parent:l});if(c.status==="valid")return c;c.status==="dirty"&&!o&&(o={result:c,ctx:l}),l.common.issues.length&&a.push(l.common.issues)}if(o)return n.common.issues.push(...o.ctx.common.issues),o.result;const u=a.map(s=>new Io(s));return tt(n,{code:We.invalid_union,unionErrors:u}),Dt}}get options(){return this._def.options}}K0.create=(e,t)=>new K0({options:e,typeName:Tt.ZodUnion,...qt(t)});const qu=e=>e instanceof Z0?qu(e.schema):e instanceof Ka?qu(e.innerType()):e instanceof X0?[e.value]:e instanceof Al?e.options:e instanceof Q0?hn.objectValues(e.enum):e instanceof J0?qu(e._def.innerType):e instanceof H0?[void 0]:e instanceof q0?[null]:e instanceof wu?[void 0,...qu(e.unwrap())]:e instanceof Pl?[null,...qu(e.unwrap())]:e instanceof wA||e instanceof tv?qu(e.unwrap()):e instanceof ev?qu(e._def.innerType):[];class Fx extends Qt{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==it.object)return tt(n,{code:We.invalid_type,expected:it.object,received:n.parsedType}),Dt;const r=this.discriminator,i=n.data[r],o=this.optionsMap.get(i);return o?n.common.async?o._parseAsync({data:n.data,path:n.path,parent:n}):o._parseSync({data:n.data,path:n.path,parent:n}):(tt(n,{code:We.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),Dt)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const i=new Map;for(const o of n){const a=qu(o.shape[t]);if(!a.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const u of a){if(i.has(u))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(u)}`);i.set(u,o)}}return new Fx({typeName:Tt.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:i,...qt(r)})}}function jC(e,t){const n=Qu(e),r=Qu(t);if(e===t)return{valid:!0,data:e};if(n===it.object&&r===it.object){const i=hn.objectKeys(t),o=hn.objectKeys(e).filter(u=>i.indexOf(u)!==-1),a={...e,...t};for(const u of o){const s=jC(e[u],t[u]);if(!s.valid)return{valid:!1};a[u]=s.data}return{valid:!0,data:a}}else if(n===it.array&&r===it.array){if(e.length!==t.length)return{valid:!1};const i=[];for(let o=0;o{if(FC(o)||FC(a))return Dt;const u=jC(o.value,a.value);return u.valid?((LC(o)||LC(a))&&n.dirty(),{status:n.value,value:u.data}):(tt(r,{code:We.invalid_intersection_types}),Dt)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([o,a])=>i(o,a)):i(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}G0.create=(e,t,n)=>new G0({left:e,right:t,typeName:Tt.ZodIntersection,...qt(n)});class Au extends Qt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==it.array)return tt(r,{code:We.invalid_type,expected:it.array,received:r.parsedType}),Dt;if(r.data.lengththis._def.items.length&&(tt(r,{code:We.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const o=[...r.data].map((a,u)=>{const s=this._def.items[u]||this._def.rest;return s?s._parse(new Eu(r,a,r.path,u)):null}).filter(a=>!!a);return r.common.async?Promise.all(o).then(a=>$i.mergeArray(n,a)):$i.mergeArray(n,o)}get items(){return this._def.items}rest(t){return new Au({...this._def,rest:t})}}Au.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Au({items:e,typeName:Tt.ZodTuple,rest:null,...qt(t)})};class Y0 extends Qt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==it.object)return tt(r,{code:We.invalid_type,expected:it.object,received:r.parsedType}),Dt;const i=[],o=this._def.keyType,a=this._def.valueType;for(const u in r.data)i.push({key:o._parse(new Eu(r,u,r.path,u)),value:a._parse(new Eu(r,r.data[u],r.path,u)),alwaysSet:u in r.data});return r.common.async?$i.mergeObjectAsync(n,i):$i.mergeObjectSync(n,i)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof Qt?new Y0({keyType:t,valueType:n,typeName:Tt.ZodRecord,...qt(r)}):new Y0({keyType:ja.create(),valueType:t,typeName:Tt.ZodRecord,...qt(n)})}}class j1 extends Qt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==it.map)return tt(r,{code:We.invalid_type,expected:it.map,received:r.parsedType}),Dt;const i=this._def.keyType,o=this._def.valueType,a=[...r.data.entries()].map(([u,s],l)=>({key:i._parse(new Eu(r,u,r.path,[l,"key"])),value:o._parse(new Eu(r,s,r.path,[l,"value"]))}));if(r.common.async){const u=new Map;return Promise.resolve().then(async()=>{for(const s of a){const l=await s.key,c=await s.value;if(l.status==="aborted"||c.status==="aborted")return Dt;(l.status==="dirty"||c.status==="dirty")&&n.dirty(),u.set(l.value,c.value)}return{status:n.value,value:u}})}else{const u=new Map;for(const s of a){const l=s.key,c=s.value;if(l.status==="aborted"||c.status==="aborted")return Dt;(l.status==="dirty"||c.status==="dirty")&&n.dirty(),u.set(l.value,c.value)}return{status:n.value,value:u}}}}j1.create=(e,t,n)=>new j1({valueType:t,keyType:e,typeName:Tt.ZodMap,...qt(n)});class Hc extends Qt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==it.set)return tt(r,{code:We.invalid_type,expected:it.set,received:r.parsedType}),Dt;const i=this._def;i.minSize!==null&&r.data.sizei.maxSize.value&&(tt(r,{code:We.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),n.dirty());const o=this._def.valueType;function a(s){const l=new Set;for(const c of s){if(c.status==="aborted")return Dt;c.status==="dirty"&&n.dirty(),l.add(c.value)}return{status:n.value,value:l}}const u=[...r.data.values()].map((s,l)=>o._parse(new Eu(r,s,r.path,l)));return r.common.async?Promise.all(u).then(s=>a(s)):a(u)}min(t,n){return new Hc({...this._def,minSize:{value:t,message:dt.toString(n)}})}max(t,n){return new Hc({...this._def,maxSize:{value:t,message:dt.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}Hc.create=(e,t)=>new Hc({valueType:e,minSize:null,maxSize:null,typeName:Tt.ZodSet,...qt(t)});class xd extends Qt{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==it.function)return tt(n,{code:We.invalid_type,expected:it.function,received:n.parsedType}),Dt;function r(u,s){return I1({data:u,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,$1(),Bd].filter(l=>!!l),issueData:{code:We.invalid_arguments,argumentsError:s}})}function i(u,s){return I1({data:u,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,$1(),Bd].filter(l=>!!l),issueData:{code:We.invalid_return_type,returnTypeError:s}})}const o={errorMap:n.common.contextualErrorMap},a=n.data;if(this._def.returns instanceof Ud){const u=this;return Hi(async function(...s){const l=new Io([]),c=await u._def.args.parseAsync(s,o).catch(v=>{throw l.addIssue(r(s,v)),l}),d=await Reflect.apply(a,this,c);return await u._def.returns._def.type.parseAsync(d,o).catch(v=>{throw l.addIssue(i(d,v)),l})})}else{const u=this;return Hi(function(...s){const l=u._def.args.safeParse(s,o);if(!l.success)throw new Io([r(s,l.error)]);const c=Reflect.apply(a,this,l.data),d=u._def.returns.safeParse(c,o);if(!d.success)throw new Io([i(c,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new xd({...this._def,args:Au.create(t).rest(Pc.create())})}returns(t){return new xd({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new xd({args:t||Au.create([]).rest(Pc.create()),returns:n||Pc.create(),typeName:Tt.ZodFunction,...qt(r)})}}class Z0 extends Qt{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}Z0.create=(e,t)=>new Z0({getter:e,typeName:Tt.ZodLazy,...qt(t)});class X0 extends Qt{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return tt(n,{received:n.data,code:We.invalid_literal,expected:this._def.value}),Dt}return{status:"valid",value:t.data}}get value(){return this._def.value}}X0.create=(e,t)=>new X0({value:e,typeName:Tt.ZodLiteral,...qt(t)});function Dj(e,t){return new Al({values:e,typeName:Tt.ZodEnum,...qt(t)})}class Al extends Qt{constructor(){super(...arguments),Gp.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return tt(n,{expected:hn.joinValues(r),received:n.parsedType,code:We.invalid_type}),Dt}if(N1(this,Gp)||kj(this,Gp,new Set(this._def.values)),!N1(this,Gp).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return tt(n,{received:n.data,code:We.invalid_enum_value,options:r}),Dt}return Hi(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return Al.create(t,{...this._def,...n})}exclude(t,n=this._def){return Al.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}Gp=new WeakMap;Al.create=Dj;class Q0 extends Qt{constructor(){super(...arguments),Yp.set(this,void 0)}_parse(t){const n=hn.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==it.string&&r.parsedType!==it.number){const i=hn.objectValues(n);return tt(r,{expected:hn.joinValues(i),received:r.parsedType,code:We.invalid_type}),Dt}if(N1(this,Yp)||kj(this,Yp,new Set(hn.getValidEnumValues(this._def.values))),!N1(this,Yp).has(t.data)){const i=hn.objectValues(n);return tt(r,{received:r.data,code:We.invalid_enum_value,options:i}),Dt}return Hi(t.data)}get enum(){return this._def.values}}Yp=new WeakMap;Q0.create=(e,t)=>new Q0({values:e,typeName:Tt.ZodNativeEnum,...qt(t)});class Ud extends Qt{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==it.promise&&n.common.async===!1)return tt(n,{code:We.invalid_type,expected:it.promise,received:n.parsedType}),Dt;const r=n.parsedType===it.promise?n.data:Promise.resolve(n.data);return Hi(r.then(i=>this._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Ud.create=(e,t)=>new Ud({type:e,typeName:Tt.ZodPromise,...qt(t)});class Ka extends Qt{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Tt.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=this._def.effect||null,o={addIssue:a=>{tt(r,a),a.fatal?n.abort():n.dirty()},get path(){return r.path}};if(o.addIssue=o.addIssue.bind(o),i.type==="preprocess"){const a=i.transform(r.data,o);if(r.common.async)return Promise.resolve(a).then(async u=>{if(n.value==="aborted")return Dt;const s=await this._def.schema._parseAsync({data:u,path:r.path,parent:r});return s.status==="aborted"?Dt:s.status==="dirty"||n.value==="dirty"?sd(s.value):s});{if(n.value==="aborted")return Dt;const u=this._def.schema._parseSync({data:a,path:r.path,parent:r});return u.status==="aborted"?Dt:u.status==="dirty"||n.value==="dirty"?sd(u.value):u}}if(i.type==="refinement"){const a=u=>{const s=i.refinement(u,o);if(r.common.async)return Promise.resolve(s);if(s instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return u};if(r.common.async===!1){const u=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return u.status==="aborted"?Dt:(u.status==="dirty"&&n.dirty(),a(u.value),{status:n.value,value:u.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(u=>u.status==="aborted"?Dt:(u.status==="dirty"&&n.dirty(),a(u.value).then(()=>({status:n.value,value:u.value}))))}if(i.type==="transform")if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Wc(a))return a;const u=i.transform(a.value,o);if(u instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:u}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>Wc(a)?Promise.resolve(i.transform(a.value,o)).then(u=>({status:n.value,value:u})):a);hn.assertNever(i)}}Ka.create=(e,t,n)=>new Ka({schema:e,typeName:Tt.ZodEffects,effect:t,...qt(n)});Ka.createWithPreprocess=(e,t,n)=>new Ka({schema:t,effect:{type:"preprocess",transform:e},typeName:Tt.ZodEffects,...qt(n)});class wu extends Qt{_parse(t){return this._getType(t)===it.undefined?Hi(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}wu.create=(e,t)=>new wu({innerType:e,typeName:Tt.ZodOptional,...qt(t)});class Pl extends Qt{_parse(t){return this._getType(t)===it.null?Hi(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Pl.create=(e,t)=>new Pl({innerType:e,typeName:Tt.ZodNullable,...qt(t)});class J0 extends Qt{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===it.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}J0.create=(e,t)=>new J0({innerType:e,typeName:Tt.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...qt(t)});class ev extends Qt{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},i=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return W0(i)?i.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Io(r.common.issues)},input:r.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Io(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}ev.create=(e,t)=>new ev({innerType:e,typeName:Tt.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...qt(t)});class B1 extends Qt{_parse(t){if(this._getType(t)!==it.nan){const r=this._getOrReturnCtx(t);return tt(r,{code:We.invalid_type,expected:it.nan,received:r.parsedType}),Dt}return{status:"valid",value:t.data}}}B1.create=e=>new B1({typeName:Tt.ZodNaN,...qt(e)});const Yfe=Symbol("zod_brand");class wA extends Qt{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class sg extends Qt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const o=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?Dt:o.status==="dirty"?(n.dirty(),sd(o.value)):this._def.out._parseAsync({data:o.value,path:r.path,parent:r})})();{const i=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?Dt:i.status==="dirty"?(n.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:r.path,parent:r})}}static create(t,n){return new sg({in:t,out:n,typeName:Tt.ZodPipeline})}}class tv extends Qt{_parse(t){const n=this._def.innerType._parse(t),r=i=>(Wc(i)&&(i.value=Object.freeze(i.value)),i);return W0(n)?n.then(i=>r(i)):r(n)}unwrap(){return this._def.innerType}}tv.create=(e,t)=>new tv({innerType:e,typeName:Tt.ZodReadonly,...qt(t)});function $j(e,t={},n){return e?zd.create().superRefine((r,i)=>{var o,a;if(!e(r)){const u=typeof t=="function"?t(r):typeof t=="string"?{message:t}:t,s=(a=(o=u.fatal)!==null&&o!==void 0?o:n)!==null&&a!==void 0?a:!0,l=typeof u=="string"?{message:u}:u;i.addIssue({code:"custom",...l,fatal:s})}}):zd.create()}const Zfe={object:lr.lazycreate};var Tt;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(Tt||(Tt={}));const Xfe=(e,t={message:`Input not instance of ${e.name}`})=>$j(n=>n instanceof e,t),Ij=ja.create,Nj=Cl.create,Qfe=B1.create,Jfe=El.create,Fj=V0.create,ede=Vc.create,tde=F1.create,nde=H0.create,rde=q0.create,ide=zd.create,ode=Pc.create,ade=vs.create,ude=L1.create,sde=Wa.create,lde=lr.create,cde=lr.strictCreate,fde=K0.create,dde=Fx.create,hde=G0.create,pde=Au.create,vde=Y0.create,gde=j1.create,mde=Hc.create,yde=xd.create,bde=Z0.create,xde=X0.create,wde=Al.create,_de=Q0.create,Sde=Ud.create,GM=Ka.create,Cde=wu.create,Ede=Pl.create,Ade=Ka.createWithPreprocess,Pde=sg.create,Ode=()=>Ij().optional(),kde=()=>Nj().optional(),Tde=()=>Fj().optional(),Mde={string:e=>ja.create({...e,coerce:!0}),number:e=>Cl.create({...e,coerce:!0}),boolean:e=>V0.create({...e,coerce:!0}),bigint:e=>El.create({...e,coerce:!0}),date:e=>Vc.create({...e,coerce:!0})},Rde=Dt;var zKe=Object.freeze({__proto__:null,defaultErrorMap:Bd,setErrorMap:Afe,getErrorMap:$1,makeIssue:I1,EMPTY_PATH:Pfe,addIssueToContext:tt,ParseStatus:$i,INVALID:Dt,DIRTY:sd,OK:Hi,isAborted:FC,isDirty:LC,isValid:Wc,isAsync:W0,get util(){return hn},get objectUtil(){return NC},ZodParsedType:it,getParsedType:Qu,ZodType:Qt,datetimeRegex:Rj,ZodString:ja,ZodNumber:Cl,ZodBigInt:El,ZodBoolean:V0,ZodDate:Vc,ZodSymbol:F1,ZodUndefined:H0,ZodNull:q0,ZodAny:zd,ZodUnknown:Pc,ZodNever:vs,ZodVoid:L1,ZodArray:Wa,ZodObject:lr,ZodUnion:K0,ZodDiscriminatedUnion:Fx,ZodIntersection:G0,ZodTuple:Au,ZodRecord:Y0,ZodMap:j1,ZodSet:Hc,ZodFunction:xd,ZodLazy:Z0,ZodLiteral:X0,ZodEnum:Al,ZodNativeEnum:Q0,ZodPromise:Ud,ZodEffects:Ka,ZodTransformer:Ka,ZodOptional:wu,ZodNullable:Pl,ZodDefault:J0,ZodCatch:ev,ZodNaN:B1,BRAND:Yfe,ZodBranded:wA,ZodPipeline:sg,ZodReadonly:tv,custom:$j,Schema:Qt,ZodSchema:Qt,late:Zfe,get ZodFirstPartyTypeKind(){return Tt},coerce:Mde,any:ide,array:sde,bigint:Jfe,boolean:Fj,date:ede,discriminatedUnion:dde,effect:GM,enum:wde,function:yde,instanceof:Xfe,intersection:hde,lazy:bde,literal:xde,map:gde,nan:Qfe,nativeEnum:_de,never:ade,null:rde,nullable:Ede,number:Nj,object:lde,oboolean:Tde,onumber:kde,optional:Cde,ostring:Ode,pipeline:Pde,preprocess:Ade,promise:Sde,record:vde,set:mde,strictObject:cde,string:Ij,symbol:tde,transformer:GM,tuple:pde,undefined:nde,union:fde,unknown:ode,void:ude,NEVER:Rde,ZodIssueCode:We,quotelessJson:Efe,ZodError:Io});const YM=(e,t,n)=>{if(e&&"reportValidity"in e){const r=Xe(n,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},Lj=(e,t)=>{for(const n in t.fields){const r=t.fields[n];r&&r.ref&&"reportValidity"in r.ref?YM(r.ref,n,e):r.refs&&r.refs.forEach(i=>YM(i,n,e))}},Dde=(e,t)=>{t.shouldUseNativeValidation&&Lj(e,t);const n={};for(const r in e){const i=Xe(t.fields,r),o=Object.assign(e[r]||{},{ref:i&&i.ref});if($de(t.names||Object.keys(e),r)){const a=Object.assign({},Xe(n,r));An(a,"root",o),An(n,r,a)}else An(n,r,o)}return n},$de=(e,t)=>e.some(n=>n.startsWith(t+"."));var Ide=function(e,t){for(var n={};e.length;){var r=e[0],i=r.code,o=r.message,a=r.path.join(".");if(!n[a])if("unionErrors"in r){var u=r.unionErrors[0].errors[0];n[a]={message:u.message,type:u.code}}else n[a]={message:o,type:i};if("unionErrors"in r&&r.unionErrors.forEach(function(c){return c.errors.forEach(function(d){return e.push(d)})}),t){var s=n[a].types,l=s&&s[r.code];n[a]=wj(a,t,n,i,l?[].concat(l,r.message):r.message)}e.shift()}return n},UKe=function(e,t,n){return n===void 0&&(n={}),function(r,i,o){try{return Promise.resolve(function(a,u){try{var s=Promise.resolve(e[n.mode==="sync"?"parse":"parseAsync"](r,t)).then(function(l){return o.shouldUseNativeValidation&&Lj({},o),{errors:{},values:n.raw?r:l}})}catch(l){return u(l)}return s&&s.then?s.then(void 0,u):s}(0,function(a){if(function(u){return Array.isArray(u?.errors)}(a))return{values:{},errors:Dde(Ide(a.errors,!o.shouldUseNativeValidation&&o.criteriaMode==="all"),o)};throw a}))}catch(a){return Promise.reject(a)}}},Nde=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],pt=Nde.reduce((e,t)=>{const n=y.forwardRef((r,i)=>{const{asChild:o,...a}=r,u=o?Sl:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),I.jsx(u,{...a,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function jj(e,t){e&&Ss.flushSync(()=>e.dispatchEvent(t))}var Fde="Label",Bj=y.forwardRef((e,t)=>I.jsx(pt.label,{...e,ref:t,onMouseDown:n=>{n.target.closest("button, input, select, textarea")||(e.onMouseDown?.(n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));Bj.displayName=Fde;var WKe=Bj,zj={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(ua,function(){var n=1e3,r=6e4,i=36e5,o="millisecond",a="second",u="minute",s="hour",l="day",c="week",d="month",h="quarter",v="year",g="date",m="Invalid Date",b=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,w=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,x={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(Z){var G=["th","st","nd","rd"],K=Z%100;return"["+Z+(G[(K-20)%10]||G[K]||G[0])+"]"}},S=function(Z,G,K){var V=String(Z);return!V||V.length>=G?Z:""+Array(G+1-V.length).join(K)+Z},A={s:S,z:function(Z){var G=-Z.utcOffset(),K=Math.abs(G),V=Math.floor(K/60),B=K%60;return(G<=0?"+":"-")+S(V,2,"0")+":"+S(B,2,"0")},m:function Z(G,K){if(G.date()1)return Z(Y[0])}else{var ue=G.name;C[ue]=G,B=ue}return!V&&B&&(E=B),B||!V&&E},U=function(Z,G){if(M(Z))return Z.clone();var K=typeof G=="object"?G:{};return K.date=Z,K.args=arguments,new W(K)},H=A;H.l=F,H.i=M,H.w=function(Z,G){return U(Z,{locale:G.$L,utc:G.$u,x:G.$x,$offset:G.$offset})};var W=function(){function Z(K){this.$L=F(K.locale,null,!0),this.parse(K),this.$x=this.$x||K.x||{},this[T]=!0}var G=Z.prototype;return G.parse=function(K){this.$d=function(V){var B=V.date,q=V.utc;if(B===null)return new Date(NaN);if(H.u(B))return new Date;if(B instanceof Date)return new Date(B);if(typeof B=="string"&&!/Z$/i.test(B)){var Y=B.match(b);if(Y){var ue=Y[2]-1||0,Q=(Y[7]||"0").substring(0,3);return q?new Date(Date.UTC(Y[1],ue,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,Q)):new Date(Y[1],ue,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,Q)}}return new Date(B)}(K),this.init()},G.init=function(){var K=this.$d;this.$y=K.getFullYear(),this.$M=K.getMonth(),this.$D=K.getDate(),this.$W=K.getDay(),this.$H=K.getHours(),this.$m=K.getMinutes(),this.$s=K.getSeconds(),this.$ms=K.getMilliseconds()},G.$utils=function(){return H},G.isValid=function(){return this.$d.toString()!==m},G.isSame=function(K,V){var B=U(K);return this.startOf(V)<=B&&B<=this.endOf(V)},G.isAfter=function(K,V){return U(K)1&&arguments[1]!==void 0?arguments[1]:{container:document.body},ue="";return typeof G=="string"?ue=w(G,ee):G instanceof HTMLInputElement&&!["text","search","url","tel","password"].includes(G?.type)?ue=w(G.value,ee):(ue=m()(G),g("copy")),ue},A=S;function E(q){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?E=function(ee){return typeof ee}:E=function(ee){return ee&&typeof Symbol=="function"&&ee.constructor===Symbol&&ee!==Symbol.prototype?"symbol":typeof ee},E(q)}var C=function(){var G=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ee=G.action,ue=ee===void 0?"copy":ee,fe=G.container,ie=G.target,Ae=G.text;if(ue!=="copy"&&ue!=="cut")throw new Error('Invalid "action" value, use either "copy" or "cut"');if(ie!==void 0)if(ie&&E(ie)==="object"&&ie.nodeType===1){if(ue==="copy"&&ie.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if(ue==="cut"&&(ie.hasAttribute("readonly")||ie.hasAttribute("disabled")))throw new Error(`Invalid "target" attribute. You can't cut text from elements with "readonly" or "disabled" attributes`)}else throw new Error('Invalid "target" value, use a valid Element');if(Ae)return A(Ae,{container:fe});if(ie)return ue==="cut"?y(ie):A(ie,{container:fe})},P=C;function k(q){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?k=function(ee){return typeof ee}:k=function(ee){return ee&&typeof Symbol=="function"&&ee.constructor===Symbol&&ee!==Symbol.prototype?"symbol":typeof ee},k(q)}function M(q,G){if(!(q instanceof G))throw new TypeError("Cannot call a class as a function")}function L(q,G){for(var ee=0;ee"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function I(q){return I=Object.setPrototypeOf?Object.getPrototypeOf:function(ee){return ee.__proto__||Object.getPrototypeOf(ee)},I(q)}function z(q,G){var ee="data-clipboard-".concat(q);if(G.hasAttribute(ee))return G.getAttribute(ee)}var U=function(q){F(ee,q);var G=H(ee);function ee(ue,fe){var ie;return M(this,ee),ie=G.call(this),ie.resolveOptions(fe),ie.listenClick(ue),ie}return B(ee,[{key:"resolveOptions",value:function(){var fe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.action=typeof fe.action=="function"?fe.action:this.defaultAction,this.target=typeof fe.target=="function"?fe.target:this.defaultTarget,this.text=typeof fe.text=="function"?fe.text:this.defaultText,this.container=k(fe.container)==="object"?fe.container:document.body}},{key:"listenClick",value:function(fe){var ie=this;this.listener=d()(fe,"click",function(Ae){return ie.onClick(Ae)})}},{key:"onClick",value:function(fe){var ie=fe.delegateTarget||fe.currentTarget,Ae=this.action(ie)||"copy",de=P({action:Ae,container:this.container,target:this.target(ie),text:this.text(ie)});this.emit(de?"success":"error",{action:Ae,text:de,trigger:ie,clearSelection:function(){ie&&ie.focus(),window.getSelection().removeAllRanges()}})}},{key:"defaultAction",value:function(fe){return z("action",fe)}},{key:"defaultTarget",value:function(fe){var ie=z("target",fe);if(ie)return document.querySelector(ie)}},{key:"defaultText",value:function(fe){return z("text",fe)}},{key:"destroy",value:function(){this.listener.destroy()}}],[{key:"copy",value:function(fe){var ie=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body};return A(fe,ie)}},{key:"cut",value:function(fe){return y(fe)}},{key:"isSupported",value:function(){var fe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:["copy","cut"],ie=typeof fe=="string"?[fe]:fe,Ae=!!document.queryCommandSupported;return ie.forEach(function(de){Ae=Ae&&!!document.queryCommandSupported(de)}),Ae}}]),ee}(l()),X=U},828:function(o){var a=9;if(typeof Element<"u"&&!Element.prototype.matches){var u=Element.prototype;u.matches=u.matchesSelector||u.mozMatchesSelector||u.msMatchesSelector||u.oMatchesSelector||u.webkitMatchesSelector}function s(l,c){for(;l&&l.nodeType!==a;){if(typeof l.matches=="function"&&l.matches(c))return l;l=l.parentNode}}o.exports=s},438:function(o,a,u){var s=u(828);function l(h,m,g,v,y){var x=d.apply(this,arguments);return h.addEventListener(g,x,y),{destroy:function(){h.removeEventListener(g,x,y)}}}function c(h,m,g,v,y){return typeof h.addEventListener=="function"?l.apply(null,arguments):typeof g=="function"?l.bind(null,document).apply(null,arguments):(typeof h=="string"&&(h=document.querySelectorAll(h)),Array.prototype.map.call(h,function(x){return l(x,m,g,v,y)}))}function d(h,m,g,v){return function(y){y.delegateTarget=s(y.target,m),y.delegateTarget&&v.call(h,y)}}o.exports=c},879:function(o,a){a.node=function(u){return u!==void 0&&u instanceof HTMLElement&&u.nodeType===1},a.nodeList=function(u){var s=Object.prototype.toString.call(u);return u!==void 0&&(s==="[object NodeList]"||s==="[object HTMLCollection]")&&"length"in u&&(u.length===0||a.node(u[0]))},a.string=function(u){return typeof u=="string"||u instanceof String},a.fn=function(u){var s=Object.prototype.toString.call(u);return s==="[object Function]"}},370:function(o,a,u){var s=u(879),l=u(438);function c(g,v,y){if(!g&&!v&&!y)throw new Error("Missing required arguments");if(!s.string(v))throw new TypeError("Second argument must be a String");if(!s.fn(y))throw new TypeError("Third argument must be a Function");if(s.node(g))return d(g,v,y);if(s.nodeList(g))return h(g,v,y);if(s.string(g))return m(g,v,y);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}function d(g,v,y){return g.addEventListener(v,y),{destroy:function(){g.removeEventListener(v,y)}}}function h(g,v,y){return Array.prototype.forEach.call(g,function(x){x.addEventListener(v,y)}),{destroy:function(){Array.prototype.forEach.call(g,function(x){x.removeEventListener(v,y)})}}}function m(g,v,y){return l(document.body,g,v,y)}o.exports=c},817:function(o){function a(u){var s;if(u.nodeName==="SELECT")u.focus(),s=u.value;else if(u.nodeName==="INPUT"||u.nodeName==="TEXTAREA"){var l=u.hasAttribute("readonly");l||u.setAttribute("readonly",""),u.select(),u.setSelectionRange(0,u.value.length),l||u.removeAttribute("readonly"),s=u.value}else{u.hasAttribute("contenteditable")&&u.focus();var c=window.getSelection(),d=document.createRange();d.selectNodeContents(u),c.removeAllRanges(),c.addRange(d),s=c.toString()}return s}o.exports=a},279:function(o){function a(){}a.prototype={on:function(u,s,l){var c=this.e||(this.e={});return(c[u]||(c[u]=[])).push({fn:s,ctx:l}),this},once:function(u,s,l){var c=this;function d(){c.off(u,d),s.apply(l,arguments)}return d._=s,this.on(u,d,l)},emit:function(u){var s=[].slice.call(arguments,1),l=((this.e||(this.e={}))[u]||[]).slice(),c=0,d=l.length;for(c;c{const{children:a,...u}=o,s=b.useMemo(()=>u,Object.values(u));return R.jsx(n.Provider,{value:s,children:a})};r.displayName=e+"Provider";function i(o){const a=b.useContext(n);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${o}\` must be used within \`${e}\``)}return[r,i]}function ri(e,t=[]){let n=[];function r(o,a){const u=b.createContext(a),s=n.length;n=[...n,a];const l=d=>{const{scope:h,children:m,...g}=d,v=h?.[e]?.[s]||u,y=b.useMemo(()=>g,Object.values(g));return R.jsx(v.Provider,{value:y,children:m})};l.displayName=o+"Provider";function c(d,h){const m=h?.[e]?.[s]||u,g=b.useContext(m);if(g)return g;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${o}\``)}return[l,c]}const i=()=>{const o=n.map(a=>b.createContext(a));return function(u){const s=u?.[e]||o;return b.useMemo(()=>({[`__scope${e}`]:{...u,[e]:s}}),[u,s])}};return i.scopeName=e,[r,yde(i,...t)]}function yde(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const a=r.reduce((u,{useScope:s,scopeName:l})=>{const d=s(o)[`__scope${l}`];return{...u,...d}},{});return b.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}var bde=globalThis?.document?b.useLayoutEffect:()=>{},wde=V6.useId||(()=>{}),xde=0;function Hi(e){const[t,n]=b.useState(wde());return bde(()=>{n(r=>r??String(xde++))},[e]),t?`radix-${t}`:""}function ko(e){const t=b.useRef(e);return b.useEffect(()=>{t.current=e}),b.useMemo(()=>(...n)=>t.current?.(...n),[])}function sa({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=_de({defaultProp:t,onChange:n}),o=e!==void 0,a=o?e:r,u=ko(n),s=b.useCallback(l=>{if(o){const d=typeof l=="function"?l(e):l;d!==e&&u(d)}else i(l)},[o,e,i,u]);return[a,s]}function _de({defaultProp:e,onChange:t}){const n=b.useState(e),[r]=n,i=b.useRef(r),o=ko(t);return b.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}function Sde(e){const t=b.useRef(e);return b.useEffect(()=>{t.current=e}),b.useMemo(()=>(...n)=>t.current?.(...n),[])}function Cde(e,t=globalThis?.document){const n=Sde(e);b.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Ede="DismissableLayer",O3="dismissableLayer.update",Ade="dismissableLayer.pointerDownOutside",Ode="dismissableLayer.focusOutside",BM,Mj=b.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),th=b.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:a,onDismiss:u,...s}=e,l=b.useContext(Mj),[c,d]=b.useState(null),h=c?.ownerDocument??globalThis?.document,[,m]=b.useState({}),g=kt(t,P=>d(P)),v=Array.from(l.layers),[y]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),x=v.indexOf(y),w=c?v.indexOf(c):-1,S=l.layersWithOutsidePointerEventsDisabled.size>0,A=w>=x,E=Tde(P=>{const k=P.target,M=[...l.branches].some(L=>L.contains(k));!A||M||(i?.(P),a?.(P),P.defaultPrevented||u?.())},h),C=Mde(P=>{const k=P.target;[...l.branches].some(L=>L.contains(k))||(o?.(P),a?.(P),P.defaultPrevented||u?.())},h);return Cde(P=>{w===l.layers.size-1&&(r?.(P),!P.defaultPrevented&&u&&(P.preventDefault(),u()))},h),b.useEffect(()=>{if(c)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(BM=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(c)),l.layers.add(c),zM(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=BM)}},[c,h,n,l]),b.useEffect(()=>()=>{c&&(l.layers.delete(c),l.layersWithOutsidePointerEventsDisabled.delete(c),zM())},[c,l]),b.useEffect(()=>{const P=()=>m({});return document.addEventListener(O3,P),()=>document.removeEventListener(O3,P)},[]),R.jsx(Qe.div,{...s,ref:g,style:{pointerEvents:S?A?"auto":"none":void 0,...e.style},onFocusCapture:De(e.onFocusCapture,C.onFocusCapture),onBlurCapture:De(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:De(e.onPointerDownCapture,E.onPointerDownCapture)})});th.displayName=Ede;var Pde="DismissableLayerBranch",kde=b.forwardRef((e,t)=>{const n=b.useContext(Mj),r=b.useRef(null),i=kt(t,r);return b.useEffect(()=>{const o=r.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),R.jsx(Qe.div,{...e,ref:i})});kde.displayName=Pde;function Tde(e,t=globalThis?.document){const n=ko(e),r=b.useRef(!1),i=b.useRef(()=>{});return b.useEffect(()=>{const o=u=>{if(u.target&&!r.current){let s=function(){Rj(Ade,n,l,{discrete:!0})};const l={originalEvent:u};u.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=s,t.addEventListener("click",i.current,{once:!0})):s()}else t.removeEventListener("click",i.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Mde(e,t=globalThis?.document){const n=ko(e),r=b.useRef(!1);return b.useEffect(()=>{const i=o=>{o.target&&!r.current&&Rj(Ode,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function zM(){const e=new CustomEvent(O3);document.dispatchEvent(e)}function Rj(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?Oj(i,o):i.dispatchEvent(o)}var j_="focusScope.autoFocusOnMount",B_="focusScope.autoFocusOnUnmount",UM={bubbles:!1,cancelable:!0},Rde="FocusScope",zm=b.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...a}=e,[u,s]=b.useState(null),l=ko(i),c=ko(o),d=b.useRef(null),h=kt(t,v=>s(v)),m=b.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;b.useEffect(()=>{if(r){let v=function(S){if(m.paused||!u)return;const A=S.target;u.contains(A)?d.current=A:hs(d.current,{select:!0})},y=function(S){if(m.paused||!u)return;const A=S.relatedTarget;A!==null&&(u.contains(A)||hs(d.current,{select:!0}))},x=function(S){if(document.activeElement===document.body)for(const E of S)E.removedNodes.length>0&&hs(u)};document.addEventListener("focusin",v),document.addEventListener("focusout",y);const w=new MutationObserver(x);return u&&w.observe(u,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",y),w.disconnect()}}},[r,u,m.paused]),b.useEffect(()=>{if(u){VM.add(m);const v=document.activeElement;if(!u.contains(v)){const x=new CustomEvent(j_,UM);u.addEventListener(j_,l),u.dispatchEvent(x),x.defaultPrevented||(Dde(Lde(Dj(u)),{select:!0}),document.activeElement===v&&hs(u))}return()=>{u.removeEventListener(j_,l),setTimeout(()=>{const x=new CustomEvent(B_,UM);u.addEventListener(B_,c),u.dispatchEvent(x),x.defaultPrevented||hs(v??document.body,{select:!0}),u.removeEventListener(B_,c),VM.remove(m)},0)}}},[u,l,c,m]);const g=b.useCallback(v=>{if(!n&&!r||m.paused)return;const y=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,x=document.activeElement;if(y&&x){const w=v.currentTarget,[S,A]=$de(w);S&&A?!v.shiftKey&&x===A?(v.preventDefault(),n&&hs(S,{select:!0})):v.shiftKey&&x===S&&(v.preventDefault(),n&&hs(A,{select:!0})):x===w&&v.preventDefault()}},[n,r,m.paused]);return R.jsx(Qe.div,{tabIndex:-1,...a,ref:h,onKeyDown:g})});zm.displayName=Rde;function Dde(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(hs(r,{select:t}),document.activeElement!==n)return}function $de(e){const t=Dj(e),n=WM(t,e),r=WM(t.reverse(),e);return[n,r]}function Dj(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function WM(e,t){for(const n of e)if(!Ide(n,{upTo:t}))return n}function Ide(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Nde(e){return e instanceof HTMLInputElement&&"select"in e}function hs(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Nde(e)&&t&&e.select()}}var VM=Fde();function Fde(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=HM(e,t),e.unshift(t)},remove(t){e=HM(e,t),e[0]?.resume()}}}function HM(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Lde(e){return e.filter(t=>t.tagName!=="A")}var Pr=globalThis?.document?b.useLayoutEffect:()=>{},jde="Portal",Um=b.forwardRef((e,t)=>{const{container:n,...r}=e,[i,o]=b.useState(!1);Pr(()=>o(!0),[]);const a=n||i&&globalThis?.document?.body;return a?ew.createPortal(R.jsx(Qe.div,{...r,ref:t}),a):null});Um.displayName=jde;function Bde(e,t){return b.useReducer((n,r)=>t[n][r]??n,e)}var Ci=e=>{const{present:t,children:n}=e,r=zde(t),i=typeof n=="function"?n({present:r.isPresent}):b.Children.only(n),o=kt(r.ref,Ude(i));return typeof n=="function"||r.isPresent?b.cloneElement(i,{ref:o}):null};Ci.displayName="Presence";function zde(e){const[t,n]=b.useState(),r=b.useRef({}),i=b.useRef(e),o=b.useRef("none"),a=e?"mounted":"unmounted",[u,s]=Bde(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return b.useEffect(()=>{const l=Sv(r.current);o.current=u==="mounted"?l:"none"},[u]),Pr(()=>{const l=r.current,c=i.current;if(c!==e){const h=o.current,m=Sv(l);e?s("MOUNT"):m==="none"||l?.display==="none"?s("UNMOUNT"):s(c&&h!==m?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,s]),Pr(()=>{if(t){let l;const c=t.ownerDocument.defaultView??window,d=m=>{const v=Sv(r.current).includes(m.animationName);if(m.target===t&&v&&(s("ANIMATION_END"),!i.current)){const y=t.style.animationFillMode;t.style.animationFillMode="forwards",l=c.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=y)})}},h=m=>{m.target===t&&(o.current=Sv(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{c.clearTimeout(l),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else s("ANIMATION_END")},[t,s]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:b.useCallback(l=>{l&&(r.current=getComputedStyle(l)),n(l)},[])}}function Sv(e){return e?.animationName||"none"}function Ude(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var z_=0;function gw(){b.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??qM()),document.body.insertAdjacentElement("beforeend",e[1]??qM()),z_++,()=>{z_===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),z_--}},[])}function qM(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Br=function(){return Br=Object.assign||function(t){for(var n,r=1,i=arguments.length;r"u")return nhe;var t=rhe(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},ohe=the(),Yf="data-scroll-locked",ahe=function(e,t,n,r){var i=e.left,o=e.top,a=e.right,u=e.gap;return n===void 0&&(n="margin"),` - .`.concat(Wde,` { + */(function(e,t){(function(r,i){e.exports=i()})(ua,function(){return function(){var n={686:function(o,a,u){u.d(a,{default:function(){return ue}});var s=u(279),l=u.n(s),c=u(370),d=u.n(c),h=u(817),v=u.n(h);function g(Q){try{return document.execCommand(Q)}catch{return!1}}var m=function(J){var se=v()(J);return g("cut"),se},b=m;function w(Q){var J=document.documentElement.getAttribute("dir")==="rtl",se=document.createElement("textarea");se.style.fontSize="12pt",se.style.border="0",se.style.padding="0",se.style.margin="0",se.style.position="absolute",se.style[J?"right":"left"]="-9999px";var de=window.pageYOffset||document.documentElement.scrollTop;return se.style.top="".concat(de,"px"),se.setAttribute("readonly",""),se.value=Q,se}var x=function(J,se){var de=w(J);se.container.appendChild(de);var Se=v()(de);return g("copy"),de.remove(),Se},S=function(J){var se=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body},de="";return typeof J=="string"?de=x(J,se):J instanceof HTMLInputElement&&!["text","search","url","tel","password"].includes(J?.type)?de=x(J.value,se):(de=v()(J),g("copy")),de},A=S;function E(Q){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?E=function(se){return typeof se}:E=function(se){return se&&typeof Symbol=="function"&&se.constructor===Symbol&&se!==Symbol.prototype?"symbol":typeof se},E(Q)}var C=function(){var J=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},se=J.action,de=se===void 0?"copy":se,Se=J.container,ge=J.target,Ze=J.text;if(de!=="copy"&&de!=="cut")throw new Error('Invalid "action" value, use either "copy" or "cut"');if(ge!==void 0)if(ge&&E(ge)==="object"&&ge.nodeType===1){if(de==="copy"&&ge.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if(de==="cut"&&(ge.hasAttribute("readonly")||ge.hasAttribute("disabled")))throw new Error(`Invalid "target" attribute. You can't cut text from elements with "readonly" or "disabled" attributes`)}else throw new Error('Invalid "target" value, use a valid Element');if(Ze)return A(Ze,{container:Se});if(ge)return de==="cut"?b(ge):A(ge,{container:Se})},T=C;function M(Q){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?M=function(se){return typeof se}:M=function(se){return se&&typeof Symbol=="function"&&se.constructor===Symbol&&se!==Symbol.prototype?"symbol":typeof se},M(Q)}function F(Q,J){if(!(Q instanceof J))throw new TypeError("Cannot call a class as a function")}function U(Q,J){for(var se=0;se"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function B(Q){return B=Object.setPrototypeOf?Object.getPrototypeOf:function(se){return se.__proto__||Object.getPrototypeOf(se)},B(Q)}function q(Q,J){var se="data-clipboard-".concat(Q);if(J.hasAttribute(se))return J.getAttribute(se)}var Y=function(Q){W(se,Q);var J=Z(se);function se(de,Se){var ge;return F(this,se),ge=J.call(this),ge.resolveOptions(Se),ge.listenClick(de),ge}return H(se,[{key:"resolveOptions",value:function(){var Se=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.action=typeof Se.action=="function"?Se.action:this.defaultAction,this.target=typeof Se.target=="function"?Se.target:this.defaultTarget,this.text=typeof Se.text=="function"?Se.text:this.defaultText,this.container=M(Se.container)==="object"?Se.container:document.body}},{key:"listenClick",value:function(Se){var ge=this;this.listener=d()(Se,"click",function(Ze){return ge.onClick(Ze)})}},{key:"onClick",value:function(Se){var ge=Se.delegateTarget||Se.currentTarget,Ze=this.action(ge)||"copy",Pe=T({action:Ze,container:this.container,target:this.target(ge),text:this.text(ge)});this.emit(Pe?"success":"error",{action:Ze,text:Pe,trigger:ge,clearSelection:function(){ge&&ge.focus(),window.getSelection().removeAllRanges()}})}},{key:"defaultAction",value:function(Se){return q("action",Se)}},{key:"defaultTarget",value:function(Se){var ge=q("target",Se);if(ge)return document.querySelector(ge)}},{key:"defaultText",value:function(Se){return q("text",Se)}},{key:"destroy",value:function(){this.listener.destroy()}}],[{key:"copy",value:function(Se){var ge=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body};return A(Se,ge)}},{key:"cut",value:function(Se){return b(Se)}},{key:"isSupported",value:function(){var Se=arguments.length>0&&arguments[0]!==void 0?arguments[0]:["copy","cut"],ge=typeof Se=="string"?[Se]:Se,Ze=!!document.queryCommandSupported;return ge.forEach(function(Pe){Ze=Ze&&!!document.queryCommandSupported(Pe)}),Ze}}]),se}(l()),ue=Y},828:function(o){var a=9;if(typeof Element<"u"&&!Element.prototype.matches){var u=Element.prototype;u.matches=u.matchesSelector||u.mozMatchesSelector||u.msMatchesSelector||u.oMatchesSelector||u.webkitMatchesSelector}function s(l,c){for(;l&&l.nodeType!==a;){if(typeof l.matches=="function"&&l.matches(c))return l;l=l.parentNode}}o.exports=s},438:function(o,a,u){var s=u(828);function l(h,v,g,m,b){var w=d.apply(this,arguments);return h.addEventListener(g,w,b),{destroy:function(){h.removeEventListener(g,w,b)}}}function c(h,v,g,m,b){return typeof h.addEventListener=="function"?l.apply(null,arguments):typeof g=="function"?l.bind(null,document).apply(null,arguments):(typeof h=="string"&&(h=document.querySelectorAll(h)),Array.prototype.map.call(h,function(w){return l(w,v,g,m,b)}))}function d(h,v,g,m){return function(b){b.delegateTarget=s(b.target,v),b.delegateTarget&&m.call(h,b)}}o.exports=c},879:function(o,a){a.node=function(u){return u!==void 0&&u instanceof HTMLElement&&u.nodeType===1},a.nodeList=function(u){var s=Object.prototype.toString.call(u);return u!==void 0&&(s==="[object NodeList]"||s==="[object HTMLCollection]")&&"length"in u&&(u.length===0||a.node(u[0]))},a.string=function(u){return typeof u=="string"||u instanceof String},a.fn=function(u){var s=Object.prototype.toString.call(u);return s==="[object Function]"}},370:function(o,a,u){var s=u(879),l=u(438);function c(g,m,b){if(!g&&!m&&!b)throw new Error("Missing required arguments");if(!s.string(m))throw new TypeError("Second argument must be a String");if(!s.fn(b))throw new TypeError("Third argument must be a Function");if(s.node(g))return d(g,m,b);if(s.nodeList(g))return h(g,m,b);if(s.string(g))return v(g,m,b);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}function d(g,m,b){return g.addEventListener(m,b),{destroy:function(){g.removeEventListener(m,b)}}}function h(g,m,b){return Array.prototype.forEach.call(g,function(w){w.addEventListener(m,b)}),{destroy:function(){Array.prototype.forEach.call(g,function(w){w.removeEventListener(m,b)})}}}function v(g,m,b){return l(document.body,g,m,b)}o.exports=c},817:function(o){function a(u){var s;if(u.nodeName==="SELECT")u.focus(),s=u.value;else if(u.nodeName==="INPUT"||u.nodeName==="TEXTAREA"){var l=u.hasAttribute("readonly");l||u.setAttribute("readonly",""),u.select(),u.setSelectionRange(0,u.value.length),l||u.removeAttribute("readonly"),s=u.value}else{u.hasAttribute("contenteditable")&&u.focus();var c=window.getSelection(),d=document.createRange();d.selectNodeContents(u),c.removeAllRanges(),c.addRange(d),s=c.toString()}return s}o.exports=a},279:function(o){function a(){}a.prototype={on:function(u,s,l){var c=this.e||(this.e={});return(c[u]||(c[u]=[])).push({fn:s,ctx:l}),this},once:function(u,s,l){var c=this;function d(){c.off(u,d),s.apply(l,arguments)}return d._=s,this.on(u,d,l)},emit:function(u){var s=[].slice.call(arguments,1),l=((this.e||(this.e={}))[u]||[]).slice(),c=0,d=l.length;for(c;c{const{children:a,...u}=o,s=y.useMemo(()=>u,Object.values(u));return I.jsx(n.Provider,{value:s,children:a})};r.displayName=e+"Provider";function i(o){const a=y.useContext(n);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${o}\` must be used within \`${e}\``)}return[r,i]}function mi(e,t=[]){let n=[];function r(o,a){const u=y.createContext(a),s=n.length;n=[...n,a];const l=d=>{const{scope:h,children:v,...g}=d,m=h?.[e]?.[s]||u,b=y.useMemo(()=>g,Object.values(g));return I.jsx(m.Provider,{value:b,children:v})};l.displayName=o+"Provider";function c(d,h){const v=h?.[e]?.[s]||u,g=y.useContext(v);if(g)return g;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${o}\``)}return[l,c]}const i=()=>{const o=n.map(a=>y.createContext(a));return function(u){const s=u?.[e]||o;return y.useMemo(()=>({[`__scope${e}`]:{...u,[e]:s}}),[u,s])}};return i.scopeName=e,[r,zde(i,...t)]}function zde(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const a=r.reduce((u,{useScope:s,scopeName:l})=>{const d=s(o)[`__scope${l}`];return{...u,...d}},{});return y.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}var Ude=globalThis?.document?y.useLayoutEffect:()=>{},Wde=i4.useId||(()=>{}),Vde=0;function No(e){const[t,n]=y.useState(Wde());return Ude(()=>{e||n(r=>r??String(Vde++))},[e]),e||(t?`radix-${t}`:"")}function Wr(e){const t=y.useRef(e);return y.useEffect(()=>{t.current=e}),y.useMemo(()=>(...n)=>t.current?.(...n),[])}function Ga({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=Hde({defaultProp:t,onChange:n}),o=e!==void 0,a=o?e:r,u=Wr(n),s=y.useCallback(l=>{if(o){const d=typeof l=="function"?l(e):l;d!==e&&u(d)}else i(l)},[o,e,i,u]);return[a,s]}function Hde({defaultProp:e,onChange:t}){const n=y.useState(e),[r]=n,i=y.useRef(r),o=Wr(t);return y.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}function qde(e){const t=y.useRef(e);return y.useEffect(()=>{t.current=e}),y.useMemo(()=>(...n)=>t.current?.(...n),[])}function Kde(e,t=globalThis?.document){const n=qde(e);y.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Gde="DismissableLayer",BC="dismissableLayer.update",Yde="dismissableLayer.pointerDownOutside",Zde="dismissableLayer.focusOutside",ZM,Wj=y.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),kh=y.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:a,onDismiss:u,...s}=e,l=y.useContext(Wj),[c,d]=y.useState(null),h=c?.ownerDocument??globalThis?.document,[,v]=y.useState({}),g=Kt(t,T=>d(T)),m=Array.from(l.layers),[b]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),w=m.indexOf(b),x=c?m.indexOf(c):-1,S=l.layersWithOutsidePointerEventsDisabled.size>0,A=x>=w,E=Jde(T=>{const M=T.target,F=[...l.branches].some(U=>U.contains(M));!A||F||(i?.(T),a?.(T),T.defaultPrevented||u?.())},h),C=ehe(T=>{const M=T.target;[...l.branches].some(U=>U.contains(M))||(o?.(T),a?.(T),T.defaultPrevented||u?.())},h);return Kde(T=>{x===l.layers.size-1&&(r?.(T),!T.defaultPrevented&&u&&(T.preventDefault(),u()))},h),y.useEffect(()=>{if(c)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(ZM=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(c)),l.layers.add(c),XM(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=ZM)}},[c,h,n,l]),y.useEffect(()=>()=>{c&&(l.layers.delete(c),l.layersWithOutsidePointerEventsDisabled.delete(c),XM())},[c,l]),y.useEffect(()=>{const T=()=>v({});return document.addEventListener(BC,T),()=>document.removeEventListener(BC,T)},[]),I.jsx(pt.div,{...s,ref:g,style:{pointerEvents:S?A?"auto":"none":void 0,...e.style},onFocusCapture:Ye(e.onFocusCapture,C.onFocusCapture),onBlurCapture:Ye(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:Ye(e.onPointerDownCapture,E.onPointerDownCapture)})});kh.displayName=Gde;var Xde="DismissableLayerBranch",Qde=y.forwardRef((e,t)=>{const n=y.useContext(Wj),r=y.useRef(null),i=Kt(t,r);return y.useEffect(()=>{const o=r.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),I.jsx(pt.div,{...e,ref:i})});Qde.displayName=Xde;function Jde(e,t=globalThis?.document){const n=Wr(e),r=y.useRef(!1),i=y.useRef(()=>{});return y.useEffect(()=>{const o=u=>{if(u.target&&!r.current){let s=function(){Vj(Yde,n,l,{discrete:!0})};const l={originalEvent:u};u.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=s,t.addEventListener("click",i.current,{once:!0})):s()}else t.removeEventListener("click",i.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function ehe(e,t=globalThis?.document){const n=Wr(e),r=y.useRef(!1);return y.useEffect(()=>{const i=o=>{o.target&&!r.current&&Vj(Zde,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function XM(){const e=new CustomEvent(BC);document.dispatchEvent(e)}function Vj(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?jj(i,o):i.dispatchEvent(o)}var eS="focusScope.autoFocusOnMount",tS="focusScope.autoFocusOnUnmount",QM={bubbles:!1,cancelable:!0},the="FocusScope",lg=y.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...a}=e,[u,s]=y.useState(null),l=Wr(i),c=Wr(o),d=y.useRef(null),h=Kt(t,m=>s(m)),v=y.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;y.useEffect(()=>{if(r){let m=function(S){if(v.paused||!u)return;const A=S.target;u.contains(A)?d.current=A:Vs(d.current,{select:!0})},b=function(S){if(v.paused||!u)return;const A=S.relatedTarget;A!==null&&(u.contains(A)||Vs(d.current,{select:!0}))},w=function(S){if(document.activeElement===document.body)for(const E of S)E.removedNodes.length>0&&Vs(u)};document.addEventListener("focusin",m),document.addEventListener("focusout",b);const x=new MutationObserver(w);return u&&x.observe(u,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",b),x.disconnect()}}},[r,u,v.paused]),y.useEffect(()=>{if(u){eR.add(v);const m=document.activeElement;if(!u.contains(m)){const w=new CustomEvent(eS,QM);u.addEventListener(eS,l),u.dispatchEvent(w),w.defaultPrevented||(nhe(uhe(Hj(u)),{select:!0}),document.activeElement===m&&Vs(u))}return()=>{u.removeEventListener(eS,l),setTimeout(()=>{const w=new CustomEvent(tS,QM);u.addEventListener(tS,c),u.dispatchEvent(w),w.defaultPrevented||Vs(m??document.body,{select:!0}),u.removeEventListener(tS,c),eR.remove(v)},0)}}},[u,l,c,v]);const g=y.useCallback(m=>{if(!n&&!r||v.paused)return;const b=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,w=document.activeElement;if(b&&w){const x=m.currentTarget,[S,A]=rhe(x);S&&A?!m.shiftKey&&w===A?(m.preventDefault(),n&&Vs(S,{select:!0})):m.shiftKey&&w===S&&(m.preventDefault(),n&&Vs(A,{select:!0})):w===x&&m.preventDefault()}},[n,r,v.paused]);return I.jsx(pt.div,{tabIndex:-1,...a,ref:h,onKeyDown:g})});lg.displayName=the;function nhe(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Vs(r,{select:t}),document.activeElement!==n)return}function rhe(e){const t=Hj(e),n=JM(t,e),r=JM(t.reverse(),e);return[n,r]}function Hj(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function JM(e,t){for(const n of e)if(!ihe(n,{upTo:t}))return n}function ihe(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function ohe(e){return e instanceof HTMLInputElement&&"select"in e}function Vs(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&ohe(e)&&t&&e.select()}}var eR=ahe();function ahe(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=tR(e,t),e.unshift(t)},remove(t){e=tR(e,t),e[0]?.resume()}}}function tR(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function uhe(e){return e.filter(t=>t.tagName!=="A")}var ni=globalThis?.document?y.useLayoutEffect:()=>{},she="Portal",cg=y.forwardRef((e,t)=>{const{container:n,...r}=e,[i,o]=y.useState(!1);ni(()=>o(!0),[]);const a=n||i&&globalThis?.document?.body;return a?_x.createPortal(I.jsx(pt.div,{...r,ref:t}),a):null});cg.displayName=she;function lhe(e,t){return y.useReducer((n,r)=>t[n][r]??n,e)}var ii=e=>{const{present:t,children:n}=e,r=che(t),i=typeof n=="function"?n({present:r.isPresent}):y.Children.only(n),o=Kt(r.ref,fhe(i));return typeof n=="function"||r.isPresent?y.cloneElement(i,{ref:o}):null};ii.displayName="Presence";function che(e){const[t,n]=y.useState(),r=y.useRef({}),i=y.useRef(e),o=y.useRef("none"),a=e?"mounted":"unmounted",[u,s]=lhe(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return y.useEffect(()=>{const l=Vm(r.current);o.current=u==="mounted"?l:"none"},[u]),ni(()=>{const l=r.current,c=i.current;if(c!==e){const h=o.current,v=Vm(l);e?s("MOUNT"):v==="none"||l?.display==="none"?s("UNMOUNT"):s(c&&h!==v?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,s]),ni(()=>{if(t){let l;const c=t.ownerDocument.defaultView??window,d=v=>{const m=Vm(r.current).includes(v.animationName);if(v.target===t&&m&&(s("ANIMATION_END"),!i.current)){const b=t.style.animationFillMode;t.style.animationFillMode="forwards",l=c.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=b)})}},h=v=>{v.target===t&&(o.current=Vm(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{c.clearTimeout(l),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else s("ANIMATION_END")},[t,s]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:y.useCallback(l=>{l&&(r.current=getComputedStyle(l)),n(l)},[])}}function Vm(e){return e?.animationName||"none"}function fhe(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var nS=0;function Lx(){y.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??nR()),document.body.insertAdjacentElement("beforeend",e[1]??nR()),nS++,()=>{nS===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),nS--}},[])}function nR(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Ri=function(){return Ri=Object.assign||function(t){for(var n,r=1,i=arguments.length;r"u")return Ehe;var t=Ahe(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Ohe=Che(),wd="data-scroll-locked",khe=function(e,t,n,r){var i=e.left,o=e.top,a=e.right,u=e.gap;return n===void 0&&(n="margin"),` + .`.concat(dhe,` { overflow: hidden `).concat(r,`; padding-right: `).concat(u,"px ").concat(r,`; } - body[`).concat(Yf,`] { + body[`).concat(wd,`] { overflow: hidden `).concat(r,`; overscroll-behavior: contain; `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&` @@ -102,38 +102,38 @@ Error generating stack: `+o.message+` `),n==="padding"&&"padding-right: ".concat(u,"px ").concat(r,";")].filter(Boolean).join(""),` } - .`).concat(by,` { + .`).concat(Ly,` { right: `).concat(u,"px ").concat(r,`; } - .`).concat(wy,` { + .`).concat(jy,` { margin-right: `).concat(u,"px ").concat(r,`; } - .`).concat(by," .").concat(by,` { + .`).concat(Ly," .").concat(Ly,` { right: 0 `).concat(r,`; } - .`).concat(wy," .").concat(wy,` { + .`).concat(jy," .").concat(jy,` { margin-right: 0 `).concat(r,`; } - body[`).concat(Yf,`] { - `).concat(Vde,": ").concat(u,`px; + body[`).concat(wd,`] { + `).concat(hhe,": ").concat(u,`px; } -`)},KM=function(){var e=parseInt(document.body.getAttribute(Yf)||"0",10);return isFinite(e)?e:0},uhe=function(){b.useEffect(function(){return document.body.setAttribute(Yf,(KM()+1).toString()),function(){var e=KM()-1;e<=0?document.body.removeAttribute(Yf):document.body.setAttribute(Yf,e.toString())}},[])},she=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r;uhe();var o=b.useMemo(function(){return ihe(i)},[i]);return b.createElement(ohe,{styles:ahe(o,!t,i,n?"":"!important")})};function lhe(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=jj();return t&&e.setAttribute("nonce",t),e}function che(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function fhe(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var dhe=function(){var e=0,t=null;return{add:function(n){e==0&&(t=lhe())&&(che(t,n),fhe(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},hhe=function(){var e=dhe();return function(t,n){b.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},lO=function(){var e=hhe(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},P3=!1;if(typeof window<"u")try{var Cv=Object.defineProperty({},"passive",{get:function(){return P3=!0,!0}});window.addEventListener("test",Cv,Cv),window.removeEventListener("test",Cv,Cv)}catch{P3=!1}var cf=P3?{passive:!1}:!1,phe=function(e){return e.tagName==="TEXTAREA"},Bj=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!phe(e)&&n[t]==="visible")},mhe=function(e){return Bj(e,"overflowY")},ghe=function(e){return Bj(e,"overflowX")},YM=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=zj(e,r);if(i){var o=Uj(e,r),a=o[1],u=o[2];if(a>u)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},vhe=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},yhe=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},zj=function(e,t){return e==="v"?mhe(t):ghe(t)},Uj=function(e,t){return e==="v"?vhe(t):yhe(t)},bhe=function(e,t){return e==="h"&&t==="rtl"?-1:1},whe=function(e,t,n,r,i){var o=bhe(e,window.getComputedStyle(t).direction),a=o*r,u=n.target,s=t.contains(u),l=!1,c=a>0,d=0,h=0;do{var m=Uj(e,u),g=m[0],v=m[1],y=m[2],x=v-y-o*g;(g||x)&&zj(e,u)&&(d+=x,h+=g),u instanceof ShadowRoot?u=u.host:u=u.parentNode}while(!s&&u!==document.body||s&&(t.contains(u)||t===u));return(c&&(Math.abs(d)<1||!i)||!c&&(Math.abs(h)<1||!i))&&(l=!0),l},Ev=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},ZM=function(e){return[e.deltaX,e.deltaY]},XM=function(e){return e&&"current"in e?e.current:e},xhe=function(e,t){return e[0]===t[0]&&e[1]===t[1]},_he=function(e){return` +`)},iR=function(){var e=parseInt(document.body.getAttribute(wd)||"0",10);return isFinite(e)?e:0},The=function(){y.useEffect(function(){return document.body.setAttribute(wd,(iR()+1).toString()),function(){var e=iR()-1;e<=0?document.body.removeAttribute(wd):document.body.setAttribute(wd,e.toString())}},[])},Mhe=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r;The();var o=y.useMemo(function(){return Phe(i)},[i]);return y.createElement(Ohe,{styles:khe(o,!t,i,n?"":"!important")})};function Rhe(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Xj();return t&&e.setAttribute("nonce",t),e}function Dhe(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function $he(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Ihe=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Rhe())&&(Dhe(t,n),$he(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Nhe=function(){var e=Ihe();return function(t,n){y.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},SA=function(){var e=Nhe(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},zC=!1;if(typeof window<"u")try{var Hm=Object.defineProperty({},"passive",{get:function(){return zC=!0,!0}});window.addEventListener("test",Hm,Hm),window.removeEventListener("test",Hm,Hm)}catch{zC=!1}var Nf=zC?{passive:!1}:!1,Fhe=function(e){return e.tagName==="TEXTAREA"},Qj=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Fhe(e)&&n[t]==="visible")},Lhe=function(e){return Qj(e,"overflowY")},jhe=function(e){return Qj(e,"overflowX")},oR=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=Jj(e,r);if(i){var o=eB(e,r),a=o[1],u=o[2];if(a>u)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Bhe=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},zhe=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Jj=function(e,t){return e==="v"?Lhe(t):jhe(t)},eB=function(e,t){return e==="v"?Bhe(t):zhe(t)},Uhe=function(e,t){return e==="h"&&t==="rtl"?-1:1},Whe=function(e,t,n,r,i){var o=Uhe(e,window.getComputedStyle(t).direction),a=o*r,u=n.target,s=t.contains(u),l=!1,c=a>0,d=0,h=0;do{var v=eB(e,u),g=v[0],m=v[1],b=v[2],w=m-b-o*g;(g||w)&&Jj(e,u)&&(d+=w,h+=g),u instanceof ShadowRoot?u=u.host:u=u.parentNode}while(!s&&u!==document.body||s&&(t.contains(u)||t===u));return(c&&(Math.abs(d)<1||!i)||!c&&(Math.abs(h)<1||!i))&&(l=!0),l},qm=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},aR=function(e){return[e.deltaX,e.deltaY]},uR=function(e){return e&&"current"in e?e.current:e},Vhe=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Hhe=function(e){return` .block-interactivity-`.concat(e,` {pointer-events: none;} .allow-interactivity-`).concat(e,` {pointer-events: all;} -`)},She=0,ff=[];function Che(e){var t=b.useRef([]),n=b.useRef([0,0]),r=b.useRef(),i=b.useState(She++)[0],o=b.useState(lO)[0],a=b.useRef(e);b.useEffect(function(){a.current=e},[e]),b.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var v=$j([e.lockRef.current],(e.shards||[]).map(XM),!0).filter(Boolean);return v.forEach(function(y){return y.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),v.forEach(function(y){return y.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var u=b.useCallback(function(v,y){if("touches"in v&&v.touches.length===2||v.type==="wheel"&&v.ctrlKey)return!a.current.allowPinchZoom;var x=Ev(v),w=n.current,S="deltaX"in v?v.deltaX:w[0]-x[0],A="deltaY"in v?v.deltaY:w[1]-x[1],E,C=v.target,P=Math.abs(S)>Math.abs(A)?"h":"v";if("touches"in v&&P==="h"&&C.type==="range")return!1;var k=YM(P,C);if(!k)return!0;if(k?E=P:(E=P==="v"?"h":"v",k=YM(P,C)),!k)return!1;if(!r.current&&"changedTouches"in v&&(S||A)&&(r.current=E),!E)return!0;var M=r.current||E;return whe(M,y,v,M==="h"?S:A,!0)},[]),s=b.useCallback(function(v){var y=v;if(!(!ff.length||ff[ff.length-1]!==o)){var x="deltaY"in y?ZM(y):Ev(y),w=t.current.filter(function(E){return E.name===y.type&&(E.target===y.target||y.target===E.shadowParent)&&xhe(E.delta,x)})[0];if(w&&w.should){y.cancelable&&y.preventDefault();return}if(!w){var S=(a.current.shards||[]).map(XM).filter(Boolean).filter(function(E){return E.contains(y.target)}),A=S.length>0?u(y,S[0]):!a.current.noIsolation;A&&y.cancelable&&y.preventDefault()}}},[]),l=b.useCallback(function(v,y,x,w){var S={name:v,delta:y,target:x,should:w,shadowParent:Ehe(x)};t.current.push(S),setTimeout(function(){t.current=t.current.filter(function(A){return A!==S})},1)},[]),c=b.useCallback(function(v){n.current=Ev(v),r.current=void 0},[]),d=b.useCallback(function(v){l(v.type,ZM(v),v.target,u(v,e.lockRef.current))},[]),h=b.useCallback(function(v){l(v.type,Ev(v),v.target,u(v,e.lockRef.current))},[]);b.useEffect(function(){return ff.push(o),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:h}),document.addEventListener("wheel",s,cf),document.addEventListener("touchmove",s,cf),document.addEventListener("touchstart",c,cf),function(){ff=ff.filter(function(v){return v!==o}),document.removeEventListener("wheel",s,cf),document.removeEventListener("touchmove",s,cf),document.removeEventListener("touchstart",c,cf)}},[]);var m=e.removeScrollBar,g=e.inert;return b.createElement(b.Fragment,null,g?b.createElement(o,{styles:_he(i)}):null,m?b.createElement(she,{gapMode:e.gapMode}):null)}function Ehe(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Ahe=Fj(Lj,Che);var Wm=b.forwardRef(function(e,t){return b.createElement(vw,Br({},e,{ref:t,sideCar:Ahe}))});Wm.classNames=vw.classNames;var Ohe=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},df=new WeakMap,Av=new WeakMap,Ov={},H_=0,Wj=function(e){return e&&(e.host||Wj(e.parentNode))},Phe=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Wj(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},khe=function(e,t,n,r){var i=Phe(t,Array.isArray(e)?e:[e]);Ov[n]||(Ov[n]=new WeakMap);var o=Ov[n],a=[],u=new Set,s=new Set(i),l=function(d){!d||u.has(d)||(u.add(d),l(d.parentNode))};i.forEach(l);var c=function(d){!d||s.has(d)||Array.prototype.forEach.call(d.children,function(h){if(u.has(h))c(h);else try{var m=h.getAttribute(r),g=m!==null&&m!=="false",v=(df.get(h)||0)+1,y=(o.get(h)||0)+1;df.set(h,v),o.set(h,y),a.push(h),v===1&&g&&Av.set(h,!0),y===1&&h.setAttribute(n,"true"),g||h.setAttribute(r,"true")}catch(x){console.error("aria-hidden: cannot operate on ",h,x)}})};return c(t),u.clear(),H_++,function(){a.forEach(function(d){var h=df.get(d)-1,m=o.get(d)-1;df.set(d,h),o.set(d,m),h||(Av.has(d)||d.removeAttribute(r),Av.delete(d)),m||d.removeAttribute(n)}),H_--,H_||(df=new WeakMap,df=new WeakMap,Av=new WeakMap,Ov={})}},Vm=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=Ohe(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),khe(r,i,n,"aria-hidden")):function(){return null}},cO="Dialog",[Vj,Hj]=ri(cO),[The,pa]=Vj(cO),qj=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:o,modal:a=!0}=e,u=b.useRef(null),s=b.useRef(null),[l=!1,c]=sa({prop:r,defaultProp:i,onChange:o});return R.jsx(The,{scope:t,triggerRef:u,contentRef:s,contentId:Hi(),titleId:Hi(),descriptionId:Hi(),open:l,onOpenChange:c,onOpenToggle:b.useCallback(()=>c(d=>!d),[c]),modal:a,children:n})};qj.displayName=cO;var Gj="DialogTrigger",Kj=b.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=pa(Gj,n),o=kt(t,i.triggerRef);return R.jsx(Qe.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":hO(i.open),...r,ref:o,onClick:De(e.onClick,i.onOpenToggle)})});Kj.displayName=Gj;var fO="DialogPortal",[Mhe,Yj]=Vj(fO,{forceMount:void 0}),Zj=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:i}=e,o=pa(fO,t);return R.jsx(Mhe,{scope:t,forceMount:n,children:b.Children.map(r,a=>R.jsx(Ci,{present:n||o.open,children:R.jsx(Um,{asChild:!0,container:i,children:a})}))})};Zj.displayName=fO;var _1="DialogOverlay",Xj=b.forwardRef((e,t)=>{const n=Yj(_1,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=pa(_1,e.__scopeDialog);return o.modal?R.jsx(Ci,{present:r||o.open,children:R.jsx(Rhe,{...i,ref:t})}):null});Xj.displayName=_1;var Rhe=b.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=pa(_1,n);return R.jsx(Wm,{as:qs,allowPinchZoom:!0,shards:[i.contentRef],children:R.jsx(Qe.div,{"data-state":hO(i.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),bc="DialogContent",Qj=b.forwardRef((e,t)=>{const n=Yj(bc,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=pa(bc,e.__scopeDialog);return R.jsx(Ci,{present:r||o.open,children:o.modal?R.jsx(Dhe,{...i,ref:t}):R.jsx($he,{...i,ref:t})})});Qj.displayName=bc;var Dhe=b.forwardRef((e,t)=>{const n=pa(bc,e.__scopeDialog),r=b.useRef(null),i=kt(t,n.contentRef,r);return b.useEffect(()=>{const o=r.current;if(o)return Vm(o)},[]),R.jsx(Jj,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:De(e.onCloseAutoFocus,o=>{o.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:De(e.onPointerDownOutside,o=>{const a=o.detail.originalEvent,u=a.button===0&&a.ctrlKey===!0;(a.button===2||u)&&o.preventDefault()}),onFocusOutside:De(e.onFocusOutside,o=>o.preventDefault())})}),$he=b.forwardRef((e,t)=>{const n=pa(bc,e.__scopeDialog),r=b.useRef(!1),i=b.useRef(!1);return R.jsx(Jj,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{e.onCloseAutoFocus?.(o),o.defaultPrevented||(r.current||n.triggerRef.current?.focus(),o.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:o=>{e.onInteractOutside?.(o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const a=o.target;n.triggerRef.current?.contains(a)&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&i.current&&o.preventDefault()}})}),Jj=b.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:o,...a}=e,u=pa(bc,n),s=b.useRef(null),l=kt(t,s);return gw(),R.jsxs(R.Fragment,{children:[R.jsx(zm,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:o,children:R.jsx(th,{role:"dialog",id:u.contentId,"aria-describedby":u.descriptionId,"aria-labelledby":u.titleId,"data-state":hO(u.open),...a,ref:l,onDismiss:()=>u.onOpenChange(!1)})}),R.jsxs(R.Fragment,{children:[R.jsx(Nhe,{titleId:u.titleId}),R.jsx(Lhe,{contentRef:s,descriptionId:u.descriptionId})]})]})}),dO="DialogTitle",eB=b.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=pa(dO,n);return R.jsx(Qe.h2,{id:i.titleId,...r,ref:t})});eB.displayName=dO;var tB="DialogDescription",nB=b.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=pa(tB,n);return R.jsx(Qe.p,{id:i.descriptionId,...r,ref:t})});nB.displayName=tB;var rB="DialogClose",iB=b.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=pa(rB,n);return R.jsx(Qe.button,{type:"button",...r,ref:t,onClick:De(e.onClick,()=>i.onOpenChange(!1))})});iB.displayName=rB;function hO(e){return e?"open":"closed"}var oB="DialogTitleWarning",[Ihe,aB]=vde(oB,{contentName:bc,titleName:dO,docsSlug:"dialog"}),Nhe=({titleId:e})=>{const t=aB(oB),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users. +`)},qhe=0,Ff=[];function Khe(e){var t=y.useRef([]),n=y.useRef([0,0]),r=y.useRef(),i=y.useState(qhe++)[0],o=y.useState(SA)[0],a=y.useRef(e);y.useEffect(function(){a.current=e},[e]),y.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var m=qj([e.lockRef.current],(e.shards||[]).map(uR),!0).filter(Boolean);return m.forEach(function(b){return b.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),m.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var u=y.useCallback(function(m,b){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!a.current.allowPinchZoom;var w=qm(m),x=n.current,S="deltaX"in m?m.deltaX:x[0]-w[0],A="deltaY"in m?m.deltaY:x[1]-w[1],E,C=m.target,T=Math.abs(S)>Math.abs(A)?"h":"v";if("touches"in m&&T==="h"&&C.type==="range")return!1;var M=oR(T,C);if(!M)return!0;if(M?E=T:(E=T==="v"?"h":"v",M=oR(T,C)),!M)return!1;if(!r.current&&"changedTouches"in m&&(S||A)&&(r.current=E),!E)return!0;var F=r.current||E;return Whe(F,b,m,F==="h"?S:A,!0)},[]),s=y.useCallback(function(m){var b=m;if(!(!Ff.length||Ff[Ff.length-1]!==o)){var w="deltaY"in b?aR(b):qm(b),x=t.current.filter(function(E){return E.name===b.type&&(E.target===b.target||b.target===E.shadowParent)&&Vhe(E.delta,w)})[0];if(x&&x.should){b.cancelable&&b.preventDefault();return}if(!x){var S=(a.current.shards||[]).map(uR).filter(Boolean).filter(function(E){return E.contains(b.target)}),A=S.length>0?u(b,S[0]):!a.current.noIsolation;A&&b.cancelable&&b.preventDefault()}}},[]),l=y.useCallback(function(m,b,w,x){var S={name:m,delta:b,target:w,should:x,shadowParent:Ghe(w)};t.current.push(S),setTimeout(function(){t.current=t.current.filter(function(A){return A!==S})},1)},[]),c=y.useCallback(function(m){n.current=qm(m),r.current=void 0},[]),d=y.useCallback(function(m){l(m.type,aR(m),m.target,u(m,e.lockRef.current))},[]),h=y.useCallback(function(m){l(m.type,qm(m),m.target,u(m,e.lockRef.current))},[]);y.useEffect(function(){return Ff.push(o),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:h}),document.addEventListener("wheel",s,Nf),document.addEventListener("touchmove",s,Nf),document.addEventListener("touchstart",c,Nf),function(){Ff=Ff.filter(function(m){return m!==o}),document.removeEventListener("wheel",s,Nf),document.removeEventListener("touchmove",s,Nf),document.removeEventListener("touchstart",c,Nf)}},[]);var v=e.removeScrollBar,g=e.inert;return y.createElement(y.Fragment,null,g?y.createElement(o,{styles:Hhe(i)}):null,v?y.createElement(Mhe,{gapMode:e.gapMode}):null)}function Ghe(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Yhe=Yj(Zj,Khe);var fg=y.forwardRef(function(e,t){return y.createElement(jx,Ri({},e,{ref:t,sideCar:Yhe}))});fg.classNames=jx.classNames;var Zhe=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Lf=new WeakMap,Km=new WeakMap,Gm={},aS=0,tB=function(e){return e&&(e.host||tB(e.parentNode))},Xhe=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=tB(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},Qhe=function(e,t,n,r){var i=Xhe(t,Array.isArray(e)?e:[e]);Gm[n]||(Gm[n]=new WeakMap);var o=Gm[n],a=[],u=new Set,s=new Set(i),l=function(d){!d||u.has(d)||(u.add(d),l(d.parentNode))};i.forEach(l);var c=function(d){!d||s.has(d)||Array.prototype.forEach.call(d.children,function(h){if(u.has(h))c(h);else try{var v=h.getAttribute(r),g=v!==null&&v!=="false",m=(Lf.get(h)||0)+1,b=(o.get(h)||0)+1;Lf.set(h,m),o.set(h,b),a.push(h),m===1&&g&&Km.set(h,!0),b===1&&h.setAttribute(n,"true"),g||h.setAttribute(r,"true")}catch(w){console.error("aria-hidden: cannot operate on ",h,w)}})};return c(t),u.clear(),aS++,function(){a.forEach(function(d){var h=Lf.get(d)-1,v=o.get(d)-1;Lf.set(d,h),o.set(d,v),h||(Km.has(d)||d.removeAttribute(r),Km.delete(d)),v||d.removeAttribute(n)}),aS--,aS||(Lf=new WeakMap,Lf=new WeakMap,Km=new WeakMap,Gm={})}},dg=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=Zhe(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),Qhe(r,i,n,"aria-hidden")):function(){return null}},CA="Dialog",[nB,rB]=mi(CA),[Jhe,eu]=nB(CA),iB=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:o,modal:a=!0}=e,u=y.useRef(null),s=y.useRef(null),[l=!1,c]=Ga({prop:r,defaultProp:i,onChange:o});return I.jsx(Jhe,{scope:t,triggerRef:u,contentRef:s,contentId:No(),titleId:No(),descriptionId:No(),open:l,onOpenChange:c,onOpenToggle:y.useCallback(()=>c(d=>!d),[c]),modal:a,children:n})};iB.displayName=CA;var oB="DialogTrigger",aB=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=eu(oB,n),o=Kt(t,i.triggerRef);return I.jsx(pt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":PA(i.open),...r,ref:o,onClick:Ye(e.onClick,i.onOpenToggle)})});aB.displayName=oB;var EA="DialogPortal",[epe,uB]=nB(EA,{forceMount:void 0}),sB=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:i}=e,o=eu(EA,t);return I.jsx(epe,{scope:t,forceMount:n,children:y.Children.map(r,a=>I.jsx(ii,{present:n||o.open,children:I.jsx(cg,{asChild:!0,container:i,children:a})}))})};sB.displayName=EA;var z1="DialogOverlay",lB=y.forwardRef((e,t)=>{const n=uB(z1,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=eu(z1,e.__scopeDialog);return o.modal?I.jsx(ii,{present:r||o.open,children:I.jsx(tpe,{...i,ref:t})}):null});lB.displayName=z1;var tpe=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=eu(z1,n);return I.jsx(fg,{as:Sl,allowPinchZoom:!0,shards:[i.contentRef],children:I.jsx(pt.div,{"data-state":PA(i.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),qc="DialogContent",cB=y.forwardRef((e,t)=>{const n=uB(qc,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=eu(qc,e.__scopeDialog);return I.jsx(ii,{present:r||o.open,children:o.modal?I.jsx(npe,{...i,ref:t}):I.jsx(rpe,{...i,ref:t})})});cB.displayName=qc;var npe=y.forwardRef((e,t)=>{const n=eu(qc,e.__scopeDialog),r=y.useRef(null),i=Kt(t,n.contentRef,r);return y.useEffect(()=>{const o=r.current;if(o)return dg(o)},[]),I.jsx(fB,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ye(e.onCloseAutoFocus,o=>{o.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:Ye(e.onPointerDownOutside,o=>{const a=o.detail.originalEvent,u=a.button===0&&a.ctrlKey===!0;(a.button===2||u)&&o.preventDefault()}),onFocusOutside:Ye(e.onFocusOutside,o=>o.preventDefault())})}),rpe=y.forwardRef((e,t)=>{const n=eu(qc,e.__scopeDialog),r=y.useRef(!1),i=y.useRef(!1);return I.jsx(fB,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{e.onCloseAutoFocus?.(o),o.defaultPrevented||(r.current||n.triggerRef.current?.focus(),o.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:o=>{e.onInteractOutside?.(o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const a=o.target;n.triggerRef.current?.contains(a)&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&i.current&&o.preventDefault()}})}),fB=y.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:o,...a}=e,u=eu(qc,n),s=y.useRef(null),l=Kt(t,s);return Lx(),I.jsxs(I.Fragment,{children:[I.jsx(lg,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:o,children:I.jsx(kh,{role:"dialog",id:u.contentId,"aria-describedby":u.descriptionId,"aria-labelledby":u.titleId,"data-state":PA(u.open),...a,ref:l,onDismiss:()=>u.onOpenChange(!1)})}),I.jsxs(I.Fragment,{children:[I.jsx(ope,{titleId:u.titleId}),I.jsx(upe,{contentRef:s,descriptionId:u.descriptionId})]})]})}),AA="DialogTitle",dB=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=eu(AA,n);return I.jsx(pt.h2,{id:i.titleId,...r,ref:t})});dB.displayName=AA;var hB="DialogDescription",pB=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=eu(hB,n);return I.jsx(pt.p,{id:i.descriptionId,...r,ref:t})});pB.displayName=hB;var vB="DialogClose",gB=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=eu(vB,n);return I.jsx(pt.button,{type:"button",...r,ref:t,onClick:Ye(e.onClick,()=>i.onOpenChange(!1))})});gB.displayName=vB;function PA(e){return e?"open":"closed"}var mB="DialogTitleWarning",[ipe,yB]=Bde(mB,{contentName:qc,titleName:AA,docsSlug:"dialog"}),ope=({titleId:e})=>{const t=yB(mB),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users. If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component. -For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return b.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},Fhe="DialogDescriptionWarning",Lhe=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${aB(Fhe).contentName}}.`;return b.useEffect(()=>{const i=e.current?.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},jhe=qj,Bhe=Kj,zhe=Zj,Uhe=Xj,Whe=Qj,Vhe=eB,Hhe=nB,uB=iB;function gr(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var qhe=["color"],$qe=b.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=gr(e,qhe);return b.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),b.createElement("path",{d:"M11.4669 3.72684C11.7558 3.91574 11.8369 4.30308 11.648 4.59198L7.39799 11.092C7.29783 11.2452 7.13556 11.3467 6.95402 11.3699C6.77247 11.3931 6.58989 11.3355 6.45446 11.2124L3.70446 8.71241C3.44905 8.48022 3.43023 8.08494 3.66242 7.82953C3.89461 7.57412 4.28989 7.55529 4.5453 7.78749L6.75292 9.79441L10.6018 3.90792C10.7907 3.61902 11.178 3.53795 11.4669 3.72684Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),Ghe=["color"],Iqe=b.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=gr(e,Ghe);return b.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),b.createElement("path",{d:"M7.49991 0.877045C3.84222 0.877045 0.877075 3.84219 0.877075 7.49988C0.877075 11.1575 3.84222 14.1227 7.49991 14.1227C11.1576 14.1227 14.1227 11.1575 14.1227 7.49988C14.1227 3.84219 11.1576 0.877045 7.49991 0.877045ZM1.82708 7.49988C1.82708 4.36686 4.36689 1.82704 7.49991 1.82704C10.6329 1.82704 13.1727 4.36686 13.1727 7.49988C13.1727 10.6329 10.6329 13.1727 7.49991 13.1727C4.36689 13.1727 1.82708 10.6329 1.82708 7.49988ZM10.1589 5.53774C10.3178 5.31191 10.2636 5.00001 10.0378 4.84109C9.81194 4.68217 9.50004 4.73642 9.34112 4.96225L6.51977 8.97154L5.35681 7.78706C5.16334 7.59002 4.84677 7.58711 4.64973 7.78058C4.45268 7.97404 4.44978 8.29061 4.64325 8.48765L6.22658 10.1003C6.33054 10.2062 6.47617 10.2604 6.62407 10.2483C6.77197 10.2363 6.90686 10.1591 6.99226 10.0377L10.1589 5.53774Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),Khe=["color"],Nqe=b.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=gr(e,Khe);return b.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),b.createElement("path",{d:"M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),Yhe=["color"],Fqe=b.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=gr(e,Yhe);return b.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),b.createElement("path",{d:"M8.84182 3.13514C9.04327 3.32401 9.05348 3.64042 8.86462 3.84188L5.43521 7.49991L8.86462 11.1579C9.05348 11.3594 9.04327 11.6758 8.84182 11.8647C8.64036 12.0535 8.32394 12.0433 8.13508 11.8419L4.38508 7.84188C4.20477 7.64955 4.20477 7.35027 4.38508 7.15794L8.13508 3.15794C8.32394 2.95648 8.64036 2.94628 8.84182 3.13514Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),Zhe=["color"],Lqe=b.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=gr(e,Zhe);return b.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),b.createElement("path",{d:"M6.1584 3.13508C6.35985 2.94621 6.67627 2.95642 6.86514 3.15788L10.6151 7.15788C10.7954 7.3502 10.7954 7.64949 10.6151 7.84182L6.86514 11.8418C6.67627 12.0433 6.35985 12.0535 6.1584 11.8646C5.95694 11.6757 5.94673 11.3593 6.1356 11.1579L9.565 7.49985L6.1356 3.84182C5.94673 3.64036 5.95694 3.32394 6.1584 3.13508Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),Xhe=["color"],jqe=b.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=gr(e,Xhe);return b.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),b.createElement("path",{d:"M3.13523 8.84197C3.3241 9.04343 3.64052 9.05363 3.84197 8.86477L7.5 5.43536L11.158 8.86477C11.3595 9.05363 11.6759 9.04343 11.8648 8.84197C12.0536 8.64051 12.0434 8.32409 11.842 8.13523L7.84197 4.38523C7.64964 4.20492 7.35036 4.20492 7.15803 4.38523L3.15803 8.13523C2.95657 8.32409 2.94637 8.64051 3.13523 8.84197Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),Qhe=["color"],Bqe=b.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=gr(e,Qhe);return b.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),b.createElement("path",{d:"M0.877075 7.49991C0.877075 3.84222 3.84222 0.877075 7.49991 0.877075C11.1576 0.877075 14.1227 3.84222 14.1227 7.49991C14.1227 11.1576 11.1576 14.1227 7.49991 14.1227C3.84222 14.1227 0.877075 11.1576 0.877075 7.49991ZM7.49991 1.82708C4.36689 1.82708 1.82708 4.36689 1.82708 7.49991C1.82708 10.6329 4.36689 13.1727 7.49991 13.1727C10.6329 13.1727 13.1727 10.6329 13.1727 7.49991C13.1727 4.36689 10.6329 1.82708 7.49991 1.82708Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),Jhe=["color"],zqe=b.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=gr(e,Jhe);return b.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),b.createElement("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),epe=["color"],Uqe=b.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=gr(e,epe);return b.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),b.createElement("path",{d:"M0.877075 7.49988C0.877075 3.84219 3.84222 0.877045 7.49991 0.877045C11.1576 0.877045 14.1227 3.84219 14.1227 7.49988C14.1227 11.1575 11.1576 14.1227 7.49991 14.1227C3.84222 14.1227 0.877075 11.1575 0.877075 7.49988ZM7.49991 1.82704C4.36689 1.82704 1.82708 4.36686 1.82708 7.49988C1.82708 10.6329 4.36689 13.1727 7.49991 13.1727C10.6329 13.1727 13.1727 10.6329 13.1727 7.49988C13.1727 4.36686 10.6329 1.82704 7.49991 1.82704ZM9.85358 5.14644C10.0488 5.3417 10.0488 5.65829 9.85358 5.85355L8.20713 7.49999L9.85358 9.14644C10.0488 9.3417 10.0488 9.65829 9.85358 9.85355C9.65832 10.0488 9.34173 10.0488 9.14647 9.85355L7.50002 8.2071L5.85358 9.85355C5.65832 10.0488 5.34173 10.0488 5.14647 9.85355C4.95121 9.65829 4.95121 9.3417 5.14647 9.14644L6.79292 7.49999L5.14647 5.85355C4.95121 5.65829 4.95121 5.3417 5.14647 5.14644C5.34173 4.95118 5.65832 4.95118 5.85358 5.14644L7.50002 6.79289L9.14647 5.14644C9.34173 4.95118 9.65832 4.95118 9.85358 5.14644Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),tpe=["color"],Wqe=b.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=gr(e,tpe);return b.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),b.createElement("path",{d:"M9.875 7.5C9.875 8.81168 8.81168 9.875 7.5 9.875C6.18832 9.875 5.125 8.81168 5.125 7.5C5.125 6.18832 6.18832 5.125 7.5 5.125C8.81168 5.125 9.875 6.18832 9.875 7.5Z",fill:r}))}),npe=["color"],Vqe=b.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=gr(e,npe);return b.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),b.createElement("path",{d:"M6.85355 3.85355C7.04882 3.65829 7.04882 3.34171 6.85355 3.14645C6.65829 2.95118 6.34171 2.95118 6.14645 3.14645L2.14645 7.14645C1.95118 7.34171 1.95118 7.65829 2.14645 7.85355L6.14645 11.8536C6.34171 12.0488 6.65829 12.0488 6.85355 11.8536C7.04882 11.6583 7.04882 11.3417 6.85355 11.1464L3.20711 7.5L6.85355 3.85355ZM12.8536 3.85355C13.0488 3.65829 13.0488 3.34171 12.8536 3.14645C12.6583 2.95118 12.3417 2.95118 12.1464 3.14645L8.14645 7.14645C7.95118 7.34171 7.95118 7.65829 8.14645 7.85355L12.1464 11.8536C12.3417 12.0488 12.6583 12.0488 12.8536 11.8536C13.0488 11.6583 13.0488 11.3417 12.8536 11.1464L9.20711 7.5L12.8536 3.85355Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),rpe=["color"],Hqe=b.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=gr(e,rpe);return b.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),b.createElement("path",{d:"M2.14645 11.1464C1.95118 11.3417 1.95118 11.6583 2.14645 11.8536C2.34171 12.0488 2.65829 12.0488 2.85355 11.8536L6.85355 7.85355C7.04882 7.65829 7.04882 7.34171 6.85355 7.14645L2.85355 3.14645C2.65829 2.95118 2.34171 2.95118 2.14645 3.14645C1.95118 3.34171 1.95118 3.65829 2.14645 3.85355L5.79289 7.5L2.14645 11.1464ZM8.14645 11.1464C7.95118 11.3417 7.95118 11.6583 8.14645 11.8536C8.34171 12.0488 8.65829 12.0488 8.85355 11.8536L12.8536 7.85355C13.0488 7.65829 13.0488 7.34171 12.8536 7.14645L8.85355 3.14645C8.65829 2.95118 8.34171 2.95118 8.14645 3.14645C7.95118 3.34171 7.95118 3.65829 8.14645 3.85355L11.7929 7.5L8.14645 11.1464Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),ipe=["color"],qqe=b.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=gr(e,ipe);return b.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),b.createElement("path",{d:"M5.5 4.625C6.12132 4.625 6.625 4.12132 6.625 3.5C6.625 2.87868 6.12132 2.375 5.5 2.375C4.87868 2.375 4.375 2.87868 4.375 3.5C4.375 4.12132 4.87868 4.625 5.5 4.625ZM9.5 4.625C10.1213 4.625 10.625 4.12132 10.625 3.5C10.625 2.87868 10.1213 2.375 9.5 2.375C8.87868 2.375 8.375 2.87868 8.375 3.5C8.375 4.12132 8.87868 4.625 9.5 4.625ZM10.625 7.5C10.625 8.12132 10.1213 8.625 9.5 8.625C8.87868 8.625 8.375 8.12132 8.375 7.5C8.375 6.87868 8.87868 6.375 9.5 6.375C10.1213 6.375 10.625 6.87868 10.625 7.5ZM5.5 8.625C6.12132 8.625 6.625 8.12132 6.625 7.5C6.625 6.87868 6.12132 6.375 5.5 6.375C4.87868 6.375 4.375 6.87868 4.375 7.5C4.375 8.12132 4.87868 8.625 5.5 8.625ZM10.625 11.5C10.625 12.1213 10.1213 12.625 9.5 12.625C8.87868 12.625 8.375 12.1213 8.375 11.5C8.375 10.8787 8.87868 10.375 9.5 10.375C10.1213 10.375 10.625 10.8787 10.625 11.5ZM5.5 12.625C6.12132 12.625 6.625 12.1213 6.625 11.5C6.625 10.8787 6.12132 10.375 5.5 10.375C4.87868 10.375 4.375 10.8787 4.375 11.5C4.375 12.1213 4.87868 12.625 5.5 12.625Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),ope=["color"],Gqe=b.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=gr(e,ope);return b.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),b.createElement("path",{d:"M10 6.5C10 8.433 8.433 10 6.5 10C4.567 10 3 8.433 3 6.5C3 4.567 4.567 3 6.5 3C8.433 3 10 4.567 10 6.5ZM9.30884 10.0159C8.53901 10.6318 7.56251 11 6.5 11C4.01472 11 2 8.98528 2 6.5C2 4.01472 4.01472 2 6.5 2C8.98528 2 11 4.01472 11 6.5C11 7.56251 10.6318 8.53901 10.0159 9.30884L12.8536 12.1464C13.0488 12.3417 13.0488 12.6583 12.8536 12.8536C12.6583 13.0488 12.3417 13.0488 12.1464 12.8536L9.30884 10.0159Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),ape=["color"],Kqe=b.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=gr(e,ape);return b.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),b.createElement("path",{d:"M12.1464 1.14645C12.3417 0.951184 12.6583 0.951184 12.8535 1.14645L14.8535 3.14645C15.0488 3.34171 15.0488 3.65829 14.8535 3.85355L10.9109 7.79618C10.8349 7.87218 10.7471 7.93543 10.651 7.9835L6.72359 9.94721C6.53109 10.0435 6.29861 10.0057 6.14643 9.85355C5.99425 9.70137 5.95652 9.46889 6.05277 9.27639L8.01648 5.34897C8.06455 5.25283 8.1278 5.16507 8.2038 5.08907L12.1464 1.14645ZM12.5 2.20711L8.91091 5.79618L7.87266 7.87267L8.12731 8.12732L10.2038 7.08907L13.7929 3.5L12.5 2.20711ZM9.99998 2L8.99998 3H4.9C4.47171 3 4.18056 3.00039 3.95552 3.01877C3.73631 3.03668 3.62421 3.06915 3.54601 3.10899C3.35785 3.20487 3.20487 3.35785 3.10899 3.54601C3.06915 3.62421 3.03669 3.73631 3.01878 3.95552C3.00039 4.18056 3 4.47171 3 4.9V11.1C3 11.5283 3.00039 11.8194 3.01878 12.0445C3.03669 12.2637 3.06915 12.3758 3.10899 12.454C3.20487 12.6422 3.35785 12.7951 3.54601 12.891C3.62421 12.9309 3.73631 12.9633 3.95552 12.9812C4.18056 12.9996 4.47171 13 4.9 13H11.1C11.5283 13 11.8194 12.9996 12.0445 12.9812C12.2637 12.9633 12.3758 12.9309 12.454 12.891C12.6422 12.7951 12.7951 12.6422 12.891 12.454C12.9309 12.3758 12.9633 12.2637 12.9812 12.0445C12.9996 11.8194 13 11.5283 13 11.1V6.99998L14 5.99998V11.1V11.1207C14 11.5231 14 11.8553 13.9779 12.1259C13.9549 12.407 13.9057 12.6653 13.782 12.908C13.5903 13.2843 13.2843 13.5903 12.908 13.782C12.6653 13.9057 12.407 13.9549 12.1259 13.9779C11.8553 14 11.5231 14 11.1207 14H11.1H4.9H4.87934C4.47686 14 4.14468 14 3.87409 13.9779C3.59304 13.9549 3.33469 13.9057 3.09202 13.782C2.7157 13.5903 2.40973 13.2843 2.21799 12.908C2.09434 12.6653 2.04506 12.407 2.0221 12.1259C1.99999 11.8553 1.99999 11.5231 2 11.1207V11.1206V11.1V4.9V4.87935V4.87932V4.87931C1.99999 4.47685 1.99999 4.14468 2.0221 3.87409C2.04506 3.59304 2.09434 3.33469 2.21799 3.09202C2.40973 2.71569 2.7157 2.40973 3.09202 2.21799C3.33469 2.09434 3.59304 2.04506 3.87409 2.0221C4.14468 1.99999 4.47685 1.99999 4.87932 2H4.87935H4.9H9.99998Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),upe=["color"],Yqe=b.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=gr(e,upe);return b.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),b.createElement("path",{d:"M7.49991 0.876892C3.84222 0.876892 0.877075 3.84204 0.877075 7.49972C0.877075 11.1574 3.84222 14.1226 7.49991 14.1226C11.1576 14.1226 14.1227 11.1574 14.1227 7.49972C14.1227 3.84204 11.1576 0.876892 7.49991 0.876892ZM1.82707 7.49972C1.82707 4.36671 4.36689 1.82689 7.49991 1.82689C10.6329 1.82689 13.1727 4.36671 13.1727 7.49972C13.1727 10.6327 10.6329 13.1726 7.49991 13.1726C4.36689 13.1726 1.82707 10.6327 1.82707 7.49972ZM7.50003 4C7.77617 4 8.00003 4.22386 8.00003 4.5V7H10.5C10.7762 7 11 7.22386 11 7.5C11 7.77614 10.7762 8 10.5 8H8.00003V10.5C8.00003 10.7761 7.77617 11 7.50003 11C7.22389 11 7.00003 10.7761 7.00003 10.5V8H4.50003C4.22389 8 4.00003 7.77614 4.00003 7.5C4.00003 7.22386 4.22389 7 4.50003 7H7.00003V4.5C7.00003 4.22386 7.22389 4 7.50003 4Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),spe=["color"],Zqe=b.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=gr(e,spe);return b.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),b.createElement("path",{d:"M0.877075 7.49972C0.877075 3.84204 3.84222 0.876892 7.49991 0.876892C11.1576 0.876892 14.1227 3.84204 14.1227 7.49972C14.1227 11.1574 11.1576 14.1226 7.49991 14.1226C3.84222 14.1226 0.877075 11.1574 0.877075 7.49972ZM7.49991 1.82689C4.36689 1.82689 1.82708 4.36671 1.82708 7.49972C1.82708 10.6327 4.36689 13.1726 7.49991 13.1726C10.6329 13.1726 13.1727 10.6327 13.1727 7.49972C13.1727 4.36671 10.6329 1.82689 7.49991 1.82689ZM8.24993 10.5C8.24993 10.9142 7.91414 11.25 7.49993 11.25C7.08571 11.25 6.74993 10.9142 6.74993 10.5C6.74993 10.0858 7.08571 9.75 7.49993 9.75C7.91414 9.75 8.24993 10.0858 8.24993 10.5ZM6.05003 6.25C6.05003 5.57211 6.63511 4.925 7.50003 4.925C8.36496 4.925 8.95003 5.57211 8.95003 6.25C8.95003 6.74118 8.68002 6.99212 8.21447 7.27494C8.16251 7.30651 8.10258 7.34131 8.03847 7.37854L8.03841 7.37858C7.85521 7.48497 7.63788 7.61119 7.47449 7.73849C7.23214 7.92732 6.95003 8.23198 6.95003 8.7C6.95004 9.00376 7.19628 9.25 7.50004 9.25C7.8024 9.25 8.04778 9.00601 8.05002 8.70417L8.05056 8.7033C8.05924 8.6896 8.08493 8.65735 8.15058 8.6062C8.25207 8.52712 8.36508 8.46163 8.51567 8.37436L8.51571 8.37433C8.59422 8.32883 8.68296 8.27741 8.78559 8.21506C9.32004 7.89038 10.05 7.35382 10.05 6.25C10.05 4.92789 8.93511 3.825 7.50003 3.825C6.06496 3.825 4.95003 4.92789 4.95003 6.25C4.95003 6.55376 5.19628 6.8 5.50003 6.8C5.80379 6.8 6.05003 6.55376 6.05003 6.25Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),lpe=["color"],Xqe=b.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=gr(e,lpe);return b.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),b.createElement("path",{d:"M5.49998 0.5C5.49998 0.223858 5.72383 0 5.99998 0H7.49998H8.99998C9.27612 0 9.49998 0.223858 9.49998 0.5C9.49998 0.776142 9.27612 1 8.99998 1H7.99998V2.11922C9.09832 2.20409 10.119 2.56622 10.992 3.13572C11.0116 3.10851 11.0336 3.08252 11.058 3.05806L11.858 2.25806C12.1021 2.01398 12.4978 2.01398 12.7419 2.25806C12.986 2.50214 12.986 2.89786 12.7419 3.14194L11.967 3.91682C13.1595 5.07925 13.9 6.70314 13.9 8.49998C13.9 12.0346 11.0346 14.9 7.49998 14.9C3.96535 14.9 1.09998 12.0346 1.09998 8.49998C1.09998 5.13362 3.69904 2.3743 6.99998 2.11922V1H5.99998C5.72383 1 5.49998 0.776142 5.49998 0.5ZM2.09998 8.49998C2.09998 5.51764 4.51764 3.09998 7.49998 3.09998C10.4823 3.09998 12.9 5.51764 12.9 8.49998C12.9 11.4823 10.4823 13.9 7.49998 13.9C4.51764 13.9 2.09998 11.4823 2.09998 8.49998ZM7.99998 4.5C7.99998 4.22386 7.77612 4 7.49998 4C7.22383 4 6.99998 4.22386 6.99998 4.5V9.5C6.99998 9.77614 7.22383 10 7.49998 10C7.77612 10 7.99998 9.77614 7.99998 9.5V4.5Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),pO="Collapsible",[cpe,Qqe]=ri(pO),[fpe,mO]=cpe(pO),sB=b.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:o,onOpenChange:a,...u}=e,[s=!1,l]=sa({prop:r,defaultProp:i,onChange:a});return R.jsx(fpe,{scope:n,disabled:o,contentId:Hi(),open:s,onOpenToggle:b.useCallback(()=>l(c=>!c),[l]),children:R.jsx(Qe.div,{"data-state":vO(s),"data-disabled":o?"":void 0,...u,ref:t})})});sB.displayName=pO;var lB="CollapsibleTrigger",dpe=b.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,i=mO(lB,n);return R.jsx(Qe.button,{type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":vO(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled,...r,ref:t,onClick:De(e.onClick,i.onOpenToggle)})});dpe.displayName=lB;var gO="CollapsibleContent",hpe=b.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=mO(gO,e.__scopeCollapsible);return R.jsx(Ci,{present:n||i.open,children:({present:o})=>R.jsx(ppe,{...r,ref:t,present:o})})});hpe.displayName=gO;var ppe=b.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:i,...o}=e,a=mO(gO,n),[u,s]=b.useState(r),l=b.useRef(null),c=kt(t,l),d=b.useRef(0),h=d.current,m=b.useRef(0),g=m.current,v=a.open||u,y=b.useRef(v),x=b.useRef(void 0);return b.useEffect(()=>{const w=requestAnimationFrame(()=>y.current=!1);return()=>cancelAnimationFrame(w)},[]),Pr(()=>{const w=l.current;if(w){x.current=x.current||{transitionDuration:w.style.transitionDuration,animationName:w.style.animationName},w.style.transitionDuration="0s",w.style.animationName="none";const S=w.getBoundingClientRect();d.current=S.height,m.current=S.width,y.current||(w.style.transitionDuration=x.current.transitionDuration,w.style.animationName=x.current.animationName),s(r)}},[a.open,r]),R.jsx(Qe.div,{"data-state":vO(a.open),"data-disabled":a.disabled?"":void 0,id:a.contentId,hidden:!v,...o,ref:c,style:{"--radix-collapsible-content-height":h?`${h}px`:void 0,"--radix-collapsible-content-width":g?`${g}px`:void 0,...e.style},children:v&&i})});function vO(e){return e?"open":"closed"}var Jqe=sB;function yO(e){const t=e+"CollectionProvider",[n,r]=ri(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=m=>{const{scope:g,children:v}=m,y=$.useRef(null),x=$.useRef(new Map).current;return R.jsx(i,{scope:g,itemMap:x,collectionRef:y,children:v})};a.displayName=t;const u=e+"CollectionSlot",s=$.forwardRef((m,g)=>{const{scope:v,children:y}=m,x=o(u,v),w=kt(g,x.collectionRef);return R.jsx(qs,{ref:w,children:y})});s.displayName=u;const l=e+"CollectionItemSlot",c="data-radix-collection-item",d=$.forwardRef((m,g)=>{const{scope:v,children:y,...x}=m,w=$.useRef(null),S=kt(g,w),A=o(l,v);return $.useEffect(()=>(A.itemMap.set(w,{ref:w,...x}),()=>void A.itemMap.delete(w))),R.jsx(qs,{[c]:"",ref:S,children:y})});d.displayName=l;function h(m){const g=o(e+"CollectionConsumer",m);return $.useCallback(()=>{const y=g.collectionRef.current;if(!y)return[];const x=Array.from(y.querySelectorAll(`[${c}]`));return Array.from(g.itemMap.values()).sort((A,E)=>x.indexOf(A.ref.current)-x.indexOf(E.ref.current))},[g.collectionRef,g.itemMap])}return[{Provider:a,Slot:s,ItemSlot:d},h,r]}var mpe=b.createContext(void 0);function yw(e){const t=b.useContext(mpe);return e||t||"ltr"}const gpe=["top","right","bottom","left"],Xs=Math.min,ji=Math.max,S1=Math.round,Pv=Math.floor,Qs=e=>({x:e,y:e}),vpe={left:"right",right:"left",bottom:"top",top:"bottom"},ype={start:"end",end:"start"};function k3(e,t,n){return ji(e,Xs(t,n))}function Du(e,t){return typeof e=="function"?e(t):e}function $u(e){return e.split("-")[0]}function nh(e){return e.split("-")[1]}function bO(e){return e==="x"?"y":"x"}function wO(e){return e==="y"?"height":"width"}function rh(e){return["top","bottom"].includes($u(e))?"y":"x"}function xO(e){return bO(rh(e))}function bpe(e,t,n){n===void 0&&(n=!1);const r=nh(e),i=xO(e),o=wO(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=C1(a)),[a,C1(a)]}function wpe(e){const t=C1(e);return[T3(e),t,T3(t)]}function T3(e){return e.replace(/start|end/g,t=>ype[t])}function xpe(e,t,n){const r=["left","right"],i=["right","left"],o=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?i:r:t?r:i;case"left":case"right":return t?o:a;default:return[]}}function _pe(e,t,n,r){const i=nh(e);let o=xpe($u(e),n==="start",r);return i&&(o=o.map(a=>a+"-"+i),t&&(o=o.concat(o.map(T3)))),o}function C1(e){return e.replace(/left|right|bottom|top/g,t=>vpe[t])}function Spe(e){return{top:0,right:0,bottom:0,left:0,...e}}function cB(e){return typeof e!="number"?Spe(e):{top:e,right:e,bottom:e,left:e}}function E1(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function QM(e,t,n){let{reference:r,floating:i}=e;const o=rh(t),a=xO(t),u=wO(a),s=$u(t),l=o==="y",c=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,h=r[u]/2-i[u]/2;let m;switch(s){case"top":m={x:c,y:r.y-i.height};break;case"bottom":m={x:c,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:d};break;case"left":m={x:r.x-i.width,y:d};break;default:m={x:r.x,y:r.y}}switch(nh(t)){case"start":m[a]-=h*(n&&l?-1:1);break;case"end":m[a]+=h*(n&&l?-1:1);break}return m}const Cpe=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,u=o.filter(Boolean),s=await(a.isRTL==null?void 0:a.isRTL(t));let l=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:c,y:d}=QM(l,r,s),h=r,m={},g=0;for(let v=0;v({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:o,platform:a,elements:u,middlewareData:s}=t,{element:l,padding:c=0}=Du(e,t)||{};if(l==null)return{};const d=cB(c),h={x:n,y:r},m=xO(i),g=wO(m),v=await a.getDimensions(l),y=m==="y",x=y?"top":"left",w=y?"bottom":"right",S=y?"clientHeight":"clientWidth",A=o.reference[g]+o.reference[m]-h[m]-o.floating[g],E=h[m]-o.reference[m],C=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l));let P=C?C[S]:0;(!P||!await(a.isElement==null?void 0:a.isElement(C)))&&(P=u.floating[S]||o.floating[g]);const k=A/2-E/2,M=P/2-v[g]/2-1,L=Xs(d[x],M),B=Xs(d[w],M),F=L,Y=P-v[g]-B,H=P/2-v[g]/2+k,W=k3(F,H,Y),V=!s.arrow&&nh(i)!=null&&H!==W&&o.reference[g]/2-(HF<=0)){var M,L;const F=(((M=o.flip)==null?void 0:M.index)||0)+1,Y=E[F];if(Y)return{data:{index:F,overflows:k},reset:{placement:Y}};let H=(L=k.filter(W=>W.overflows[0]<=0).sort((W,V)=>W.overflows[1]-V.overflows[1])[0])==null?void 0:L.placement;if(!H)switch(m){case"bestFit":{var B;const W=(B=k.map(V=>[V.placement,V.overflows.filter(j=>j>0).reduce((j,I)=>j+I,0)]).sort((V,j)=>V[1]-j[1])[0])==null?void 0:B[0];W&&(H=W);break}case"initialPlacement":H=u;break}if(i!==H)return{reset:{placement:H}}}return{}}}};function JM(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function eR(e){return gpe.some(t=>e[t]>=0)}const Ope=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...i}=Du(e,t);switch(r){case"referenceHidden":{const o=await D0(t,{...i,elementContext:"reference"}),a=JM(o,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:eR(a)}}}case"escaped":{const o=await D0(t,{...i,altBoundary:!0}),a=JM(o,n.floating);return{data:{escapedOffsets:a,escaped:eR(a)}}}default:return{}}}}};async function Ppe(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=$u(n),u=nh(n),s=rh(n)==="y",l=["left","top"].includes(a)?-1:1,c=o&&s?-1:1,d=Du(t,e);let{mainAxis:h,crossAxis:m,alignmentAxis:g}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return u&&typeof g=="number"&&(m=u==="end"?g*-1:g),s?{x:m*c,y:h*l}:{x:h*l,y:m*c}}const kpe=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:o,placement:a,middlewareData:u}=t,s=await Ppe(t,e);return a===((n=u.offset)==null?void 0:n.placement)&&(r=u.arrow)!=null&&r.alignmentOffset?{}:{x:i+s.x,y:o+s.y,data:{...s,placement:a}}}}},Tpe=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:u={fn:y=>{let{x,y:w}=y;return{x,y:w}}},...s}=Du(e,t),l={x:n,y:r},c=await D0(t,s),d=rh($u(i)),h=bO(d);let m=l[h],g=l[d];if(o){const y=h==="y"?"top":"left",x=h==="y"?"bottom":"right",w=m+c[y],S=m-c[x];m=k3(w,m,S)}if(a){const y=d==="y"?"top":"left",x=d==="y"?"bottom":"right",w=g+c[y],S=g-c[x];g=k3(w,g,S)}const v=u.fn({...t,[h]:m,[d]:g});return{...v,data:{x:v.x-n,y:v.y-r}}}}},Mpe=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:o,middlewareData:a}=t,{offset:u=0,mainAxis:s=!0,crossAxis:l=!0}=Du(e,t),c={x:n,y:r},d=rh(i),h=bO(d);let m=c[h],g=c[d];const v=Du(u,t),y=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(s){const S=h==="y"?"height":"width",A=o.reference[h]-o.floating[S]+y.mainAxis,E=o.reference[h]+o.reference[S]-y.mainAxis;mE&&(m=E)}if(l){var x,w;const S=h==="y"?"width":"height",A=["top","left"].includes($u(i)),E=o.reference[d]-o.floating[S]+(A&&((x=a.offset)==null?void 0:x[d])||0)+(A?0:y.crossAxis),C=o.reference[d]+o.reference[S]+(A?0:((w=a.offset)==null?void 0:w[d])||0)-(A?y.crossAxis:0);gC&&(g=C)}return{[h]:m,[d]:g}}}},Rpe=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:i,elements:o}=t,{apply:a=()=>{},...u}=Du(e,t),s=await D0(t,u),l=$u(n),c=nh(n),d=rh(n)==="y",{width:h,height:m}=r.floating;let g,v;l==="top"||l==="bottom"?(g=l,v=c===(await(i.isRTL==null?void 0:i.isRTL(o.floating))?"start":"end")?"left":"right"):(v=l,g=c==="end"?"top":"bottom");const y=m-s[g],x=h-s[v],w=!t.middlewareData.shift;let S=y,A=x;if(d){const C=h-s.left-s.right;A=c||w?Xs(x,C):C}else{const C=m-s.top-s.bottom;S=c||w?Xs(y,C):C}if(w&&!c){const C=ji(s.left,0),P=ji(s.right,0),k=ji(s.top,0),M=ji(s.bottom,0);d?A=h-2*(C!==0||P!==0?C+P:ji(s.left,s.right)):S=m-2*(k!==0||M!==0?k+M:ji(s.top,s.bottom))}await a({...t,availableWidth:A,availableHeight:S});const E=await i.getDimensions(o.floating);return h!==E.width||m!==E.height?{reset:{rects:!0}}:{}}}};function Js(e){return fB(e)?(e.nodeName||"").toLowerCase():"#document"}function qi(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Uu(e){var t;return(t=(fB(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function fB(e){return e instanceof Node||e instanceof qi(e).Node}function Iu(e){return e instanceof Element||e instanceof qi(e).Element}function za(e){return e instanceof HTMLElement||e instanceof qi(e).HTMLElement}function tR(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof qi(e).ShadowRoot}function Hm(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=To(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function Dpe(e){return["table","td","th"].includes(Js(e))}function _O(e){const t=SO(),n=To(e);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function $pe(e){let t=gd(e);for(;za(t)&&!bw(t);){if(_O(t))return t;t=gd(t)}return null}function SO(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function bw(e){return["html","body","#document"].includes(Js(e))}function To(e){return qi(e).getComputedStyle(e)}function ww(e){return Iu(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function gd(e){if(Js(e)==="html")return e;const t=e.assignedSlot||e.parentNode||tR(e)&&e.host||Uu(e);return tR(t)?t.host:t}function dB(e){const t=gd(e);return bw(t)?e.ownerDocument?e.ownerDocument.body:e.body:za(t)&&Hm(t)?t:dB(t)}function $0(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=dB(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),a=qi(i);return o?t.concat(a,a.visualViewport||[],Hm(i)?i:[],a.frameElement&&n?$0(a.frameElement):[]):t.concat(i,$0(i,[],n))}function hB(e){const t=To(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=za(e),o=i?e.offsetWidth:n,a=i?e.offsetHeight:r,u=S1(n)!==o||S1(r)!==a;return u&&(n=o,r=a),{width:n,height:r,$:u}}function CO(e){return Iu(e)?e:e.contextElement}function Zf(e){const t=CO(e);if(!za(t))return Qs(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=hB(t);let a=(o?S1(n.width):n.width)/r,u=(o?S1(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!u||!Number.isFinite(u))&&(u=1),{x:a,y:u}}const Ipe=Qs(0);function pB(e){const t=qi(e);return!SO()||!t.visualViewport?Ipe:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Npe(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==qi(e)?!1:t}function wc(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=CO(e);let a=Qs(1);t&&(r?Iu(r)&&(a=Zf(r)):a=Zf(e));const u=Npe(o,n,r)?pB(o):Qs(0);let s=(i.left+u.x)/a.x,l=(i.top+u.y)/a.y,c=i.width/a.x,d=i.height/a.y;if(o){const h=qi(o),m=r&&Iu(r)?qi(r):r;let g=h,v=g.frameElement;for(;v&&r&&m!==g;){const y=Zf(v),x=v.getBoundingClientRect(),w=To(v),S=x.left+(v.clientLeft+parseFloat(w.paddingLeft))*y.x,A=x.top+(v.clientTop+parseFloat(w.paddingTop))*y.y;s*=y.x,l*=y.y,c*=y.x,d*=y.y,s+=S,l+=A,g=qi(v),v=g.frameElement}}return E1({width:c,height:d,x:s,y:l})}const Fpe=[":popover-open",":modal"];function mB(e){return Fpe.some(t=>{try{return e.matches(t)}catch{return!1}})}function Lpe(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const o=i==="fixed",a=Uu(r),u=t?mB(t.floating):!1;if(r===a||u&&o)return n;let s={scrollLeft:0,scrollTop:0},l=Qs(1);const c=Qs(0),d=za(r);if((d||!d&&!o)&&((Js(r)!=="body"||Hm(a))&&(s=ww(r)),za(r))){const h=wc(r);l=Zf(r),c.x=h.x+r.clientLeft,c.y=h.y+r.clientTop}return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-s.scrollLeft*l.x+c.x,y:n.y*l.y-s.scrollTop*l.y+c.y}}function jpe(e){return Array.from(e.getClientRects())}function gB(e){return wc(Uu(e)).left+ww(e).scrollLeft}function Bpe(e){const t=Uu(e),n=ww(e),r=e.ownerDocument.body,i=ji(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=ji(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+gB(e);const u=-n.scrollTop;return To(r).direction==="rtl"&&(a+=ji(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:a,y:u}}function zpe(e,t){const n=qi(e),r=Uu(e),i=n.visualViewport;let o=r.clientWidth,a=r.clientHeight,u=0,s=0;if(i){o=i.width,a=i.height;const l=SO();(!l||l&&t==="fixed")&&(u=i.offsetLeft,s=i.offsetTop)}return{width:o,height:a,x:u,y:s}}function Upe(e,t){const n=wc(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=za(e)?Zf(e):Qs(1),a=e.clientWidth*o.x,u=e.clientHeight*o.y,s=i*o.x,l=r*o.y;return{width:a,height:u,x:s,y:l}}function nR(e,t,n){let r;if(t==="viewport")r=zpe(e,n);else if(t==="document")r=Bpe(Uu(e));else if(Iu(t))r=Upe(t,n);else{const i=pB(e);r={...t,x:t.x-i.x,y:t.y-i.y}}return E1(r)}function vB(e,t){const n=gd(e);return n===t||!Iu(n)||bw(n)?!1:To(n).position==="fixed"||vB(n,t)}function Wpe(e,t){const n=t.get(e);if(n)return n;let r=$0(e,[],!1).filter(u=>Iu(u)&&Js(u)!=="body"),i=null;const o=To(e).position==="fixed";let a=o?gd(e):e;for(;Iu(a)&&!bw(a);){const u=To(a),s=_O(a);!s&&u.position==="fixed"&&(i=null),(o?!s&&!i:!s&&u.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||Hm(a)&&!s&&vB(e,a))?r=r.filter(c=>c!==a):i=u,a=gd(a)}return t.set(e,r),r}function Vpe(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const a=[...n==="clippingAncestors"?Wpe(t,this._c):[].concat(n),r],u=a[0],s=a.reduce((l,c)=>{const d=nR(t,c,i);return l.top=ji(d.top,l.top),l.right=Xs(d.right,l.right),l.bottom=Xs(d.bottom,l.bottom),l.left=ji(d.left,l.left),l},nR(t,u,i));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}}function Hpe(e){const{width:t,height:n}=hB(e);return{width:t,height:n}}function qpe(e,t,n){const r=za(t),i=Uu(t),o=n==="fixed",a=wc(e,!0,o,t);let u={scrollLeft:0,scrollTop:0};const s=Qs(0);if(r||!r&&!o)if((Js(t)!=="body"||Hm(i))&&(u=ww(t)),r){const d=wc(t,!0,o,t);s.x=d.x+t.clientLeft,s.y=d.y+t.clientTop}else i&&(s.x=gB(i));const l=a.left+u.scrollLeft-s.x,c=a.top+u.scrollTop-s.y;return{x:l,y:c,width:a.width,height:a.height}}function rR(e,t){return!za(e)||To(e).position==="fixed"?null:t?t(e):e.offsetParent}function yB(e,t){const n=qi(e);if(!za(e)||mB(e))return n;let r=rR(e,t);for(;r&&Dpe(r)&&To(r).position==="static";)r=rR(r,t);return r&&(Js(r)==="html"||Js(r)==="body"&&To(r).position==="static"&&!_O(r))?n:r||$pe(e)||n}const Gpe=async function(e){const t=this.getOffsetParent||yB,n=this.getDimensions;return{reference:qpe(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,...await n(e.floating)}}};function Kpe(e){return To(e).direction==="rtl"}const Ype={convertOffsetParentRelativeRectToViewportRelativeRect:Lpe,getDocumentElement:Uu,getClippingRect:Vpe,getOffsetParent:yB,getElementRects:Gpe,getClientRects:jpe,getDimensions:Hpe,getScale:Zf,isElement:Iu,isRTL:Kpe};function Zpe(e,t){let n=null,r;const i=Uu(e);function o(){var u;clearTimeout(r),(u=n)==null||u.disconnect(),n=null}function a(u,s){u===void 0&&(u=!1),s===void 0&&(s=1),o();const{left:l,top:c,width:d,height:h}=e.getBoundingClientRect();if(u||t(),!d||!h)return;const m=Pv(c),g=Pv(i.clientWidth-(l+d)),v=Pv(i.clientHeight-(c+h)),y=Pv(l),w={rootMargin:-m+"px "+-g+"px "+-v+"px "+-y+"px",threshold:ji(0,Xs(1,s))||1};let S=!0;function A(E){const C=E[0].intersectionRatio;if(C!==s){if(!S)return a();C?a(!1,C):r=setTimeout(()=>{a(!1,1e-7)},100)}S=!1}try{n=new IntersectionObserver(A,{...w,root:i.ownerDocument})}catch{n=new IntersectionObserver(A,w)}n.observe(e)}return a(!0),o}function Xpe(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:u=typeof IntersectionObserver=="function",animationFrame:s=!1}=r,l=CO(e),c=i||o?[...l?$0(l):[],...$0(t)]:[];c.forEach(x=>{i&&x.addEventListener("scroll",n,{passive:!0}),o&&x.addEventListener("resize",n)});const d=l&&u?Zpe(l,n):null;let h=-1,m=null;a&&(m=new ResizeObserver(x=>{let[w]=x;w&&w.target===l&&m&&(m.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var S;(S=m)==null||S.observe(t)})),n()}),l&&!s&&m.observe(l),m.observe(t));let g,v=s?wc(e):null;s&&y();function y(){const x=wc(e);v&&(x.x!==v.x||x.y!==v.y||x.width!==v.width||x.height!==v.height)&&n(),v=x,g=requestAnimationFrame(y)}return n(),()=>{var x;c.forEach(w=>{i&&w.removeEventListener("scroll",n),o&&w.removeEventListener("resize",n)}),d?.(),(x=m)==null||x.disconnect(),m=null,s&&cancelAnimationFrame(g)}}const Qpe=Tpe,Jpe=Ape,e0e=Rpe,t0e=Ope,iR=Epe,n0e=Mpe,r0e=(e,t,n)=>{const r=new Map,i={platform:Ype,...n},o={...i.platform,_c:r};return Cpe(e,t,{...i,platform:o})},i0e=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:i}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?iR({element:r.current,padding:i}).fn(n):{}:r?iR({element:r,padding:i}).fn(n):{}}}};var xy=typeof document<"u"?b.useLayoutEffect:b.useEffect;function A1(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!A1(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!A1(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function bB(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function oR(e,t){const n=bB(e);return Math.round(t*n)/n}function aR(e){const t=b.useRef(e);return xy(()=>{t.current=e}),t}function o0e(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:a}={},transform:u=!0,whileElementsMounted:s,open:l}=e,[c,d]=b.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,m]=b.useState(r);A1(h,r)||m(r);const[g,v]=b.useState(null),[y,x]=b.useState(null),w=b.useCallback(j=>{j!==C.current&&(C.current=j,v(j))},[]),S=b.useCallback(j=>{j!==P.current&&(P.current=j,x(j))},[]),A=o||g,E=a||y,C=b.useRef(null),P=b.useRef(null),k=b.useRef(c),M=s!=null,L=aR(s),B=aR(i),F=b.useCallback(()=>{if(!C.current||!P.current)return;const j={placement:t,strategy:n,middleware:h};B.current&&(j.platform=B.current),r0e(C.current,P.current,j).then(I=>{const z={...I,isPositioned:!0};Y.current&&!A1(k.current,z)&&(k.current=z,Bu.flushSync(()=>{d(z)}))})},[h,t,n,B]);xy(()=>{l===!1&&k.current.isPositioned&&(k.current.isPositioned=!1,d(j=>({...j,isPositioned:!1})))},[l]);const Y=b.useRef(!1);xy(()=>(Y.current=!0,()=>{Y.current=!1}),[]),xy(()=>{if(A&&(C.current=A),E&&(P.current=E),A&&E){if(L.current)return L.current(A,E,F);F()}},[A,E,F,L,M]);const H=b.useMemo(()=>({reference:C,floating:P,setReference:w,setFloating:S}),[w,S]),W=b.useMemo(()=>({reference:A,floating:E}),[A,E]),V=b.useMemo(()=>{const j={position:n,left:0,top:0};if(!W.floating)return j;const I=oR(W.floating,c.x),z=oR(W.floating,c.y);return u?{...j,transform:"translate("+I+"px, "+z+"px)",...bB(W.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:I,top:z}},[n,u,W.floating,c.x,c.y]);return b.useMemo(()=>({...c,update:F,refs:H,elements:W,floatingStyles:V}),[c,F,H,W,V])}var a0e="Arrow",wB=b.forwardRef((e,t)=>{const{children:n,width:r=10,height:i=5,...o}=e;return R.jsx(Qe.svg,{...o,ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:R.jsx("polygon",{points:"0,0 30,0 15,10"})})});wB.displayName=a0e;var u0e=wB;function EO(e){const[t,n]=b.useState(void 0);return Pr(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const o=i[0];let a,u;if("borderBoxSize"in o){const s=o.borderBoxSize,l=Array.isArray(s)?s[0]:s;a=l.inlineSize,u=l.blockSize}else a=e.offsetWidth,u=e.offsetHeight;n({width:a,height:u})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var AO="Popper",[xB,al]=ri(AO),[s0e,_B]=xB(AO),SB=e=>{const{__scopePopper:t,children:n}=e,[r,i]=b.useState(null);return R.jsx(s0e,{scope:t,anchor:r,onAnchorChange:i,children:n})};SB.displayName=AO;var CB="PopperAnchor",EB=b.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,o=_B(CB,n),a=b.useRef(null),u=kt(t,a);return b.useEffect(()=>{o.onAnchorChange(r?.current||a.current)}),r?null:R.jsx(Qe.div,{...i,ref:u})});EB.displayName=CB;var OO="PopperContent",[l0e,c0e]=xB(OO),AB=b.forwardRef((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:i=0,align:o="center",alignOffset:a=0,arrowPadding:u=0,avoidCollisions:s=!0,collisionBoundary:l=[],collisionPadding:c=0,sticky:d="partial",hideWhenDetached:h=!1,updatePositionStrategy:m="optimized",onPlaced:g,...v}=e,y=_B(OO,n),[x,w]=b.useState(null),S=kt(t,ie=>w(ie)),[A,E]=b.useState(null),C=EO(A),P=C?.width??0,k=C?.height??0,M=r+(o!=="center"?"-"+o:""),L=typeof c=="number"?c:{top:0,right:0,bottom:0,left:0,...c},B=Array.isArray(l)?l:[l],F=B.length>0,Y={padding:L,boundary:B.filter(d0e),altBoundary:F},{refs:H,floatingStyles:W,placement:V,isPositioned:j,middlewareData:I}=o0e({strategy:"fixed",placement:M,whileElementsMounted:(...ie)=>Xpe(...ie,{animationFrame:m==="always"}),elements:{reference:y.anchor},middleware:[kpe({mainAxis:i+k,alignmentAxis:a}),s&&Qpe({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?n0e():void 0,...Y}),s&&Jpe({...Y}),e0e({...Y,apply:({elements:ie,rects:Ae,availableWidth:de,availableHeight:we})=>{const{width:ge,height:ae}=Ae.reference,$e=ie.floating.style;$e.setProperty("--radix-popper-available-width",`${de}px`),$e.setProperty("--radix-popper-available-height",`${we}px`),$e.setProperty("--radix-popper-anchor-width",`${ge}px`),$e.setProperty("--radix-popper-anchor-height",`${ae}px`)}}),A&&i0e({element:A,padding:u}),h0e({arrowWidth:P,arrowHeight:k}),h&&t0e({strategy:"referenceHidden",...Y})]}),[z,U]=kB(V),X=ko(g);Pr(()=>{j&&X?.()},[j,X]);const q=I.arrow?.x,G=I.arrow?.y,ee=I.arrow?.centerOffset!==0,[ue,fe]=b.useState();return Pr(()=>{x&&fe(window.getComputedStyle(x).zIndex)},[x]),R.jsx("div",{ref:H.setFloating,"data-radix-popper-content-wrapper":"",style:{...W,transform:j?W.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ue,"--radix-popper-transform-origin":[I.transformOrigin?.x,I.transformOrigin?.y].join(" "),...I.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:R.jsx(l0e,{scope:n,placedSide:z,onArrowChange:E,arrowX:q,arrowY:G,shouldHideArrow:ee,children:R.jsx(Qe.div,{"data-side":z,"data-align":U,...v,ref:S,style:{...v.style,animation:j?void 0:"none"}})})})});AB.displayName=OO;var OB="PopperArrow",f0e={top:"bottom",right:"left",bottom:"top",left:"right"},PB=b.forwardRef(function(t,n){const{__scopePopper:r,...i}=t,o=c0e(OB,r),a=f0e[o.placedSide];return R.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:R.jsx(u0e,{...i,ref:n,style:{...i.style,display:"block"}})})});PB.displayName=OB;function d0e(e){return e!==null}var h0e=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,u=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[l,c]=kB(n),d={start:"0%",center:"50%",end:"100%"}[c],h=(i.arrow?.x??0)+u/2,m=(i.arrow?.y??0)+s/2;let g="",v="";return l==="bottom"?(g=a?d:`${h}px`,v=`${-s}px`):l==="top"?(g=a?d:`${h}px`,v=`${r.floating.height+s}px`):l==="right"?(g=`${-s}px`,v=a?d:`${m}px`):l==="left"&&(g=`${r.floating.width+s}px`,v=a?d:`${m}px`),{data:{x:g,y:v}}}});function kB(e){const[t,n="center"]=e.split("-");return[t,n]}var xw=SB,qm=EB,_w=AB,Sw=PB,q_="rovingFocusGroup.onEntryFocus",p0e={bubbles:!1,cancelable:!0},Cw="RovingFocusGroup",[M3,TB,m0e]=yO(Cw),[g0e,Ew]=ri(Cw,[m0e]),[v0e,y0e]=g0e(Cw),MB=b.forwardRef((e,t)=>R.jsx(M3.Provider,{scope:e.__scopeRovingFocusGroup,children:R.jsx(M3.Slot,{scope:e.__scopeRovingFocusGroup,children:R.jsx(b0e,{...e,ref:t})})}));MB.displayName=Cw;var b0e=b.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:o,currentTabStopId:a,defaultCurrentTabStopId:u,onCurrentTabStopIdChange:s,onEntryFocus:l,preventScrollOnEntryFocus:c=!1,...d}=e,h=b.useRef(null),m=kt(t,h),g=yw(o),[v=null,y]=sa({prop:a,defaultProp:u,onChange:s}),[x,w]=b.useState(!1),S=ko(l),A=TB(n),E=b.useRef(!1),[C,P]=b.useState(0);return b.useEffect(()=>{const k=h.current;if(k)return k.addEventListener(q_,S),()=>k.removeEventListener(q_,S)},[S]),R.jsx(v0e,{scope:n,orientation:r,dir:g,loop:i,currentTabStopId:v,onItemFocus:b.useCallback(k=>y(k),[y]),onItemShiftTab:b.useCallback(()=>w(!0),[]),onFocusableItemAdd:b.useCallback(()=>P(k=>k+1),[]),onFocusableItemRemove:b.useCallback(()=>P(k=>k-1),[]),children:R.jsx(Qe.div,{tabIndex:x||C===0?-1:0,"data-orientation":r,...d,ref:m,style:{outline:"none",...e.style},onMouseDown:De(e.onMouseDown,()=>{E.current=!0}),onFocus:De(e.onFocus,k=>{const M=!E.current;if(k.target===k.currentTarget&&M&&!x){const L=new CustomEvent(q_,p0e);if(k.currentTarget.dispatchEvent(L),!L.defaultPrevented){const B=A().filter(V=>V.focusable),F=B.find(V=>V.active),Y=B.find(V=>V.id===v),W=[F,Y,...B].filter(Boolean).map(V=>V.ref.current);$B(W,c)}}E.current=!1}),onBlur:De(e.onBlur,()=>w(!1))})})}),RB="RovingFocusGroupItem",DB=b.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:o,...a}=e,u=Hi(),s=o||u,l=y0e(RB,n),c=l.currentTabStopId===s,d=TB(n),{onFocusableItemAdd:h,onFocusableItemRemove:m}=l;return b.useEffect(()=>{if(r)return h(),()=>m()},[r,h,m]),R.jsx(M3.ItemSlot,{scope:n,id:s,focusable:r,active:i,children:R.jsx(Qe.span,{tabIndex:c?0:-1,"data-orientation":l.orientation,...a,ref:t,onMouseDown:De(e.onMouseDown,g=>{r?l.onItemFocus(s):g.preventDefault()}),onFocus:De(e.onFocus,()=>l.onItemFocus(s)),onKeyDown:De(e.onKeyDown,g=>{if(g.key==="Tab"&&g.shiftKey){l.onItemShiftTab();return}if(g.target!==g.currentTarget)return;const v=_0e(g,l.orientation,l.dir);if(v!==void 0){if(g.metaKey||g.ctrlKey||g.altKey||g.shiftKey)return;g.preventDefault();let x=d().filter(w=>w.focusable).map(w=>w.ref.current);if(v==="last")x.reverse();else if(v==="prev"||v==="next"){v==="prev"&&x.reverse();const w=x.indexOf(g.currentTarget);x=l.loop?S0e(x,w+1):x.slice(w+1)}setTimeout(()=>$B(x))}})})})});DB.displayName=RB;var w0e={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function x0e(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function _0e(e,t,n){const r=x0e(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return w0e[r]}function $B(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function S0e(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var IB=MB,NB=DB,R3=["Enter"," "],C0e=["ArrowDown","PageUp","Home"],FB=["ArrowUp","PageDown","End"],E0e=[...C0e,...FB],A0e={ltr:[...R3,"ArrowRight"],rtl:[...R3,"ArrowLeft"]},O0e={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Gm="Menu",[I0,P0e,k0e]=yO(Gm),[$c,LB]=ri(Gm,[k0e,al,Ew]),Aw=al(),jB=Ew(),[T0e,Ic]=$c(Gm),[M0e,Km]=$c(Gm),BB=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:o,modal:a=!0}=e,u=Aw(t),[s,l]=b.useState(null),c=b.useRef(!1),d=ko(o),h=yw(i);return b.useEffect(()=>{const m=()=>{c.current=!0,document.addEventListener("pointerdown",g,{capture:!0,once:!0}),document.addEventListener("pointermove",g,{capture:!0,once:!0})},g=()=>c.current=!1;return document.addEventListener("keydown",m,{capture:!0}),()=>{document.removeEventListener("keydown",m,{capture:!0}),document.removeEventListener("pointerdown",g,{capture:!0}),document.removeEventListener("pointermove",g,{capture:!0})}},[]),R.jsx(xw,{...u,children:R.jsx(T0e,{scope:t,open:n,onOpenChange:d,content:s,onContentChange:l,children:R.jsx(M0e,{scope:t,onClose:b.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:c,dir:h,modal:a,children:r})})})};BB.displayName=Gm;var R0e="MenuAnchor",PO=b.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=Aw(n);return R.jsx(qm,{...i,...r,ref:t})});PO.displayName=R0e;var kO="MenuPortal",[D0e,zB]=$c(kO,{forceMount:void 0}),UB=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:i}=e,o=Ic(kO,t);return R.jsx(D0e,{scope:t,forceMount:n,children:R.jsx(Ci,{present:n||o.open,children:R.jsx(Um,{asChild:!0,container:i,children:r})})})};UB.displayName=kO;var Eo="MenuContent",[$0e,TO]=$c(Eo),WB=b.forwardRef((e,t)=>{const n=zB(Eo,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,o=Ic(Eo,e.__scopeMenu),a=Km(Eo,e.__scopeMenu);return R.jsx(I0.Provider,{scope:e.__scopeMenu,children:R.jsx(Ci,{present:r||o.open,children:R.jsx(I0.Slot,{scope:e.__scopeMenu,children:a.modal?R.jsx(I0e,{...i,ref:t}):R.jsx(N0e,{...i,ref:t})})})})}),I0e=b.forwardRef((e,t)=>{const n=Ic(Eo,e.__scopeMenu),r=b.useRef(null),i=kt(t,r);return b.useEffect(()=>{const o=r.current;if(o)return Vm(o)},[]),R.jsx(MO,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:De(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),N0e=b.forwardRef((e,t)=>{const n=Ic(Eo,e.__scopeMenu);return R.jsx(MO,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),MO=b.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:u,onEntryFocus:s,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:h,onDismiss:m,disableOutsideScroll:g,...v}=e,y=Ic(Eo,n),x=Km(Eo,n),w=Aw(n),S=jB(n),A=P0e(n),[E,C]=b.useState(null),P=b.useRef(null),k=kt(t,P,y.onContentChange),M=b.useRef(0),L=b.useRef(""),B=b.useRef(0),F=b.useRef(null),Y=b.useRef("right"),H=b.useRef(0),W=g?Wm:b.Fragment,V=g?{as:qs,allowPinchZoom:!0}:void 0,j=z=>{const U=L.current+z,X=A().filter(ie=>!ie.disabled),q=document.activeElement,G=X.find(ie=>ie.ref.current===q)?.textValue,ee=X.map(ie=>ie.textValue),ue=K0e(ee,U,G),fe=X.find(ie=>ie.textValue===ue)?.ref.current;(function ie(Ae){L.current=Ae,window.clearTimeout(M.current),Ae!==""&&(M.current=window.setTimeout(()=>ie(""),1e3))})(U),fe&&setTimeout(()=>fe.focus())};b.useEffect(()=>()=>window.clearTimeout(M.current),[]),gw();const I=b.useCallback(z=>Y.current===F.current?.side&&Z0e(z,F.current?.area),[]);return R.jsx($0e,{scope:n,searchRef:L,onItemEnter:b.useCallback(z=>{I(z)&&z.preventDefault()},[I]),onItemLeave:b.useCallback(z=>{I(z)||(P.current?.focus(),C(null))},[I]),onTriggerLeave:b.useCallback(z=>{I(z)&&z.preventDefault()},[I]),pointerGraceTimerRef:B,onPointerGraceIntentChange:b.useCallback(z=>{F.current=z},[]),children:R.jsx(W,{...V,children:R.jsx(zm,{asChild:!0,trapped:i,onMountAutoFocus:De(o,z=>{z.preventDefault(),P.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:a,children:R.jsx(th,{asChild:!0,disableOutsidePointerEvents:u,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:h,onDismiss:m,children:R.jsx(IB,{asChild:!0,...S,dir:x.dir,orientation:"vertical",loop:r,currentTabStopId:E,onCurrentTabStopIdChange:C,onEntryFocus:De(s,z=>{x.isUsingKeyboardRef.current||z.preventDefault()}),preventScrollOnEntryFocus:!0,children:R.jsx(_w,{role:"menu","aria-orientation":"vertical","data-state":oz(y.open),"data-radix-menu-content":"",dir:x.dir,...w,...v,ref:k,style:{outline:"none",...v.style},onKeyDown:De(v.onKeyDown,z=>{const X=z.target.closest("[data-radix-menu-content]")===z.currentTarget,q=z.ctrlKey||z.altKey||z.metaKey,G=z.key.length===1;X&&(z.key==="Tab"&&z.preventDefault(),!q&&G&&j(z.key));const ee=P.current;if(z.target!==ee||!E0e.includes(z.key))return;z.preventDefault();const fe=A().filter(ie=>!ie.disabled).map(ie=>ie.ref.current);FB.includes(z.key)&&fe.reverse(),q0e(fe)}),onBlur:De(e.onBlur,z=>{z.currentTarget.contains(z.target)||(window.clearTimeout(M.current),L.current="")}),onPointerMove:De(e.onPointerMove,N0(z=>{const U=z.target,X=H.current!==z.clientX;if(z.currentTarget.contains(U)&&X){const q=z.clientX>H.current?"right":"left";Y.current=q,H.current=z.clientX}}))})})})})})})});WB.displayName=Eo;var F0e="MenuGroup",RO=b.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return R.jsx(Qe.div,{role:"group",...r,ref:t})});RO.displayName=F0e;var L0e="MenuLabel",VB=b.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return R.jsx(Qe.div,{...r,ref:t})});VB.displayName=L0e;var O1="MenuItem",uR="menu.itemSelect",Ow=b.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...i}=e,o=b.useRef(null),a=Km(O1,e.__scopeMenu),u=TO(O1,e.__scopeMenu),s=kt(t,o),l=b.useRef(!1),c=()=>{const d=o.current;if(!n&&d){const h=new CustomEvent(uR,{bubbles:!0,cancelable:!0});d.addEventListener(uR,m=>r?.(m),{once:!0}),Oj(d,h),h.defaultPrevented?l.current=!1:a.onClose()}};return R.jsx(HB,{...i,ref:s,disabled:n,onClick:De(e.onClick,c),onPointerDown:d=>{e.onPointerDown?.(d),l.current=!0},onPointerUp:De(e.onPointerUp,d=>{l.current||d.currentTarget?.click()}),onKeyDown:De(e.onKeyDown,d=>{const h=u.searchRef.current!=="";n||h&&d.key===" "||R3.includes(d.key)&&(d.currentTarget.click(),d.preventDefault())})})});Ow.displayName=O1;var HB=b.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:i,...o}=e,a=TO(O1,n),u=jB(n),s=b.useRef(null),l=kt(t,s),[c,d]=b.useState(!1),[h,m]=b.useState("");return b.useEffect(()=>{const g=s.current;g&&m((g.textContent??"").trim())},[o.children]),R.jsx(I0.ItemSlot,{scope:n,disabled:r,textValue:i??h,children:R.jsx(NB,{asChild:!0,...u,focusable:!r,children:R.jsx(Qe.div,{role:"menuitem","data-highlighted":c?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...o,ref:l,onPointerMove:De(e.onPointerMove,N0(g=>{r?a.onItemLeave(g):(a.onItemEnter(g),g.defaultPrevented||g.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:De(e.onPointerLeave,N0(g=>a.onItemLeave(g))),onFocus:De(e.onFocus,()=>d(!0)),onBlur:De(e.onBlur,()=>d(!1))})})})}),j0e="MenuCheckboxItem",qB=b.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...i}=e;return R.jsx(XB,{scope:e.__scopeMenu,checked:n,children:R.jsx(Ow,{role:"menuitemcheckbox","aria-checked":P1(n)?"mixed":n,...i,ref:t,"data-state":$O(n),onSelect:De(i.onSelect,()=>r?.(P1(n)?!0:!n),{checkForDefaultPrevented:!1})})})});qB.displayName=j0e;var GB="MenuRadioGroup",[B0e,z0e]=$c(GB,{value:void 0,onValueChange:()=>{}}),KB=b.forwardRef((e,t)=>{const{value:n,onValueChange:r,...i}=e,o=ko(r);return R.jsx(B0e,{scope:e.__scopeMenu,value:n,onValueChange:o,children:R.jsx(RO,{...i,ref:t})})});KB.displayName=GB;var YB="MenuRadioItem",ZB=b.forwardRef((e,t)=>{const{value:n,...r}=e,i=z0e(YB,e.__scopeMenu),o=n===i.value;return R.jsx(XB,{scope:e.__scopeMenu,checked:o,children:R.jsx(Ow,{role:"menuitemradio","aria-checked":o,...r,ref:t,"data-state":$O(o),onSelect:De(r.onSelect,()=>i.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});ZB.displayName=YB;var DO="MenuItemIndicator",[XB,U0e]=$c(DO,{checked:!1}),QB=b.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...i}=e,o=U0e(DO,n);return R.jsx(Ci,{present:r||P1(o.checked)||o.checked===!0,children:R.jsx(Qe.span,{...i,ref:t,"data-state":$O(o.checked)})})});QB.displayName=DO;var W0e="MenuSeparator",JB=b.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return R.jsx(Qe.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});JB.displayName=W0e;var V0e="MenuArrow",ez=b.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=Aw(n);return R.jsx(Sw,{...i,...r,ref:t})});ez.displayName=V0e;var H0e="MenuSub",[eGe,tz]=$c(H0e),Ep="MenuSubTrigger",nz=b.forwardRef((e,t)=>{const n=Ic(Ep,e.__scopeMenu),r=Km(Ep,e.__scopeMenu),i=tz(Ep,e.__scopeMenu),o=TO(Ep,e.__scopeMenu),a=b.useRef(null),{pointerGraceTimerRef:u,onPointerGraceIntentChange:s}=o,l={__scopeMenu:e.__scopeMenu},c=b.useCallback(()=>{a.current&&window.clearTimeout(a.current),a.current=null},[]);return b.useEffect(()=>c,[c]),b.useEffect(()=>{const d=u.current;return()=>{window.clearTimeout(d),s(null)}},[u,s]),R.jsx(PO,{asChild:!0,...l,children:R.jsx(HB,{id:i.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":i.contentId,"data-state":oz(n.open),...e,ref:rw(t,i.onTriggerChange),onClick:d=>{e.onClick?.(d),!(e.disabled||d.defaultPrevented)&&(d.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:De(e.onPointerMove,N0(d=>{o.onItemEnter(d),!d.defaultPrevented&&!e.disabled&&!n.open&&!a.current&&(o.onPointerGraceIntentChange(null),a.current=window.setTimeout(()=>{n.onOpenChange(!0),c()},100))})),onPointerLeave:De(e.onPointerLeave,N0(d=>{c();const h=n.content?.getBoundingClientRect();if(h){const m=n.content?.dataset.side,g=m==="right",v=g?-5:5,y=h[g?"left":"right"],x=h[g?"right":"left"];o.onPointerGraceIntentChange({area:[{x:d.clientX+v,y:d.clientY},{x:y,y:h.top},{x,y:h.top},{x,y:h.bottom},{x:y,y:h.bottom}],side:m}),window.clearTimeout(u.current),u.current=window.setTimeout(()=>o.onPointerGraceIntentChange(null),300)}else{if(o.onTriggerLeave(d),d.defaultPrevented)return;o.onPointerGraceIntentChange(null)}})),onKeyDown:De(e.onKeyDown,d=>{const h=o.searchRef.current!=="";e.disabled||h&&d.key===" "||A0e[r.dir].includes(d.key)&&(n.onOpenChange(!0),n.content?.focus(),d.preventDefault())})})})});nz.displayName=Ep;var rz="MenuSubContent",iz=b.forwardRef((e,t)=>{const n=zB(Eo,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,o=Ic(Eo,e.__scopeMenu),a=Km(Eo,e.__scopeMenu),u=tz(rz,e.__scopeMenu),s=b.useRef(null),l=kt(t,s);return R.jsx(I0.Provider,{scope:e.__scopeMenu,children:R.jsx(Ci,{present:r||o.open,children:R.jsx(I0.Slot,{scope:e.__scopeMenu,children:R.jsx(MO,{id:u.contentId,"aria-labelledby":u.triggerId,...i,ref:l,align:"start",side:a.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:c=>{a.isUsingKeyboardRef.current&&s.current?.focus(),c.preventDefault()},onCloseAutoFocus:c=>c.preventDefault(),onFocusOutside:De(e.onFocusOutside,c=>{c.target!==u.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:De(e.onEscapeKeyDown,c=>{a.onClose(),c.preventDefault()}),onKeyDown:De(e.onKeyDown,c=>{const d=c.currentTarget.contains(c.target),h=O0e[a.dir].includes(c.key);d&&h&&(o.onOpenChange(!1),u.trigger?.focus(),c.preventDefault())})})})})})});iz.displayName=rz;function oz(e){return e?"open":"closed"}function P1(e){return e==="indeterminate"}function $O(e){return P1(e)?"indeterminate":e?"checked":"unchecked"}function q0e(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function G0e(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function K0e(e,t,n){const i=t.length>1&&Array.from(t).every(l=>l===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let a=G0e(e,Math.max(o,0));i.length===1&&(a=a.filter(l=>l!==n));const s=a.find(l=>l.toLowerCase().startsWith(i.toLowerCase()));return s!==n?s:void 0}function Y0e(e,t){const{x:n,y:r}=e;let i=!1;for(let o=0,a=t.length-1;or!=c>r&&n<(l-u)*(r-s)/(c-s)+u&&(i=!i)}return i}function Z0e(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return Y0e(n,t)}function N0(e){return t=>t.pointerType==="mouse"?e(t):void 0}var X0e=BB,Q0e=PO,J0e=UB,eme=WB,tme=RO,nme=VB,rme=Ow,ime=qB,ome=KB,ame=ZB,ume=QB,sme=JB,lme=ez,cme=nz,fme=iz,IO="DropdownMenu",[dme,tGe]=ri(IO,[LB]),ii=LB(),[hme,az]=dme(IO),uz=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:o,onOpenChange:a,modal:u=!0}=e,s=ii(t),l=b.useRef(null),[c=!1,d]=sa({prop:i,defaultProp:o,onChange:a});return R.jsx(hme,{scope:t,triggerId:Hi(),triggerRef:l,contentId:Hi(),open:c,onOpenChange:d,onOpenToggle:b.useCallback(()=>d(h=>!h),[d]),modal:u,children:R.jsx(X0e,{...s,open:c,onOpenChange:d,dir:r,modal:u,children:n})})};uz.displayName=IO;var sz="DropdownMenuTrigger",lz=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,o=az(sz,n),a=ii(n);return R.jsx(Q0e,{asChild:!0,...a,children:R.jsx(Qe.button,{type:"button",id:o.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":o.open?o.contentId:void 0,"data-state":o.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...i,ref:rw(t,o.triggerRef),onPointerDown:De(e.onPointerDown,u=>{!r&&u.button===0&&u.ctrlKey===!1&&(o.onOpenToggle(),o.open||u.preventDefault())}),onKeyDown:De(e.onKeyDown,u=>{r||(["Enter"," "].includes(u.key)&&o.onOpenToggle(),u.key==="ArrowDown"&&o.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(u.key)&&u.preventDefault())})})})});lz.displayName=sz;var pme="DropdownMenuPortal",cz=e=>{const{__scopeDropdownMenu:t,...n}=e,r=ii(t);return R.jsx(J0e,{...r,...n})};cz.displayName=pme;var fz="DropdownMenuContent",dz=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=az(fz,n),o=ii(n),a=b.useRef(!1);return R.jsx(eme,{id:i.contentId,"aria-labelledby":i.triggerId,...o,...r,ref:t,onCloseAutoFocus:De(e.onCloseAutoFocus,u=>{a.current||i.triggerRef.current?.focus(),a.current=!1,u.preventDefault()}),onInteractOutside:De(e.onInteractOutside,u=>{const s=u.detail.originalEvent,l=s.button===0&&s.ctrlKey===!0,c=s.button===2||l;(!i.modal||c)&&(a.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});dz.displayName=fz;var mme="DropdownMenuGroup",hz=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=ii(n);return R.jsx(tme,{...i,...r,ref:t})});hz.displayName=mme;var gme="DropdownMenuLabel",pz=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=ii(n);return R.jsx(nme,{...i,...r,ref:t})});pz.displayName=gme;var vme="DropdownMenuItem",mz=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=ii(n);return R.jsx(rme,{...i,...r,ref:t})});mz.displayName=vme;var yme="DropdownMenuCheckboxItem",gz=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=ii(n);return R.jsx(ime,{...i,...r,ref:t})});gz.displayName=yme;var bme="DropdownMenuRadioGroup",wme=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=ii(n);return R.jsx(ome,{...i,...r,ref:t})});wme.displayName=bme;var xme="DropdownMenuRadioItem",vz=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=ii(n);return R.jsx(ame,{...i,...r,ref:t})});vz.displayName=xme;var _me="DropdownMenuItemIndicator",yz=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=ii(n);return R.jsx(ume,{...i,...r,ref:t})});yz.displayName=_me;var Sme="DropdownMenuSeparator",bz=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=ii(n);return R.jsx(sme,{...i,...r,ref:t})});bz.displayName=Sme;var Cme="DropdownMenuArrow",Eme=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=ii(n);return R.jsx(lme,{...i,...r,ref:t})});Eme.displayName=Cme;var Ame="DropdownMenuSubTrigger",wz=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=ii(n);return R.jsx(cme,{...i,...r,ref:t})});wz.displayName=Ame;var Ome="DropdownMenuSubContent",xz=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=ii(n);return R.jsx(fme,{...i,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});xz.displayName=Ome;var nGe=uz,rGe=lz,iGe=cz,oGe=dz,aGe=hz,uGe=pz,sGe=mz,lGe=gz,cGe=vz,fGe=yz,dGe=bz,hGe=wz,pGe=xz,Pme="VisuallyHidden",NO=b.forwardRef((e,t)=>R.jsx(Qe.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));NO.displayName=Pme;var kme=NO,[Pw,mGe]=ri("Tooltip",[al]),kw=al(),_z="TooltipProvider",Tme=700,D3="tooltip.open",[Mme,FO]=Pw(_z),Sz=e=>{const{__scopeTooltip:t,delayDuration:n=Tme,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:o}=e,[a,u]=b.useState(!0),s=b.useRef(!1),l=b.useRef(0);return b.useEffect(()=>{const c=l.current;return()=>window.clearTimeout(c)},[]),R.jsx(Mme,{scope:t,isOpenDelayed:a,delayDuration:n,onOpen:b.useCallback(()=>{window.clearTimeout(l.current),u(!1)},[]),onClose:b.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>u(!0),r)},[r]),isPointerInTransitRef:s,onPointerInTransitChange:b.useCallback(c=>{s.current=c},[]),disableHoverableContent:i,children:o})};Sz.displayName=_z;var Tw="Tooltip",[Rme,Mw]=Pw(Tw),Cz=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:i=!1,onOpenChange:o,disableHoverableContent:a,delayDuration:u}=e,s=FO(Tw,e.__scopeTooltip),l=kw(t),[c,d]=b.useState(null),h=Hi(),m=b.useRef(0),g=a??s.disableHoverableContent,v=u??s.delayDuration,y=b.useRef(!1),[x=!1,w]=sa({prop:r,defaultProp:i,onChange:P=>{P?(s.onOpen(),document.dispatchEvent(new CustomEvent(D3))):s.onClose(),o?.(P)}}),S=b.useMemo(()=>x?y.current?"delayed-open":"instant-open":"closed",[x]),A=b.useCallback(()=>{window.clearTimeout(m.current),m.current=0,y.current=!1,w(!0)},[w]),E=b.useCallback(()=>{window.clearTimeout(m.current),m.current=0,w(!1)},[w]),C=b.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>{y.current=!0,w(!0),m.current=0},v)},[v,w]);return b.useEffect(()=>()=>{m.current&&(window.clearTimeout(m.current),m.current=0)},[]),R.jsx(xw,{...l,children:R.jsx(Rme,{scope:t,contentId:h,open:x,stateAttribute:S,trigger:c,onTriggerChange:d,onTriggerEnter:b.useCallback(()=>{s.isOpenDelayed?C():A()},[s.isOpenDelayed,C,A]),onTriggerLeave:b.useCallback(()=>{g?E():(window.clearTimeout(m.current),m.current=0)},[E,g]),onOpen:A,onClose:E,disableHoverableContent:g,children:n})})};Cz.displayName=Tw;var $3="TooltipTrigger",Ez=b.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=Mw($3,n),o=FO($3,n),a=kw(n),u=b.useRef(null),s=kt(t,u,i.onTriggerChange),l=b.useRef(!1),c=b.useRef(!1),d=b.useCallback(()=>l.current=!1,[]);return b.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),R.jsx(qm,{asChild:!0,...a,children:R.jsx(Qe.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:s,onPointerMove:De(e.onPointerMove,h=>{h.pointerType!=="touch"&&!c.current&&!o.isPointerInTransitRef.current&&(i.onTriggerEnter(),c.current=!0)}),onPointerLeave:De(e.onPointerLeave,()=>{i.onTriggerLeave(),c.current=!1}),onPointerDown:De(e.onPointerDown,()=>{l.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:De(e.onFocus,()=>{l.current||i.onOpen()}),onBlur:De(e.onBlur,i.onClose),onClick:De(e.onClick,i.onClose)})})});Ez.displayName=$3;var Dme="TooltipPortal",[gGe,$me]=Pw(Dme,{forceMount:void 0}),vd="TooltipContent",Az=b.forwardRef((e,t)=>{const n=$me(vd,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i="top",...o}=e,a=Mw(vd,e.__scopeTooltip);return R.jsx(Ci,{present:r||a.open,children:a.disableHoverableContent?R.jsx(Oz,{side:i,...o,ref:t}):R.jsx(Ime,{side:i,...o,ref:t})})}),Ime=b.forwardRef((e,t)=>{const n=Mw(vd,e.__scopeTooltip),r=FO(vd,e.__scopeTooltip),i=b.useRef(null),o=kt(t,i),[a,u]=b.useState(null),{trigger:s,onClose:l}=n,c=i.current,{onPointerInTransitChange:d}=r,h=b.useCallback(()=>{u(null),d(!1)},[d]),m=b.useCallback((g,v)=>{const y=g.currentTarget,x={x:g.clientX,y:g.clientY},w=jme(x,y.getBoundingClientRect()),S=Bme(x,w),A=zme(v.getBoundingClientRect()),E=Wme([...S,...A]);u(E),d(!0)},[d]);return b.useEffect(()=>()=>h(),[h]),b.useEffect(()=>{if(s&&c){const g=y=>m(y,c),v=y=>m(y,s);return s.addEventListener("pointerleave",g),c.addEventListener("pointerleave",v),()=>{s.removeEventListener("pointerleave",g),c.removeEventListener("pointerleave",v)}}},[s,c,m,h]),b.useEffect(()=>{if(a){const g=v=>{const y=v.target,x={x:v.clientX,y:v.clientY},w=s?.contains(y)||c?.contains(y),S=!Ume(x,a);w?h():S&&(h(),l())};return document.addEventListener("pointermove",g),()=>document.removeEventListener("pointermove",g)}},[s,c,a,l,h]),R.jsx(Oz,{...e,ref:o})}),[Nme,Fme]=Pw(Tw,{isInside:!1}),Oz=b.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:o,onPointerDownOutside:a,...u}=e,s=Mw(vd,n),l=kw(n),{onClose:c}=s;return b.useEffect(()=>(document.addEventListener(D3,c),()=>document.removeEventListener(D3,c)),[c]),b.useEffect(()=>{if(s.trigger){const d=h=>{h.target?.contains(s.trigger)&&c()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[s.trigger,c]),R.jsx(th,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:d=>d.preventDefault(),onDismiss:c,children:R.jsxs(_w,{"data-state":s.stateAttribute,...l,...u,ref:t,style:{...u.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[R.jsx(UA,{children:r}),R.jsx(Nme,{scope:n,isInside:!0,children:R.jsx(kme,{id:s.contentId,role:"tooltip",children:i||r})})]})})});Az.displayName=vd;var Pz="TooltipArrow",Lme=b.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=kw(n);return Fme(Pz,n).isInside?null:R.jsx(Sw,{...i,...r,ref:t})});Lme.displayName=Pz;function jme(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(n,r,i,o)){case o:return"left";case i:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function Bme(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function zme(e){const{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function Ume(e,t){const{x:n,y:r}=e;let i=!1;for(let o=0,a=t.length-1;or!=c>r&&n<(l-u)*(r-s)/(c-s)+u&&(i=!i)}return i}function Wme(e){const t=e.slice();return t.sort((n,r)=>n.xr.x?1:n.yr.y?1:0),Vme(t)}function Vme(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r=2;){const o=t[t.length-1],a=t[t.length-2];if((o.x-a.x)*(i.y-a.y)>=(o.y-a.y)*(i.x-a.x))t.pop();else break}t.push(i)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const i=e[r];for(;n.length>=2;){const o=n[n.length-1],a=n[n.length-2];if((o.x-a.x)*(i.y-a.y)>=(o.y-a.y)*(i.x-a.x))n.pop();else break}n.push(i)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var vGe=Sz,yGe=Cz,bGe=Ez,wGe=Az,sR=1,Hme=.9,qme=.8,Gme=.17,G_=.1,K_=.999,Kme=.9999,Yme=.99,Zme=/[\\\/_+.#"@\[\(\{&]/,Xme=/[\\\/_+.#"@\[\(\{&]/g,Qme=/[\s-]/,kz=/[\s-]/g;function I3(e,t,n,r,i,o,a){if(o===t.length)return i===e.length?sR:Yme;var u=`${i},${o}`;if(a[u]!==void 0)return a[u];for(var s=r.charAt(o),l=n.indexOf(s,i),c=0,d,h,m,g;l>=0;)d=I3(e,t,n,r,l+1,o+1,a),d>c&&(l===i?d*=sR:Zme.test(e.charAt(l-1))?(d*=qme,m=e.slice(i,l-1).match(Xme),m&&i>0&&(d*=Math.pow(K_,m.length))):Qme.test(e.charAt(l-1))?(d*=Hme,g=e.slice(i,l-1).match(kz),g&&i>0&&(d*=Math.pow(K_,g.length))):(d*=Gme,i>0&&(d*=Math.pow(K_,l-i))),e.charAt(l)!==t.charAt(o)&&(d*=Kme)),(dd&&(d=h*G_)),d>c&&(c=d),l=n.indexOf(s,l+1);return a[u]=c,c}function lR(e){return e.toLowerCase().replace(kz," ")}function Jme(e,t){return I3(e,t,lR(e),lR(t),0,0,{})}function kn(){return kn=Object.assign?Object.assign.bind():function(e){for(var t=1;te.forEach(n=>ege(n,t))}function Ym(...e){return b.useCallback(Tz(...e),e)}function tge(e,t=[]){let n=[];function r(o,a){const u=b.createContext(a),s=n.length;n=[...n,a];function l(d){const{scope:h,children:m,...g}=d,v=h?.[e][s]||u,y=b.useMemo(()=>g,Object.values(g));return b.createElement(v.Provider,{value:y},m)}function c(d,h){const m=h?.[e][s]||u,g=b.useContext(m);if(g)return g;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${o}\``)}return l.displayName=o+"Provider",[l,c]}const i=()=>{const o=n.map(a=>b.createContext(a));return function(u){const s=u?.[e]||o;return b.useMemo(()=>({[`__scope${e}`]:{...u,[e]:s}}),[u,s])}};return i.scopeName=e,[r,nge(i,...t)]}function nge(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const a=r.reduce((u,{useScope:s,scopeName:l})=>{const d=s(o)[`__scope${l}`];return{...u,...d}},{});return b.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}const rge=globalThis?.document?b.useLayoutEffect:()=>{},ige=V6.useId||(()=>{});let oge=0;function Y_(e){const[t,n]=b.useState(ige());return rge(()=>{e||n(r=>r??String(oge++))},[e]),e||(t?`radix-${t}`:"")}function Mz(e){const t=b.useRef(e);return b.useEffect(()=>{t.current=e}),b.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function age({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=uge({defaultProp:t,onChange:n}),o=e!==void 0,a=o?e:r,u=Mz(n),s=b.useCallback(l=>{if(o){const d=typeof l=="function"?l(e):l;d!==e&&u(d)}else i(l)},[o,e,i,u]);return[a,s]}function uge({defaultProp:e,onChange:t}){const n=b.useState(e),[r]=n,i=b.useRef(r),o=Mz(t);return b.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}const LO=b.forwardRef((e,t)=>{const{children:n,...r}=e,i=b.Children.toArray(n),o=i.find(lge);if(o){const a=o.props.children,u=i.map(s=>s===o?b.Children.count(a)>1?b.Children.only(null):b.isValidElement(a)?a.props.children:null:s);return b.createElement(N3,kn({},r,{ref:t}),b.isValidElement(a)?b.cloneElement(a,void 0,u):null)}return b.createElement(N3,kn({},r,{ref:t}),n)});LO.displayName="Slot";const N3=b.forwardRef((e,t)=>{const{children:n,...r}=e;return b.isValidElement(n)?b.cloneElement(n,{...cge(r,n.props),ref:Tz(t,n.ref)}):b.Children.count(n)>1?b.Children.only(null):null});N3.displayName="SlotClone";const sge=({children:e})=>b.createElement(b.Fragment,null,e);function lge(e){return b.isValidElement(e)&&e.type===sge}function cge(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?n[r]=(...u)=>{o?.(...u),i?.(...u)}:r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}const fge=["a","button","div","h2","h3","img","li","nav","ol","p","span","svg","ul"],Rw=fge.reduce((e,t)=>{const n=b.forwardRef((r,i)=>{const{asChild:o,...a}=r,u=o?LO:t;return b.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),b.createElement(u,kn({},a,{ref:i}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function dge(e,t){e&&Bu.flushSync(()=>e.dispatchEvent(t))}function jO(e){const t=b.useRef(e);return b.useEffect(()=>{t.current=e}),b.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function hge(e){const t=jO(e);b.useEffect(()=>{const n=r=>{r.key==="Escape"&&t(r)};return document.addEventListener("keydown",n),()=>document.removeEventListener("keydown",n)},[t])}const F3="dismissableLayer.update",pge="dismissableLayer.pointerDownOutside",mge="dismissableLayer.focusOutside";let cR;const gge=b.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),vge=b.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:a,onDismiss:u,...s}=e,l=b.useContext(gge),[c,d]=b.useState(null),[,h]=b.useState({}),m=Ym(t,C=>d(C)),g=Array.from(l.layers),[v]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),y=g.indexOf(v),x=c?g.indexOf(c):-1,w=l.layersWithOutsidePointerEventsDisabled.size>0,S=x>=y,A=yge(C=>{const P=C.target,k=[...l.branches].some(M=>M.contains(P));!S||k||(i?.(C),a?.(C),C.defaultPrevented||u?.())}),E=bge(C=>{const P=C.target;[...l.branches].some(M=>M.contains(P))||(o?.(C),a?.(C),C.defaultPrevented||u?.())});return hge(C=>{x===l.layers.size-1&&(r?.(C),!C.defaultPrevented&&u&&(C.preventDefault(),u()))}),b.useEffect(()=>{if(c)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(cR=document.body.style.pointerEvents,document.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(c)),l.layers.add(c),fR(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(document.body.style.pointerEvents=cR)}},[c,n,l]),b.useEffect(()=>()=>{c&&(l.layers.delete(c),l.layersWithOutsidePointerEventsDisabled.delete(c),fR())},[c,l]),b.useEffect(()=>{const C=()=>h({});return document.addEventListener(F3,C),()=>document.removeEventListener(F3,C)},[]),b.createElement(Rw.div,kn({},s,{ref:m,style:{pointerEvents:w?S?"auto":"none":void 0,...e.style},onFocusCapture:Xf(e.onFocusCapture,E.onFocusCapture),onBlurCapture:Xf(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:Xf(e.onPointerDownCapture,A.onPointerDownCapture)}))});function yge(e){const t=jO(e),n=b.useRef(!1),r=b.useRef(()=>{});return b.useEffect(()=>{const i=a=>{if(a.target&&!n.current){let s=function(){Rz(pge,t,u,{discrete:!0})};const u={originalEvent:a};a.pointerType==="touch"?(document.removeEventListener("click",r.current),r.current=s,document.addEventListener("click",r.current,{once:!0})):s()}n.current=!1},o=window.setTimeout(()=>{document.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(o),document.removeEventListener("pointerdown",i),document.removeEventListener("click",r.current)}},[t]),{onPointerDownCapture:()=>n.current=!0}}function bge(e){const t=jO(e),n=b.useRef(!1);return b.useEffect(()=>{const r=i=>{i.target&&!n.current&&Rz(mge,t,{originalEvent:i},{discrete:!1})};return document.addEventListener("focusin",r),()=>document.removeEventListener("focusin",r)},[t]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function fR(){const e=new CustomEvent(F3);document.dispatchEvent(e)}function Rz(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?dge(i,o):i.dispatchEvent(o)}function dR(e){const t=b.useRef(e);return b.useEffect(()=>{t.current=e}),b.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}const Z_="focusScope.autoFocusOnMount",X_="focusScope.autoFocusOnUnmount",hR={bubbles:!1,cancelable:!0},wge=b.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...a}=e,[u,s]=b.useState(null),l=dR(i),c=dR(o),d=b.useRef(null),h=Ym(t,v=>s(v)),m=b.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;b.useEffect(()=>{if(r){let v=function(x){if(m.paused||!u)return;const w=x.target;u.contains(w)?d.current=w:Dl(d.current,{select:!0})},y=function(x){m.paused||!u||u.contains(x.relatedTarget)||Dl(d.current,{select:!0})};return document.addEventListener("focusin",v),document.addEventListener("focusout",y),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",y)}}},[r,u,m.paused]),b.useEffect(()=>{if(u){mR.add(m);const v=document.activeElement;if(!u.contains(v)){const x=new CustomEvent(Z_,hR);u.addEventListener(Z_,l),u.dispatchEvent(x),x.defaultPrevented||(xge(Age(Dz(u)),{select:!0}),document.activeElement===v&&Dl(u))}return()=>{u.removeEventListener(Z_,l),setTimeout(()=>{const x=new CustomEvent(X_,hR);u.addEventListener(X_,c),u.dispatchEvent(x),x.defaultPrevented||Dl(v??document.body,{select:!0}),u.removeEventListener(X_,c),mR.remove(m)},0)}}},[u,l,c,m]);const g=b.useCallback(v=>{if(!n&&!r||m.paused)return;const y=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,x=document.activeElement;if(y&&x){const w=v.currentTarget,[S,A]=_ge(w);S&&A?!v.shiftKey&&x===A?(v.preventDefault(),n&&Dl(S,{select:!0})):v.shiftKey&&x===S&&(v.preventDefault(),n&&Dl(A,{select:!0})):x===w&&v.preventDefault()}},[n,r,m.paused]);return b.createElement(Rw.div,kn({tabIndex:-1},a,{ref:h,onKeyDown:g}))});function xge(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Dl(r,{select:t}),document.activeElement!==n)return}function _ge(e){const t=Dz(e),n=pR(t,e),r=pR(t.reverse(),e);return[n,r]}function Dz(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function pR(e,t){for(const n of e)if(!Sge(n,{upTo:t}))return n}function Sge(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Cge(e){return e instanceof HTMLInputElement&&"select"in e}function Dl(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Cge(e)&&t&&e.select()}}const mR=Ege();function Ege(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=gR(e,t),e.unshift(t)},remove(t){var n;e=gR(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function gR(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Age(e){return e.filter(t=>t.tagName!=="A")}const Oge=b.forwardRef((e,t)=>{var n;const{container:r=globalThis==null||(n=globalThis.document)===null||n===void 0?void 0:n.body,...i}=e;return r?ew.createPortal(b.createElement(Rw.div,kn({},i,{ref:t})),r):null}),vR=globalThis?.document?b.useLayoutEffect:()=>{};function Pge(e,t){return b.useReducer((n,r)=>{const i=t[n][r];return i??n},e)}const Dw=e=>{const{present:t,children:n}=e,r=kge(t),i=typeof n=="function"?n({present:r.isPresent}):b.Children.only(n),o=Ym(r.ref,i.ref);return typeof n=="function"||r.isPresent?b.cloneElement(i,{ref:o}):null};Dw.displayName="Presence";function kge(e){const[t,n]=b.useState(),r=b.useRef({}),i=b.useRef(e),o=b.useRef("none"),a=e?"mounted":"unmounted",[u,s]=Pge(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return b.useEffect(()=>{const l=kv(r.current);o.current=u==="mounted"?l:"none"},[u]),vR(()=>{const l=r.current,c=i.current;if(c!==e){const h=o.current,m=kv(l);e?s("MOUNT"):m==="none"||l?.display==="none"?s("UNMOUNT"):s(c&&h!==m?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,s]),vR(()=>{if(t){const l=d=>{const m=kv(r.current).includes(d.animationName);d.target===t&&m&&Bu.flushSync(()=>s("ANIMATION_END"))},c=d=>{d.target===t&&(o.current=kv(r.current))};return t.addEventListener("animationstart",c),t.addEventListener("animationcancel",l),t.addEventListener("animationend",l),()=>{t.removeEventListener("animationstart",c),t.removeEventListener("animationcancel",l),t.removeEventListener("animationend",l)}}else s("ANIMATION_END")},[t,s]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:b.useCallback(l=>{l&&(r.current=getComputedStyle(l)),n(l)},[])}}function kv(e){return e?.animationName||"none"}let Q_=0;function Tge(){b.useEffect(()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=n[0])!==null&&e!==void 0?e:yR()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:yR()),Q_++,()=>{Q_===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),Q_--}},[])}function yR(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var _y="right-scroll-bar-position",Sy="width-before-scroll-bar",Mge="with-scroll-bars-hidden",Rge="--removed-body-scroll-bar-size";function J_(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Dge(e,t){var n=b.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}var $ge=typeof window<"u"?b.useLayoutEffect:b.useEffect,bR=new WeakMap;function Ige(e,t){var n=Dge(null,function(r){return e.forEach(function(i){return J_(i,r)})});return $ge(function(){var r=bR.get(n);if(r){var i=new Set(r),o=new Set(e),a=n.current;i.forEach(function(u){o.has(u)||J_(u,null)}),o.forEach(function(u){i.has(u)||J_(u,a)})}bR.set(n,e)},[e]),n}var $z=Ij(),eS=function(){},$w=b.forwardRef(function(e,t){var n=b.useRef(null),r=b.useState({onScrollCapture:eS,onWheelCapture:eS,onTouchMoveCapture:eS}),i=r[0],o=r[1],a=e.forwardProps,u=e.children,s=e.className,l=e.removeScrollBar,c=e.enabled,d=e.shards,h=e.sideCar,m=e.noIsolation,g=e.inert,v=e.allowPinchZoom,y=e.as,x=y===void 0?"div":y,w=sO(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),S=h,A=Ige([n,t]),E=Br(Br({},w),i);return b.createElement(b.Fragment,null,c&&b.createElement(S,{sideCar:$z,removeScrollBar:l,shards:d,noIsolation:m,inert:g,setCallbacks:o,allowPinchZoom:!!v,lockRef:n}),a?b.cloneElement(b.Children.only(u),Br(Br({},E),{ref:A})):b.createElement(x,Br({},E,{className:s,ref:A}),u))});$w.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};$w.classNames={fullWidth:Sy,zeroRight:_y};var Nge={left:0,top:0,right:0,gap:0},tS=function(e){return parseInt(e||"",10)||0},Fge=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[tS(n),tS(r),tS(i)]},Lge=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Nge;var t=Fge(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},jge=lO(),Qf="data-scroll-locked",Bge=function(e,t,n,r){var i=e.left,o=e.top,a=e.right,u=e.gap;return n===void 0&&(n="margin"),` - .`.concat(Mge,` { +For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return y.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},ape="DialogDescriptionWarning",upe=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${yB(ape).contentName}}.`;return y.useEffect(()=>{const i=e.current?.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},spe=iB,lpe=aB,cpe=sB,fpe=lB,dpe=cB,hpe=dB,ppe=pB,bB=gB;function oi(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var vpe=["color"],qKe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=oi(e,vpe);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M11.4669 3.72684C11.7558 3.91574 11.8369 4.30308 11.648 4.59198L7.39799 11.092C7.29783 11.2452 7.13556 11.3467 6.95402 11.3699C6.77247 11.3931 6.58989 11.3355 6.45446 11.2124L3.70446 8.71241C3.44905 8.48022 3.43023 8.08494 3.66242 7.82953C3.89461 7.57412 4.28989 7.55529 4.5453 7.78749L6.75292 9.79441L10.6018 3.90792C10.7907 3.61902 11.178 3.53795 11.4669 3.72684Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),gpe=["color"],KKe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=oi(e,gpe);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M7.49991 0.877045C3.84222 0.877045 0.877075 3.84219 0.877075 7.49988C0.877075 11.1575 3.84222 14.1227 7.49991 14.1227C11.1576 14.1227 14.1227 11.1575 14.1227 7.49988C14.1227 3.84219 11.1576 0.877045 7.49991 0.877045ZM1.82708 7.49988C1.82708 4.36686 4.36689 1.82704 7.49991 1.82704C10.6329 1.82704 13.1727 4.36686 13.1727 7.49988C13.1727 10.6329 10.6329 13.1727 7.49991 13.1727C4.36689 13.1727 1.82708 10.6329 1.82708 7.49988ZM10.1589 5.53774C10.3178 5.31191 10.2636 5.00001 10.0378 4.84109C9.81194 4.68217 9.50004 4.73642 9.34112 4.96225L6.51977 8.97154L5.35681 7.78706C5.16334 7.59002 4.84677 7.58711 4.64973 7.78058C4.45268 7.97404 4.44978 8.29061 4.64325 8.48765L6.22658 10.1003C6.33054 10.2062 6.47617 10.2604 6.62407 10.2483C6.77197 10.2363 6.90686 10.1591 6.99226 10.0377L10.1589 5.53774Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),mpe=["color"],GKe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=oi(e,mpe);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),ype=["color"],YKe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=oi(e,ype);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M8.84182 3.13514C9.04327 3.32401 9.05348 3.64042 8.86462 3.84188L5.43521 7.49991L8.86462 11.1579C9.05348 11.3594 9.04327 11.6758 8.84182 11.8647C8.64036 12.0535 8.32394 12.0433 8.13508 11.8419L4.38508 7.84188C4.20477 7.64955 4.20477 7.35027 4.38508 7.15794L8.13508 3.15794C8.32394 2.95648 8.64036 2.94628 8.84182 3.13514Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),bpe=["color"],ZKe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=oi(e,bpe);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M6.1584 3.13508C6.35985 2.94621 6.67627 2.95642 6.86514 3.15788L10.6151 7.15788C10.7954 7.3502 10.7954 7.64949 10.6151 7.84182L6.86514 11.8418C6.67627 12.0433 6.35985 12.0535 6.1584 11.8646C5.95694 11.6757 5.94673 11.3593 6.1356 11.1579L9.565 7.49985L6.1356 3.84182C5.94673 3.64036 5.95694 3.32394 6.1584 3.13508Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),xpe=["color"],XKe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=oi(e,xpe);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M3.13523 8.84197C3.3241 9.04343 3.64052 9.05363 3.84197 8.86477L7.5 5.43536L11.158 8.86477C11.3595 9.05363 11.6759 9.04343 11.8648 8.84197C12.0536 8.64051 12.0434 8.32409 11.842 8.13523L7.84197 4.38523C7.64964 4.20492 7.35036 4.20492 7.15803 4.38523L3.15803 8.13523C2.95657 8.32409 2.94637 8.64051 3.13523 8.84197Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),wpe=["color"],QKe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=oi(e,wpe);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M0.877075 7.49991C0.877075 3.84222 3.84222 0.877075 7.49991 0.877075C11.1576 0.877075 14.1227 3.84222 14.1227 7.49991C14.1227 11.1576 11.1576 14.1227 7.49991 14.1227C3.84222 14.1227 0.877075 11.1576 0.877075 7.49991ZM7.49991 1.82708C4.36689 1.82708 1.82708 4.36689 1.82708 7.49991C1.82708 10.6329 4.36689 13.1727 7.49991 13.1727C10.6329 13.1727 13.1727 10.6329 13.1727 7.49991C13.1727 4.36689 10.6329 1.82708 7.49991 1.82708Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),_pe=["color"],JKe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=oi(e,_pe);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),Spe=["color"],eGe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=oi(e,Spe);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M0.877075 7.49988C0.877075 3.84219 3.84222 0.877045 7.49991 0.877045C11.1576 0.877045 14.1227 3.84219 14.1227 7.49988C14.1227 11.1575 11.1576 14.1227 7.49991 14.1227C3.84222 14.1227 0.877075 11.1575 0.877075 7.49988ZM7.49991 1.82704C4.36689 1.82704 1.82708 4.36686 1.82708 7.49988C1.82708 10.6329 4.36689 13.1727 7.49991 13.1727C10.6329 13.1727 13.1727 10.6329 13.1727 7.49988C13.1727 4.36686 10.6329 1.82704 7.49991 1.82704ZM9.85358 5.14644C10.0488 5.3417 10.0488 5.65829 9.85358 5.85355L8.20713 7.49999L9.85358 9.14644C10.0488 9.3417 10.0488 9.65829 9.85358 9.85355C9.65832 10.0488 9.34173 10.0488 9.14647 9.85355L7.50002 8.2071L5.85358 9.85355C5.65832 10.0488 5.34173 10.0488 5.14647 9.85355C4.95121 9.65829 4.95121 9.3417 5.14647 9.14644L6.79292 7.49999L5.14647 5.85355C4.95121 5.65829 4.95121 5.3417 5.14647 5.14644C5.34173 4.95118 5.65832 4.95118 5.85358 5.14644L7.50002 6.79289L9.14647 5.14644C9.34173 4.95118 9.65832 4.95118 9.85358 5.14644Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),Cpe=["color"],tGe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=oi(e,Cpe);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M9.875 7.5C9.875 8.81168 8.81168 9.875 7.5 9.875C6.18832 9.875 5.125 8.81168 5.125 7.5C5.125 6.18832 6.18832 5.125 7.5 5.125C8.81168 5.125 9.875 6.18832 9.875 7.5Z",fill:r}))}),Epe=["color"],nGe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=oi(e,Epe);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M6.85355 3.85355C7.04882 3.65829 7.04882 3.34171 6.85355 3.14645C6.65829 2.95118 6.34171 2.95118 6.14645 3.14645L2.14645 7.14645C1.95118 7.34171 1.95118 7.65829 2.14645 7.85355L6.14645 11.8536C6.34171 12.0488 6.65829 12.0488 6.85355 11.8536C7.04882 11.6583 7.04882 11.3417 6.85355 11.1464L3.20711 7.5L6.85355 3.85355ZM12.8536 3.85355C13.0488 3.65829 13.0488 3.34171 12.8536 3.14645C12.6583 2.95118 12.3417 2.95118 12.1464 3.14645L8.14645 7.14645C7.95118 7.34171 7.95118 7.65829 8.14645 7.85355L12.1464 11.8536C12.3417 12.0488 12.6583 12.0488 12.8536 11.8536C13.0488 11.6583 13.0488 11.3417 12.8536 11.1464L9.20711 7.5L12.8536 3.85355Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),Ape=["color"],rGe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=oi(e,Ape);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M2.14645 11.1464C1.95118 11.3417 1.95118 11.6583 2.14645 11.8536C2.34171 12.0488 2.65829 12.0488 2.85355 11.8536L6.85355 7.85355C7.04882 7.65829 7.04882 7.34171 6.85355 7.14645L2.85355 3.14645C2.65829 2.95118 2.34171 2.95118 2.14645 3.14645C1.95118 3.34171 1.95118 3.65829 2.14645 3.85355L5.79289 7.5L2.14645 11.1464ZM8.14645 11.1464C7.95118 11.3417 7.95118 11.6583 8.14645 11.8536C8.34171 12.0488 8.65829 12.0488 8.85355 11.8536L12.8536 7.85355C13.0488 7.65829 13.0488 7.34171 12.8536 7.14645L8.85355 3.14645C8.65829 2.95118 8.34171 2.95118 8.14645 3.14645C7.95118 3.34171 7.95118 3.65829 8.14645 3.85355L11.7929 7.5L8.14645 11.1464Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),Ppe=["color"],iGe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=oi(e,Ppe);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M5.5 4.625C6.12132 4.625 6.625 4.12132 6.625 3.5C6.625 2.87868 6.12132 2.375 5.5 2.375C4.87868 2.375 4.375 2.87868 4.375 3.5C4.375 4.12132 4.87868 4.625 5.5 4.625ZM9.5 4.625C10.1213 4.625 10.625 4.12132 10.625 3.5C10.625 2.87868 10.1213 2.375 9.5 2.375C8.87868 2.375 8.375 2.87868 8.375 3.5C8.375 4.12132 8.87868 4.625 9.5 4.625ZM10.625 7.5C10.625 8.12132 10.1213 8.625 9.5 8.625C8.87868 8.625 8.375 8.12132 8.375 7.5C8.375 6.87868 8.87868 6.375 9.5 6.375C10.1213 6.375 10.625 6.87868 10.625 7.5ZM5.5 8.625C6.12132 8.625 6.625 8.12132 6.625 7.5C6.625 6.87868 6.12132 6.375 5.5 6.375C4.87868 6.375 4.375 6.87868 4.375 7.5C4.375 8.12132 4.87868 8.625 5.5 8.625ZM10.625 11.5C10.625 12.1213 10.1213 12.625 9.5 12.625C8.87868 12.625 8.375 12.1213 8.375 11.5C8.375 10.8787 8.87868 10.375 9.5 10.375C10.1213 10.375 10.625 10.8787 10.625 11.5ZM5.5 12.625C6.12132 12.625 6.625 12.1213 6.625 11.5C6.625 10.8787 6.12132 10.375 5.5 10.375C4.87868 10.375 4.375 10.8787 4.375 11.5C4.375 12.1213 4.87868 12.625 5.5 12.625Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),Ope=["color"],oGe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=oi(e,Ope);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M10 6.5C10 8.433 8.433 10 6.5 10C4.567 10 3 8.433 3 6.5C3 4.567 4.567 3 6.5 3C8.433 3 10 4.567 10 6.5ZM9.30884 10.0159C8.53901 10.6318 7.56251 11 6.5 11C4.01472 11 2 8.98528 2 6.5C2 4.01472 4.01472 2 6.5 2C8.98528 2 11 4.01472 11 6.5C11 7.56251 10.6318 8.53901 10.0159 9.30884L12.8536 12.1464C13.0488 12.3417 13.0488 12.6583 12.8536 12.8536C12.6583 13.0488 12.3417 13.0488 12.1464 12.8536L9.30884 10.0159Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),kpe=["color"],aGe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=oi(e,kpe);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M12.1464 1.14645C12.3417 0.951184 12.6583 0.951184 12.8535 1.14645L14.8535 3.14645C15.0488 3.34171 15.0488 3.65829 14.8535 3.85355L10.9109 7.79618C10.8349 7.87218 10.7471 7.93543 10.651 7.9835L6.72359 9.94721C6.53109 10.0435 6.29861 10.0057 6.14643 9.85355C5.99425 9.70137 5.95652 9.46889 6.05277 9.27639L8.01648 5.34897C8.06455 5.25283 8.1278 5.16507 8.2038 5.08907L12.1464 1.14645ZM12.5 2.20711L8.91091 5.79618L7.87266 7.87267L8.12731 8.12732L10.2038 7.08907L13.7929 3.5L12.5 2.20711ZM9.99998 2L8.99998 3H4.9C4.47171 3 4.18056 3.00039 3.95552 3.01877C3.73631 3.03668 3.62421 3.06915 3.54601 3.10899C3.35785 3.20487 3.20487 3.35785 3.10899 3.54601C3.06915 3.62421 3.03669 3.73631 3.01878 3.95552C3.00039 4.18056 3 4.47171 3 4.9V11.1C3 11.5283 3.00039 11.8194 3.01878 12.0445C3.03669 12.2637 3.06915 12.3758 3.10899 12.454C3.20487 12.6422 3.35785 12.7951 3.54601 12.891C3.62421 12.9309 3.73631 12.9633 3.95552 12.9812C4.18056 12.9996 4.47171 13 4.9 13H11.1C11.5283 13 11.8194 12.9996 12.0445 12.9812C12.2637 12.9633 12.3758 12.9309 12.454 12.891C12.6422 12.7951 12.7951 12.6422 12.891 12.454C12.9309 12.3758 12.9633 12.2637 12.9812 12.0445C12.9996 11.8194 13 11.5283 13 11.1V6.99998L14 5.99998V11.1V11.1207C14 11.5231 14 11.8553 13.9779 12.1259C13.9549 12.407 13.9057 12.6653 13.782 12.908C13.5903 13.2843 13.2843 13.5903 12.908 13.782C12.6653 13.9057 12.407 13.9549 12.1259 13.9779C11.8553 14 11.5231 14 11.1207 14H11.1H4.9H4.87934C4.47686 14 4.14468 14 3.87409 13.9779C3.59304 13.9549 3.33469 13.9057 3.09202 13.782C2.7157 13.5903 2.40973 13.2843 2.21799 12.908C2.09434 12.6653 2.04506 12.407 2.0221 12.1259C1.99999 11.8553 1.99999 11.5231 2 11.1207V11.1206V11.1V4.9V4.87935V4.87932V4.87931C1.99999 4.47685 1.99999 4.14468 2.0221 3.87409C2.04506 3.59304 2.09434 3.33469 2.21799 3.09202C2.40973 2.71569 2.7157 2.40973 3.09202 2.21799C3.33469 2.09434 3.59304 2.04506 3.87409 2.0221C4.14468 1.99999 4.47685 1.99999 4.87932 2H4.87935H4.9H9.99998Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),Tpe=["color"],uGe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=oi(e,Tpe);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M7.49991 0.876892C3.84222 0.876892 0.877075 3.84204 0.877075 7.49972C0.877075 11.1574 3.84222 14.1226 7.49991 14.1226C11.1576 14.1226 14.1227 11.1574 14.1227 7.49972C14.1227 3.84204 11.1576 0.876892 7.49991 0.876892ZM1.82707 7.49972C1.82707 4.36671 4.36689 1.82689 7.49991 1.82689C10.6329 1.82689 13.1727 4.36671 13.1727 7.49972C13.1727 10.6327 10.6329 13.1726 7.49991 13.1726C4.36689 13.1726 1.82707 10.6327 1.82707 7.49972ZM7.50003 4C7.77617 4 8.00003 4.22386 8.00003 4.5V7H10.5C10.7762 7 11 7.22386 11 7.5C11 7.77614 10.7762 8 10.5 8H8.00003V10.5C8.00003 10.7761 7.77617 11 7.50003 11C7.22389 11 7.00003 10.7761 7.00003 10.5V8H4.50003C4.22389 8 4.00003 7.77614 4.00003 7.5C4.00003 7.22386 4.22389 7 4.50003 7H7.00003V4.5C7.00003 4.22386 7.22389 4 7.50003 4Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),Mpe=["color"],sGe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=oi(e,Mpe);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M0.877075 7.49972C0.877075 3.84204 3.84222 0.876892 7.49991 0.876892C11.1576 0.876892 14.1227 3.84204 14.1227 7.49972C14.1227 11.1574 11.1576 14.1226 7.49991 14.1226C3.84222 14.1226 0.877075 11.1574 0.877075 7.49972ZM7.49991 1.82689C4.36689 1.82689 1.82708 4.36671 1.82708 7.49972C1.82708 10.6327 4.36689 13.1726 7.49991 13.1726C10.6329 13.1726 13.1727 10.6327 13.1727 7.49972C13.1727 4.36671 10.6329 1.82689 7.49991 1.82689ZM8.24993 10.5C8.24993 10.9142 7.91414 11.25 7.49993 11.25C7.08571 11.25 6.74993 10.9142 6.74993 10.5C6.74993 10.0858 7.08571 9.75 7.49993 9.75C7.91414 9.75 8.24993 10.0858 8.24993 10.5ZM6.05003 6.25C6.05003 5.57211 6.63511 4.925 7.50003 4.925C8.36496 4.925 8.95003 5.57211 8.95003 6.25C8.95003 6.74118 8.68002 6.99212 8.21447 7.27494C8.16251 7.30651 8.10258 7.34131 8.03847 7.37854L8.03841 7.37858C7.85521 7.48497 7.63788 7.61119 7.47449 7.73849C7.23214 7.92732 6.95003 8.23198 6.95003 8.7C6.95004 9.00376 7.19628 9.25 7.50004 9.25C7.8024 9.25 8.04778 9.00601 8.05002 8.70417L8.05056 8.7033C8.05924 8.6896 8.08493 8.65735 8.15058 8.6062C8.25207 8.52712 8.36508 8.46163 8.51567 8.37436L8.51571 8.37433C8.59422 8.32883 8.68296 8.27741 8.78559 8.21506C9.32004 7.89038 10.05 7.35382 10.05 6.25C10.05 4.92789 8.93511 3.825 7.50003 3.825C6.06496 3.825 4.95003 4.92789 4.95003 6.25C4.95003 6.55376 5.19628 6.8 5.50003 6.8C5.80379 6.8 6.05003 6.55376 6.05003 6.25Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),Rpe=["color"],lGe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=oi(e,Rpe);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M5.49998 0.5C5.49998 0.223858 5.72383 0 5.99998 0H7.49998H8.99998C9.27612 0 9.49998 0.223858 9.49998 0.5C9.49998 0.776142 9.27612 1 8.99998 1H7.99998V2.11922C9.09832 2.20409 10.119 2.56622 10.992 3.13572C11.0116 3.10851 11.0336 3.08252 11.058 3.05806L11.858 2.25806C12.1021 2.01398 12.4978 2.01398 12.7419 2.25806C12.986 2.50214 12.986 2.89786 12.7419 3.14194L11.967 3.91682C13.1595 5.07925 13.9 6.70314 13.9 8.49998C13.9 12.0346 11.0346 14.9 7.49998 14.9C3.96535 14.9 1.09998 12.0346 1.09998 8.49998C1.09998 5.13362 3.69904 2.3743 6.99998 2.11922V1H5.99998C5.72383 1 5.49998 0.776142 5.49998 0.5ZM2.09998 8.49998C2.09998 5.51764 4.51764 3.09998 7.49998 3.09998C10.4823 3.09998 12.9 5.51764 12.9 8.49998C12.9 11.4823 10.4823 13.9 7.49998 13.9C4.51764 13.9 2.09998 11.4823 2.09998 8.49998ZM7.99998 4.5C7.99998 4.22386 7.77612 4 7.49998 4C7.22383 4 6.99998 4.22386 6.99998 4.5V9.5C6.99998 9.77614 7.22383 10 7.49998 10C7.77612 10 7.99998 9.77614 7.99998 9.5V4.5Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),OA="Collapsible",[Dpe,cGe]=mi(OA),[$pe,kA]=Dpe(OA),xB=y.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:o,onOpenChange:a,...u}=e,[s=!1,l]=Ga({prop:r,defaultProp:i,onChange:a});return I.jsx($pe,{scope:n,disabled:o,contentId:No(),open:s,onOpenToggle:y.useCallback(()=>l(c=>!c),[l]),children:I.jsx(pt.div,{"data-state":MA(s),"data-disabled":o?"":void 0,...u,ref:t})})});xB.displayName=OA;var wB="CollapsibleTrigger",Ipe=y.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,i=kA(wB,n);return I.jsx(pt.button,{type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":MA(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled,...r,ref:t,onClick:Ye(e.onClick,i.onOpenToggle)})});Ipe.displayName=wB;var TA="CollapsibleContent",Npe=y.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=kA(TA,e.__scopeCollapsible);return I.jsx(ii,{present:n||i.open,children:({present:o})=>I.jsx(Fpe,{...r,ref:t,present:o})})});Npe.displayName=TA;var Fpe=y.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:i,...o}=e,a=kA(TA,n),[u,s]=y.useState(r),l=y.useRef(null),c=Kt(t,l),d=y.useRef(0),h=d.current,v=y.useRef(0),g=v.current,m=a.open||u,b=y.useRef(m),w=y.useRef(void 0);return y.useEffect(()=>{const x=requestAnimationFrame(()=>b.current=!1);return()=>cancelAnimationFrame(x)},[]),ni(()=>{const x=l.current;if(x){w.current=w.current||{transitionDuration:x.style.transitionDuration,animationName:x.style.animationName},x.style.transitionDuration="0s",x.style.animationName="none";const S=x.getBoundingClientRect();d.current=S.height,v.current=S.width,b.current||(x.style.transitionDuration=w.current.transitionDuration,x.style.animationName=w.current.animationName),s(r)}},[a.open,r]),I.jsx(pt.div,{"data-state":MA(a.open),"data-disabled":a.disabled?"":void 0,id:a.contentId,hidden:!m,...o,ref:c,style:{"--radix-collapsible-content-height":h?`${h}px`:void 0,"--radix-collapsible-content-width":g?`${g}px`:void 0,...e.style},children:m&&i})});function MA(e){return e?"open":"closed"}var fGe=xB;function RA(e){const t=e+"CollectionProvider",[n,r]=mi(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=v=>{const{scope:g,children:m}=v,b=j.useRef(null),w=j.useRef(new Map).current;return I.jsx(i,{scope:g,itemMap:w,collectionRef:b,children:m})};a.displayName=t;const u=e+"CollectionSlot",s=j.forwardRef((v,g)=>{const{scope:m,children:b}=v,w=o(u,m),x=Kt(g,w.collectionRef);return I.jsx(Sl,{ref:x,children:b})});s.displayName=u;const l=e+"CollectionItemSlot",c="data-radix-collection-item",d=j.forwardRef((v,g)=>{const{scope:m,children:b,...w}=v,x=j.useRef(null),S=Kt(g,x),A=o(l,m);return j.useEffect(()=>(A.itemMap.set(x,{ref:x,...w}),()=>void A.itemMap.delete(x))),I.jsx(Sl,{[c]:"",ref:S,children:b})});d.displayName=l;function h(v){const g=o(e+"CollectionConsumer",v);return j.useCallback(()=>{const b=g.collectionRef.current;if(!b)return[];const w=Array.from(b.querySelectorAll(`[${c}]`));return Array.from(g.itemMap.values()).sort((A,E)=>w.indexOf(A.ref.current)-w.indexOf(E.ref.current))},[g.collectionRef,g.itemMap])}return[{Provider:a,Slot:s,ItemSlot:d},h,r]}var Lpe=y.createContext(void 0);function hg(e){const t=y.useContext(Lpe);return e||t||"ltr"}const jpe=["top","right","bottom","left"],Ol=Math.min,To=Math.max,U1=Math.round,Ym=Math.floor,kl=e=>({x:e,y:e}),Bpe={left:"right",right:"left",bottom:"top",top:"bottom"},zpe={start:"end",end:"start"};function UC(e,t,n){return To(e,Ol(t,n))}function gs(e,t){return typeof e=="function"?e(t):e}function ms(e){return e.split("-")[0]}function Th(e){return e.split("-")[1]}function DA(e){return e==="x"?"y":"x"}function $A(e){return e==="y"?"height":"width"}function Mh(e){return["top","bottom"].includes(ms(e))?"y":"x"}function IA(e){return DA(Mh(e))}function Upe(e,t,n){n===void 0&&(n=!1);const r=Th(e),i=IA(e),o=$A(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=W1(a)),[a,W1(a)]}function Wpe(e){const t=W1(e);return[WC(e),t,WC(t)]}function WC(e){return e.replace(/start|end/g,t=>zpe[t])}function Vpe(e,t,n){const r=["left","right"],i=["right","left"],o=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?i:r:t?r:i;case"left":case"right":return t?o:a;default:return[]}}function Hpe(e,t,n,r){const i=Th(e);let o=Vpe(ms(e),n==="start",r);return i&&(o=o.map(a=>a+"-"+i),t&&(o=o.concat(o.map(WC)))),o}function W1(e){return e.replace(/left|right|bottom|top/g,t=>Bpe[t])}function qpe(e){return{top:0,right:0,bottom:0,left:0,...e}}function _B(e){return typeof e!="number"?qpe(e):{top:e,right:e,bottom:e,left:e}}function V1(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function sR(e,t,n){let{reference:r,floating:i}=e;const o=Mh(t),a=IA(t),u=$A(a),s=ms(t),l=o==="y",c=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,h=r[u]/2-i[u]/2;let v;switch(s){case"top":v={x:c,y:r.y-i.height};break;case"bottom":v={x:c,y:r.y+r.height};break;case"right":v={x:r.x+r.width,y:d};break;case"left":v={x:r.x-i.width,y:d};break;default:v={x:r.x,y:r.y}}switch(Th(t)){case"start":v[a]-=h*(n&&l?-1:1);break;case"end":v[a]+=h*(n&&l?-1:1);break}return v}const Kpe=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,u=o.filter(Boolean),s=await(a.isRTL==null?void 0:a.isRTL(t));let l=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:c,y:d}=sR(l,r,s),h=r,v={},g=0;for(let m=0;m({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:o,platform:a,elements:u,middlewareData:s}=t,{element:l,padding:c=0}=gs(e,t)||{};if(l==null)return{};const d=_B(c),h={x:n,y:r},v=IA(i),g=$A(v),m=await a.getDimensions(l),b=v==="y",w=b?"top":"left",x=b?"bottom":"right",S=b?"clientHeight":"clientWidth",A=o.reference[g]+o.reference[v]-h[v]-o.floating[g],E=h[v]-o.reference[v],C=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l));let T=C?C[S]:0;(!T||!await(a.isElement==null?void 0:a.isElement(C)))&&(T=u.floating[S]||o.floating[g]);const M=A/2-E/2,F=T/2-m[g]/2-1,U=Ol(d[w],F),H=Ol(d[x],F),W=U,ie=T-m[g]-H,Z=T/2-m[g]/2+M,G=UC(W,Z,ie),K=!s.arrow&&Th(i)!=null&&Z!==G&&o.reference[g]/2-(ZW<=0)){var F,U;const W=(((F=o.flip)==null?void 0:F.index)||0)+1,ie=E[W];if(ie)return{data:{index:W,overflows:M},reset:{placement:ie}};let Z=(U=M.filter(G=>G.overflows[0]<=0).sort((G,K)=>G.overflows[1]-K.overflows[1])[0])==null?void 0:U.placement;if(!Z)switch(v){case"bestFit":{var H;const G=(H=M.map(K=>[K.placement,K.overflows.filter(V=>V>0).reduce((V,B)=>V+B,0)]).sort((K,V)=>K[1]-V[1])[0])==null?void 0:H[0];G&&(Z=G);break}case"initialPlacement":Z=u;break}if(i!==Z)return{reset:{placement:Z}}}return{}}}};function lR(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function cR(e){return jpe.some(t=>e[t]>=0)}const Zpe=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...i}=gs(e,t);switch(r){case"referenceHidden":{const o=await nv(t,{...i,elementContext:"reference"}),a=lR(o,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:cR(a)}}}case"escaped":{const o=await nv(t,{...i,altBoundary:!0}),a=lR(o,n.floating);return{data:{escapedOffsets:a,escaped:cR(a)}}}default:return{}}}}};async function Xpe(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=ms(n),u=Th(n),s=Mh(n)==="y",l=["left","top"].includes(a)?-1:1,c=o&&s?-1:1,d=gs(t,e);let{mainAxis:h,crossAxis:v,alignmentAxis:g}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return u&&typeof g=="number"&&(v=u==="end"?g*-1:g),s?{x:v*c,y:h*l}:{x:h*l,y:v*c}}const Qpe=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:o,placement:a,middlewareData:u}=t,s=await Xpe(t,e);return a===((n=u.offset)==null?void 0:n.placement)&&(r=u.arrow)!=null&&r.alignmentOffset?{}:{x:i+s.x,y:o+s.y,data:{...s,placement:a}}}}},Jpe=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:u={fn:b=>{let{x:w,y:x}=b;return{x:w,y:x}}},...s}=gs(e,t),l={x:n,y:r},c=await nv(t,s),d=Mh(ms(i)),h=DA(d);let v=l[h],g=l[d];if(o){const b=h==="y"?"top":"left",w=h==="y"?"bottom":"right",x=v+c[b],S=v-c[w];v=UC(x,v,S)}if(a){const b=d==="y"?"top":"left",w=d==="y"?"bottom":"right",x=g+c[b],S=g-c[w];g=UC(x,g,S)}const m=u.fn({...t,[h]:v,[d]:g});return{...m,data:{x:m.x-n,y:m.y-r}}}}},e0e=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:o,middlewareData:a}=t,{offset:u=0,mainAxis:s=!0,crossAxis:l=!0}=gs(e,t),c={x:n,y:r},d=Mh(i),h=DA(d);let v=c[h],g=c[d];const m=gs(u,t),b=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(s){const S=h==="y"?"height":"width",A=o.reference[h]-o.floating[S]+b.mainAxis,E=o.reference[h]+o.reference[S]-b.mainAxis;vE&&(v=E)}if(l){var w,x;const S=h==="y"?"width":"height",A=["top","left"].includes(ms(i)),E=o.reference[d]-o.floating[S]+(A&&((w=a.offset)==null?void 0:w[d])||0)+(A?0:b.crossAxis),C=o.reference[d]+o.reference[S]+(A?0:((x=a.offset)==null?void 0:x[d])||0)-(A?b.crossAxis:0);gC&&(g=C)}return{[h]:v,[d]:g}}}},t0e=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:i,elements:o}=t,{apply:a=()=>{},...u}=gs(e,t),s=await nv(t,u),l=ms(n),c=Th(n),d=Mh(n)==="y",{width:h,height:v}=r.floating;let g,m;l==="top"||l==="bottom"?(g=l,m=c===(await(i.isRTL==null?void 0:i.isRTL(o.floating))?"start":"end")?"left":"right"):(m=l,g=c==="end"?"top":"bottom");const b=v-s[g],w=h-s[m],x=!t.middlewareData.shift;let S=b,A=w;if(d){const C=h-s.left-s.right;A=c||x?Ol(w,C):C}else{const C=v-s.top-s.bottom;S=c||x?Ol(b,C):C}if(x&&!c){const C=To(s.left,0),T=To(s.right,0),M=To(s.top,0),F=To(s.bottom,0);d?A=h-2*(C!==0||T!==0?C+T:To(s.left,s.right)):S=v-2*(M!==0||F!==0?M+F:To(s.top,s.bottom))}await a({...t,availableWidth:A,availableHeight:S});const E=await i.getDimensions(o.floating);return h!==E.width||v!==E.height?{reset:{rects:!0}}:{}}}};function Tl(e){return SB(e)?(e.nodeName||"").toLowerCase():"#document"}function Fo(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Es(e){var t;return(t=(SB(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function SB(e){return e instanceof Node||e instanceof Fo(e).Node}function ys(e){return e instanceof Element||e instanceof Fo(e).Element}function Pu(e){return e instanceof HTMLElement||e instanceof Fo(e).HTMLElement}function fR(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Fo(e).ShadowRoot}function pg(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=va(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function n0e(e){return["table","td","th"].includes(Tl(e))}function NA(e){const t=FA(),n=va(e);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function r0e(e){let t=Wd(e);for(;Pu(t)&&!Bx(t);){if(NA(t))return t;t=Wd(t)}return null}function FA(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Bx(e){return["html","body","#document"].includes(Tl(e))}function va(e){return Fo(e).getComputedStyle(e)}function zx(e){return ys(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Wd(e){if(Tl(e)==="html")return e;const t=e.assignedSlot||e.parentNode||fR(e)&&e.host||Es(e);return fR(t)?t.host:t}function CB(e){const t=Wd(e);return Bx(t)?e.ownerDocument?e.ownerDocument.body:e.body:Pu(t)&&pg(t)?t:CB(t)}function rv(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=CB(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),a=Fo(i);return o?t.concat(a,a.visualViewport||[],pg(i)?i:[],a.frameElement&&n?rv(a.frameElement):[]):t.concat(i,rv(i,[],n))}function EB(e){const t=va(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Pu(e),o=i?e.offsetWidth:n,a=i?e.offsetHeight:r,u=U1(n)!==o||U1(r)!==a;return u&&(n=o,r=a),{width:n,height:r,$:u}}function LA(e){return ys(e)?e:e.contextElement}function _d(e){const t=LA(e);if(!Pu(t))return kl(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=EB(t);let a=(o?U1(n.width):n.width)/r,u=(o?U1(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!u||!Number.isFinite(u))&&(u=1),{x:a,y:u}}const i0e=kl(0);function AB(e){const t=Fo(e);return!FA()||!t.visualViewport?i0e:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function o0e(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Fo(e)?!1:t}function Kc(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=LA(e);let a=kl(1);t&&(r?ys(r)&&(a=_d(r)):a=_d(e));const u=o0e(o,n,r)?AB(o):kl(0);let s=(i.left+u.x)/a.x,l=(i.top+u.y)/a.y,c=i.width/a.x,d=i.height/a.y;if(o){const h=Fo(o),v=r&&ys(r)?Fo(r):r;let g=h,m=g.frameElement;for(;m&&r&&v!==g;){const b=_d(m),w=m.getBoundingClientRect(),x=va(m),S=w.left+(m.clientLeft+parseFloat(x.paddingLeft))*b.x,A=w.top+(m.clientTop+parseFloat(x.paddingTop))*b.y;s*=b.x,l*=b.y,c*=b.x,d*=b.y,s+=S,l+=A,g=Fo(m),m=g.frameElement}}return V1({width:c,height:d,x:s,y:l})}const a0e=[":popover-open",":modal"];function PB(e){return a0e.some(t=>{try{return e.matches(t)}catch{return!1}})}function u0e(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const o=i==="fixed",a=Es(r),u=t?PB(t.floating):!1;if(r===a||u&&o)return n;let s={scrollLeft:0,scrollTop:0},l=kl(1);const c=kl(0),d=Pu(r);if((d||!d&&!o)&&((Tl(r)!=="body"||pg(a))&&(s=zx(r)),Pu(r))){const h=Kc(r);l=_d(r),c.x=h.x+r.clientLeft,c.y=h.y+r.clientTop}return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-s.scrollLeft*l.x+c.x,y:n.y*l.y-s.scrollTop*l.y+c.y}}function s0e(e){return Array.from(e.getClientRects())}function OB(e){return Kc(Es(e)).left+zx(e).scrollLeft}function l0e(e){const t=Es(e),n=zx(e),r=e.ownerDocument.body,i=To(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=To(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+OB(e);const u=-n.scrollTop;return va(r).direction==="rtl"&&(a+=To(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:a,y:u}}function c0e(e,t){const n=Fo(e),r=Es(e),i=n.visualViewport;let o=r.clientWidth,a=r.clientHeight,u=0,s=0;if(i){o=i.width,a=i.height;const l=FA();(!l||l&&t==="fixed")&&(u=i.offsetLeft,s=i.offsetTop)}return{width:o,height:a,x:u,y:s}}function f0e(e,t){const n=Kc(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=Pu(e)?_d(e):kl(1),a=e.clientWidth*o.x,u=e.clientHeight*o.y,s=i*o.x,l=r*o.y;return{width:a,height:u,x:s,y:l}}function dR(e,t,n){let r;if(t==="viewport")r=c0e(e,n);else if(t==="document")r=l0e(Es(e));else if(ys(t))r=f0e(t,n);else{const i=AB(e);r={...t,x:t.x-i.x,y:t.y-i.y}}return V1(r)}function kB(e,t){const n=Wd(e);return n===t||!ys(n)||Bx(n)?!1:va(n).position==="fixed"||kB(n,t)}function d0e(e,t){const n=t.get(e);if(n)return n;let r=rv(e,[],!1).filter(u=>ys(u)&&Tl(u)!=="body"),i=null;const o=va(e).position==="fixed";let a=o?Wd(e):e;for(;ys(a)&&!Bx(a);){const u=va(a),s=NA(a);!s&&u.position==="fixed"&&(i=null),(o?!s&&!i:!s&&u.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||pg(a)&&!s&&kB(e,a))?r=r.filter(c=>c!==a):i=u,a=Wd(a)}return t.set(e,r),r}function h0e(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const a=[...n==="clippingAncestors"?d0e(t,this._c):[].concat(n),r],u=a[0],s=a.reduce((l,c)=>{const d=dR(t,c,i);return l.top=To(d.top,l.top),l.right=Ol(d.right,l.right),l.bottom=Ol(d.bottom,l.bottom),l.left=To(d.left,l.left),l},dR(t,u,i));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}}function p0e(e){const{width:t,height:n}=EB(e);return{width:t,height:n}}function v0e(e,t,n){const r=Pu(t),i=Es(t),o=n==="fixed",a=Kc(e,!0,o,t);let u={scrollLeft:0,scrollTop:0};const s=kl(0);if(r||!r&&!o)if((Tl(t)!=="body"||pg(i))&&(u=zx(t)),r){const d=Kc(t,!0,o,t);s.x=d.x+t.clientLeft,s.y=d.y+t.clientTop}else i&&(s.x=OB(i));const l=a.left+u.scrollLeft-s.x,c=a.top+u.scrollTop-s.y;return{x:l,y:c,width:a.width,height:a.height}}function hR(e,t){return!Pu(e)||va(e).position==="fixed"?null:t?t(e):e.offsetParent}function TB(e,t){const n=Fo(e);if(!Pu(e)||PB(e))return n;let r=hR(e,t);for(;r&&n0e(r)&&va(r).position==="static";)r=hR(r,t);return r&&(Tl(r)==="html"||Tl(r)==="body"&&va(r).position==="static"&&!NA(r))?n:r||r0e(e)||n}const g0e=async function(e){const t=this.getOffsetParent||TB,n=this.getDimensions;return{reference:v0e(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,...await n(e.floating)}}};function m0e(e){return va(e).direction==="rtl"}const y0e={convertOffsetParentRelativeRectToViewportRelativeRect:u0e,getDocumentElement:Es,getClippingRect:h0e,getOffsetParent:TB,getElementRects:g0e,getClientRects:s0e,getDimensions:p0e,getScale:_d,isElement:ys,isRTL:m0e};function b0e(e,t){let n=null,r;const i=Es(e);function o(){var u;clearTimeout(r),(u=n)==null||u.disconnect(),n=null}function a(u,s){u===void 0&&(u=!1),s===void 0&&(s=1),o();const{left:l,top:c,width:d,height:h}=e.getBoundingClientRect();if(u||t(),!d||!h)return;const v=Ym(c),g=Ym(i.clientWidth-(l+d)),m=Ym(i.clientHeight-(c+h)),b=Ym(l),x={rootMargin:-v+"px "+-g+"px "+-m+"px "+-b+"px",threshold:To(0,Ol(1,s))||1};let S=!0;function A(E){const C=E[0].intersectionRatio;if(C!==s){if(!S)return a();C?a(!1,C):r=setTimeout(()=>{a(!1,1e-7)},100)}S=!1}try{n=new IntersectionObserver(A,{...x,root:i.ownerDocument})}catch{n=new IntersectionObserver(A,x)}n.observe(e)}return a(!0),o}function x0e(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:u=typeof IntersectionObserver=="function",animationFrame:s=!1}=r,l=LA(e),c=i||o?[...l?rv(l):[],...rv(t)]:[];c.forEach(w=>{i&&w.addEventListener("scroll",n,{passive:!0}),o&&w.addEventListener("resize",n)});const d=l&&u?b0e(l,n):null;let h=-1,v=null;a&&(v=new ResizeObserver(w=>{let[x]=w;x&&x.target===l&&v&&(v.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var S;(S=v)==null||S.observe(t)})),n()}),l&&!s&&v.observe(l),v.observe(t));let g,m=s?Kc(e):null;s&&b();function b(){const w=Kc(e);m&&(w.x!==m.x||w.y!==m.y||w.width!==m.width||w.height!==m.height)&&n(),m=w,g=requestAnimationFrame(b)}return n(),()=>{var w;c.forEach(x=>{i&&x.removeEventListener("scroll",n),o&&x.removeEventListener("resize",n)}),d?.(),(w=v)==null||w.disconnect(),v=null,s&&cancelAnimationFrame(g)}}const w0e=Jpe,_0e=Ype,S0e=t0e,C0e=Zpe,pR=Gpe,E0e=e0e,A0e=(e,t,n)=>{const r=new Map,i={platform:y0e,...n},o={...i.platform,_c:r};return Kpe(e,t,{...i,platform:o})},P0e=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:i}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?pR({element:r.current,padding:i}).fn(n):{}:r?pR({element:r,padding:i}).fn(n):{}}}};var By=typeof document<"u"?y.useLayoutEffect:y.useEffect;function H1(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!H1(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!H1(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function MB(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function vR(e,t){const n=MB(e);return Math.round(t*n)/n}function gR(e){const t=y.useRef(e);return By(()=>{t.current=e}),t}function O0e(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:a}={},transform:u=!0,whileElementsMounted:s,open:l}=e,[c,d]=y.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,v]=y.useState(r);H1(h,r)||v(r);const[g,m]=y.useState(null),[b,w]=y.useState(null),x=y.useCallback(V=>{V!==C.current&&(C.current=V,m(V))},[]),S=y.useCallback(V=>{V!==T.current&&(T.current=V,w(V))},[]),A=o||g,E=a||b,C=y.useRef(null),T=y.useRef(null),M=y.useRef(c),F=s!=null,U=gR(s),H=gR(i),W=y.useCallback(()=>{if(!C.current||!T.current)return;const V={placement:t,strategy:n,middleware:h};H.current&&(V.platform=H.current),A0e(C.current,T.current,V).then(B=>{const q={...B,isPositioned:!0};ie.current&&!H1(M.current,q)&&(M.current=q,Ss.flushSync(()=>{d(q)}))})},[h,t,n,H]);By(()=>{l===!1&&M.current.isPositioned&&(M.current.isPositioned=!1,d(V=>({...V,isPositioned:!1})))},[l]);const ie=y.useRef(!1);By(()=>(ie.current=!0,()=>{ie.current=!1}),[]),By(()=>{if(A&&(C.current=A),E&&(T.current=E),A&&E){if(U.current)return U.current(A,E,W);W()}},[A,E,W,U,F]);const Z=y.useMemo(()=>({reference:C,floating:T,setReference:x,setFloating:S}),[x,S]),G=y.useMemo(()=>({reference:A,floating:E}),[A,E]),K=y.useMemo(()=>{const V={position:n,left:0,top:0};if(!G.floating)return V;const B=vR(G.floating,c.x),q=vR(G.floating,c.y);return u?{...V,transform:"translate("+B+"px, "+q+"px)",...MB(G.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:B,top:q}},[n,u,G.floating,c.x,c.y]);return y.useMemo(()=>({...c,update:W,refs:Z,elements:G,floatingStyles:K}),[c,W,Z,G,K])}var k0e="Arrow",RB=y.forwardRef((e,t)=>{const{children:n,width:r=10,height:i=5,...o}=e;return I.jsx(pt.svg,{...o,ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:I.jsx("polygon",{points:"0,0 30,0 15,10"})})});RB.displayName=k0e;var T0e=RB;function jA(e){const[t,n]=y.useState(void 0);return ni(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const o=i[0];let a,u;if("borderBoxSize"in o){const s=o.borderBoxSize,l=Array.isArray(s)?s[0]:s;a=l.inlineSize,u=l.blockSize}else a=e.offsetWidth,u=e.offsetHeight;n({width:a,height:u})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var BA="Popper",[DB,Fl]=mi(BA),[M0e,$B]=DB(BA),IB=e=>{const{__scopePopper:t,children:n}=e,[r,i]=y.useState(null);return I.jsx(M0e,{scope:t,anchor:r,onAnchorChange:i,children:n})};IB.displayName=BA;var NB="PopperAnchor",FB=y.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,o=$B(NB,n),a=y.useRef(null),u=Kt(t,a);return y.useEffect(()=>{o.onAnchorChange(r?.current||a.current)}),r?null:I.jsx(pt.div,{...i,ref:u})});FB.displayName=NB;var zA="PopperContent",[R0e,D0e]=DB(zA),LB=y.forwardRef((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:i=0,align:o="center",alignOffset:a=0,arrowPadding:u=0,avoidCollisions:s=!0,collisionBoundary:l=[],collisionPadding:c=0,sticky:d="partial",hideWhenDetached:h=!1,updatePositionStrategy:v="optimized",onPlaced:g,...m}=e,b=$B(zA,n),[w,x]=y.useState(null),S=Kt(t,ge=>x(ge)),[A,E]=y.useState(null),C=jA(A),T=C?.width??0,M=C?.height??0,F=r+(o!=="center"?"-"+o:""),U=typeof c=="number"?c:{top:0,right:0,bottom:0,left:0,...c},H=Array.isArray(l)?l:[l],W=H.length>0,ie={padding:U,boundary:H.filter(I0e),altBoundary:W},{refs:Z,floatingStyles:G,placement:K,isPositioned:V,middlewareData:B}=O0e({strategy:"fixed",placement:F,whileElementsMounted:(...ge)=>x0e(...ge,{animationFrame:v==="always"}),elements:{reference:b.anchor},middleware:[Qpe({mainAxis:i+M,alignmentAxis:a}),s&&w0e({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?E0e():void 0,...ie}),s&&_0e({...ie}),S0e({...ie,apply:({elements:ge,rects:Ze,availableWidth:Pe,availableHeight:Fe})=>{const{width:$e,height:be}=Ze.reference,yt=ge.floating.style;yt.setProperty("--radix-popper-available-width",`${Pe}px`),yt.setProperty("--radix-popper-available-height",`${Fe}px`),yt.setProperty("--radix-popper-anchor-width",`${$e}px`),yt.setProperty("--radix-popper-anchor-height",`${be}px`)}}),A&&P0e({element:A,padding:u}),N0e({arrowWidth:T,arrowHeight:M}),h&&C0e({strategy:"referenceHidden",...ie})]}),[q,Y]=zB(K),ue=Wr(g);ni(()=>{V&&ue?.()},[V,ue]);const Q=B.arrow?.x,J=B.arrow?.y,se=B.arrow?.centerOffset!==0,[de,Se]=y.useState();return ni(()=>{w&&Se(window.getComputedStyle(w).zIndex)},[w]),I.jsx("div",{ref:Z.setFloating,"data-radix-popper-content-wrapper":"",style:{...G,transform:V?G.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:de,"--radix-popper-transform-origin":[B.transformOrigin?.x,B.transformOrigin?.y].join(" "),...B.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:I.jsx(R0e,{scope:n,placedSide:q,onArrowChange:E,arrowX:Q,arrowY:J,shouldHideArrow:se,children:I.jsx(pt.div,{"data-side":q,"data-align":Y,...m,ref:S,style:{...m.style,animation:V?void 0:"none"}})})})});LB.displayName=zA;var jB="PopperArrow",$0e={top:"bottom",right:"left",bottom:"top",left:"right"},BB=y.forwardRef(function(t,n){const{__scopePopper:r,...i}=t,o=D0e(jB,r),a=$0e[o.placedSide];return I.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:I.jsx(T0e,{...i,ref:n,style:{...i.style,display:"block"}})})});BB.displayName=jB;function I0e(e){return e!==null}var N0e=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,u=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[l,c]=zB(n),d={start:"0%",center:"50%",end:"100%"}[c],h=(i.arrow?.x??0)+u/2,v=(i.arrow?.y??0)+s/2;let g="",m="";return l==="bottom"?(g=a?d:`${h}px`,m=`${-s}px`):l==="top"?(g=a?d:`${h}px`,m=`${r.floating.height+s}px`):l==="right"?(g=`${-s}px`,m=a?d:`${v}px`):l==="left"&&(g=`${r.floating.width+s}px`,m=a?d:`${v}px`),{data:{x:g,y:m}}}});function zB(e){const[t,n="center"]=e.split("-");return[t,n]}var Ux=IB,vg=FB,Wx=LB,Vx=BB,uS="rovingFocusGroup.onEntryFocus",F0e={bubbles:!1,cancelable:!0},Hx="RovingFocusGroup",[VC,UB,L0e]=RA(Hx),[j0e,qx]=mi(Hx,[L0e]),[B0e,z0e]=j0e(Hx),WB=y.forwardRef((e,t)=>I.jsx(VC.Provider,{scope:e.__scopeRovingFocusGroup,children:I.jsx(VC.Slot,{scope:e.__scopeRovingFocusGroup,children:I.jsx(U0e,{...e,ref:t})})}));WB.displayName=Hx;var U0e=y.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:o,currentTabStopId:a,defaultCurrentTabStopId:u,onCurrentTabStopIdChange:s,onEntryFocus:l,preventScrollOnEntryFocus:c=!1,...d}=e,h=y.useRef(null),v=Kt(t,h),g=hg(o),[m=null,b]=Ga({prop:a,defaultProp:u,onChange:s}),[w,x]=y.useState(!1),S=Wr(l),A=UB(n),E=y.useRef(!1),[C,T]=y.useState(0);return y.useEffect(()=>{const M=h.current;if(M)return M.addEventListener(uS,S),()=>M.removeEventListener(uS,S)},[S]),I.jsx(B0e,{scope:n,orientation:r,dir:g,loop:i,currentTabStopId:m,onItemFocus:y.useCallback(M=>b(M),[b]),onItemShiftTab:y.useCallback(()=>x(!0),[]),onFocusableItemAdd:y.useCallback(()=>T(M=>M+1),[]),onFocusableItemRemove:y.useCallback(()=>T(M=>M-1),[]),children:I.jsx(pt.div,{tabIndex:w||C===0?-1:0,"data-orientation":r,...d,ref:v,style:{outline:"none",...e.style},onMouseDown:Ye(e.onMouseDown,()=>{E.current=!0}),onFocus:Ye(e.onFocus,M=>{const F=!E.current;if(M.target===M.currentTarget&&F&&!w){const U=new CustomEvent(uS,F0e);if(M.currentTarget.dispatchEvent(U),!U.defaultPrevented){const H=A().filter(K=>K.focusable),W=H.find(K=>K.active),ie=H.find(K=>K.id===m),G=[W,ie,...H].filter(Boolean).map(K=>K.ref.current);qB(G,c)}}E.current=!1}),onBlur:Ye(e.onBlur,()=>x(!1))})})}),VB="RovingFocusGroupItem",HB=y.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:o,...a}=e,u=No(),s=o||u,l=z0e(VB,n),c=l.currentTabStopId===s,d=UB(n),{onFocusableItemAdd:h,onFocusableItemRemove:v}=l;return y.useEffect(()=>{if(r)return h(),()=>v()},[r,h,v]),I.jsx(VC.ItemSlot,{scope:n,id:s,focusable:r,active:i,children:I.jsx(pt.span,{tabIndex:c?0:-1,"data-orientation":l.orientation,...a,ref:t,onMouseDown:Ye(e.onMouseDown,g=>{r?l.onItemFocus(s):g.preventDefault()}),onFocus:Ye(e.onFocus,()=>l.onItemFocus(s)),onKeyDown:Ye(e.onKeyDown,g=>{if(g.key==="Tab"&&g.shiftKey){l.onItemShiftTab();return}if(g.target!==g.currentTarget)return;const m=H0e(g,l.orientation,l.dir);if(m!==void 0){if(g.metaKey||g.ctrlKey||g.altKey||g.shiftKey)return;g.preventDefault();let w=d().filter(x=>x.focusable).map(x=>x.ref.current);if(m==="last")w.reverse();else if(m==="prev"||m==="next"){m==="prev"&&w.reverse();const x=w.indexOf(g.currentTarget);w=l.loop?q0e(w,x+1):w.slice(x+1)}setTimeout(()=>qB(w))}})})})});HB.displayName=VB;var W0e={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function V0e(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function H0e(e,t,n){const r=V0e(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return W0e[r]}function qB(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function q0e(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var KB=WB,GB=HB,HC=["Enter"," "],K0e=["ArrowDown","PageUp","Home"],YB=["ArrowUp","PageDown","End"],G0e=[...K0e,...YB],Y0e={ltr:[...HC,"ArrowRight"],rtl:[...HC,"ArrowLeft"]},Z0e={ltr:["ArrowLeft"],rtl:["ArrowRight"]},gg="Menu",[iv,X0e,Q0e]=RA(gg),[sf,ZB]=mi(gg,[Q0e,Fl,qx]),Kx=Fl(),XB=qx(),[J0e,lf]=sf(gg),[eve,mg]=sf(gg),QB=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:o,modal:a=!0}=e,u=Kx(t),[s,l]=y.useState(null),c=y.useRef(!1),d=Wr(o),h=hg(i);return y.useEffect(()=>{const v=()=>{c.current=!0,document.addEventListener("pointerdown",g,{capture:!0,once:!0}),document.addEventListener("pointermove",g,{capture:!0,once:!0})},g=()=>c.current=!1;return document.addEventListener("keydown",v,{capture:!0}),()=>{document.removeEventListener("keydown",v,{capture:!0}),document.removeEventListener("pointerdown",g,{capture:!0}),document.removeEventListener("pointermove",g,{capture:!0})}},[]),I.jsx(Ux,{...u,children:I.jsx(J0e,{scope:t,open:n,onOpenChange:d,content:s,onContentChange:l,children:I.jsx(eve,{scope:t,onClose:y.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:c,dir:h,modal:a,children:r})})})};QB.displayName=gg;var tve="MenuAnchor",UA=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=Kx(n);return I.jsx(vg,{...i,...r,ref:t})});UA.displayName=tve;var WA="MenuPortal",[nve,JB]=sf(WA,{forceMount:void 0}),ez=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:i}=e,o=lf(WA,t);return I.jsx(nve,{scope:t,forceMount:n,children:I.jsx(ii,{present:n||o.open,children:I.jsx(cg,{asChild:!0,container:i,children:r})})})};ez.displayName=WA;var fa="MenuContent",[rve,VA]=sf(fa),tz=y.forwardRef((e,t)=>{const n=JB(fa,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,o=lf(fa,e.__scopeMenu),a=mg(fa,e.__scopeMenu);return I.jsx(iv.Provider,{scope:e.__scopeMenu,children:I.jsx(ii,{present:r||o.open,children:I.jsx(iv.Slot,{scope:e.__scopeMenu,children:a.modal?I.jsx(ive,{...i,ref:t}):I.jsx(ove,{...i,ref:t})})})})}),ive=y.forwardRef((e,t)=>{const n=lf(fa,e.__scopeMenu),r=y.useRef(null),i=Kt(t,r);return y.useEffect(()=>{const o=r.current;if(o)return dg(o)},[]),I.jsx(HA,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Ye(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),ove=y.forwardRef((e,t)=>{const n=lf(fa,e.__scopeMenu);return I.jsx(HA,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),HA=y.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:u,onEntryFocus:s,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:h,onDismiss:v,disableOutsideScroll:g,...m}=e,b=lf(fa,n),w=mg(fa,n),x=Kx(n),S=XB(n),A=X0e(n),[E,C]=y.useState(null),T=y.useRef(null),M=Kt(t,T,b.onContentChange),F=y.useRef(0),U=y.useRef(""),H=y.useRef(0),W=y.useRef(null),ie=y.useRef("right"),Z=y.useRef(0),G=g?fg:y.Fragment,K=g?{as:Sl,allowPinchZoom:!0}:void 0,V=q=>{const Y=U.current+q,ue=A().filter(ge=>!ge.disabled),Q=document.activeElement,J=ue.find(ge=>ge.ref.current===Q)?.textValue,se=ue.map(ge=>ge.textValue),de=mve(se,Y,J),Se=ue.find(ge=>ge.textValue===de)?.ref.current;(function ge(Ze){U.current=Ze,window.clearTimeout(F.current),Ze!==""&&(F.current=window.setTimeout(()=>ge(""),1e3))})(Y),Se&&setTimeout(()=>Se.focus())};y.useEffect(()=>()=>window.clearTimeout(F.current),[]),Lx();const B=y.useCallback(q=>ie.current===W.current?.side&&bve(q,W.current?.area),[]);return I.jsx(rve,{scope:n,searchRef:U,onItemEnter:y.useCallback(q=>{B(q)&&q.preventDefault()},[B]),onItemLeave:y.useCallback(q=>{B(q)||(T.current?.focus(),C(null))},[B]),onTriggerLeave:y.useCallback(q=>{B(q)&&q.preventDefault()},[B]),pointerGraceTimerRef:H,onPointerGraceIntentChange:y.useCallback(q=>{W.current=q},[]),children:I.jsx(G,{...K,children:I.jsx(lg,{asChild:!0,trapped:i,onMountAutoFocus:Ye(o,q=>{q.preventDefault(),T.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:a,children:I.jsx(kh,{asChild:!0,disableOutsidePointerEvents:u,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:h,onDismiss:v,children:I.jsx(KB,{asChild:!0,...S,dir:w.dir,orientation:"vertical",loop:r,currentTabStopId:E,onCurrentTabStopIdChange:C,onEntryFocus:Ye(s,q=>{w.isUsingKeyboardRef.current||q.preventDefault()}),preventScrollOnEntryFocus:!0,children:I.jsx(Wx,{role:"menu","aria-orientation":"vertical","data-state":mz(b.open),"data-radix-menu-content":"",dir:w.dir,...x,...m,ref:M,style:{outline:"none",...m.style},onKeyDown:Ye(m.onKeyDown,q=>{const ue=q.target.closest("[data-radix-menu-content]")===q.currentTarget,Q=q.ctrlKey||q.altKey||q.metaKey,J=q.key.length===1;ue&&(q.key==="Tab"&&q.preventDefault(),!Q&&J&&V(q.key));const se=T.current;if(q.target!==se||!G0e.includes(q.key))return;q.preventDefault();const Se=A().filter(ge=>!ge.disabled).map(ge=>ge.ref.current);YB.includes(q.key)&&Se.reverse(),vve(Se)}),onBlur:Ye(e.onBlur,q=>{q.currentTarget.contains(q.target)||(window.clearTimeout(F.current),U.current="")}),onPointerMove:Ye(e.onPointerMove,ov(q=>{const Y=q.target,ue=Z.current!==q.clientX;if(q.currentTarget.contains(Y)&&ue){const Q=q.clientX>Z.current?"right":"left";ie.current=Q,Z.current=q.clientX}}))})})})})})})});tz.displayName=fa;var ave="MenuGroup",qA=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return I.jsx(pt.div,{role:"group",...r,ref:t})});qA.displayName=ave;var uve="MenuLabel",nz=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return I.jsx(pt.div,{...r,ref:t})});nz.displayName=uve;var q1="MenuItem",mR="menu.itemSelect",Gx=y.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...i}=e,o=y.useRef(null),a=mg(q1,e.__scopeMenu),u=VA(q1,e.__scopeMenu),s=Kt(t,o),l=y.useRef(!1),c=()=>{const d=o.current;if(!n&&d){const h=new CustomEvent(mR,{bubbles:!0,cancelable:!0});d.addEventListener(mR,v=>r?.(v),{once:!0}),jj(d,h),h.defaultPrevented?l.current=!1:a.onClose()}};return I.jsx(rz,{...i,ref:s,disabled:n,onClick:Ye(e.onClick,c),onPointerDown:d=>{e.onPointerDown?.(d),l.current=!0},onPointerUp:Ye(e.onPointerUp,d=>{l.current||d.currentTarget?.click()}),onKeyDown:Ye(e.onKeyDown,d=>{const h=u.searchRef.current!=="";n||h&&d.key===" "||HC.includes(d.key)&&(d.currentTarget.click(),d.preventDefault())})})});Gx.displayName=q1;var rz=y.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:i,...o}=e,a=VA(q1,n),u=XB(n),s=y.useRef(null),l=Kt(t,s),[c,d]=y.useState(!1),[h,v]=y.useState("");return y.useEffect(()=>{const g=s.current;g&&v((g.textContent??"").trim())},[o.children]),I.jsx(iv.ItemSlot,{scope:n,disabled:r,textValue:i??h,children:I.jsx(GB,{asChild:!0,...u,focusable:!r,children:I.jsx(pt.div,{role:"menuitem","data-highlighted":c?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...o,ref:l,onPointerMove:Ye(e.onPointerMove,ov(g=>{r?a.onItemLeave(g):(a.onItemEnter(g),g.defaultPrevented||g.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:Ye(e.onPointerLeave,ov(g=>a.onItemLeave(g))),onFocus:Ye(e.onFocus,()=>d(!0)),onBlur:Ye(e.onBlur,()=>d(!1))})})})}),sve="MenuCheckboxItem",iz=y.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...i}=e;return I.jsx(lz,{scope:e.__scopeMenu,checked:n,children:I.jsx(Gx,{role:"menuitemcheckbox","aria-checked":K1(n)?"mixed":n,...i,ref:t,"data-state":GA(n),onSelect:Ye(i.onSelect,()=>r?.(K1(n)?!0:!n),{checkForDefaultPrevented:!1})})})});iz.displayName=sve;var oz="MenuRadioGroup",[lve,cve]=sf(oz,{value:void 0,onValueChange:()=>{}}),az=y.forwardRef((e,t)=>{const{value:n,onValueChange:r,...i}=e,o=Wr(r);return I.jsx(lve,{scope:e.__scopeMenu,value:n,onValueChange:o,children:I.jsx(qA,{...i,ref:t})})});az.displayName=oz;var uz="MenuRadioItem",sz=y.forwardRef((e,t)=>{const{value:n,...r}=e,i=cve(uz,e.__scopeMenu),o=n===i.value;return I.jsx(lz,{scope:e.__scopeMenu,checked:o,children:I.jsx(Gx,{role:"menuitemradio","aria-checked":o,...r,ref:t,"data-state":GA(o),onSelect:Ye(r.onSelect,()=>i.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});sz.displayName=uz;var KA="MenuItemIndicator",[lz,fve]=sf(KA,{checked:!1}),cz=y.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...i}=e,o=fve(KA,n);return I.jsx(ii,{present:r||K1(o.checked)||o.checked===!0,children:I.jsx(pt.span,{...i,ref:t,"data-state":GA(o.checked)})})});cz.displayName=KA;var dve="MenuSeparator",fz=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return I.jsx(pt.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});fz.displayName=dve;var hve="MenuArrow",dz=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=Kx(n);return I.jsx(Vx,{...i,...r,ref:t})});dz.displayName=hve;var pve="MenuSub",[dGe,hz]=sf(pve),Zp="MenuSubTrigger",pz=y.forwardRef((e,t)=>{const n=lf(Zp,e.__scopeMenu),r=mg(Zp,e.__scopeMenu),i=hz(Zp,e.__scopeMenu),o=VA(Zp,e.__scopeMenu),a=y.useRef(null),{pointerGraceTimerRef:u,onPointerGraceIntentChange:s}=o,l={__scopeMenu:e.__scopeMenu},c=y.useCallback(()=>{a.current&&window.clearTimeout(a.current),a.current=null},[]);return y.useEffect(()=>c,[c]),y.useEffect(()=>{const d=u.current;return()=>{window.clearTimeout(d),s(null)}},[u,s]),I.jsx(UA,{asChild:!0,...l,children:I.jsx(rz,{id:i.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":i.contentId,"data-state":mz(n.open),...e,ref:Ex(t,i.onTriggerChange),onClick:d=>{e.onClick?.(d),!(e.disabled||d.defaultPrevented)&&(d.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:Ye(e.onPointerMove,ov(d=>{o.onItemEnter(d),!d.defaultPrevented&&!e.disabled&&!n.open&&!a.current&&(o.onPointerGraceIntentChange(null),a.current=window.setTimeout(()=>{n.onOpenChange(!0),c()},100))})),onPointerLeave:Ye(e.onPointerLeave,ov(d=>{c();const h=n.content?.getBoundingClientRect();if(h){const v=n.content?.dataset.side,g=v==="right",m=g?-5:5,b=h[g?"left":"right"],w=h[g?"right":"left"];o.onPointerGraceIntentChange({area:[{x:d.clientX+m,y:d.clientY},{x:b,y:h.top},{x:w,y:h.top},{x:w,y:h.bottom},{x:b,y:h.bottom}],side:v}),window.clearTimeout(u.current),u.current=window.setTimeout(()=>o.onPointerGraceIntentChange(null),300)}else{if(o.onTriggerLeave(d),d.defaultPrevented)return;o.onPointerGraceIntentChange(null)}})),onKeyDown:Ye(e.onKeyDown,d=>{const h=o.searchRef.current!=="";e.disabled||h&&d.key===" "||Y0e[r.dir].includes(d.key)&&(n.onOpenChange(!0),n.content?.focus(),d.preventDefault())})})})});pz.displayName=Zp;var vz="MenuSubContent",gz=y.forwardRef((e,t)=>{const n=JB(fa,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,o=lf(fa,e.__scopeMenu),a=mg(fa,e.__scopeMenu),u=hz(vz,e.__scopeMenu),s=y.useRef(null),l=Kt(t,s);return I.jsx(iv.Provider,{scope:e.__scopeMenu,children:I.jsx(ii,{present:r||o.open,children:I.jsx(iv.Slot,{scope:e.__scopeMenu,children:I.jsx(HA,{id:u.contentId,"aria-labelledby":u.triggerId,...i,ref:l,align:"start",side:a.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:c=>{a.isUsingKeyboardRef.current&&s.current?.focus(),c.preventDefault()},onCloseAutoFocus:c=>c.preventDefault(),onFocusOutside:Ye(e.onFocusOutside,c=>{c.target!==u.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:Ye(e.onEscapeKeyDown,c=>{a.onClose(),c.preventDefault()}),onKeyDown:Ye(e.onKeyDown,c=>{const d=c.currentTarget.contains(c.target),h=Z0e[a.dir].includes(c.key);d&&h&&(o.onOpenChange(!1),u.trigger?.focus(),c.preventDefault())})})})})})});gz.displayName=vz;function mz(e){return e?"open":"closed"}function K1(e){return e==="indeterminate"}function GA(e){return K1(e)?"indeterminate":e?"checked":"unchecked"}function vve(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function gve(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function mve(e,t,n){const i=t.length>1&&Array.from(t).every(l=>l===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let a=gve(e,Math.max(o,0));i.length===1&&(a=a.filter(l=>l!==n));const s=a.find(l=>l.toLowerCase().startsWith(i.toLowerCase()));return s!==n?s:void 0}function yve(e,t){const{x:n,y:r}=e;let i=!1;for(let o=0,a=t.length-1;or!=c>r&&n<(l-u)*(r-s)/(c-s)+u&&(i=!i)}return i}function bve(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return yve(n,t)}function ov(e){return t=>t.pointerType==="mouse"?e(t):void 0}var xve=QB,wve=UA,_ve=ez,Sve=tz,Cve=qA,Eve=nz,Ave=Gx,Pve=iz,Ove=az,kve=sz,Tve=cz,Mve=fz,Rve=dz,Dve=pz,$ve=gz,YA="DropdownMenu",[Ive,hGe]=mi(YA,[ZB]),Gi=ZB(),[Nve,yz]=Ive(YA),bz=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:o,onOpenChange:a,modal:u=!0}=e,s=Gi(t),l=y.useRef(null),[c=!1,d]=Ga({prop:i,defaultProp:o,onChange:a});return I.jsx(Nve,{scope:t,triggerId:No(),triggerRef:l,contentId:No(),open:c,onOpenChange:d,onOpenToggle:y.useCallback(()=>d(h=>!h),[d]),modal:u,children:I.jsx(xve,{...s,open:c,onOpenChange:d,dir:r,modal:u,children:n})})};bz.displayName=YA;var xz="DropdownMenuTrigger",wz=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,o=yz(xz,n),a=Gi(n);return I.jsx(wve,{asChild:!0,...a,children:I.jsx(pt.button,{type:"button",id:o.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":o.open?o.contentId:void 0,"data-state":o.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...i,ref:Ex(t,o.triggerRef),onPointerDown:Ye(e.onPointerDown,u=>{!r&&u.button===0&&u.ctrlKey===!1&&(o.onOpenToggle(),o.open||u.preventDefault())}),onKeyDown:Ye(e.onKeyDown,u=>{r||(["Enter"," "].includes(u.key)&&o.onOpenToggle(),u.key==="ArrowDown"&&o.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(u.key)&&u.preventDefault())})})})});wz.displayName=xz;var Fve="DropdownMenuPortal",_z=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Gi(t);return I.jsx(_ve,{...r,...n})};_z.displayName=Fve;var Sz="DropdownMenuContent",Cz=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=yz(Sz,n),o=Gi(n),a=y.useRef(!1);return I.jsx(Sve,{id:i.contentId,"aria-labelledby":i.triggerId,...o,...r,ref:t,onCloseAutoFocus:Ye(e.onCloseAutoFocus,u=>{a.current||i.triggerRef.current?.focus(),a.current=!1,u.preventDefault()}),onInteractOutside:Ye(e.onInteractOutside,u=>{const s=u.detail.originalEvent,l=s.button===0&&s.ctrlKey===!0,c=s.button===2||l;(!i.modal||c)&&(a.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Cz.displayName=Sz;var Lve="DropdownMenuGroup",Ez=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Gi(n);return I.jsx(Cve,{...i,...r,ref:t})});Ez.displayName=Lve;var jve="DropdownMenuLabel",Az=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Gi(n);return I.jsx(Eve,{...i,...r,ref:t})});Az.displayName=jve;var Bve="DropdownMenuItem",Pz=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Gi(n);return I.jsx(Ave,{...i,...r,ref:t})});Pz.displayName=Bve;var zve="DropdownMenuCheckboxItem",Oz=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Gi(n);return I.jsx(Pve,{...i,...r,ref:t})});Oz.displayName=zve;var Uve="DropdownMenuRadioGroup",Wve=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Gi(n);return I.jsx(Ove,{...i,...r,ref:t})});Wve.displayName=Uve;var Vve="DropdownMenuRadioItem",kz=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Gi(n);return I.jsx(kve,{...i,...r,ref:t})});kz.displayName=Vve;var Hve="DropdownMenuItemIndicator",Tz=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Gi(n);return I.jsx(Tve,{...i,...r,ref:t})});Tz.displayName=Hve;var qve="DropdownMenuSeparator",Mz=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Gi(n);return I.jsx(Mve,{...i,...r,ref:t})});Mz.displayName=qve;var Kve="DropdownMenuArrow",Gve=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Gi(n);return I.jsx(Rve,{...i,...r,ref:t})});Gve.displayName=Kve;var Yve="DropdownMenuSubTrigger",Rz=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Gi(n);return I.jsx(Dve,{...i,...r,ref:t})});Rz.displayName=Yve;var Zve="DropdownMenuSubContent",Dz=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Gi(n);return I.jsx($ve,{...i,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Dz.displayName=Zve;var pGe=bz,vGe=wz,gGe=_z,mGe=Cz,yGe=Ez,bGe=Az,xGe=Pz,wGe=Oz,_Ge=kz,SGe=Tz,CGe=Mz,EGe=Rz,AGe=Dz,Xve="VisuallyHidden",ZA=y.forwardRef((e,t)=>I.jsx(pt.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));ZA.displayName=Xve;var Qve=ZA,[Yx,PGe]=mi("Tooltip",[Fl]),Zx=Fl(),$z="TooltipProvider",Jve=700,qC="tooltip.open",[ege,XA]=Yx($z),Iz=e=>{const{__scopeTooltip:t,delayDuration:n=Jve,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:o}=e,[a,u]=y.useState(!0),s=y.useRef(!1),l=y.useRef(0);return y.useEffect(()=>{const c=l.current;return()=>window.clearTimeout(c)},[]),I.jsx(ege,{scope:t,isOpenDelayed:a,delayDuration:n,onOpen:y.useCallback(()=>{window.clearTimeout(l.current),u(!1)},[]),onClose:y.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>u(!0),r)},[r]),isPointerInTransitRef:s,onPointerInTransitChange:y.useCallback(c=>{s.current=c},[]),disableHoverableContent:i,children:o})};Iz.displayName=$z;var Xx="Tooltip",[tge,Qx]=Yx(Xx),Nz=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:i=!1,onOpenChange:o,disableHoverableContent:a,delayDuration:u}=e,s=XA(Xx,e.__scopeTooltip),l=Zx(t),[c,d]=y.useState(null),h=No(),v=y.useRef(0),g=a??s.disableHoverableContent,m=u??s.delayDuration,b=y.useRef(!1),[w=!1,x]=Ga({prop:r,defaultProp:i,onChange:T=>{T?(s.onOpen(),document.dispatchEvent(new CustomEvent(qC))):s.onClose(),o?.(T)}}),S=y.useMemo(()=>w?b.current?"delayed-open":"instant-open":"closed",[w]),A=y.useCallback(()=>{window.clearTimeout(v.current),v.current=0,b.current=!1,x(!0)},[x]),E=y.useCallback(()=>{window.clearTimeout(v.current),v.current=0,x(!1)},[x]),C=y.useCallback(()=>{window.clearTimeout(v.current),v.current=window.setTimeout(()=>{b.current=!0,x(!0),v.current=0},m)},[m,x]);return y.useEffect(()=>()=>{v.current&&(window.clearTimeout(v.current),v.current=0)},[]),I.jsx(Ux,{...l,children:I.jsx(tge,{scope:t,contentId:h,open:w,stateAttribute:S,trigger:c,onTriggerChange:d,onTriggerEnter:y.useCallback(()=>{s.isOpenDelayed?C():A()},[s.isOpenDelayed,C,A]),onTriggerLeave:y.useCallback(()=>{g?E():(window.clearTimeout(v.current),v.current=0)},[E,g]),onOpen:A,onClose:E,disableHoverableContent:g,children:n})})};Nz.displayName=Xx;var KC="TooltipTrigger",Fz=y.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=Qx(KC,n),o=XA(KC,n),a=Zx(n),u=y.useRef(null),s=Kt(t,u,i.onTriggerChange),l=y.useRef(!1),c=y.useRef(!1),d=y.useCallback(()=>l.current=!1,[]);return y.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),I.jsx(vg,{asChild:!0,...a,children:I.jsx(pt.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:s,onPointerMove:Ye(e.onPointerMove,h=>{h.pointerType!=="touch"&&!c.current&&!o.isPointerInTransitRef.current&&(i.onTriggerEnter(),c.current=!0)}),onPointerLeave:Ye(e.onPointerLeave,()=>{i.onTriggerLeave(),c.current=!1}),onPointerDown:Ye(e.onPointerDown,()=>{l.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:Ye(e.onFocus,()=>{l.current||i.onOpen()}),onBlur:Ye(e.onBlur,i.onClose),onClick:Ye(e.onClick,i.onClose)})})});Fz.displayName=KC;var nge="TooltipPortal",[OGe,rge]=Yx(nge,{forceMount:void 0}),Vd="TooltipContent",Lz=y.forwardRef((e,t)=>{const n=rge(Vd,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i="top",...o}=e,a=Qx(Vd,e.__scopeTooltip);return I.jsx(ii,{present:r||a.open,children:a.disableHoverableContent?I.jsx(jz,{side:i,...o,ref:t}):I.jsx(ige,{side:i,...o,ref:t})})}),ige=y.forwardRef((e,t)=>{const n=Qx(Vd,e.__scopeTooltip),r=XA(Vd,e.__scopeTooltip),i=y.useRef(null),o=Kt(t,i),[a,u]=y.useState(null),{trigger:s,onClose:l}=n,c=i.current,{onPointerInTransitChange:d}=r,h=y.useCallback(()=>{u(null),d(!1)},[d]),v=y.useCallback((g,m)=>{const b=g.currentTarget,w={x:g.clientX,y:g.clientY},x=sge(w,b.getBoundingClientRect()),S=lge(w,x),A=cge(m.getBoundingClientRect()),E=dge([...S,...A]);u(E),d(!0)},[d]);return y.useEffect(()=>()=>h(),[h]),y.useEffect(()=>{if(s&&c){const g=b=>v(b,c),m=b=>v(b,s);return s.addEventListener("pointerleave",g),c.addEventListener("pointerleave",m),()=>{s.removeEventListener("pointerleave",g),c.removeEventListener("pointerleave",m)}}},[s,c,v,h]),y.useEffect(()=>{if(a){const g=m=>{const b=m.target,w={x:m.clientX,y:m.clientY},x=s?.contains(b)||c?.contains(b),S=!fge(w,a);x?h():S&&(h(),l())};return document.addEventListener("pointermove",g),()=>document.removeEventListener("pointermove",g)}},[s,c,a,l,h]),I.jsx(jz,{...e,ref:o})}),[oge,age]=Yx(Xx,{isInside:!1}),jz=y.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:o,onPointerDownOutside:a,...u}=e,s=Qx(Vd,n),l=Zx(n),{onClose:c}=s;return y.useEffect(()=>(document.addEventListener(qC,c),()=>document.removeEventListener(qC,c)),[c]),y.useEffect(()=>{if(s.trigger){const d=h=>{h.target?.contains(s.trigger)&&c()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[s.trigger,c]),I.jsx(kh,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:d=>d.preventDefault(),onDismiss:c,children:I.jsxs(Wx,{"data-state":s.stateAttribute,...l,...u,ref:t,style:{...u.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[I.jsx(nA,{children:r}),I.jsx(oge,{scope:n,isInside:!0,children:I.jsx(Qve,{id:s.contentId,role:"tooltip",children:i||r})})]})})});Lz.displayName=Vd;var Bz="TooltipArrow",uge=y.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=Zx(n);return age(Bz,n).isInside?null:I.jsx(Vx,{...i,...r,ref:t})});uge.displayName=Bz;function sge(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(n,r,i,o)){case o:return"left";case i:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function lge(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function cge(e){const{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function fge(e,t){const{x:n,y:r}=e;let i=!1;for(let o=0,a=t.length-1;or!=c>r&&n<(l-u)*(r-s)/(c-s)+u&&(i=!i)}return i}function dge(e){const t=e.slice();return t.sort((n,r)=>n.xr.x?1:n.yr.y?1:0),hge(t)}function hge(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r=2;){const o=t[t.length-1],a=t[t.length-2];if((o.x-a.x)*(i.y-a.y)>=(o.y-a.y)*(i.x-a.x))t.pop();else break}t.push(i)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const i=e[r];for(;n.length>=2;){const o=n[n.length-1],a=n[n.length-2];if((o.x-a.x)*(i.y-a.y)>=(o.y-a.y)*(i.x-a.x))n.pop();else break}n.push(i)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var kGe=Iz,TGe=Nz,MGe=Fz,RGe=Lz,yR=1,pge=.9,vge=.8,gge=.17,sS=.1,lS=.999,mge=.9999,yge=.99,bge=/[\\\/_+.#"@\[\(\{&]/,xge=/[\\\/_+.#"@\[\(\{&]/g,wge=/[\s-]/,zz=/[\s-]/g;function GC(e,t,n,r,i,o,a){if(o===t.length)return i===e.length?yR:yge;var u=`${i},${o}`;if(a[u]!==void 0)return a[u];for(var s=r.charAt(o),l=n.indexOf(s,i),c=0,d,h,v,g;l>=0;)d=GC(e,t,n,r,l+1,o+1,a),d>c&&(l===i?d*=yR:bge.test(e.charAt(l-1))?(d*=vge,v=e.slice(i,l-1).match(xge),v&&i>0&&(d*=Math.pow(lS,v.length))):wge.test(e.charAt(l-1))?(d*=pge,g=e.slice(i,l-1).match(zz),g&&i>0&&(d*=Math.pow(lS,g.length))):(d*=gge,i>0&&(d*=Math.pow(lS,l-i))),e.charAt(l)!==t.charAt(o)&&(d*=mge)),(dd&&(d=h*sS)),d>c&&(c=d),l=n.indexOf(s,l+1);return a[u]=c,c}function bR(e){return e.toLowerCase().replace(zz," ")}function _ge(e,t){return GC(e,t,bR(e),bR(t),0,0,{})}function fr(){return fr=Object.assign?Object.assign.bind():function(e){for(var t=1;te.forEach(n=>Sge(n,t))}function yg(...e){return y.useCallback(Uz(...e),e)}function Cge(e,t=[]){let n=[];function r(o,a){const u=y.createContext(a),s=n.length;n=[...n,a];function l(d){const{scope:h,children:v,...g}=d,m=h?.[e][s]||u,b=y.useMemo(()=>g,Object.values(g));return y.createElement(m.Provider,{value:b},v)}function c(d,h){const v=h?.[e][s]||u,g=y.useContext(v);if(g)return g;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${o}\``)}return l.displayName=o+"Provider",[l,c]}const i=()=>{const o=n.map(a=>y.createContext(a));return function(u){const s=u?.[e]||o;return y.useMemo(()=>({[`__scope${e}`]:{...u,[e]:s}}),[u,s])}};return i.scopeName=e,[r,Ege(i,...t)]}function Ege(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const a=r.reduce((u,{useScope:s,scopeName:l})=>{const d=s(o)[`__scope${l}`];return{...u,...d}},{});return y.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}const Age=globalThis?.document?y.useLayoutEffect:()=>{},Pge=i4.useId||(()=>{});let Oge=0;function cS(e){const[t,n]=y.useState(Pge());return Age(()=>{e||n(r=>r??String(Oge++))},[e]),e||(t?`radix-${t}`:"")}function Wz(e){const t=y.useRef(e);return y.useEffect(()=>{t.current=e}),y.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function kge({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=Tge({defaultProp:t,onChange:n}),o=e!==void 0,a=o?e:r,u=Wz(n),s=y.useCallback(l=>{if(o){const d=typeof l=="function"?l(e):l;d!==e&&u(d)}else i(l)},[o,e,i,u]);return[a,s]}function Tge({defaultProp:e,onChange:t}){const n=y.useState(e),[r]=n,i=y.useRef(r),o=Wz(t);return y.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}const QA=y.forwardRef((e,t)=>{const{children:n,...r}=e,i=y.Children.toArray(n),o=i.find(Rge);if(o){const a=o.props.children,u=i.map(s=>s===o?y.Children.count(a)>1?y.Children.only(null):y.isValidElement(a)?a.props.children:null:s);return y.createElement(YC,fr({},r,{ref:t}),y.isValidElement(a)?y.cloneElement(a,void 0,u):null)}return y.createElement(YC,fr({},r,{ref:t}),n)});QA.displayName="Slot";const YC=y.forwardRef((e,t)=>{const{children:n,...r}=e;return y.isValidElement(n)?y.cloneElement(n,{...Dge(r,n.props),ref:Uz(t,n.ref)}):y.Children.count(n)>1?y.Children.only(null):null});YC.displayName="SlotClone";const Mge=({children:e})=>y.createElement(y.Fragment,null,e);function Rge(e){return y.isValidElement(e)&&e.type===Mge}function Dge(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?n[r]=(...u)=>{o?.(...u),i?.(...u)}:r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}const $ge=["a","button","div","h2","h3","img","li","nav","ol","p","span","svg","ul"],Jx=$ge.reduce((e,t)=>{const n=y.forwardRef((r,i)=>{const{asChild:o,...a}=r,u=o?QA:t;return y.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),y.createElement(u,fr({},a,{ref:i}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Ige(e,t){e&&Ss.flushSync(()=>e.dispatchEvent(t))}function JA(e){const t=y.useRef(e);return y.useEffect(()=>{t.current=e}),y.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function Nge(e){const t=JA(e);y.useEffect(()=>{const n=r=>{r.key==="Escape"&&t(r)};return document.addEventListener("keydown",n),()=>document.removeEventListener("keydown",n)},[t])}const ZC="dismissableLayer.update",Fge="dismissableLayer.pointerDownOutside",Lge="dismissableLayer.focusOutside";let xR;const jge=y.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Bge=y.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:a,onDismiss:u,...s}=e,l=y.useContext(jge),[c,d]=y.useState(null),[,h]=y.useState({}),v=yg(t,C=>d(C)),g=Array.from(l.layers),[m]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),b=g.indexOf(m),w=c?g.indexOf(c):-1,x=l.layersWithOutsidePointerEventsDisabled.size>0,S=w>=b,A=zge(C=>{const T=C.target,M=[...l.branches].some(F=>F.contains(T));!S||M||(i?.(C),a?.(C),C.defaultPrevented||u?.())}),E=Uge(C=>{const T=C.target;[...l.branches].some(F=>F.contains(T))||(o?.(C),a?.(C),C.defaultPrevented||u?.())});return Nge(C=>{w===l.layers.size-1&&(r?.(C),!C.defaultPrevented&&u&&(C.preventDefault(),u()))}),y.useEffect(()=>{if(c)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(xR=document.body.style.pointerEvents,document.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(c)),l.layers.add(c),wR(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(document.body.style.pointerEvents=xR)}},[c,n,l]),y.useEffect(()=>()=>{c&&(l.layers.delete(c),l.layersWithOutsidePointerEventsDisabled.delete(c),wR())},[c,l]),y.useEffect(()=>{const C=()=>h({});return document.addEventListener(ZC,C),()=>document.removeEventListener(ZC,C)},[]),y.createElement(Jx.div,fr({},s,{ref:v,style:{pointerEvents:x?S?"auto":"none":void 0,...e.style},onFocusCapture:Sd(e.onFocusCapture,E.onFocusCapture),onBlurCapture:Sd(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:Sd(e.onPointerDownCapture,A.onPointerDownCapture)}))});function zge(e){const t=JA(e),n=y.useRef(!1),r=y.useRef(()=>{});return y.useEffect(()=>{const i=a=>{if(a.target&&!n.current){let s=function(){Vz(Fge,t,u,{discrete:!0})};const u={originalEvent:a};a.pointerType==="touch"?(document.removeEventListener("click",r.current),r.current=s,document.addEventListener("click",r.current,{once:!0})):s()}n.current=!1},o=window.setTimeout(()=>{document.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(o),document.removeEventListener("pointerdown",i),document.removeEventListener("click",r.current)}},[t]),{onPointerDownCapture:()=>n.current=!0}}function Uge(e){const t=JA(e),n=y.useRef(!1);return y.useEffect(()=>{const r=i=>{i.target&&!n.current&&Vz(Lge,t,{originalEvent:i},{discrete:!1})};return document.addEventListener("focusin",r),()=>document.removeEventListener("focusin",r)},[t]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function wR(){const e=new CustomEvent(ZC);document.dispatchEvent(e)}function Vz(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?Ige(i,o):i.dispatchEvent(o)}function _R(e){const t=y.useRef(e);return y.useEffect(()=>{t.current=e}),y.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}const fS="focusScope.autoFocusOnMount",dS="focusScope.autoFocusOnUnmount",SR={bubbles:!1,cancelable:!0},Wge=y.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...a}=e,[u,s]=y.useState(null),l=_R(i),c=_R(o),d=y.useRef(null),h=yg(t,m=>s(m)),v=y.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;y.useEffect(()=>{if(r){let m=function(w){if(v.paused||!u)return;const x=w.target;u.contains(x)?d.current=x:ac(d.current,{select:!0})},b=function(w){v.paused||!u||u.contains(w.relatedTarget)||ac(d.current,{select:!0})};return document.addEventListener("focusin",m),document.addEventListener("focusout",b),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",b)}}},[r,u,v.paused]),y.useEffect(()=>{if(u){ER.add(v);const m=document.activeElement;if(!u.contains(m)){const w=new CustomEvent(fS,SR);u.addEventListener(fS,l),u.dispatchEvent(w),w.defaultPrevented||(Vge(Yge(Hz(u)),{select:!0}),document.activeElement===m&&ac(u))}return()=>{u.removeEventListener(fS,l),setTimeout(()=>{const w=new CustomEvent(dS,SR);u.addEventListener(dS,c),u.dispatchEvent(w),w.defaultPrevented||ac(m??document.body,{select:!0}),u.removeEventListener(dS,c),ER.remove(v)},0)}}},[u,l,c,v]);const g=y.useCallback(m=>{if(!n&&!r||v.paused)return;const b=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,w=document.activeElement;if(b&&w){const x=m.currentTarget,[S,A]=Hge(x);S&&A?!m.shiftKey&&w===A?(m.preventDefault(),n&&ac(S,{select:!0})):m.shiftKey&&w===S&&(m.preventDefault(),n&&ac(A,{select:!0})):w===x&&m.preventDefault()}},[n,r,v.paused]);return y.createElement(Jx.div,fr({tabIndex:-1},a,{ref:h,onKeyDown:g}))});function Vge(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(ac(r,{select:t}),document.activeElement!==n)return}function Hge(e){const t=Hz(e),n=CR(t,e),r=CR(t.reverse(),e);return[n,r]}function Hz(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function CR(e,t){for(const n of e)if(!qge(n,{upTo:t}))return n}function qge(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Kge(e){return e instanceof HTMLInputElement&&"select"in e}function ac(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Kge(e)&&t&&e.select()}}const ER=Gge();function Gge(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=AR(e,t),e.unshift(t)},remove(t){var n;e=AR(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function AR(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Yge(e){return e.filter(t=>t.tagName!=="A")}const Zge=y.forwardRef((e,t)=>{var n;const{container:r=globalThis==null||(n=globalThis.document)===null||n===void 0?void 0:n.body,...i}=e;return r?_x.createPortal(y.createElement(Jx.div,fr({},i,{ref:t})),r):null}),PR=globalThis?.document?y.useLayoutEffect:()=>{};function Xge(e,t){return y.useReducer((n,r)=>{const i=t[n][r];return i??n},e)}const ew=e=>{const{present:t,children:n}=e,r=Qge(t),i=typeof n=="function"?n({present:r.isPresent}):y.Children.only(n),o=yg(r.ref,i.ref);return typeof n=="function"||r.isPresent?y.cloneElement(i,{ref:o}):null};ew.displayName="Presence";function Qge(e){const[t,n]=y.useState(),r=y.useRef({}),i=y.useRef(e),o=y.useRef("none"),a=e?"mounted":"unmounted",[u,s]=Xge(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return y.useEffect(()=>{const l=Zm(r.current);o.current=u==="mounted"?l:"none"},[u]),PR(()=>{const l=r.current,c=i.current;if(c!==e){const h=o.current,v=Zm(l);e?s("MOUNT"):v==="none"||l?.display==="none"?s("UNMOUNT"):s(c&&h!==v?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,s]),PR(()=>{if(t){const l=d=>{const v=Zm(r.current).includes(d.animationName);d.target===t&&v&&Ss.flushSync(()=>s("ANIMATION_END"))},c=d=>{d.target===t&&(o.current=Zm(r.current))};return t.addEventListener("animationstart",c),t.addEventListener("animationcancel",l),t.addEventListener("animationend",l),()=>{t.removeEventListener("animationstart",c),t.removeEventListener("animationcancel",l),t.removeEventListener("animationend",l)}}else s("ANIMATION_END")},[t,s]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:y.useCallback(l=>{l&&(r.current=getComputedStyle(l)),n(l)},[])}}function Zm(e){return e?.animationName||"none"}let hS=0;function Jge(){y.useEffect(()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=n[0])!==null&&e!==void 0?e:OR()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:OR()),hS++,()=>{hS===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),hS--}},[])}function OR(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var zy="right-scroll-bar-position",Uy="width-before-scroll-bar",eme="with-scroll-bars-hidden",tme="--removed-body-scroll-bar-size";function pS(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function nme(e,t){var n=y.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}var rme=typeof window<"u"?y.useLayoutEffect:y.useEffect,kR=new WeakMap;function ime(e,t){var n=nme(null,function(r){return e.forEach(function(i){return pS(i,r)})});return rme(function(){var r=kR.get(n);if(r){var i=new Set(r),o=new Set(e),a=n.current;i.forEach(function(u){o.has(u)||pS(u,null)}),o.forEach(function(u){i.has(u)||pS(u,a)})}kR.set(n,e)},[e]),n}var qz=Kj(),vS=function(){},tw=y.forwardRef(function(e,t){var n=y.useRef(null),r=y.useState({onScrollCapture:vS,onWheelCapture:vS,onTouchMoveCapture:vS}),i=r[0],o=r[1],a=e.forwardProps,u=e.children,s=e.className,l=e.removeScrollBar,c=e.enabled,d=e.shards,h=e.sideCar,v=e.noIsolation,g=e.inert,m=e.allowPinchZoom,b=e.as,w=b===void 0?"div":b,x=_A(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),S=h,A=ime([n,t]),E=Ri(Ri({},x),i);return y.createElement(y.Fragment,null,c&&y.createElement(S,{sideCar:qz,removeScrollBar:l,shards:d,noIsolation:v,inert:g,setCallbacks:o,allowPinchZoom:!!m,lockRef:n}),a?y.cloneElement(y.Children.only(u),Ri(Ri({},E),{ref:A})):y.createElement(w,Ri({},E,{className:s,ref:A}),u))});tw.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};tw.classNames={fullWidth:Uy,zeroRight:zy};var ome={left:0,top:0,right:0,gap:0},gS=function(e){return parseInt(e||"",10)||0},ame=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[gS(n),gS(r),gS(i)]},ume=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return ome;var t=ame(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},sme=SA(),Cd="data-scroll-locked",lme=function(e,t,n,r){var i=e.left,o=e.top,a=e.right,u=e.gap;return n===void 0&&(n="margin"),` + .`.concat(eme,` { overflow: hidden `).concat(r,`; padding-right: `).concat(u,"px ").concat(r,`; } - body[`).concat(Qf,`] { + body[`).concat(Cd,`] { overflow: hidden `).concat(r,`; overscroll-behavior: contain; `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&` @@ -146,189 +146,214 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do `),n==="padding"&&"padding-right: ".concat(u,"px ").concat(r,";")].filter(Boolean).join(""),` } - .`).concat(_y,` { + .`).concat(zy,` { right: `).concat(u,"px ").concat(r,`; } - .`).concat(Sy,` { + .`).concat(Uy,` { margin-right: `).concat(u,"px ").concat(r,`; } - .`).concat(_y," .").concat(_y,` { + .`).concat(zy," .").concat(zy,` { right: 0 `).concat(r,`; } - .`).concat(Sy," .").concat(Sy,` { + .`).concat(Uy," .").concat(Uy,` { margin-right: 0 `).concat(r,`; } - body[`).concat(Qf,`] { - `).concat(Rge,": ").concat(u,`px; + body[`).concat(Cd,`] { + `).concat(tme,": ").concat(u,`px; } -`)},wR=function(){var e=parseInt(document.body.getAttribute(Qf)||"0",10);return isFinite(e)?e:0},zge=function(){b.useEffect(function(){return document.body.setAttribute(Qf,(wR()+1).toString()),function(){var e=wR()-1;e<=0?document.body.removeAttribute(Qf):document.body.setAttribute(Qf,e.toString())}},[])},Uge=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r;zge();var o=b.useMemo(function(){return Lge(i)},[i]);return b.createElement(jge,{styles:Bge(o,!t,i,n?"":"!important")})},L3=!1;if(typeof window<"u")try{var Tv=Object.defineProperty({},"passive",{get:function(){return L3=!0,!0}});window.addEventListener("test",Tv,Tv),window.removeEventListener("test",Tv,Tv)}catch{L3=!1}var hf=L3?{passive:!1}:!1,Wge=function(e){var t=window.getComputedStyle(e);return t.overflowY!=="hidden"&&!(t.overflowY===t.overflowX&&t.overflowY==="visible")},Vge=function(e){var t=window.getComputedStyle(e);return t.overflowX!=="hidden"&&!(t.overflowY===t.overflowX&&t.overflowX==="visible")},xR=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=Iz(e,n);if(r){var i=Nz(e,n),o=i[1],a=i[2];if(o>a)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},Hge=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},qge=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Iz=function(e,t){return e==="v"?Wge(t):Vge(t)},Nz=function(e,t){return e==="v"?Hge(t):qge(t)},Gge=function(e,t){return e==="h"&&t==="rtl"?-1:1},Kge=function(e,t,n,r,i){var o=Gge(e,window.getComputedStyle(t).direction),a=o*r,u=n.target,s=t.contains(u),l=!1,c=a>0,d=0,h=0;do{var m=Nz(e,u),g=m[0],v=m[1],y=m[2],x=v-y-o*g;(g||x)&&Iz(e,u)&&(d+=x,h+=g),u=u.parentNode}while(!s&&u!==document.body||s&&(t.contains(u)||t===u));return(c&&(d===0||!i)||!c&&(h===0||!i))&&(l=!0),l},Mv=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},_R=function(e){return[e.deltaX,e.deltaY]},SR=function(e){return e&&"current"in e?e.current:e},Yge=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Zge=function(e){return` +`)},TR=function(){var e=parseInt(document.body.getAttribute(Cd)||"0",10);return isFinite(e)?e:0},cme=function(){y.useEffect(function(){return document.body.setAttribute(Cd,(TR()+1).toString()),function(){var e=TR()-1;e<=0?document.body.removeAttribute(Cd):document.body.setAttribute(Cd,e.toString())}},[])},fme=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r;cme();var o=y.useMemo(function(){return ume(i)},[i]);return y.createElement(sme,{styles:lme(o,!t,i,n?"":"!important")})},XC=!1;if(typeof window<"u")try{var Xm=Object.defineProperty({},"passive",{get:function(){return XC=!0,!0}});window.addEventListener("test",Xm,Xm),window.removeEventListener("test",Xm,Xm)}catch{XC=!1}var jf=XC?{passive:!1}:!1,dme=function(e){var t=window.getComputedStyle(e);return t.overflowY!=="hidden"&&!(t.overflowY===t.overflowX&&t.overflowY==="visible")},hme=function(e){var t=window.getComputedStyle(e);return t.overflowX!=="hidden"&&!(t.overflowY===t.overflowX&&t.overflowX==="visible")},MR=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=Kz(e,n);if(r){var i=Gz(e,n),o=i[1],a=i[2];if(o>a)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},pme=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},vme=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Kz=function(e,t){return e==="v"?dme(t):hme(t)},Gz=function(e,t){return e==="v"?pme(t):vme(t)},gme=function(e,t){return e==="h"&&t==="rtl"?-1:1},mme=function(e,t,n,r,i){var o=gme(e,window.getComputedStyle(t).direction),a=o*r,u=n.target,s=t.contains(u),l=!1,c=a>0,d=0,h=0;do{var v=Gz(e,u),g=v[0],m=v[1],b=v[2],w=m-b-o*g;(g||w)&&Kz(e,u)&&(d+=w,h+=g),u=u.parentNode}while(!s&&u!==document.body||s&&(t.contains(u)||t===u));return(c&&(d===0||!i)||!c&&(h===0||!i))&&(l=!0),l},Qm=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},RR=function(e){return[e.deltaX,e.deltaY]},DR=function(e){return e&&"current"in e?e.current:e},yme=function(e,t){return e[0]===t[0]&&e[1]===t[1]},bme=function(e){return` .block-interactivity-`.concat(e,` {pointer-events: none;} .allow-interactivity-`).concat(e,` {pointer-events: all;} -`)},Xge=0,pf=[];function Qge(e){var t=b.useRef([]),n=b.useRef([0,0]),r=b.useRef(),i=b.useState(Xge++)[0],o=b.useState(function(){return lO()})[0],a=b.useRef(e);b.useEffect(function(){a.current=e},[e]),b.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var v=$j([e.lockRef.current],(e.shards||[]).map(SR),!0).filter(Boolean);return v.forEach(function(y){return y.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),v.forEach(function(y){return y.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var u=b.useCallback(function(v,y){if("touches"in v&&v.touches.length===2)return!a.current.allowPinchZoom;var x=Mv(v),w=n.current,S="deltaX"in v?v.deltaX:w[0]-x[0],A="deltaY"in v?v.deltaY:w[1]-x[1],E,C=v.target,P=Math.abs(S)>Math.abs(A)?"h":"v";if("touches"in v&&P==="h"&&C.type==="range")return!1;var k=xR(P,C);if(!k)return!0;if(k?E=P:(E=P==="v"?"h":"v",k=xR(P,C)),!k)return!1;if(!r.current&&"changedTouches"in v&&(S||A)&&(r.current=E),!E)return!0;var M=r.current||E;return Kge(M,y,v,M==="h"?S:A,!0)},[]),s=b.useCallback(function(v){var y=v;if(!(!pf.length||pf[pf.length-1]!==o)){var x="deltaY"in y?_R(y):Mv(y),w=t.current.filter(function(E){return E.name===y.type&&E.target===y.target&&Yge(E.delta,x)})[0];if(w&&w.should){y.preventDefault();return}if(!w){var S=(a.current.shards||[]).map(SR).filter(Boolean).filter(function(E){return E.contains(y.target)}),A=S.length>0?u(y,S[0]):!a.current.noIsolation;A&&y.preventDefault()}}},[]),l=b.useCallback(function(v,y,x,w){var S={name:v,delta:y,target:x,should:w};t.current.push(S),setTimeout(function(){t.current=t.current.filter(function(A){return A!==S})},1)},[]),c=b.useCallback(function(v){n.current=Mv(v),r.current=void 0},[]),d=b.useCallback(function(v){l(v.type,_R(v),v.target,u(v,e.lockRef.current))},[]),h=b.useCallback(function(v){l(v.type,Mv(v),v.target,u(v,e.lockRef.current))},[]);b.useEffect(function(){return pf.push(o),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:h}),document.addEventListener("wheel",s,hf),document.addEventListener("touchmove",s,hf),document.addEventListener("touchstart",c,hf),function(){pf=pf.filter(function(v){return v!==o}),document.removeEventListener("wheel",s,hf),document.removeEventListener("touchmove",s,hf),document.removeEventListener("touchstart",c,hf)}},[]);var m=e.removeScrollBar,g=e.inert;return b.createElement(b.Fragment,null,g?b.createElement(o,{styles:Zge(i)}):null,m?b.createElement(Uge,{gapMode:"margin"}):null)}const Jge=Fj($z,Qge);var Fz=b.forwardRef(function(e,t){return b.createElement($w,Br({},e,{ref:t,sideCar:Jge}))});Fz.classNames=$w.classNames;const Lz="Dialog",[jz,xGe]=tge(Lz),[eve,Nc]=jz(Lz),tve=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:o,modal:a=!0}=e,u=b.useRef(null),s=b.useRef(null),[l=!1,c]=age({prop:r,defaultProp:i,onChange:o});return b.createElement(eve,{scope:t,triggerRef:u,contentRef:s,contentId:Y_(),titleId:Y_(),descriptionId:Y_(),open:l,onOpenChange:c,onOpenToggle:b.useCallback(()=>c(d=>!d),[c]),modal:a},n)},Bz="DialogPortal",[nve,zz]=jz(Bz,{forceMount:void 0}),rve=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:i}=e,o=Nc(Bz,t);return b.createElement(nve,{scope:t,forceMount:n},b.Children.map(r,a=>b.createElement(Dw,{present:n||o.open},b.createElement(Oge,{asChild:!0,container:i},a))))},j3="DialogOverlay",ive=b.forwardRef((e,t)=>{const n=zz(j3,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=Nc(j3,e.__scopeDialog);return o.modal?b.createElement(Dw,{present:r||o.open},b.createElement(ove,kn({},i,{ref:t}))):null}),ove=b.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Nc(j3,n);return b.createElement(Fz,{as:LO,allowPinchZoom:!0,shards:[i.contentRef]},b.createElement(Rw.div,kn({"data-state":Wz(i.open)},r,{ref:t,style:{pointerEvents:"auto",...r.style}})))}),F0="DialogContent",ave=b.forwardRef((e,t)=>{const n=zz(F0,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=Nc(F0,e.__scopeDialog);return b.createElement(Dw,{present:r||o.open},o.modal?b.createElement(uve,kn({},i,{ref:t})):b.createElement(sve,kn({},i,{ref:t})))}),uve=b.forwardRef((e,t)=>{const n=Nc(F0,e.__scopeDialog),r=b.useRef(null),i=Ym(t,n.contentRef,r);return b.useEffect(()=>{const o=r.current;if(o)return Vm(o)},[]),b.createElement(Uz,kn({},e,{ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Xf(e.onCloseAutoFocus,o=>{var a;o.preventDefault(),(a=n.triggerRef.current)===null||a===void 0||a.focus()}),onPointerDownOutside:Xf(e.onPointerDownOutside,o=>{const a=o.detail.originalEvent,u=a.button===0&&a.ctrlKey===!0;(a.button===2||u)&&o.preventDefault()}),onFocusOutside:Xf(e.onFocusOutside,o=>o.preventDefault())}))}),sve=b.forwardRef((e,t)=>{const n=Nc(F0,e.__scopeDialog),r=b.useRef(!1);return b.createElement(Uz,kn({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var o;if((o=e.onCloseAutoFocus)===null||o===void 0||o.call(e,i),!i.defaultPrevented){var a;r.current||(a=n.triggerRef.current)===null||a===void 0||a.focus(),i.preventDefault()}r.current=!1},onInteractOutside:i=>{var o,a;(o=e.onInteractOutside)===null||o===void 0||o.call(e,i),i.defaultPrevented||(r.current=!0);const u=i.target;((a=n.triggerRef.current)===null||a===void 0?void 0:a.contains(u))&&i.preventDefault()}}))}),Uz=b.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:o,...a}=e,u=Nc(F0,n),s=b.useRef(null),l=Ym(t,s);return Tge(),b.createElement(b.Fragment,null,b.createElement(wge,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:o},b.createElement(vge,kn({role:"dialog",id:u.contentId,"aria-describedby":u.descriptionId,"aria-labelledby":u.titleId,"data-state":Wz(u.open)},a,{ref:l,onDismiss:()=>u.onOpenChange(!1)}))),!1)});function Wz(e){return e?"open":"closed"}const lve=tve,cve=rve,fve=ive,dve=ave;var hve='[cmdk-list-sizer=""]',tp='[cmdk-group=""]',nS='[cmdk-group-items=""]',pve='[cmdk-group-heading=""]',BO='[cmdk-item=""]',CR=`${BO}:not([aria-disabled="true"])`,B3="cmdk-item-select",cu="data-value",mve=(e,t)=>Jme(e,t),Vz=b.createContext(void 0),Zm=()=>b.useContext(Vz),Hz=b.createContext(void 0),zO=()=>b.useContext(Hz),qz=b.createContext(void 0),Gz=b.forwardRef((e,t)=>{let n=b.useRef(null),r=_f(()=>{var U,X,q;return{search:"",value:(q=(X=e.value)!=null?X:(U=e.defaultValue)==null?void 0:U.toLowerCase())!=null?q:"",filtered:{count:0,items:new Map,groups:new Set}}}),i=_f(()=>new Set),o=_f(()=>new Map),a=_f(()=>new Map),u=_f(()=>new Set),s=Kz(e),{label:l,children:c,value:d,onValueChange:h,filter:m,shouldFilter:g,vimBindings:v=!0,...y}=e,x=b.useId(),w=b.useId(),S=b.useId(),A=Ave();ih(()=>{if(d!==void 0){let U=d.trim().toLowerCase();r.current.value=U,A(6,B),E.emit()}},[d]);let E=b.useMemo(()=>({subscribe:U=>(u.current.add(U),()=>u.current.delete(U)),snapshot:()=>r.current,setState:(U,X,q)=>{var G,ee,ue;if(!Object.is(r.current[U],X)){if(r.current[U]=X,U==="search")L(),k(),A(1,M);else if(U==="value")if(((G=s.current)==null?void 0:G.value)!==void 0){let fe=X??"";(ue=(ee=s.current).onValueChange)==null||ue.call(ee,fe);return}else q||A(5,B);E.emit()}},emit:()=>{u.current.forEach(U=>U())}}),[]),C=b.useMemo(()=>({value:(U,X)=>{X!==a.current.get(U)&&(a.current.set(U,X),r.current.filtered.items.set(U,P(X)),A(2,()=>{k(),E.emit()}))},item:(U,X)=>(i.current.add(U),X&&(o.current.has(X)?o.current.get(X).add(U):o.current.set(X,new Set([U]))),A(3,()=>{L(),k(),r.current.value||M(),E.emit()}),()=>{a.current.delete(U),i.current.delete(U),r.current.filtered.items.delete(U);let q=F();A(4,()=>{L(),q?.getAttribute("id")===U&&M(),E.emit()})}),group:U=>(o.current.has(U)||o.current.set(U,new Set),()=>{a.current.delete(U),o.current.delete(U)}),filter:()=>s.current.shouldFilter,label:l||e["aria-label"],commandRef:n,listId:x,inputId:S,labelId:w}),[]);function P(U){var X,q;let G=(q=(X=s.current)==null?void 0:X.filter)!=null?q:mve;return U?G(U,r.current.search):0}function k(){if(!n.current||!r.current.search||s.current.shouldFilter===!1)return;let U=r.current.filtered.items,X=[];r.current.filtered.groups.forEach(G=>{let ee=o.current.get(G),ue=0;ee.forEach(fe=>{let ie=U.get(fe);ue=Math.max(ie,ue)}),X.push([G,ue])});let q=n.current.querySelector(hve);Y().sort((G,ee)=>{var ue,fe;let ie=G.getAttribute(cu),Ae=ee.getAttribute(cu);return((ue=U.get(Ae))!=null?ue:0)-((fe=U.get(ie))!=null?fe:0)}).forEach(G=>{let ee=G.closest(nS);ee?ee.appendChild(G.parentElement===ee?G:G.closest(`${nS} > *`)):q.appendChild(G.parentElement===q?G:G.closest(`${nS} > *`))}),X.sort((G,ee)=>ee[1]-G[1]).forEach(G=>{let ee=n.current.querySelector(`${tp}[${cu}="${G[0]}"]`);ee?.parentElement.appendChild(ee)})}function M(){let U=Y().find(q=>!q.ariaDisabled),X=U?.getAttribute(cu);E.setState("value",X||void 0)}function L(){if(!r.current.search||s.current.shouldFilter===!1){r.current.filtered.count=i.current.size;return}r.current.filtered.groups=new Set;let U=0;for(let X of i.current){let q=a.current.get(X),G=P(q);r.current.filtered.items.set(X,G),G>0&&U++}for(let[X,q]of o.current)for(let G of q)if(r.current.filtered.items.get(G)>0){r.current.filtered.groups.add(X);break}r.current.filtered.count=U}function B(){var U,X,q;let G=F();G&&(((U=G.parentElement)==null?void 0:U.firstChild)===G&&((q=(X=G.closest(tp))==null?void 0:X.querySelector(pve))==null||q.scrollIntoView({block:"nearest"})),G.scrollIntoView({block:"nearest"}))}function F(){var U;return(U=n.current)==null?void 0:U.querySelector(`${BO}[aria-selected="true"]`)}function Y(){return Array.from(n.current.querySelectorAll(CR))}function H(U){let X=Y()[U];X&&E.setState("value",X.getAttribute(cu))}function W(U){var X;let q=F(),G=Y(),ee=G.findIndex(fe=>fe===q),ue=G[ee+U];(X=s.current)!=null&&X.loop&&(ue=ee+U<0?G[G.length-1]:ee+U===G.length?G[0]:G[ee+U]),ue&&E.setState("value",ue.getAttribute(cu))}function V(U){let X=F(),q=X?.closest(tp),G;for(;q&&!G;)q=U>0?Cve(q,tp):Eve(q,tp),G=q?.querySelector(CR);G?E.setState("value",G.getAttribute(cu)):W(U)}let j=()=>H(Y().length-1),I=U=>{U.preventDefault(),U.metaKey?j():U.altKey?V(1):W(1)},z=U=>{U.preventDefault(),U.metaKey?H(0):U.altKey?V(-1):W(-1)};return b.createElement("div",{ref:Xm([n,t]),...y,"cmdk-root":"",onKeyDown:U=>{var X;if((X=y.onKeyDown)==null||X.call(y,U),!U.defaultPrevented)switch(U.key){case"n":case"j":{v&&U.ctrlKey&&I(U);break}case"ArrowDown":{I(U);break}case"p":case"k":{v&&U.ctrlKey&&z(U);break}case"ArrowUp":{z(U);break}case"Home":{U.preventDefault(),H(0);break}case"End":{U.preventDefault(),j();break}case"Enter":if(!U.nativeEvent.isComposing){U.preventDefault();let q=F();if(q){let G=new Event(B3);q.dispatchEvent(G)}}}}},b.createElement("label",{"cmdk-label":"",htmlFor:C.inputId,id:C.labelId,style:Ove},l),b.createElement(Hz.Provider,{value:E},b.createElement(Vz.Provider,{value:C},c)))}),gve=b.forwardRef((e,t)=>{var n,r;let i=b.useId(),o=b.useRef(null),a=b.useContext(qz),u=Zm(),s=Kz(e),l=(r=(n=s.current)==null?void 0:n.forceMount)!=null?r:a?.forceMount;ih(()=>u.item(i,a?.id),[]);let c=Yz(i,o,[e.value,e.children,o]),d=zO(),h=xc(E=>E.value&&E.value===c.current),m=xc(E=>l||u.filter()===!1?!0:E.search?E.filtered.items.get(i)>0:!0);b.useEffect(()=>{let E=o.current;if(!(!E||e.disabled))return E.addEventListener(B3,g),()=>E.removeEventListener(B3,g)},[m,e.onSelect,e.disabled]);function g(){var E,C;v(),(C=(E=s.current).onSelect)==null||C.call(E,c.current)}function v(){d.setState("value",c.current,!0)}if(!m)return null;let{disabled:y,value:x,onSelect:w,forceMount:S,...A}=e;return b.createElement("div",{ref:Xm([o,t]),...A,id:i,"cmdk-item":"",role:"option","aria-disabled":y||void 0,"aria-selected":h||void 0,"data-disabled":y||void 0,"data-selected":h||void 0,onPointerMove:y?void 0:v,onClick:y?void 0:g},e.children)}),vve=b.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:i,...o}=e,a=b.useId(),u=b.useRef(null),s=b.useRef(null),l=b.useId(),c=Zm(),d=xc(g=>i||c.filter()===!1?!0:g.search?g.filtered.groups.has(a):!0);ih(()=>c.group(a),[]),Yz(a,u,[e.value,e.heading,s]);let h=b.useMemo(()=>({id:a,forceMount:i}),[i]),m=b.createElement(qz.Provider,{value:h},r);return b.createElement("div",{ref:Xm([u,t]),...o,"cmdk-group":"",role:"presentation",hidden:d?void 0:!0},n&&b.createElement("div",{ref:s,"cmdk-group-heading":"","aria-hidden":!0,id:l},n),b.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?l:void 0},m))}),yve=b.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,i=b.useRef(null),o=xc(a=>!a.search);return!n&&!o?null:b.createElement("div",{ref:Xm([i,t]),...r,"cmdk-separator":"",role:"separator"})}),bve=b.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,i=e.value!=null,o=zO(),a=xc(c=>c.search),u=xc(c=>c.value),s=Zm(),l=b.useMemo(()=>{var c;let d=(c=s.commandRef.current)==null?void 0:c.querySelector(`${BO}[${cu}="${u}"]`);return d?.getAttribute("id")},[u,s.commandRef]);return b.useEffect(()=>{e.value!=null&&o.setState("search",e.value)},[e.value]),b.createElement("input",{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":s.listId,"aria-labelledby":s.labelId,"aria-activedescendant":l,id:s.inputId,type:"text",value:i?e.value:a,onChange:c=>{i||o.setState("search",c.target.value),n?.(c.target.value)}})}),wve=b.forwardRef((e,t)=>{let{children:n,...r}=e,i=b.useRef(null),o=b.useRef(null),a=Zm();return b.useEffect(()=>{if(o.current&&i.current){let u=o.current,s=i.current,l,c=new ResizeObserver(()=>{l=requestAnimationFrame(()=>{let d=u.offsetHeight;s.style.setProperty("--cmdk-list-height",d.toFixed(1)+"px")})});return c.observe(u),()=>{cancelAnimationFrame(l),c.unobserve(u)}}},[]),b.createElement("div",{ref:Xm([i,t]),...r,"cmdk-list":"",role:"listbox","aria-label":"Suggestions",id:a.listId,"aria-labelledby":a.inputId},b.createElement("div",{ref:o,"cmdk-list-sizer":""},n))}),xve=b.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:i,contentClassName:o,container:a,...u}=e;return b.createElement(lve,{open:n,onOpenChange:r},b.createElement(cve,{container:a},b.createElement(fve,{"cmdk-overlay":"",className:i}),b.createElement(dve,{"aria-label":e.label,"cmdk-dialog":"",className:o},b.createElement(Gz,{ref:t,...u}))))}),_ve=b.forwardRef((e,t)=>{let n=b.useRef(!0),r=xc(i=>i.filtered.count===0);return b.useEffect(()=>{n.current=!1},[]),n.current||!r?null:b.createElement("div",{ref:t,...e,"cmdk-empty":"",role:"presentation"})}),Sve=b.forwardRef((e,t)=>{let{progress:n,children:r,...i}=e;return b.createElement("div",{ref:t,...i,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":"Loading..."},b.createElement("div",{"aria-hidden":!0},r))}),_Ge=Object.assign(Gz,{List:wve,Item:gve,Input:bve,Group:vve,Separator:yve,Dialog:xve,Empty:_ve,Loading:Sve});function Cve(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function Eve(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function Kz(e){let t=b.useRef(e);return ih(()=>{t.current=e}),t}var ih=typeof window>"u"?b.useEffect:b.useLayoutEffect;function _f(e){let t=b.useRef();return t.current===void 0&&(t.current=e()),t}function Xm(e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}function xc(e){let t=zO(),n=()=>e(t.snapshot());return b.useSyncExternalStore(t.subscribe,n,n)}function Yz(e,t,n){let r=b.useRef(),i=Zm();return ih(()=>{var o;let a=(()=>{var u;for(let s of n){if(typeof s=="string")return s.trim().toLowerCase();if(typeof s=="object"&&"current"in s)return s.current?(u=s.current.textContent)==null?void 0:u.trim().toLowerCase():r.current}})();i.value(e,a),(o=t.current)==null||o.setAttribute(cu,a),r.current=a}),r}var Ave=()=>{let[e,t]=b.useState(),n=_f(()=>new Map);return ih(()=>{n.current.forEach(r=>r()),n.current=new Map},[e]),(r,i)=>{n.current.set(r,i),t({})}},Ove={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};/** +`)},xme=0,Bf=[];function wme(e){var t=y.useRef([]),n=y.useRef([0,0]),r=y.useRef(),i=y.useState(xme++)[0],o=y.useState(function(){return SA()})[0],a=y.useRef(e);y.useEffect(function(){a.current=e},[e]),y.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var m=qj([e.lockRef.current],(e.shards||[]).map(DR),!0).filter(Boolean);return m.forEach(function(b){return b.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),m.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var u=y.useCallback(function(m,b){if("touches"in m&&m.touches.length===2)return!a.current.allowPinchZoom;var w=Qm(m),x=n.current,S="deltaX"in m?m.deltaX:x[0]-w[0],A="deltaY"in m?m.deltaY:x[1]-w[1],E,C=m.target,T=Math.abs(S)>Math.abs(A)?"h":"v";if("touches"in m&&T==="h"&&C.type==="range")return!1;var M=MR(T,C);if(!M)return!0;if(M?E=T:(E=T==="v"?"h":"v",M=MR(T,C)),!M)return!1;if(!r.current&&"changedTouches"in m&&(S||A)&&(r.current=E),!E)return!0;var F=r.current||E;return mme(F,b,m,F==="h"?S:A,!0)},[]),s=y.useCallback(function(m){var b=m;if(!(!Bf.length||Bf[Bf.length-1]!==o)){var w="deltaY"in b?RR(b):Qm(b),x=t.current.filter(function(E){return E.name===b.type&&E.target===b.target&&yme(E.delta,w)})[0];if(x&&x.should){b.preventDefault();return}if(!x){var S=(a.current.shards||[]).map(DR).filter(Boolean).filter(function(E){return E.contains(b.target)}),A=S.length>0?u(b,S[0]):!a.current.noIsolation;A&&b.preventDefault()}}},[]),l=y.useCallback(function(m,b,w,x){var S={name:m,delta:b,target:w,should:x};t.current.push(S),setTimeout(function(){t.current=t.current.filter(function(A){return A!==S})},1)},[]),c=y.useCallback(function(m){n.current=Qm(m),r.current=void 0},[]),d=y.useCallback(function(m){l(m.type,RR(m),m.target,u(m,e.lockRef.current))},[]),h=y.useCallback(function(m){l(m.type,Qm(m),m.target,u(m,e.lockRef.current))},[]);y.useEffect(function(){return Bf.push(o),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:h}),document.addEventListener("wheel",s,jf),document.addEventListener("touchmove",s,jf),document.addEventListener("touchstart",c,jf),function(){Bf=Bf.filter(function(m){return m!==o}),document.removeEventListener("wheel",s,jf),document.removeEventListener("touchmove",s,jf),document.removeEventListener("touchstart",c,jf)}},[]);var v=e.removeScrollBar,g=e.inert;return y.createElement(y.Fragment,null,g?y.createElement(o,{styles:bme(i)}):null,v?y.createElement(fme,{gapMode:"margin"}):null)}const _me=Yj(qz,wme);var Yz=y.forwardRef(function(e,t){return y.createElement(tw,Ri({},e,{ref:t,sideCar:_me}))});Yz.classNames=tw.classNames;const Zz="Dialog",[Xz,DGe]=Cge(Zz),[Sme,cf]=Xz(Zz),Cme=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:o,modal:a=!0}=e,u=y.useRef(null),s=y.useRef(null),[l=!1,c]=kge({prop:r,defaultProp:i,onChange:o});return y.createElement(Sme,{scope:t,triggerRef:u,contentRef:s,contentId:cS(),titleId:cS(),descriptionId:cS(),open:l,onOpenChange:c,onOpenToggle:y.useCallback(()=>c(d=>!d),[c]),modal:a},n)},Qz="DialogPortal",[Eme,Jz]=Xz(Qz,{forceMount:void 0}),Ame=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:i}=e,o=cf(Qz,t);return y.createElement(Eme,{scope:t,forceMount:n},y.Children.map(r,a=>y.createElement(ew,{present:n||o.open},y.createElement(Zge,{asChild:!0,container:i},a))))},QC="DialogOverlay",Pme=y.forwardRef((e,t)=>{const n=Jz(QC,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=cf(QC,e.__scopeDialog);return o.modal?y.createElement(ew,{present:r||o.open},y.createElement(Ome,fr({},i,{ref:t}))):null}),Ome=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=cf(QC,n);return y.createElement(Yz,{as:QA,allowPinchZoom:!0,shards:[i.contentRef]},y.createElement(Jx.div,fr({"data-state":tU(i.open)},r,{ref:t,style:{pointerEvents:"auto",...r.style}})))}),av="DialogContent",kme=y.forwardRef((e,t)=>{const n=Jz(av,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=cf(av,e.__scopeDialog);return y.createElement(ew,{present:r||o.open},o.modal?y.createElement(Tme,fr({},i,{ref:t})):y.createElement(Mme,fr({},i,{ref:t})))}),Tme=y.forwardRef((e,t)=>{const n=cf(av,e.__scopeDialog),r=y.useRef(null),i=yg(t,n.contentRef,r);return y.useEffect(()=>{const o=r.current;if(o)return dg(o)},[]),y.createElement(eU,fr({},e,{ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Sd(e.onCloseAutoFocus,o=>{var a;o.preventDefault(),(a=n.triggerRef.current)===null||a===void 0||a.focus()}),onPointerDownOutside:Sd(e.onPointerDownOutside,o=>{const a=o.detail.originalEvent,u=a.button===0&&a.ctrlKey===!0;(a.button===2||u)&&o.preventDefault()}),onFocusOutside:Sd(e.onFocusOutside,o=>o.preventDefault())}))}),Mme=y.forwardRef((e,t)=>{const n=cf(av,e.__scopeDialog),r=y.useRef(!1);return y.createElement(eU,fr({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var o;if((o=e.onCloseAutoFocus)===null||o===void 0||o.call(e,i),!i.defaultPrevented){var a;r.current||(a=n.triggerRef.current)===null||a===void 0||a.focus(),i.preventDefault()}r.current=!1},onInteractOutside:i=>{var o,a;(o=e.onInteractOutside)===null||o===void 0||o.call(e,i),i.defaultPrevented||(r.current=!0);const u=i.target;((a=n.triggerRef.current)===null||a===void 0?void 0:a.contains(u))&&i.preventDefault()}}))}),eU=y.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:o,...a}=e,u=cf(av,n),s=y.useRef(null),l=yg(t,s);return Jge(),y.createElement(y.Fragment,null,y.createElement(Wge,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:o},y.createElement(Bge,fr({role:"dialog",id:u.contentId,"aria-describedby":u.descriptionId,"aria-labelledby":u.titleId,"data-state":tU(u.open)},a,{ref:l,onDismiss:()=>u.onOpenChange(!1)}))),!1)});function tU(e){return e?"open":"closed"}const Rme=Cme,Dme=Ame,$me=Pme,Ime=kme;var Nme='[cmdk-list-sizer=""]',Op='[cmdk-group=""]',mS='[cmdk-group-items=""]',Fme='[cmdk-group-heading=""]',eP='[cmdk-item=""]',$R=`${eP}:not([aria-disabled="true"])`,JC="cmdk-item-select",Gu="data-value",Lme=(e,t)=>_ge(e,t),nU=y.createContext(void 0),bg=()=>y.useContext(nU),rU=y.createContext(void 0),tP=()=>y.useContext(rU),iU=y.createContext(void 0),oU=y.forwardRef((e,t)=>{let n=y.useRef(null),r=Gf(()=>{var Y,ue,Q;return{search:"",value:(Q=(ue=e.value)!=null?ue:(Y=e.defaultValue)==null?void 0:Y.toLowerCase())!=null?Q:"",filtered:{count:0,items:new Map,groups:new Set}}}),i=Gf(()=>new Set),o=Gf(()=>new Map),a=Gf(()=>new Map),u=Gf(()=>new Set),s=aU(e),{label:l,children:c,value:d,onValueChange:h,filter:v,shouldFilter:g,vimBindings:m=!0,...b}=e,w=y.useId(),x=y.useId(),S=y.useId(),A=Yme();Rh(()=>{if(d!==void 0){let Y=d.trim().toLowerCase();r.current.value=Y,A(6,H),E.emit()}},[d]);let E=y.useMemo(()=>({subscribe:Y=>(u.current.add(Y),()=>u.current.delete(Y)),snapshot:()=>r.current,setState:(Y,ue,Q)=>{var J,se,de;if(!Object.is(r.current[Y],ue)){if(r.current[Y]=ue,Y==="search")U(),M(),A(1,F);else if(Y==="value")if(((J=s.current)==null?void 0:J.value)!==void 0){let Se=ue??"";(de=(se=s.current).onValueChange)==null||de.call(se,Se);return}else Q||A(5,H);E.emit()}},emit:()=>{u.current.forEach(Y=>Y())}}),[]),C=y.useMemo(()=>({value:(Y,ue)=>{ue!==a.current.get(Y)&&(a.current.set(Y,ue),r.current.filtered.items.set(Y,T(ue)),A(2,()=>{M(),E.emit()}))},item:(Y,ue)=>(i.current.add(Y),ue&&(o.current.has(ue)?o.current.get(ue).add(Y):o.current.set(ue,new Set([Y]))),A(3,()=>{U(),M(),r.current.value||F(),E.emit()}),()=>{a.current.delete(Y),i.current.delete(Y),r.current.filtered.items.delete(Y);let Q=W();A(4,()=>{U(),Q?.getAttribute("id")===Y&&F(),E.emit()})}),group:Y=>(o.current.has(Y)||o.current.set(Y,new Set),()=>{a.current.delete(Y),o.current.delete(Y)}),filter:()=>s.current.shouldFilter,label:l||e["aria-label"],commandRef:n,listId:w,inputId:S,labelId:x}),[]);function T(Y){var ue,Q;let J=(Q=(ue=s.current)==null?void 0:ue.filter)!=null?Q:Lme;return Y?J(Y,r.current.search):0}function M(){if(!n.current||!r.current.search||s.current.shouldFilter===!1)return;let Y=r.current.filtered.items,ue=[];r.current.filtered.groups.forEach(J=>{let se=o.current.get(J),de=0;se.forEach(Se=>{let ge=Y.get(Se);de=Math.max(ge,de)}),ue.push([J,de])});let Q=n.current.querySelector(Nme);ie().sort((J,se)=>{var de,Se;let ge=J.getAttribute(Gu),Ze=se.getAttribute(Gu);return((de=Y.get(Ze))!=null?de:0)-((Se=Y.get(ge))!=null?Se:0)}).forEach(J=>{let se=J.closest(mS);se?se.appendChild(J.parentElement===se?J:J.closest(`${mS} > *`)):Q.appendChild(J.parentElement===Q?J:J.closest(`${mS} > *`))}),ue.sort((J,se)=>se[1]-J[1]).forEach(J=>{let se=n.current.querySelector(`${Op}[${Gu}="${J[0]}"]`);se?.parentElement.appendChild(se)})}function F(){let Y=ie().find(Q=>!Q.ariaDisabled),ue=Y?.getAttribute(Gu);E.setState("value",ue||void 0)}function U(){if(!r.current.search||s.current.shouldFilter===!1){r.current.filtered.count=i.current.size;return}r.current.filtered.groups=new Set;let Y=0;for(let ue of i.current){let Q=a.current.get(ue),J=T(Q);r.current.filtered.items.set(ue,J),J>0&&Y++}for(let[ue,Q]of o.current)for(let J of Q)if(r.current.filtered.items.get(J)>0){r.current.filtered.groups.add(ue);break}r.current.filtered.count=Y}function H(){var Y,ue,Q;let J=W();J&&(((Y=J.parentElement)==null?void 0:Y.firstChild)===J&&((Q=(ue=J.closest(Op))==null?void 0:ue.querySelector(Fme))==null||Q.scrollIntoView({block:"nearest"})),J.scrollIntoView({block:"nearest"}))}function W(){var Y;return(Y=n.current)==null?void 0:Y.querySelector(`${eP}[aria-selected="true"]`)}function ie(){return Array.from(n.current.querySelectorAll($R))}function Z(Y){let ue=ie()[Y];ue&&E.setState("value",ue.getAttribute(Gu))}function G(Y){var ue;let Q=W(),J=ie(),se=J.findIndex(Se=>Se===Q),de=J[se+Y];(ue=s.current)!=null&&ue.loop&&(de=se+Y<0?J[J.length-1]:se+Y===J.length?J[0]:J[se+Y]),de&&E.setState("value",de.getAttribute(Gu))}function K(Y){let ue=W(),Q=ue?.closest(Op),J;for(;Q&&!J;)Q=Y>0?Kme(Q,Op):Gme(Q,Op),J=Q?.querySelector($R);J?E.setState("value",J.getAttribute(Gu)):G(Y)}let V=()=>Z(ie().length-1),B=Y=>{Y.preventDefault(),Y.metaKey?V():Y.altKey?K(1):G(1)},q=Y=>{Y.preventDefault(),Y.metaKey?Z(0):Y.altKey?K(-1):G(-1)};return y.createElement("div",{ref:xg([n,t]),...b,"cmdk-root":"",onKeyDown:Y=>{var ue;if((ue=b.onKeyDown)==null||ue.call(b,Y),!Y.defaultPrevented)switch(Y.key){case"n":case"j":{m&&Y.ctrlKey&&B(Y);break}case"ArrowDown":{B(Y);break}case"p":case"k":{m&&Y.ctrlKey&&q(Y);break}case"ArrowUp":{q(Y);break}case"Home":{Y.preventDefault(),Z(0);break}case"End":{Y.preventDefault(),V();break}case"Enter":if(!Y.nativeEvent.isComposing){Y.preventDefault();let Q=W();if(Q){let J=new Event(JC);Q.dispatchEvent(J)}}}}},y.createElement("label",{"cmdk-label":"",htmlFor:C.inputId,id:C.labelId,style:Zme},l),y.createElement(rU.Provider,{value:E},y.createElement(nU.Provider,{value:C},c)))}),jme=y.forwardRef((e,t)=>{var n,r;let i=y.useId(),o=y.useRef(null),a=y.useContext(iU),u=bg(),s=aU(e),l=(r=(n=s.current)==null?void 0:n.forceMount)!=null?r:a?.forceMount;Rh(()=>u.item(i,a?.id),[]);let c=uU(i,o,[e.value,e.children,o]),d=tP(),h=Gc(E=>E.value&&E.value===c.current),v=Gc(E=>l||u.filter()===!1?!0:E.search?E.filtered.items.get(i)>0:!0);y.useEffect(()=>{let E=o.current;if(!(!E||e.disabled))return E.addEventListener(JC,g),()=>E.removeEventListener(JC,g)},[v,e.onSelect,e.disabled]);function g(){var E,C;m(),(C=(E=s.current).onSelect)==null||C.call(E,c.current)}function m(){d.setState("value",c.current,!0)}if(!v)return null;let{disabled:b,value:w,onSelect:x,forceMount:S,...A}=e;return y.createElement("div",{ref:xg([o,t]),...A,id:i,"cmdk-item":"",role:"option","aria-disabled":b||void 0,"aria-selected":h||void 0,"data-disabled":b||void 0,"data-selected":h||void 0,onPointerMove:b?void 0:m,onClick:b?void 0:g},e.children)}),Bme=y.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:i,...o}=e,a=y.useId(),u=y.useRef(null),s=y.useRef(null),l=y.useId(),c=bg(),d=Gc(g=>i||c.filter()===!1?!0:g.search?g.filtered.groups.has(a):!0);Rh(()=>c.group(a),[]),uU(a,u,[e.value,e.heading,s]);let h=y.useMemo(()=>({id:a,forceMount:i}),[i]),v=y.createElement(iU.Provider,{value:h},r);return y.createElement("div",{ref:xg([u,t]),...o,"cmdk-group":"",role:"presentation",hidden:d?void 0:!0},n&&y.createElement("div",{ref:s,"cmdk-group-heading":"","aria-hidden":!0,id:l},n),y.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?l:void 0},v))}),zme=y.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,i=y.useRef(null),o=Gc(a=>!a.search);return!n&&!o?null:y.createElement("div",{ref:xg([i,t]),...r,"cmdk-separator":"",role:"separator"})}),Ume=y.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,i=e.value!=null,o=tP(),a=Gc(c=>c.search),u=Gc(c=>c.value),s=bg(),l=y.useMemo(()=>{var c;let d=(c=s.commandRef.current)==null?void 0:c.querySelector(`${eP}[${Gu}="${u}"]`);return d?.getAttribute("id")},[u,s.commandRef]);return y.useEffect(()=>{e.value!=null&&o.setState("search",e.value)},[e.value]),y.createElement("input",{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":s.listId,"aria-labelledby":s.labelId,"aria-activedescendant":l,id:s.inputId,type:"text",value:i?e.value:a,onChange:c=>{i||o.setState("search",c.target.value),n?.(c.target.value)}})}),Wme=y.forwardRef((e,t)=>{let{children:n,...r}=e,i=y.useRef(null),o=y.useRef(null),a=bg();return y.useEffect(()=>{if(o.current&&i.current){let u=o.current,s=i.current,l,c=new ResizeObserver(()=>{l=requestAnimationFrame(()=>{let d=u.offsetHeight;s.style.setProperty("--cmdk-list-height",d.toFixed(1)+"px")})});return c.observe(u),()=>{cancelAnimationFrame(l),c.unobserve(u)}}},[]),y.createElement("div",{ref:xg([i,t]),...r,"cmdk-list":"",role:"listbox","aria-label":"Suggestions",id:a.listId,"aria-labelledby":a.inputId},y.createElement("div",{ref:o,"cmdk-list-sizer":""},n))}),Vme=y.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:i,contentClassName:o,container:a,...u}=e;return y.createElement(Rme,{open:n,onOpenChange:r},y.createElement(Dme,{container:a},y.createElement($me,{"cmdk-overlay":"",className:i}),y.createElement(Ime,{"aria-label":e.label,"cmdk-dialog":"",className:o},y.createElement(oU,{ref:t,...u}))))}),Hme=y.forwardRef((e,t)=>{let n=y.useRef(!0),r=Gc(i=>i.filtered.count===0);return y.useEffect(()=>{n.current=!1},[]),n.current||!r?null:y.createElement("div",{ref:t,...e,"cmdk-empty":"",role:"presentation"})}),qme=y.forwardRef((e,t)=>{let{progress:n,children:r,...i}=e;return y.createElement("div",{ref:t,...i,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":"Loading..."},y.createElement("div",{"aria-hidden":!0},r))}),$Ge=Object.assign(oU,{List:Wme,Item:jme,Input:Ume,Group:Bme,Separator:zme,Dialog:Vme,Empty:Hme,Loading:qme});function Kme(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function Gme(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function aU(e){let t=y.useRef(e);return Rh(()=>{t.current=e}),t}var Rh=typeof window>"u"?y.useEffect:y.useLayoutEffect;function Gf(e){let t=y.useRef();return t.current===void 0&&(t.current=e()),t}function xg(e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}function Gc(e){let t=tP(),n=()=>e(t.snapshot());return y.useSyncExternalStore(t.subscribe,n,n)}function uU(e,t,n){let r=y.useRef(),i=bg();return Rh(()=>{var o;let a=(()=>{var u;for(let s of n){if(typeof s=="string")return s.trim().toLowerCase();if(typeof s=="object"&&"current"in s)return s.current?(u=s.current.textContent)==null?void 0:u.trim().toLowerCase():r.current}})();i.value(e,a),(o=t.current)==null||o.setAttribute(Gu,a),r.current=a}),r}var Yme=()=>{let[e,t]=y.useState(),n=Gf(()=>new Map);return Rh(()=>{n.current.forEach(r=>r()),n.current=new Map},[e]),(r,i)=>{n.current.set(r,i),t({})}},Zme={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Pve=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Zz=(...e)=>e.filter((t,n,r)=>!!t&&r.indexOf(t)===n).join(" ");/** + */const Xme=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),sU=(...e)=>e.filter((t,n,r)=>!!t&&r.indexOf(t)===n).join(" ");/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */var kve={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** + */var Qme={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Tve=b.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:o,iconNode:a,...u},s)=>b.createElement("svg",{ref:s,...kve,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Zz("lucide",i),...u},[...a.map(([l,c])=>b.createElement(l,c)),...Array.isArray(o)?o:[o]]));/** + */const Jme=y.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:o,iconNode:a,...u},s)=>y.createElement("svg",{ref:s,...Qme,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:sU("lucide",i),...u},[...a.map(([l,c])=>y.createElement(l,c)),...Array.isArray(o)?o:[o]]));/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const tn=(e,t)=>{const n=b.forwardRef(({className:r,...i},o)=>b.createElement(Tve,{ref:o,iconNode:t,className:Zz(`lucide-${Pve(e)}`,r),...i}));return n.displayName=`${e}`,n};/** + */const gn=(e,t)=>{const n=y.forwardRef(({className:r,...i},o)=>y.createElement(Jme,{ref:o,iconNode:t,className:sU(`lucide-${Xme(e)}`,r),...i}));return n.displayName=`${e}`,n};/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const SGe=tn("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/** + */const IGe=gn("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const CGe=tn("ArrowDownToLine",[["path",{d:"M12 17V3",key:"1cwfxf"}],["path",{d:"m6 11 6 6 6-6",key:"12ii2o"}],["path",{d:"M19 21H5",key:"150jfl"}]]);/** + */const NGe=gn("ArrowDownToLine",[["path",{d:"M12 17V3",key:"1cwfxf"}],["path",{d:"m6 11 6 6 6-6",key:"12ii2o"}],["path",{d:"M19 21H5",key:"150jfl"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const EGe=tn("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);/** + */const FGe=gn("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const AGe=tn("ArrowUpDown",[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]]);/** + */const LGe=gn("ArrowUpDown",[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const OGe=tn("ArrowUpFromLine",[["path",{d:"m18 9-6-6-6 6",key:"kcunyi"}],["path",{d:"M12 3v14",key:"7cf3v8"}],["path",{d:"M5 21h14",key:"11awu3"}]]);/** + */const jGe=gn("ArrowUpFromLine",[["path",{d:"m18 9-6-6-6 6",key:"kcunyi"}],["path",{d:"M12 3v14",key:"7cf3v8"}],["path",{d:"M5 21h14",key:"11awu3"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const PGe=tn("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/** + */const BGe=gn("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const kGe=tn("BarChart3",[["path",{d:"M3 3v18h18",key:"1s2lah"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);/** + */const zGe=gn("BarChart3",[["path",{d:"M3 3v18h18",key:"1s2lah"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const TGe=tn("Bell",[["path",{d:"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9",key:"1qo2s2"}],["path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0",key:"qgo35s"}]]);/** + */const UGe=gn("Bell",[["path",{d:"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9",key:"1qo2s2"}],["path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0",key:"qgo35s"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const MGe=tn("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/** + */const WGe=gn("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const RGe=tn("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** + */const VGe=gn("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const DGe=tn("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** + */const HGe=gn("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const $Ge=tn("CircleHelp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/** + */const qGe=gn("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const IGe=tn("CirclePlus",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]]);/** + */const KGe=gn("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const NGe=tn("ClipboardCopy",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2",key:"4jdomd"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v4",key:"3hqy98"}],["path",{d:"M21 14H11",key:"1bme5i"}],["path",{d:"m15 10-4 4 4 4",key:"5dvupr"}]]);/** + */const GGe=gn("CircleHelp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const FGe=tn("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/** + */const YGe=gn("CirclePlus",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const LGe=tn("Ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);/** + */const ZGe=gn("ClipboardCopy",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2",key:"4jdomd"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v4",key:"3hqy98"}],["path",{d:"M21 14H11",key:"1bme5i"}],["path",{d:"m15 10-4 4 4 4",key:"5dvupr"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const jGe=tn("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/** + */const XGe=gn("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const BGe=tn("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/** + */const QGe=gn("Cpu",[["rect",{width:"16",height:"16",x:"4",y:"4",rx:"2",key:"14l7u7"}],["rect",{width:"6",height:"6",x:"9",y:"9",rx:"1",key:"5aljv4"}],["path",{d:"M15 2v2",key:"13l42r"}],["path",{d:"M15 20v2",key:"15mkzm"}],["path",{d:"M2 15h2",key:"1gxd5l"}],["path",{d:"M2 9h2",key:"1bbxkp"}],["path",{d:"M20 15h2",key:"19e6y8"}],["path",{d:"M20 9h2",key:"19tzq7"}],["path",{d:"M9 2v2",key:"165o2o"}],["path",{d:"M9 20v2",key:"i2bqo8"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const zGe=tn("MessagesSquare",[["path",{d:"M14 9a2 2 0 0 1-2 2H6l-4 4V4c0-1.1.9-2 2-2h8a2 2 0 0 1 2 2z",key:"jj09z8"}],["path",{d:"M18 9h2a2 2 0 0 1 2 2v11l-4-4h-6a2 2 0 0 1-2-2v-1",key:"1cx29u"}]]);/** + */const JGe=gn("Ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const UGe=tn("Network",[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]]);/** + */const eYe=gn("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const WGe=tn("Pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);/** + */const tYe=gn("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const VGe=tn("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/** + */const nYe=gn("MessagesSquare",[["path",{d:"M14 9a2 2 0 0 1-2 2H6l-4 4V4c0-1.1.9-2 2-2h8a2 2 0 0 1 2 2z",key:"jj09z8"}],["path",{d:"M18 9h2a2 2 0 0 1 2 2v11l-4-4h-6a2 2 0 0 1-2-2v-1",key:"1cx29u"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const HGe=tn("Server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]);/** + */const rYe=gn("Network",[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const qGe=tn("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/** + */const iYe=gn("Pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const GGe=tn("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]);/** + */const oYe=gn("RotateCw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const KGe=tn("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/** + */const aYe=gn("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const YGe=tn("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/** + */const uYe=gn("Server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const ZGe=tn("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);var UO="Avatar",[Mve,XGe]=ri(UO),[Rve,Xz]=Mve(UO),Qz=b.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[i,o]=b.useState("idle");return R.jsx(Rve,{scope:n,imageLoadingStatus:i,onImageLoadingStatusChange:o,children:R.jsx(Qe.span,{...r,ref:t})})});Qz.displayName=UO;var Jz="AvatarImage",eU=b.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:i=()=>{},...o}=e,a=Xz(Jz,n),u=Dve(r,o.referrerPolicy),s=ko(l=>{i(l),a.onImageLoadingStatusChange(l)});return Pr(()=>{u!=="idle"&&s(u)},[u,s]),u==="loaded"?R.jsx(Qe.img,{...o,ref:t,src:r}):null});eU.displayName=Jz;var tU="AvatarFallback",nU=b.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...i}=e,o=Xz(tU,n),[a,u]=b.useState(r===void 0);return b.useEffect(()=>{if(r!==void 0){const s=window.setTimeout(()=>u(!0),r);return()=>window.clearTimeout(s)}},[r]),a&&o.imageLoadingStatus!=="loaded"?R.jsx(Qe.span,{...i,ref:t}):null});nU.displayName=tU;function Dve(e,t){const[n,r]=b.useState("idle");return Pr(()=>{if(!e){r("error");return}let i=!0;const o=new window.Image,a=u=>()=>{i&&r(u)};return r("loading"),o.onload=a("loaded"),o.onerror=a("error"),o.src=e,t&&(o.referrerPolicy=t),()=>{i=!1}},[e,t]),n}var QGe=Qz,JGe=eU,eKe=nU,$ve=Array.isArray,Ei=$ve,Ive=typeof Yo=="object"&&Yo&&Yo.Object===Object&&Yo,rU=Ive,Nve=rU,Fve=typeof self=="object"&&self&&self.Object===Object&&self,Lve=Nve||Fve||Function("return this")(),Va=Lve,jve=Va,Bve=jve.Symbol,Qm=Bve,ER=Qm,iU=Object.prototype,zve=iU.hasOwnProperty,Uve=iU.toString,np=ER?ER.toStringTag:void 0;function Wve(e){var t=zve.call(e,np),n=e[np];try{e[np]=void 0;var r=!0}catch{}var i=Uve.call(e);return r&&(t?e[np]=n:delete e[np]),i}var Vve=Wve,Hve=Object.prototype,qve=Hve.toString;function Gve(e){return qve.call(e)}var Kve=Gve,AR=Qm,Yve=Vve,Zve=Kve,Xve="[object Null]",Qve="[object Undefined]",OR=AR?AR.toStringTag:void 0;function Jve(e){return e==null?e===void 0?Qve:Xve:OR&&OR in Object(e)?Yve(e):Zve(e)}var Wu=Jve;function eye(e){return e!=null&&typeof e=="object"}var Vu=eye,tye=Wu,nye=Vu,rye="[object Symbol]";function iye(e){return typeof e=="symbol"||nye(e)&&tye(e)==rye}var oh=iye,oye=Ei,aye=oh,uye=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,sye=/^\w*$/;function lye(e,t){if(oye(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||aye(e)?!0:sye.test(e)||!uye.test(e)||t!=null&&e in Object(t)}var WO=lye;function cye(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var ul=cye;const ah=Vt(ul);var fye=Wu,dye=ul,hye="[object AsyncFunction]",pye="[object Function]",mye="[object GeneratorFunction]",gye="[object Proxy]";function vye(e){if(!dye(e))return!1;var t=fye(e);return t==pye||t==mye||t==hye||t==gye}var VO=vye;const ht=Vt(VO);var yye=Va,bye=yye["__core-js_shared__"],wye=bye,rS=wye,PR=function(){var e=/[^.]+$/.exec(rS&&rS.keys&&rS.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function xye(e){return!!PR&&PR in e}var _ye=xye,Sye=Function.prototype,Cye=Sye.toString;function Eye(e){if(e!=null){try{return Cye.call(e)}catch{}try{return e+""}catch{}}return""}var oU=Eye,Aye=VO,Oye=_ye,Pye=ul,kye=oU,Tye=/[\\^$.*+?()[\]{}|]/g,Mye=/^\[object .+?Constructor\]$/,Rye=Function.prototype,Dye=Object.prototype,$ye=Rye.toString,Iye=Dye.hasOwnProperty,Nye=RegExp("^"+$ye.call(Iye).replace(Tye,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Fye(e){if(!Pye(e)||Oye(e))return!1;var t=Aye(e)?Nye:Mye;return t.test(kye(e))}var Lye=Fye;function jye(e,t){return e?.[t]}var Bye=jye,zye=Lye,Uye=Bye;function Wye(e,t){var n=Uye(e,t);return zye(n)?n:void 0}var Fc=Wye,Vye=Fc,Hye=Vye(Object,"create"),Iw=Hye,kR=Iw;function qye(){this.__data__=kR?kR(null):{},this.size=0}var Gye=qye;function Kye(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Yye=Kye,Zye=Iw,Xye="__lodash_hash_undefined__",Qye=Object.prototype,Jye=Qye.hasOwnProperty;function e1e(e){var t=this.__data__;if(Zye){var n=t[e];return n===Xye?void 0:n}return Jye.call(t,e)?t[e]:void 0}var t1e=e1e,n1e=Iw,r1e=Object.prototype,i1e=r1e.hasOwnProperty;function o1e(e){var t=this.__data__;return n1e?t[e]!==void 0:i1e.call(t,e)}var a1e=o1e,u1e=Iw,s1e="__lodash_hash_undefined__";function l1e(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=u1e&&t===void 0?s1e:t,this}var c1e=l1e,f1e=Gye,d1e=Yye,h1e=t1e,p1e=a1e,m1e=c1e;function uh(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t-1}var R1e=M1e,D1e=Nw;function $1e(e,t){var n=this.__data__,r=D1e(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var I1e=$1e,N1e=y1e,F1e=A1e,L1e=k1e,j1e=R1e,B1e=I1e;function sh(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t{const{__scopeAvatar:n,...r}=e,[i,o]=y.useState("idle");return I.jsx(tye,{scope:n,imageLoadingStatus:i,onImageLoadingStatusChange:o,children:I.jsx(pt.span,{...r,ref:t})})});cU.displayName=nP;var fU="AvatarImage",dU=y.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:i=()=>{},...o}=e,a=lU(fU,n),u=nye(r,o.referrerPolicy),s=Wr(l=>{i(l),a.onImageLoadingStatusChange(l)});return ni(()=>{u!=="idle"&&s(u)},[u,s]),u==="loaded"?I.jsx(pt.img,{...o,ref:t,src:r}):null});dU.displayName=fU;var hU="AvatarFallback",pU=y.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...i}=e,o=lU(hU,n),[a,u]=y.useState(r===void 0);return y.useEffect(()=>{if(r!==void 0){const s=window.setTimeout(()=>u(!0),r);return()=>window.clearTimeout(s)}},[r]),a&&o.imageLoadingStatus!=="loaded"?I.jsx(pt.span,{...i,ref:t}):null});pU.displayName=hU;function nye(e,t){const[n,r]=y.useState("idle");return ni(()=>{if(!e){r("error");return}let i=!0;const o=new window.Image,a=u=>()=>{i&&r(u)};return r("loading"),o.onload=a("loaded"),o.onerror=a("error"),o.src=e,t&&(o.referrerPolicy=t),()=>{i=!1}},[e,t]),n}var vYe=cU,gYe=dU,mYe=pU,rye=Array.isArray,vo=rye,iye=typeof ua=="object"&&ua&&ua.Object===Object&&ua,vU=iye,oye=vU,aye=typeof self=="object"&&self&&self.Object===Object&&self,uye=oye||aye||Function("return this")(),ku=uye,sye=ku,lye=sye.Symbol,wg=lye,IR=wg,gU=Object.prototype,cye=gU.hasOwnProperty,fye=gU.toString,kp=IR?IR.toStringTag:void 0;function dye(e){var t=cye.call(e,kp),n=e[kp];try{e[kp]=void 0;var r=!0}catch{}var i=fye.call(e);return r&&(t?e[kp]=n:delete e[kp]),i}var hye=dye,pye=Object.prototype,vye=pye.toString;function gye(e){return vye.call(e)}var mye=gye,NR=wg,yye=hye,bye=mye,xye="[object Null]",wye="[object Undefined]",FR=NR?NR.toStringTag:void 0;function _ye(e){return e==null?e===void 0?wye:xye:FR&&FR in Object(e)?yye(e):bye(e)}var As=_ye;function Sye(e){return e!=null&&typeof e=="object"}var Ps=Sye,Cye=As,Eye=Ps,Aye="[object Symbol]";function Pye(e){return typeof e=="symbol"||Eye(e)&&Cye(e)==Aye}var Dh=Pye,Oye=vo,kye=Dh,Tye=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Mye=/^\w*$/;function Rye(e,t){if(Oye(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||kye(e)?!0:Mye.test(e)||!Tye.test(e)||t!=null&&e in Object(t)}var rP=Rye;function Dye(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Ll=Dye;const $h=Pn(Ll);var $ye=As,Iye=Ll,Nye="[object AsyncFunction]",Fye="[object Function]",Lye="[object GeneratorFunction]",jye="[object Proxy]";function Bye(e){if(!Iye(e))return!1;var t=$ye(e);return t==Fye||t==Lye||t==Nye||t==jye}var iP=Bye;const Wt=Pn(iP);var zye=ku,Uye=zye["__core-js_shared__"],Wye=Uye,yS=Wye,LR=function(){var e=/[^.]+$/.exec(yS&&yS.keys&&yS.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Vye(e){return!!LR&&LR in e}var Hye=Vye,qye=Function.prototype,Kye=qye.toString;function Gye(e){if(e!=null){try{return Kye.call(e)}catch{}try{return e+""}catch{}}return""}var mU=Gye,Yye=iP,Zye=Hye,Xye=Ll,Qye=mU,Jye=/[\\^$.*+?()[\]{}|]/g,e1e=/^\[object .+?Constructor\]$/,t1e=Function.prototype,n1e=Object.prototype,r1e=t1e.toString,i1e=n1e.hasOwnProperty,o1e=RegExp("^"+r1e.call(i1e).replace(Jye,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function a1e(e){if(!Xye(e)||Zye(e))return!1;var t=Yye(e)?o1e:e1e;return t.test(Qye(e))}var u1e=a1e;function s1e(e,t){return e?.[t]}var l1e=s1e,c1e=u1e,f1e=l1e;function d1e(e,t){var n=f1e(e,t);return c1e(n)?n:void 0}var ff=d1e,h1e=ff,p1e=h1e(Object,"create"),nw=p1e,jR=nw;function v1e(){this.__data__=jR?jR(null):{},this.size=0}var g1e=v1e;function m1e(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var y1e=m1e,b1e=nw,x1e="__lodash_hash_undefined__",w1e=Object.prototype,_1e=w1e.hasOwnProperty;function S1e(e){var t=this.__data__;if(b1e){var n=t[e];return n===x1e?void 0:n}return _1e.call(t,e)?t[e]:void 0}var C1e=S1e,E1e=nw,A1e=Object.prototype,P1e=A1e.hasOwnProperty;function O1e(e){var t=this.__data__;return E1e?t[e]!==void 0:P1e.call(t,e)}var k1e=O1e,T1e=nw,M1e="__lodash_hash_undefined__";function R1e(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=T1e&&t===void 0?M1e:t,this}var D1e=R1e,$1e=g1e,I1e=y1e,N1e=C1e,F1e=k1e,L1e=D1e;function Ih(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t-1}var tbe=ebe,nbe=rw;function rbe(e,t){var n=this.__data__,r=nbe(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var ibe=rbe,obe=z1e,abe=Y1e,ube=Q1e,sbe=tbe,lbe=ibe;function Nh(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t0?1:-1},ql=function(t){return Jm(t)&&t.indexOf("%")===t.length-1},Pe=function(t){return swe(t)&&!ch(t)},or=function(t){return Pe(t)||Jm(t)},dwe=0,Lc=function(t){var n=++dwe;return"".concat(t||"").concat(n)},_c=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!Pe(t)&&!Jm(t))return r;var o;if(ql(t)){var a=t.indexOf("%");o=n*parseFloat(t.slice(0,a))/100}else o=+t;return ch(o)&&(o=r),i&&o>n&&(o=n),o},_s=function(t){if(!t)return null;var n=Object.keys(t);return n&&n.length?t[n[0]]:null},hwe=function(t){if(!Array.isArray(t))return!1;for(var n=t.length,r={},i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function wwe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function U3(e){"@babel/helpers - typeof";return U3=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},U3(e)}var NR={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart",contextmenu:"onContextMenu",dblclick:"onDoubleClick"},Cu=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},FR=null,oS=null,eP=function e(t){if(t===FR&&Array.isArray(oS))return oS;var n=[];return b.Children.forEach(t,function(r){ft(r)||(rwe.isFragment(r)?n=n.concat(e(r.props.children)):n.push(r))}),oS=n,FR=t,n};function xi(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(function(i){return Cu(i)}):r=[Cu(t)],eP(e).forEach(function(i){var o=Ao(i,"type.displayName")||Ao(i,"type.name");r.indexOf(o)!==-1&&n.push(i)}),n}function Fi(e,t){var n=xi(e,t);return n[0]}var LR=function(t){if(!t||!t.props)return!1;var n=t.props,r=n.width,i=n.height;return!(!Pe(r)||r<=0||!Pe(i)||i<=0)},xwe=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],_we=function(t){return t&&t.type&&Jm(t.type)&&xwe.indexOf(t.type)>=0},mU=function(t){return t&&U3(t)==="object"&&"clipDot"in t},Swe=function(t,n,r,i){var o,a=(o=iS?.[i])!==null&&o!==void 0?o:[];return!ht(t)&&(i&&a.includes(n)||gwe.includes(n))||r&&JO.includes(n)},ct=function(t,n,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var i=t;if(b.isValidElement(t)&&(i=t.props),!ah(i))return null;var o={};return Object.keys(i).forEach(function(a){var u;Swe((u=i)===null||u===void 0?void 0:u[a],a,n,r)&&(o[a]=i[a])}),o},W3=function e(t,n){if(t===n)return!0;var r=b.Children.count(t);if(r!==b.Children.count(n))return!1;if(r===0)return!0;if(r===1)return jR(Array.isArray(t)?t[0]:t,Array.isArray(n)?n[0]:n);for(var i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Pwe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function H3(e){var t=e.children,n=e.width,r=e.height,i=e.viewBox,o=e.className,a=e.style,u=e.title,s=e.desc,l=Owe(e,Awe),c=i||{width:n,height:r,x:0,y:0},d=Pt("recharts-surface",o);return $.createElement("svg",V3({},ct(l,!0,"svg"),{className:d,width:n,height:r,style:a,viewBox:"".concat(c.x," ").concat(c.y," ").concat(c.width," ").concat(c.height)}),$.createElement("title",null,u),$.createElement("desc",null,s),t)}var kwe=["children","className"];function q3(){return q3=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Mwe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var jt=$.forwardRef(function(e,t){var n=e.children,r=e.className,i=Twe(e,kwe),o=Pt("recharts-layer",r);return $.createElement("g",q3({className:o},ct(i,!0),{ref:t}),n)}),Eu=function(t,n){for(var r=arguments.length,i=new Array(r>2?r-2:0),o=2;oi?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(i);++r=r?e:$we(e,t,n)}var Nwe=Iwe,Fwe="\\ud800-\\udfff",Lwe="\\u0300-\\u036f",jwe="\\ufe20-\\ufe2f",Bwe="\\u20d0-\\u20ff",zwe=Lwe+jwe+Bwe,Uwe="\\ufe0e\\ufe0f",Wwe="\\u200d",Vwe=RegExp("["+Wwe+Fwe+zwe+Uwe+"]");function Hwe(e){return Vwe.test(e)}var gU=Hwe;function qwe(e){return e.split("")}var Gwe=qwe,vU="\\ud800-\\udfff",Kwe="\\u0300-\\u036f",Ywe="\\ufe20-\\ufe2f",Zwe="\\u20d0-\\u20ff",Xwe=Kwe+Ywe+Zwe,Qwe="\\ufe0e\\ufe0f",Jwe="["+vU+"]",G3="["+Xwe+"]",K3="\\ud83c[\\udffb-\\udfff]",exe="(?:"+G3+"|"+K3+")",yU="[^"+vU+"]",bU="(?:\\ud83c[\\udde6-\\uddff]){2}",wU="[\\ud800-\\udbff][\\udc00-\\udfff]",txe="\\u200d",xU=exe+"?",_U="["+Qwe+"]?",nxe="(?:"+txe+"(?:"+[yU,bU,wU].join("|")+")"+_U+xU+")*",rxe=_U+xU+nxe,ixe="(?:"+[yU+G3+"?",G3,bU,wU,Jwe].join("|")+")",oxe=RegExp(K3+"(?="+K3+")|"+ixe+rxe,"g");function axe(e){return e.match(oxe)||[]}var uxe=axe,sxe=Gwe,lxe=gU,cxe=uxe;function fxe(e){return lxe(e)?cxe(e):sxe(e)}var dxe=fxe,hxe=Nwe,pxe=gU,mxe=dxe,gxe=lU;function vxe(e){return function(t){t=gxe(t);var n=pxe(t)?mxe(t):void 0,r=n?n[0]:t.charAt(0),i=n?hxe(n,1).join(""):t.slice(1);return r[e]()+i}}var yxe=vxe,bxe=yxe,wxe=bxe("toUpperCase"),xxe=wxe;const Zw=Vt(xxe);function cn(e){return function(){return e}}const SU=Math.cos,M1=Math.sin,ma=Math.sqrt,R1=Math.PI,Xw=2*R1,Y3=Math.PI,Z3=2*Y3,$l=1e-6,_xe=Z3-$l;function CU(e){this._+=e[0];for(let t=1,n=e.length;t=0))throw new Error(`invalid digits: ${e}`);if(t>15)return CU;const n=10**t;return function(r){this._+=r[0];for(let i=1,o=r.length;i$l)if(!(Math.abs(d*s-l*c)>$l)||!o)this._append`L${this._x1=t},${this._y1=n}`;else{let m=r-a,g=i-u,v=s*s+l*l,y=m*m+g*g,x=Math.sqrt(v),w=Math.sqrt(h),S=o*Math.tan((Y3-Math.acos((v+h-y)/(2*x*w)))/2),A=S/w,E=S/x;Math.abs(A-1)>$l&&this._append`L${t+A*c},${n+A*d}`,this._append`A${o},${o},0,0,${+(d*m>c*g)},${this._x1=t+E*s},${this._y1=n+E*l}`}}arc(t,n,r,i,o,a){if(t=+t,n=+n,r=+r,a=!!a,r<0)throw new Error(`negative radius: ${r}`);let u=r*Math.cos(i),s=r*Math.sin(i),l=t+u,c=n+s,d=1^a,h=a?i-o:o-i;this._x1===null?this._append`M${l},${c}`:(Math.abs(this._x1-l)>$l||Math.abs(this._y1-c)>$l)&&this._append`L${l},${c}`,r&&(h<0&&(h=h%Z3+Z3),h>_xe?this._append`A${r},${r},0,1,${d},${t-u},${n-s}A${r},${r},0,1,${d},${this._x1=l},${this._y1=c}`:h>$l&&this._append`A${r},${r},0,${+(h>=Y3)},${d},${this._x1=t+r*Math.cos(o)},${this._y1=n+r*Math.sin(o)}`)}rect(t,n,r,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}}function tP(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new Cxe(t)}function nP(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function EU(e){this._context=e}EU.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function Qw(e){return new EU(e)}function AU(e){return e[0]}function OU(e){return e[1]}function PU(e,t){var n=cn(!0),r=null,i=Qw,o=null,a=tP(u);e=typeof e=="function"?e:e===void 0?AU:cn(e),t=typeof t=="function"?t:t===void 0?OU:cn(t);function u(s){var l,c=(s=nP(s)).length,d,h=!1,m;for(r==null&&(o=i(m=a())),l=0;l<=c;++l)!(l=m;--g)u.point(S[g],A[g]);u.lineEnd(),u.areaEnd()}x&&(S[h]=+e(y,h,d),A[h]=+t(y,h,d),u.point(r?+r(y,h,d):S[h],n?+n(y,h,d):A[h]))}if(w)return u=null,w+""||null}function c(){return PU().defined(i).curve(a).context(o)}return l.x=function(d){return arguments.length?(e=typeof d=="function"?d:cn(+d),r=null,l):e},l.x0=function(d){return arguments.length?(e=typeof d=="function"?d:cn(+d),l):e},l.x1=function(d){return arguments.length?(r=d==null?null:typeof d=="function"?d:cn(+d),l):r},l.y=function(d){return arguments.length?(t=typeof d=="function"?d:cn(+d),n=null,l):t},l.y0=function(d){return arguments.length?(t=typeof d=="function"?d:cn(+d),l):t},l.y1=function(d){return arguments.length?(n=d==null?null:typeof d=="function"?d:cn(+d),l):n},l.lineX0=l.lineY0=function(){return c().x(e).y(t)},l.lineY1=function(){return c().x(e).y(n)},l.lineX1=function(){return c().x(r).y(t)},l.defined=function(d){return arguments.length?(i=typeof d=="function"?d:cn(!!d),l):i},l.curve=function(d){return arguments.length?(a=d,o!=null&&(u=a(o)),l):a},l.context=function(d){return arguments.length?(d==null?o=u=null:u=a(o=d),l):o},l}class kU{constructor(t,n){this._context=t,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,n){switch(t=+t,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n);break}}this._x0=t,this._y0=n}}function Exe(e){return new kU(e,!0)}function Axe(e){return new kU(e,!1)}const rP={draw(e,t){const n=ma(t/R1);e.moveTo(n,0),e.arc(0,0,n,0,Xw)}},Oxe={draw(e,t){const n=ma(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},TU=ma(1/3),Pxe=TU*2,kxe={draw(e,t){const n=ma(t/Pxe),r=n*TU;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},Txe={draw(e,t){const n=ma(t),r=-n/2;e.rect(r,r,n,n)}},Mxe=.8908130915292852,MU=M1(R1/10)/M1(7*R1/10),Rxe=M1(Xw/10)*MU,Dxe=-SU(Xw/10)*MU,$xe={draw(e,t){const n=ma(t*Mxe),r=Rxe*n,i=Dxe*n;e.moveTo(0,-n),e.lineTo(r,i);for(let o=1;o<5;++o){const a=Xw*o/5,u=SU(a),s=M1(a);e.lineTo(s*n,-u*n),e.lineTo(u*r-s*i,s*r+u*i)}e.closePath()}},aS=ma(3),Ixe={draw(e,t){const n=-ma(t/(aS*3));e.moveTo(0,n*2),e.lineTo(-aS*n,-n),e.lineTo(aS*n,-n),e.closePath()}},po=-.5,mo=ma(3)/2,X3=1/ma(12),Nxe=(X3/2+1)*3,Fxe={draw(e,t){const n=ma(t/Nxe),r=n/2,i=n*X3,o=r,a=n*X3+n,u=-o,s=a;e.moveTo(r,i),e.lineTo(o,a),e.lineTo(u,s),e.lineTo(po*r-mo*i,mo*r+po*i),e.lineTo(po*o-mo*a,mo*o+po*a),e.lineTo(po*u-mo*s,mo*u+po*s),e.lineTo(po*r+mo*i,po*i-mo*r),e.lineTo(po*o+mo*a,po*a-mo*o),e.lineTo(po*u+mo*s,po*s-mo*u),e.closePath()}};function Lxe(e,t){let n=null,r=tP(i);e=typeof e=="function"?e:cn(e||rP),t=typeof t=="function"?t:cn(t===void 0?64:+t);function i(){let o;if(n||(n=o=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),o)return n=null,o+""||null}return i.type=function(o){return arguments.length?(e=typeof o=="function"?o:cn(o),i):e},i.size=function(o){return arguments.length?(t=typeof o=="function"?o:cn(+o),i):t},i.context=function(o){return arguments.length?(n=o??null,i):n},i}function D1(){}function $1(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function RU(e){this._context=e}RU.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:$1(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:$1(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function jxe(e){return new RU(e)}function DU(e){this._context=e}DU.prototype={areaStart:D1,areaEnd:D1,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:$1(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Bxe(e){return new DU(e)}function $U(e){this._context=e}$U.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:$1(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function zxe(e){return new $U(e)}function IU(e){this._context=e}IU.prototype={areaStart:D1,areaEnd:D1,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function Uxe(e){return new IU(e)}function zR(e){return e<0?-1:1}function UR(e,t,n){var r=e._x1-e._x0,i=t-e._x1,o=(e._y1-e._y0)/(r||i<0&&-0),a=(n-e._y1)/(i||r<0&&-0),u=(o*i+a*r)/(r+i);return(zR(o)+zR(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(u))||0}function WR(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function uS(e,t,n){var r=e._x0,i=e._y0,o=e._x1,a=e._y1,u=(o-r)/3;e._context.bezierCurveTo(r+u,i+u*t,o-u,a-u*n,o,a)}function I1(e){this._context=e}I1.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:uS(this,this._t0,WR(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,uS(this,WR(this,n=UR(this,e,t)),n);break;default:uS(this,this._t0,n=UR(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function NU(e){this._context=new FU(e)}(NU.prototype=Object.create(I1.prototype)).point=function(e,t){I1.prototype.point.call(this,t,e)};function FU(e){this._context=e}FU.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,o){this._context.bezierCurveTo(t,e,r,n,o,i)}};function Wxe(e){return new I1(e)}function Vxe(e){return new NU(e)}function LU(e){this._context=e}LU.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=VR(e),i=VR(t),o=0,a=1;a=0;--t)i[t]=(a[t]-i[t+1])/o[t];for(o[n-1]=(e[n]+i[n-1])/2,t=0;t=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function qxe(e){return new Jw(e,.5)}function Gxe(e){return new Jw(e,0)}function Kxe(e){return new Jw(e,1)}function yd(e,t){if((a=e.length)>1)for(var n=1,r,i,o=e[t[0]],a,u=o.length;n=0;)n[t]=t;return n}function Yxe(e,t){return e[t]}function Zxe(e){const t=[];return t.key=e,t}function Xxe(){var e=cn([]),t=Q3,n=yd,r=Yxe;function i(o){var a=Array.from(e.apply(this,arguments),Zxe),u,s=a.length,l=-1,c;for(const d of o)for(u=0,++l;u0){for(var n,r,i=0,o=e[0].length,a;i0){for(var n=0,r=e[t[0]],i,o=r.length;n0)||!((o=(i=e[t[0]]).length)>0))){for(var n=0,r=1,i,o,a;r=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function a2e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var jU={symbolCircle:rP,symbolCross:Oxe,symbolDiamond:kxe,symbolSquare:Txe,symbolStar:$xe,symbolTriangle:Ixe,symbolWye:Fxe},u2e=Math.PI/180,s2e=function(t){var n="symbol".concat(Zw(t));return jU[n]||rP},l2e=function(t,n,r){if(n==="area")return t;switch(r){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var i=18*u2e;return 1.25*t*t*(Math.tan(i)-Math.tan(i*2)*Math.pow(Math.tan(i),2))}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},c2e=function(t,n){jU["symbol".concat(Zw(t))]=n},ex=function(t){var n=t.type,r=n===void 0?"circle":n,i=t.size,o=i===void 0?64:i,a=t.sizeType,u=a===void 0?"area":a,s=o2e(t,t2e),l=qR(qR({},s),{},{type:r,size:o,sizeType:u}),c=function(){var y=s2e(r),x=Lxe().type(y).size(l2e(o,u,r));return x()},d=l.className,h=l.cx,m=l.cy,g=ct(l,!0);return h===+h&&m===+m&&o===+o?$.createElement("path",J3({},g,{className:Pt("recharts-symbols",d),transform:"translate(".concat(h,", ").concat(m,")"),d:c()})):null};ex.registerSymbol=c2e;function bd(e){"@babel/helpers - typeof";return bd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bd(e)}function eE(){return eE=Object.assign?Object.assign.bind():function(e){for(var t=1;t0?1:-1},bc=function(t){return _g(t)&&t.indexOf("%")===t.length-1},Ke=function(t){return Mxe(t)&&!Lh(t)},Hr=function(t){return Ke(t)||_g(t)},Ixe=0,df=function(t){var n=++Ixe;return"".concat(t||"").concat(n)},Yc=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!Ke(t)&&!_g(t))return r;var o;if(bc(t)){var a=t.indexOf("%");o=n*parseFloat(t.slice(0,a))/100}else o=+t;return Lh(o)&&(o=r),i&&o>n&&(o=n),o},Js=function(t){if(!t)return null;var n=Object.keys(t);return n&&n.length?t[n[0]]:null},Nxe=function(t){if(!Array.isArray(t))return!1;for(var n=t.length,r={},i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Wxe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function tE(e){"@babel/helpers - typeof";return tE=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},tE(e)}var qR={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart",contextmenu:"onContextMenu",dblclick:"onDoubleClick"},us=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},KR=null,xS=null,pP=function e(t){if(t===KR&&Array.isArray(xS))return xS;var n=[];return y.Children.forEach(t,function(r){zt(r)||(Axe.isFragment(r)?n=n.concat(e(r.props.children)):n.push(r))}),xS=n,KR=t,n};function fo(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(function(i){return us(i)}):r=[us(t)],pP(e).forEach(function(i){var o=da(i,"type.displayName")||da(i,"type.name");r.indexOf(o)!==-1&&n.push(i)}),n}function Oo(e,t){var n=fo(e,t);return n[0]}var GR=function(t){if(!t||!t.props)return!1;var n=t.props,r=n.width,i=n.height;return!(!Ke(r)||r<=0||!Ke(i)||i<=0)},Vxe=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],Hxe=function(t){return t&&t.type&&_g(t.type)&&Vxe.indexOf(t.type)>=0},PU=function(t){return t&&tE(t)==="object"&&"clipDot"in t},qxe=function(t,n,r,i){var o,a=(o=bS?.[i])!==null&&o!==void 0?o:[];return!Wt(t)&&(i&&a.includes(n)||jxe.includes(n))||r&&hP.includes(n)},Bt=function(t,n,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var i=t;if(y.isValidElement(t)&&(i=t.props),!$h(i))return null;var o={};return Object.keys(i).forEach(function(a){var u;qxe((u=i)===null||u===void 0?void 0:u[a],a,n,r)&&(o[a]=i[a])}),o},nE=function e(t,n){if(t===n)return!0;var r=y.Children.count(t);if(r!==y.Children.count(n))return!1;if(r===0)return!0;if(r===1)return YR(Array.isArray(t)?t[0]:t,Array.isArray(n)?n[0]:n);for(var i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Xxe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function iE(e){var t=e.children,n=e.width,r=e.height,i=e.viewBox,o=e.className,a=e.style,u=e.title,s=e.desc,l=Zxe(e,Yxe),c=i||{width:n,height:r,x:0,y:0},d=cn("recharts-surface",o);return j.createElement("svg",rE({},Bt(l,!0,"svg"),{className:d,width:n,height:r,style:a,viewBox:"".concat(c.x," ").concat(c.y," ").concat(c.width," ").concat(c.height)}),j.createElement("title",null,u),j.createElement("desc",null,s),t)}var Qxe=["children","className"];function oE(){return oE=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ewe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var Sn=j.forwardRef(function(e,t){var n=e.children,r=e.className,i=Jxe(e,Qxe),o=cn("recharts-layer",r);return j.createElement("g",oE({className:o},Bt(i,!0),{ref:t}),n)}),ss=function(t,n){for(var r=arguments.length,i=new Array(r>2?r-2:0),o=2;oi?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(i);++r=r?e:rwe(e,t,n)}var owe=iwe,awe="\\ud800-\\udfff",uwe="\\u0300-\\u036f",swe="\\ufe20-\\ufe2f",lwe="\\u20d0-\\u20ff",cwe=uwe+swe+lwe,fwe="\\ufe0e\\ufe0f",dwe="\\u200d",hwe=RegExp("["+dwe+awe+cwe+fwe+"]");function pwe(e){return hwe.test(e)}var OU=pwe;function vwe(e){return e.split("")}var gwe=vwe,kU="\\ud800-\\udfff",mwe="\\u0300-\\u036f",ywe="\\ufe20-\\ufe2f",bwe="\\u20d0-\\u20ff",xwe=mwe+ywe+bwe,wwe="\\ufe0e\\ufe0f",_we="["+kU+"]",aE="["+xwe+"]",uE="\\ud83c[\\udffb-\\udfff]",Swe="(?:"+aE+"|"+uE+")",TU="[^"+kU+"]",MU="(?:\\ud83c[\\udde6-\\uddff]){2}",RU="[\\ud800-\\udbff][\\udc00-\\udfff]",Cwe="\\u200d",DU=Swe+"?",$U="["+wwe+"]?",Ewe="(?:"+Cwe+"(?:"+[TU,MU,RU].join("|")+")"+$U+DU+")*",Awe=$U+DU+Ewe,Pwe="(?:"+[TU+aE+"?",aE,MU,RU,_we].join("|")+")",Owe=RegExp(uE+"(?="+uE+")|"+Pwe+Awe,"g");function kwe(e){return e.match(Owe)||[]}var Twe=kwe,Mwe=gwe,Rwe=OU,Dwe=Twe;function $we(e){return Rwe(e)?Dwe(e):Mwe(e)}var Iwe=$we,Nwe=owe,Fwe=OU,Lwe=Iwe,jwe=wU;function Bwe(e){return function(t){t=jwe(t);var n=Fwe(t)?Lwe(t):void 0,r=n?n[0]:t.charAt(0),i=n?Nwe(n,1).join(""):t.slice(1);return r[e]()+i}}var zwe=Bwe,Uwe=zwe,Wwe=Uwe("toUpperCase"),Vwe=Wwe;const mw=Pn(Vwe);function Un(e){return function(){return e}}const IU=Math.cos,Z1=Math.sin,tu=Math.sqrt,X1=Math.PI,yw=2*X1,sE=Math.PI,lE=2*sE,uc=1e-6,Hwe=lE-uc;function NU(e){this._+=e[0];for(let t=1,n=e.length;t=0))throw new Error(`invalid digits: ${e}`);if(t>15)return NU;const n=10**t;return function(r){this._+=r[0];for(let i=1,o=r.length;iuc)if(!(Math.abs(d*s-l*c)>uc)||!o)this._append`L${this._x1=t},${this._y1=n}`;else{let v=r-a,g=i-u,m=s*s+l*l,b=v*v+g*g,w=Math.sqrt(m),x=Math.sqrt(h),S=o*Math.tan((sE-Math.acos((m+h-b)/(2*w*x)))/2),A=S/x,E=S/w;Math.abs(A-1)>uc&&this._append`L${t+A*c},${n+A*d}`,this._append`A${o},${o},0,0,${+(d*v>c*g)},${this._x1=t+E*s},${this._y1=n+E*l}`}}arc(t,n,r,i,o,a){if(t=+t,n=+n,r=+r,a=!!a,r<0)throw new Error(`negative radius: ${r}`);let u=r*Math.cos(i),s=r*Math.sin(i),l=t+u,c=n+s,d=1^a,h=a?i-o:o-i;this._x1===null?this._append`M${l},${c}`:(Math.abs(this._x1-l)>uc||Math.abs(this._y1-c)>uc)&&this._append`L${l},${c}`,r&&(h<0&&(h=h%lE+lE),h>Hwe?this._append`A${r},${r},0,1,${d},${t-u},${n-s}A${r},${r},0,1,${d},${this._x1=l},${this._y1=c}`:h>uc&&this._append`A${r},${r},0,${+(h>=sE)},${d},${this._x1=t+r*Math.cos(o)},${this._y1=n+r*Math.sin(o)}`)}rect(t,n,r,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}}function vP(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new Kwe(t)}function gP(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function FU(e){this._context=e}FU.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function bw(e){return new FU(e)}function LU(e){return e[0]}function jU(e){return e[1]}function BU(e,t){var n=Un(!0),r=null,i=bw,o=null,a=vP(u);e=typeof e=="function"?e:e===void 0?LU:Un(e),t=typeof t=="function"?t:t===void 0?jU:Un(t);function u(s){var l,c=(s=gP(s)).length,d,h=!1,v;for(r==null&&(o=i(v=a())),l=0;l<=c;++l)!(l=v;--g)u.point(S[g],A[g]);u.lineEnd(),u.areaEnd()}w&&(S[h]=+e(b,h,d),A[h]=+t(b,h,d),u.point(r?+r(b,h,d):S[h],n?+n(b,h,d):A[h]))}if(x)return u=null,x+""||null}function c(){return BU().defined(i).curve(a).context(o)}return l.x=function(d){return arguments.length?(e=typeof d=="function"?d:Un(+d),r=null,l):e},l.x0=function(d){return arguments.length?(e=typeof d=="function"?d:Un(+d),l):e},l.x1=function(d){return arguments.length?(r=d==null?null:typeof d=="function"?d:Un(+d),l):r},l.y=function(d){return arguments.length?(t=typeof d=="function"?d:Un(+d),n=null,l):t},l.y0=function(d){return arguments.length?(t=typeof d=="function"?d:Un(+d),l):t},l.y1=function(d){return arguments.length?(n=d==null?null:typeof d=="function"?d:Un(+d),l):n},l.lineX0=l.lineY0=function(){return c().x(e).y(t)},l.lineY1=function(){return c().x(e).y(n)},l.lineX1=function(){return c().x(r).y(t)},l.defined=function(d){return arguments.length?(i=typeof d=="function"?d:Un(!!d),l):i},l.curve=function(d){return arguments.length?(a=d,o!=null&&(u=a(o)),l):a},l.context=function(d){return arguments.length?(d==null?o=u=null:u=a(o=d),l):o},l}class zU{constructor(t,n){this._context=t,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,n){switch(t=+t,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n);break}}this._x0=t,this._y0=n}}function Gwe(e){return new zU(e,!0)}function Ywe(e){return new zU(e,!1)}const mP={draw(e,t){const n=tu(t/X1);e.moveTo(n,0),e.arc(0,0,n,0,yw)}},Zwe={draw(e,t){const n=tu(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},UU=tu(1/3),Xwe=UU*2,Qwe={draw(e,t){const n=tu(t/Xwe),r=n*UU;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},Jwe={draw(e,t){const n=tu(t),r=-n/2;e.rect(r,r,n,n)}},e2e=.8908130915292852,WU=Z1(X1/10)/Z1(7*X1/10),t2e=Z1(yw/10)*WU,n2e=-IU(yw/10)*WU,r2e={draw(e,t){const n=tu(t*e2e),r=t2e*n,i=n2e*n;e.moveTo(0,-n),e.lineTo(r,i);for(let o=1;o<5;++o){const a=yw*o/5,u=IU(a),s=Z1(a);e.lineTo(s*n,-u*n),e.lineTo(u*r-s*i,s*r+u*i)}e.closePath()}},wS=tu(3),i2e={draw(e,t){const n=-tu(t/(wS*3));e.moveTo(0,n*2),e.lineTo(-wS*n,-n),e.lineTo(wS*n,-n),e.closePath()}},Jo=-.5,ea=tu(3)/2,cE=1/tu(12),o2e=(cE/2+1)*3,a2e={draw(e,t){const n=tu(t/o2e),r=n/2,i=n*cE,o=r,a=n*cE+n,u=-o,s=a;e.moveTo(r,i),e.lineTo(o,a),e.lineTo(u,s),e.lineTo(Jo*r-ea*i,ea*r+Jo*i),e.lineTo(Jo*o-ea*a,ea*o+Jo*a),e.lineTo(Jo*u-ea*s,ea*u+Jo*s),e.lineTo(Jo*r+ea*i,Jo*i-ea*r),e.lineTo(Jo*o+ea*a,Jo*a-ea*o),e.lineTo(Jo*u+ea*s,Jo*s-ea*u),e.closePath()}};function u2e(e,t){let n=null,r=vP(i);e=typeof e=="function"?e:Un(e||mP),t=typeof t=="function"?t:Un(t===void 0?64:+t);function i(){let o;if(n||(n=o=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),o)return n=null,o+""||null}return i.type=function(o){return arguments.length?(e=typeof o=="function"?o:Un(o),i):e},i.size=function(o){return arguments.length?(t=typeof o=="function"?o:Un(+o),i):t},i.context=function(o){return arguments.length?(n=o??null,i):n},i}function Q1(){}function J1(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function VU(e){this._context=e}VU.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:J1(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:J1(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function s2e(e){return new VU(e)}function HU(e){this._context=e}HU.prototype={areaStart:Q1,areaEnd:Q1,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:J1(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function l2e(e){return new HU(e)}function qU(e){this._context=e}qU.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:J1(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function c2e(e){return new qU(e)}function KU(e){this._context=e}KU.prototype={areaStart:Q1,areaEnd:Q1,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function f2e(e){return new KU(e)}function XR(e){return e<0?-1:1}function QR(e,t,n){var r=e._x1-e._x0,i=t-e._x1,o=(e._y1-e._y0)/(r||i<0&&-0),a=(n-e._y1)/(i||r<0&&-0),u=(o*i+a*r)/(r+i);return(XR(o)+XR(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(u))||0}function JR(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function _S(e,t,n){var r=e._x0,i=e._y0,o=e._x1,a=e._y1,u=(o-r)/3;e._context.bezierCurveTo(r+u,i+u*t,o-u,a-u*n,o,a)}function eb(e){this._context=e}eb.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:_S(this,this._t0,JR(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,_S(this,JR(this,n=QR(this,e,t)),n);break;default:_S(this,this._t0,n=QR(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function GU(e){this._context=new YU(e)}(GU.prototype=Object.create(eb.prototype)).point=function(e,t){eb.prototype.point.call(this,t,e)};function YU(e){this._context=e}YU.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,o){this._context.bezierCurveTo(t,e,r,n,o,i)}};function d2e(e){return new eb(e)}function h2e(e){return new GU(e)}function ZU(e){this._context=e}ZU.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=eD(e),i=eD(t),o=0,a=1;a=0;--t)i[t]=(a[t]-i[t+1])/o[t];for(o[n-1]=(e[n]+i[n-1])/2,t=0;t=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function v2e(e){return new xw(e,.5)}function g2e(e){return new xw(e,0)}function m2e(e){return new xw(e,1)}function Hd(e,t){if((a=e.length)>1)for(var n=1,r,i,o=e[t[0]],a,u=o.length;n=0;)n[t]=t;return n}function y2e(e,t){return e[t]}function b2e(e){const t=[];return t.key=e,t}function x2e(){var e=Un([]),t=fE,n=Hd,r=y2e;function i(o){var a=Array.from(e.apply(this,arguments),b2e),u,s=a.length,l=-1,c;for(const d of o)for(u=0,++l;u0){for(var n,r,i=0,o=e[0].length,a;i0){for(var n=0,r=e[t[0]],i,o=r.length;n0)||!((o=(i=e[t[0]]).length)>0))){for(var n=0,r=1,i,o,a;r=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function k2e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var XU={symbolCircle:mP,symbolCross:Zwe,symbolDiamond:Qwe,symbolSquare:Jwe,symbolStar:r2e,symbolTriangle:i2e,symbolWye:a2e},T2e=Math.PI/180,M2e=function(t){var n="symbol".concat(mw(t));return XU[n]||mP},R2e=function(t,n,r){if(n==="area")return t;switch(r){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var i=18*T2e;return 1.25*t*t*(Math.tan(i)-Math.tan(i*2)*Math.pow(Math.tan(i),2))}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},D2e=function(t,n){XU["symbol".concat(mw(t))]=n},ww=function(t){var n=t.type,r=n===void 0?"circle":n,i=t.size,o=i===void 0?64:i,a=t.sizeType,u=a===void 0?"area":a,s=O2e(t,C2e),l=nD(nD({},s),{},{type:r,size:o,sizeType:u}),c=function(){var b=M2e(r),w=u2e().type(b).size(R2e(o,u,r));return w()},d=l.className,h=l.cx,v=l.cy,g=Bt(l,!0);return h===+h&&v===+v&&o===+o?j.createElement("path",dE({},g,{className:cn("recharts-symbols",d),transform:"translate(".concat(h,", ").concat(v,")"),d:c()})):null};ww.registerSymbol=D2e;function qd(e){"@babel/helpers - typeof";return qd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qd(e)}function hE(){return hE=Object.assign?Object.assign.bind():function(e){for(var t=1;t`);var w=m.inactive?l:m.color;return $.createElement("li",eE({className:y,style:d,key:"legend-item-".concat(g)},L0(r.props,m,g)),$.createElement(H3,{width:a,height:a,viewBox:c,style:h},r.renderIcon(m)),$.createElement("span",{className:"recharts-legend-item-text",style:{color:w}},v?v(x,m,g):x))})}},{key:"render",value:function(){var r=this.props,i=r.payload,o=r.layout,a=r.align;if(!i||!i.length)return null;var u={padding:0,margin:0,textAlign:o==="horizontal"?a:"left"};return $.createElement("ul",{className:"recharts-default-legend",style:u},this.renderItems())}}])}(b.PureComponent);B0(iP,"displayName","Legend");B0(iP,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var w2e=Fw;function x2e(){this.__data__=new w2e,this.size=0}var _2e=x2e;function S2e(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var C2e=S2e;function E2e(e){return this.__data__.get(e)}var A2e=E2e;function O2e(e){return this.__data__.has(e)}var P2e=O2e,k2e=Fw,T2e=qO,M2e=GO,R2e=200;function D2e(e,t){var n=this.__data__;if(n instanceof k2e){var r=n.__data__;if(!T2e||r.lengthu))return!1;var l=o.get(e),c=o.get(t);if(l&&c)return l==t&&c==e;var d=-1,h=!0,m=n&t_e?new X2e:void 0;for(o.set(e,t),o.set(t,e);++d-1&&e%1==0&&e-1&&e%1==0&&e<=oSe}var sP=aSe,uSe=Wu,sSe=sP,lSe=Vu,cSe="[object Arguments]",fSe="[object Array]",dSe="[object Boolean]",hSe="[object Date]",pSe="[object Error]",mSe="[object Function]",gSe="[object Map]",vSe="[object Number]",ySe="[object Object]",bSe="[object RegExp]",wSe="[object Set]",xSe="[object String]",_Se="[object WeakMap]",SSe="[object ArrayBuffer]",CSe="[object DataView]",ESe="[object Float32Array]",ASe="[object Float64Array]",OSe="[object Int8Array]",PSe="[object Int16Array]",kSe="[object Int32Array]",TSe="[object Uint8Array]",MSe="[object Uint8ClampedArray]",RSe="[object Uint16Array]",DSe="[object Uint32Array]",yn={};yn[ESe]=yn[ASe]=yn[OSe]=yn[PSe]=yn[kSe]=yn[TSe]=yn[MSe]=yn[RSe]=yn[DSe]=!0;yn[cSe]=yn[fSe]=yn[SSe]=yn[dSe]=yn[CSe]=yn[hSe]=yn[pSe]=yn[mSe]=yn[gSe]=yn[vSe]=yn[ySe]=yn[bSe]=yn[wSe]=yn[xSe]=yn[_Se]=!1;function $Se(e){return lSe(e)&&sSe(e.length)&&!!yn[uSe(e)]}var ISe=$Se;function NSe(e){return function(t){return e(t)}}var ZU=NSe,j1={exports:{}};j1.exports;(function(e,t){var n=rU,r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===r,a=o&&n.process,u=function(){try{var s=i&&i.require&&i.require("util").types;return s||a&&a.binding&&a.binding("util")}catch{}}();e.exports=u})(j1,j1.exports);var FSe=j1.exports,LSe=ISe,jSe=ZU,JR=FSe,eD=JR&&JR.isTypedArray,BSe=eD?jSe(eD):LSe,XU=BSe,zSe=V_e,USe=aP,WSe=Ei,VSe=YU,HSe=uP,qSe=XU,GSe=Object.prototype,KSe=GSe.hasOwnProperty;function YSe(e,t){var n=WSe(e),r=!n&&USe(e),i=!n&&!r&&VSe(e),o=!n&&!r&&!i&&qSe(e),a=n||r||i||o,u=a?zSe(e.length,String):[],s=u.length;for(var l in e)(t||KSe.call(e,l))&&!(a&&(l=="length"||i&&(l=="offset"||l=="parent")||o&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||HSe(l,s)))&&u.push(l);return u}var ZSe=YSe,XSe=Object.prototype;function QSe(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||XSe;return e===n}var JSe=QSe;function eCe(e,t){return function(n){return e(t(n))}}var QU=eCe,tCe=QU,nCe=tCe(Object.keys,Object),rCe=nCe,iCe=JSe,oCe=rCe,aCe=Object.prototype,uCe=aCe.hasOwnProperty;function sCe(e){if(!iCe(e))return oCe(e);var t=[];for(var n in Object(e))uCe.call(e,n)&&n!="constructor"&&t.push(n);return t}var lCe=sCe,cCe=VO,fCe=sP;function dCe(e){return e!=null&&fCe(e.length)&&!cCe(e)}var eg=dCe,hCe=ZSe,pCe=lCe,mCe=eg;function gCe(e){return mCe(e)?hCe(e):pCe(e)}var tx=gCe,vCe=R_e,yCe=U_e,bCe=tx;function wCe(e){return vCe(e,bCe,yCe)}var xCe=wCe,tD=xCe,_Ce=1,SCe=Object.prototype,CCe=SCe.hasOwnProperty;function ECe(e,t,n,r,i,o){var a=n&_Ce,u=tD(e),s=u.length,l=tD(t),c=l.length;if(s!=c&&!a)return!1;for(var d=s;d--;){var h=u[d];if(!(a?h in t:CCe.call(t,h)))return!1}var m=o.get(e),g=o.get(t);if(m&&g)return m==t&&g==e;var v=!0;o.set(e,t),o.set(t,e);for(var y=a;++d-1}var SEe=_Ee;function CEe(e,t,n){for(var r=-1,i=e==null?0:e.length;++r=jEe){var l=t?null:FEe(e);if(l)return LEe(l);a=!1,i=NEe,s=new DEe}else s=t?[]:u;e:for(;++r=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function t6e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function n6e(e){return e.value}function r6e(e,t){if($.isValidElement(e))return $.cloneElement(e,t);if(typeof e=="function")return $.createElement(e,t);t.ref;var n=e6e(t,qEe);return $.createElement(iP,n)}var vD=1,ed=function(e){function t(){var n;GEe(this,t);for(var r=arguments.length,i=new Array(r),o=0;ovD||Math.abs(i.height-this.lastBoundingBox.height)>vD)&&(this.lastBoundingBox.width=i.width,this.lastBoundingBox.height=i.height,r&&r(i)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,r&&r(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?au({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(r){var i=this.props,o=i.layout,a=i.align,u=i.verticalAlign,s=i.margin,l=i.chartWidth,c=i.chartHeight,d,h;if(!r||(r.left===void 0||r.left===null)&&(r.right===void 0||r.right===null))if(a==="center"&&o==="vertical"){var m=this.getBBoxSnapshot();d={left:((l||0)-m.width)/2}}else d=a==="right"?{right:s&&s.right||0}:{left:s&&s.left||0};if(!r||(r.top===void 0||r.top===null)&&(r.bottom===void 0||r.bottom===null))if(u==="middle"){var g=this.getBBoxSnapshot();h={top:((c||0)-g.height)/2}}else h=u==="bottom"?{bottom:s&&s.bottom||0}:{top:s&&s.top||0};return au(au({},d),h)}},{key:"render",value:function(){var r=this,i=this.props,o=i.content,a=i.width,u=i.height,s=i.wrapperStyle,l=i.payloadUniqBy,c=i.payload,d=au(au({position:"absolute",width:a||"auto",height:u||"auto"},this.getDefaultPosition(s)),s);return $.createElement("div",{className:"recharts-legend-wrapper",style:d,ref:function(m){r.wrapperNode=m}},r6e(o,au(au({},this.props),{},{payload:oW(c,l,n6e)})))}}],[{key:"getWithHeight",value:function(r,i){var o=au(au({},this.defaultProps),r.props),a=o.layout;return a==="vertical"&&Pe(r.props.height)?{height:r.props.height}:a==="horizontal"?{width:r.props.width||i}:null}}])}(b.PureComponent);nx(ed,"displayName","Legend");nx(ed,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var yD=Qm,i6e=aP,o6e=Ei,bD=yD?yD.isConcatSpreadable:void 0;function a6e(e){return o6e(e)||i6e(e)||!!(bD&&e&&e[bD])}var u6e=a6e,s6e=GU,l6e=u6e;function sW(e,t,n,r,i){var o=-1,a=e.length;for(n||(n=l6e),i||(i=[]);++o0&&n(u)?t>1?sW(u,t-1,n,r,i):s6e(i,u):r||(i[i.length]=u)}return i}var lW=sW;function c6e(e){return function(t,n,r){for(var i=-1,o=Object(t),a=r(t),u=a.length;u--;){var s=a[e?u:++i];if(n(o[s],s,o)===!1)break}return t}}var f6e=c6e,d6e=f6e,h6e=d6e(),p6e=h6e,m6e=p6e,g6e=tx;function v6e(e,t){return e&&m6e(e,t,g6e)}var cW=v6e,y6e=eg;function b6e(e,t){return function(n,r){if(n==null)return n;if(!y6e(n))return e(n,r);for(var i=n.length,o=t?i:-1,a=Object(n);(t?o--:++ot||o&&a&&s&&!u&&!l||r&&a&&s||!n&&s||!i)return 1;if(!r&&!o&&!l&&e=u)return s;var l=n[r];return s*(l=="desc"?-1:1)}}return e.index-t.index}var D6e=R6e,fS=YO,$6e=ZO,I6e=sl,N6e=fW,F6e=P6e,L6e=ZU,j6e=D6e,B6e=hh,z6e=Ei;function U6e(e,t,n){t.length?t=fS(t,function(o){return z6e(o)?function(a){return $6e(a,o.length===1?o[0]:o)}:o}):t=[B6e];var r=-1;t=fS(t,L6e(I6e));var i=N6e(e,function(o,a,u){var s=fS(t,function(l){return l(o)});return{criteria:s,index:++r,value:o}});return F6e(i,function(o,a){return j6e(o,a,n)})}var W6e=U6e;function V6e(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var H6e=V6e,q6e=H6e,xD=Math.max;function G6e(e,t,n){return t=xD(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,o=xD(r.length-t,0),a=Array(o);++i0){if(++t>=rAe)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var uAe=aAe,sAe=nAe,lAe=uAe,cAe=lAe(sAe),fAe=cAe,dAe=hh,hAe=K6e,pAe=fAe;function mAe(e,t){return pAe(hAe(e,t,dAe),e+"")}var gAe=mAe,vAe=HO,yAe=eg,bAe=uP,wAe=ul;function xAe(e,t,n){if(!wAe(n))return!1;var r=typeof t;return(r=="number"?yAe(n)&&bAe(t,n.length):r=="string"&&t in n)?vAe(n[t],e):!1}var rx=xAe,_Ae=lW,SAe=W6e,CAe=gAe,SD=rx,EAe=CAe(function(e,t){if(e==null)return[];var n=t.length;return n>1&&SD(e,t[0],t[1])?t=[]:n>2&&SD(t[0],t[1],t[2])&&(t=[t[0]]),SAe(e,_Ae(t,1),[])}),AAe=EAe;const fP=Vt(AAe);function z0(e){"@babel/helpers - typeof";return z0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},z0(e)}function sE(){return sE=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=t.x),"".concat(rp,"-left"),Pe(n)&&t&&Pe(t.x)&&n=t.y),"".concat(rp,"-top"),Pe(r)&&t&&Pe(t.y)&&rv?Math.max(c,s[r]):Math.max(d,s[r])}function zAe(e){var t=e.translateX,n=e.translateY,r=e.useTranslate3d;return{transform:r?"translate3d(".concat(t,"px, ").concat(n,"px, 0)"):"translate(".concat(t,"px, ").concat(n,"px)")}}function UAe(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.offsetTopLeft,i=e.position,o=e.reverseDirection,a=e.tooltipBox,u=e.useTranslate3d,s=e.viewBox,l,c,d;return a.height>0&&a.width>0&&n?(c=AD({allowEscapeViewBox:t,coordinate:n,key:"x",offsetTopLeft:r,position:i,reverseDirection:o,tooltipDimension:a.width,viewBox:s,viewBoxDimension:s.width}),d=AD({allowEscapeViewBox:t,coordinate:n,key:"y",offsetTopLeft:r,position:i,reverseDirection:o,tooltipDimension:a.height,viewBox:s,viewBoxDimension:s.height}),l=zAe({translateX:c,translateY:d,useTranslate3d:u})):l=jAe,{cssProperties:l,cssClasses:BAe({translateX:c,translateY:d,coordinate:n})}}function xd(e){"@babel/helpers - typeof";return xd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xd(e)}function OD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function PD(e){for(var t=1;tkD||Math.abs(r.height-this.state.lastBoundingBox.height)>kD)&&this.setState({lastBoundingBox:{width:r.width,height:r.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var r,i;this.props.active&&this.updateBBox(),this.state.dismissed&&(((r=this.props.coordinate)===null||r===void 0?void 0:r.x)!==this.state.dismissedAtCoordinate.x||((i=this.props.coordinate)===null||i===void 0?void 0:i.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var r=this,i=this.props,o=i.active,a=i.allowEscapeViewBox,u=i.animationDuration,s=i.animationEasing,l=i.children,c=i.coordinate,d=i.hasPayload,h=i.isAnimationActive,m=i.offset,g=i.position,v=i.reverseDirection,y=i.useTranslate3d,x=i.viewBox,w=i.wrapperStyle,S=UAe({allowEscapeViewBox:a,coordinate:c,offsetTopLeft:m,position:g,reverseDirection:v,tooltipBox:this.state.lastBoundingBox,useTranslate3d:y,viewBox:x}),A=S.cssClasses,E=S.cssProperties,C=PD(PD({transition:h&&o?"transform ".concat(u,"ms ").concat(s):void 0},E),{},{pointerEvents:"none",visibility:!this.state.dismissed&&o&&d?"visible":"hidden",position:"absolute",top:0,left:0},w);return $.createElement("div",{tabIndex:-1,className:A,style:C,ref:function(k){r.wrapperNode=k}},l)}}])}(b.PureComponent),QAe=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},ia={isSsr:QAe(),get:function(t){return ia[t]},set:function(t,n){if(typeof t=="string")ia[t]=n;else{var r=Object.keys(t);r&&r.length&&r.forEach(function(i){ia[i]=t[i]})}}};function _d(e){"@babel/helpers - typeof";return _d=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_d(e)}function TD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function MD(e){for(var t=1;t0;return $.createElement(XAe,{allowEscapeViewBox:a,animationDuration:u,animationEasing:s,isAnimationActive:h,active:o,coordinate:c,hasPayload:C,offset:m,position:y,reverseDirection:x,useTranslate3d:w,viewBox:S,wrapperStyle:A},sOe(l,MD(MD({},this.props),{},{payload:E})))}}])}(b.PureComponent);dP(fu,"displayName","Tooltip");dP(fu,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!ia.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var lOe=Va,cOe=function(){return lOe.Date.now()},fOe=cOe,dOe=/\s/;function hOe(e){for(var t=e.length;t--&&dOe.test(e.charAt(t)););return t}var pOe=hOe,mOe=pOe,gOe=/^\s+/;function vOe(e){return e&&e.slice(0,mOe(e)+1).replace(gOe,"")}var yOe=vOe,bOe=yOe,RD=ul,wOe=oh,DD=NaN,xOe=/^[-+]0x[0-9a-f]+$/i,_Oe=/^0b[01]+$/i,SOe=/^0o[0-7]+$/i,COe=parseInt;function EOe(e){if(typeof e=="number")return e;if(wOe(e))return DD;if(RD(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=RD(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=bOe(e);var n=_Oe.test(e);return n||SOe.test(e)?COe(e.slice(2),n?2:8):xOe.test(e)?DD:+e}var vW=EOe,AOe=ul,hS=fOe,$D=vW,OOe="Expected a function",POe=Math.max,kOe=Math.min;function TOe(e,t,n){var r,i,o,a,u,s,l=0,c=!1,d=!1,h=!0;if(typeof e!="function")throw new TypeError(OOe);t=$D(t)||0,AOe(n)&&(c=!!n.leading,d="maxWait"in n,o=d?POe($D(n.maxWait)||0,t):o,h="trailing"in n?!!n.trailing:h);function m(C){var P=r,k=i;return r=i=void 0,l=C,a=e.apply(k,P),a}function g(C){return l=C,u=setTimeout(x,t),c?m(C):a}function v(C){var P=C-s,k=C-l,M=t-P;return d?kOe(M,o-k):M}function y(C){var P=C-s,k=C-l;return s===void 0||P>=t||P<0||d&&k>=o}function x(){var C=hS();if(y(C))return w(C);u=setTimeout(x,v(C))}function w(C){return u=void 0,h&&r?m(C):(r=i=void 0,a)}function S(){u!==void 0&&clearTimeout(u),l=0,r=s=i=u=void 0}function A(){return u===void 0?a:w(hS())}function E(){var C=hS(),P=y(C);if(r=arguments,i=this,s=C,P){if(u===void 0)return g(s);if(d)return clearTimeout(u),u=setTimeout(x,t),m(s)}return u===void 0&&(u=setTimeout(x,t)),a}return E.cancel=S,E.flush=A,E}var MOe=TOe,ROe=MOe,DOe=ul,$Oe="Expected a function";function IOe(e,t,n){var r=!0,i=!0;if(typeof e!="function")throw new TypeError($Oe);return DOe(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),ROe(e,t,{leading:r,maxWait:t,trailing:i})}var NOe=IOe;const yW=Vt(NOe);function W0(e){"@babel/helpers - typeof";return W0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},W0(e)}function ID(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Iv(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&(Y=yW(Y,v,{trailing:!0,leading:!1}));var H=new ResizeObserver(Y),W=E.current.getBoundingClientRect(),V=W.width,j=W.height;return B(V,j),H.observe(E.current),function(){H.disconnect()}},[B,v]);var F=b.useMemo(function(){var Y=M.containerWidth,H=M.containerHeight;if(Y<0||H<0)return null;Eu(ql(a)||ql(s),`The width(%s) and height(%s) are both fixed numbers, - maybe you don't need to use a ResponsiveContainer.`,a,s),Eu(!n||n>0,"The aspect(%s) must be greater than zero.",n);var W=ql(a)?Y:a,V=ql(s)?H:s;n&&n>0&&(W?V=W/n:V&&(W=V*n),h&&V>h&&(V=h)),Eu(W>0||V>0,`The width(%s) and height(%s) of chart should be greater than 0, + H`).concat(ta,"M").concat(2*u,",").concat(o,` + A`).concat(a,",").concat(a,",0,1,1,").concat(u,",").concat(o),className:"recharts-legend-icon"});if(r.type==="rect")return j.createElement("path",{stroke:"none",fill:s,d:"M0,".concat(ta/8,"h").concat(ta,"v").concat(ta*3/4,"h").concat(-ta,"z"),className:"recharts-legend-icon"});if(j.isValidElement(r.legendIcon)){var l=$2e({},r);return delete l.legendIcon,j.cloneElement(r.legendIcon,l)}return j.createElement(ww,{fill:s,cx:o,cy:o,size:ta,sizeType:"diameter",type:r.type})}},{key:"renderItems",value:function(){var r=this,i=this.props,o=i.payload,a=i.iconSize,u=i.layout,s=i.formatter,l=i.inactiveColor,c={x:0,y:0,width:ta,height:ta},d={display:u==="horizontal"?"inline-block":"block",marginRight:10},h={display:"inline-block",verticalAlign:"middle",marginRight:4};return o.map(function(v,g){var m=v.formatter||s,b=cn(lv(lv({"recharts-legend-item":!0},"legend-item-".concat(g),!0),"inactive",v.inactive));if(v.type==="none")return null;var w=Wt(v.value)?null:v.value;ss(!Wt(v.value),`The name property is also required when using a function for the dataKey of a chart's cartesian components. Ex: `);var x=v.inactive?l:v.color;return j.createElement("li",hE({className:b,style:d,key:"legend-item-".concat(g)},uv(r.props,v,g)),j.createElement(iE,{width:a,height:a,viewBox:c,style:h},r.renderIcon(v)),j.createElement("span",{className:"recharts-legend-item-text",style:{color:x}},m?m(w,v,g):w))})}},{key:"render",value:function(){var r=this.props,i=r.payload,o=r.layout,a=r.align;if(!i||!i.length)return null;var u={padding:0,margin:0,textAlign:o==="horizontal"?a:"left"};return j.createElement("ul",{className:"recharts-default-legend",style:u},this.renderItems())}}])}(y.PureComponent);lv(yP,"displayName","Legend");lv(yP,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var W2e=iw;function V2e(){this.__data__=new W2e,this.size=0}var H2e=V2e;function q2e(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var K2e=q2e;function G2e(e){return this.__data__.get(e)}var Y2e=G2e;function Z2e(e){return this.__data__.has(e)}var X2e=Z2e,Q2e=iw,J2e=aP,e_e=uP,t_e=200;function n_e(e,t){var n=this.__data__;if(n instanceof Q2e){var r=n.__data__;if(!J2e||r.lengthu))return!1;var l=o.get(e),c=o.get(t);if(l&&c)return l==t&&c==e;var d=-1,h=!0,v=n&C_e?new x_e:void 0;for(o.set(e,t),o.set(t,e);++d-1&&e%1==0&&e-1&&e%1==0&&e<=OSe}var _P=kSe,TSe=As,MSe=_P,RSe=Ps,DSe="[object Arguments]",$Se="[object Array]",ISe="[object Boolean]",NSe="[object Date]",FSe="[object Error]",LSe="[object Function]",jSe="[object Map]",BSe="[object Number]",zSe="[object Object]",USe="[object RegExp]",WSe="[object Set]",VSe="[object String]",HSe="[object WeakMap]",qSe="[object ArrayBuffer]",KSe="[object DataView]",GSe="[object Float32Array]",YSe="[object Float64Array]",ZSe="[object Int8Array]",XSe="[object Int16Array]",QSe="[object Int32Array]",JSe="[object Uint8Array]",e3e="[object Uint8ClampedArray]",t3e="[object Uint16Array]",n3e="[object Uint32Array]",Jn={};Jn[GSe]=Jn[YSe]=Jn[ZSe]=Jn[XSe]=Jn[QSe]=Jn[JSe]=Jn[e3e]=Jn[t3e]=Jn[n3e]=!0;Jn[DSe]=Jn[$Se]=Jn[qSe]=Jn[ISe]=Jn[KSe]=Jn[NSe]=Jn[FSe]=Jn[LSe]=Jn[jSe]=Jn[BSe]=Jn[zSe]=Jn[USe]=Jn[WSe]=Jn[VSe]=Jn[HSe]=!1;function r3e(e){return RSe(e)&&MSe(e.length)&&!!Jn[TSe(e)]}var i3e=r3e;function o3e(e){return function(t){return e(t)}}var sW=o3e,ib={exports:{}};ib.exports;(function(e,t){var n=vU,r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===r,a=o&&n.process,u=function(){try{var s=i&&i.require&&i.require("util").types;return s||a&&a.binding&&a.binding("util")}catch{}}();e.exports=u})(ib,ib.exports);var a3e=ib.exports,u3e=i3e,s3e=sW,lD=a3e,cD=lD&&lD.isTypedArray,l3e=cD?s3e(cD):u3e,lW=l3e,c3e=hSe,f3e=xP,d3e=vo,h3e=uW,p3e=wP,v3e=lW,g3e=Object.prototype,m3e=g3e.hasOwnProperty;function y3e(e,t){var n=d3e(e),r=!n&&f3e(e),i=!n&&!r&&h3e(e),o=!n&&!r&&!i&&v3e(e),a=n||r||i||o,u=a?c3e(e.length,String):[],s=u.length;for(var l in e)(t||m3e.call(e,l))&&!(a&&(l=="length"||i&&(l=="offset"||l=="parent")||o&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||p3e(l,s)))&&u.push(l);return u}var b3e=y3e,x3e=Object.prototype;function w3e(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||x3e;return e===n}var _3e=w3e;function S3e(e,t){return function(n){return e(t(n))}}var cW=S3e,C3e=cW,E3e=C3e(Object.keys,Object),A3e=E3e,P3e=_3e,O3e=A3e,k3e=Object.prototype,T3e=k3e.hasOwnProperty;function M3e(e){if(!P3e(e))return O3e(e);var t=[];for(var n in Object(e))T3e.call(e,n)&&n!="constructor"&&t.push(n);return t}var R3e=M3e,D3e=iP,$3e=_P;function I3e(e){return e!=null&&$3e(e.length)&&!D3e(e)}var Sg=I3e,N3e=b3e,F3e=R3e,L3e=Sg;function j3e(e){return L3e(e)?N3e(e):F3e(e)}var _w=j3e,B3e=tSe,z3e=fSe,U3e=_w;function W3e(e){return B3e(e,U3e,z3e)}var V3e=W3e,fD=V3e,H3e=1,q3e=Object.prototype,K3e=q3e.hasOwnProperty;function G3e(e,t,n,r,i,o){var a=n&H3e,u=fD(e),s=u.length,l=fD(t),c=l.length;if(s!=c&&!a)return!1;for(var d=s;d--;){var h=u[d];if(!(a?h in t:K3e.call(t,h)))return!1}var v=o.get(e),g=o.get(t);if(v&&g)return v==t&&g==e;var m=!0;o.set(e,t),o.set(t,e);for(var b=a;++d-1}var qEe=HEe;function KEe(e,t,n){for(var r=-1,i=e==null?0:e.length;++r=s6e){var l=t?null:a6e(e);if(l)return u6e(l);a=!1,i=o6e,s=new n6e}else s=t?[]:u;e:for(;++r=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function C6e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function E6e(e){return e.value}function A6e(e,t){if(j.isValidElement(e))return j.cloneElement(e,t);if(typeof e=="function")return j.createElement(e,t);t.ref;var n=S6e(t,v6e);return j.createElement(yP,n)}var PD=1,Ad=function(e){function t(){var n;g6e(this,t);for(var r=arguments.length,i=new Array(r),o=0;oPD||Math.abs(i.height-this.lastBoundingBox.height)>PD)&&(this.lastBoundingBox.width=i.width,this.lastBoundingBox.height=i.height,r&&r(i)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,r&&r(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?Vu({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(r){var i=this.props,o=i.layout,a=i.align,u=i.verticalAlign,s=i.margin,l=i.chartWidth,c=i.chartHeight,d,h;if(!r||(r.left===void 0||r.left===null)&&(r.right===void 0||r.right===null))if(a==="center"&&o==="vertical"){var v=this.getBBoxSnapshot();d={left:((l||0)-v.width)/2}}else d=a==="right"?{right:s&&s.right||0}:{left:s&&s.left||0};if(!r||(r.top===void 0||r.top===null)&&(r.bottom===void 0||r.bottom===null))if(u==="middle"){var g=this.getBBoxSnapshot();h={top:((c||0)-g.height)/2}}else h=u==="bottom"?{bottom:s&&s.bottom||0}:{top:s&&s.top||0};return Vu(Vu({},d),h)}},{key:"render",value:function(){var r=this,i=this.props,o=i.content,a=i.width,u=i.height,s=i.wrapperStyle,l=i.payloadUniqBy,c=i.payload,d=Vu(Vu({position:"absolute",width:a||"auto",height:u||"auto"},this.getDefaultPosition(s)),s);return j.createElement("div",{className:"recharts-legend-wrapper",style:d,ref:function(v){r.wrapperNode=v}},A6e(o,Vu(Vu({},this.props),{},{payload:mW(c,l,E6e)})))}}],[{key:"getWithHeight",value:function(r,i){var o=Vu(Vu({},this.defaultProps),r.props),a=o.layout;return a==="vertical"&&Ke(r.props.height)?{height:r.props.height}:a==="horizontal"?{width:r.props.width||i}:null}}])}(y.PureComponent);Sw(Ad,"displayName","Legend");Sw(Ad,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var OD=wg,P6e=xP,O6e=vo,kD=OD?OD.isConcatSpreadable:void 0;function k6e(e){return O6e(e)||P6e(e)||!!(kD&&e&&e[kD])}var T6e=k6e,M6e=oW,R6e=T6e;function xW(e,t,n,r,i){var o=-1,a=e.length;for(n||(n=R6e),i||(i=[]);++o0&&n(u)?t>1?xW(u,t-1,n,r,i):M6e(i,u):r||(i[i.length]=u)}return i}var wW=xW;function D6e(e){return function(t,n,r){for(var i=-1,o=Object(t),a=r(t),u=a.length;u--;){var s=a[e?u:++i];if(n(o[s],s,o)===!1)break}return t}}var $6e=D6e,I6e=$6e,N6e=I6e(),F6e=N6e,L6e=F6e,j6e=_w;function B6e(e,t){return e&&L6e(e,t,j6e)}var _W=B6e,z6e=Sg;function U6e(e,t){return function(n,r){if(n==null)return n;if(!z6e(n))return e(n,r);for(var i=n.length,o=t?i:-1,a=Object(n);(t?o--:++ot||o&&a&&s&&!u&&!l||r&&a&&s||!n&&s||!i)return 1;if(!r&&!o&&!l&&e=u)return s;var l=n[r];return s*(l=="desc"?-1:1)}}return e.index-t.index}var n4e=t4e,AS=lP,r4e=cP,i4e=jl,o4e=SW,a4e=X6e,u4e=sW,s4e=n4e,l4e=zh,c4e=vo;function f4e(e,t,n){t.length?t=AS(t,function(o){return c4e(o)?function(a){return r4e(a,o.length===1?o[0]:o)}:o}):t=[l4e];var r=-1;t=AS(t,u4e(i4e));var i=o4e(e,function(o,a,u){var s=AS(t,function(l){return l(o)});return{criteria:s,index:++r,value:o}});return a4e(i,function(o,a){return s4e(o,a,n)})}var d4e=f4e;function h4e(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var p4e=h4e,v4e=p4e,MD=Math.max;function g4e(e,t,n){return t=MD(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,o=MD(r.length-t,0),a=Array(o);++i0){if(++t>=A4e)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var T4e=k4e,M4e=E4e,R4e=T4e,D4e=R4e(M4e),$4e=D4e,I4e=zh,N4e=m4e,F4e=$4e;function L4e(e,t){return F4e(N4e(e,t,I4e),e+"")}var j4e=L4e,B4e=oP,z4e=Sg,U4e=wP,W4e=Ll;function V4e(e,t,n){if(!W4e(n))return!1;var r=typeof t;return(r=="number"?z4e(n)&&U4e(t,n.length):r=="string"&&t in n)?B4e(n[t],e):!1}var Cw=V4e,H4e=wW,q4e=d4e,K4e=j4e,DD=Cw,G4e=K4e(function(e,t){if(e==null)return[];var n=t.length;return n>1&&DD(e,t[0],t[1])?t=[]:n>2&&DD(t[0],t[1],t[2])&&(t=[t[0]]),q4e(e,H4e(t,1),[])}),Y4e=G4e;const EP=Pn(Y4e);function cv(e){"@babel/helpers - typeof";return cv=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},cv(e)}function wE(){return wE=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=t.x),"".concat(Tp,"-left"),Ke(n)&&t&&Ke(t.x)&&n=t.y),"".concat(Tp,"-top"),Ke(r)&&t&&Ke(t.y)&&rm?Math.max(c,s[r]):Math.max(d,s[r])}function cAe(e){var t=e.translateX,n=e.translateY,r=e.useTranslate3d;return{transform:r?"translate3d(".concat(t,"px, ").concat(n,"px, 0)"):"translate(".concat(t,"px, ").concat(n,"px)")}}function fAe(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.offsetTopLeft,i=e.position,o=e.reverseDirection,a=e.tooltipBox,u=e.useTranslate3d,s=e.viewBox,l,c,d;return a.height>0&&a.width>0&&n?(c=ND({allowEscapeViewBox:t,coordinate:n,key:"x",offsetTopLeft:r,position:i,reverseDirection:o,tooltipDimension:a.width,viewBox:s,viewBoxDimension:s.width}),d=ND({allowEscapeViewBox:t,coordinate:n,key:"y",offsetTopLeft:r,position:i,reverseDirection:o,tooltipDimension:a.height,viewBox:s,viewBoxDimension:s.height}),l=cAe({translateX:c,translateY:d,useTranslate3d:u})):l=sAe,{cssProperties:l,cssClasses:lAe({translateX:c,translateY:d,coordinate:n})}}function Gd(e){"@babel/helpers - typeof";return Gd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gd(e)}function FD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function LD(e){for(var t=1;tjD||Math.abs(r.height-this.state.lastBoundingBox.height)>jD)&&this.setState({lastBoundingBox:{width:r.width,height:r.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var r,i;this.props.active&&this.updateBBox(),this.state.dismissed&&(((r=this.props.coordinate)===null||r===void 0?void 0:r.x)!==this.state.dismissedAtCoordinate.x||((i=this.props.coordinate)===null||i===void 0?void 0:i.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var r=this,i=this.props,o=i.active,a=i.allowEscapeViewBox,u=i.animationDuration,s=i.animationEasing,l=i.children,c=i.coordinate,d=i.hasPayload,h=i.isAnimationActive,v=i.offset,g=i.position,m=i.reverseDirection,b=i.useTranslate3d,w=i.viewBox,x=i.wrapperStyle,S=fAe({allowEscapeViewBox:a,coordinate:c,offsetTopLeft:v,position:g,reverseDirection:m,tooltipBox:this.state.lastBoundingBox,useTranslate3d:b,viewBox:w}),A=S.cssClasses,E=S.cssProperties,C=LD(LD({transition:h&&o?"transform ".concat(u,"ms ").concat(s):void 0},E),{},{pointerEvents:"none",visibility:!this.state.dismissed&&o&&d?"visible":"hidden",position:"absolute",top:0,left:0},x);return j.createElement("div",{tabIndex:-1,className:A,style:C,ref:function(M){r.wrapperNode=M}},l)}}])}(y.PureComponent),wAe=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},Va={isSsr:wAe(),get:function(t){return Va[t]},set:function(t,n){if(typeof t=="string")Va[t]=n;else{var r=Object.keys(t);r&&r.length&&r.forEach(function(i){Va[i]=t[i]})}}};function Yd(e){"@babel/helpers - typeof";return Yd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yd(e)}function BD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function zD(e){for(var t=1;t0;return j.createElement(xAe,{allowEscapeViewBox:a,animationDuration:u,animationEasing:s,isAnimationActive:h,active:o,coordinate:c,hasPayload:C,offset:v,position:b,reverseDirection:w,useTranslate3d:x,viewBox:S,wrapperStyle:A},MAe(l,zD(zD({},this.props),{},{payload:E})))}}])}(y.PureComponent);AP(Yu,"displayName","Tooltip");AP(Yu,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!Va.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var RAe=ku,DAe=function(){return RAe.Date.now()},$Ae=DAe,IAe=/\s/;function NAe(e){for(var t=e.length;t--&&IAe.test(e.charAt(t)););return t}var FAe=NAe,LAe=FAe,jAe=/^\s+/;function BAe(e){return e&&e.slice(0,LAe(e)+1).replace(jAe,"")}var zAe=BAe,UAe=zAe,UD=Ll,WAe=Dh,WD=NaN,VAe=/^[-+]0x[0-9a-f]+$/i,HAe=/^0b[01]+$/i,qAe=/^0o[0-7]+$/i,KAe=parseInt;function GAe(e){if(typeof e=="number")return e;if(WAe(e))return WD;if(UD(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=UD(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=UAe(e);var n=HAe.test(e);return n||qAe.test(e)?KAe(e.slice(2),n?2:8):VAe.test(e)?WD:+e}var kW=GAe,YAe=Ll,OS=$Ae,VD=kW,ZAe="Expected a function",XAe=Math.max,QAe=Math.min;function JAe(e,t,n){var r,i,o,a,u,s,l=0,c=!1,d=!1,h=!0;if(typeof e!="function")throw new TypeError(ZAe);t=VD(t)||0,YAe(n)&&(c=!!n.leading,d="maxWait"in n,o=d?XAe(VD(n.maxWait)||0,t):o,h="trailing"in n?!!n.trailing:h);function v(C){var T=r,M=i;return r=i=void 0,l=C,a=e.apply(M,T),a}function g(C){return l=C,u=setTimeout(w,t),c?v(C):a}function m(C){var T=C-s,M=C-l,F=t-T;return d?QAe(F,o-M):F}function b(C){var T=C-s,M=C-l;return s===void 0||T>=t||T<0||d&&M>=o}function w(){var C=OS();if(b(C))return x(C);u=setTimeout(w,m(C))}function x(C){return u=void 0,h&&r?v(C):(r=i=void 0,a)}function S(){u!==void 0&&clearTimeout(u),l=0,r=s=i=u=void 0}function A(){return u===void 0?a:x(OS())}function E(){var C=OS(),T=b(C);if(r=arguments,i=this,s=C,T){if(u===void 0)return g(s);if(d)return clearTimeout(u),u=setTimeout(w,t),v(s)}return u===void 0&&(u=setTimeout(w,t)),a}return E.cancel=S,E.flush=A,E}var ePe=JAe,tPe=ePe,nPe=Ll,rPe="Expected a function";function iPe(e,t,n){var r=!0,i=!0;if(typeof e!="function")throw new TypeError(rPe);return nPe(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),tPe(e,t,{leading:r,maxWait:t,trailing:i})}var oPe=iPe;const TW=Pn(oPe);function dv(e){"@babel/helpers - typeof";return dv=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},dv(e)}function HD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ny(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&(ie=TW(ie,m,{trailing:!0,leading:!1}));var Z=new ResizeObserver(ie),G=E.current.getBoundingClientRect(),K=G.width,V=G.height;return H(K,V),Z.observe(E.current),function(){Z.disconnect()}},[H,m]);var W=y.useMemo(function(){var ie=F.containerWidth,Z=F.containerHeight;if(ie<0||Z<0)return null;ss(bc(a)||bc(s),`The width(%s) and height(%s) are both fixed numbers, + maybe you don't need to use a ResponsiveContainer.`,a,s),ss(!n||n>0,"The aspect(%s) must be greater than zero.",n);var G=bc(a)?ie:a,K=bc(s)?Z:s;n&&n>0&&(G?K=G/n:K&&(G=K*n),h&&K>h&&(K=h)),ss(G>0||K>0,`The width(%s) and height(%s) of chart should be greater than 0, please check the style of container, or the props width(%s) and height(%s), or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the - height and width.`,W,V,a,s,c,d,n);var j=!Array.isArray(m)&&Cu(m.type).endsWith("Chart");return $.Children.map(m,function(I){return $.isValidElement(I)?b.cloneElement(I,Iv({width:W,height:V},j?{style:Iv({height:"100%",width:"100%",maxHeight:V,maxWidth:W},I.props.style)}:{})):I})},[n,m,s,h,d,c,M,a]);return $.createElement("div",{id:y?"".concat(y):void 0,className:Pt("recharts-responsive-container",x),style:Iv(Iv({},A),{},{width:a,height:s,minWidth:c,minHeight:d,maxHeight:h}),ref:E},F)}),hP=function(t){return null};hP.displayName="Cell";function V0(e){"@babel/helpers - typeof";return V0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},V0(e)}function FD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function dE(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||ia.isSsr)return{width:0,height:0};var r=ZOe(n),i=JSON.stringify({text:t,copyStyle:r});if(mf.widthCache[i])return mf.widthCache[i];try{var o=document.getElementById(LD);o||(o=document.createElement("span"),o.setAttribute("id",LD),o.setAttribute("aria-hidden","true"),document.body.appendChild(o));var a=dE(dE({},YOe),r);Object.assign(o.style,a),o.textContent="".concat(t);var u=o.getBoundingClientRect(),s={width:u.width,height:u.height};return mf.widthCache[i]=s,++mf.cacheCount>KOe&&(mf.cacheCount=0,mf.widthCache={}),s}catch{return{width:0,height:0}}},XOe=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function H0(e){"@babel/helpers - typeof";return H0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},H0(e)}function W1(e,t){return tPe(e)||ePe(e,t)||JOe(e,t)||QOe()}function QOe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function JOe(e,t){if(e){if(typeof e=="string")return jD(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return jD(e,t)}}function jD(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function mPe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function HD(e,t){return bPe(e)||yPe(e,t)||vPe(e,t)||gPe()}function gPe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function vPe(e,t){if(e){if(typeof e=="string")return qD(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return qD(e,t)}}function qD(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&arguments[0]!==void 0?arguments[0]:[];return W.reduce(function(V,j){var I=j.word,z=j.width,U=V[V.length-1];if(U&&(i==null||o||U.width+z+rj.width?V:j})};if(!c)return m;for(var v="…",y=function(W){var V=d.slice(0,W),j=_W({breakAll:l,style:s,children:V+v}).wordsWithComputedWidth,I=h(j),z=I.length>a||g(I).width>Number(i);return[z,I]},x=0,w=d.length-1,S=0,A;x<=w&&S<=d.length-1;){var E=Math.floor((x+w)/2),C=E-1,P=y(C),k=HD(P,2),M=k[0],L=k[1],B=y(E),F=HD(B,1),Y=F[0];if(!M&&!Y&&(x=E+1),M&&Y&&(w=E-1),!M&&Y){A=L;break}S++}return A||m},GD=function(t){var n=ft(t)?[]:t.toString().split(xW);return[{words:n}]},xPe=function(t){var n=t.width,r=t.scaleToFit,i=t.children,o=t.style,a=t.breakAll,u=t.maxLines;if((n||r)&&!ia.isSsr){var s,l,c=_W({breakAll:a,children:i,style:o});if(c){var d=c.wordsWithComputedWidth,h=c.spaceWidth;s=d,l=h}else return GD(i);return wPe({breakAll:a,children:i,maxLines:u,style:o},s,l,n,r)}return GD(i)},KD="#808080",V1=function(t){var n=t.x,r=n===void 0?0:n,i=t.y,o=i===void 0?0:i,a=t.lineHeight,u=a===void 0?"1em":a,s=t.capHeight,l=s===void 0?"0.71em":s,c=t.scaleToFit,d=c===void 0?!1:c,h=t.textAnchor,m=h===void 0?"start":h,g=t.verticalAnchor,v=g===void 0?"end":g,y=t.fill,x=y===void 0?KD:y,w=VD(t,hPe),S=b.useMemo(function(){return xPe({breakAll:w.breakAll,children:w.children,maxLines:w.maxLines,scaleToFit:d,style:w.style,width:w.width})},[w.breakAll,w.children,w.maxLines,d,w.style,w.width]),A=w.dx,E=w.dy,C=w.angle,P=w.className,k=w.breakAll,M=VD(w,pPe);if(!or(r)||!or(o))return null;var L=r+(Pe(A)?A:0),B=o+(Pe(E)?E:0),F;switch(v){case"start":F=pS("calc(".concat(l,")"));break;case"middle":F=pS("calc(".concat((S.length-1)/2," * -").concat(u," + (").concat(l," / 2))"));break;default:F=pS("calc(".concat(S.length-1," * -").concat(u,")"));break}var Y=[];if(d){var H=S[0].width,W=w.width;Y.push("scale(".concat((Pe(W)?W/H:1)/H,")"))}return C&&Y.push("rotate(".concat(C,", ").concat(L,", ").concat(B,")")),Y.length&&(M.transform=Y.join(" ")),$.createElement("text",hE({},ct(M,!0),{x:L,y:B,className:Pt("recharts-text",P),textAnchor:m,fill:x.includes("url")?KD:x}),S.map(function(V,j){var I=V.words.join(k?"":" ");return $.createElement("tspan",{x:L,dy:j===0?F:u,key:"".concat(I,"-").concat(j)},I)}))};function zs(e,t){return e==null||t==null?NaN:et?1:e>=t?0:NaN}function _Pe(e,t){return e==null||t==null?NaN:te?1:t>=e?0:NaN}function pP(e){let t,n,r;e.length!==2?(t=zs,n=(u,s)=>zs(e(u),s),r=(u,s)=>e(u)-s):(t=e===zs||e===_Pe?e:SPe,n=e,r=e);function i(u,s,l=0,c=u.length){if(l>>1;n(u[d],s)<0?l=d+1:c=d}while(l>>1;n(u[d],s)<=0?l=d+1:c=d}while(ll&&r(u[d-1],s)>-r(u[d],s)?d-1:d}return{left:i,center:a,right:o}}function SPe(){return 0}function SW(e){return e===null?NaN:+e}function*CPe(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const EPe=pP(zs),tg=EPe.right;pP(SW).center;class YD extends Map{constructor(t,n=PPe){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,i]of t)this.set(r,i)}get(t){return super.get(ZD(this,t))}has(t){return super.has(ZD(this,t))}set(t,n){return super.set(APe(this,t),n)}delete(t){return super.delete(OPe(this,t))}}function ZD({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function APe({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function OPe({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function PPe(e){return e!==null&&typeof e=="object"?e.valueOf():e}function kPe(e=zs){if(e===zs)return CW;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function CW(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(et?1:0)}const TPe=Math.sqrt(50),MPe=Math.sqrt(10),RPe=Math.sqrt(2);function H1(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),a=o>=TPe?10:o>=MPe?5:o>=RPe?2:1;let u,s,l;return i<0?(l=Math.pow(10,-i)/a,u=Math.round(e*l),s=Math.round(t*l),u/lt&&--s,l=-l):(l=Math.pow(10,i)*a,u=Math.round(e/l),s=Math.round(t/l),u*lt&&--s),s0))return[];if(e===t)return[e];const r=t=i))return[];const u=o-i+1,s=new Array(u);if(r)if(a<0)for(let l=0;l=r)&&(n=r);return n}function QD(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function EW(e,t,n=0,r=1/0,i){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(i=i===void 0?CW:kPe(i);r>n;){if(r-n>600){const s=r-n+1,l=t-n+1,c=Math.log(s),d=.5*Math.exp(2*c/3),h=.5*Math.sqrt(c*d*(s-d)/s)*(l-s/2<0?-1:1),m=Math.max(n,Math.floor(t-l*d/s+h)),g=Math.min(r,Math.floor(t+(s-l)*d/s+h));EW(e,t,m,g,i)}const o=e[t];let a=n,u=r;for(ip(e,n,t),i(e[r],o)>0&&ip(e,n,r);a0;)--u}i(e[n],o)===0?ip(e,n,u):(++u,ip(e,u,r)),u<=t&&(n=u+1),t<=u&&(r=u-1)}return e}function ip(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function DPe(e,t,n){if(e=Float64Array.from(CPe(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return QD(e);if(t>=1)return XD(e);var r,i=(r-1)*t,o=Math.floor(i),a=XD(EW(e,o).subarray(0,o+1)),u=QD(e.subarray(o+1));return a+(u-a)*(i-o)}}function $Pe(e,t,n=SW){if(!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,i=(r-1)*t,o=Math.floor(i),a=+n(e[o],o,e),u=+n(e[o+1],o+1,e);return a+(u-a)*(i-o)}}function IPe(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,o=new Array(i);++r>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Fv(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Fv(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=FPe.exec(e))?new mi(t[1],t[2],t[3],1):(t=LPe.exec(e))?new mi(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=jPe.exec(e))?Fv(t[1],t[2],t[3],t[4]):(t=BPe.exec(e))?Fv(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=zPe.exec(e))?o9(t[1],t[2]/100,t[3]/100,1):(t=UPe.exec(e))?o9(t[1],t[2]/100,t[3]/100,t[4]):JD.hasOwnProperty(e)?n9(JD[e]):e==="transparent"?new mi(NaN,NaN,NaN,0):null}function n9(e){return new mi(e>>16&255,e>>8&255,e&255,1)}function Fv(e,t,n,r){return r<=0&&(e=t=n=NaN),new mi(e,t,n,r)}function HPe(e){return e instanceof ng||(e=Y0(e)),e?(e=e.rgb(),new mi(e.r,e.g,e.b,e.opacity)):new mi}function yE(e,t,n,r){return arguments.length===1?HPe(e):new mi(e,t,n,r??1)}function mi(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}gP(mi,yE,OW(ng,{brighter(e){return e=e==null?q1:Math.pow(q1,e),new mi(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?G0:Math.pow(G0,e),new mi(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new mi(tc(this.r),tc(this.g),tc(this.b),G1(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:r9,formatHex:r9,formatHex8:qPe,formatRgb:i9,toString:i9}));function r9(){return`#${Gl(this.r)}${Gl(this.g)}${Gl(this.b)}`}function qPe(){return`#${Gl(this.r)}${Gl(this.g)}${Gl(this.b)}${Gl((isNaN(this.opacity)?1:this.opacity)*255)}`}function i9(){const e=G1(this.opacity);return`${e===1?"rgb(":"rgba("}${tc(this.r)}, ${tc(this.g)}, ${tc(this.b)}${e===1?")":`, ${e})`}`}function G1(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function tc(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Gl(e){return e=tc(e),(e<16?"0":"")+e.toString(16)}function o9(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Qo(e,t,n,r)}function PW(e){if(e instanceof Qo)return new Qo(e.h,e.s,e.l,e.opacity);if(e instanceof ng||(e=Y0(e)),!e)return new Qo;if(e instanceof Qo)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,u=o-i,s=(o+i)/2;return u?(t===o?a=(n-r)/u+(n0&&s<1?0:a,new Qo(a,u,s,e.opacity)}function GPe(e,t,n,r){return arguments.length===1?PW(e):new Qo(e,t,n,r??1)}function Qo(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}gP(Qo,GPe,OW(ng,{brighter(e){return e=e==null?q1:Math.pow(q1,e),new Qo(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?G0:Math.pow(G0,e),new Qo(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new mi(mS(e>=240?e-240:e+120,i,r),mS(e,i,r),mS(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new Qo(a9(this.h),Lv(this.s),Lv(this.l),G1(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=G1(this.opacity);return`${e===1?"hsl(":"hsla("}${a9(this.h)}, ${Lv(this.s)*100}%, ${Lv(this.l)*100}%${e===1?")":`, ${e})`}`}}));function a9(e){return e=(e||0)%360,e<0?e+360:e}function Lv(e){return Math.max(0,Math.min(1,e||0))}function mS(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const vP=e=>()=>e;function KPe(e,t){return function(n){return e+n*t}}function YPe(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function ZPe(e){return(e=+e)==1?kW:function(t,n){return n-t?YPe(t,n,e):vP(isNaN(t)?n:t)}}function kW(e,t){var n=t-e;return n?KPe(e,n):vP(isNaN(e)?t:e)}const u9=function e(t){var n=ZPe(t);function r(i,o){var a=n((i=yE(i)).r,(o=yE(o)).r),u=n(i.g,o.g),s=n(i.b,o.b),l=kW(i.opacity,o.opacity);return function(c){return i.r=a(c),i.g=u(c),i.b=s(c),i.opacity=l(c),i+""}}return r.gamma=e,r}(1);function XPe(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(o){for(i=0;in&&(o=t.slice(n,o),u[a]?u[a]+=o:u[++a]=o),(r=r[0])===(i=i[0])?u[a]?u[a]+=i:u[++a]=i:(u[++a]=null,s.push({i:a,x:K1(r,i)})),n=gS.lastIndex;return nt&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function s4e(e,t,n){var r=e[0],i=e[1],o=t[0],a=t[1];return i2?l4e:s4e,s=l=null,d}function d(h){return h==null||isNaN(h=+h)?o:(s||(s=u(e.map(r),t,n)))(r(a(h)))}return d.invert=function(h){return a(i((l||(l=u(t,e.map(r),K1)))(h)))},d.domain=function(h){return arguments.length?(e=Array.from(h,Y1),c()):e.slice()},d.range=function(h){return arguments.length?(t=Array.from(h),c()):t.slice()},d.rangeRound=function(h){return t=Array.from(h),n=yP,c()},d.clamp=function(h){return arguments.length?(a=h?!0:Qr,c()):a!==Qr},d.interpolate=function(h){return arguments.length?(n=h,c()):n},d.unknown=function(h){return arguments.length?(o=h,d):o},function(h,m){return r=h,i=m,c()}}function bP(){return ix()(Qr,Qr)}function c4e(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Z1(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function Sd(e){return e=Z1(Math.abs(e)),e?e[1]:NaN}function f4e(e,t){return function(n,r){for(var i=n.length,o=[],a=0,u=e[0],s=0;i>0&&u>0&&(s+u+1>r&&(u=Math.max(1,r-s)),o.push(n.substring(i-=u,i+u)),!((s+=u+1)>r));)u=e[a=(a+1)%e.length];return o.reverse().join(t)}}function d4e(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var h4e=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Z0(e){if(!(t=h4e.exec(e)))throw new Error("invalid format: "+e);var t;return new wP({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}Z0.prototype=wP.prototype;function wP(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}wP.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function p4e(e){e:for(var t=e.length,n=1,r=-1,i;n0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var TW;function m4e(e,t){var n=Z1(e,t);if(!n)return e+"";var r=n[0],i=n[1],o=i-(TW=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+Z1(e,Math.max(0,t+o-1))[0]}function l9(e,t){var n=Z1(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const c9={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:c4e,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>l9(e*100,t),r:l9,s:m4e,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function f9(e){return e}var d9=Array.prototype.map,h9=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function g4e(e){var t=e.grouping===void 0||e.thousands===void 0?f9:f4e(d9.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",o=e.numerals===void 0?f9:d4e(d9.call(e.numerals,String)),a=e.percent===void 0?"%":e.percent+"",u=e.minus===void 0?"−":e.minus+"",s=e.nan===void 0?"NaN":e.nan+"";function l(d){d=Z0(d);var h=d.fill,m=d.align,g=d.sign,v=d.symbol,y=d.zero,x=d.width,w=d.comma,S=d.precision,A=d.trim,E=d.type;E==="n"?(w=!0,E="g"):c9[E]||(S===void 0&&(S=12),A=!0,E="g"),(y||h==="0"&&m==="=")&&(y=!0,h="0",m="=");var C=v==="$"?n:v==="#"&&/[boxX]/.test(E)?"0"+E.toLowerCase():"",P=v==="$"?r:/[%p]/.test(E)?a:"",k=c9[E],M=/[defgprs%]/.test(E);S=S===void 0?6:/[gprs]/.test(E)?Math.max(1,Math.min(21,S)):Math.max(0,Math.min(20,S));function L(B){var F=C,Y=P,H,W,V;if(E==="c")Y=k(B)+Y,B="";else{B=+B;var j=B<0||1/B<0;if(B=isNaN(B)?s:k(Math.abs(B),S),A&&(B=p4e(B)),j&&+B==0&&g!=="+"&&(j=!1),F=(j?g==="("?g:u:g==="-"||g==="("?"":g)+F,Y=(E==="s"?h9[8+TW/3]:"")+Y+(j&&g==="("?")":""),M){for(H=-1,W=B.length;++HV||V>57){Y=(V===46?i+B.slice(H+1):B.slice(H))+Y,B=B.slice(0,H);break}}}w&&!y&&(B=t(B,1/0));var I=F.length+B.length+Y.length,z=I>1)+F+B+Y+z.slice(I);break;default:B=z+F+B+Y;break}return o(B)}return L.toString=function(){return d+""},L}function c(d,h){var m=l((d=Z0(d),d.type="f",d)),g=Math.max(-8,Math.min(8,Math.floor(Sd(h)/3)))*3,v=Math.pow(10,-g),y=h9[8+g/3];return function(x){return m(v*x)+y}}return{format:l,formatPrefix:c}}var jv,xP,MW;v4e({thousands:",",grouping:[3],currency:["$",""]});function v4e(e){return jv=g4e(e),xP=jv.format,MW=jv.formatPrefix,jv}function y4e(e){return Math.max(0,-Sd(Math.abs(e)))}function b4e(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Sd(t)/3)))*3-Sd(Math.abs(e)))}function w4e(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Sd(t)-Sd(e))+1}function RW(e,t,n,r){var i=gE(e,t,n),o;switch(r=Z0(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(o=b4e(i,a))&&(r.precision=o),MW(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=w4e(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=y4e(i))&&(r.precision=o-(r.type==="%")*2);break}}return xP(r)}function ll(e){var t=e.domain;return e.ticks=function(n){var r=t();return pE(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return RW(i[0],i[i.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),i=0,o=r.length-1,a=r[i],u=r[o],s,l,c=10;for(u0;){if(l=mE(a,u,n),l===s)return r[i]=a,r[o]=u,t(r);if(l>0)a=Math.floor(a/l)*l,u=Math.ceil(u/l)*l;else if(l<0)a=Math.ceil(a*l)/l,u=Math.floor(u*l)/l;else break;s=l}return e},e}function X1(){var e=bP();return e.copy=function(){return rg(e,X1())},Do.apply(e,arguments),ll(e)}function DW(e){var t;function n(r){return r==null||isNaN(r=+r)?t:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(e=Array.from(r,Y1),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return DW(e).unknown(t)},e=arguments.length?Array.from(e,Y1):[0,1],ll(n)}function $W(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],o=e[r],a;return oMath.pow(e,t)}function E4e(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function g9(e){return(t,n)=>-e(-t,n)}function _P(e){const t=e(p9,m9),n=t.domain;let r=10,i,o;function a(){return i=E4e(r),o=C4e(r),n()[0]<0?(i=g9(i),o=g9(o),e(x4e,_4e)):e(p9,m9),t}return t.base=function(u){return arguments.length?(r=+u,a()):r},t.domain=function(u){return arguments.length?(n(u),a()):n()},t.ticks=u=>{const s=n();let l=s[0],c=s[s.length-1];const d=c0){for(;h<=m;++h)for(g=1;gc)break;x.push(v)}}else for(;h<=m;++h)for(g=r-1;g>=1;--g)if(v=h>0?g/o(-h):g*o(h),!(vc)break;x.push(v)}x.length*2{if(u==null&&(u=10),s==null&&(s=r===10?"s":","),typeof s!="function"&&(!(r%1)&&(s=Z0(s)).precision==null&&(s.trim=!0),s=xP(s)),u===1/0)return s;const l=Math.max(1,r*u/t.ticks().length);return c=>{let d=c/o(Math.round(i(c)));return d*rn($W(n(),{floor:u=>o(Math.floor(i(u))),ceil:u=>o(Math.ceil(i(u)))})),t}function IW(){const e=_P(ix()).domain([1,10]);return e.copy=()=>rg(e,IW()).base(e.base()),Do.apply(e,arguments),e}function v9(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function y9(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function SP(e){var t=1,n=e(v9(t),y9(t));return n.constant=function(r){return arguments.length?e(v9(t=+r),y9(t)):t},ll(n)}function NW(){var e=SP(ix());return e.copy=function(){return rg(e,NW()).constant(e.constant())},Do.apply(e,arguments)}function b9(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function A4e(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function O4e(e){return e<0?-e*e:e*e}function CP(e){var t=e(Qr,Qr),n=1;function r(){return n===1?e(Qr,Qr):n===.5?e(A4e,O4e):e(b9(n),b9(1/n))}return t.exponent=function(i){return arguments.length?(n=+i,r()):n},ll(t)}function EP(){var e=CP(ix());return e.copy=function(){return rg(e,EP()).exponent(e.exponent())},Do.apply(e,arguments),e}function P4e(){return EP.apply(null,arguments).exponent(.5)}function w9(e){return Math.sign(e)*e*e}function k4e(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function FW(){var e=bP(),t=[0,1],n=!1,r;function i(o){var a=k4e(e(o));return isNaN(a)?r:n?Math.round(a):a}return i.invert=function(o){return e.invert(w9(o))},i.domain=function(o){return arguments.length?(e.domain(o),i):e.domain()},i.range=function(o){return arguments.length?(e.range((t=Array.from(o,Y1)).map(w9)),i):t.slice()},i.rangeRound=function(o){return i.range(o).round(!0)},i.round=function(o){return arguments.length?(n=!!o,i):n},i.clamp=function(o){return arguments.length?(e.clamp(o),i):e.clamp()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return FW(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},Do.apply(i,arguments),ll(i)}function LW(){var e=[],t=[],n=[],r;function i(){var a=0,u=Math.max(1,t.length);for(n=new Array(u-1);++a0?n[u-1]:e[0],u=n?[r[n-1],t]:[r[l-1],r[l]]},a.unknown=function(s){return arguments.length&&(o=s),a},a.thresholds=function(){return r.slice()},a.copy=function(){return jW().domain([e,t]).range(i).unknown(o)},Do.apply(ll(a),arguments)}function BW(){var e=[.5],t=[0,1],n,r=1;function i(o){return o!=null&&o<=o?t[tg(e,o,0,r)]:n}return i.domain=function(o){return arguments.length?(e=Array.from(o),r=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(o){return arguments.length?(t=Array.from(o),r=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(o){var a=t.indexOf(o);return[e[a-1],e[a]]},i.unknown=function(o){return arguments.length?(n=o,i):n},i.copy=function(){return BW().domain(e).range(t).unknown(n)},Do.apply(i,arguments)}const vS=new Date,yS=new Date;function sr(e,t,n,r){function i(o){return e(o=arguments.length===0?new Date:new Date(+o)),o}return i.floor=o=>(e(o=new Date(+o)),o),i.ceil=o=>(e(o=new Date(o-1)),t(o,1),e(o),o),i.round=o=>{const a=i(o),u=i.ceil(o);return o-a(t(o=new Date(+o),a==null?1:Math.floor(a)),o),i.range=(o,a,u)=>{const s=[];if(o=i.ceil(o),u=u==null?1:Math.floor(u),!(o0))return s;let l;do s.push(l=new Date(+o)),t(o,u),e(o);while(lsr(a=>{if(a>=a)for(;e(a),!o(a);)a.setTime(a-1)},(a,u)=>{if(a>=a)if(u<0)for(;++u<=0;)for(;t(a,-1),!o(a););else for(;--u>=0;)for(;t(a,1),!o(a););}),n&&(i.count=(o,a)=>(vS.setTime(+o),yS.setTime(+a),e(vS),e(yS),Math.floor(n(vS,yS))),i.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(r?a=>r(a)%o===0:a=>i.count(0,a)%o===0):i)),i}const Q1=sr(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Q1.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?sr(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):Q1);Q1.range;const yu=1e3,So=yu*60,bu=So*60,Nu=bu*24,AP=Nu*7,x9=Nu*30,bS=Nu*365,Kl=sr(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*yu)},(e,t)=>(t-e)/yu,e=>e.getUTCSeconds());Kl.range;const OP=sr(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*yu)},(e,t)=>{e.setTime(+e+t*So)},(e,t)=>(t-e)/So,e=>e.getMinutes());OP.range;const PP=sr(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*So)},(e,t)=>(t-e)/So,e=>e.getUTCMinutes());PP.range;const kP=sr(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*yu-e.getMinutes()*So)},(e,t)=>{e.setTime(+e+t*bu)},(e,t)=>(t-e)/bu,e=>e.getHours());kP.range;const TP=sr(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*bu)},(e,t)=>(t-e)/bu,e=>e.getUTCHours());TP.range;const ig=sr(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*So)/Nu,e=>e.getDate()-1);ig.range;const ox=sr(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Nu,e=>e.getUTCDate()-1);ox.range;const zW=sr(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Nu,e=>Math.floor(e/Nu));zW.range;function jc(e){return sr(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*So)/AP)}const ax=jc(0),J1=jc(1),T4e=jc(2),M4e=jc(3),Cd=jc(4),R4e=jc(5),D4e=jc(6);ax.range;J1.range;T4e.range;M4e.range;Cd.range;R4e.range;D4e.range;function Bc(e){return sr(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/AP)}const ux=Bc(0),eb=Bc(1),$4e=Bc(2),I4e=Bc(3),Ed=Bc(4),N4e=Bc(5),F4e=Bc(6);ux.range;eb.range;$4e.range;I4e.range;Ed.range;N4e.range;F4e.range;const MP=sr(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());MP.range;const RP=sr(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());RP.range;const Fu=sr(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());Fu.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:sr(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});Fu.range;const Lu=sr(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());Lu.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:sr(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});Lu.range;function UW(e,t,n,r,i,o){const a=[[Kl,1,yu],[Kl,5,5*yu],[Kl,15,15*yu],[Kl,30,30*yu],[o,1,So],[o,5,5*So],[o,15,15*So],[o,30,30*So],[i,1,bu],[i,3,3*bu],[i,6,6*bu],[i,12,12*bu],[r,1,Nu],[r,2,2*Nu],[n,1,AP],[t,1,x9],[t,3,3*x9],[e,1,bS]];function u(l,c,d){const h=cy).right(a,h);if(m===a.length)return e.every(gE(l/bS,c/bS,d));if(m===0)return Q1.every(Math.max(gE(l,c,d),1));const[g,v]=a[h/a[m-1][2]53)return null;"w"in ae||(ae.w=1),"Z"in ae?(Te=xS(op(ae.y,0,1)),qe=Te.getUTCDay(),Te=qe>4||qe===0?eb.ceil(Te):eb(Te),Te=ox.offset(Te,(ae.V-1)*7),ae.y=Te.getUTCFullYear(),ae.m=Te.getUTCMonth(),ae.d=Te.getUTCDate()+(ae.w+6)%7):(Te=wS(op(ae.y,0,1)),qe=Te.getDay(),Te=qe>4||qe===0?J1.ceil(Te):J1(Te),Te=ig.offset(Te,(ae.V-1)*7),ae.y=Te.getFullYear(),ae.m=Te.getMonth(),ae.d=Te.getDate()+(ae.w+6)%7)}else("W"in ae||"U"in ae)&&("w"in ae||(ae.w="u"in ae?ae.u%7:"W"in ae?1:0),qe="Z"in ae?xS(op(ae.y,0,1)).getUTCDay():wS(op(ae.y,0,1)).getDay(),ae.m=0,ae.d="W"in ae?(ae.w+6)%7+ae.W*7-(qe+5)%7:ae.w+ae.U*7-(qe+6)%7);return"Z"in ae?(ae.H+=ae.Z/100|0,ae.M+=ae.Z%100,xS(ae)):wS(ae)}}function k(de,we,ge,ae){for(var $e=0,Te=we.length,qe=ge.length,zt,Rt;$e=qe)return-1;if(zt=we.charCodeAt($e++),zt===37){if(zt=we.charAt($e++),Rt=E[zt in _9?we.charAt($e++):zt],!Rt||(ae=Rt(de,ge,ae))<0)return-1}else if(zt!=ge.charCodeAt(ae++))return-1}return ae}function M(de,we,ge){var ae=l.exec(we.slice(ge));return ae?(de.p=c.get(ae[0].toLowerCase()),ge+ae[0].length):-1}function L(de,we,ge){var ae=m.exec(we.slice(ge));return ae?(de.w=g.get(ae[0].toLowerCase()),ge+ae[0].length):-1}function B(de,we,ge){var ae=d.exec(we.slice(ge));return ae?(de.w=h.get(ae[0].toLowerCase()),ge+ae[0].length):-1}function F(de,we,ge){var ae=x.exec(we.slice(ge));return ae?(de.m=w.get(ae[0].toLowerCase()),ge+ae[0].length):-1}function Y(de,we,ge){var ae=v.exec(we.slice(ge));return ae?(de.m=y.get(ae[0].toLowerCase()),ge+ae[0].length):-1}function H(de,we,ge){return k(de,t,we,ge)}function W(de,we,ge){return k(de,n,we,ge)}function V(de,we,ge){return k(de,r,we,ge)}function j(de){return a[de.getDay()]}function I(de){return o[de.getDay()]}function z(de){return s[de.getMonth()]}function U(de){return u[de.getMonth()]}function X(de){return i[+(de.getHours()>=12)]}function q(de){return 1+~~(de.getMonth()/3)}function G(de){return a[de.getUTCDay()]}function ee(de){return o[de.getUTCDay()]}function ue(de){return s[de.getUTCMonth()]}function fe(de){return u[de.getUTCMonth()]}function ie(de){return i[+(de.getUTCHours()>=12)]}function Ae(de){return 1+~~(de.getUTCMonth()/3)}return{format:function(de){var we=C(de+="",S);return we.toString=function(){return de},we},parse:function(de){var we=P(de+="",!1);return we.toString=function(){return de},we},utcFormat:function(de){var we=C(de+="",A);return we.toString=function(){return de},we},utcParse:function(de){var we=P(de+="",!0);return we.toString=function(){return de},we}}}var _9={"-":"",_:" ",0:"0"},vr=/^\s*\d+/,W4e=/^%/,V4e=/[\\^$*+?|[\]().{}]/g;function Ft(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",o=i.length;return r+(o[t.toLowerCase(),n]))}function q4e(e,t,n){var r=vr.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function G4e(e,t,n){var r=vr.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function K4e(e,t,n){var r=vr.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function Y4e(e,t,n){var r=vr.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function Z4e(e,t,n){var r=vr.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function S9(e,t,n){var r=vr.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function C9(e,t,n){var r=vr.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function X4e(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Q4e(e,t,n){var r=vr.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function J4e(e,t,n){var r=vr.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function E9(e,t,n){var r=vr.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function eke(e,t,n){var r=vr.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function A9(e,t,n){var r=vr.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function tke(e,t,n){var r=vr.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function nke(e,t,n){var r=vr.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function rke(e,t,n){var r=vr.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function ike(e,t,n){var r=vr.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function oke(e,t,n){var r=W4e.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function ake(e,t,n){var r=vr.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function uke(e,t,n){var r=vr.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function O9(e,t){return Ft(e.getDate(),t,2)}function ske(e,t){return Ft(e.getHours(),t,2)}function lke(e,t){return Ft(e.getHours()%12||12,t,2)}function cke(e,t){return Ft(1+ig.count(Fu(e),e),t,3)}function WW(e,t){return Ft(e.getMilliseconds(),t,3)}function fke(e,t){return WW(e,t)+"000"}function dke(e,t){return Ft(e.getMonth()+1,t,2)}function hke(e,t){return Ft(e.getMinutes(),t,2)}function pke(e,t){return Ft(e.getSeconds(),t,2)}function mke(e){var t=e.getDay();return t===0?7:t}function gke(e,t){return Ft(ax.count(Fu(e)-1,e),t,2)}function VW(e){var t=e.getDay();return t>=4||t===0?Cd(e):Cd.ceil(e)}function vke(e,t){return e=VW(e),Ft(Cd.count(Fu(e),e)+(Fu(e).getDay()===4),t,2)}function yke(e){return e.getDay()}function bke(e,t){return Ft(J1.count(Fu(e)-1,e),t,2)}function wke(e,t){return Ft(e.getFullYear()%100,t,2)}function xke(e,t){return e=VW(e),Ft(e.getFullYear()%100,t,2)}function _ke(e,t){return Ft(e.getFullYear()%1e4,t,4)}function Ske(e,t){var n=e.getDay();return e=n>=4||n===0?Cd(e):Cd.ceil(e),Ft(e.getFullYear()%1e4,t,4)}function Cke(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Ft(t/60|0,"0",2)+Ft(t%60,"0",2)}function P9(e,t){return Ft(e.getUTCDate(),t,2)}function Eke(e,t){return Ft(e.getUTCHours(),t,2)}function Ake(e,t){return Ft(e.getUTCHours()%12||12,t,2)}function Oke(e,t){return Ft(1+ox.count(Lu(e),e),t,3)}function HW(e,t){return Ft(e.getUTCMilliseconds(),t,3)}function Pke(e,t){return HW(e,t)+"000"}function kke(e,t){return Ft(e.getUTCMonth()+1,t,2)}function Tke(e,t){return Ft(e.getUTCMinutes(),t,2)}function Mke(e,t){return Ft(e.getUTCSeconds(),t,2)}function Rke(e){var t=e.getUTCDay();return t===0?7:t}function Dke(e,t){return Ft(ux.count(Lu(e)-1,e),t,2)}function qW(e){var t=e.getUTCDay();return t>=4||t===0?Ed(e):Ed.ceil(e)}function $ke(e,t){return e=qW(e),Ft(Ed.count(Lu(e),e)+(Lu(e).getUTCDay()===4),t,2)}function Ike(e){return e.getUTCDay()}function Nke(e,t){return Ft(eb.count(Lu(e)-1,e),t,2)}function Fke(e,t){return Ft(e.getUTCFullYear()%100,t,2)}function Lke(e,t){return e=qW(e),Ft(e.getUTCFullYear()%100,t,2)}function jke(e,t){return Ft(e.getUTCFullYear()%1e4,t,4)}function Bke(e,t){var n=e.getUTCDay();return e=n>=4||n===0?Ed(e):Ed.ceil(e),Ft(e.getUTCFullYear()%1e4,t,4)}function zke(){return"+0000"}function k9(){return"%"}function T9(e){return+e}function M9(e){return Math.floor(+e/1e3)}var gf,GW,KW;Uke({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function Uke(e){return gf=U4e(e),GW=gf.format,gf.parse,KW=gf.utcFormat,gf.utcParse,gf}function Wke(e){return new Date(e)}function Vke(e){return e instanceof Date?+e:+new Date(+e)}function DP(e,t,n,r,i,o,a,u,s,l){var c=bP(),d=c.invert,h=c.domain,m=l(".%L"),g=l(":%S"),v=l("%I:%M"),y=l("%I %p"),x=l("%a %d"),w=l("%b %d"),S=l("%B"),A=l("%Y");function E(C){return(s(C)t(i/(e.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(i,o)=>DPe(e,o/r))},n.copy=function(){return QW(t).domain(e)},Hu.apply(n,arguments)}function lx(){var e=0,t=.5,n=1,r=1,i,o,a,u,s,l=Qr,c,d=!1,h;function m(v){return isNaN(v=+v)?h:(v=.5+((v=+c(v))-o)*(r*vt}var Qke=Xke,Jke=nV,e5e=Qke,t5e=hh;function n5e(e){return e&&e.length?Jke(e,t5e,e5e):void 0}var r5e=n5e;const Os=Vt(r5e);function i5e(e,t){return ee.e^o.s<0?1:-1;for(r=o.d.length,i=e.d.length,t=0,n=re.d[t]^o.s<0?1:-1;return r===i?0:r>i^o.s<0?1:-1};ze.decimalPlaces=ze.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*bn;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n};ze.dividedBy=ze.div=function(e){return Au(this,new this.constructor(e))};ze.dividedToIntegerBy=ze.idiv=function(e){var t=this,n=t.constructor;return un(Au(t,new n(e),0,1),n.precision)};ze.equals=ze.eq=function(e){return!this.cmp(e)};ze.exponent=function(){return Kn(this)};ze.greaterThan=ze.gt=function(e){return this.cmp(e)>0};ze.greaterThanOrEqualTo=ze.gte=function(e){return this.cmp(e)>=0};ze.isInteger=ze.isint=function(){return this.e>this.d.length-2};ze.isNegative=ze.isneg=function(){return this.s<0};ze.isPositive=ze.ispos=function(){return this.s>0};ze.isZero=function(){return this.s===0};ze.lessThan=ze.lt=function(e){return this.cmp(e)<0};ze.lessThanOrEqualTo=ze.lte=function(e){return this.cmp(e)<1};ze.logarithm=ze.log=function(e){var t,n=this,r=n.constructor,i=r.precision,o=i+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq(Bi))throw Error(Mo+"NaN");if(n.s<1)throw Error(Mo+(n.s?"NaN":"-Infinity"));return n.eq(Bi)?new r(0):(En=!1,t=Au(X0(n,o),X0(e,o),o),En=!0,un(t,i))};ze.minus=ze.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?aV(t,e):iV(t,(e.s=-e.s,e))};ze.modulo=ze.mod=function(e){var t,n=this,r=n.constructor,i=r.precision;if(e=new r(e),!e.s)throw Error(Mo+"NaN");return n.s?(En=!1,t=Au(n,e,0,1).times(e),En=!0,n.minus(t)):un(new r(n),i)};ze.naturalExponential=ze.exp=function(){return oV(this)};ze.naturalLogarithm=ze.ln=function(){return X0(this)};ze.negated=ze.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};ze.plus=ze.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?iV(t,e):aV(t,(e.s=-e.s,e))};ze.precision=ze.sd=function(e){var t,n,r,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(nc+e);if(t=Kn(i)+1,r=i.d.length-1,n=r*bn+1,r=i.d[r],r){for(;r%10==0;r/=10)n--;for(r=i.d[0];r>=10;r/=10)n++}return e&&t>n?t:n};ze.squareRoot=ze.sqrt=function(){var e,t,n,r,i,o,a,u=this,s=u.constructor;if(u.s<1){if(!u.s)return new s(0);throw Error(Mo+"NaN")}for(e=Kn(u),En=!1,i=Math.sqrt(+u),i==0||i==1/0?(t=Pa(u.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=gh((e+1)/2)-(e<0||e%2),i==1/0?t="5e"+e:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),r=new s(t)):r=new s(i.toString()),n=s.precision,i=a=n+3;;)if(o=r,r=o.plus(Au(u,o,a+2)).times(.5),Pa(o.d).slice(0,a)===(t=Pa(r.d)).slice(0,a)){if(t=t.slice(a-3,a+1),i==a&&t=="4999"){if(un(o,n+1,0),o.times(o).eq(u)){r=o;break}}else if(t!="9999")break;a+=4}return En=!0,un(r,n)};ze.times=ze.mul=function(e){var t,n,r,i,o,a,u,s,l,c=this,d=c.constructor,h=c.d,m=(e=new d(e)).d;if(!c.s||!e.s)return new d(0);for(e.s*=c.s,n=c.e+e.e,s=h.length,l=m.length,s=0;){for(t=0,i=s+r;i>r;)u=o[i]+m[r]*h[i-r-1]+t,o[i--]=u%fr|0,t=u/fr|0;o[i]=(o[i]+t)%fr|0}for(;!o[--a];)o.pop();return t?++n:o.shift(),e.d=o,e.e=n,En?un(e,d.precision):e};ze.toDecimalPlaces=ze.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(Ua(e,0,mh),t===void 0?t=r.rounding:Ua(t,0,8),un(n,e+Kn(n)+1,t))};ze.toExponential=function(e,t){var n,r=this,i=r.constructor;return e===void 0?n=Cc(r,!0):(Ua(e,0,mh),t===void 0?t=i.rounding:Ua(t,0,8),r=un(new i(r),e+1,t),n=Cc(r,!0,e+1)),n};ze.toFixed=function(e,t){var n,r,i=this,o=i.constructor;return e===void 0?Cc(i):(Ua(e,0,mh),t===void 0?t=o.rounding:Ua(t,0,8),r=un(new o(i),e+Kn(i)+1,t),n=Cc(r.abs(),!1,e+Kn(r)+1),i.isneg()&&!i.isZero()?"-"+n:n)};ze.toInteger=ze.toint=function(){var e=this,t=e.constructor;return un(new t(e),Kn(e)+1,t.rounding)};ze.toNumber=function(){return+this};ze.toPower=ze.pow=function(e){var t,n,r,i,o,a,u=this,s=u.constructor,l=12,c=+(e=new s(e));if(!e.s)return new s(Bi);if(u=new s(u),!u.s){if(e.s<1)throw Error(Mo+"Infinity");return u}if(u.eq(Bi))return u;if(r=s.precision,e.eq(Bi))return un(u,r);if(t=e.e,n=e.d.length-1,a=t>=n,o=u.s,a){if((n=c<0?-c:c)<=rV){for(i=new s(Bi),t=Math.ceil(r/bn+4),En=!1;n%2&&(i=i.times(u),$9(i.d,t)),n=gh(n/2),n!==0;)u=u.times(u),$9(u.d,t);return En=!0,e.s<0?new s(Bi).div(i):un(i,r)}}else if(o<0)throw Error(Mo+"NaN");return o=o<0&&e.d[Math.max(t,n)]&1?-1:1,u.s=1,En=!1,i=e.times(X0(u,r+l)),En=!0,i=oV(i),i.s=o,i};ze.toPrecision=function(e,t){var n,r,i=this,o=i.constructor;return e===void 0?(n=Kn(i),r=Cc(i,n<=o.toExpNeg||n>=o.toExpPos)):(Ua(e,1,mh),t===void 0?t=o.rounding:Ua(t,0,8),i=un(new o(i),e,t),n=Kn(i),r=Cc(i,e<=n||n<=o.toExpNeg,e)),r};ze.toSignificantDigits=ze.tosd=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(Ua(e,1,mh),t===void 0?t=r.rounding:Ua(t,0,8)),un(new r(n),e,t)};ze.toString=ze.valueOf=ze.val=ze.toJSON=ze[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=Kn(e),n=e.constructor;return Cc(e,t<=n.toExpNeg||t>=n.toExpPos)};function iV(e,t){var n,r,i,o,a,u,s,l,c=e.constructor,d=c.precision;if(!e.s||!t.s)return t.s||(t=new c(e)),En?un(t,d):t;if(s=e.d,l=t.d,a=e.e,i=t.e,s=s.slice(),o=a-i,o){for(o<0?(r=s,o=-o,u=l.length):(r=l,i=a,u=s.length),a=Math.ceil(d/bn),u=a>u?a+1:u+1,o>u&&(o=u,r.length=1),r.reverse();o--;)r.push(0);r.reverse()}for(u=s.length,o=l.length,u-o<0&&(o=u,r=l,l=s,s=r),n=0;o;)n=(s[--o]=s[o]+l[o]+n)/fr|0,s[o]%=fr;for(n&&(s.unshift(n),++i),u=s.length;s[--u]==0;)s.pop();return t.d=s,t.e=i,En?un(t,d):t}function Ua(e,t,n){if(e!==~~e||en)throw Error(nc+e)}function Pa(e){var t,n,r,i=e.length-1,o="",a=e[0];if(i>0){for(o+=a,t=1;ta?1:-1;else for(u=s=0;ui[u]?1:-1;break}return s}function n(r,i,o){for(var a=0;o--;)r[o]-=a,a=r[o]1;)r.shift()}return function(r,i,o,a){var u,s,l,c,d,h,m,g,v,y,x,w,S,A,E,C,P,k,M=r.constructor,L=r.s==i.s?1:-1,B=r.d,F=i.d;if(!r.s)return new M(r);if(!i.s)throw Error(Mo+"Division by zero");for(s=r.e-i.e,P=F.length,E=B.length,m=new M(L),g=m.d=[],l=0;F[l]==(B[l]||0);)++l;if(F[l]>(B[l]||0)&&--s,o==null?w=o=M.precision:a?w=o+(Kn(r)-Kn(i))+1:w=o,w<0)return new M(0);if(w=w/bn+2|0,l=0,P==1)for(c=0,F=F[0],w++;(l1&&(F=e(F,c),B=e(B,c),P=F.length,E=B.length),A=P,v=B.slice(0,P),y=v.length;y=fr/2&&++C;do c=0,u=t(F,v,P,y),u<0?(x=v[0],P!=y&&(x=x*fr+(v[1]||0)),c=x/C|0,c>1?(c>=fr&&(c=fr-1),d=e(F,c),h=d.length,y=v.length,u=t(d,v,h,y),u==1&&(c--,n(d,P16)throw Error(NP+Kn(e));if(!e.s)return new c(Bi);for(t==null?(En=!1,u=d):u=t,a=new c(.03125);e.abs().gte(.1);)e=e.times(a),l+=5;for(r=Math.log(Nl(2,l))/Math.LN10*2+5|0,u+=r,n=i=o=new c(Bi),c.precision=u;;){if(i=un(i.times(e),u),n=n.times(++s),a=o.plus(Au(i,n,u)),Pa(a.d).slice(0,u)===Pa(o.d).slice(0,u)){for(;l--;)o=un(o.times(o),u);return c.precision=d,t==null?(En=!0,un(o,d)):o}o=a}}function Kn(e){for(var t=e.e*bn,n=e.d[0];n>=10;n/=10)t++;return t}function _S(e,t,n){if(t>e.LN10.sd())throw En=!0,n&&(e.precision=n),Error(Mo+"LN10 precision limit exceeded");return un(new e(e.LN10),t)}function vs(e){for(var t="";e--;)t+="0";return t}function X0(e,t){var n,r,i,o,a,u,s,l,c,d=1,h=10,m=e,g=m.d,v=m.constructor,y=v.precision;if(m.s<1)throw Error(Mo+(m.s?"NaN":"-Infinity"));if(m.eq(Bi))return new v(0);if(t==null?(En=!1,l=y):l=t,m.eq(10))return t==null&&(En=!0),_S(v,l);if(l+=h,v.precision=l,n=Pa(g),r=n.charAt(0),o=Kn(m),Math.abs(o)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)m=m.times(e),n=Pa(m.d),r=n.charAt(0),d++;o=Kn(m),r>1?(m=new v("0."+n),o++):m=new v(r+"."+n.slice(1))}else return s=_S(v,l+2,y).times(o+""),m=X0(new v(r+"."+n.slice(1)),l-h).plus(s),v.precision=y,t==null?(En=!0,un(m,y)):m;for(u=a=m=Au(m.minus(Bi),m.plus(Bi),l),c=un(m.times(m),l),i=3;;){if(a=un(a.times(c),l),s=u.plus(Au(a,new v(i),l)),Pa(s.d).slice(0,l)===Pa(u.d).slice(0,l))return u=u.times(2),o!==0&&(u=u.plus(_S(v,l+2,y).times(o+""))),u=Au(u,new v(d),l),v.precision=y,t==null?(En=!0,un(u,y)):u;u=s,i+=2}}function D9(e,t){var n,r,i;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;t.charCodeAt(r)===48;)++r;for(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(r,i),t){if(i-=r,n=n-r-1,e.e=gh(n/bn),e.d=[],r=(n+1)%bn,n<0&&(r+=bn),rtb||e.e<-tb))throw Error(NP+n)}else e.s=0,e.e=0,e.d=[0];return e}function un(e,t,n){var r,i,o,a,u,s,l,c,d=e.d;for(a=1,o=d[0];o>=10;o/=10)a++;if(r=t-a,r<0)r+=bn,i=t,l=d[c=0];else{if(c=Math.ceil((r+1)/bn),o=d.length,c>=o)return e;for(l=o=d[c],a=1;o>=10;o/=10)a++;r%=bn,i=r-bn+a}if(n!==void 0&&(o=Nl(10,a-i-1),u=l/o%10|0,s=t<0||d[c+1]!==void 0||l%o,s=n<4?(u||s)&&(n==0||n==(e.s<0?3:2)):u>5||u==5&&(n==4||s||n==6&&(r>0?i>0?l/Nl(10,a-i):0:d[c-1])%10&1||n==(e.s<0?8:7))),t<1||!d[0])return s?(o=Kn(e),d.length=1,t=t-o-1,d[0]=Nl(10,(bn-t%bn)%bn),e.e=gh(-t/bn)||0):(d.length=1,d[0]=e.e=e.s=0),e;if(r==0?(d.length=c,o=1,c--):(d.length=c+1,o=Nl(10,bn-r),d[c]=i>0?(l/Nl(10,a-i)%Nl(10,i)|0)*o:0),s)for(;;)if(c==0){(d[0]+=o)==fr&&(d[0]=1,++e.e);break}else{if(d[c]+=o,d[c]!=fr)break;d[c--]=0,o=1}for(r=d.length;d[--r]===0;)d.pop();if(En&&(e.e>tb||e.e<-tb))throw Error(NP+Kn(e));return e}function aV(e,t){var n,r,i,o,a,u,s,l,c,d,h=e.constructor,m=h.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new h(e),En?un(t,m):t;if(s=e.d,d=t.d,r=t.e,l=e.e,s=s.slice(),a=l-r,a){for(c=a<0,c?(n=s,a=-a,u=d.length):(n=d,r=l,u=s.length),i=Math.max(Math.ceil(m/bn),u)+2,a>i&&(a=i,n.length=1),n.reverse(),i=a;i--;)n.push(0);n.reverse()}else{for(i=s.length,u=d.length,c=i0;--i)s[u++]=0;for(i=d.length;i>a;){if(s[--i]0?o=o.charAt(0)+"."+o.slice(1)+vs(r):a>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(i<0?"e":"e+")+i):i<0?(o="0."+vs(-i-1)+o,n&&(r=n-a)>0&&(o+=vs(r))):i>=a?(o+=vs(i+1-a),n&&(r=n-i-1)>0&&(o=o+"."+vs(r))):((r=i+1)0&&(i+1===a&&(o+="."),o+=vs(r))),e.s<0?"-"+o:o}function $9(e,t){if(e.length>t)return e.length=t,!0}function uV(e){var t,n,r;function i(o){var a=this;if(!(a instanceof i))return new i(o);if(a.constructor=i,o instanceof i){a.s=o.s,a.e=o.e,a.d=(o=o.d)?o.slice():o;return}if(typeof o=="number"){if(o*0!==0)throw Error(nc+o);if(o>0)a.s=1;else if(o<0)o=-o,a.s=-1;else{a.s=0,a.e=0,a.d=[0];return}if(o===~~o&&o<1e7){a.e=0,a.d=[o];return}return D9(a,o.toString())}else if(typeof o!="string")throw Error(nc+o);if(o.charCodeAt(0)===45?(o=o.slice(1),a.s=-1):a.s=1,A5e.test(o))D9(a,o);else throw Error(nc+o)}if(i.prototype=ze,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=uV,i.config=i.set=O5e,e===void 0&&(e={}),e)for(r=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t=i[t+1]&&r<=i[t+2])this[n]=r;else throw Error(nc+n+": "+r);if((r=e[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error(nc+n+": "+r);return this}var FP=uV(E5e);Bi=new FP(1);const Jt=FP;function P5e(e){return R5e(e)||M5e(e)||T5e(e)||k5e()}function k5e(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function T5e(e,t){if(e){if(typeof e=="string")return xE(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return xE(e,t)}}function M5e(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function R5e(e){if(Array.isArray(e))return xE(e)}function xE(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=t?n.apply(void 0,i):e(t-a,I9(function(){for(var u=arguments.length,s=new Array(u),l=0;le.length)&&(t=e.length);for(var n=0,r=new Array(t);n"u"||!(Symbol.iterator in Object(e)))){var n=[],r=!0,i=!1,o=void 0;try{for(var a=e[Symbol.iterator](),u;!(r=(u=a.next()).done)&&(n.push(u.value),!(t&&n.length===t));r=!0);}catch(s){i=!0,o=s}finally{try{!r&&a.return!=null&&a.return()}finally{if(i)throw o}}return n}}function G5e(e){if(Array.isArray(e))return e}function dV(e){var t=Q0(e,2),n=t[0],r=t[1],i=n,o=r;return n>r&&(i=r,o=n),[i,o]}function hV(e,t,n){if(e.lte(0))return new Jt(0);var r=dx.getDigitCount(e.toNumber()),i=new Jt(10).pow(r),o=e.div(i),a=r!==1?.05:.1,u=new Jt(Math.ceil(o.div(a).toNumber())).add(n).mul(a),s=u.mul(i);return t?s:new Jt(Math.ceil(s))}function K5e(e,t,n){var r=1,i=new Jt(e);if(!i.isint()&&n){var o=Math.abs(e);o<1?(r=new Jt(10).pow(dx.getDigitCount(e)-1),i=new Jt(Math.floor(i.div(r).toNumber())).mul(r)):o>1&&(i=new Jt(Math.floor(e)))}else e===0?i=new Jt(Math.floor((t-1)/2)):n||(i=new Jt(Math.floor(e)));var a=Math.floor((t-1)/2),u=N5e(I5e(function(s){return i.add(new Jt(s-a).mul(r)).toNumber()}),_E);return u(0,t)}function pV(e,t,n,r){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(n-1)))return{step:new Jt(0),tickMin:new Jt(0),tickMax:new Jt(0)};var o=hV(new Jt(t).sub(e).div(n-1),r,i),a;e<=0&&t>=0?a=new Jt(0):(a=new Jt(e).add(t).div(2),a=a.sub(new Jt(a).mod(o)));var u=Math.ceil(a.sub(e).div(o).toNumber()),s=Math.ceil(new Jt(t).sub(a).div(o).toNumber()),l=u+s+1;return l>n?pV(e,t,n,r,i+1):(l0?s+(n-l):s,u=t>0?u:u+(n-l)),{step:o,tickMin:a.sub(new Jt(u).mul(o)),tickMax:a.add(new Jt(s).mul(o))})}function Y5e(e){var t=Q0(e,2),n=t[0],r=t[1],i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,a=Math.max(i,2),u=dV([n,r]),s=Q0(u,2),l=s[0],c=s[1];if(l===-1/0||c===1/0){var d=c===1/0?[l].concat(CE(_E(0,i-1).map(function(){return 1/0}))):[].concat(CE(_E(0,i-1).map(function(){return-1/0})),[c]);return n>r?SE(d):d}if(l===c)return K5e(l,i,o);var h=pV(l,c,a,o),m=h.step,g=h.tickMin,v=h.tickMax,y=dx.rangeStep(g,v.add(new Jt(.1).mul(m)),m);return n>r?SE(y):y}function Z5e(e,t){var n=Q0(e,2),r=n[0],i=n[1],o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,a=dV([r,i]),u=Q0(a,2),s=u[0],l=u[1];if(s===-1/0||l===1/0)return[r,i];if(s===l)return[s];var c=Math.max(t,2),d=hV(new Jt(l).sub(s).div(c-1),o,0),h=[].concat(CE(dx.rangeStep(new Jt(s),new Jt(l).sub(new Jt(.99).mul(d)),d)),[l]);return r>i?SE(h):h}var X5e=cV(Y5e),Q5e=cV(Z5e),J5e="Invariant failed";function Ec(e,t){throw new Error(J5e)}var e8e=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function Ad(e){"@babel/helpers - typeof";return Ad=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ad(e)}function nb(){return nb=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function u8e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function s8e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l8e(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0,o=arguments.length>3?arguments[3]:void 0,a=-1,u=(n=r?.length)!==null&&n!==void 0?n:0;if(u<=1)return 0;if(o&&o.axisType==="angleAxis"&&Math.abs(Math.abs(o.range[1]-o.range[0])-360)<=1e-6)for(var s=o.range,l=0;l0?i[l-1].coordinate:i[u-1].coordinate,d=i[l].coordinate,h=l>=u-1?i[0].coordinate:i[l+1].coordinate,m=void 0;if(ea(d-c)!==ea(h-d)){var g=[];if(ea(h-d)===ea(s[1]-s[0])){m=h;var v=d+s[1]-s[0];g[0]=Math.min(v,(v+c)/2),g[1]=Math.max(v,(v+c)/2)}else{m=c;var y=h+s[1]-s[0];g[0]=Math.min(d,(y+d)/2),g[1]=Math.max(d,(y+d)/2)}var x=[Math.min(d,(m+d)/2),Math.max(d,(m+d)/2)];if(t>x[0]&&t<=x[1]||t>=g[0]&&t<=g[1]){a=i[l].index;break}}else{var w=Math.min(c,h),S=Math.max(c,h);if(t>(w+d)/2&&t<=(S+d)/2){a=i[l].index;break}}}else for(var A=0;A0&&A(r[A].coordinate+r[A-1].coordinate)/2&&t<=(r[A].coordinate+r[A+1].coordinate)/2||A===u-1&&t>(r[A].coordinate+r[A-1].coordinate)/2){a=r[A].index;break}return a},LP=function(t){var n,r=t,i=r.type.displayName,o=(n=t.type)!==null&&n!==void 0&&n.defaultProps?In(In({},t.type.defaultProps),t.props):t.props,a=o.stroke,u=o.fill,s;switch(i){case"Line":s=a;break;case"Area":case"Radar":s=a&&a!=="none"?a:u;break;default:s=u;break}return s},A8e=function(t){var n=t.barSize,r=t.totalSize,i=t.stackGroups,o=i===void 0?{}:i;if(!o)return{};for(var a={},u=Object.keys(o),s=0,l=u.length;s=0});if(x&&x.length){var w=x[0].type.defaultProps,S=w!==void 0?In(In({},w),x[0].props):x[0].props,A=S.barSize,E=S[y];a[E]||(a[E]=[]);var C=ft(A)?n:A;a[E].push({item:x[0],stackList:x.slice(1),barSize:ft(C)?void 0:_c(C,r,0)})}}return a},O8e=function(t){var n=t.barGap,r=t.barCategoryGap,i=t.bandSize,o=t.sizeList,a=o===void 0?[]:o,u=t.maxBarSize,s=a.length;if(s<1)return null;var l=_c(n,i,0,!0),c,d=[];if(a[0].barSize===+a[0].barSize){var h=!1,m=i/s,g=a.reduce(function(A,E){return A+E.barSize||0},0);g+=(s-1)*l,g>=i&&(g-=(s-1)*l,l=0),g>=i&&m>0&&(h=!0,m*=.9,g=s*m);var v=(i-g)/2>>0,y={offset:v-l,size:0};c=a.reduce(function(A,E){var C={item:E.item,position:{offset:y.offset+y.size+l,size:h?m:E.barSize}},P=[].concat(L9(A),[C]);return y=P[P.length-1].position,E.stackList&&E.stackList.length&&E.stackList.forEach(function(k){P.push({item:k,position:y})}),P},d)}else{var x=_c(r,i,0,!0);i-2*x-(s-1)*l<=0&&(l=0);var w=(i-2*x-(s-1)*l)/s;w>1&&(w>>=0);var S=u===+u?Math.min(w,u):w;c=a.reduce(function(A,E,C){var P=[].concat(L9(A),[{item:E.item,position:{offset:x+(w+l)*C+(w-S)/2,size:S}}]);return E.stackList&&E.stackList.length&&E.stackList.forEach(function(k){P.push({item:k,position:P[P.length-1].position})}),P},d)}return c},P8e=function(t,n,r,i){var o=r.children,a=r.width,u=r.margin,s=a-(u.left||0)-(u.right||0),l=yV({children:o,legendWidth:s});if(l){var c=i||{},d=c.width,h=c.height,m=l.align,g=l.verticalAlign,v=l.layout;if((v==="vertical"||v==="horizontal"&&g==="middle")&&m!=="center"&&Pe(t[m]))return In(In({},t),{},nd({},m,t[m]+(d||0)));if((v==="horizontal"||v==="vertical"&&m==="center")&&g!=="middle"&&Pe(t[g]))return In(In({},t),{},nd({},g,t[g]+(h||0)))}return t},k8e=function(t,n,r){return ft(n)?!0:t==="horizontal"?n==="yAxis":t==="vertical"||r==="x"?n==="xAxis":r==="y"?n==="yAxis":!0},bV=function(t,n,r,i,o){var a=n.props.children,u=xi(a,vh).filter(function(l){return k8e(i,o,l.props.direction)});if(u&&u.length){var s=u.map(function(l){return l.props.dataKey});return t.reduce(function(l,c){var d=ar(c,r);if(ft(d))return l;var h=Array.isArray(d)?[cx(d),Os(d)]:[d,d],m=s.reduce(function(g,v){var y=ar(c,v,0),x=h[0]-Math.abs(Array.isArray(y)?y[0]:y),w=h[1]+Math.abs(Array.isArray(y)?y[1]:y);return[Math.min(x,g[0]),Math.max(w,g[1])]},[1/0,-1/0]);return[Math.min(m[0],l[0]),Math.max(m[1],l[1])]},[1/0,-1/0])}return null},T8e=function(t,n,r,i,o){var a=n.map(function(u){return bV(t,u,r,o,i)}).filter(function(u){return!ft(u)});return a&&a.length?a.reduce(function(u,s){return[Math.min(u[0],s[0]),Math.max(u[1],s[1])]},[1/0,-1/0]):null},wV=function(t,n,r,i,o){var a=n.map(function(s){var l=s.props.dataKey;return r==="number"&&l&&bV(t,s,l,i)||Vp(t,l,r,o)});if(r==="number")return a.reduce(function(s,l){return[Math.min(s[0],l[0]),Math.max(s[1],l[1])]},[1/0,-1/0]);var u={};return a.reduce(function(s,l){for(var c=0,d=l.length;c=2?ea(u[0]-u[1])*2*l:l,n&&(t.ticks||t.niceTicks)){var c=(t.ticks||t.niceTicks).map(function(d){var h=o?o.indexOf(d):d;return{coordinate:i(h)+l,value:d,offset:l}});return c.filter(function(d){return!ch(d.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(d,h){return{coordinate:i(d)+l,value:d,index:h,offset:l}}):i.ticks&&!r?i.ticks(t.tickCount).map(function(d){return{coordinate:i(d)+l,value:d,offset:l}}):i.domain().map(function(d,h){return{coordinate:i(d)+l,value:o?o[d]:d,index:h,offset:l}})},SS=new WeakMap,Bv=function(t,n){if(typeof n!="function")return t;SS.has(t)||SS.set(t,new WeakMap);var r=SS.get(t);if(r.has(n))return r.get(n);var i=function(){t.apply(void 0,arguments),n.apply(void 0,arguments)};return r.set(n,i),i},M8e=function(t,n,r){var i=t.scale,o=t.type,a=t.layout,u=t.axisType;if(i==="auto")return a==="radial"&&u==="radiusAxis"?{scale:q0(),realScaleType:"band"}:a==="radial"&&u==="angleAxis"?{scale:X1(),realScaleType:"linear"}:o==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!r)?{scale:Wp(),realScaleType:"point"}:o==="category"?{scale:q0(),realScaleType:"band"}:{scale:X1(),realScaleType:"linear"};if(Jm(i)){var s="scale".concat(Zw(i));return{scale:(R9[s]||Wp)(),realScaleType:R9[s]?s:"point"}}return ht(i)?{scale:i}:{scale:Wp(),realScaleType:"point"}},B9=1e-4,R8e=function(t){var n=t.domain();if(!(!n||n.length<=2)){var r=n.length,i=t.range(),o=Math.min(i[0],i[1])-B9,a=Math.max(i[0],i[1])+B9,u=t(n[0]),s=t(n[r-1]);(ua||sa)&&t.domain([n[0],n[r-1]])}},D8e=function(t,n){if(!t)return null;for(var r=0,i=t.length;ri)&&(o[1]=i),o[0]>i&&(o[0]=i),o[1]=0?(t[u][r][0]=o,t[u][r][1]=o+s,o=t[u][r][1]):(t[u][r][0]=a,t[u][r][1]=a+s,a=t[u][r][1])}},N8e=function(t){var n=t.length;if(!(n<=0))for(var r=0,i=t[0].length;r=0?(t[a][r][0]=o,t[a][r][1]=o+u,o=t[a][r][1]):(t[a][r][0]=0,t[a][r][1]=0)}},F8e={sign:I8e,expand:Qxe,none:yd,silhouette:Jxe,wiggle:e2e,positive:N8e},L8e=function(t,n,r){var i=n.map(function(u){return u.props.dataKey}),o=F8e[r],a=Xxe().keys(i).value(function(u,s){return+ar(u,s,0)}).order(Q3).offset(o);return a(t)},j8e=function(t,n,r,i,o,a){if(!t)return null;var u=a?n.reverse():n,s={},l=u.reduce(function(d,h){var m,g=(m=h.type)!==null&&m!==void 0&&m.defaultProps?In(In({},h.type.defaultProps),h.props):h.props,v=g.stackId,y=g.hide;if(y)return d;var x=g[r],w=d[x]||{hasStack:!1,stackGroups:{}};if(or(v)){var S=w.stackGroups[v]||{numericAxisId:r,cateAxisId:i,items:[]};S.items.push(h),w.hasStack=!0,w.stackGroups[v]=S}else w.stackGroups[Lc("_stackId_")]={numericAxisId:r,cateAxisId:i,items:[h]};return In(In({},d),{},nd({},x,w))},s),c={};return Object.keys(l).reduce(function(d,h){var m=l[h];if(m.hasStack){var g={};m.stackGroups=Object.keys(m.stackGroups).reduce(function(v,y){var x=m.stackGroups[y];return In(In({},v),{},nd({},y,{numericAxisId:r,cateAxisId:i,items:x.items,stackedData:L8e(t,x.items,o)}))},g)}return In(In({},d),{},nd({},h,m))},c)},B8e=function(t,n){var r=n.realScaleType,i=n.type,o=n.tickCount,a=n.originalDomain,u=n.allowDecimals,s=r||n.scale;if(s!=="auto"&&s!=="linear")return null;if(o&&i==="number"&&a&&(a[0]==="auto"||a[1]==="auto")){var l=t.domain();if(!l.length)return null;var c=X5e(l,o,u);return t.domain([cx(c),Os(c)]),{niceTicks:c}}if(o&&i==="number"){var d=t.domain(),h=Q5e(d,o,u);return{niceTicks:h}}return null};function Od(e){var t=e.axis,n=e.ticks,r=e.bandSize,i=e.entry,o=e.index,a=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!ft(i[t.dataKey])){var u=k1(n,"value",i[t.dataKey]);if(u)return u.coordinate+r/2}return n[o]?n[o].coordinate+r/2:null}var s=ar(i,ft(a)?t.dataKey:a);return ft(s)?null:t.scale(s)}var z9=function(t){var n=t.axis,r=t.ticks,i=t.offset,o=t.bandSize,a=t.entry,u=t.index;if(n.type==="category")return r[u]?r[u].coordinate+i:null;var s=ar(a,n.dataKey,n.domain[u]);return ft(s)?null:n.scale(s)-o/2+i},z8e=function(t){var n=t.numericAxis,r=n.scale.domain();if(n.type==="number"){var i=Math.min(r[0],r[1]),o=Math.max(r[0],r[1]);return i<=0&&o>=0?0:o<0?o:i}return r[0]},U8e=function(t,n){var r,i=(r=t.type)!==null&&r!==void 0&&r.defaultProps?In(In({},t.type.defaultProps),t.props):t.props,o=i.stackId;if(or(o)){var a=n[o];if(a){var u=a.items.indexOf(t);return u>=0?a.stackedData[u]:null}}return null},W8e=function(t){return t.reduce(function(n,r){return[cx(r.concat([n[0]]).filter(Pe)),Os(r.concat([n[1]]).filter(Pe))]},[1/0,-1/0])},SV=function(t,n,r){return Object.keys(t).reduce(function(i,o){var a=t[o],u=a.stackedData,s=u.reduce(function(l,c){var d=W8e(c.slice(n,r+1));return[Math.min(l[0],d[0]),Math.max(l[1],d[1])]},[1/0,-1/0]);return[Math.min(s[0],i[0]),Math.max(s[1],i[1])]},[1/0,-1/0]).map(function(i){return i===1/0||i===-1/0?0:i})},U9=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,W9=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,PE=function(t,n,r){if(ht(t))return t(n,r);if(!Array.isArray(t))return n;var i=[];if(Pe(t[0]))i[0]=r?t[0]:Math.min(t[0],n[0]);else if(U9.test(t[0])){var o=+U9.exec(t[0])[1];i[0]=n[0]-o}else ht(t[0])?i[0]=t[0](n[0]):i[0]=n[0];if(Pe(t[1]))i[1]=r?t[1]:Math.max(t[1],n[1]);else if(W9.test(t[1])){var a=+W9.exec(t[1])[1];i[1]=n[1]+a}else ht(t[1])?i[1]=t[1](n[1]):i[1]=n[1];return i},ib=function(t,n,r){if(t&&t.scale&&t.scale.bandwidth){var i=t.scale.bandwidth();if(!r||i>0)return i}if(t&&n&&n.length>=2){for(var o=fP(n,function(d){return d.coordinate}),a=1/0,u=1,s=o.length;ua&&(l=2*Math.PI-l),{radius:u,angle:G8e(l),angleInRadian:l}},Z8e=function(t){var n=t.startAngle,r=t.endAngle,i=Math.floor(n/360),o=Math.floor(r/360),a=Math.min(i,o);return{startAngle:n-a*360,endAngle:r-a*360}},X8e=function(t,n){var r=n.startAngle,i=n.endAngle,o=Math.floor(r/360),a=Math.floor(i/360),u=Math.min(o,a);return t+u*360},G9=function(t,n){var r=t.x,i=t.y,o=Y8e({x:r,y:i},n),a=o.radius,u=o.angle,s=n.innerRadius,l=n.outerRadius;if(al)return!1;if(a===0)return!0;var c=Z8e(n),d=c.startAngle,h=c.endAngle,m=u,g;if(d<=h){for(;m>h;)m-=360;for(;m=d&&m<=h}else{for(;m>d;)m-=360;for(;m=h&&m<=d}return g?q9(q9({},n),{},{radius:a,angle:X8e(m,n)}):null};function nm(e){"@babel/helpers - typeof";return nm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},nm(e)}var Q8e=["offset"];function J8e(e){return rTe(e)||nTe(e)||tTe(e)||eTe()}function eTe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function tTe(e,t){if(e){if(typeof e=="string")return kE(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return kE(e,t)}}function nTe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function rTe(e){if(Array.isArray(e))return kE(e)}function kE(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function oTe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function K9(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function er(e){for(var t=1;t=0?1:-1,S,A;i==="insideStart"?(S=m+w*a,A=v):i==="insideEnd"?(S=g-w*a,A=!v):i==="end"&&(S=g+w*a,A=v),A=x<=0?A:!A;var E=Er(l,c,y,S),C=Er(l,c,y,S+(A?1:-1)*359),P="M".concat(E.x,",").concat(E.y,` - A`).concat(y,",").concat(y,",0,1,").concat(A?0:1,`, - `).concat(C.x,",").concat(C.y),k=ft(t.id)?Lc("recharts-radial-line-"):t.id;return $.createElement("text",rm({},r,{dominantBaseline:"central",className:Pt("recharts-radial-bar-label",u)}),$.createElement("defs",null,$.createElement("path",{id:k,d:P})),$.createElement("textPath",{xlinkHref:"#".concat(k)},n))},dTe=function(t){var n=t.viewBox,r=t.offset,i=t.position,o=n,a=o.cx,u=o.cy,s=o.innerRadius,l=o.outerRadius,c=o.startAngle,d=o.endAngle,h=(c+d)/2;if(i==="outside"){var m=Er(a,u,l+r,h),g=m.x,v=m.y;return{x:g,y:v,textAnchor:g>=a?"start":"end",verticalAnchor:"middle"}}if(i==="center")return{x:a,y:u,textAnchor:"middle",verticalAnchor:"middle"};if(i==="centerTop")return{x:a,y:u,textAnchor:"middle",verticalAnchor:"start"};if(i==="centerBottom")return{x:a,y:u,textAnchor:"middle",verticalAnchor:"end"};var y=(s+l)/2,x=Er(a,u,y,h),w=x.x,S=x.y;return{x:w,y:S,textAnchor:"middle",verticalAnchor:"middle"}},hTe=function(t){var n=t.viewBox,r=t.parentViewBox,i=t.offset,o=t.position,a=n,u=a.x,s=a.y,l=a.width,c=a.height,d=c>=0?1:-1,h=d*i,m=d>0?"end":"start",g=d>0?"start":"end",v=l>=0?1:-1,y=v*i,x=v>0?"end":"start",w=v>0?"start":"end";if(o==="top"){var S={x:u+l/2,y:s-d*i,textAnchor:"middle",verticalAnchor:m};return er(er({},S),r?{height:Math.max(s-r.y,0),width:l}:{})}if(o==="bottom"){var A={x:u+l/2,y:s+c+h,textAnchor:"middle",verticalAnchor:g};return er(er({},A),r?{height:Math.max(r.y+r.height-(s+c),0),width:l}:{})}if(o==="left"){var E={x:u-y,y:s+c/2,textAnchor:x,verticalAnchor:"middle"};return er(er({},E),r?{width:Math.max(E.x-r.x,0),height:c}:{})}if(o==="right"){var C={x:u+l+y,y:s+c/2,textAnchor:w,verticalAnchor:"middle"};return er(er({},C),r?{width:Math.max(r.x+r.width-C.x,0),height:c}:{})}var P=r?{width:l,height:c}:{};return o==="insideLeft"?er({x:u+y,y:s+c/2,textAnchor:w,verticalAnchor:"middle"},P):o==="insideRight"?er({x:u+l-y,y:s+c/2,textAnchor:x,verticalAnchor:"middle"},P):o==="insideTop"?er({x:u+l/2,y:s+h,textAnchor:"middle",verticalAnchor:g},P):o==="insideBottom"?er({x:u+l/2,y:s+c-h,textAnchor:"middle",verticalAnchor:m},P):o==="insideTopLeft"?er({x:u+y,y:s+h,textAnchor:w,verticalAnchor:g},P):o==="insideTopRight"?er({x:u+l-y,y:s+h,textAnchor:x,verticalAnchor:g},P):o==="insideBottomLeft"?er({x:u+y,y:s+c-h,textAnchor:w,verticalAnchor:m},P):o==="insideBottomRight"?er({x:u+l-y,y:s+c-h,textAnchor:x,verticalAnchor:m},P):ah(o)&&(Pe(o.x)||ql(o.x))&&(Pe(o.y)||ql(o.y))?er({x:u+_c(o.x,l),y:s+_c(o.y,c),textAnchor:"end",verticalAnchor:"end"},P):er({x:u+l/2,y:s+c/2,textAnchor:"middle",verticalAnchor:"middle"},P)},pTe=function(t){return"cx"in t&&Pe(t.cx)};function Fr(e){var t=e.offset,n=t===void 0?5:t,r=iTe(e,Q8e),i=er({offset:n},r),o=i.viewBox,a=i.position,u=i.value,s=i.children,l=i.content,c=i.className,d=c===void 0?"":c,h=i.textBreakAll;if(!o||ft(u)&&ft(s)&&!b.isValidElement(l)&&!ht(l))return null;if(b.isValidElement(l))return b.cloneElement(l,i);var m;if(ht(l)){if(m=b.createElement(l,i),b.isValidElement(m))return m}else m=lTe(i);var g=pTe(o),v=ct(i,!0);if(g&&(a==="insideStart"||a==="insideEnd"||a==="end"))return fTe(i,m,v);var y=g?dTe(i):hTe(i);return $.createElement(V1,rm({className:Pt("recharts-label",d)},v,y,{breakAll:h}),m)}Fr.displayName="Label";var EV=function(t){var n=t.cx,r=t.cy,i=t.angle,o=t.startAngle,a=t.endAngle,u=t.r,s=t.radius,l=t.innerRadius,c=t.outerRadius,d=t.x,h=t.y,m=t.top,g=t.left,v=t.width,y=t.height,x=t.clockWise,w=t.labelViewBox;if(w)return w;if(Pe(v)&&Pe(y)){if(Pe(d)&&Pe(h))return{x:d,y:h,width:v,height:y};if(Pe(m)&&Pe(g))return{x:m,y:g,width:v,height:y}}return Pe(d)&&Pe(h)?{x:d,y:h,width:0,height:0}:Pe(n)&&Pe(r)?{cx:n,cy:r,startAngle:o||i||0,endAngle:a||i||0,innerRadius:l||0,outerRadius:c||s||u||0,clockWise:x}:t.viewBox?t.viewBox:{}},mTe=function(t,n){return t?t===!0?$.createElement(Fr,{key:"label-implicit",viewBox:n}):or(t)?$.createElement(Fr,{key:"label-implicit",viewBox:n,value:t}):b.isValidElement(t)?t.type===Fr?b.cloneElement(t,{key:"label-implicit",viewBox:n}):$.createElement(Fr,{key:"label-implicit",content:t,viewBox:n}):ht(t)?$.createElement(Fr,{key:"label-implicit",content:t,viewBox:n}):ah(t)?$.createElement(Fr,rm({viewBox:n},t,{key:"label-implicit"})):null:null},gTe=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&r&&!t.label)return null;var i=t.children,o=EV(t),a=xi(i,Fr).map(function(s,l){return b.cloneElement(s,{viewBox:n||o,key:"label-".concat(l)})});if(!r)return a;var u=mTe(t.label,n||o);return[u].concat(J8e(a))};Fr.parseViewBox=EV;Fr.renderCallByParent=gTe;function vTe(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var yTe=vTe;const bTe=Vt(yTe);function im(e){"@babel/helpers - typeof";return im=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},im(e)}var wTe=["valueAccessor"],xTe=["data","dataKey","clockWise","id","textBreakAll"];function _Te(e){return ATe(e)||ETe(e)||CTe(e)||STe()}function STe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function CTe(e,t){if(e){if(typeof e=="string")return TE(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return TE(e,t)}}function ETe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function ATe(e){if(Array.isArray(e))return TE(e)}function TE(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function TTe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var MTe=function(t){return Array.isArray(t.value)?bTe(t.value):t.value};function Fa(e){var t=e.valueAccessor,n=t===void 0?MTe:t,r=X9(e,wTe),i=r.data,o=r.dataKey,a=r.clockWise,u=r.id,s=r.textBreakAll,l=X9(r,xTe);return!i||!i.length?null:$.createElement(jt,{className:"recharts-label-list"},i.map(function(c,d){var h=ft(o)?n(c,d):ar(c&&c.payload,o),m=ft(u)?{}:{id:"".concat(u,"-").concat(d)};return $.createElement(Fr,ab({},ct(c,!0),l,m,{parentViewBox:c.parentViewBox,value:h,textBreakAll:s,viewBox:Fr.parseViewBox(ft(a)?c:Z9(Z9({},c),{},{clockWise:a})),key:"label-".concat(d),index:d}))}))}Fa.displayName="LabelList";function RTe(e,t){return e?e===!0?$.createElement(Fa,{key:"labelList-implicit",data:t}):$.isValidElement(e)||ht(e)?$.createElement(Fa,{key:"labelList-implicit",data:t,content:e}):ah(e)?$.createElement(Fa,ab({data:t},e,{key:"labelList-implicit"})):null:null}function DTe(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&n&&!e.label)return null;var r=e.children,i=xi(r,Fa).map(function(a,u){return b.cloneElement(a,{data:t,key:"labelList-".concat(u)})});if(!n)return i;var o=RTe(e.label,t);return[o].concat(_Te(i))}Fa.renderCallByParent=DTe;function om(e){"@babel/helpers - typeof";return om=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},om(e)}function ME(){return ME=Object.assign?Object.assign.bind():function(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||Va.isSsr)return{width:0,height:0};var r=bPe(n),i=JSON.stringify({text:t,copyStyle:r});if(zf.widthCache[i])return zf.widthCache[i];try{var o=document.getElementById(GD);o||(o=document.createElement("span"),o.setAttribute("id",GD),o.setAttribute("aria-hidden","true"),document.body.appendChild(o));var a=EE(EE({},yPe),r);Object.assign(o.style,a),o.textContent="".concat(t);var u=o.getBoundingClientRect(),s={width:u.width,height:u.height};return zf.widthCache[i]=s,++zf.cacheCount>mPe&&(zf.cacheCount=0,zf.widthCache={}),s}catch{return{width:0,height:0}}},xPe=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function pv(e){"@babel/helpers - typeof";return pv=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pv(e)}function sb(e,t){return CPe(e)||SPe(e,t)||_Pe(e,t)||wPe()}function wPe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _Pe(e,t){if(e){if(typeof e=="string")return YD(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return YD(e,t)}}function YD(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function LPe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function t9(e,t){return UPe(e)||zPe(e,t)||BPe(e,t)||jPe()}function jPe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function BPe(e,t){if(e){if(typeof e=="string")return n9(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return n9(e,t)}}function n9(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&arguments[0]!==void 0?arguments[0]:[];return G.reduce(function(K,V){var B=V.word,q=V.width,Y=K[K.length-1];if(Y&&(i==null||o||Y.width+q+rV.width?K:V})};if(!c)return v;for(var m="…",b=function(G){var K=d.slice(0,G),V=$W({breakAll:l,style:s,children:K+m}).wordsWithComputedWidth,B=h(V),q=B.length>a||g(B).width>Number(i);return[q,B]},w=0,x=d.length-1,S=0,A;w<=x&&S<=d.length-1;){var E=Math.floor((w+x)/2),C=E-1,T=b(C),M=t9(T,2),F=M[0],U=M[1],H=b(E),W=t9(H,1),ie=W[0];if(!F&&!ie&&(w=E+1),F&&ie&&(x=E-1),!F&&ie){A=U;break}S++}return A||v},r9=function(t){var n=zt(t)?[]:t.toString().split(DW);return[{words:n}]},VPe=function(t){var n=t.width,r=t.scaleToFit,i=t.children,o=t.style,a=t.breakAll,u=t.maxLines;if((n||r)&&!Va.isSsr){var s,l,c=$W({breakAll:a,children:i,style:o});if(c){var d=c.wordsWithComputedWidth,h=c.spaceWidth;s=d,l=h}else return r9(i);return WPe({breakAll:a,children:i,maxLines:u,style:o},s,l,n,r)}return r9(i)},i9="#808080",lb=function(t){var n=t.x,r=n===void 0?0:n,i=t.y,o=i===void 0?0:i,a=t.lineHeight,u=a===void 0?"1em":a,s=t.capHeight,l=s===void 0?"0.71em":s,c=t.scaleToFit,d=c===void 0?!1:c,h=t.textAnchor,v=h===void 0?"start":h,g=t.verticalAnchor,m=g===void 0?"end":g,b=t.fill,w=b===void 0?i9:b,x=e9(t,NPe),S=y.useMemo(function(){return VPe({breakAll:x.breakAll,children:x.children,maxLines:x.maxLines,scaleToFit:d,style:x.style,width:x.width})},[x.breakAll,x.children,x.maxLines,d,x.style,x.width]),A=x.dx,E=x.dy,C=x.angle,T=x.className,M=x.breakAll,F=e9(x,FPe);if(!Hr(r)||!Hr(o))return null;var U=r+(Ke(A)?A:0),H=o+(Ke(E)?E:0),W;switch(m){case"start":W=kS("calc(".concat(l,")"));break;case"middle":W=kS("calc(".concat((S.length-1)/2," * -").concat(u," + (").concat(l," / 2))"));break;default:W=kS("calc(".concat(S.length-1," * -").concat(u,")"));break}var ie=[];if(d){var Z=S[0].width,G=x.width;ie.push("scale(".concat((Ke(G)?G/Z:1)/Z,")"))}return C&&ie.push("rotate(".concat(C,", ").concat(U,", ").concat(H,")")),ie.length&&(F.transform=ie.join(" ")),j.createElement("text",AE({},Bt(F,!0),{x:U,y:H,className:cn("recharts-text",T),textAnchor:v,fill:w.includes("url")?i9:w}),S.map(function(K,V){var B=K.words.join(M?"":" ");return j.createElement("tspan",{x:U,dy:V===0?W:u,key:"".concat(B,"-").concat(V)},B)}))};function yl(e,t){return e==null||t==null?NaN:et?1:e>=t?0:NaN}function HPe(e,t){return e==null||t==null?NaN:te?1:t>=e?0:NaN}function OP(e){let t,n,r;e.length!==2?(t=yl,n=(u,s)=>yl(e(u),s),r=(u,s)=>e(u)-s):(t=e===yl||e===HPe?e:qPe,n=e,r=e);function i(u,s,l=0,c=u.length){if(l>>1;n(u[d],s)<0?l=d+1:c=d}while(l>>1;n(u[d],s)<=0?l=d+1:c=d}while(ll&&r(u[d-1],s)>-r(u[d],s)?d-1:d}return{left:i,center:a,right:o}}function qPe(){return 0}function IW(e){return e===null?NaN:+e}function*KPe(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const GPe=OP(yl),Cg=GPe.right;OP(IW).center;class o9 extends Map{constructor(t,n=XPe){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,i]of t)this.set(r,i)}get(t){return super.get(a9(this,t))}has(t){return super.has(a9(this,t))}set(t,n){return super.set(YPe(this,t),n)}delete(t){return super.delete(ZPe(this,t))}}function a9({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function YPe({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function ZPe({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function XPe(e){return e!==null&&typeof e=="object"?e.valueOf():e}function QPe(e=yl){if(e===yl)return NW;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function NW(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(et?1:0)}const JPe=Math.sqrt(50),eOe=Math.sqrt(10),tOe=Math.sqrt(2);function cb(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),a=o>=JPe?10:o>=eOe?5:o>=tOe?2:1;let u,s,l;return i<0?(l=Math.pow(10,-i)/a,u=Math.round(e*l),s=Math.round(t*l),u/lt&&--s,l=-l):(l=Math.pow(10,i)*a,u=Math.round(e/l),s=Math.round(t/l),u*lt&&--s),s0))return[];if(e===t)return[e];const r=t=i))return[];const u=o-i+1,s=new Array(u);if(r)if(a<0)for(let l=0;l=r)&&(n=r);return n}function s9(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function FW(e,t,n=0,r=1/0,i){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(i=i===void 0?NW:QPe(i);r>n;){if(r-n>600){const s=r-n+1,l=t-n+1,c=Math.log(s),d=.5*Math.exp(2*c/3),h=.5*Math.sqrt(c*d*(s-d)/s)*(l-s/2<0?-1:1),v=Math.max(n,Math.floor(t-l*d/s+h)),g=Math.min(r,Math.floor(t+(s-l)*d/s+h));FW(e,t,v,g,i)}const o=e[t];let a=n,u=r;for(Mp(e,n,t),i(e[r],o)>0&&Mp(e,n,r);a0;)--u}i(e[n],o)===0?Mp(e,n,u):(++u,Mp(e,u,r)),u<=t&&(n=u+1),t<=u&&(r=u-1)}return e}function Mp(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function nOe(e,t,n){if(e=Float64Array.from(KPe(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return s9(e);if(t>=1)return u9(e);var r,i=(r-1)*t,o=Math.floor(i),a=u9(FW(e,o).subarray(0,o+1)),u=s9(e.subarray(o+1));return a+(u-a)*(i-o)}}function rOe(e,t,n=IW){if(!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,i=(r-1)*t,o=Math.floor(i),a=+n(e[o],o,e),u=+n(e[o+1],o+1,e);return a+(u-a)*(i-o)}}function iOe(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,o=new Array(i);++r>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?iy(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?iy(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=aOe.exec(e))?new oo(t[1],t[2],t[3],1):(t=uOe.exec(e))?new oo(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=sOe.exec(e))?iy(t[1],t[2],t[3],t[4]):(t=lOe.exec(e))?iy(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=cOe.exec(e))?v9(t[1],t[2]/100,t[3]/100,1):(t=fOe.exec(e))?v9(t[1],t[2]/100,t[3]/100,t[4]):l9.hasOwnProperty(e)?d9(l9[e]):e==="transparent"?new oo(NaN,NaN,NaN,0):null}function d9(e){return new oo(e>>16&255,e>>8&255,e&255,1)}function iy(e,t,n,r){return r<=0&&(e=t=n=NaN),new oo(e,t,n,r)}function pOe(e){return e instanceof Eg||(e=yv(e)),e?(e=e.rgb(),new oo(e.r,e.g,e.b,e.opacity)):new oo}function ME(e,t,n,r){return arguments.length===1?pOe(e):new oo(e,t,n,r??1)}function oo(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}TP(oo,ME,jW(Eg,{brighter(e){return e=e==null?fb:Math.pow(fb,e),new oo(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?gv:Math.pow(gv,e),new oo(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new oo(Oc(this.r),Oc(this.g),Oc(this.b),db(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:h9,formatHex:h9,formatHex8:vOe,formatRgb:p9,toString:p9}));function h9(){return`#${xc(this.r)}${xc(this.g)}${xc(this.b)}`}function vOe(){return`#${xc(this.r)}${xc(this.g)}${xc(this.b)}${xc((isNaN(this.opacity)?1:this.opacity)*255)}`}function p9(){const e=db(this.opacity);return`${e===1?"rgb(":"rgba("}${Oc(this.r)}, ${Oc(this.g)}, ${Oc(this.b)}${e===1?")":`, ${e})`}`}function db(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Oc(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function xc(e){return e=Oc(e),(e<16?"0":"")+e.toString(16)}function v9(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new La(e,t,n,r)}function BW(e){if(e instanceof La)return new La(e.h,e.s,e.l,e.opacity);if(e instanceof Eg||(e=yv(e)),!e)return new La;if(e instanceof La)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,u=o-i,s=(o+i)/2;return u?(t===o?a=(n-r)/u+(n0&&s<1?0:a,new La(a,u,s,e.opacity)}function gOe(e,t,n,r){return arguments.length===1?BW(e):new La(e,t,n,r??1)}function La(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}TP(La,gOe,jW(Eg,{brighter(e){return e=e==null?fb:Math.pow(fb,e),new La(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?gv:Math.pow(gv,e),new La(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new oo(TS(e>=240?e-240:e+120,i,r),TS(e,i,r),TS(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new La(g9(this.h),oy(this.s),oy(this.l),db(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=db(this.opacity);return`${e===1?"hsl(":"hsla("}${g9(this.h)}, ${oy(this.s)*100}%, ${oy(this.l)*100}%${e===1?")":`, ${e})`}`}}));function g9(e){return e=(e||0)%360,e<0?e+360:e}function oy(e){return Math.max(0,Math.min(1,e||0))}function TS(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const MP=e=>()=>e;function mOe(e,t){return function(n){return e+n*t}}function yOe(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function bOe(e){return(e=+e)==1?zW:function(t,n){return n-t?yOe(t,n,e):MP(isNaN(t)?n:t)}}function zW(e,t){var n=t-e;return n?mOe(e,n):MP(isNaN(e)?t:e)}const m9=function e(t){var n=bOe(t);function r(i,o){var a=n((i=ME(i)).r,(o=ME(o)).r),u=n(i.g,o.g),s=n(i.b,o.b),l=zW(i.opacity,o.opacity);return function(c){return i.r=a(c),i.g=u(c),i.b=s(c),i.opacity=l(c),i+""}}return r.gamma=e,r}(1);function xOe(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(o){for(i=0;in&&(o=t.slice(n,o),u[a]?u[a]+=o:u[++a]=o),(r=r[0])===(i=i[0])?u[a]?u[a]+=i:u[++a]=i:(u[++a]=null,s.push({i:a,x:hb(r,i)})),n=MS.lastIndex;return nt&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function MOe(e,t,n){var r=e[0],i=e[1],o=t[0],a=t[1];return i2?ROe:MOe,s=l=null,d}function d(h){return h==null||isNaN(h=+h)?o:(s||(s=u(e.map(r),t,n)))(r(a(h)))}return d.invert=function(h){return a(i((l||(l=u(t,e.map(r),hb)))(h)))},d.domain=function(h){return arguments.length?(e=Array.from(h,pb),c()):e.slice()},d.range=function(h){return arguments.length?(t=Array.from(h),c()):t.slice()},d.rangeRound=function(h){return t=Array.from(h),n=RP,c()},d.clamp=function(h){return arguments.length?(a=h?!0:Wi,c()):a!==Wi},d.interpolate=function(h){return arguments.length?(n=h,c()):n},d.unknown=function(h){return arguments.length?(o=h,d):o},function(h,v){return r=h,i=v,c()}}function DP(){return Ew()(Wi,Wi)}function DOe(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function vb(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function Zd(e){return e=vb(Math.abs(e)),e?e[1]:NaN}function $Oe(e,t){return function(n,r){for(var i=n.length,o=[],a=0,u=e[0],s=0;i>0&&u>0&&(s+u+1>r&&(u=Math.max(1,r-s)),o.push(n.substring(i-=u,i+u)),!((s+=u+1)>r));)u=e[a=(a+1)%e.length];return o.reverse().join(t)}}function IOe(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var NOe=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function bv(e){if(!(t=NOe.exec(e)))throw new Error("invalid format: "+e);var t;return new $P({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}bv.prototype=$P.prototype;function $P(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}$P.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function FOe(e){e:for(var t=e.length,n=1,r=-1,i;n0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var UW;function LOe(e,t){var n=vb(e,t);if(!n)return e+"";var r=n[0],i=n[1],o=i-(UW=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+vb(e,Math.max(0,t+o-1))[0]}function b9(e,t){var n=vb(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const x9={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:DOe,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>b9(e*100,t),r:b9,s:LOe,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function w9(e){return e}var _9=Array.prototype.map,S9=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function jOe(e){var t=e.grouping===void 0||e.thousands===void 0?w9:$Oe(_9.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",o=e.numerals===void 0?w9:IOe(_9.call(e.numerals,String)),a=e.percent===void 0?"%":e.percent+"",u=e.minus===void 0?"−":e.minus+"",s=e.nan===void 0?"NaN":e.nan+"";function l(d){d=bv(d);var h=d.fill,v=d.align,g=d.sign,m=d.symbol,b=d.zero,w=d.width,x=d.comma,S=d.precision,A=d.trim,E=d.type;E==="n"?(x=!0,E="g"):x9[E]||(S===void 0&&(S=12),A=!0,E="g"),(b||h==="0"&&v==="=")&&(b=!0,h="0",v="=");var C=m==="$"?n:m==="#"&&/[boxX]/.test(E)?"0"+E.toLowerCase():"",T=m==="$"?r:/[%p]/.test(E)?a:"",M=x9[E],F=/[defgprs%]/.test(E);S=S===void 0?6:/[gprs]/.test(E)?Math.max(1,Math.min(21,S)):Math.max(0,Math.min(20,S));function U(H){var W=C,ie=T,Z,G,K;if(E==="c")ie=M(H)+ie,H="";else{H=+H;var V=H<0||1/H<0;if(H=isNaN(H)?s:M(Math.abs(H),S),A&&(H=FOe(H)),V&&+H==0&&g!=="+"&&(V=!1),W=(V?g==="("?g:u:g==="-"||g==="("?"":g)+W,ie=(E==="s"?S9[8+UW/3]:"")+ie+(V&&g==="("?")":""),F){for(Z=-1,G=H.length;++ZK||K>57){ie=(K===46?i+H.slice(Z+1):H.slice(Z))+ie,H=H.slice(0,Z);break}}}x&&!b&&(H=t(H,1/0));var B=W.length+H.length+ie.length,q=B>1)+W+H+ie+q.slice(B);break;default:H=q+W+H+ie;break}return o(H)}return U.toString=function(){return d+""},U}function c(d,h){var v=l((d=bv(d),d.type="f",d)),g=Math.max(-8,Math.min(8,Math.floor(Zd(h)/3)))*3,m=Math.pow(10,-g),b=S9[8+g/3];return function(w){return v(m*w)+b}}return{format:l,formatPrefix:c}}var ay,IP,WW;BOe({thousands:",",grouping:[3],currency:["$",""]});function BOe(e){return ay=jOe(e),IP=ay.format,WW=ay.formatPrefix,ay}function zOe(e){return Math.max(0,-Zd(Math.abs(e)))}function UOe(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Zd(t)/3)))*3-Zd(Math.abs(e)))}function WOe(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Zd(t)-Zd(e))+1}function VW(e,t,n,r){var i=kE(e,t,n),o;switch(r=bv(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(o=UOe(i,a))&&(r.precision=o),WW(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=WOe(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=zOe(i))&&(r.precision=o-(r.type==="%")*2);break}}return IP(r)}function Bl(e){var t=e.domain;return e.ticks=function(n){var r=t();return PE(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return VW(i[0],i[i.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),i=0,o=r.length-1,a=r[i],u=r[o],s,l,c=10;for(u0;){if(l=OE(a,u,n),l===s)return r[i]=a,r[o]=u,t(r);if(l>0)a=Math.floor(a/l)*l,u=Math.ceil(u/l)*l;else if(l<0)a=Math.ceil(a*l)/l,u=Math.floor(u*l)/l;else break;s=l}return e},e}function gb(){var e=DP();return e.copy=function(){return Ag(e,gb())},ba.apply(e,arguments),Bl(e)}function HW(e){var t;function n(r){return r==null||isNaN(r=+r)?t:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(e=Array.from(r,pb),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return HW(e).unknown(t)},e=arguments.length?Array.from(e,pb):[0,1],Bl(n)}function qW(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],o=e[r],a;return oMath.pow(e,t)}function GOe(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function A9(e){return(t,n)=>-e(-t,n)}function NP(e){const t=e(C9,E9),n=t.domain;let r=10,i,o;function a(){return i=GOe(r),o=KOe(r),n()[0]<0?(i=A9(i),o=A9(o),e(VOe,HOe)):e(C9,E9),t}return t.base=function(u){return arguments.length?(r=+u,a()):r},t.domain=function(u){return arguments.length?(n(u),a()):n()},t.ticks=u=>{const s=n();let l=s[0],c=s[s.length-1];const d=c0){for(;h<=v;++h)for(g=1;gc)break;w.push(m)}}else for(;h<=v;++h)for(g=r-1;g>=1;--g)if(m=h>0?g/o(-h):g*o(h),!(mc)break;w.push(m)}w.length*2{if(u==null&&(u=10),s==null&&(s=r===10?"s":","),typeof s!="function"&&(!(r%1)&&(s=bv(s)).precision==null&&(s.trim=!0),s=IP(s)),u===1/0)return s;const l=Math.max(1,r*u/t.ticks().length);return c=>{let d=c/o(Math.round(i(c)));return d*rn(qW(n(),{floor:u=>o(Math.floor(i(u))),ceil:u=>o(Math.ceil(i(u)))})),t}function KW(){const e=NP(Ew()).domain([1,10]);return e.copy=()=>Ag(e,KW()).base(e.base()),ba.apply(e,arguments),e}function P9(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function O9(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function FP(e){var t=1,n=e(P9(t),O9(t));return n.constant=function(r){return arguments.length?e(P9(t=+r),O9(t)):t},Bl(n)}function GW(){var e=FP(Ew());return e.copy=function(){return Ag(e,GW()).constant(e.constant())},ba.apply(e,arguments)}function k9(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function YOe(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function ZOe(e){return e<0?-e*e:e*e}function LP(e){var t=e(Wi,Wi),n=1;function r(){return n===1?e(Wi,Wi):n===.5?e(YOe,ZOe):e(k9(n),k9(1/n))}return t.exponent=function(i){return arguments.length?(n=+i,r()):n},Bl(t)}function jP(){var e=LP(Ew());return e.copy=function(){return Ag(e,jP()).exponent(e.exponent())},ba.apply(e,arguments),e}function XOe(){return jP.apply(null,arguments).exponent(.5)}function T9(e){return Math.sign(e)*e*e}function QOe(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function YW(){var e=DP(),t=[0,1],n=!1,r;function i(o){var a=QOe(e(o));return isNaN(a)?r:n?Math.round(a):a}return i.invert=function(o){return e.invert(T9(o))},i.domain=function(o){return arguments.length?(e.domain(o),i):e.domain()},i.range=function(o){return arguments.length?(e.range((t=Array.from(o,pb)).map(T9)),i):t.slice()},i.rangeRound=function(o){return i.range(o).round(!0)},i.round=function(o){return arguments.length?(n=!!o,i):n},i.clamp=function(o){return arguments.length?(e.clamp(o),i):e.clamp()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return YW(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},ba.apply(i,arguments),Bl(i)}function ZW(){var e=[],t=[],n=[],r;function i(){var a=0,u=Math.max(1,t.length);for(n=new Array(u-1);++a0?n[u-1]:e[0],u=n?[r[n-1],t]:[r[l-1],r[l]]},a.unknown=function(s){return arguments.length&&(o=s),a},a.thresholds=function(){return r.slice()},a.copy=function(){return XW().domain([e,t]).range(i).unknown(o)},ba.apply(Bl(a),arguments)}function QW(){var e=[.5],t=[0,1],n,r=1;function i(o){return o!=null&&o<=o?t[Cg(e,o,0,r)]:n}return i.domain=function(o){return arguments.length?(e=Array.from(o),r=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(o){return arguments.length?(t=Array.from(o),r=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(o){var a=t.indexOf(o);return[e[a-1],e[a]]},i.unknown=function(o){return arguments.length?(n=o,i):n},i.copy=function(){return QW().domain(e).range(t).unknown(n)},ba.apply(i,arguments)}const RS=new Date,DS=new Date;function Gr(e,t,n,r){function i(o){return e(o=arguments.length===0?new Date:new Date(+o)),o}return i.floor=o=>(e(o=new Date(+o)),o),i.ceil=o=>(e(o=new Date(o-1)),t(o,1),e(o),o),i.round=o=>{const a=i(o),u=i.ceil(o);return o-a(t(o=new Date(+o),a==null?1:Math.floor(a)),o),i.range=(o,a,u)=>{const s=[];if(o=i.ceil(o),u=u==null?1:Math.floor(u),!(o0))return s;let l;do s.push(l=new Date(+o)),t(o,u),e(o);while(lGr(a=>{if(a>=a)for(;e(a),!o(a);)a.setTime(a-1)},(a,u)=>{if(a>=a)if(u<0)for(;++u<=0;)for(;t(a,-1),!o(a););else for(;--u>=0;)for(;t(a,1),!o(a););}),n&&(i.count=(o,a)=>(RS.setTime(+o),DS.setTime(+a),e(RS),e(DS),Math.floor(n(RS,DS))),i.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(r?a=>r(a)%o===0:a=>i.count(0,a)%o===0):i)),i}const mb=Gr(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);mb.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Gr(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):mb);mb.range;const ts=1e3,la=ts*60,ns=la*60,bs=ns*24,BP=bs*7,M9=bs*30,$S=bs*365,wc=Gr(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*ts)},(e,t)=>(t-e)/ts,e=>e.getUTCSeconds());wc.range;const zP=Gr(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*ts)},(e,t)=>{e.setTime(+e+t*la)},(e,t)=>(t-e)/la,e=>e.getMinutes());zP.range;const UP=Gr(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*la)},(e,t)=>(t-e)/la,e=>e.getUTCMinutes());UP.range;const WP=Gr(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*ts-e.getMinutes()*la)},(e,t)=>{e.setTime(+e+t*ns)},(e,t)=>(t-e)/ns,e=>e.getHours());WP.range;const VP=Gr(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*ns)},(e,t)=>(t-e)/ns,e=>e.getUTCHours());VP.range;const Pg=Gr(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*la)/bs,e=>e.getDate()-1);Pg.range;const Aw=Gr(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/bs,e=>e.getUTCDate()-1);Aw.range;const JW=Gr(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/bs,e=>Math.floor(e/bs));JW.range;function hf(e){return Gr(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*la)/BP)}const Pw=hf(0),yb=hf(1),JOe=hf(2),e5e=hf(3),Xd=hf(4),t5e=hf(5),n5e=hf(6);Pw.range;yb.range;JOe.range;e5e.range;Xd.range;t5e.range;n5e.range;function pf(e){return Gr(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/BP)}const Ow=pf(0),bb=pf(1),r5e=pf(2),i5e=pf(3),Qd=pf(4),o5e=pf(5),a5e=pf(6);Ow.range;bb.range;r5e.range;i5e.range;Qd.range;o5e.range;a5e.range;const HP=Gr(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());HP.range;const qP=Gr(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());qP.range;const xs=Gr(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());xs.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Gr(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});xs.range;const ws=Gr(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());ws.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Gr(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});ws.range;function eV(e,t,n,r,i,o){const a=[[wc,1,ts],[wc,5,5*ts],[wc,15,15*ts],[wc,30,30*ts],[o,1,la],[o,5,5*la],[o,15,15*la],[o,30,30*la],[i,1,ns],[i,3,3*ns],[i,6,6*ns],[i,12,12*ns],[r,1,bs],[r,2,2*bs],[n,1,BP],[t,1,M9],[t,3,3*M9],[e,1,$S]];function u(l,c,d){const h=cb).right(a,h);if(v===a.length)return e.every(kE(l/$S,c/$S,d));if(v===0)return mb.every(Math.max(kE(l,c,d),1));const[g,m]=a[h/a[v-1][2]53)return null;"w"in be||(be.w=1),"Z"in be?(lt=NS(Rp(be.y,0,1)),It=lt.getUTCDay(),lt=It>4||It===0?bb.ceil(lt):bb(lt),lt=Aw.offset(lt,(be.V-1)*7),be.y=lt.getUTCFullYear(),be.m=lt.getUTCMonth(),be.d=lt.getUTCDate()+(be.w+6)%7):(lt=IS(Rp(be.y,0,1)),It=lt.getDay(),lt=It>4||It===0?yb.ceil(lt):yb(lt),lt=Pg.offset(lt,(be.V-1)*7),be.y=lt.getFullYear(),be.m=lt.getMonth(),be.d=lt.getDate()+(be.w+6)%7)}else("W"in be||"U"in be)&&("w"in be||(be.w="u"in be?be.u%7:"W"in be?1:0),It="Z"in be?NS(Rp(be.y,0,1)).getUTCDay():IS(Rp(be.y,0,1)).getDay(),be.m=0,be.d="W"in be?(be.w+6)%7+be.W*7-(It+5)%7:be.w+be.U*7-(It+6)%7);return"Z"in be?(be.H+=be.Z/100|0,be.M+=be.Z%100,NS(be)):IS(be)}}function M(Pe,Fe,$e,be){for(var yt=0,lt=Fe.length,It=$e.length,mn,en;yt=It)return-1;if(mn=Fe.charCodeAt(yt++),mn===37){if(mn=Fe.charAt(yt++),en=E[mn in R9?Fe.charAt(yt++):mn],!en||(be=en(Pe,$e,be))<0)return-1}else if(mn!=$e.charCodeAt(be++))return-1}return be}function F(Pe,Fe,$e){var be=l.exec(Fe.slice($e));return be?(Pe.p=c.get(be[0].toLowerCase()),$e+be[0].length):-1}function U(Pe,Fe,$e){var be=v.exec(Fe.slice($e));return be?(Pe.w=g.get(be[0].toLowerCase()),$e+be[0].length):-1}function H(Pe,Fe,$e){var be=d.exec(Fe.slice($e));return be?(Pe.w=h.get(be[0].toLowerCase()),$e+be[0].length):-1}function W(Pe,Fe,$e){var be=w.exec(Fe.slice($e));return be?(Pe.m=x.get(be[0].toLowerCase()),$e+be[0].length):-1}function ie(Pe,Fe,$e){var be=m.exec(Fe.slice($e));return be?(Pe.m=b.get(be[0].toLowerCase()),$e+be[0].length):-1}function Z(Pe,Fe,$e){return M(Pe,t,Fe,$e)}function G(Pe,Fe,$e){return M(Pe,n,Fe,$e)}function K(Pe,Fe,$e){return M(Pe,r,Fe,$e)}function V(Pe){return a[Pe.getDay()]}function B(Pe){return o[Pe.getDay()]}function q(Pe){return s[Pe.getMonth()]}function Y(Pe){return u[Pe.getMonth()]}function ue(Pe){return i[+(Pe.getHours()>=12)]}function Q(Pe){return 1+~~(Pe.getMonth()/3)}function J(Pe){return a[Pe.getUTCDay()]}function se(Pe){return o[Pe.getUTCDay()]}function de(Pe){return s[Pe.getUTCMonth()]}function Se(Pe){return u[Pe.getUTCMonth()]}function ge(Pe){return i[+(Pe.getUTCHours()>=12)]}function Ze(Pe){return 1+~~(Pe.getUTCMonth()/3)}return{format:function(Pe){var Fe=C(Pe+="",S);return Fe.toString=function(){return Pe},Fe},parse:function(Pe){var Fe=T(Pe+="",!1);return Fe.toString=function(){return Pe},Fe},utcFormat:function(Pe){var Fe=C(Pe+="",A);return Fe.toString=function(){return Pe},Fe},utcParse:function(Pe){var Fe=T(Pe+="",!0);return Fe.toString=function(){return Pe},Fe}}}var R9={"-":"",_:" ",0:"0"},ai=/^\s*\d+/,d5e=/^%/,h5e=/[\\^$*+?|[\]().{}]/g;function yn(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",o=i.length;return r+(o[t.toLowerCase(),n]))}function v5e(e,t,n){var r=ai.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function g5e(e,t,n){var r=ai.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function m5e(e,t,n){var r=ai.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function y5e(e,t,n){var r=ai.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function b5e(e,t,n){var r=ai.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function D9(e,t,n){var r=ai.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function $9(e,t,n){var r=ai.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function x5e(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function w5e(e,t,n){var r=ai.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function _5e(e,t,n){var r=ai.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function I9(e,t,n){var r=ai.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function S5e(e,t,n){var r=ai.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function N9(e,t,n){var r=ai.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function C5e(e,t,n){var r=ai.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function E5e(e,t,n){var r=ai.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function A5e(e,t,n){var r=ai.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function P5e(e,t,n){var r=ai.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function O5e(e,t,n){var r=d5e.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function k5e(e,t,n){var r=ai.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function T5e(e,t,n){var r=ai.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function F9(e,t){return yn(e.getDate(),t,2)}function M5e(e,t){return yn(e.getHours(),t,2)}function R5e(e,t){return yn(e.getHours()%12||12,t,2)}function D5e(e,t){return yn(1+Pg.count(xs(e),e),t,3)}function tV(e,t){return yn(e.getMilliseconds(),t,3)}function $5e(e,t){return tV(e,t)+"000"}function I5e(e,t){return yn(e.getMonth()+1,t,2)}function N5e(e,t){return yn(e.getMinutes(),t,2)}function F5e(e,t){return yn(e.getSeconds(),t,2)}function L5e(e){var t=e.getDay();return t===0?7:t}function j5e(e,t){return yn(Pw.count(xs(e)-1,e),t,2)}function nV(e){var t=e.getDay();return t>=4||t===0?Xd(e):Xd.ceil(e)}function B5e(e,t){return e=nV(e),yn(Xd.count(xs(e),e)+(xs(e).getDay()===4),t,2)}function z5e(e){return e.getDay()}function U5e(e,t){return yn(yb.count(xs(e)-1,e),t,2)}function W5e(e,t){return yn(e.getFullYear()%100,t,2)}function V5e(e,t){return e=nV(e),yn(e.getFullYear()%100,t,2)}function H5e(e,t){return yn(e.getFullYear()%1e4,t,4)}function q5e(e,t){var n=e.getDay();return e=n>=4||n===0?Xd(e):Xd.ceil(e),yn(e.getFullYear()%1e4,t,4)}function K5e(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+yn(t/60|0,"0",2)+yn(t%60,"0",2)}function L9(e,t){return yn(e.getUTCDate(),t,2)}function G5e(e,t){return yn(e.getUTCHours(),t,2)}function Y5e(e,t){return yn(e.getUTCHours()%12||12,t,2)}function Z5e(e,t){return yn(1+Aw.count(ws(e),e),t,3)}function rV(e,t){return yn(e.getUTCMilliseconds(),t,3)}function X5e(e,t){return rV(e,t)+"000"}function Q5e(e,t){return yn(e.getUTCMonth()+1,t,2)}function J5e(e,t){return yn(e.getUTCMinutes(),t,2)}function e8e(e,t){return yn(e.getUTCSeconds(),t,2)}function t8e(e){var t=e.getUTCDay();return t===0?7:t}function n8e(e,t){return yn(Ow.count(ws(e)-1,e),t,2)}function iV(e){var t=e.getUTCDay();return t>=4||t===0?Qd(e):Qd.ceil(e)}function r8e(e,t){return e=iV(e),yn(Qd.count(ws(e),e)+(ws(e).getUTCDay()===4),t,2)}function i8e(e){return e.getUTCDay()}function o8e(e,t){return yn(bb.count(ws(e)-1,e),t,2)}function a8e(e,t){return yn(e.getUTCFullYear()%100,t,2)}function u8e(e,t){return e=iV(e),yn(e.getUTCFullYear()%100,t,2)}function s8e(e,t){return yn(e.getUTCFullYear()%1e4,t,4)}function l8e(e,t){var n=e.getUTCDay();return e=n>=4||n===0?Qd(e):Qd.ceil(e),yn(e.getUTCFullYear()%1e4,t,4)}function c8e(){return"+0000"}function j9(){return"%"}function B9(e){return+e}function z9(e){return Math.floor(+e/1e3)}var Uf,oV,aV;f8e({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function f8e(e){return Uf=f5e(e),oV=Uf.format,Uf.parse,aV=Uf.utcFormat,Uf.utcParse,Uf}function d8e(e){return new Date(e)}function h8e(e){return e instanceof Date?+e:+new Date(+e)}function KP(e,t,n,r,i,o,a,u,s,l){var c=DP(),d=c.invert,h=c.domain,v=l(".%L"),g=l(":%S"),m=l("%I:%M"),b=l("%I %p"),w=l("%a %d"),x=l("%b %d"),S=l("%B"),A=l("%Y");function E(C){return(s(C)t(i/(e.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(i,o)=>nOe(e,o/r))},n.copy=function(){return cV(t).domain(e)},Os.apply(n,arguments)}function Tw(){var e=0,t=.5,n=1,r=1,i,o,a,u,s,l=Wi,c,d=!1,h;function v(m){return isNaN(m=+m)?h:(m=.5+((m=+c(m))-o)*(r*mt}var w8e=x8e,_8e=pV,S8e=w8e,C8e=zh;function E8e(e){return e&&e.length?_8e(e,C8e,S8e):void 0}var A8e=E8e;const il=Pn(A8e);function P8e(e,t){return ee.e^o.s<0?1:-1;for(r=o.d.length,i=e.d.length,t=0,n=re.d[t]^o.s<0?1:-1;return r===i?0:r>i^o.s<0?1:-1};ut.decimalPlaces=ut.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*er;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n};ut.dividedBy=ut.div=function(e){return ls(this,new this.constructor(e))};ut.dividedToIntegerBy=ut.idiv=function(e){var t=this,n=t.constructor;return Bn(ls(t,new n(e),0,1),n.precision)};ut.equals=ut.eq=function(e){return!this.cmp(e)};ut.exponent=function(){return Mr(this)};ut.greaterThan=ut.gt=function(e){return this.cmp(e)>0};ut.greaterThanOrEqualTo=ut.gte=function(e){return this.cmp(e)>=0};ut.isInteger=ut.isint=function(){return this.e>this.d.length-2};ut.isNegative=ut.isneg=function(){return this.s<0};ut.isPositive=ut.ispos=function(){return this.s>0};ut.isZero=function(){return this.s===0};ut.lessThan=ut.lt=function(e){return this.cmp(e)<0};ut.lessThanOrEqualTo=ut.lte=function(e){return this.cmp(e)<1};ut.logarithm=ut.log=function(e){var t,n=this,r=n.constructor,i=r.precision,o=i+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq(Mo))throw Error(ga+"NaN");if(n.s<1)throw Error(ga+(n.s?"NaN":"-Infinity"));return n.eq(Mo)?new r(0):(or=!1,t=ls(xv(n,o),xv(e,o),o),or=!0,Bn(t,i))};ut.minus=ut.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?yV(t,e):gV(t,(e.s=-e.s,e))};ut.modulo=ut.mod=function(e){var t,n=this,r=n.constructor,i=r.precision;if(e=new r(e),!e.s)throw Error(ga+"NaN");return n.s?(or=!1,t=ls(n,e,0,1).times(e),or=!0,n.minus(t)):Bn(new r(n),i)};ut.naturalExponential=ut.exp=function(){return mV(this)};ut.naturalLogarithm=ut.ln=function(){return xv(this)};ut.negated=ut.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};ut.plus=ut.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?gV(t,e):yV(t,(e.s=-e.s,e))};ut.precision=ut.sd=function(e){var t,n,r,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(kc+e);if(t=Mr(i)+1,r=i.d.length-1,n=r*er+1,r=i.d[r],r){for(;r%10==0;r/=10)n--;for(r=i.d[0];r>=10;r/=10)n++}return e&&t>n?t:n};ut.squareRoot=ut.sqrt=function(){var e,t,n,r,i,o,a,u=this,s=u.constructor;if(u.s<1){if(!u.s)return new s(0);throw Error(ga+"NaN")}for(e=Mr(u),or=!1,i=Math.sqrt(+u),i==0||i==1/0?(t=pu(u.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=Vh((e+1)/2)-(e<0||e%2),i==1/0?t="5e"+e:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),r=new s(t)):r=new s(i.toString()),n=s.precision,i=a=n+3;;)if(o=r,r=o.plus(ls(u,o,a+2)).times(.5),pu(o.d).slice(0,a)===(t=pu(r.d)).slice(0,a)){if(t=t.slice(a-3,a+1),i==a&&t=="4999"){if(Bn(o,n+1,0),o.times(o).eq(u)){r=o;break}}else if(t!="9999")break;a+=4}return or=!0,Bn(r,n)};ut.times=ut.mul=function(e){var t,n,r,i,o,a,u,s,l,c=this,d=c.constructor,h=c.d,v=(e=new d(e)).d;if(!c.s||!e.s)return new d(0);for(e.s*=c.s,n=c.e+e.e,s=h.length,l=v.length,s=0;){for(t=0,i=s+r;i>r;)u=o[i]+v[r]*h[i-r-1]+t,o[i--]=u%Qr|0,t=u/Qr|0;o[i]=(o[i]+t)%Qr|0}for(;!o[--a];)o.pop();return t?++n:o.shift(),e.d=o,e.e=n,or?Bn(e,d.precision):e};ut.toDecimalPlaces=ut.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(Ou(e,0,Wh),t===void 0?t=r.rounding:Ou(t,0,8),Bn(n,e+Mr(n)+1,t))};ut.toExponential=function(e,t){var n,r=this,i=r.constructor;return e===void 0?n=Xc(r,!0):(Ou(e,0,Wh),t===void 0?t=i.rounding:Ou(t,0,8),r=Bn(new i(r),e+1,t),n=Xc(r,!0,e+1)),n};ut.toFixed=function(e,t){var n,r,i=this,o=i.constructor;return e===void 0?Xc(i):(Ou(e,0,Wh),t===void 0?t=o.rounding:Ou(t,0,8),r=Bn(new o(i),e+Mr(i)+1,t),n=Xc(r.abs(),!1,e+Mr(r)+1),i.isneg()&&!i.isZero()?"-"+n:n)};ut.toInteger=ut.toint=function(){var e=this,t=e.constructor;return Bn(new t(e),Mr(e)+1,t.rounding)};ut.toNumber=function(){return+this};ut.toPower=ut.pow=function(e){var t,n,r,i,o,a,u=this,s=u.constructor,l=12,c=+(e=new s(e));if(!e.s)return new s(Mo);if(u=new s(u),!u.s){if(e.s<1)throw Error(ga+"Infinity");return u}if(u.eq(Mo))return u;if(r=s.precision,e.eq(Mo))return Bn(u,r);if(t=e.e,n=e.d.length-1,a=t>=n,o=u.s,a){if((n=c<0?-c:c)<=vV){for(i=new s(Mo),t=Math.ceil(r/er+4),or=!1;n%2&&(i=i.times(u),V9(i.d,t)),n=Vh(n/2),n!==0;)u=u.times(u),V9(u.d,t);return or=!0,e.s<0?new s(Mo).div(i):Bn(i,r)}}else if(o<0)throw Error(ga+"NaN");return o=o<0&&e.d[Math.max(t,n)]&1?-1:1,u.s=1,or=!1,i=e.times(xv(u,r+l)),or=!0,i=mV(i),i.s=o,i};ut.toPrecision=function(e,t){var n,r,i=this,o=i.constructor;return e===void 0?(n=Mr(i),r=Xc(i,n<=o.toExpNeg||n>=o.toExpPos)):(Ou(e,1,Wh),t===void 0?t=o.rounding:Ou(t,0,8),i=Bn(new o(i),e,t),n=Mr(i),r=Xc(i,e<=n||n<=o.toExpNeg,e)),r};ut.toSignificantDigits=ut.tosd=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(Ou(e,1,Wh),t===void 0?t=r.rounding:Ou(t,0,8)),Bn(new r(n),e,t)};ut.toString=ut.valueOf=ut.val=ut.toJSON=ut[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=Mr(e),n=e.constructor;return Xc(e,t<=n.toExpNeg||t>=n.toExpPos)};function gV(e,t){var n,r,i,o,a,u,s,l,c=e.constructor,d=c.precision;if(!e.s||!t.s)return t.s||(t=new c(e)),or?Bn(t,d):t;if(s=e.d,l=t.d,a=e.e,i=t.e,s=s.slice(),o=a-i,o){for(o<0?(r=s,o=-o,u=l.length):(r=l,i=a,u=s.length),a=Math.ceil(d/er),u=a>u?a+1:u+1,o>u&&(o=u,r.length=1),r.reverse();o--;)r.push(0);r.reverse()}for(u=s.length,o=l.length,u-o<0&&(o=u,r=l,l=s,s=r),n=0;o;)n=(s[--o]=s[o]+l[o]+n)/Qr|0,s[o]%=Qr;for(n&&(s.unshift(n),++i),u=s.length;s[--u]==0;)s.pop();return t.d=s,t.e=i,or?Bn(t,d):t}function Ou(e,t,n){if(e!==~~e||en)throw Error(kc+e)}function pu(e){var t,n,r,i=e.length-1,o="",a=e[0];if(i>0){for(o+=a,t=1;ta?1:-1;else for(u=s=0;ui[u]?1:-1;break}return s}function n(r,i,o){for(var a=0;o--;)r[o]-=a,a=r[o]1;)r.shift()}return function(r,i,o,a){var u,s,l,c,d,h,v,g,m,b,w,x,S,A,E,C,T,M,F=r.constructor,U=r.s==i.s?1:-1,H=r.d,W=i.d;if(!r.s)return new F(r);if(!i.s)throw Error(ga+"Division by zero");for(s=r.e-i.e,T=W.length,E=H.length,v=new F(U),g=v.d=[],l=0;W[l]==(H[l]||0);)++l;if(W[l]>(H[l]||0)&&--s,o==null?x=o=F.precision:a?x=o+(Mr(r)-Mr(i))+1:x=o,x<0)return new F(0);if(x=x/er+2|0,l=0,T==1)for(c=0,W=W[0],x++;(l1&&(W=e(W,c),H=e(H,c),T=W.length,E=H.length),A=T,m=H.slice(0,T),b=m.length;b=Qr/2&&++C;do c=0,u=t(W,m,T,b),u<0?(w=m[0],T!=b&&(w=w*Qr+(m[1]||0)),c=w/C|0,c>1?(c>=Qr&&(c=Qr-1),d=e(W,c),h=d.length,b=m.length,u=t(d,m,h,b),u==1&&(c--,n(d,T16)throw Error(ZP+Mr(e));if(!e.s)return new c(Mo);for(t==null?(or=!1,u=d):u=t,a=new c(.03125);e.abs().gte(.1);)e=e.times(a),l+=5;for(r=Math.log(lc(2,l))/Math.LN10*2+5|0,u+=r,n=i=o=new c(Mo),c.precision=u;;){if(i=Bn(i.times(e),u),n=n.times(++s),a=o.plus(ls(i,n,u)),pu(a.d).slice(0,u)===pu(o.d).slice(0,u)){for(;l--;)o=Bn(o.times(o),u);return c.precision=d,t==null?(or=!0,Bn(o,d)):o}o=a}}function Mr(e){for(var t=e.e*er,n=e.d[0];n>=10;n/=10)t++;return t}function FS(e,t,n){if(t>e.LN10.sd())throw or=!0,n&&(e.precision=n),Error(ga+"LN10 precision limit exceeded");return Bn(new e(e.LN10),t)}function Gs(e){for(var t="";e--;)t+="0";return t}function xv(e,t){var n,r,i,o,a,u,s,l,c,d=1,h=10,v=e,g=v.d,m=v.constructor,b=m.precision;if(v.s<1)throw Error(ga+(v.s?"NaN":"-Infinity"));if(v.eq(Mo))return new m(0);if(t==null?(or=!1,l=b):l=t,v.eq(10))return t==null&&(or=!0),FS(m,l);if(l+=h,m.precision=l,n=pu(g),r=n.charAt(0),o=Mr(v),Math.abs(o)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)v=v.times(e),n=pu(v.d),r=n.charAt(0),d++;o=Mr(v),r>1?(v=new m("0."+n),o++):v=new m(r+"."+n.slice(1))}else return s=FS(m,l+2,b).times(o+""),v=xv(new m(r+"."+n.slice(1)),l-h).plus(s),m.precision=b,t==null?(or=!0,Bn(v,b)):v;for(u=a=v=ls(v.minus(Mo),v.plus(Mo),l),c=Bn(v.times(v),l),i=3;;){if(a=Bn(a.times(c),l),s=u.plus(ls(a,new m(i),l)),pu(s.d).slice(0,l)===pu(u.d).slice(0,l))return u=u.times(2),o!==0&&(u=u.plus(FS(m,l+2,b).times(o+""))),u=ls(u,new m(d),l),m.precision=b,t==null?(or=!0,Bn(u,b)):u;u=s,i+=2}}function W9(e,t){var n,r,i;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;t.charCodeAt(r)===48;)++r;for(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(r,i),t){if(i-=r,n=n-r-1,e.e=Vh(n/er),e.d=[],r=(n+1)%er,n<0&&(r+=er),rxb||e.e<-xb))throw Error(ZP+n)}else e.s=0,e.e=0,e.d=[0];return e}function Bn(e,t,n){var r,i,o,a,u,s,l,c,d=e.d;for(a=1,o=d[0];o>=10;o/=10)a++;if(r=t-a,r<0)r+=er,i=t,l=d[c=0];else{if(c=Math.ceil((r+1)/er),o=d.length,c>=o)return e;for(l=o=d[c],a=1;o>=10;o/=10)a++;r%=er,i=r-er+a}if(n!==void 0&&(o=lc(10,a-i-1),u=l/o%10|0,s=t<0||d[c+1]!==void 0||l%o,s=n<4?(u||s)&&(n==0||n==(e.s<0?3:2)):u>5||u==5&&(n==4||s||n==6&&(r>0?i>0?l/lc(10,a-i):0:d[c-1])%10&1||n==(e.s<0?8:7))),t<1||!d[0])return s?(o=Mr(e),d.length=1,t=t-o-1,d[0]=lc(10,(er-t%er)%er),e.e=Vh(-t/er)||0):(d.length=1,d[0]=e.e=e.s=0),e;if(r==0?(d.length=c,o=1,c--):(d.length=c+1,o=lc(10,er-r),d[c]=i>0?(l/lc(10,a-i)%lc(10,i)|0)*o:0),s)for(;;)if(c==0){(d[0]+=o)==Qr&&(d[0]=1,++e.e);break}else{if(d[c]+=o,d[c]!=Qr)break;d[c--]=0,o=1}for(r=d.length;d[--r]===0;)d.pop();if(or&&(e.e>xb||e.e<-xb))throw Error(ZP+Mr(e));return e}function yV(e,t){var n,r,i,o,a,u,s,l,c,d,h=e.constructor,v=h.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new h(e),or?Bn(t,v):t;if(s=e.d,d=t.d,r=t.e,l=e.e,s=s.slice(),a=l-r,a){for(c=a<0,c?(n=s,a=-a,u=d.length):(n=d,r=l,u=s.length),i=Math.max(Math.ceil(v/er),u)+2,a>i&&(a=i,n.length=1),n.reverse(),i=a;i--;)n.push(0);n.reverse()}else{for(i=s.length,u=d.length,c=i0;--i)s[u++]=0;for(i=d.length;i>a;){if(s[--i]0?o=o.charAt(0)+"."+o.slice(1)+Gs(r):a>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(i<0?"e":"e+")+i):i<0?(o="0."+Gs(-i-1)+o,n&&(r=n-a)>0&&(o+=Gs(r))):i>=a?(o+=Gs(i+1-a),n&&(r=n-i-1)>0&&(o=o+"."+Gs(r))):((r=i+1)0&&(i+1===a&&(o+="."),o+=Gs(r))),e.s<0?"-"+o:o}function V9(e,t){if(e.length>t)return e.length=t,!0}function bV(e){var t,n,r;function i(o){var a=this;if(!(a instanceof i))return new i(o);if(a.constructor=i,o instanceof i){a.s=o.s,a.e=o.e,a.d=(o=o.d)?o.slice():o;return}if(typeof o=="number"){if(o*0!==0)throw Error(kc+o);if(o>0)a.s=1;else if(o<0)o=-o,a.s=-1;else{a.s=0,a.e=0,a.d=[0];return}if(o===~~o&&o<1e7){a.e=0,a.d=[o];return}return W9(a,o.toString())}else if(typeof o!="string")throw Error(kc+o);if(o.charCodeAt(0)===45?(o=o.slice(1),a.s=-1):a.s=1,Y8e.test(o))W9(a,o);else throw Error(kc+o)}if(i.prototype=ut,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=bV,i.config=i.set=Z8e,e===void 0&&(e={}),e)for(r=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t=i[t+1]&&r<=i[t+2])this[n]=r;else throw Error(kc+n+": "+r);if((r=e[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error(kc+n+": "+r);return this}var XP=bV(G8e);Mo=new XP(1);const In=XP;function X8e(e){return tke(e)||eke(e)||J8e(e)||Q8e()}function Q8e(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function J8e(e,t){if(e){if(typeof e=="string")return $E(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return $E(e,t)}}function eke(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function tke(e){if(Array.isArray(e))return $E(e)}function $E(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=t?n.apply(void 0,i):e(t-a,H9(function(){for(var u=arguments.length,s=new Array(u),l=0;le.length)&&(t=e.length);for(var n=0,r=new Array(t);n"u"||!(Symbol.iterator in Object(e)))){var n=[],r=!0,i=!1,o=void 0;try{for(var a=e[Symbol.iterator](),u;!(r=(u=a.next()).done)&&(n.push(u.value),!(t&&n.length===t));r=!0);}catch(s){i=!0,o=s}finally{try{!r&&a.return!=null&&a.return()}finally{if(i)throw o}}return n}}function gke(e){if(Array.isArray(e))return e}function CV(e){var t=wv(e,2),n=t[0],r=t[1],i=n,o=r;return n>r&&(i=r,o=n),[i,o]}function EV(e,t,n){if(e.lte(0))return new In(0);var r=Dw.getDigitCount(e.toNumber()),i=new In(10).pow(r),o=e.div(i),a=r!==1?.05:.1,u=new In(Math.ceil(o.div(a).toNumber())).add(n).mul(a),s=u.mul(i);return t?s:new In(Math.ceil(s))}function mke(e,t,n){var r=1,i=new In(e);if(!i.isint()&&n){var o=Math.abs(e);o<1?(r=new In(10).pow(Dw.getDigitCount(e)-1),i=new In(Math.floor(i.div(r).toNumber())).mul(r)):o>1&&(i=new In(Math.floor(e)))}else e===0?i=new In(Math.floor((t-1)/2)):n||(i=new In(Math.floor(e)));var a=Math.floor((t-1)/2),u=oke(ike(function(s){return i.add(new In(s-a).mul(r)).toNumber()}),IE);return u(0,t)}function AV(e,t,n,r){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(n-1)))return{step:new In(0),tickMin:new In(0),tickMax:new In(0)};var o=EV(new In(t).sub(e).div(n-1),r,i),a;e<=0&&t>=0?a=new In(0):(a=new In(e).add(t).div(2),a=a.sub(new In(a).mod(o)));var u=Math.ceil(a.sub(e).div(o).toNumber()),s=Math.ceil(new In(t).sub(a).div(o).toNumber()),l=u+s+1;return l>n?AV(e,t,n,r,i+1):(l0?s+(n-l):s,u=t>0?u:u+(n-l)),{step:o,tickMin:a.sub(new In(u).mul(o)),tickMax:a.add(new In(s).mul(o))})}function yke(e){var t=wv(e,2),n=t[0],r=t[1],i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,a=Math.max(i,2),u=CV([n,r]),s=wv(u,2),l=s[0],c=s[1];if(l===-1/0||c===1/0){var d=c===1/0?[l].concat(FE(IE(0,i-1).map(function(){return 1/0}))):[].concat(FE(IE(0,i-1).map(function(){return-1/0})),[c]);return n>r?NE(d):d}if(l===c)return mke(l,i,o);var h=AV(l,c,a,o),v=h.step,g=h.tickMin,m=h.tickMax,b=Dw.rangeStep(g,m.add(new In(.1).mul(v)),v);return n>r?NE(b):b}function bke(e,t){var n=wv(e,2),r=n[0],i=n[1],o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,a=CV([r,i]),u=wv(a,2),s=u[0],l=u[1];if(s===-1/0||l===1/0)return[r,i];if(s===l)return[s];var c=Math.max(t,2),d=EV(new In(l).sub(s).div(c-1),o,0),h=[].concat(FE(Dw.rangeStep(new In(s),new In(l).sub(new In(.99).mul(d)),d)),[l]);return r>i?NE(h):h}var xke=_V(yke),wke=_V(bke),_ke="Invariant failed";function Qc(e,t){throw new Error(_ke)}var Ske=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function Jd(e){"@babel/helpers - typeof";return Jd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Jd(e)}function wb(){return wb=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Tke(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Mke(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Rke(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0,o=arguments.length>3?arguments[3]:void 0,a=-1,u=(n=r?.length)!==null&&n!==void 0?n:0;if(u<=1)return 0;if(o&&o.axisType==="angleAxis"&&Math.abs(Math.abs(o.range[1]-o.range[0])-360)<=1e-6)for(var s=o.range,l=0;l0?i[l-1].coordinate:i[u-1].coordinate,d=i[l].coordinate,h=l>=u-1?i[0].coordinate:i[l+1].coordinate,v=void 0;if(Ba(d-c)!==Ba(h-d)){var g=[];if(Ba(h-d)===Ba(s[1]-s[0])){v=h;var m=d+s[1]-s[0];g[0]=Math.min(m,(m+c)/2),g[1]=Math.max(m,(m+c)/2)}else{v=c;var b=h+s[1]-s[0];g[0]=Math.min(d,(b+d)/2),g[1]=Math.max(d,(b+d)/2)}var w=[Math.min(d,(v+d)/2),Math.max(d,(v+d)/2)];if(t>w[0]&&t<=w[1]||t>=g[0]&&t<=g[1]){a=i[l].index;break}}else{var x=Math.min(c,h),S=Math.max(c,h);if(t>(x+d)/2&&t<=(S+d)/2){a=i[l].index;break}}}else for(var A=0;A0&&A(r[A].coordinate+r[A-1].coordinate)/2&&t<=(r[A].coordinate+r[A+1].coordinate)/2||A===u-1&&t>(r[A].coordinate+r[A-1].coordinate)/2){a=r[A].index;break}return a},QP=function(t){var n,r=t,i=r.type.displayName,o=(n=t.type)!==null&&n!==void 0&&n.defaultProps?gr(gr({},t.type.defaultProps),t.props):t.props,a=o.stroke,u=o.fill,s;switch(i){case"Line":s=a;break;case"Area":case"Radar":s=a&&a!=="none"?a:u;break;default:s=u;break}return s},Yke=function(t){var n=t.barSize,r=t.totalSize,i=t.stackGroups,o=i===void 0?{}:i;if(!o)return{};for(var a={},u=Object.keys(o),s=0,l=u.length;s=0});if(w&&w.length){var x=w[0].type.defaultProps,S=x!==void 0?gr(gr({},x),w[0].props):w[0].props,A=S.barSize,E=S[b];a[E]||(a[E]=[]);var C=zt(A)?n:A;a[E].push({item:w[0],stackList:w.slice(1),barSize:zt(C)?void 0:Yc(C,r,0)})}}return a},Zke=function(t){var n=t.barGap,r=t.barCategoryGap,i=t.bandSize,o=t.sizeList,a=o===void 0?[]:o,u=t.maxBarSize,s=a.length;if(s<1)return null;var l=Yc(n,i,0,!0),c,d=[];if(a[0].barSize===+a[0].barSize){var h=!1,v=i/s,g=a.reduce(function(A,E){return A+E.barSize||0},0);g+=(s-1)*l,g>=i&&(g-=(s-1)*l,l=0),g>=i&&v>0&&(h=!0,v*=.9,g=s*v);var m=(i-g)/2>>0,b={offset:m-l,size:0};c=a.reduce(function(A,E){var C={item:E.item,position:{offset:b.offset+b.size+l,size:h?v:E.barSize}},T=[].concat(G9(A),[C]);return b=T[T.length-1].position,E.stackList&&E.stackList.length&&E.stackList.forEach(function(M){T.push({item:M,position:b})}),T},d)}else{var w=Yc(r,i,0,!0);i-2*w-(s-1)*l<=0&&(l=0);var x=(i-2*w-(s-1)*l)/s;x>1&&(x>>=0);var S=u===+u?Math.min(x,u):x;c=a.reduce(function(A,E,C){var T=[].concat(G9(A),[{item:E.item,position:{offset:w+(x+l)*C+(x-S)/2,size:S}}]);return E.stackList&&E.stackList.length&&E.stackList.forEach(function(M){T.push({item:M,position:T[T.length-1].position})}),T},d)}return c},Xke=function(t,n,r,i){var o=r.children,a=r.width,u=r.margin,s=a-(u.left||0)-(u.right||0),l=TV({children:o,legendWidth:s});if(l){var c=i||{},d=c.width,h=c.height,v=l.align,g=l.verticalAlign,m=l.layout;if((m==="vertical"||m==="horizontal"&&g==="middle")&&v!=="center"&&Ke(t[v]))return gr(gr({},t),{},Od({},v,t[v]+(d||0)));if((m==="horizontal"||m==="vertical"&&v==="center")&&g!=="middle"&&Ke(t[g]))return gr(gr({},t),{},Od({},g,t[g]+(h||0)))}return t},Qke=function(t,n,r){return zt(n)?!0:t==="horizontal"?n==="yAxis":t==="vertical"||r==="x"?n==="xAxis":r==="y"?n==="yAxis":!0},MV=function(t,n,r,i,o){var a=n.props.children,u=fo(a,Hh).filter(function(l){return Qke(i,o,l.props.direction)});if(u&&u.length){var s=u.map(function(l){return l.props.dataKey});return t.reduce(function(l,c){var d=qr(c,r);if(zt(d))return l;var h=Array.isArray(d)?[Mw(d),il(d)]:[d,d],v=s.reduce(function(g,m){var b=qr(c,m,0),w=h[0]-Math.abs(Array.isArray(b)?b[0]:b),x=h[1]+Math.abs(Array.isArray(b)?b[1]:b);return[Math.min(w,g[0]),Math.max(x,g[1])]},[1/0,-1/0]);return[Math.min(v[0],l[0]),Math.max(v[1],l[1])]},[1/0,-1/0])}return null},Jke=function(t,n,r,i,o){var a=n.map(function(u){return MV(t,u,r,o,i)}).filter(function(u){return!zt(u)});return a&&a.length?a.reduce(function(u,s){return[Math.min(u[0],s[0]),Math.max(u[1],s[1])]},[1/0,-1/0]):null},RV=function(t,n,r,i,o){var a=n.map(function(s){var l=s.props.dataKey;return r==="number"&&l&&MV(t,s,l,i)||h0(t,l,r,o)});if(r==="number")return a.reduce(function(s,l){return[Math.min(s[0],l[0]),Math.max(s[1],l[1])]},[1/0,-1/0]);var u={};return a.reduce(function(s,l){for(var c=0,d=l.length;c=2?Ba(u[0]-u[1])*2*l:l,n&&(t.ticks||t.niceTicks)){var c=(t.ticks||t.niceTicks).map(function(d){var h=o?o.indexOf(d):d;return{coordinate:i(h)+l,value:d,offset:l}});return c.filter(function(d){return!Lh(d.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(d,h){return{coordinate:i(d)+l,value:d,index:h,offset:l}}):i.ticks&&!r?i.ticks(t.tickCount).map(function(d){return{coordinate:i(d)+l,value:d,offset:l}}):i.domain().map(function(d,h){return{coordinate:i(d)+l,value:o?o[d]:d,index:h,offset:l}})},LS=new WeakMap,uy=function(t,n){if(typeof n!="function")return t;LS.has(t)||LS.set(t,new WeakMap);var r=LS.get(t);if(r.has(n))return r.get(n);var i=function(){t.apply(void 0,arguments),n.apply(void 0,arguments)};return r.set(n,i),i},eTe=function(t,n,r){var i=t.scale,o=t.type,a=t.layout,u=t.axisType;if(i==="auto")return a==="radial"&&u==="radiusAxis"?{scale:vv(),realScaleType:"band"}:a==="radial"&&u==="angleAxis"?{scale:gb(),realScaleType:"linear"}:o==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!r)?{scale:d0(),realScaleType:"point"}:o==="category"?{scale:vv(),realScaleType:"band"}:{scale:gb(),realScaleType:"linear"};if(_g(i)){var s="scale".concat(mw(i));return{scale:(U9[s]||d0)(),realScaleType:U9[s]?s:"point"}}return Wt(i)?{scale:i}:{scale:d0(),realScaleType:"point"}},Z9=1e-4,tTe=function(t){var n=t.domain();if(!(!n||n.length<=2)){var r=n.length,i=t.range(),o=Math.min(i[0],i[1])-Z9,a=Math.max(i[0],i[1])+Z9,u=t(n[0]),s=t(n[r-1]);(ua||sa)&&t.domain([n[0],n[r-1]])}},nTe=function(t,n){if(!t)return null;for(var r=0,i=t.length;ri)&&(o[1]=i),o[0]>i&&(o[0]=i),o[1]=0?(t[u][r][0]=o,t[u][r][1]=o+s,o=t[u][r][1]):(t[u][r][0]=a,t[u][r][1]=a+s,a=t[u][r][1])}},oTe=function(t){var n=t.length;if(!(n<=0))for(var r=0,i=t[0].length;r=0?(t[a][r][0]=o,t[a][r][1]=o+u,o=t[a][r][1]):(t[a][r][0]=0,t[a][r][1]=0)}},aTe={sign:iTe,expand:w2e,none:Hd,silhouette:_2e,wiggle:S2e,positive:oTe},uTe=function(t,n,r){var i=n.map(function(u){return u.props.dataKey}),o=aTe[r],a=x2e().keys(i).value(function(u,s){return+qr(u,s,0)}).order(fE).offset(o);return a(t)},sTe=function(t,n,r,i,o,a){if(!t)return null;var u=a?n.reverse():n,s={},l=u.reduce(function(d,h){var v,g=(v=h.type)!==null&&v!==void 0&&v.defaultProps?gr(gr({},h.type.defaultProps),h.props):h.props,m=g.stackId,b=g.hide;if(b)return d;var w=g[r],x=d[w]||{hasStack:!1,stackGroups:{}};if(Hr(m)){var S=x.stackGroups[m]||{numericAxisId:r,cateAxisId:i,items:[]};S.items.push(h),x.hasStack=!0,x.stackGroups[m]=S}else x.stackGroups[df("_stackId_")]={numericAxisId:r,cateAxisId:i,items:[h]};return gr(gr({},d),{},Od({},w,x))},s),c={};return Object.keys(l).reduce(function(d,h){var v=l[h];if(v.hasStack){var g={};v.stackGroups=Object.keys(v.stackGroups).reduce(function(m,b){var w=v.stackGroups[b];return gr(gr({},m),{},Od({},b,{numericAxisId:r,cateAxisId:i,items:w.items,stackedData:uTe(t,w.items,o)}))},g)}return gr(gr({},d),{},Od({},h,v))},c)},lTe=function(t,n){var r=n.realScaleType,i=n.type,o=n.tickCount,a=n.originalDomain,u=n.allowDecimals,s=r||n.scale;if(s!=="auto"&&s!=="linear")return null;if(o&&i==="number"&&a&&(a[0]==="auto"||a[1]==="auto")){var l=t.domain();if(!l.length)return null;var c=xke(l,o,u);return t.domain([Mw(c),il(c)]),{niceTicks:c}}if(o&&i==="number"){var d=t.domain(),h=wke(d,o,u);return{niceTicks:h}}return null};function eh(e){var t=e.axis,n=e.ticks,r=e.bandSize,i=e.entry,o=e.index,a=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!zt(i[t.dataKey])){var u=G1(n,"value",i[t.dataKey]);if(u)return u.coordinate+r/2}return n[o]?n[o].coordinate+r/2:null}var s=qr(i,zt(a)?t.dataKey:a);return zt(s)?null:t.scale(s)}var X9=function(t){var n=t.axis,r=t.ticks,i=t.offset,o=t.bandSize,a=t.entry,u=t.index;if(n.type==="category")return r[u]?r[u].coordinate+i:null;var s=qr(a,n.dataKey,n.domain[u]);return zt(s)?null:n.scale(s)-o/2+i},cTe=function(t){var n=t.numericAxis,r=n.scale.domain();if(n.type==="number"){var i=Math.min(r[0],r[1]),o=Math.max(r[0],r[1]);return i<=0&&o>=0?0:o<0?o:i}return r[0]},fTe=function(t,n){var r,i=(r=t.type)!==null&&r!==void 0&&r.defaultProps?gr(gr({},t.type.defaultProps),t.props):t.props,o=i.stackId;if(Hr(o)){var a=n[o];if(a){var u=a.items.indexOf(t);return u>=0?a.stackedData[u]:null}}return null},dTe=function(t){return t.reduce(function(n,r){return[Mw(r.concat([n[0]]).filter(Ke)),il(r.concat([n[1]]).filter(Ke))]},[1/0,-1/0])},IV=function(t,n,r){return Object.keys(t).reduce(function(i,o){var a=t[o],u=a.stackedData,s=u.reduce(function(l,c){var d=dTe(c.slice(n,r+1));return[Math.min(l[0],d[0]),Math.max(l[1],d[1])]},[1/0,-1/0]);return[Math.min(s[0],i[0]),Math.max(s[1],i[1])]},[1/0,-1/0]).map(function(i){return i===1/0||i===-1/0?0:i})},Q9=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,J9=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,zE=function(t,n,r){if(Wt(t))return t(n,r);if(!Array.isArray(t))return n;var i=[];if(Ke(t[0]))i[0]=r?t[0]:Math.min(t[0],n[0]);else if(Q9.test(t[0])){var o=+Q9.exec(t[0])[1];i[0]=n[0]-o}else Wt(t[0])?i[0]=t[0](n[0]):i[0]=n[0];if(Ke(t[1]))i[1]=r?t[1]:Math.max(t[1],n[1]);else if(J9.test(t[1])){var a=+J9.exec(t[1])[1];i[1]=n[1]+a}else Wt(t[1])?i[1]=t[1](n[1]):i[1]=n[1];return i},Sb=function(t,n,r){if(t&&t.scale&&t.scale.bandwidth){var i=t.scale.bandwidth();if(!r||i>0)return i}if(t&&n&&n.length>=2){for(var o=EP(n,function(d){return d.coordinate}),a=1/0,u=1,s=o.length;ua&&(l=2*Math.PI-l),{radius:u,angle:gTe(l),angleInRadian:l}},bTe=function(t){var n=t.startAngle,r=t.endAngle,i=Math.floor(n/360),o=Math.floor(r/360),a=Math.min(i,o);return{startAngle:n-a*360,endAngle:r-a*360}},xTe=function(t,n){var r=n.startAngle,i=n.endAngle,o=Math.floor(r/360),a=Math.floor(i/360),u=Math.min(o,a);return t+u*360},r7=function(t,n){var r=t.x,i=t.y,o=yTe({x:r,y:i},n),a=o.radius,u=o.angle,s=n.innerRadius,l=n.outerRadius;if(al)return!1;if(a===0)return!0;var c=bTe(n),d=c.startAngle,h=c.endAngle,v=u,g;if(d<=h){for(;v>h;)v-=360;for(;v=d&&v<=h}else{for(;v>d;)v-=360;for(;v=h&&v<=d}return g?n7(n7({},n),{},{radius:a,angle:xTe(v,n)}):null};function Ev(e){"@babel/helpers - typeof";return Ev=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ev(e)}var wTe=["offset"];function _Te(e){return ATe(e)||ETe(e)||CTe(e)||STe()}function STe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function CTe(e,t){if(e){if(typeof e=="string")return UE(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return UE(e,t)}}function ETe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function ATe(e){if(Array.isArray(e))return UE(e)}function UE(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function OTe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function i7(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function jr(e){for(var t=1;t=0?1:-1,S,A;i==="insideStart"?(S=v+x*a,A=m):i==="insideEnd"?(S=g-x*a,A=!m):i==="end"&&(S=g+x*a,A=m),A=w<=0?A:!A;var E=pi(l,c,b,S),C=pi(l,c,b,S+(A?1:-1)*359),T="M".concat(E.x,",").concat(E.y,` + A`).concat(b,",").concat(b,",0,1,").concat(A?0:1,`, + `).concat(C.x,",").concat(C.y),M=zt(t.id)?df("recharts-radial-line-"):t.id;return j.createElement("text",Av({},r,{dominantBaseline:"central",className:cn("recharts-radial-bar-label",u)}),j.createElement("defs",null,j.createElement("path",{id:M,d:T})),j.createElement("textPath",{xlinkHref:"#".concat(M)},n))},ITe=function(t){var n=t.viewBox,r=t.offset,i=t.position,o=n,a=o.cx,u=o.cy,s=o.innerRadius,l=o.outerRadius,c=o.startAngle,d=o.endAngle,h=(c+d)/2;if(i==="outside"){var v=pi(a,u,l+r,h),g=v.x,m=v.y;return{x:g,y:m,textAnchor:g>=a?"start":"end",verticalAnchor:"middle"}}if(i==="center")return{x:a,y:u,textAnchor:"middle",verticalAnchor:"middle"};if(i==="centerTop")return{x:a,y:u,textAnchor:"middle",verticalAnchor:"start"};if(i==="centerBottom")return{x:a,y:u,textAnchor:"middle",verticalAnchor:"end"};var b=(s+l)/2,w=pi(a,u,b,h),x=w.x,S=w.y;return{x,y:S,textAnchor:"middle",verticalAnchor:"middle"}},NTe=function(t){var n=t.viewBox,r=t.parentViewBox,i=t.offset,o=t.position,a=n,u=a.x,s=a.y,l=a.width,c=a.height,d=c>=0?1:-1,h=d*i,v=d>0?"end":"start",g=d>0?"start":"end",m=l>=0?1:-1,b=m*i,w=m>0?"end":"start",x=m>0?"start":"end";if(o==="top"){var S={x:u+l/2,y:s-d*i,textAnchor:"middle",verticalAnchor:v};return jr(jr({},S),r?{height:Math.max(s-r.y,0),width:l}:{})}if(o==="bottom"){var A={x:u+l/2,y:s+c+h,textAnchor:"middle",verticalAnchor:g};return jr(jr({},A),r?{height:Math.max(r.y+r.height-(s+c),0),width:l}:{})}if(o==="left"){var E={x:u-b,y:s+c/2,textAnchor:w,verticalAnchor:"middle"};return jr(jr({},E),r?{width:Math.max(E.x-r.x,0),height:c}:{})}if(o==="right"){var C={x:u+l+b,y:s+c/2,textAnchor:x,verticalAnchor:"middle"};return jr(jr({},C),r?{width:Math.max(r.x+r.width-C.x,0),height:c}:{})}var T=r?{width:l,height:c}:{};return o==="insideLeft"?jr({x:u+b,y:s+c/2,textAnchor:x,verticalAnchor:"middle"},T):o==="insideRight"?jr({x:u+l-b,y:s+c/2,textAnchor:w,verticalAnchor:"middle"},T):o==="insideTop"?jr({x:u+l/2,y:s+h,textAnchor:"middle",verticalAnchor:g},T):o==="insideBottom"?jr({x:u+l/2,y:s+c-h,textAnchor:"middle",verticalAnchor:v},T):o==="insideTopLeft"?jr({x:u+b,y:s+h,textAnchor:x,verticalAnchor:g},T):o==="insideTopRight"?jr({x:u+l-b,y:s+h,textAnchor:w,verticalAnchor:g},T):o==="insideBottomLeft"?jr({x:u+b,y:s+c-h,textAnchor:x,verticalAnchor:v},T):o==="insideBottomRight"?jr({x:u+l-b,y:s+c-h,textAnchor:w,verticalAnchor:v},T):$h(o)&&(Ke(o.x)||bc(o.x))&&(Ke(o.y)||bc(o.y))?jr({x:u+Yc(o.x,l),y:s+Yc(o.y,c),textAnchor:"end",verticalAnchor:"end"},T):jr({x:u+l/2,y:s+c/2,textAnchor:"middle",verticalAnchor:"middle"},T)},FTe=function(t){return"cx"in t&&Ke(t.cx)};function ki(e){var t=e.offset,n=t===void 0?5:t,r=PTe(e,wTe),i=jr({offset:n},r),o=i.viewBox,a=i.position,u=i.value,s=i.children,l=i.content,c=i.className,d=c===void 0?"":c,h=i.textBreakAll;if(!o||zt(u)&&zt(s)&&!y.isValidElement(l)&&!Wt(l))return null;if(y.isValidElement(l))return y.cloneElement(l,i);var v;if(Wt(l)){if(v=y.createElement(l,i),y.isValidElement(v))return v}else v=RTe(i);var g=FTe(o),m=Bt(i,!0);if(g&&(a==="insideStart"||a==="insideEnd"||a==="end"))return $Te(i,v,m);var b=g?ITe(i):NTe(i);return j.createElement(lb,Av({className:cn("recharts-label",d)},m,b,{breakAll:h}),v)}ki.displayName="Label";var FV=function(t){var n=t.cx,r=t.cy,i=t.angle,o=t.startAngle,a=t.endAngle,u=t.r,s=t.radius,l=t.innerRadius,c=t.outerRadius,d=t.x,h=t.y,v=t.top,g=t.left,m=t.width,b=t.height,w=t.clockWise,x=t.labelViewBox;if(x)return x;if(Ke(m)&&Ke(b)){if(Ke(d)&&Ke(h))return{x:d,y:h,width:m,height:b};if(Ke(v)&&Ke(g))return{x:v,y:g,width:m,height:b}}return Ke(d)&&Ke(h)?{x:d,y:h,width:0,height:0}:Ke(n)&&Ke(r)?{cx:n,cy:r,startAngle:o||i||0,endAngle:a||i||0,innerRadius:l||0,outerRadius:c||s||u||0,clockWise:w}:t.viewBox?t.viewBox:{}},LTe=function(t,n){return t?t===!0?j.createElement(ki,{key:"label-implicit",viewBox:n}):Hr(t)?j.createElement(ki,{key:"label-implicit",viewBox:n,value:t}):y.isValidElement(t)?t.type===ki?y.cloneElement(t,{key:"label-implicit",viewBox:n}):j.createElement(ki,{key:"label-implicit",content:t,viewBox:n}):Wt(t)?j.createElement(ki,{key:"label-implicit",content:t,viewBox:n}):$h(t)?j.createElement(ki,Av({viewBox:n},t,{key:"label-implicit"})):null:null},jTe=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&r&&!t.label)return null;var i=t.children,o=FV(t),a=fo(i,ki).map(function(s,l){return y.cloneElement(s,{viewBox:n||o,key:"label-".concat(l)})});if(!r)return a;var u=LTe(t.label,n||o);return[u].concat(_Te(a))};ki.parseViewBox=FV;ki.renderCallByParent=jTe;function BTe(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var zTe=BTe;const UTe=Pn(zTe);function Pv(e){"@babel/helpers - typeof";return Pv=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Pv(e)}var WTe=["valueAccessor"],VTe=["data","dataKey","clockWise","id","textBreakAll"];function HTe(e){return YTe(e)||GTe(e)||KTe(e)||qTe()}function qTe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function KTe(e,t){if(e){if(typeof e=="string")return WE(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return WE(e,t)}}function GTe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function YTe(e){if(Array.isArray(e))return WE(e)}function WE(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function JTe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var eMe=function(t){return Array.isArray(t.value)?UTe(t.value):t.value};function Su(e){var t=e.valueAccessor,n=t===void 0?eMe:t,r=u7(e,WTe),i=r.data,o=r.dataKey,a=r.clockWise,u=r.id,s=r.textBreakAll,l=u7(r,VTe);return!i||!i.length?null:j.createElement(Sn,{className:"recharts-label-list"},i.map(function(c,d){var h=zt(o)?n(c,d):qr(c&&c.payload,o),v=zt(u)?{}:{id:"".concat(u,"-").concat(d)};return j.createElement(ki,Eb({},Bt(c,!0),l,v,{parentViewBox:c.parentViewBox,value:h,textBreakAll:s,viewBox:ki.parseViewBox(zt(a)?c:a7(a7({},c),{},{clockWise:a})),key:"label-".concat(d),index:d}))}))}Su.displayName="LabelList";function tMe(e,t){return e?e===!0?j.createElement(Su,{key:"labelList-implicit",data:t}):j.isValidElement(e)||Wt(e)?j.createElement(Su,{key:"labelList-implicit",data:t,content:e}):$h(e)?j.createElement(Su,Eb({data:t},e,{key:"labelList-implicit"})):null:null}function nMe(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&n&&!e.label)return null;var r=e.children,i=fo(r,Su).map(function(a,u){return y.cloneElement(a,{data:t,key:"labelList-".concat(u)})});if(!n)return i;var o=tMe(e.label,t);return[o].concat(HTe(i))}Su.renderCallByParent=nMe;function Ov(e){"@babel/helpers - typeof";return Ov=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ov(e)}function VE(){return VE=Object.assign?Object.assign.bind():function(e){for(var t=1;t180),",").concat(+(a>l),`, `).concat(d.x,",").concat(d.y,` - `);if(i>0){var m=Er(n,r,i,a),g=Er(n,r,i,l);h+="L ".concat(g.x,",").concat(g.y,` + `);if(i>0){var v=pi(n,r,i,a),g=pi(n,r,i,l);h+="L ".concat(g.x,",").concat(g.y,` A `).concat(i,",").concat(i,`,0, `).concat(+(Math.abs(s)>180),",").concat(+(a<=l),`, - `).concat(m.x,",").concat(m.y," Z")}else h+="L ".concat(n,",").concat(r," Z");return h},LTe=function(t){var n=t.cx,r=t.cy,i=t.innerRadius,o=t.outerRadius,a=t.cornerRadius,u=t.forceCornerRadius,s=t.cornerIsExternal,l=t.startAngle,c=t.endAngle,d=ea(c-l),h=zv({cx:n,cy:r,radius:o,angle:l,sign:d,cornerRadius:a,cornerIsExternal:s}),m=h.circleTangency,g=h.lineTangency,v=h.theta,y=zv({cx:n,cy:r,radius:o,angle:c,sign:-d,cornerRadius:a,cornerIsExternal:s}),x=y.circleTangency,w=y.lineTangency,S=y.theta,A=s?Math.abs(l-c):Math.abs(l-c)-v-S;if(A<0)return u?"M ".concat(g.x,",").concat(g.y,` + `).concat(v.x,",").concat(v.y," Z")}else h+="L ".concat(n,",").concat(r," Z");return h},uMe=function(t){var n=t.cx,r=t.cy,i=t.innerRadius,o=t.outerRadius,a=t.cornerRadius,u=t.forceCornerRadius,s=t.cornerIsExternal,l=t.startAngle,c=t.endAngle,d=Ba(c-l),h=sy({cx:n,cy:r,radius:o,angle:l,sign:d,cornerRadius:a,cornerIsExternal:s}),v=h.circleTangency,g=h.lineTangency,m=h.theta,b=sy({cx:n,cy:r,radius:o,angle:c,sign:-d,cornerRadius:a,cornerIsExternal:s}),w=b.circleTangency,x=b.lineTangency,S=b.theta,A=s?Math.abs(l-c):Math.abs(l-c)-m-S;if(A<0)return u?"M ".concat(g.x,",").concat(g.y,` a`).concat(a,",").concat(a,",0,0,1,").concat(a*2,`,0 a`).concat(a,",").concat(a,",0,0,1,").concat(-a*2,`,0 - `):AV({cx:n,cy:r,innerRadius:i,outerRadius:o,startAngle:l,endAngle:c});var E="M ".concat(g.x,",").concat(g.y,` - A`).concat(a,",").concat(a,",0,0,").concat(+(d<0),",").concat(m.x,",").concat(m.y,` - A`).concat(o,",").concat(o,",0,").concat(+(A>180),",").concat(+(d<0),",").concat(x.x,",").concat(x.y,` - A`).concat(a,",").concat(a,",0,0,").concat(+(d<0),",").concat(w.x,",").concat(w.y,` - `);if(i>0){var C=zv({cx:n,cy:r,radius:i,angle:l,sign:d,isExternal:!0,cornerRadius:a,cornerIsExternal:s}),P=C.circleTangency,k=C.lineTangency,M=C.theta,L=zv({cx:n,cy:r,radius:i,angle:c,sign:-d,isExternal:!0,cornerRadius:a,cornerIsExternal:s}),B=L.circleTangency,F=L.lineTangency,Y=L.theta,H=s?Math.abs(l-c):Math.abs(l-c)-M-Y;if(H<0&&a===0)return"".concat(E,"L").concat(n,",").concat(r,"Z");E+="L".concat(F.x,",").concat(F.y,` - A`).concat(a,",").concat(a,",0,0,").concat(+(d<0),",").concat(B.x,",").concat(B.y,` - A`).concat(i,",").concat(i,",0,").concat(+(H>180),",").concat(+(d>0),",").concat(P.x,",").concat(P.y,` - A`).concat(a,",").concat(a,",0,0,").concat(+(d<0),",").concat(k.x,",").concat(k.y,"Z")}else E+="L".concat(n,",").concat(r,"Z");return E},jTe={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},OV=function(t){var n=J9(J9({},jTe),t),r=n.cx,i=n.cy,o=n.innerRadius,a=n.outerRadius,u=n.cornerRadius,s=n.forceCornerRadius,l=n.cornerIsExternal,c=n.startAngle,d=n.endAngle,h=n.className;if(a0&&Math.abs(c-d)<360?y=LTe({cx:r,cy:i,innerRadius:o,outerRadius:a,cornerRadius:Math.min(v,g/2),forceCornerRadius:s,cornerIsExternal:l,startAngle:c,endAngle:d}):y=AV({cx:r,cy:i,innerRadius:o,outerRadius:a,startAngle:c,endAngle:d}),$.createElement("path",ME({},ct(n,!0),{className:m,d:y,role:"img"}))};function am(e){"@babel/helpers - typeof";return am=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},am(e)}function RE(){return RE=Object.assign?Object.assign.bind():function(e){for(var t=1;t0;)if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function YTe(e,t){return yh(e.getTime(),t.getTime())}function u$(e,t,n){if(e.size!==t.size)return!1;for(var r={},i=e.entries(),o=0,a,u;(a=i.next())&&!a.done;){for(var s=t.entries(),l=!1,c=0;(u=s.next())&&!u.done;){var d=a.value,h=d[0],m=d[1],g=u.value,v=g[0],y=g[1];!l&&!r[c]&&(l=n.equals(h,v,o,c,e,t,n)&&n.equals(m,y,h,v,e,t,n))&&(r[c]=!0),c++}if(!l)return!1;o++}return!0}function ZTe(e,t,n){var r=a$(e),i=r.length;if(a$(t).length!==i)return!1;for(var o;i-- >0;)if(o=r[i],o===kV&&(e.$$typeof||t.$$typeof)&&e.$$typeof!==t.$$typeof||!PV(t,o)||!n.equals(e[o],t[o],o,o,e,t,n))return!1;return!0}function cp(e,t,n){var r=i$(e),i=r.length;if(i$(t).length!==i)return!1;for(var o,a,u;i-- >0;)if(o=r[i],o===kV&&(e.$$typeof||t.$$typeof)&&e.$$typeof!==t.$$typeof||!PV(t,o)||!n.equals(e[o],t[o],o,o,e,t,n)||(a=o$(e,o),u=o$(t,o),(a||u)&&(!a||!u||a.configurable!==u.configurable||a.enumerable!==u.enumerable||a.writable!==u.writable)))return!1;return!0}function XTe(e,t){return yh(e.valueOf(),t.valueOf())}function QTe(e,t){return e.source===t.source&&e.flags===t.flags}function s$(e,t,n){if(e.size!==t.size)return!1;for(var r={},i=e.values(),o,a;(o=i.next())&&!o.done;){for(var u=t.values(),s=!1,l=0;(a=u.next())&&!a.done;)!s&&!r[l]&&(s=n.equals(o.value,a.value,o.value,a.value,e,t,n))&&(r[l]=!0),l++;if(!s)return!1}return!0}function JTe(e,t){var n=e.length;if(t.length!==n)return!1;for(;n-- >0;)if(e[n]!==t[n])return!1;return!0}var eMe="[object Arguments]",tMe="[object Boolean]",nMe="[object Date]",rMe="[object Map]",iMe="[object Number]",oMe="[object Object]",aMe="[object RegExp]",uMe="[object Set]",sMe="[object String]",lMe=Array.isArray,l$=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,c$=Object.assign,cMe=Object.prototype.toString.call.bind(Object.prototype.toString);function fMe(e){var t=e.areArraysEqual,n=e.areDatesEqual,r=e.areMapsEqual,i=e.areObjectsEqual,o=e.arePrimitiveWrappersEqual,a=e.areRegExpsEqual,u=e.areSetsEqual,s=e.areTypedArraysEqual;return function(c,d,h){if(c===d)return!0;if(c==null||d==null||typeof c!="object"||typeof d!="object")return c!==c&&d!==d;var m=c.constructor;if(m!==d.constructor)return!1;if(m===Object)return i(c,d,h);if(lMe(c))return t(c,d,h);if(l$!=null&&l$(c))return s(c,d,h);if(m===Date)return n(c,d,h);if(m===RegExp)return a(c,d,h);if(m===Map)return r(c,d,h);if(m===Set)return u(c,d,h);var g=cMe(c);return g===nMe?n(c,d,h):g===aMe?a(c,d,h):g===rMe?r(c,d,h):g===uMe?u(c,d,h):g===oMe?typeof c.then!="function"&&typeof d.then!="function"&&i(c,d,h):g===eMe?i(c,d,h):g===tMe||g===iMe||g===sMe?o(c,d,h):!1}}function dMe(e){var t=e.circular,n=e.createCustomConfig,r=e.strict,i={areArraysEqual:r?cp:KTe,areDatesEqual:YTe,areMapsEqual:r?r$(u$,cp):u$,areObjectsEqual:r?cp:ZTe,arePrimitiveWrappersEqual:XTe,areRegExpsEqual:QTe,areSetsEqual:r?r$(s$,cp):s$,areTypedArraysEqual:r?cp:JTe};if(n&&(i=c$({},i,n(i))),t){var o=Wv(i.areArraysEqual),a=Wv(i.areMapsEqual),u=Wv(i.areObjectsEqual),s=Wv(i.areSetsEqual);i=c$({},i,{areArraysEqual:o,areMapsEqual:a,areObjectsEqual:u,areSetsEqual:s})}return i}function hMe(e){return function(t,n,r,i,o,a,u){return e(t,n,u)}}function pMe(e){var t=e.circular,n=e.comparator,r=e.createState,i=e.equals,o=e.strict;if(r)return function(s,l){var c=r(),d=c.cache,h=d===void 0?t?new WeakMap:void 0:d,m=c.meta;return n(s,l,{cache:h,equals:i,meta:m,strict:o})};if(t)return function(s,l){return n(s,l,{cache:new WeakMap,equals:i,meta:void 0,strict:o})};var a={cache:void 0,equals:i,meta:void 0,strict:o};return function(s,l){return n(s,l,a)}}var mMe=fl();fl({strict:!0});fl({circular:!0});fl({circular:!0,strict:!0});fl({createInternalComparator:function(){return yh}});fl({strict:!0,createInternalComparator:function(){return yh}});fl({circular:!0,createInternalComparator:function(){return yh}});fl({circular:!0,createInternalComparator:function(){return yh},strict:!0});function fl(e){e===void 0&&(e={});var t=e.circular,n=t===void 0?!1:t,r=e.createInternalComparator,i=e.createState,o=e.strict,a=o===void 0?!1:o,u=dMe(e),s=fMe(u),l=r?r(s):hMe(s);return pMe({circular:n,comparator:s,createState:i,equals:l,strict:a})}function gMe(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function f$(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=-1,r=function i(o){n<0&&(n=o),o-n>t?(e(o),n=-1):gMe(i)};requestAnimationFrame(r)}function DE(e){"@babel/helpers - typeof";return DE=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},DE(e)}function vMe(e){return xMe(e)||wMe(e)||bMe(e)||yMe()}function yMe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function bMe(e,t){if(e){if(typeof e=="string")return d$(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return d$(e,t)}}function d$(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n1?1:x<0?0:x},v=function(x){for(var w=x>1?1:x,S=w,A=0;A<8;++A){var E=d(S)-w,C=m(S);if(Math.abs(E-w)0&&arguments[0]!==void 0?arguments[0]:{},n=t.stiff,r=n===void 0?100:n,i=t.damping,o=i===void 0?8:i,a=t.dt,u=a===void 0?17:a,s=function(c,d,h){var m=-(c-d)*r,g=h*o,v=h+(m-g)*u/1e3,y=h*u/1e3+c;return Math.abs(y-d)e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function QMe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function CS(e){return nRe(e)||tRe(e)||eRe(e)||JMe()}function JMe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function eRe(e,t){if(e){if(typeof e=="string")return LE(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return LE(e,t)}}function tRe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function nRe(e){if(Array.isArray(e))return LE(e)}function LE(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function lb(e){return lb=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},lb(e)}var la=function(e){uRe(n,e);var t=sRe(n);function n(r,i){var o;rRe(this,n),o=t.call(this,r,i);var a=o.props,u=a.isActive,s=a.attributeName,l=a.from,c=a.to,d=a.steps,h=a.children,m=a.duration;if(o.handleStyleChange=o.handleStyleChange.bind(zE(o)),o.changeStyle=o.changeStyle.bind(zE(o)),!u||m<=0)return o.state={style:{}},typeof h=="function"&&(o.state={style:c}),BE(o);if(d&&d.length)o.state={style:d[0].style};else if(l){if(typeof h=="function")return o.state={style:l},BE(o);o.state={style:s?Ap({},s,l):l}}else o.state={style:{}};return o}return oRe(n,[{key:"componentDidMount",value:function(){var i=this.props,o=i.isActive,a=i.canBegin;this.mounted=!0,!(!o||!a)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(i){var o=this.props,a=o.isActive,u=o.canBegin,s=o.attributeName,l=o.shouldReAnimate,c=o.to,d=o.from,h=this.state.style;if(u){if(!a){var m={style:s?Ap({},s,c):c};this.state&&h&&(s&&h[s]!==c||!s&&h!==c)&&this.setState(m);return}if(!(mMe(i.to,c)&&i.canBegin&&i.isActive)){var g=!i.canBegin||!i.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var v=g||l?d:i.to;if(this.state&&h){var y={style:s?Ap({},s,v):v};(s&&h[s]!==v||!s&&h!==v)&&this.setState(y)}this.runAnimation(Bo(Bo({},this.props),{},{from:v,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var i=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),i&&i()}},{key:"handleStyleChange",value:function(i){this.changeStyle(i)}},{key:"changeStyle",value:function(i){this.mounted&&this.setState({style:i})}},{key:"runJSAnimation",value:function(i){var o=this,a=i.from,u=i.to,s=i.duration,l=i.easing,c=i.begin,d=i.onAnimationEnd,h=i.onAnimationStart,m=YMe(a,u,LMe(l),s,this.changeStyle),g=function(){o.stopJSAnimation=m()};this.manager.start([h,c,g,s,d])}},{key:"runStepAnimation",value:function(i){var o=this,a=i.steps,u=i.begin,s=i.onAnimationStart,l=a[0],c=l.style,d=l.duration,h=d===void 0?0:d,m=function(v,y,x){if(x===0)return v;var w=y.duration,S=y.easing,A=S===void 0?"ease":S,E=y.style,C=y.properties,P=y.onAnimationEnd,k=x>0?a[x-1]:y,M=C||Object.keys(E);if(typeof A=="function"||A==="spring")return[].concat(CS(v),[o.runJSAnimation.bind(o,{from:k.style,to:E,duration:w,easing:A}),w]);var L=m$(M,w,A),B=Bo(Bo(Bo({},k.style),E),{},{transition:L});return[].concat(CS(v),[B,w,P]).filter(AMe)};return this.manager.start([s].concat(CS(a.reduce(m,[c,Math.max(h,u)])),[i.onAnimationEnd]))}},{key:"runAnimation",value:function(i){this.manager||(this.manager=_Me());var o=i.begin,a=i.duration,u=i.attributeName,s=i.to,l=i.easing,c=i.onAnimationStart,d=i.onAnimationEnd,h=i.steps,m=i.children,g=this.manager;if(this.unSubscribe=g.subscribe(this.handleStyleChange),typeof l=="function"||typeof m=="function"||l==="spring"){this.runJSAnimation(i);return}if(h.length>1){this.runStepAnimation(i);return}var v=u?Ap({},u,s):s,y=m$(Object.keys(v),a,l);g.start([c,o,Bo(Bo({},v),{},{transition:y}),a,d])}},{key:"render",value:function(){var i=this.props,o=i.children;i.begin;var a=i.duration;i.attributeName,i.easing;var u=i.isActive;i.steps,i.from,i.to,i.canBegin,i.onAnimationEnd,i.shouldReAnimate,i.onAnimationReStart;var s=XMe(i,ZMe),l=b.Children.count(o),c=this.state.style;if(typeof o=="function")return o(c);if(!u||l===0||a<=0)return o;var d=function(m){var g=m.props,v=g.style,y=v===void 0?{}:v,x=g.className,w=b.cloneElement(m,Bo(Bo({},s),{},{style:Bo(Bo({},y),c),className:x}));return w};return l===1?d(b.Children.only(o)):$.createElement("div",null,b.Children.map(o,function(h){return d(h)}))}}]),n}(b.PureComponent);la.displayName="Animate";la.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};la.propTypes={from:ot.oneOfType([ot.object,ot.string]),to:ot.oneOfType([ot.object,ot.string]),attributeName:ot.string,duration:ot.number,begin:ot.number,easing:ot.oneOfType([ot.string,ot.func]),steps:ot.arrayOf(ot.shape({duration:ot.number.isRequired,style:ot.object.isRequired,easing:ot.oneOfType([ot.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),ot.func]),properties:ot.arrayOf("string"),onAnimationEnd:ot.func})),children:ot.oneOfType([ot.node,ot.func]),isActive:ot.bool,canBegin:ot.bool,onAnimationEnd:ot.func,shouldReAnimate:ot.bool,onAnimationStart:ot.func,onAnimationReStart:ot.func};function UE(e,t){return UE=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},UE(e,t)}function nn(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,UE(e,t)}function an(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}ot.object,ot.object,ot.object,ot.element;ot.object,ot.object,ot.object,ot.oneOfType([ot.array,ot.element]),ot.any;function lm(e){"@babel/helpers - typeof";return lm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},lm(e)}function cb(){return cb=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0?1:-1,s=r>=0?1:-1,l=i>=0&&r>=0||i<0&&r<0?1:0,c;if(a>0&&o instanceof Array){for(var d=[0,0,0,0],h=0,m=4;ha?a:o[h];c="M".concat(t,",").concat(n+u*d[0]),d[0]>0&&(c+="A ".concat(d[0],",").concat(d[0],",0,0,").concat(l,",").concat(t+s*d[0],",").concat(n)),c+="L ".concat(t+r-s*d[1],",").concat(n),d[1]>0&&(c+="A ".concat(d[1],",").concat(d[1],",0,0,").concat(l,`, + `):LV({cx:n,cy:r,innerRadius:i,outerRadius:o,startAngle:l,endAngle:c});var E="M ".concat(g.x,",").concat(g.y,` + A`).concat(a,",").concat(a,",0,0,").concat(+(d<0),",").concat(v.x,",").concat(v.y,` + A`).concat(o,",").concat(o,",0,").concat(+(A>180),",").concat(+(d<0),",").concat(w.x,",").concat(w.y,` + A`).concat(a,",").concat(a,",0,0,").concat(+(d<0),",").concat(x.x,",").concat(x.y,` + `);if(i>0){var C=sy({cx:n,cy:r,radius:i,angle:l,sign:d,isExternal:!0,cornerRadius:a,cornerIsExternal:s}),T=C.circleTangency,M=C.lineTangency,F=C.theta,U=sy({cx:n,cy:r,radius:i,angle:c,sign:-d,isExternal:!0,cornerRadius:a,cornerIsExternal:s}),H=U.circleTangency,W=U.lineTangency,ie=U.theta,Z=s?Math.abs(l-c):Math.abs(l-c)-F-ie;if(Z<0&&a===0)return"".concat(E,"L").concat(n,",").concat(r,"Z");E+="L".concat(W.x,",").concat(W.y,` + A`).concat(a,",").concat(a,",0,0,").concat(+(d<0),",").concat(H.x,",").concat(H.y,` + A`).concat(i,",").concat(i,",0,").concat(+(Z>180),",").concat(+(d>0),",").concat(T.x,",").concat(T.y,` + A`).concat(a,",").concat(a,",0,0,").concat(+(d<0),",").concat(M.x,",").concat(M.y,"Z")}else E+="L".concat(n,",").concat(r,"Z");return E},sMe={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},jV=function(t){var n=l7(l7({},sMe),t),r=n.cx,i=n.cy,o=n.innerRadius,a=n.outerRadius,u=n.cornerRadius,s=n.forceCornerRadius,l=n.cornerIsExternal,c=n.startAngle,d=n.endAngle,h=n.className;if(a0&&Math.abs(c-d)<360?b=uMe({cx:r,cy:i,innerRadius:o,outerRadius:a,cornerRadius:Math.min(m,g/2),forceCornerRadius:s,cornerIsExternal:l,startAngle:c,endAngle:d}):b=LV({cx:r,cy:i,innerRadius:o,outerRadius:a,startAngle:c,endAngle:d}),j.createElement("path",VE({},Bt(n,!0),{className:v,d:b,role:"img"}))};function kv(e){"@babel/helpers - typeof";return kv=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},kv(e)}function HE(){return HE=Object.assign?Object.assign.bind():function(e){for(var t=1;t0;)if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function yMe(e,t){return qh(e.getTime(),t.getTime())}function m7(e,t,n){if(e.size!==t.size)return!1;for(var r={},i=e.entries(),o=0,a,u;(a=i.next())&&!a.done;){for(var s=t.entries(),l=!1,c=0;(u=s.next())&&!u.done;){var d=a.value,h=d[0],v=d[1],g=u.value,m=g[0],b=g[1];!l&&!r[c]&&(l=n.equals(h,m,o,c,e,t,n)&&n.equals(v,b,h,m,e,t,n))&&(r[c]=!0),c++}if(!l)return!1;o++}return!0}function bMe(e,t,n){var r=g7(e),i=r.length;if(g7(t).length!==i)return!1;for(var o;i-- >0;)if(o=r[i],o===zV&&(e.$$typeof||t.$$typeof)&&e.$$typeof!==t.$$typeof||!BV(t,o)||!n.equals(e[o],t[o],o,o,e,t,n))return!1;return!0}function Fp(e,t,n){var r=p7(e),i=r.length;if(p7(t).length!==i)return!1;for(var o,a,u;i-- >0;)if(o=r[i],o===zV&&(e.$$typeof||t.$$typeof)&&e.$$typeof!==t.$$typeof||!BV(t,o)||!n.equals(e[o],t[o],o,o,e,t,n)||(a=v7(e,o),u=v7(t,o),(a||u)&&(!a||!u||a.configurable!==u.configurable||a.enumerable!==u.enumerable||a.writable!==u.writable)))return!1;return!0}function xMe(e,t){return qh(e.valueOf(),t.valueOf())}function wMe(e,t){return e.source===t.source&&e.flags===t.flags}function y7(e,t,n){if(e.size!==t.size)return!1;for(var r={},i=e.values(),o,a;(o=i.next())&&!o.done;){for(var u=t.values(),s=!1,l=0;(a=u.next())&&!a.done;)!s&&!r[l]&&(s=n.equals(o.value,a.value,o.value,a.value,e,t,n))&&(r[l]=!0),l++;if(!s)return!1}return!0}function _Me(e,t){var n=e.length;if(t.length!==n)return!1;for(;n-- >0;)if(e[n]!==t[n])return!1;return!0}var SMe="[object Arguments]",CMe="[object Boolean]",EMe="[object Date]",AMe="[object Map]",PMe="[object Number]",OMe="[object Object]",kMe="[object RegExp]",TMe="[object Set]",MMe="[object String]",RMe=Array.isArray,b7=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,x7=Object.assign,DMe=Object.prototype.toString.call.bind(Object.prototype.toString);function $Me(e){var t=e.areArraysEqual,n=e.areDatesEqual,r=e.areMapsEqual,i=e.areObjectsEqual,o=e.arePrimitiveWrappersEqual,a=e.areRegExpsEqual,u=e.areSetsEqual,s=e.areTypedArraysEqual;return function(c,d,h){if(c===d)return!0;if(c==null||d==null||typeof c!="object"||typeof d!="object")return c!==c&&d!==d;var v=c.constructor;if(v!==d.constructor)return!1;if(v===Object)return i(c,d,h);if(RMe(c))return t(c,d,h);if(b7!=null&&b7(c))return s(c,d,h);if(v===Date)return n(c,d,h);if(v===RegExp)return a(c,d,h);if(v===Map)return r(c,d,h);if(v===Set)return u(c,d,h);var g=DMe(c);return g===EMe?n(c,d,h):g===kMe?a(c,d,h):g===AMe?r(c,d,h):g===TMe?u(c,d,h):g===OMe?typeof c.then!="function"&&typeof d.then!="function"&&i(c,d,h):g===SMe?i(c,d,h):g===CMe||g===PMe||g===MMe?o(c,d,h):!1}}function IMe(e){var t=e.circular,n=e.createCustomConfig,r=e.strict,i={areArraysEqual:r?Fp:mMe,areDatesEqual:yMe,areMapsEqual:r?h7(m7,Fp):m7,areObjectsEqual:r?Fp:bMe,arePrimitiveWrappersEqual:xMe,areRegExpsEqual:wMe,areSetsEqual:r?h7(y7,Fp):y7,areTypedArraysEqual:r?Fp:_Me};if(n&&(i=x7({},i,n(i))),t){var o=cy(i.areArraysEqual),a=cy(i.areMapsEqual),u=cy(i.areObjectsEqual),s=cy(i.areSetsEqual);i=x7({},i,{areArraysEqual:o,areMapsEqual:a,areObjectsEqual:u,areSetsEqual:s})}return i}function NMe(e){return function(t,n,r,i,o,a,u){return e(t,n,u)}}function FMe(e){var t=e.circular,n=e.comparator,r=e.createState,i=e.equals,o=e.strict;if(r)return function(s,l){var c=r(),d=c.cache,h=d===void 0?t?new WeakMap:void 0:d,v=c.meta;return n(s,l,{cache:h,equals:i,meta:v,strict:o})};if(t)return function(s,l){return n(s,l,{cache:new WeakMap,equals:i,meta:void 0,strict:o})};var a={cache:void 0,equals:i,meta:void 0,strict:o};return function(s,l){return n(s,l,a)}}var LMe=Ul();Ul({strict:!0});Ul({circular:!0});Ul({circular:!0,strict:!0});Ul({createInternalComparator:function(){return qh}});Ul({strict:!0,createInternalComparator:function(){return qh}});Ul({circular:!0,createInternalComparator:function(){return qh}});Ul({circular:!0,createInternalComparator:function(){return qh},strict:!0});function Ul(e){e===void 0&&(e={});var t=e.circular,n=t===void 0?!1:t,r=e.createInternalComparator,i=e.createState,o=e.strict,a=o===void 0?!1:o,u=IMe(e),s=$Me(u),l=r?r(s):NMe(s);return FMe({circular:n,comparator:s,createState:i,equals:l,strict:a})}function jMe(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function w7(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=-1,r=function i(o){n<0&&(n=o),o-n>t?(e(o),n=-1):jMe(i)};requestAnimationFrame(r)}function qE(e){"@babel/helpers - typeof";return qE=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qE(e)}function BMe(e){return VMe(e)||WMe(e)||UMe(e)||zMe()}function zMe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function UMe(e,t){if(e){if(typeof e=="string")return _7(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _7(e,t)}}function _7(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n1?1:w<0?0:w},m=function(w){for(var x=w>1?1:w,S=x,A=0;A<8;++A){var E=d(S)-x,C=v(S);if(Math.abs(E-x)0&&arguments[0]!==void 0?arguments[0]:{},n=t.stiff,r=n===void 0?100:n,i=t.damping,o=i===void 0?8:i,a=t.dt,u=a===void 0?17:a,s=function(c,d,h){var v=-(c-d)*r,g=h*o,m=h+(v-g)*u/1e3,b=h*u/1e3+c;return Math.abs(b-d)e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function wRe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function jS(e){return ERe(e)||CRe(e)||SRe(e)||_Re()}function _Re(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function SRe(e,t){if(e){if(typeof e=="string")return XE(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return XE(e,t)}}function CRe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function ERe(e){if(Array.isArray(e))return XE(e)}function XE(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Ob(e){return Ob=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Ob(e)}var Ya=function(e){TRe(n,e);var t=MRe(n);function n(r,i){var o;ARe(this,n),o=t.call(this,r,i);var a=o.props,u=a.isActive,s=a.attributeName,l=a.from,c=a.to,d=a.steps,h=a.children,v=a.duration;if(o.handleStyleChange=o.handleStyleChange.bind(e6(o)),o.changeStyle=o.changeStyle.bind(e6(o)),!u||v<=0)return o.state={style:{}},typeof h=="function"&&(o.state={style:c}),JE(o);if(d&&d.length)o.state={style:d[0].style};else if(l){if(typeof h=="function")return o.state={style:l},JE(o);o.state={style:s?Xp({},s,l):l}}else o.state={style:{}};return o}return ORe(n,[{key:"componentDidMount",value:function(){var i=this.props,o=i.isActive,a=i.canBegin;this.mounted=!0,!(!o||!a)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(i){var o=this.props,a=o.isActive,u=o.canBegin,s=o.attributeName,l=o.shouldReAnimate,c=o.to,d=o.from,h=this.state.style;if(u){if(!a){var v={style:s?Xp({},s,c):c};this.state&&h&&(s&&h[s]!==c||!s&&h!==c)&&this.setState(v);return}if(!(LMe(i.to,c)&&i.canBegin&&i.isActive)){var g=!i.canBegin||!i.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var m=g||l?d:i.to;if(this.state&&h){var b={style:s?Xp({},s,m):m};(s&&h[s]!==m||!s&&h!==m)&&this.setState(b)}this.runAnimation(Pa(Pa({},this.props),{},{from:m,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var i=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),i&&i()}},{key:"handleStyleChange",value:function(i){this.changeStyle(i)}},{key:"changeStyle",value:function(i){this.mounted&&this.setState({style:i})}},{key:"runJSAnimation",value:function(i){var o=this,a=i.from,u=i.to,s=i.duration,l=i.easing,c=i.begin,d=i.onAnimationEnd,h=i.onAnimationStart,v=yRe(a,u,uRe(l),s,this.changeStyle),g=function(){o.stopJSAnimation=v()};this.manager.start([h,c,g,s,d])}},{key:"runStepAnimation",value:function(i){var o=this,a=i.steps,u=i.begin,s=i.onAnimationStart,l=a[0],c=l.style,d=l.duration,h=d===void 0?0:d,v=function(m,b,w){if(w===0)return m;var x=b.duration,S=b.easing,A=S===void 0?"ease":S,E=b.style,C=b.properties,T=b.onAnimationEnd,M=w>0?a[w-1]:b,F=C||Object.keys(E);if(typeof A=="function"||A==="spring")return[].concat(jS(m),[o.runJSAnimation.bind(o,{from:M.style,to:E,duration:x,easing:A}),x]);var U=E7(F,x,A),H=Pa(Pa(Pa({},M.style),E),{},{transition:U});return[].concat(jS(m),[H,x,T]).filter(YMe)};return this.manager.start([s].concat(jS(a.reduce(v,[c,Math.max(h,u)])),[i.onAnimationEnd]))}},{key:"runAnimation",value:function(i){this.manager||(this.manager=HMe());var o=i.begin,a=i.duration,u=i.attributeName,s=i.to,l=i.easing,c=i.onAnimationStart,d=i.onAnimationEnd,h=i.steps,v=i.children,g=this.manager;if(this.unSubscribe=g.subscribe(this.handleStyleChange),typeof l=="function"||typeof v=="function"||l==="spring"){this.runJSAnimation(i);return}if(h.length>1){this.runStepAnimation(i);return}var m=u?Xp({},u,s):s,b=E7(Object.keys(m),a,l);g.start([c,o,Pa(Pa({},m),{},{transition:b}),a,d])}},{key:"render",value:function(){var i=this.props,o=i.children;i.begin;var a=i.duration;i.attributeName,i.easing;var u=i.isActive;i.steps,i.from,i.to,i.canBegin,i.onAnimationEnd,i.shouldReAnimate,i.onAnimationReStart;var s=xRe(i,bRe),l=y.Children.count(o),c=this.state.style;if(typeof o=="function")return o(c);if(!u||l===0||a<=0)return o;var d=function(v){var g=v.props,m=g.style,b=m===void 0?{}:m,w=g.className,x=y.cloneElement(v,Pa(Pa({},s),{},{style:Pa(Pa({},b),c),className:w}));return x};return l===1?d(y.Children.only(o)):j.createElement("div",null,y.Children.map(o,function(h){return d(h)}))}}]),n}(y.PureComponent);Ya.displayName="Animate";Ya.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};Ya.propTypes={from:Mt.oneOfType([Mt.object,Mt.string]),to:Mt.oneOfType([Mt.object,Mt.string]),attributeName:Mt.string,duration:Mt.number,begin:Mt.number,easing:Mt.oneOfType([Mt.string,Mt.func]),steps:Mt.arrayOf(Mt.shape({duration:Mt.number.isRequired,style:Mt.object.isRequired,easing:Mt.oneOfType([Mt.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),Mt.func]),properties:Mt.arrayOf("string"),onAnimationEnd:Mt.func})),children:Mt.oneOfType([Mt.node,Mt.func]),isActive:Mt.bool,canBegin:Mt.bool,onAnimationEnd:Mt.func,shouldReAnimate:Mt.bool,onAnimationStart:Mt.func,onAnimationReStart:Mt.func};function t6(e,t){return t6=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},t6(e,t)}function Fn(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,t6(e,t)}function jn(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}Mt.object,Mt.object,Mt.object,Mt.element;Mt.object,Mt.object,Mt.object,Mt.oneOfType([Mt.array,Mt.element]),Mt.any;function Rv(e){"@babel/helpers - typeof";return Rv=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Rv(e)}function kb(){return kb=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0?1:-1,s=r>=0?1:-1,l=i>=0&&r>=0||i<0&&r<0?1:0,c;if(a>0&&o instanceof Array){for(var d=[0,0,0,0],h=0,v=4;ha?a:o[h];c="M".concat(t,",").concat(n+u*d[0]),d[0]>0&&(c+="A ".concat(d[0],",").concat(d[0],",0,0,").concat(l,",").concat(t+s*d[0],",").concat(n)),c+="L ".concat(t+r-s*d[1],",").concat(n),d[1]>0&&(c+="A ".concat(d[1],",").concat(d[1],",0,0,").concat(l,`, `).concat(t+r,",").concat(n+u*d[1])),c+="L ".concat(t+r,",").concat(n+i-u*d[2]),d[2]>0&&(c+="A ".concat(d[2],",").concat(d[2],",0,0,").concat(l,`, `).concat(t+r-s*d[2],",").concat(n+i)),c+="L ".concat(t+s*d[3],",").concat(n+i),d[3]>0&&(c+="A ".concat(d[3],",").concat(d[3],",0,0,").concat(l,`, `).concat(t,",").concat(n+i-u*d[3])),c+="Z"}else if(a>0&&o===+o&&o>0){var g=Math.min(a,o);c="M ".concat(t,",").concat(n+u*g,` @@ -390,39 +415,44 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho L `).concat(t+r,",").concat(n+i-u*g,` A `).concat(g,",").concat(g,",0,0,").concat(l,",").concat(t+r-s*g,",").concat(n+i,` L `).concat(t+s*g,",").concat(n+i,` - A `).concat(g,",").concat(g,",0,0,").concat(l,",").concat(t,",").concat(n+i-u*g," Z")}else c="M ".concat(t,",").concat(n," h ").concat(r," v ").concat(i," h ").concat(-r," Z");return c},yRe=function(t,n){if(!t||!n)return!1;var r=t.x,i=t.y,o=n.x,a=n.y,u=n.width,s=n.height;if(Math.abs(u)>0&&Math.abs(s)>0){var l=Math.min(o,o+u),c=Math.max(o,o+u),d=Math.min(a,a+s),h=Math.max(a,a+s);return r>=l&&r<=c&&i>=d&&i<=h}return!1},bRe={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},jP=function(t){var n=S$(S$({},bRe),t),r=b.useRef(),i=b.useState(-1),o=cRe(i,2),a=o[0],u=o[1];b.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var A=r.current.getTotalLength();A&&u(A)}catch{}},[]);var s=n.x,l=n.y,c=n.width,d=n.height,h=n.radius,m=n.className,g=n.animationEasing,v=n.animationDuration,y=n.animationBegin,x=n.isAnimationActive,w=n.isUpdateAnimationActive;if(s!==+s||l!==+l||c!==+c||d!==+d||c===0||d===0)return null;var S=Pt("recharts-rectangle",m);return w?$.createElement(la,{canBegin:a>0,from:{width:c,height:d,x:s,y:l},to:{width:c,height:d,x:s,y:l},duration:v,animationEasing:g,isActive:w},function(A){var E=A.width,C=A.height,P=A.x,k=A.y;return $.createElement(la,{canBegin:a>0,from:"0px ".concat(a===-1?1:a,"px"),to:"".concat(a,"px 0px"),attributeName:"strokeDasharray",begin:y,duration:v,isActive:x,easing:g},$.createElement("path",cb({},ct(n,!0),{className:S,d:C$(P,k,E,C,h),ref:r})))}):$.createElement("path",cb({},ct(n,!0),{className:S,d:C$(s,l,c,d,h)}))};function WE(){return WE=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ARe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var ORe=function(t,n,r,i,o,a){return"M".concat(t,",").concat(o,"v").concat(i,"M").concat(a,",").concat(n,"h").concat(r)},PRe=function(t){var n=t.x,r=n===void 0?0:n,i=t.y,o=i===void 0?0:i,a=t.top,u=a===void 0?0:a,s=t.left,l=s===void 0?0:s,c=t.width,d=c===void 0?0:c,h=t.height,m=h===void 0?0:h,g=t.className,v=ERe(t,wRe),y=xRe({x:r,y:o,top:u,left:l,width:d,height:m},v);return!Pe(r)||!Pe(o)||!Pe(d)||!Pe(m)||!Pe(u)||!Pe(l)?null:$.createElement("path",VE({},ct(y,!0),{className:Pt("recharts-cross",g),d:ORe(r,o,d,m,u,l)}))},kRe=QU,TRe=kRe(Object.getPrototypeOf,Object),MRe=TRe,RRe=Wu,DRe=MRe,$Re=Vu,IRe="[object Object]",NRe=Function.prototype,FRe=Object.prototype,NV=NRe.toString,LRe=FRe.hasOwnProperty,jRe=NV.call(Object);function BRe(e){if(!$Re(e)||RRe(e)!=IRe)return!1;var t=DRe(e);if(t===null)return!0;var n=LRe.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&NV.call(n)==jRe}var zRe=BRe;const URe=Vt(zRe);var WRe=Wu,VRe=Vu,HRe="[object Boolean]";function qRe(e){return e===!0||e===!1||VRe(e)&&WRe(e)==HRe}var GRe=qRe;const KRe=Vt(GRe);function fm(e){"@babel/helpers - typeof";return fm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fm(e)}function fb(){return fb=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0,from:{upperWidth:0,lowerWidth:0,height:h,x:s,y:l},to:{upperWidth:c,lowerWidth:d,height:h,x:s,y:l},duration:v,animationEasing:g,isActive:x},function(S){var A=S.upperWidth,E=S.lowerWidth,C=S.height,P=S.x,k=S.y;return $.createElement(la,{canBegin:a>0,from:"0px ".concat(a===-1?1:a,"px"),to:"".concat(a,"px 0px"),attributeName:"strokeDasharray",begin:y,duration:v,easing:g},$.createElement("path",fb({},ct(n,!0),{className:w,d:k$(P,k,A,E,C),ref:r})))}):$.createElement("g",null,$.createElement("path",fb({},ct(n,!0),{className:w,d:k$(s,l,c,d,h)})))},oDe=["option","shapeType","propTransformer","activeClassName","isActive"];function dm(e){"@babel/helpers - typeof";return dm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},dm(e)}function aDe(e,t){if(e==null)return{};var n=uDe(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function uDe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function T$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function db(e){for(var t=1;t0&&r.handleDrag(i.changedTouches[0])}),$i(r,"handleDragEnd",function(){r.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var i=r.props,o=i.endIndex,a=i.onDragEnd,u=i.startIndex;a?.({endIndex:o,startIndex:u})}),r.detachDragEndListener()}),$i(r,"handleLeaveWrapper",function(){(r.state.isTravellerMoving||r.state.isSlideMoving)&&(r.leaveTimer=window.setTimeout(r.handleDragEnd,r.props.leaveTimeOut))}),$i(r,"handleEnterSlideOrTraveller",function(){r.setState({isTextActive:!0})}),$i(r,"handleLeaveSlideOrTraveller",function(){r.setState({isTextActive:!1})}),$i(r,"handleSlideDragStart",function(i){var o=F$(i)?i.changedTouches[0]:i;r.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:o.pageX}),r.attachDragEndListener()}),r.travellerDragStartHandlers={startX:r.handleTravellerDragStart.bind(r,"startX"),endX:r.handleTravellerDragStart.bind(r,"endX")},r.state={},r}return VDe(t,e),BDe(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(r){var i=r.startX,o=r.endX,a=this.state.scaleValues,u=this.props,s=u.gap,l=u.data,c=l.length-1,d=Math.min(i,o),h=Math.max(i,o),m=t.getIndexInRange(a,d),g=t.getIndexInRange(a,h);return{startIndex:m-m%s,endIndex:g===c?c:g-g%s}}},{key:"getTextOfTick",value:function(r){var i=this.props,o=i.data,a=i.tickFormatter,u=i.dataKey,s=ar(o[r],u,r);return ht(a)?a(s,r):s}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(r){var i=this.state,o=i.slideMoveStartX,a=i.startX,u=i.endX,s=this.props,l=s.x,c=s.width,d=s.travellerWidth,h=s.startIndex,m=s.endIndex,g=s.onChange,v=r.pageX-o;v>0?v=Math.min(v,l+c-d-u,l+c-d-a):v<0&&(v=Math.max(v,l-a,l-u));var y=this.getIndex({startX:a+v,endX:u+v});(y.startIndex!==h||y.endIndex!==m)&&g&&g(y),this.setState({startX:a+v,endX:u+v,slideMoveStartX:r.pageX})}},{key:"handleTravellerDragStart",value:function(r,i){var o=F$(i)?i.changedTouches[0]:i;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:r,brushMoveStartX:o.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(r){var i=this.state,o=i.brushMoveStartX,a=i.movingTravellerId,u=i.endX,s=i.startX,l=this.state[a],c=this.props,d=c.x,h=c.width,m=c.travellerWidth,g=c.onChange,v=c.gap,y=c.data,x={startX:this.state.startX,endX:this.state.endX},w=r.pageX-o;w>0?w=Math.min(w,d+h-m-l):w<0&&(w=Math.max(w,d-l)),x[a]=l+w;var S=this.getIndex(x),A=S.startIndex,E=S.endIndex,C=function(){var k=y.length-1;return a==="startX"&&(u>s?A%v===0:E%v===0)||us?E%v===0:A%v===0)||u>s&&E===k};this.setState($i($i({},a,l+w),"brushMoveStartX",r.pageX),function(){g&&C()&&g(S)})}},{key:"handleTravellerMoveKeyboard",value:function(r,i){var o=this,a=this.state,u=a.scaleValues,s=a.startX,l=a.endX,c=this.state[i],d=u.indexOf(c);if(d!==-1){var h=d+r;if(!(h===-1||h>=u.length)){var m=u[h];i==="startX"&&m>=l||i==="endX"&&m<=s||this.setState($i({},i,m),function(){o.props.onChange(o.getIndex({startX:o.state.startX,endX:o.state.endX}))})}}}},{key:"renderBackground",value:function(){var r=this.props,i=r.x,o=r.y,a=r.width,u=r.height,s=r.fill,l=r.stroke;return $.createElement("rect",{stroke:l,fill:s,x:i,y:o,width:a,height:u})}},{key:"renderPanorama",value:function(){var r=this.props,i=r.x,o=r.y,a=r.width,u=r.height,s=r.data,l=r.children,c=r.padding,d=b.Children.only(l);return d?$.cloneElement(d,{x:i,y:o,width:a,height:u,margin:c,compact:!0,data:s}):null}},{key:"renderTravellerLayer",value:function(r,i){var o,a,u=this,s=this.props,l=s.y,c=s.travellerWidth,d=s.height,h=s.traveller,m=s.ariaLabel,g=s.data,v=s.startIndex,y=s.endIndex,x=Math.max(r,this.props.x),w=AS(AS({},ct(this.props,!1)),{},{x,y:l,width:c,height:d}),S=m||"Min value: ".concat((o=g[v])===null||o===void 0?void 0:o.name,", Max value: ").concat((a=g[y])===null||a===void 0?void 0:a.name);return $.createElement(jt,{tabIndex:0,role:"slider","aria-label":S,"aria-valuenow":r,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[i],onTouchStart:this.travellerDragStartHandlers[i],onKeyDown:function(E){["ArrowLeft","ArrowRight"].includes(E.key)&&(E.preventDefault(),E.stopPropagation(),u.handleTravellerMoveKeyboard(E.key==="ArrowRight"?1:-1,i))},onFocus:function(){u.setState({isTravellerFocused:!0})},onBlur:function(){u.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(h,w))}},{key:"renderSlide",value:function(r,i){var o=this.props,a=o.y,u=o.height,s=o.stroke,l=o.travellerWidth,c=Math.min(r,i)+l,d=Math.max(Math.abs(i-r)-l,0);return $.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:s,fillOpacity:.2,x:c,y:a,width:d,height:u})}},{key:"renderText",value:function(){var r=this.props,i=r.startIndex,o=r.endIndex,a=r.y,u=r.height,s=r.travellerWidth,l=r.stroke,c=this.state,d=c.startX,h=c.endX,m=5,g={pointerEvents:"none",fill:l};return $.createElement(jt,{className:"recharts-brush-texts"},$.createElement(V1,pb({textAnchor:"end",verticalAnchor:"middle",x:Math.min(d,h)-m,y:a+u/2},g),this.getTextOfTick(i)),$.createElement(V1,pb({textAnchor:"start",verticalAnchor:"middle",x:Math.max(d,h)+s+m,y:a+u/2},g),this.getTextOfTick(o)))}},{key:"render",value:function(){var r=this.props,i=r.data,o=r.className,a=r.children,u=r.x,s=r.y,l=r.width,c=r.height,d=r.alwaysShowText,h=this.state,m=h.startX,g=h.endX,v=h.isTextActive,y=h.isSlideMoving,x=h.isTravellerMoving,w=h.isTravellerFocused;if(!i||!i.length||!Pe(u)||!Pe(s)||!Pe(l)||!Pe(c)||l<=0||c<=0)return null;var S=Pt("recharts-brush",o),A=$.Children.count(a)===1,E=LDe("userSelect","none");return $.createElement(jt,{className:S,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:E},this.renderBackground(),A&&this.renderPanorama(),this.renderSlide(m,g),this.renderTravellerLayer(m,"startX"),this.renderTravellerLayer(g,"endX"),(v||y||x||w||d)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(r){var i=r.x,o=r.y,a=r.width,u=r.height,s=r.stroke,l=Math.floor(o+u/2)-1;return $.createElement($.Fragment,null,$.createElement("rect",{x:i,y:o,width:a,height:u,fill:s,stroke:"none"}),$.createElement("line",{x1:i+1,y1:l,x2:i+a-1,y2:l,fill:"none",stroke:"#fff"}),$.createElement("line",{x1:i+1,y1:l+2,x2:i+a-1,y2:l+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(r,i){var o;return $.isValidElement(r)?o=$.cloneElement(r,i):ht(r)?o=r(i):o=t.renderDefaultTraveller(i),o}},{key:"getDerivedStateFromProps",value:function(r,i){var o=r.data,a=r.width,u=r.x,s=r.travellerWidth,l=r.updateId,c=r.startIndex,d=r.endIndex;if(o!==i.prevData||l!==i.prevUpdateId)return AS({prevData:o,prevTravellerWidth:s,prevUpdateId:l,prevX:u,prevWidth:a},o&&o.length?qDe({data:o,width:a,x:u,travellerWidth:s,startIndex:c,endIndex:d}):{scale:null,scaleValues:null});if(i.scale&&(a!==i.prevWidth||u!==i.prevX||s!==i.prevTravellerWidth)){i.scale.range([u,u+a-s]);var h=i.scale.domain().map(function(m){return i.scale(m)});return{prevData:o,prevTravellerWidth:s,prevUpdateId:l,prevX:u,prevWidth:a,startX:i.scale(r.startIndex),endX:i.scale(r.endIndex),scaleValues:h}}return null}},{key:"getIndexInRange",value:function(r,i){for(var o=r.length,a=0,u=o-1;u-a>1;){var s=Math.floor((a+u)/2);r[s]>i?u=s:a=s}return i>=r[u]?u:a}}])}(b.PureComponent);$i(Td,"displayName","Brush");$i(Td,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var GDe=cP;function KDe(e,t){var n;return GDe(e,function(r,i,o){return n=t(r,i,o),!n}),!!n}var YDe=KDe,ZDe=VU,XDe=sl,QDe=YDe,JDe=Ei,e9e=rx;function t9e(e,t,n){var r=JDe(e)?ZDe:QDe;return n&&e9e(e,t,n)&&(t=void 0),r(e,XDe(t))}var n9e=t9e;const r9e=Vt(n9e);var La=function(t,n){var r=t.alwaysShow,i=t.ifOverflow;return r&&(i="extendDomain"),i===n},L$=dW;function i9e(e,t,n){t=="__proto__"&&L$?L$(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var o9e=i9e,a9e=o9e,u9e=cW,s9e=sl;function l9e(e,t){var n={};return t=s9e(t),u9e(e,function(r,i,o){a9e(n,i,t(r,i,o))}),n}var c9e=l9e;const f9e=Vt(c9e);function d9e(e,t){for(var n=-1,r=e==null?0:e.length;++n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function k9e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function T9e(e,t){var n=e.x,r=e.y,i=P9e(e,C9e),o="".concat(n),a=parseInt(o,10),u="".concat(r),s=parseInt(u,10),l="".concat(t.height||i.height),c=parseInt(l,10),d="".concat(t.width||i.width),h=parseInt(d,10);return fp(fp(fp(fp(fp({},t),i),a?{x:a}:{}),s?{y:s}:{}),{},{height:c,width:h,name:t.name,radius:t.radius})}function B$(e){return $.createElement(HE,GE({shapeType:"rectangle",propTransformer:T9e,activeClassName:"recharts-active-bar"},e))}var M9e=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(r,i){if(typeof t=="number")return t;var o=typeof r=="number";return o?t(r,i):(o||Ec(),n)}},R9e=["value","background"],UV;function Md(e){"@babel/helpers - typeof";return Md=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Md(e)}function D9e(e,t){if(e==null)return{};var n=$9e(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function $9e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function gb(){return gb=Object.assign?Object.assign.bind():function(e){for(var t=1;t0&&Math.abs(W)0&&Math.abs(H)0&&(Y=Math.min((ee||0)-(H[ue-1]||0),Y))}),Number.isFinite(Y)){var W=Y/F,V=v.layout==="vertical"?r.height:r.width;if(v.padding==="gap"&&(P=W*V/2),v.padding==="no-gap"){var j=_c(t.barCategoryGap,W*V),I=W*V/2;P=I-j-(I-j)/V*j}}}i==="xAxis"?k=[r.left+(S.left||0)+(P||0),r.left+r.width-(S.right||0)-(P||0)]:i==="yAxis"?k=s==="horizontal"?[r.top+r.height-(S.bottom||0),r.top+(S.top||0)]:[r.top+(S.top||0)+(P||0),r.top+r.height-(S.bottom||0)-(P||0)]:k=v.range,E&&(k=[k[1],k[0]]);var z=M8e(v,o,h),U=z.scale,X=z.realScaleType;U.domain(x).range(k),R8e(U);var q=B8e(U,Ho(Ho({},v),{},{realScaleType:X}));i==="xAxis"?(B=y==="top"&&!A||y==="bottom"&&A,M=r.left,L=d[C]-B*v.height):i==="yAxis"&&(B=y==="left"&&!A||y==="right"&&A,M=d[C]-B*v.width,L=r.top);var G=Ho(Ho(Ho({},v),q),{},{realScaleType:X,x:M,y:L,scale:U,width:i==="xAxis"?r.width:v.width,height:i==="yAxis"?r.height:v.height});return G.bandSize=ib(G,q),!v.hide&&i==="xAxis"?d[C]+=(B?-1:1)*G.height:v.hide||(d[C]+=(B?-1:1)*G.width),Ho(Ho({},m),{},gx({},g,G))},{})},GV=function(t,n){var r=t.x,i=t.y,o=n.x,a=n.y;return{x:Math.min(r,o),y:Math.min(i,a),width:Math.abs(o-r),height:Math.abs(a-i)}},H9e=function(t){var n=t.x1,r=t.y1,i=t.x2,o=t.y2;return GV({x:n,y:r},{x:i,y:o})},KV=function(){function e(t){U9e(this,e),this.scale=t}return W9e(e,[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.bandAware,o=r.position;if(n!==void 0){if(o)switch(o){case"start":return this.scale(n);case"middle":{var a=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+a}case"end":{var u=this.bandwidth?this.bandwidth():0;return this.scale(n)+u}default:return this.scale(n)}if(i){var s=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+s}return this.scale(n)}}},{key:"isInRange",value:function(n){var r=this.range(),i=r[0],o=r[r.length-1];return i<=o?n>=i&&n<=o:n>=o&&n<=i}}],[{key:"create",value:function(n){return new e(n)}}])}();gx(KV,"EPS",1e-4);var BP=function(t){var n=Object.keys(t).reduce(function(r,i){return Ho(Ho({},r),{},gx({},i,KV.create(t[i])))},{});return Ho(Ho({},n),{},{apply:function(i){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=o.bandAware,u=o.position;return f9e(i,function(s,l){return n[l].apply(s,{bandAware:a,position:u})})},isInRange:function(i){return zV(i,function(o,a){return n[a].isInRange(o)})}})};function q9e(e){return(e%180+180)%180}var G9e=function(t){var n=t.width,r=t.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=q9e(i),a=o*Math.PI/180,u=Math.atan(r/n),s=a>u&&a-1?i[o?t[a]:a]:void 0}}var Q9e=X9e,J9e=FV;function e$e(e){var t=J9e(e),n=t%1;return t===t?n?t-n:t:0}var t$e=e$e,n$e=iW,r$e=sl,i$e=t$e,o$e=Math.max;function a$e(e,t,n){var r=e==null?0:e.length;if(!r)return-1;var i=n==null?0:i$e(n);return i<0&&(i=o$e(r+i,0)),n$e(e,r$e(t),i)}var u$e=a$e,s$e=Q9e,l$e=u$e,c$e=s$e(l$e),f$e=c$e;const d$e=Vt(f$e);var h$e=gbe(function(e){return{x:e.left,y:e.top,width:e.width,height:e.height}},function(e){return["l",e.left,"t",e.top,"w",e.width,"h",e.height].join("")}),zP=b.createContext(void 0),UP=b.createContext(void 0),YV=b.createContext(void 0),ZV=b.createContext({}),XV=b.createContext(void 0),QV=b.createContext(0),JV=b.createContext(0),H$=function(t){var n=t.state,r=n.xAxisMap,i=n.yAxisMap,o=n.offset,a=t.clipPathId,u=t.children,s=t.width,l=t.height,c=h$e(o);return $.createElement(zP.Provider,{value:r},$.createElement(UP.Provider,{value:i},$.createElement(ZV.Provider,{value:o},$.createElement(YV.Provider,{value:c},$.createElement(XV.Provider,{value:a},$.createElement(QV.Provider,{value:l},$.createElement(JV.Provider,{value:s},u)))))))},p$e=function(){return b.useContext(XV)},eH=function(t){var n=b.useContext(zP);n==null&&Ec();var r=n[t];return r==null&&Ec(),r},m$e=function(){var t=b.useContext(zP);return _s(t)},g$e=function(){var t=b.useContext(UP),n=d$e(t,function(r){return zV(r.domain,Number.isFinite)});return n||_s(t)},tH=function(t){var n=b.useContext(UP);n==null&&Ec();var r=n[t];return r==null&&Ec(),r},v$e=function(){var t=b.useContext(YV);return t},y$e=function(){return b.useContext(ZV)},WP=function(){return b.useContext(JV)},VP=function(){return b.useContext(QV)};function Rd(e){"@babel/helpers - typeof";return Rd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Rd(e)}function b$e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function w$e(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);ne*i)return!1;var o=n();return e*(t-e*o/2-r)>=0&&e*(t+e*o/2-i)<=0}function t7e(e,t){return sH(e,t+1)}function n7e(e,t,n,r,i){for(var o=(r||[]).slice(),a=t.start,u=t.end,s=0,l=1,c=a,d=function(){var g=r?.[s];if(g===void 0)return{v:sH(r,l)};var v=s,y,x=function(){return y===void 0&&(y=n(g,v)),y},w=g.coordinate,S=s===0||xb(e,w,x,c,u);S||(s=0,c=a,l+=1),S&&(c=w+e*(x()/2+i),s+=l)},h;l<=o.length;)if(h=d(),h)return h.v;return[]}function vm(e){"@babel/helpers - typeof";return vm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vm(e)}function J$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ir(e){for(var t=1;t0?m.coordinate-y*e:m.coordinate})}else o[h]=m=Ir(Ir({},m),{},{tickCoord:m.coordinate});var x=xb(e,m.tickCoord,v,u,s);x&&(s=m.tickCoord-e*(v()/2+i),o[h]=Ir(Ir({},m),{},{isShow:!0}))},c=a-1;c>=0;c--)l(c);return o}function u7e(e,t,n,r,i,o){var a=(r||[]).slice(),u=a.length,s=t.start,l=t.end;if(o){var c=r[u-1],d=n(c,u-1),h=e*(c.coordinate+e*d/2-l);a[u-1]=c=Ir(Ir({},c),{},{tickCoord:h>0?c.coordinate-h*e:c.coordinate});var m=xb(e,c.tickCoord,function(){return d},s,l);m&&(l=c.tickCoord-e*(d/2+i),a[u-1]=Ir(Ir({},c),{},{isShow:!0}))}for(var g=o?u-1:u,v=function(w){var S=a[w],A,E=function(){return A===void 0&&(A=n(S,w)),A};if(w===0){var C=e*(S.coordinate-e*E()/2-s);a[w]=S=Ir(Ir({},S),{},{tickCoord:C<0?S.coordinate-C*e:S.coordinate})}else a[w]=S=Ir(Ir({},S),{},{tickCoord:S.coordinate});var P=xb(e,S.tickCoord,E,s,l);P&&(s=S.tickCoord+e*(E()/2+i),a[w]=Ir(Ir({},S),{},{isShow:!0}))},y=0;y=2?ea(i[1].coordinate-i[0].coordinate):1,x=e7e(o,y,m);return s==="equidistantPreserveStart"?n7e(y,x,v,i,a):(s==="preserveStart"||s==="preserveStartEnd"?h=u7e(y,x,v,i,a,s==="preserveStartEnd"):h=a7e(y,x,v,i,a),h.filter(function(w){return w.isShow}))}var s7e=["viewBox"],l7e=["viewBox"],c7e=["ticks"];function Id(e){"@babel/helpers - typeof";return Id=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Id(e)}function Lf(){return Lf=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function f7e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function d7e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function t7(e,t){for(var n=0;n0?s(this.props):s(m)),a<=0||u<=0||!g||!g.length?null:$.createElement(jt,{className:Pt("recharts-cartesian-axis",l),ref:function(y){r.layerReference=y}},o&&this.renderAxisLine(),this.renderTicks(g,this.state.fontSize,this.state.letterSpacing),Fr.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(r,i,o){var a;return $.isValidElement(r)?a=$.cloneElement(r,i):ht(r)?a=r(i):a=$.createElement(V1,Lf({},i,{className:"recharts-cartesian-axis-tick-value"}),o),a}}])}(b.Component);KP(bh,"displayName","CartesianAxis");KP(bh,"defaultProps",{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"});var b7e=["x1","y1","x2","y2","key"],w7e=["offset"];function Ac(e){"@babel/helpers - typeof";return Ac=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ac(e)}function n7(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Lr(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function C7e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var E7e=function(t){var n=t.fill;if(!n||n==="none")return null;var r=t.fillOpacity,i=t.x,o=t.y,a=t.width,u=t.height,s=t.ry;return $.createElement("rect",{x:i,y:o,ry:s,width:a,height:u,stroke:"none",fill:n,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function fH(e,t){var n;if($.isValidElement(e))n=$.cloneElement(e,t);else if(ht(e))n=e(t);else{var r=t.x1,i=t.y1,o=t.x2,a=t.y2,u=t.key,s=r7(t,b7e),l=ct(s,!1);l.offset;var c=r7(l,w7e);n=$.createElement("line",Yl({},c,{x1:r,y1:i,x2:o,y2:a,fill:"none",key:u}))}return n}function A7e(e){var t=e.x,n=e.width,r=e.horizontal,i=r===void 0?!0:r,o=e.horizontalPoints;if(!i||!o||!o.length)return null;var a=o.map(function(u,s){var l=Lr(Lr({},e),{},{x1:t,y1:u,x2:t+n,y2:u,key:"line-".concat(s),index:s});return fH(i,l)});return $.createElement("g",{className:"recharts-cartesian-grid-horizontal"},a)}function O7e(e){var t=e.y,n=e.height,r=e.vertical,i=r===void 0?!0:r,o=e.verticalPoints;if(!i||!o||!o.length)return null;var a=o.map(function(u,s){var l=Lr(Lr({},e),{},{x1:u,y1:t,x2:u,y2:t+n,key:"line-".concat(s),index:s});return fH(i,l)});return $.createElement("g",{className:"recharts-cartesian-grid-vertical"},a)}function P7e(e){var t=e.horizontalFill,n=e.fillOpacity,r=e.x,i=e.y,o=e.width,a=e.height,u=e.horizontalPoints,s=e.horizontal,l=s===void 0?!0:s;if(!l||!t||!t.length)return null;var c=u.map(function(h){return Math.round(h+i-i)}).sort(function(h,m){return h-m});i!==c[0]&&c.unshift(0);var d=c.map(function(h,m){var g=!c[m+1],v=g?i+a-h:c[m+1]-h;if(v<=0)return null;var y=m%t.length;return $.createElement("rect",{key:"react-".concat(m),y:h,x:r,height:v,width:o,stroke:"none",fill:t[y],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return $.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},d)}function k7e(e){var t=e.vertical,n=t===void 0?!0:t,r=e.verticalFill,i=e.fillOpacity,o=e.x,a=e.y,u=e.width,s=e.height,l=e.verticalPoints;if(!n||!r||!r.length)return null;var c=l.map(function(h){return Math.round(h+o-o)}).sort(function(h,m){return h-m});o!==c[0]&&c.unshift(0);var d=c.map(function(h,m){var g=!c[m+1],v=g?o+u-h:c[m+1]-h;if(v<=0)return null;var y=m%r.length;return $.createElement("rect",{key:"react-".concat(m),x:h,y:a,width:v,height:s,stroke:"none",fill:r[y],fillOpacity:i,className:"recharts-cartesian-grid-bg"})});return $.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},d)}var T7e=function(t,n){var r=t.xAxis,i=t.width,o=t.height,a=t.offset;return _V(GP(Lr(Lr(Lr({},bh.defaultProps),r),{},{ticks:wu(r,!0),viewBox:{x:0,y:0,width:i,height:o}})),a.left,a.left+a.width,n)},M7e=function(t,n){var r=t.yAxis,i=t.width,o=t.height,a=t.offset;return _V(GP(Lr(Lr(Lr({},bh.defaultProps),r),{},{ticks:wu(r,!0),viewBox:{x:0,y:0,width:i,height:o}})),a.top,a.top+a.height,n)},vf={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function R7e(e){var t,n,r,i,o,a,u=WP(),s=VP(),l=y$e(),c=Lr(Lr({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:vf.stroke,fill:(n=e.fill)!==null&&n!==void 0?n:vf.fill,horizontal:(r=e.horizontal)!==null&&r!==void 0?r:vf.horizontal,horizontalFill:(i=e.horizontalFill)!==null&&i!==void 0?i:vf.horizontalFill,vertical:(o=e.vertical)!==null&&o!==void 0?o:vf.vertical,verticalFill:(a=e.verticalFill)!==null&&a!==void 0?a:vf.verticalFill,x:Pe(e.x)?e.x:l.left,y:Pe(e.y)?e.y:l.top,width:Pe(e.width)?e.width:l.width,height:Pe(e.height)?e.height:l.height}),d=c.x,h=c.y,m=c.width,g=c.height,v=c.syncWithTicks,y=c.horizontalValues,x=c.verticalValues,w=m$e(),S=g$e();if(!Pe(m)||m<=0||!Pe(g)||g<=0||!Pe(d)||d!==+d||!Pe(h)||h!==+h)return null;var A=c.verticalCoordinatesGenerator||T7e,E=c.horizontalCoordinatesGenerator||M7e,C=c.horizontalPoints,P=c.verticalPoints;if((!C||!C.length)&&ht(E)){var k=y&&y.length,M=E({yAxis:S?Lr(Lr({},S),{},{ticks:k?y:S.ticks}):void 0,width:u,height:s,offset:l},k?!0:v);Eu(Array.isArray(M),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(Ac(M),"]")),Array.isArray(M)&&(C=M)}if((!P||!P.length)&&ht(A)){var L=x&&x.length,B=A({xAxis:w?Lr(Lr({},w),{},{ticks:L?x:w.ticks}):void 0,width:u,height:s,offset:l},L?!0:v);Eu(Array.isArray(B),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(Ac(B),"]")),Array.isArray(B)&&(P=B)}return $.createElement("g",{className:"recharts-cartesian-grid"},$.createElement(E7e,{fill:c.fill,fillOpacity:c.fillOpacity,x:c.x,y:c.y,width:c.width,height:c.height,ry:c.ry}),$.createElement(A7e,Yl({},c,{offset:l,horizontalPoints:C,xAxis:w,yAxis:S})),$.createElement(O7e,Yl({},c,{offset:l,verticalPoints:P,xAxis:w,yAxis:S})),$.createElement(P7e,Yl({},c,{horizontalPoints:C})),$.createElement(k7e,Yl({},c,{verticalPoints:P})))}R7e.displayName="CartesianGrid";var D7e=["type","layout","connectNulls","ref"],$7e=["key"];function Nd(e){"@babel/helpers - typeof";return Nd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Nd(e)}function i7(e,t){if(e==null)return{};var n=I7e(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function I7e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function qp(){return qp=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);nd){m=[].concat(yf(s.slice(0,g)),[d-v]);break}var y=m.length%2===0?[0,h]:[h];return[].concat(yf(t.repeat(s,c)),yf(m),y).map(function(x){return"".concat(x,"px")}).join(", ")}),qo(n,"id",Lc("recharts-line-")),qo(n,"pathRef",function(a){n.mainCurve=a}),qo(n,"handleAnimationEnd",function(){n.setState({isAnimationFinished:!0}),n.props.onAnimationEnd&&n.props.onAnimationEnd()}),qo(n,"handleAnimationStart",function(){n.setState({isAnimationFinished:!1}),n.props.onAnimationStart&&n.props.onAnimationStart()}),n}return H7e(t,e),z7e(t,[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var r=this.getTotalLength();this.setState({totalLength:r})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var r=this.getTotalLength();r!==this.state.totalLength&&this.setState({totalLength:r})}}},{key:"getTotalLength",value:function(){var r=this.mainCurve;try{return r&&r.getTotalLength&&r.getTotalLength()||0}catch{return 0}}},{key:"renderErrorBar",value:function(r,i){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var o=this.props,a=o.points,u=o.xAxis,s=o.yAxis,l=o.layout,c=o.children,d=xi(c,vh);if(!d)return null;var h=function(v,y){return{x:v.x,y:v.y,value:v.value,errorVal:ar(v.payload,y)}},m={clipPath:r?"url(#clipPath-".concat(i,")"):null};return $.createElement(jt,m,d.map(function(g){return $.cloneElement(g,{key:"bar-".concat(g.props.dataKey),data:a,xAxis:u,yAxis:s,layout:l,dataPointFormatter:h})}))}},{key:"renderDots",value:function(r,i,o){var a=this.props.isAnimationActive;if(a&&!this.state.isAnimationFinished)return null;var u=this.props,s=u.dot,l=u.points,c=u.dataKey,d=ct(this.props,!1),h=ct(s,!0),m=l.map(function(v,y){var x=Di(Di(Di({key:"dot-".concat(y),r:3},d),h),{},{value:v.value,dataKey:c,cx:v.x,cy:v.y,index:y,payload:v.payload});return t.renderDotItem(s,x)}),g={clipPath:r?"url(#clipPath-".concat(i?"":"dots-").concat(o,")"):null};return $.createElement(jt,qp({className:"recharts-line-dots",key:"dots"},g),m)}},{key:"renderCurveStatically",value:function(r,i,o,a){var u=this.props,s=u.type,l=u.layout,c=u.connectNulls;u.ref;var d=i7(u,D7e),h=Di(Di(Di({},ct(d,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:i?"url(#clipPath-".concat(o,")"):null,points:r},a),{},{type:s,layout:l,connectNulls:c});return $.createElement(rc,qp({},h,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(r,i){var o=this,a=this.props,u=a.points,s=a.strokeDasharray,l=a.isAnimationActive,c=a.animationBegin,d=a.animationDuration,h=a.animationEasing,m=a.animationId,g=a.animateNewValues,v=a.width,y=a.height,x=this.state,w=x.prevPoints,S=x.totalLength;return $.createElement(la,{begin:c,duration:d,isActive:l,easing:h,from:{t:0},to:{t:1},key:"line-".concat(m),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(A){var E=A.t;if(w){var C=w.length/u.length,P=u.map(function(F,Y){var H=Math.floor(Y*C);if(w[H]){var W=w[H],V=Un(W.x,F.x),j=Un(W.y,F.y);return Di(Di({},F),{},{x:V(E),y:j(E)})}if(g){var I=Un(v*2,F.x),z=Un(y/2,F.y);return Di(Di({},F),{},{x:I(E),y:z(E)})}return Di(Di({},F),{},{x:F.x,y:F.y})});return o.renderCurveStatically(P,r,i)}var k=Un(0,S),M=k(E),L;if(s){var B="".concat(s).split(/[,\s]+/gim).map(function(F){return parseFloat(F)});L=o.getStrokeDasharray(M,S,B)}else L=o.generateSimpleStrokeDasharray(S,M);return o.renderCurveStatically(u,r,i,{strokeDasharray:L})})}},{key:"renderCurve",value:function(r,i){var o=this.props,a=o.points,u=o.isAnimationActive,s=this.state,l=s.prevPoints,c=s.totalLength;return u&&a&&a.length&&(!l&&c>0||!Sc(l,a))?this.renderCurveWithAnimation(r,i):this.renderCurveStatically(a,r,i)}},{key:"render",value:function(){var r,i=this.props,o=i.hide,a=i.dot,u=i.points,s=i.className,l=i.xAxis,c=i.yAxis,d=i.top,h=i.left,m=i.width,g=i.height,v=i.isAnimationActive,y=i.id;if(o||!u||!u.length)return null;var x=this.state.isAnimationFinished,w=u.length===1,S=Pt("recharts-line",s),A=l&&l.allowDataOverflow,E=c&&c.allowDataOverflow,C=A||E,P=ft(y)?this.id:y,k=(r=ct(a,!1))!==null&&r!==void 0?r:{r:3,strokeWidth:2},M=k.r,L=M===void 0?3:M,B=k.strokeWidth,F=B===void 0?2:B,Y=mU(a)?a:{},H=Y.clipDot,W=H===void 0?!0:H,V=L*2+F;return $.createElement(jt,{className:S},A||E?$.createElement("defs",null,$.createElement("clipPath",{id:"clipPath-".concat(P)},$.createElement("rect",{x:A?h:h-m/2,y:E?d:d-g/2,width:A?m:m*2,height:E?g:g*2})),!W&&$.createElement("clipPath",{id:"clipPath-dots-".concat(P)},$.createElement("rect",{x:h-V/2,y:d-V/2,width:m+V,height:g+V}))):null,!w&&this.renderCurve(C,P),this.renderErrorBar(C,P),(w||a)&&this.renderDots(C,W,P),(!v||x)&&Fa.renderCallByParent(this.props,u))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return r.animationId!==i.prevAnimationId?{prevAnimationId:r.animationId,curPoints:r.points,prevPoints:i.curPoints}:r.points!==i.curPoints?{curPoints:r.points}:null}},{key:"repeat",value:function(r,i){for(var o=r.length%2!==0?[].concat(yf(r),[0]):r,a=[],u=0;u=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Y7e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Zl(){return Zl=Object.assign?Object.assign.bind():function(e){for(var t=1;t0||!Sc(c,a)||!Sc(d,u))?this.renderAreaWithAnimation(r,i):this.renderAreaStatically(a,u,r,i)}},{key:"render",value:function(){var r,i=this.props,o=i.hide,a=i.dot,u=i.points,s=i.className,l=i.top,c=i.left,d=i.xAxis,h=i.yAxis,m=i.width,g=i.height,v=i.isAnimationActive,y=i.id;if(o||!u||!u.length)return null;var x=this.state.isAnimationFinished,w=u.length===1,S=Pt("recharts-area",s),A=d&&d.allowDataOverflow,E=h&&h.allowDataOverflow,C=A||E,P=ft(y)?this.id:y,k=(r=ct(a,!1))!==null&&r!==void 0?r:{r:3,strokeWidth:2},M=k.r,L=M===void 0?3:M,B=k.strokeWidth,F=B===void 0?2:B,Y=mU(a)?a:{},H=Y.clipDot,W=H===void 0?!0:H,V=L*2+F;return $.createElement(jt,{className:S},A||E?$.createElement("defs",null,$.createElement("clipPath",{id:"clipPath-".concat(P)},$.createElement("rect",{x:A?c:c-m/2,y:E?l:l-g/2,width:A?m:m*2,height:E?g:g*2})),!W&&$.createElement("clipPath",{id:"clipPath-dots-".concat(P)},$.createElement("rect",{x:c-V/2,y:l-V/2,width:m+V,height:g+V}))):null,w?null:this.renderArea(C,P),(a||w)&&this.renderDots(C,W,P),(!v||x)&&Fa.renderCallByParent(this.props,u))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return r.animationId!==i.prevAnimationId?{prevAnimationId:r.animationId,curPoints:r.points,curBaseLine:r.baseLine,prevPoints:i.curPoints,prevBaseLine:i.curBaseLine}:r.points!==i.curPoints||r.baseLine!==i.curBaseLine?{curPoints:r.points,curBaseLine:r.baseLine}:null}}])}(b.PureComponent);pH=Uc;ka(Uc,"displayName","Area");ka(Uc,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!ia.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"});ka(Uc,"getBaseValue",function(e,t,n,r){var i=e.layout,o=e.baseValue,a=t.props.baseValue,u=a??o;if(Pe(u)&&typeof u=="number")return u;var s=i==="horizontal"?r:n,l=s.scale.domain();if(s.type==="number"){var c=Math.max(l[0],l[1]),d=Math.min(l[0],l[1]);return u==="dataMin"?d:u==="dataMax"||c<0?c:Math.max(Math.min(l[0],l[1]),0)}return u==="dataMin"?l[0]:u==="dataMax"?l[1]:l[0]});ka(Uc,"getComposedData",function(e){var t=e.props,n=e.item,r=e.xAxis,i=e.yAxis,o=e.xAxisTicks,a=e.yAxisTicks,u=e.bandSize,s=e.dataKey,l=e.stackedData,c=e.dataStartIndex,d=e.displayedData,h=e.offset,m=t.layout,g=l&&l.length,v=pH.getBaseValue(t,n,r,i),y=m==="horizontal",x=!1,w=d.map(function(A,E){var C;g?C=l[c+E]:(C=ar(A,s),Array.isArray(C)?x=!0:C=[v,C]);var P=C[1]==null||g&&ar(A,s)==null;return y?{x:Od({axis:r,ticks:o,bandSize:u,entry:A,index:E}),y:P?null:i.scale(C[1]),value:C,payload:A}:{x:P?null:r.scale(C[1]),y:Od({axis:i,ticks:a,bandSize:u,entry:A,index:E}),value:C,payload:A}}),S;return g||x?S=w.map(function(A){var E=Array.isArray(A.value)?A.value[0]:null;return y?{x:A.x,y:E!=null&&A.y!=null?i.scale(E):null}:{x:E!=null?r.scale(E):null,y:A.y}}):S=y?i.scale(v):r.scale(v),ps({points:w,baseLine:S,layout:m,isRange:x},h)});ka(Uc,"renderDotItem",function(e,t){var n;if($.isValidElement(e))n=$.cloneElement(e,t);else if(ht(e))n=e(t);else{var r=Pt("recharts-area-dot",typeof e!="boolean"?e.className:""),i=t.key,o=mH(t,K7e);n=$.createElement(hx,Zl({},o,{key:i,className:r}))}return n});function Ld(e){"@babel/helpers - typeof";return Ld=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ld(e)}function rIe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function iIe(e,t){for(var n=0;n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function hIe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function pIe(e){var t=e.option,n=e.isActive,r=dIe(e,fIe);return typeof t=="string"?$.createElement(HE,Gp({option:$.createElement(ex,Gp({type:t},r)),isActive:n,shapeType:"symbols"},r)):$.createElement(HE,Gp({option:t,isActive:n,shapeType:"symbols"},r))}function jd(e){"@babel/helpers - typeof";return jd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},jd(e)}function Kp(){return Kp=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function sNe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function lNe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function cNe(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n0?a:t&&t.length&&Pe(i)&&Pe(o)?t.slice(i,o+1):[]};function FH(e){return e==="number"?[0,"auto"]:void 0}var m6=function(t,n,r,i){var o=t.graphicalItems,a=t.tooltipAxis,u=Ax(n,t);return r<0||!o||!o.length||r>=u.length?null:o.reduce(function(s,l){var c,d=(c=l.props.data)!==null&&c!==void 0?c:n;d&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=r&&(d=d.slice(t.dataStartIndex,t.dataEndIndex+1));var h;if(a.dataKey&&!a.allowDuplicatedCategory){var m=d===void 0?u:d;h=k1(m,a.dataKey,i)}else h=d&&d[r]||u[r];return h?[].concat(Wd(s),[CV(l,h)]):s},[])},g7=function(t,n,r,i){var o=i||{x:t.chartX,y:t.chartY},a=_Ne(o,r),u=t.orderedTooltipTicks,s=t.tooltipAxis,l=t.tooltipTicks,c=E8e(a,u,l,s);if(c>=0&&l){var d=l[c]&&l[c].value,h=m6(t,n,c,d),m=SNe(r,u,c,o);return{activeTooltipIndex:c,activeLabel:d,activePayload:h,activeCoordinate:m}}return null},CNe=function(t,n){var r=n.axes,i=n.graphicalItems,o=n.axisType,a=n.axisIdKey,u=n.stackGroups,s=n.dataStartIndex,l=n.dataEndIndex,c=t.layout,d=t.children,h=t.stackOffset,m=xV(c,o);return r.reduce(function(g,v){var y,x=v.type.defaultProps!==void 0?pe(pe({},v.type.defaultProps),v.props):v.props,w=x.type,S=x.dataKey,A=x.allowDataOverflow,E=x.allowDuplicatedCategory,C=x.scale,P=x.ticks,k=x.includeHidden,M=x[a];if(g[M])return g;var L=Ax(t.data,{graphicalItems:i.filter(function(q){var G,ee=a in q.props?q.props[a]:(G=q.type.defaultProps)===null||G===void 0?void 0:G[a];return ee===M}),dataStartIndex:s,dataEndIndex:l}),B=L.length,F,Y,H;ZIe(x.domain,A,w)&&(F=PE(x.domain,null,A),m&&(w==="number"||C!=="auto")&&(H=Vp(L,S,"category")));var W=FH(w);if(!F||F.length===0){var V,j=(V=x.domain)!==null&&V!==void 0?V:W;if(S){if(F=Vp(L,S,w),w==="category"&&m){var I=hwe(F);E&&I?(Y=F,F=hb(0,B)):E||(F=V9(j,F,v).reduce(function(q,G){return q.indexOf(G)>=0?q:[].concat(Wd(q),[G])},[]))}else if(w==="category")E?F=F.filter(function(q){return q!==""&&!ft(q)}):F=V9(j,F,v).reduce(function(q,G){return q.indexOf(G)>=0||G===""||ft(G)?q:[].concat(Wd(q),[G])},[]);else if(w==="number"){var z=T8e(L,i.filter(function(q){var G,ee,ue=a in q.props?q.props[a]:(G=q.type.defaultProps)===null||G===void 0?void 0:G[a],fe="hide"in q.props?q.props.hide:(ee=q.type.defaultProps)===null||ee===void 0?void 0:ee.hide;return ue===M&&(k||!fe)}),S,o,c);z&&(F=z)}m&&(w==="number"||C!=="auto")&&(H=Vp(L,S,"category"))}else m?F=hb(0,B):u&&u[M]&&u[M].hasStack&&w==="number"?F=h==="expand"?[0,1]:SV(u[M].stackGroups,s,l):F=wV(L,i.filter(function(q){var G=a in q.props?q.props[a]:q.type.defaultProps[a],ee="hide"in q.props?q.props.hide:q.type.defaultProps.hide;return G===M&&(k||!ee)}),w,c,!0);if(w==="number")F=d6(d,F,M,o,P),j&&(F=PE(j,F,A));else if(w==="category"&&j){var U=j,X=F.every(function(q){return U.indexOf(q)>=0});X&&(F=U)}}return pe(pe({},g),{},nt({},M,pe(pe({},x),{},{axisType:o,domain:F,categoricalDomain:H,duplicateDomain:Y,originalDomain:(y=x.domain)!==null&&y!==void 0?y:W,isCategorical:m,layout:c})))},{})},ENe=function(t,n){var r=n.graphicalItems,i=n.Axis,o=n.axisType,a=n.axisIdKey,u=n.stackGroups,s=n.dataStartIndex,l=n.dataEndIndex,c=t.layout,d=t.children,h=Ax(t.data,{graphicalItems:r,dataStartIndex:s,dataEndIndex:l}),m=h.length,g=xV(c,o),v=-1;return r.reduce(function(y,x){var w=x.type.defaultProps!==void 0?pe(pe({},x.type.defaultProps),x.props):x.props,S=w[a],A=FH("number");if(!y[S]){v++;var E;return g?E=hb(0,m):u&&u[S]&&u[S].hasStack?(E=SV(u[S].stackGroups,s,l),E=d6(d,E,S,o)):(E=PE(A,wV(h,r.filter(function(C){var P,k,M=a in C.props?C.props[a]:(P=C.type.defaultProps)===null||P===void 0?void 0:P[a],L="hide"in C.props?C.props.hide:(k=C.type.defaultProps)===null||k===void 0?void 0:k.hide;return M===S&&!L}),"number",c),i.defaultProps.allowDataOverflow),E=d6(d,E,S,o)),pe(pe({},y),{},nt({},S,pe(pe({axisType:o},i.defaultProps),{},{hide:!0,orientation:Ao(wNe,"".concat(o,".").concat(v%2),null),domain:E,originalDomain:A,isCategorical:g,layout:c})))}return y},{})},ANe=function(t,n){var r=n.axisType,i=r===void 0?"xAxis":r,o=n.AxisComp,a=n.graphicalItems,u=n.stackGroups,s=n.dataStartIndex,l=n.dataEndIndex,c=t.children,d="".concat(i,"Id"),h=xi(c,o),m={};return h.length?m=CNe(t,{axes:h,graphicalItems:a,axisType:i,axisIdKey:d,stackGroups:u,dataStartIndex:s,dataEndIndex:l}):a&&a.length&&(m=ENe(t,{Axis:o,graphicalItems:a,axisType:i,axisIdKey:d,stackGroups:u,dataStartIndex:s,dataEndIndex:l})),m},ONe=function(t){var n=_s(t),r=wu(n,!1,!0);return{tooltipTicks:r,orderedTooltipTicks:fP(r,function(i){return i.coordinate}),tooltipAxis:n,tooltipAxisBandSize:ib(n,r)}},v7=function(t){var n=t.children,r=t.defaultShowTooltip,i=Fi(n,Td),o=0,a=0;return t.data&&t.data.length!==0&&(a=t.data.length-1),i&&i.props&&(i.props.startIndex>=0&&(o=i.props.startIndex),i.props.endIndex>=0&&(a=i.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:o,dataEndIndex:a,activeTooltipIndex:-1,isTooltipActive:!!r}},PNe=function(t){return!t||!t.length?!1:t.some(function(n){var r=Cu(n&&n.type);return r&&r.indexOf("Bar")>=0})},y7=function(t){return t==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:t==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:t==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},kNe=function(t,n){var r=t.props,i=t.graphicalItems,o=t.xAxisMap,a=o===void 0?{}:o,u=t.yAxisMap,s=u===void 0?{}:u,l=r.width,c=r.height,d=r.children,h=r.margin||{},m=Fi(d,Td),g=Fi(d,ed),v=Object.keys(s).reduce(function(E,C){var P=s[C],k=P.orientation;return!P.mirror&&!P.hide?pe(pe({},E),{},nt({},k,E[k]+P.width)):E},{left:h.left||0,right:h.right||0}),y=Object.keys(a).reduce(function(E,C){var P=a[C],k=P.orientation;return!P.mirror&&!P.hide?pe(pe({},E),{},nt({},k,Ao(E,"".concat(k))+P.height)):E},{top:h.top||0,bottom:h.bottom||0}),x=pe(pe({},y),v),w=x.bottom;m&&(x.bottom+=m.props.height||Td.defaultProps.height),g&&n&&(x=P8e(x,i,r,n));var S=l-x.left-x.right,A=c-x.top-x.bottom;return pe(pe({brushBottom:w},x),{},{width:Math.max(S,0),height:Math.max(A,0)})},TNe=function(t,n){if(n==="xAxis")return t[n].width;if(n==="yAxis")return t[n].height},LH=function(t){var n=t.chartName,r=t.GraphicalChild,i=t.defaultTooltipEventType,o=i===void 0?"axis":i,a=t.validateTooltipEventTypes,u=a===void 0?["axis"]:a,s=t.axisComponents,l=t.legendContent,c=t.formatAxisMap,d=t.defaultProps,h=function(x,w){var S=w.graphicalItems,A=w.stackGroups,E=w.offset,C=w.updateId,P=w.dataStartIndex,k=w.dataEndIndex,M=x.barSize,L=x.layout,B=x.barGap,F=x.barCategoryGap,Y=x.maxBarSize,H=y7(L),W=H.numericAxisName,V=H.cateAxisName,j=PNe(S),I=[];return S.forEach(function(z,U){var X=Ax(x.data,{graphicalItems:[z],dataStartIndex:P,dataEndIndex:k}),q=z.type.defaultProps!==void 0?pe(pe({},z.type.defaultProps),z.props):z.props,G=q.dataKey,ee=q.maxBarSize,ue=q["".concat(W,"Id")],fe=q["".concat(V,"Id")],ie={},Ae=s.reduce(function(Ce,Ee){var ye=w["".concat(Ee.axisType,"Map")],Ie=q["".concat(Ee.axisType,"Id")];ye&&ye[Ie]||Ee.axisType==="zAxis"||Ec();var Ye=ye[Ie];return pe(pe({},Ce),{},nt(nt({},Ee.axisType,Ye),"".concat(Ee.axisType,"Ticks"),wu(Ye)))},ie),de=Ae[V],we=Ae["".concat(V,"Ticks")],ge=A&&A[ue]&&A[ue].hasStack&&U8e(z,A[ue].stackGroups),ae=Cu(z.type).indexOf("Bar")>=0,$e=ib(de,we),Te=[],qe=j&&A8e({barSize:M,stackGroups:A,totalSize:TNe(Ae,V)});if(ae){var zt,Rt,Z=ft(ee)?Y:ee,oe=(zt=(Rt=ib(de,we,!0))!==null&&Rt!==void 0?Rt:Z)!==null&&zt!==void 0?zt:0;Te=O8e({barGap:B,barCategoryGap:F,bandSize:oe!==$e?oe:$e,sizeList:qe[fe],maxBarSize:Z}),oe!==$e&&(Te=Te.map(function(Ce){return pe(pe({},Ce),{},{position:pe(pe({},Ce.position),{},{offset:Ce.position.offset-oe/2})})}))}var se=z&&z.type&&z.type.getComposedData;se&&I.push({props:pe(pe({},se(pe(pe({},Ae),{},{displayedData:X,props:x,dataKey:G,item:z,bandSize:$e,barPosition:Te,offset:E,stackedData:ge,layout:L,dataStartIndex:P,dataEndIndex:k}))),{},nt(nt(nt({key:z.key||"item-".concat(U)},W,Ae[W]),V,Ae[V]),"animationId",C)),childIndex:Ewe(z,x.children),item:z})}),I},m=function(x,w){var S=x.props,A=x.dataStartIndex,E=x.dataEndIndex,C=x.updateId;if(!LR({props:S}))return null;var P=S.children,k=S.layout,M=S.stackOffset,L=S.data,B=S.reverseStackOrder,F=y7(k),Y=F.numericAxisName,H=F.cateAxisName,W=xi(P,r),V=j8e(L,W,"".concat(Y,"Id"),"".concat(H,"Id"),M,B),j=s.reduce(function(q,G){var ee="".concat(G.axisType,"Map");return pe(pe({},q),{},nt({},ee,ANe(S,pe(pe({},G),{},{graphicalItems:W,stackGroups:G.axisType===Y&&V,dataStartIndex:A,dataEndIndex:E}))))},{}),I=kNe(pe(pe({},j),{},{props:S,graphicalItems:W}),w?.legendBBox);Object.keys(j).forEach(function(q){j[q]=c(S,j[q],I,q.replace("Map",""),n)});var z=j["".concat(H,"Map")],U=ONe(z),X=h(S,pe(pe({},j),{},{dataStartIndex:A,dataEndIndex:E,updateId:C,graphicalItems:W,stackGroups:V,offset:I}));return pe(pe({formattedGraphicalItems:X,graphicalItems:W,offset:I,stackGroups:V},U),j)},g=function(y){function x(w){var S,A,E;return lNe(this,x),E=dNe(this,x,[w]),nt(E,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),nt(E,"accessibilityManager",new YIe),nt(E,"handleLegendBBoxUpdate",function(C){if(C){var P=E.state,k=P.dataStartIndex,M=P.dataEndIndex,L=P.updateId;E.setState(pe({legendBBox:C},m({props:E.props,dataStartIndex:k,dataEndIndex:M,updateId:L},pe(pe({},E.state),{},{legendBBox:C}))))}}),nt(E,"handleReceiveSyncEvent",function(C,P,k){if(E.props.syncId===C){if(k===E.eventEmitterSymbol&&typeof E.props.syncMethod!="function")return;E.applySyncEvent(P)}}),nt(E,"handleBrushChange",function(C){var P=C.startIndex,k=C.endIndex;if(P!==E.state.dataStartIndex||k!==E.state.dataEndIndex){var M=E.state.updateId;E.setState(function(){return pe({dataStartIndex:P,dataEndIndex:k},m({props:E.props,dataStartIndex:P,dataEndIndex:k,updateId:M},E.state))}),E.triggerSyncEvent({dataStartIndex:P,dataEndIndex:k})}}),nt(E,"handleMouseEnter",function(C){var P=E.getMouseInfo(C);if(P){var k=pe(pe({},P),{},{isTooltipActive:!0});E.setState(k),E.triggerSyncEvent(k);var M=E.props.onMouseEnter;ht(M)&&M(k,C)}}),nt(E,"triggeredAfterMouseMove",function(C){var P=E.getMouseInfo(C),k=P?pe(pe({},P),{},{isTooltipActive:!0}):{isTooltipActive:!1};E.setState(k),E.triggerSyncEvent(k);var M=E.props.onMouseMove;ht(M)&&M(k,C)}),nt(E,"handleItemMouseEnter",function(C){E.setState(function(){return{isTooltipActive:!0,activeItem:C,activePayload:C.tooltipPayload,activeCoordinate:C.tooltipPosition||{x:C.cx,y:C.cy}}})}),nt(E,"handleItemMouseLeave",function(){E.setState(function(){return{isTooltipActive:!1}})}),nt(E,"handleMouseMove",function(C){C.persist(),E.throttleTriggeredAfterMouseMove(C)}),nt(E,"handleMouseLeave",function(C){E.throttleTriggeredAfterMouseMove.cancel();var P={isTooltipActive:!1};E.setState(P),E.triggerSyncEvent(P);var k=E.props.onMouseLeave;ht(k)&&k(P,C)}),nt(E,"handleOuterEvent",function(C){var P=Cwe(C),k=Ao(E.props,"".concat(P));if(P&&ht(k)){var M,L;/.*touch.*/i.test(P)?L=E.getMouseInfo(C.changedTouches[0]):L=E.getMouseInfo(C),k((M=L)!==null&&M!==void 0?M:{},C)}}),nt(E,"handleClick",function(C){var P=E.getMouseInfo(C);if(P){var k=pe(pe({},P),{},{isTooltipActive:!0});E.setState(k),E.triggerSyncEvent(k);var M=E.props.onClick;ht(M)&&M(k,C)}}),nt(E,"handleMouseDown",function(C){var P=E.props.onMouseDown;if(ht(P)){var k=E.getMouseInfo(C);P(k,C)}}),nt(E,"handleMouseUp",function(C){var P=E.props.onMouseUp;if(ht(P)){var k=E.getMouseInfo(C);P(k,C)}}),nt(E,"handleTouchMove",function(C){C.changedTouches!=null&&C.changedTouches.length>0&&E.throttleTriggeredAfterMouseMove(C.changedTouches[0])}),nt(E,"handleTouchStart",function(C){C.changedTouches!=null&&C.changedTouches.length>0&&E.handleMouseDown(C.changedTouches[0])}),nt(E,"handleTouchEnd",function(C){C.changedTouches!=null&&C.changedTouches.length>0&&E.handleMouseUp(C.changedTouches[0])}),nt(E,"handleDoubleClick",function(C){var P=E.props.onDoubleClick;if(ht(P)){var k=E.getMouseInfo(C);P(k,C)}}),nt(E,"handleContextMenu",function(C){var P=E.props.onContextMenu;if(ht(P)){var k=E.getMouseInfo(C);P(k,C)}}),nt(E,"triggerSyncEvent",function(C){E.props.syncId!==void 0&&PS.emit(kS,E.props.syncId,C,E.eventEmitterSymbol)}),nt(E,"applySyncEvent",function(C){var P=E.props,k=P.layout,M=P.syncMethod,L=E.state.updateId,B=C.dataStartIndex,F=C.dataEndIndex;if(C.dataStartIndex!==void 0||C.dataEndIndex!==void 0)E.setState(pe({dataStartIndex:B,dataEndIndex:F},m({props:E.props,dataStartIndex:B,dataEndIndex:F,updateId:L},E.state)));else if(C.activeTooltipIndex!==void 0){var Y=C.chartX,H=C.chartY,W=C.activeTooltipIndex,V=E.state,j=V.offset,I=V.tooltipTicks;if(!j)return;if(typeof M=="function")W=M(I,C);else if(M==="value"){W=-1;for(var z=0;z=0){var ge,ae;if(Y.dataKey&&!Y.allowDuplicatedCategory){var $e=typeof Y.dataKey=="function"?we:"payload.".concat(Y.dataKey.toString());ge=k1(z,$e,W),ae=U&&X&&k1(X,$e,W)}else ge=z?.[H],ae=U&&X&&X[H];if(fe||ue){var Te=C.props.activeIndex!==void 0?C.props.activeIndex:H;return[b.cloneElement(C,pe(pe(pe({},M.props),Ae),{},{activeIndex:Te})),null,null]}if(!ft(ge))return[de].concat(Wd(E.renderActivePoints({item:M,activePoint:ge,basePoint:ae,childIndex:H,isRange:U})))}else{var qe,zt=(qe=E.getItemByXY(E.state.activeCoordinate))!==null&&qe!==void 0?qe:{graphicalItem:de},Rt=zt.graphicalItem,Z=Rt.item,oe=Z===void 0?C:Z,se=Rt.childIndex,Ce=pe(pe(pe({},M.props),Ae),{},{activeIndex:se});return[b.cloneElement(oe,Ce),null,null]}return U?[de,null,null]:[de,null]}),nt(E,"renderCustomized",function(C,P,k){return b.cloneElement(C,pe(pe({key:"recharts-customized-".concat(k)},E.props),E.state))}),nt(E,"renderMap",{CartesianGrid:{handler:Hv,once:!0},ReferenceArea:{handler:E.renderReferenceElement},ReferenceLine:{handler:Hv},ReferenceDot:{handler:E.renderReferenceElement},XAxis:{handler:Hv},YAxis:{handler:Hv},Brush:{handler:E.renderBrush,once:!0},Bar:{handler:E.renderGraphicChild},Line:{handler:E.renderGraphicChild},Area:{handler:E.renderGraphicChild},Radar:{handler:E.renderGraphicChild},RadialBar:{handler:E.renderGraphicChild},Scatter:{handler:E.renderGraphicChild},Pie:{handler:E.renderGraphicChild},Funnel:{handler:E.renderGraphicChild},Tooltip:{handler:E.renderCursor,once:!0},PolarGrid:{handler:E.renderPolarGrid,once:!0},PolarAngleAxis:{handler:E.renderPolarAxis},PolarRadiusAxis:{handler:E.renderPolarAxis},Customized:{handler:E.renderCustomized}}),E.clipPathId="".concat((S=w.id)!==null&&S!==void 0?S:Lc("recharts"),"-clip"),E.throttleTriggeredAfterMouseMove=yW(E.triggeredAfterMouseMove,(A=w.throttleDelay)!==null&&A!==void 0?A:1e3/60),E.state={},E}return mNe(x,y),fNe(x,[{key:"componentDidMount",value:function(){var S,A;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(S=this.props.margin.left)!==null&&S!==void 0?S:0,top:(A=this.props.margin.top)!==null&&A!==void 0?A:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var S=this.props,A=S.children,E=S.data,C=S.height,P=S.layout,k=Fi(A,fu);if(k){var M=k.props.defaultIndex;if(!(typeof M!="number"||M<0||M>this.state.tooltipTicks.length-1)){var L=this.state.tooltipTicks[M]&&this.state.tooltipTicks[M].value,B=m6(this.state,E,M,L),F=this.state.tooltipTicks[M].coordinate,Y=(this.state.offset.top+C)/2,H=P==="horizontal",W=H?{x:F,y:Y}:{y:F,x:Y},V=this.state.formattedGraphicalItems.find(function(I){var z=I.item;return z.type.name==="Scatter"});V&&(W=pe(pe({},W),V.props.points[M].tooltipPosition),B=V.props.points[M].tooltipPayload);var j={activeTooltipIndex:M,isTooltipActive:!0,activeLabel:L,activePayload:B,activeCoordinate:W};this.setState(j),this.renderCursor(k),this.accessibilityManager.setIndex(M)}}}},{key:"getSnapshotBeforeUpdate",value:function(S,A){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==A.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==S.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==S.margin){var E,C;this.accessibilityManager.setDetails({offset:{left:(E=this.props.margin.left)!==null&&E!==void 0?E:0,top:(C=this.props.margin.top)!==null&&C!==void 0?C:0}})}return null}},{key:"componentDidUpdate",value:function(S){W3([Fi(S.children,fu)],[Fi(this.props.children,fu)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var S=Fi(this.props.children,fu);if(S&&typeof S.props.shared=="boolean"){var A=S.props.shared?"axis":"item";return u.indexOf(A)>=0?A:o}return o}},{key:"getMouseInfo",value:function(S){if(!this.container)return null;var A=this.container,E=A.getBoundingClientRect(),C=XOe(E),P={chartX:Math.round(S.pageX-C.left),chartY:Math.round(S.pageY-C.top)},k=E.width/A.offsetWidth||1,M=this.inRange(P.chartX,P.chartY,k);if(!M)return null;var L=this.state,B=L.xAxisMap,F=L.yAxisMap,Y=this.getTooltipEventType();if(Y!=="axis"&&B&&F){var H=_s(B).scale,W=_s(F).scale,V=H&&H.invert?H.invert(P.chartX):null,j=W&&W.invert?W.invert(P.chartY):null;return pe(pe({},P),{},{xValue:V,yValue:j})}var I=g7(this.state,this.props.data,this.props.layout,M);return I?pe(pe({},P),I):null}},{key:"inRange",value:function(S,A){var E=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,C=this.props.layout,P=S/E,k=A/E;if(C==="horizontal"||C==="vertical"){var M=this.state.offset,L=P>=M.left&&P<=M.left+M.width&&k>=M.top&&k<=M.top+M.height;return L?{x:P,y:k}:null}var B=this.state,F=B.angleAxisMap,Y=B.radiusAxisMap;if(F&&Y){var H=_s(F);return G9({x:P,y:k},H)}return null}},{key:"parseEventsOfWrapper",value:function(){var S=this.props.children,A=this.getTooltipEventType(),E=Fi(S,fu),C={};E&&A==="axis"&&(E.props.trigger==="click"?C={onClick:this.handleClick}:C={onMouseEnter:this.handleMouseEnter,onDoubleClick:this.handleDoubleClick,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onContextMenu:this.handleContextMenu});var P=T1(this.props,this.handleOuterEvent);return pe(pe({},P),C)}},{key:"addListener",value:function(){PS.on(kS,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){PS.removeListener(kS,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(S,A,E){for(var C=this.state.formattedGraphicalItems,P=0,k=C.length;P(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var MNe=[" ","Enter","ArrowUp","ArrowDown"],RNe=[" ","Enter"],og="Select",[Ox,Px,DNe]=yO(og),[wh,iKe]=ri(og,[DNe,al]),kx=al(),[$Ne,dl]=wh(og),[INe,NNe]=wh(og),jH=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:o,value:a,defaultValue:u,onValueChange:s,dir:l,name:c,autoComplete:d,disabled:h,required:m,form:g}=e,v=kx(t),[y,x]=b.useState(null),[w,S]=b.useState(null),[A,E]=b.useState(!1),C=yw(l),[P=!1,k]=sa({prop:r,defaultProp:i,onChange:o}),[M,L]=sa({prop:a,defaultProp:u,onChange:s}),B=b.useRef(null),F=y?g||!!y.closest("form"):!0,[Y,H]=b.useState(new Set),W=Array.from(Y).map(V=>V.props.value).join(";");return R.jsx(xw,{...v,children:R.jsxs($Ne,{required:m,scope:t,trigger:y,onTriggerChange:x,valueNode:w,onValueNodeChange:S,valueNodeHasChildren:A,onValueNodeHasChildrenChange:E,contentId:Hi(),value:M,onValueChange:L,open:P,onOpenChange:k,dir:C,triggerPointerDownPosRef:B,disabled:h,children:[R.jsx(Ox.Provider,{scope:t,children:R.jsx(INe,{scope:e.__scopeSelect,onNativeOptionAdd:b.useCallback(V=>{H(j=>new Set(j).add(V))},[]),onNativeOptionRemove:b.useCallback(V=>{H(j=>{const I=new Set(j);return I.delete(V),I})},[]),children:n})}),F?R.jsxs(fq,{"aria-hidden":!0,required:m,tabIndex:-1,name:c,autoComplete:d,value:M,onChange:V=>L(V.target.value),disabled:h,form:g,children:[M===void 0?R.jsx("option",{value:""}):null,Array.from(Y)]},W):null]})})};jH.displayName=og;var BH="SelectTrigger",zH=b.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...i}=e,o=kx(n),a=dl(BH,n),u=a.disabled||r,s=kt(t,a.onTriggerChange),l=Px(n),c=b.useRef("touch"),[d,h,m]=dq(v=>{const y=l().filter(S=>!S.disabled),x=y.find(S=>S.value===a.value),w=hq(y,v,x);w!==void 0&&a.onValueChange(w.value)}),g=v=>{u||(a.onOpenChange(!0),m()),v&&(a.triggerPointerDownPosRef.current={x:Math.round(v.pageX),y:Math.round(v.pageY)})};return R.jsx(qm,{asChild:!0,...o,children:R.jsx(Qe.button,{type:"button",role:"combobox","aria-controls":a.contentId,"aria-expanded":a.open,"aria-required":a.required,"aria-autocomplete":"none",dir:a.dir,"data-state":a.open?"open":"closed",disabled:u,"data-disabled":u?"":void 0,"data-placeholder":cq(a.value)?"":void 0,...i,ref:s,onClick:De(i.onClick,v=>{v.currentTarget.focus(),c.current!=="mouse"&&g(v)}),onPointerDown:De(i.onPointerDown,v=>{c.current=v.pointerType;const y=v.target;y.hasPointerCapture(v.pointerId)&&y.releasePointerCapture(v.pointerId),v.button===0&&v.ctrlKey===!1&&v.pointerType==="mouse"&&(g(v),v.preventDefault())}),onKeyDown:De(i.onKeyDown,v=>{const y=d.current!=="";!(v.ctrlKey||v.altKey||v.metaKey)&&v.key.length===1&&h(v.key),!(y&&v.key===" ")&&MNe.includes(v.key)&&(g(),v.preventDefault())})})})});zH.displayName=BH;var UH="SelectValue",WH=b.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,children:o,placeholder:a="",...u}=e,s=dl(UH,n),{onValueNodeHasChildrenChange:l}=s,c=o!==void 0,d=kt(t,s.onValueNodeChange);return Pr(()=>{l(c)},[l,c]),R.jsx(Qe.span,{...u,ref:d,style:{pointerEvents:"none"},children:cq(s.value)?R.jsx(R.Fragment,{children:a}):o})});WH.displayName=UH;var FNe="SelectIcon",VH=b.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...i}=e;return R.jsx(Qe.span,{"aria-hidden":!0,...i,ref:t,children:r||"▼"})});VH.displayName=FNe;var LNe="SelectPortal",HH=e=>R.jsx(Um,{asChild:!0,...e});HH.displayName=LNe;var Oc="SelectContent",qH=b.forwardRef((e,t)=>{const n=dl(Oc,e.__scopeSelect),[r,i]=b.useState();if(Pr(()=>{i(new DocumentFragment)},[]),!n.open){const o=r;return o?Bu.createPortal(R.jsx(GH,{scope:e.__scopeSelect,children:R.jsx(Ox.Slot,{scope:e.__scopeSelect,children:R.jsx("div",{children:e.children})})}),o):null}return R.jsx(KH,{...e,ref:t})});qH.displayName=Oc;var zo=10,[GH,hl]=wh(Oc),jNe="SelectContentImpl",KH=b.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:o,onPointerDownOutside:a,side:u,sideOffset:s,align:l,alignOffset:c,arrowPadding:d,collisionBoundary:h,collisionPadding:m,sticky:g,hideWhenDetached:v,avoidCollisions:y,...x}=e,w=dl(Oc,n),[S,A]=b.useState(null),[E,C]=b.useState(null),P=kt(t,ie=>A(ie)),[k,M]=b.useState(null),[L,B]=b.useState(null),F=Px(n),[Y,H]=b.useState(!1),W=b.useRef(!1);b.useEffect(()=>{if(S)return Vm(S)},[S]),gw();const V=b.useCallback(ie=>{const[Ae,...de]=F().map(ae=>ae.ref.current),[we]=de.slice(-1),ge=document.activeElement;for(const ae of ie)if(ae===ge||(ae?.scrollIntoView({block:"nearest"}),ae===Ae&&E&&(E.scrollTop=0),ae===we&&E&&(E.scrollTop=E.scrollHeight),ae?.focus(),document.activeElement!==ge))return},[F,E]),j=b.useCallback(()=>V([k,S]),[V,k,S]);b.useEffect(()=>{Y&&j()},[Y,j]);const{onOpenChange:I,triggerPointerDownPosRef:z}=w;b.useEffect(()=>{if(S){let ie={x:0,y:0};const Ae=we=>{ie={x:Math.abs(Math.round(we.pageX)-(z.current?.x??0)),y:Math.abs(Math.round(we.pageY)-(z.current?.y??0))}},de=we=>{ie.x<=10&&ie.y<=10?we.preventDefault():S.contains(we.target)||I(!1),document.removeEventListener("pointermove",Ae),z.current=null};return z.current!==null&&(document.addEventListener("pointermove",Ae),document.addEventListener("pointerup",de,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Ae),document.removeEventListener("pointerup",de,{capture:!0})}}},[S,I,z]),b.useEffect(()=>{const ie=()=>I(!1);return window.addEventListener("blur",ie),window.addEventListener("resize",ie),()=>{window.removeEventListener("blur",ie),window.removeEventListener("resize",ie)}},[I]);const[U,X]=dq(ie=>{const Ae=F().filter(ge=>!ge.disabled),de=Ae.find(ge=>ge.ref.current===document.activeElement),we=hq(Ae,ie,de);we&&setTimeout(()=>we.ref.current.focus())}),q=b.useCallback((ie,Ae,de)=>{const we=!W.current&&!de;(w.value!==void 0&&w.value===Ae||we)&&(M(ie),we&&(W.current=!0))},[w.value]),G=b.useCallback(()=>S?.focus(),[S]),ee=b.useCallback((ie,Ae,de)=>{const we=!W.current&&!de;(w.value!==void 0&&w.value===Ae||we)&&B(ie)},[w.value]),ue=r==="popper"?g6:YH,fe=ue===g6?{side:u,sideOffset:s,align:l,alignOffset:c,arrowPadding:d,collisionBoundary:h,collisionPadding:m,sticky:g,hideWhenDetached:v,avoidCollisions:y}:{};return R.jsx(GH,{scope:n,content:S,viewport:E,onViewportChange:C,itemRefCallback:q,selectedItem:k,onItemLeave:G,itemTextRefCallback:ee,focusSelectedItem:j,selectedItemText:L,position:r,isPositioned:Y,searchRef:U,children:R.jsx(Wm,{as:qs,allowPinchZoom:!0,children:R.jsx(zm,{asChild:!0,trapped:w.open,onMountAutoFocus:ie=>{ie.preventDefault()},onUnmountAutoFocus:De(i,ie=>{w.trigger?.focus({preventScroll:!0}),ie.preventDefault()}),children:R.jsx(th,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:ie=>ie.preventDefault(),onDismiss:()=>w.onOpenChange(!1),children:R.jsx(ue,{role:"listbox",id:w.contentId,"data-state":w.open?"open":"closed",dir:w.dir,onContextMenu:ie=>ie.preventDefault(),...x,...fe,onPlaced:()=>H(!0),ref:P,style:{display:"flex",flexDirection:"column",outline:"none",...x.style},onKeyDown:De(x.onKeyDown,ie=>{const Ae=ie.ctrlKey||ie.altKey||ie.metaKey;if(ie.key==="Tab"&&ie.preventDefault(),!Ae&&ie.key.length===1&&X(ie.key),["ArrowUp","ArrowDown","Home","End"].includes(ie.key)){let we=F().filter(ge=>!ge.disabled).map(ge=>ge.ref.current);if(["ArrowUp","End"].includes(ie.key)&&(we=we.slice().reverse()),["ArrowUp","ArrowDown"].includes(ie.key)){const ge=ie.target,ae=we.indexOf(ge);we=we.slice(ae+1)}setTimeout(()=>V(we)),ie.preventDefault()}})})})})})})});KH.displayName=jNe;var BNe="SelectItemAlignedPosition",YH=b.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...i}=e,o=dl(Oc,n),a=hl(Oc,n),[u,s]=b.useState(null),[l,c]=b.useState(null),d=kt(t,P=>c(P)),h=Px(n),m=b.useRef(!1),g=b.useRef(!0),{viewport:v,selectedItem:y,selectedItemText:x,focusSelectedItem:w}=a,S=b.useCallback(()=>{if(o.trigger&&o.valueNode&&u&&l&&v&&y&&x){const P=o.trigger.getBoundingClientRect(),k=l.getBoundingClientRect(),M=o.valueNode.getBoundingClientRect(),L=x.getBoundingClientRect();if(o.dir!=="rtl"){const ge=L.left-k.left,ae=M.left-ge,$e=P.left-ae,Te=P.width+$e,qe=Math.max(Te,k.width),zt=window.innerWidth-zo,Rt=b7(ae,[zo,Math.max(zo,zt-qe)]);u.style.minWidth=Te+"px",u.style.left=Rt+"px"}else{const ge=k.right-L.right,ae=window.innerWidth-M.right-ge,$e=window.innerWidth-P.right-ae,Te=P.width+$e,qe=Math.max(Te,k.width),zt=window.innerWidth-zo,Rt=b7(ae,[zo,Math.max(zo,zt-qe)]);u.style.minWidth=Te+"px",u.style.right=Rt+"px"}const B=h(),F=window.innerHeight-zo*2,Y=v.scrollHeight,H=window.getComputedStyle(l),W=parseInt(H.borderTopWidth,10),V=parseInt(H.paddingTop,10),j=parseInt(H.borderBottomWidth,10),I=parseInt(H.paddingBottom,10),z=W+V+Y+I+j,U=Math.min(y.offsetHeight*5,z),X=window.getComputedStyle(v),q=parseInt(X.paddingTop,10),G=parseInt(X.paddingBottom,10),ee=P.top+P.height/2-zo,ue=F-ee,fe=y.offsetHeight/2,ie=y.offsetTop+fe,Ae=W+V+ie,de=z-Ae;if(Ae<=ee){const ge=B.length>0&&y===B[B.length-1].ref.current;u.style.bottom="0px";const ae=l.clientHeight-v.offsetTop-v.offsetHeight,$e=Math.max(ue,fe+(ge?G:0)+ae+j),Te=Ae+$e;u.style.height=Te+"px"}else{const ge=B.length>0&&y===B[0].ref.current;u.style.top="0px";const $e=Math.max(ee,W+v.offsetTop+(ge?q:0)+fe)+de;u.style.height=$e+"px",v.scrollTop=Ae-ee+v.offsetTop}u.style.margin=`${zo}px 0`,u.style.minHeight=U+"px",u.style.maxHeight=F+"px",r?.(),requestAnimationFrame(()=>m.current=!0)}},[h,o.trigger,o.valueNode,u,l,v,y,x,o.dir,r]);Pr(()=>S(),[S]);const[A,E]=b.useState();Pr(()=>{l&&E(window.getComputedStyle(l).zIndex)},[l]);const C=b.useCallback(P=>{P&&g.current===!0&&(S(),w?.(),g.current=!1)},[S,w]);return R.jsx(UNe,{scope:n,contentWrapper:u,shouldExpandOnScrollRef:m,onScrollButtonChange:C,children:R.jsx("div",{ref:s,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:A},children:R.jsx(Qe.div,{...i,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});YH.displayName=BNe;var zNe="SelectPopperPosition",g6=b.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:i=zo,...o}=e,a=kx(n);return R.jsx(_w,{...a,...o,ref:t,align:r,collisionPadding:i,style:{boxSizing:"border-box",...o.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});g6.displayName=zNe;var[UNe,ZP]=wh(Oc,{}),v6="SelectViewport",ZH=b.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...i}=e,o=hl(v6,n),a=ZP(v6,n),u=kt(t,o.onViewportChange),s=b.useRef(0);return R.jsxs(R.Fragment,{children:[R.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),R.jsx(Ox.Slot,{scope:n,children:R.jsx(Qe.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:u,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:De(i.onScroll,l=>{const c=l.currentTarget,{contentWrapper:d,shouldExpandOnScrollRef:h}=a;if(h?.current&&d){const m=Math.abs(s.current-c.scrollTop);if(m>0){const g=window.innerHeight-zo*2,v=parseFloat(d.style.minHeight),y=parseFloat(d.style.height),x=Math.max(v,y);if(x0?A:0,d.style.justifyContent="flex-end")}}}s.current=c.scrollTop})})})]})});ZH.displayName=v6;var XH="SelectGroup",[WNe,VNe]=wh(XH),QH=b.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=Hi();return R.jsx(WNe,{scope:n,id:i,children:R.jsx(Qe.div,{role:"group","aria-labelledby":i,...r,ref:t})})});QH.displayName=XH;var JH="SelectLabel",eq=b.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=VNe(JH,n);return R.jsx(Qe.div,{id:i.id,...r,ref:t})});eq.displayName=JH;var Tb="SelectItem",[HNe,tq]=wh(Tb),nq=b.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:i=!1,textValue:o,...a}=e,u=dl(Tb,n),s=hl(Tb,n),l=u.value===r,[c,d]=b.useState(o??""),[h,m]=b.useState(!1),g=kt(t,w=>s.itemRefCallback?.(w,r,i)),v=Hi(),y=b.useRef("touch"),x=()=>{i||(u.onValueChange(r),u.onOpenChange(!1))};if(r==="")throw new Error("A must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return R.jsx(HNe,{scope:n,value:r,disabled:i,textId:v,isSelected:l,onItemTextChange:b.useCallback(w=>{d(S=>S||(w?.textContent??"").trim())},[]),children:R.jsx(Ox.ItemSlot,{scope:n,value:r,disabled:i,textValue:c,children:R.jsx(Qe.div,{role:"option","aria-labelledby":v,"data-highlighted":h?"":void 0,"aria-selected":l&&h,"data-state":l?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...a,ref:g,onFocus:De(a.onFocus,()=>m(!0)),onBlur:De(a.onBlur,()=>m(!1)),onClick:De(a.onClick,()=>{y.current!=="mouse"&&x()}),onPointerUp:De(a.onPointerUp,()=>{y.current==="mouse"&&x()}),onPointerDown:De(a.onPointerDown,w=>{y.current=w.pointerType}),onPointerMove:De(a.onPointerMove,w=>{y.current=w.pointerType,i?s.onItemLeave?.():y.current==="mouse"&&w.currentTarget.focus({preventScroll:!0})}),onPointerLeave:De(a.onPointerLeave,w=>{w.currentTarget===document.activeElement&&s.onItemLeave?.()}),onKeyDown:De(a.onKeyDown,w=>{s.searchRef?.current!==""&&w.key===" "||(RNe.includes(w.key)&&x(),w.key===" "&&w.preventDefault())})})})})});nq.displayName=Tb;var Op="SelectItemText",rq=b.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,...o}=e,a=dl(Op,n),u=hl(Op,n),s=tq(Op,n),l=NNe(Op,n),[c,d]=b.useState(null),h=kt(t,x=>d(x),s.onItemTextChange,x=>u.itemTextRefCallback?.(x,s.value,s.disabled)),m=c?.textContent,g=b.useMemo(()=>R.jsx("option",{value:s.value,disabled:s.disabled,children:m},s.value),[s.disabled,s.value,m]),{onNativeOptionAdd:v,onNativeOptionRemove:y}=l;return Pr(()=>(v(g),()=>y(g)),[v,y,g]),R.jsxs(R.Fragment,{children:[R.jsx(Qe.span,{id:s.textId,...o,ref:h}),s.isSelected&&a.valueNode&&!a.valueNodeHasChildren?Bu.createPortal(o.children,a.valueNode):null]})});rq.displayName=Op;var iq="SelectItemIndicator",oq=b.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return tq(iq,n).isSelected?R.jsx(Qe.span,{"aria-hidden":!0,...r,ref:t}):null});oq.displayName=iq;var y6="SelectScrollUpButton",aq=b.forwardRef((e,t)=>{const n=hl(y6,e.__scopeSelect),r=ZP(y6,e.__scopeSelect),[i,o]=b.useState(!1),a=kt(t,r.onScrollButtonChange);return Pr(()=>{if(n.viewport&&n.isPositioned){let u=function(){const l=s.scrollTop>0;o(l)};const s=n.viewport;return u(),s.addEventListener("scroll",u),()=>s.removeEventListener("scroll",u)}},[n.viewport,n.isPositioned]),i?R.jsx(sq,{...e,ref:a,onAutoScroll:()=>{const{viewport:u,selectedItem:s}=n;u&&s&&(u.scrollTop=u.scrollTop-s.offsetHeight)}}):null});aq.displayName=y6;var b6="SelectScrollDownButton",uq=b.forwardRef((e,t)=>{const n=hl(b6,e.__scopeSelect),r=ZP(b6,e.__scopeSelect),[i,o]=b.useState(!1),a=kt(t,r.onScrollButtonChange);return Pr(()=>{if(n.viewport&&n.isPositioned){let u=function(){const l=s.scrollHeight-s.clientHeight,c=Math.ceil(s.scrollTop)s.removeEventListener("scroll",u)}},[n.viewport,n.isPositioned]),i?R.jsx(sq,{...e,ref:a,onAutoScroll:()=>{const{viewport:u,selectedItem:s}=n;u&&s&&(u.scrollTop=u.scrollTop+s.offsetHeight)}}):null});uq.displayName=b6;var sq=b.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...i}=e,o=hl("SelectScrollButton",n),a=b.useRef(null),u=Px(n),s=b.useCallback(()=>{a.current!==null&&(window.clearInterval(a.current),a.current=null)},[]);return b.useEffect(()=>()=>s(),[s]),Pr(()=>{u().find(c=>c.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[u]),R.jsx(Qe.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:De(i.onPointerDown,()=>{a.current===null&&(a.current=window.setInterval(r,50))}),onPointerMove:De(i.onPointerMove,()=>{o.onItemLeave?.(),a.current===null&&(a.current=window.setInterval(r,50))}),onPointerLeave:De(i.onPointerLeave,()=>{s()})})}),qNe="SelectSeparator",lq=b.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return R.jsx(Qe.div,{"aria-hidden":!0,...r,ref:t})});lq.displayName=qNe;var w6="SelectArrow",GNe=b.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=kx(n),o=dl(w6,n),a=hl(w6,n);return o.open&&a.position==="popper"?R.jsx(Sw,{...i,...r,ref:t}):null});GNe.displayName=w6;function cq(e){return e===""||e===void 0}var fq=b.forwardRef((e,t)=>{const{value:n,...r}=e,i=b.useRef(null),o=kt(t,i),a=YP(n);return b.useEffect(()=>{const u=i.current,s=window.HTMLSelectElement.prototype,c=Object.getOwnPropertyDescriptor(s,"value").set;if(a!==n&&c){const d=new Event("change",{bubbles:!0});c.call(u,n),u.dispatchEvent(d)}},[a,n]),R.jsx(NO,{asChild:!0,children:R.jsx("select",{...r,ref:o,defaultValue:n})})});fq.displayName="BubbleSelect";function dq(e){const t=ko(e),n=b.useRef(""),r=b.useRef(0),i=b.useCallback(a=>{const u=n.current+a;t(u),function s(l){n.current=l,window.clearTimeout(r.current),l!==""&&(r.current=window.setTimeout(()=>s(""),1e3))}(u)},[t]),o=b.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return b.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,o]}function hq(e,t,n){const i=t.length>1&&Array.from(t).every(l=>l===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let a=KNe(e,Math.max(o,0));i.length===1&&(a=a.filter(l=>l!==n));const s=a.find(l=>l.textValue.toLowerCase().startsWith(i.toLowerCase()));return s!==n?s:void 0}function KNe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var oKe=jH,aKe=zH,uKe=WH,sKe=VH,lKe=HH,cKe=qH,fKe=ZH,dKe=QH,hKe=eq,pKe=nq,mKe=rq,gKe=oq,vKe=aq,yKe=uq,bKe=lq;const XP=6048e5,YNe=864e5,w7=Symbol.for("constructDateFrom");function mr(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&w7 in e?e[w7](t):e instanceof Date?new e.constructor(t):new Date(t)}function Yt(e,t){return mr(t||e,e)}function Xr(e,t,n){const r=Yt(e,n?.in);return isNaN(t)?mr(n?.in||e,NaN):(t&&r.setDate(r.getDate()+t),r)}function ca(e,t,n){const r=Yt(e,n?.in);if(isNaN(t))return mr(n?.in||e,NaN);if(!t)return r;const i=r.getDate(),o=mr(n?.in||e,r.getTime());o.setMonth(r.getMonth()+t+1,0);const a=o.getDate();return i>=a?o:(r.setFullYear(o.getFullYear(),o.getMonth(),i),r)}let ZNe={};function ag(){return ZNe}function Wa(e,t){const n=ag(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=Yt(e,t?.in),o=i.getDay(),a=(o=o.getTime()?r+1:n.getTime()>=u.getTime()?r:r-1}function Mb(e){const t=Yt(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function xh(e,...t){const n=mr.bind(null,e||t.find(r=>typeof r=="object"));return t.map(n)}function kc(e,t){const n=Yt(e,t?.in);return n.setHours(0,0,0,0),n}function Ta(e,t,n){const[r,i]=xh(n?.in,e,t),o=kc(r),a=kc(i),u=+o-Mb(o),s=+a-Mb(a);return Math.round((u-s)/YNe)}function XNe(e,t){const n=pq(e,t),r=mr(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),Pc(r)}function x6(e,t,n){return Xr(e,t*7,n)}function QNe(e,t,n){return ca(e,t*12,n)}function JNe(e,t){let n,r=t?.in;return e.forEach(i=>{!r&&typeof i=="object"&&(r=mr.bind(null,i));const o=Yt(i,r);(!n||n{!r&&typeof i=="object"&&(r=mr.bind(null,i));const o=Yt(i,r);(!n||n>o||isNaN(+o))&&(n=o)}),mr(r,n||NaN)}function gi(e,t,n){const[r,i]=xh(n?.in,e,t);return+kc(r)==+kc(i)}function QP(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function tFe(e){return!(!QP(e)&&typeof e!="number"||isNaN(+Yt(e)))}function wm(e,t,n){const[r,i]=xh(n?.in,e,t),o=r.getFullYear()-i.getFullYear(),a=r.getMonth()-i.getMonth();return o*12+a}function nFe(e,t,n){const[r,i]=xh(n?.in,e,t),o=Wa(r,n),a=Wa(i,n),u=+o-Mb(o),s=+a-Mb(a);return Math.round((u-s)/XP)}function JP(e,t){const n=Yt(e,t?.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function _i(e,t){const n=Yt(e,t?.in);return n.setDate(1),n.setHours(0,0,0,0),n}function mq(e,t){const n=Yt(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function e4(e,t){const n=ag(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=Yt(e,t?.in),o=i.getDay(),a=(o{let r;const i=rFe[e];return typeof i=="string"?r=i:t===1?r=i.one:r=i.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function MS(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const oFe={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},aFe={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},uFe={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},sFe={date:MS({formats:oFe,defaultWidth:"full"}),time:MS({formats:aFe,defaultWidth:"full"}),dateTime:MS({formats:uFe,defaultWidth:"full"})},lFe={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},cFe=(e,t,n,r)=>lFe[e];function dp(e){return(t,n)=>{const r=n?.context?String(n.context):"standalone";let i;if(r==="formatting"&&e.formattingValues){const a=e.defaultFormattingWidth||e.defaultWidth,u=n?.width?String(n.width):a;i=e.formattingValues[u]||e.formattingValues[a]}else{const a=e.defaultWidth,u=n?.width?String(n.width):e.defaultWidth;i=e.values[u]||e.values[a]}const o=e.argumentCallback?e.argumentCallback(t):t;return i[o]}}const fFe={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},dFe={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},hFe={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},pFe={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},mFe={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},gFe={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},vFe=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},yFe={ordinalNumber:vFe,era:dp({values:fFe,defaultWidth:"wide"}),quarter:dp({values:dFe,defaultWidth:"wide",argumentCallback:e=>e-1}),month:dp({values:hFe,defaultWidth:"wide"}),day:dp({values:pFe,defaultWidth:"wide"}),dayPeriod:dp({values:mFe,defaultWidth:"wide",formattingValues:gFe,defaultFormattingWidth:"wide"})};function hp(e){return(t,n={})=>{const r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],o=t.match(i);if(!o)return null;const a=o[0],u=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],s=Array.isArray(u)?wFe(u,d=>d.test(a)):bFe(u,d=>d.test(a));let l;l=e.valueCallback?e.valueCallback(s):s,l=n.valueCallback?n.valueCallback(l):l;const c=t.slice(a.length);return{value:l,rest:c}}}function bFe(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function wFe(e,t){for(let n=0;n{const r=t.match(e.matchPattern);if(!r)return null;const i=r[0],o=t.match(e.parsePattern);if(!o)return null;let a=e.valueCallback?e.valueCallback(o[0]):o[0];a=n.valueCallback?n.valueCallback(a):a;const u=t.slice(i.length);return{value:a,rest:u}}}const _Fe=/^(\d+)(th|st|nd|rd)?/i,SFe=/\d+/i,CFe={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},EFe={any:[/^b/i,/^(a|c)/i]},AFe={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},OFe={any:[/1/i,/2/i,/3/i,/4/i]},PFe={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},kFe={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},TFe={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},MFe={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},RFe={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},DFe={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},$Fe={ordinalNumber:xFe({matchPattern:_Fe,parsePattern:SFe,valueCallback:e=>parseInt(e,10)}),era:hp({matchPatterns:CFe,defaultMatchWidth:"wide",parsePatterns:EFe,defaultParseWidth:"any"}),quarter:hp({matchPatterns:AFe,defaultMatchWidth:"wide",parsePatterns:OFe,defaultParseWidth:"any",valueCallback:e=>e+1}),month:hp({matchPatterns:PFe,defaultMatchWidth:"wide",parsePatterns:kFe,defaultParseWidth:"any"}),day:hp({matchPatterns:TFe,defaultMatchWidth:"wide",parsePatterns:MFe,defaultParseWidth:"any"}),dayPeriod:hp({matchPatterns:RFe,defaultMatchWidth:"any",parsePatterns:DFe,defaultParseWidth:"any"})},vq={code:"en-US",formatDistance:iFe,formatLong:sFe,formatRelative:cFe,localize:yFe,match:$Fe,options:{weekStartsOn:0,firstWeekContainsDate:1}};function IFe(e,t){const n=Yt(e,t?.in);return Ta(n,mq(n))+1}function yq(e,t){const n=Yt(e,t?.in),r=+Pc(n)-+XNe(n);return Math.round(r/XP)+1}function bq(e,t){const n=Yt(e,t?.in),r=n.getFullYear(),i=ag(),o=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,a=mr(t?.in||e,0);a.setFullYear(r+1,0,o),a.setHours(0,0,0,0);const u=Wa(a,t),s=mr(t?.in||e,0);s.setFullYear(r,0,o),s.setHours(0,0,0,0);const l=Wa(s,t);return+n>=+u?r+1:+n>=+l?r:r-1}function NFe(e,t){const n=ag(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,i=bq(e,t),o=mr(t?.in||e,0);return o.setFullYear(i,0,r),o.setHours(0,0,0,0),Wa(o,t)}function wq(e,t){const n=Yt(e,t?.in),r=+Wa(n,t)-+NFe(n,t);return Math.round(r/XP)+1}function Gt(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const fs={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return Gt(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):Gt(n+1,2)},d(e,t){return Gt(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return Gt(e.getHours()%12||12,t.length)},H(e,t){return Gt(e.getHours(),t.length)},m(e,t){return Gt(e.getMinutes(),t.length)},s(e,t){return Gt(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),i=Math.trunc(r*Math.pow(10,n-3));return Gt(i,t.length)}},bf={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},x7={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),i=r>0?r:1-r;return n.ordinalNumber(i,{unit:"year"})}return fs.y(e,t)},Y:function(e,t,n,r){const i=bq(e,r),o=i>0?i:1-i;if(t==="YY"){const a=o%100;return Gt(a,2)}return t==="Yo"?n.ordinalNumber(o,{unit:"year"}):Gt(o,t.length)},R:function(e,t){const n=pq(e);return Gt(n,t.length)},u:function(e,t){const n=e.getFullYear();return Gt(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return Gt(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return Gt(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return fs.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return Gt(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const i=wq(e,r);return t==="wo"?n.ordinalNumber(i,{unit:"week"}):Gt(i,t.length)},I:function(e,t,n){const r=yq(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):Gt(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):fs.d(e,t)},D:function(e,t,n){const r=IFe(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):Gt(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const i=e.getDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return Gt(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});case"eeee":default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const i=e.getDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return Gt(o,t.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});case"cccc":default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),i=r===0?7:r;switch(t){case"i":return String(i);case"ii":return Gt(i,t.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const i=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let i;switch(r===12?i=bf.noon:r===0?i=bf.midnight:i=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let i;switch(r>=17?i=bf.evening:r>=12?i=bf.afternoon:r>=4?i=bf.morning:i=bf.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return fs.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):fs.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):Gt(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):Gt(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):fs.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):fs.s(e,t)},S:function(e,t){return fs.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return S7(r);case"XXXX":case"XX":return Fl(r);case"XXXXX":case"XXX":default:return Fl(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return S7(r);case"xxxx":case"xx":return Fl(r);case"xxxxx":case"xxx":default:return Fl(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+_7(r,":");case"OOOO":default:return"GMT"+Fl(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+_7(r,":");case"zzzz":default:return"GMT"+Fl(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return Gt(r,t.length)},T:function(e,t,n){return Gt(+e,t.length)}};function _7(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Math.trunc(r/60),o=r%60;return o===0?n+String(i):n+String(i)+t+Gt(o,2)}function S7(e,t){return e%60===0?(e>0?"-":"+")+Gt(Math.abs(e)/60,2):Fl(e,t)}function Fl(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Gt(Math.trunc(r/60),2),o=Gt(r%60,2);return n+i+t+o}const C7=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},xq=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},FFe=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return C7(e,t);let o;switch(r){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;case"PPPP":default:o=t.dateTime({width:"full"});break}return o.replace("{{date}}",C7(r,t)).replace("{{time}}",xq(i,t))},LFe={p:xq,P:FFe},jFe=/^D+$/,BFe=/^Y+$/,zFe=["D","DD","YY","YYYY"];function UFe(e){return jFe.test(e)}function WFe(e){return BFe.test(e)}function VFe(e,t,n){const r=HFe(e,t,n);if(console.warn(r),zFe.includes(e))throw new RangeError(r)}function HFe(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const qFe=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,GFe=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,KFe=/^'([^]*?)'?$/,YFe=/''/g,ZFe=/[a-zA-Z]/;function Wc(e,t,n){const r=ag(),i=n?.locale??r.locale??vq,o=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,a=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,u=Yt(e,n?.in);if(!tFe(u))throw new RangeError("Invalid time value");let s=t.match(GFe).map(c=>{const d=c[0];if(d==="p"||d==="P"){const h=LFe[d];return h(c,i.formatLong)}return c}).join("").match(qFe).map(c=>{if(c==="''")return{isToken:!1,value:"'"};const d=c[0];if(d==="'")return{isToken:!1,value:XFe(c)};if(x7[d])return{isToken:!0,value:c};if(d.match(ZFe))throw new RangeError("Format string contains an unescaped latin alphabet character `"+d+"`");return{isToken:!1,value:c}});i.localize.preprocessor&&(s=i.localize.preprocessor(u,s));const l={firstWeekContainsDate:o,weekStartsOn:a,locale:i};return s.map(c=>{if(!c.isToken)return c.value;const d=c.value;(!n?.useAdditionalWeekYearTokens&&WFe(d)||!n?.useAdditionalDayOfYearTokens&&UFe(d))&&VFe(d,t,String(e));const h=x7[d[0]];return h(u,d,i.localize,l)}).join("")}function XFe(e){const t=e.match(KFe);return t?t[1].replace(YFe,"'"):e}function QFe(e,t){const n=Yt(e,t?.in),r=n.getFullYear(),i=n.getMonth(),o=mr(n,0);return o.setFullYear(r,i+1,0),o.setHours(0,0,0,0),o.getDate()}function JFe(e){return Math.trunc(+Yt(e)/1e3)}function eLe(e,t){const n=Yt(e,t?.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(0,0,0,0),Yt(n,t?.in)}function tLe(e,t){const n=Yt(e,t?.in);return nFe(eLe(n,t),_i(n,t),t)+1}function _6(e,t){return+Yt(e)>+Yt(t)}function _q(e,t){return+Yt(e)<+Yt(t)}function t4(e,t,n){const[r,i]=xh(n?.in,e,t);return r.getFullYear()===i.getFullYear()&&r.getMonth()===i.getMonth()}function nLe(e,t,n){const[r,i]=xh(n?.in,e,t);return r.getFullYear()===i.getFullYear()}function RS(e,t,n){return Xr(e,-t,n)}function DS(e,t,n){const r=Yt(e,n?.in),i=r.getFullYear(),o=r.getDate(),a=mr(e,0);a.setFullYear(i,t,15),a.setHours(0,0,0,0);const u=QFe(a);return r.setMonth(t,Math.min(o,u)),r}function E7(e,t,n){const r=Yt(e,n?.in);return isNaN(+r)?mr(e,NaN):(r.setFullYear(t),r)}function wKe(e){return kc(Date.now(),e)}var at=function(){return at=Object.assign||function(t){for(var n,r=1,i=arguments.length;r1&&(s||!l),d=t>1&&(l||!s),h=function(){r&&o(r)},m=function(){i&&o(i)};return R.jsx(ILe,{displayMonth:e.displayMonth,hideNext:c,hidePrevious:d,nextMonth:i,previousMonth:r,onPreviousClick:h,onNextClick:m})}function NLe(e){var t,n=hn(),r=n.classNames,i=n.disableNavigation,o=n.styles,a=n.captionLayout,u=n.components,s=(t=u?.CaptionLabel)!==null&&t!==void 0?t:Eq,l;return i?l=R.jsx(s,{id:e.id,displayMonth:e.displayMonth}):a==="dropdown"?l=R.jsx(A7,{displayMonth:e.displayMonth,id:e.id}):a==="dropdown-buttons"?l=R.jsxs(R.Fragment,{children:[R.jsx(A7,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id}),R.jsx(O7,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id})]}):l=R.jsxs(R.Fragment,{children:[R.jsx(s,{id:e.id,displayMonth:e.displayMonth,displayIndex:e.displayIndex}),R.jsx(O7,{displayMonth:e.displayMonth,id:e.id})]}),R.jsx("div",{className:r.caption,style:o.caption,children:l})}function FLe(e){var t=hn(),n=t.footer,r=t.styles,i=t.classNames.tfoot;return n?R.jsx("tfoot",{className:i,style:r.tfoot,children:R.jsx("tr",{children:R.jsx("td",{colSpan:8,children:n})})}):R.jsx(R.Fragment,{})}function LLe(e,t,n){for(var r=n?Pc(new Date):Wa(new Date,{locale:e,weekStartsOn:t}),i=[],o=0;o<7;o++){var a=Xr(r,o);i.push(a)}return i}function jLe(){var e=hn(),t=e.classNames,n=e.styles,r=e.showWeekNumber,i=e.locale,o=e.weekStartsOn,a=e.ISOWeek,u=e.formatters.formatWeekdayName,s=e.labels.labelWeekday,l=LLe(i,o,a);return R.jsxs("tr",{style:n.head_row,className:t.head_row,children:[r&&R.jsx("td",{style:n.head_cell,className:t.head_cell}),l.map(function(c,d){return R.jsx("th",{scope:"col",className:t.head_cell,style:n.head_cell,"aria-label":s(c,{locale:i}),children:u(c,{locale:i})},d)})]})}function BLe(){var e,t=hn(),n=t.classNames,r=t.styles,i=t.components,o=(e=i?.HeadRow)!==null&&e!==void 0?e:jLe;return R.jsx("thead",{style:r.head,className:n.head,children:R.jsx(o,{})})}function zLe(e){var t=hn(),n=t.locale,r=t.formatters.formatDay;return R.jsx(R.Fragment,{children:r(e.date,{locale:n})})}var n4=b.createContext(void 0);function ULe(e){if(!ug(e.initialProps)){var t={selected:void 0,modifiers:{disabled:[]}};return R.jsx(n4.Provider,{value:t,children:e.children})}return R.jsx(WLe,{initialProps:e.initialProps,children:e.children})}function WLe(e){var t=e.initialProps,n=e.children,r=t.selected,i=t.min,o=t.max,a=function(l,c,d){var h,m;(h=t.onDayClick)===null||h===void 0||h.call(t,l,c,d);var g=!!(c.selected&&i&&r?.length===i);if(!g){var v=!!(!c.selected&&o&&r?.length===o);if(!v){var y=r?Sq([],r):[];if(c.selected){var x=y.findIndex(function(w){return gi(l,w)});y.splice(x,1)}else y.push(l);(m=t.onSelect)===null||m===void 0||m.call(t,y,l,c,d)}}},u={disabled:[]};r&&u.disabled.push(function(l){var c=o&&r.length>o-1,d=r.some(function(h){return gi(h,l)});return!!(c&&!d)});var s={selected:r,onDayClick:a,modifiers:u};return R.jsx(n4.Provider,{value:s,children:n})}function r4(){var e=b.useContext(n4);if(!e)throw new Error("useSelectMultiple must be used within a SelectMultipleProvider");return e}function VLe(e,t){var n=t||{},r=n.from,i=n.to;return r&&i?gi(i,e)&&gi(r,e)?void 0:gi(i,e)?{from:i,to:void 0}:gi(r,e)?void 0:_6(r,e)?{from:e,to:i}:{from:r,to:e}:i?_6(e,i)?{from:i,to:e}:{from:e,to:i}:r?_q(e,r)?{from:e,to:r}:{from:r,to:e}:{from:e,to:void 0}}var i4=b.createContext(void 0);function HLe(e){if(!sg(e.initialProps)){var t={selected:void 0,modifiers:{range_start:[],range_end:[],range_middle:[],disabled:[]}};return R.jsx(i4.Provider,{value:t,children:e.children})}return R.jsx(qLe,{initialProps:e.initialProps,children:e.children})}function qLe(e){var t=e.initialProps,n=e.children,r=t.selected,i=r||{},o=i.from,a=i.to,u=t.min,s=t.max,l=function(m,g,v){var y,x;(y=t.onDayClick)===null||y===void 0||y.call(t,m,g,v);var w=VLe(m,r);(x=t.onSelect)===null||x===void 0||x.call(t,w,m,g,v)},c={range_start:[],range_end:[],range_middle:[],disabled:[]};if(o?(c.range_start=[o],a?(c.range_end=[a],gi(o,a)||(c.range_middle=[{after:o,before:a}])):c.range_end=[o]):a&&(c.range_start=[a],c.range_end=[a]),u&&(o&&!a&&c.disabled.push({after:RS(o,u-1),before:Xr(o,u-1)}),o&&a&&c.disabled.push({after:o,before:Xr(o,u-1)}),!o&&a&&c.disabled.push({after:RS(a,u-1),before:Xr(a,u-1)})),s){if(o&&!a&&(c.disabled.push({before:Xr(o,-s+1)}),c.disabled.push({after:Xr(o,s-1)})),o&&a){var d=Ta(a,o)+1,h=s-d;c.disabled.push({before:RS(o,h)}),c.disabled.push({after:Xr(a,h)})}!o&&a&&(c.disabled.push({before:Xr(a,-s+1)}),c.disabled.push({after:Xr(a,s-1)}))}return R.jsx(i4.Provider,{value:{selected:r,onDayClick:l,modifiers:c},children:n})}function o4(){var e=b.useContext(i4);if(!e)throw new Error("useSelectRange must be used within a SelectRangeProvider");return e}function Cy(e){return Array.isArray(e)?Sq([],e):e!==void 0?[e]:[]}function GLe(e){var t={};return Object.entries(e).forEach(function(n){var r=n[0],i=n[1];t[r]=Cy(i)}),t}var fa;(function(e){e.Outside="outside",e.Disabled="disabled",e.Selected="selected",e.Hidden="hidden",e.Today="today",e.RangeStart="range_start",e.RangeEnd="range_end",e.RangeMiddle="range_middle"})(fa||(fa={}));var KLe=fa.Selected,uu=fa.Disabled,YLe=fa.Hidden,ZLe=fa.Today,$S=fa.RangeEnd,IS=fa.RangeMiddle,NS=fa.RangeStart,XLe=fa.Outside;function QLe(e,t,n){var r,i=(r={},r[KLe]=Cy(e.selected),r[uu]=Cy(e.disabled),r[YLe]=Cy(e.hidden),r[ZLe]=[e.today],r[$S]=[],r[IS]=[],r[NS]=[],r[XLe]=[],r);return e.fromDate&&i[uu].push({before:e.fromDate}),e.toDate&&i[uu].push({after:e.toDate}),ug(e)?i[uu]=i[uu].concat(t.modifiers[uu]):sg(e)&&(i[uu]=i[uu].concat(n.modifiers[uu]),i[NS]=n.modifiers[NS],i[IS]=n.modifiers[IS],i[$S]=n.modifiers[$S]),i}var Pq=b.createContext(void 0);function JLe(e){var t=hn(),n=r4(),r=o4(),i=QLe(t,n,r),o=GLe(t.modifiers),a=at(at({},i),o);return R.jsx(Pq.Provider,{value:a,children:e.children})}function kq(){var e=b.useContext(Pq);if(!e)throw new Error("useModifiers must be used within a ModifiersProvider");return e}function eje(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function tje(e){return!!(e&&typeof e=="object"&&"from"in e)}function nje(e){return!!(e&&typeof e=="object"&&"after"in e)}function rje(e){return!!(e&&typeof e=="object"&&"before"in e)}function ije(e){return!!(e&&typeof e=="object"&&"dayOfWeek"in e)}function oje(e,t){var n,r=t.from,i=t.to;if(r&&i){var o=Ta(i,r)<0;o&&(n=[i,r],r=n[0],i=n[1]);var a=Ta(e,r)>=0&&Ta(i,e)>=0;return a}return i?gi(i,e):r?gi(r,e):!1}function aje(e){return QP(e)}function uje(e){return Array.isArray(e)&&e.every(QP)}function sje(e,t){return t.some(function(n){if(typeof n=="boolean")return n;if(aje(n))return gi(e,n);if(uje(n))return n.includes(e);if(tje(n))return oje(e,n);if(ije(n))return n.dayOfWeek.includes(e.getDay());if(eje(n)){var r=Ta(n.before,e),i=Ta(n.after,e),o=r>0,a=i<0,u=_6(n.before,n.after);return u?a&&o:o||a}return nje(n)?Ta(e,n.after)>0:rje(n)?Ta(n.before,e)>0:typeof n=="function"?n(e):!1})}function a4(e,t,n){var r=Object.keys(t).reduce(function(o,a){var u=t[a];return sje(e,u)&&o.push(a),o},[]),i={};return r.forEach(function(o){return i[o]=!0}),n&&!t4(e,n)&&(i.outside=!0),i}function lje(e,t){for(var n=_i(e[0]),r=JP(e[e.length-1]),i,o,a=n;a<=r;){var u=a4(a,t),s=!u.disabled&&!u.hidden;if(!s){a=Xr(a,1);continue}if(u.selected)return a;u.today&&!o&&(o=a),i||(i=a),a=Xr(a,1)}return o||i}var cje=365;function Tq(e,t){var n=t.moveBy,r=t.direction,i=t.context,o=t.modifiers,a=t.retry,u=a===void 0?{count:0,lastFocused:e}:a,s=i.weekStartsOn,l=i.fromDate,c=i.toDate,d=i.locale,h={day:Xr,week:x6,month:ca,year:QNe,startOfWeek:function(y){return i.ISOWeek?Pc(y):Wa(y,{locale:d,weekStartsOn:s})},endOfWeek:function(y){return i.ISOWeek?gq(y):e4(y,{locale:d,weekStartsOn:s})}},m=h[n](e,r==="after"?1:-1);r==="before"&&l?m=JNe([l,m]):r==="after"&&c&&(m=eFe([c,m]));var g=!0;if(o){var v=a4(m,o);g=!v.disabled&&!v.hidden}return g?m:u.count>cje?u.lastFocused:Tq(m,{moveBy:n,direction:r,context:i,modifiers:o,retry:at(at({},u),{count:u.count+1})})}var Mq=b.createContext(void 0);function fje(e){var t=lg(),n=kq(),r=b.useState(),i=r[0],o=r[1],a=b.useState(),u=a[0],s=a[1],l=lje(t.displayMonths,n),c=i??(u&&t.isDateDisplayed(u))?u:l,d=function(){s(i),o(void 0)},h=function(y){o(y)},m=hn(),g=function(y,x){if(i){var w=Tq(i,{moveBy:y,direction:x,context:m,modifiers:n});gi(i,w)||(t.goToDate(w,i),h(w))}},v={focusedDay:i,focusTarget:c,blur:d,focus:h,focusDayAfter:function(){return g("day","after")},focusDayBefore:function(){return g("day","before")},focusWeekAfter:function(){return g("week","after")},focusWeekBefore:function(){return g("week","before")},focusMonthBefore:function(){return g("month","before")},focusMonthAfter:function(){return g("month","after")},focusYearBefore:function(){return g("year","before")},focusYearAfter:function(){return g("year","after")},focusStartOfWeek:function(){return g("startOfWeek","before")},focusEndOfWeek:function(){return g("endOfWeek","after")}};return R.jsx(Mq.Provider,{value:v,children:e.children})}function u4(){var e=b.useContext(Mq);if(!e)throw new Error("useFocusContext must be used within a FocusProvider");return e}function dje(e,t){var n=kq(),r=a4(e,n,t);return r}var s4=b.createContext(void 0);function hje(e){if(!Tx(e.initialProps)){var t={selected:void 0};return R.jsx(s4.Provider,{value:t,children:e.children})}return R.jsx(pje,{initialProps:e.initialProps,children:e.children})}function pje(e){var t=e.initialProps,n=e.children,r=function(o,a,u){var s,l,c;if((s=t.onDayClick)===null||s===void 0||s.call(t,o,a,u),a.selected&&!t.required){(l=t.onSelect)===null||l===void 0||l.call(t,void 0,o,a,u);return}(c=t.onSelect)===null||c===void 0||c.call(t,o,o,a,u)},i={selected:t.selected,onDayClick:r};return R.jsx(s4.Provider,{value:i,children:n})}function Rq(){var e=b.useContext(s4);if(!e)throw new Error("useSelectSingle must be used within a SelectSingleProvider");return e}function mje(e,t){var n=hn(),r=Rq(),i=r4(),o=o4(),a=u4(),u=a.focusDayAfter,s=a.focusDayBefore,l=a.focusWeekAfter,c=a.focusWeekBefore,d=a.blur,h=a.focus,m=a.focusMonthBefore,g=a.focusMonthAfter,v=a.focusYearBefore,y=a.focusYearAfter,x=a.focusStartOfWeek,w=a.focusEndOfWeek,S=function(j){var I,z,U,X;Tx(n)?(I=r.onDayClick)===null||I===void 0||I.call(r,e,t,j):ug(n)?(z=i.onDayClick)===null||z===void 0||z.call(i,e,t,j):sg(n)?(U=o.onDayClick)===null||U===void 0||U.call(o,e,t,j):(X=n.onDayClick)===null||X===void 0||X.call(n,e,t,j)},A=function(j){var I;h(e),(I=n.onDayFocus)===null||I===void 0||I.call(n,e,t,j)},E=function(j){var I;d(),(I=n.onDayBlur)===null||I===void 0||I.call(n,e,t,j)},C=function(j){var I;(I=n.onDayMouseEnter)===null||I===void 0||I.call(n,e,t,j)},P=function(j){var I;(I=n.onDayMouseLeave)===null||I===void 0||I.call(n,e,t,j)},k=function(j){var I;(I=n.onDayPointerEnter)===null||I===void 0||I.call(n,e,t,j)},M=function(j){var I;(I=n.onDayPointerLeave)===null||I===void 0||I.call(n,e,t,j)},L=function(j){var I;(I=n.onDayTouchCancel)===null||I===void 0||I.call(n,e,t,j)},B=function(j){var I;(I=n.onDayTouchEnd)===null||I===void 0||I.call(n,e,t,j)},F=function(j){var I;(I=n.onDayTouchMove)===null||I===void 0||I.call(n,e,t,j)},Y=function(j){var I;(I=n.onDayTouchStart)===null||I===void 0||I.call(n,e,t,j)},H=function(j){var I;(I=n.onDayKeyUp)===null||I===void 0||I.call(n,e,t,j)},W=function(j){var I;switch(j.key){case"ArrowLeft":j.preventDefault(),j.stopPropagation(),n.dir==="rtl"?u():s();break;case"ArrowRight":j.preventDefault(),j.stopPropagation(),n.dir==="rtl"?s():u();break;case"ArrowDown":j.preventDefault(),j.stopPropagation(),l();break;case"ArrowUp":j.preventDefault(),j.stopPropagation(),c();break;case"PageUp":j.preventDefault(),j.stopPropagation(),j.shiftKey?v():m();break;case"PageDown":j.preventDefault(),j.stopPropagation(),j.shiftKey?y():g();break;case"Home":j.preventDefault(),j.stopPropagation(),x();break;case"End":j.preventDefault(),j.stopPropagation(),w();break}(I=n.onDayKeyDown)===null||I===void 0||I.call(n,e,t,j)},V={onClick:S,onFocus:A,onBlur:E,onKeyDown:W,onKeyUp:H,onMouseEnter:C,onMouseLeave:P,onPointerEnter:k,onPointerLeave:M,onTouchCancel:L,onTouchEnd:B,onTouchMove:F,onTouchStart:Y};return V}function gje(){var e=hn(),t=Rq(),n=r4(),r=o4(),i=Tx(e)?t.selected:ug(e)?n.selected:sg(e)?r.selected:void 0;return i}function vje(e){return Object.values(fa).includes(e)}function yje(e,t){var n=[e.classNames.day];return Object.keys(t).forEach(function(r){var i=e.modifiersClassNames[r];if(i)n.push(i);else if(vje(r)){var o=e.classNames["day_".concat(r)];o&&n.push(o)}}),n}function bje(e,t){var n=at({},e.styles.day);return Object.keys(t).forEach(function(r){var i;n=at(at({},n),(i=e.modifiersStyles)===null||i===void 0?void 0:i[r])}),n}function wje(e,t,n){var r,i,o,a=hn(),u=u4(),s=dje(e,t),l=mje(e,s),c=gje(),d=!!(a.onDayClick||a.mode!=="default");b.useEffect(function(){var C;s.outside||u.focusedDay&&d&&gi(u.focusedDay,e)&&((C=n.current)===null||C===void 0||C.focus())},[u.focusedDay,e,n,d,s.outside]);var h=yje(a,s).join(" "),m=bje(a,s),g=!!(s.outside&&!a.showOutsideDays||s.hidden),v=(o=(i=a.components)===null||i===void 0?void 0:i.DayContent)!==null&&o!==void 0?o:zLe,y=R.jsx(v,{date:e,displayMonth:t,activeModifiers:s}),x={style:m,className:h,children:y,role:"gridcell"},w=u.focusTarget&&gi(u.focusTarget,e)&&!s.outside,S=u.focusedDay&&gi(u.focusedDay,e),A=at(at(at({},x),(r={disabled:s.disabled,role:"gridcell"},r["aria-selected"]=s.selected,r.tabIndex=S||w?0:-1,r)),l),E={isButton:d,isHidden:g,activeModifiers:s,selectedDays:c,buttonProps:A,divProps:x};return E}function xje(e){var t=b.useRef(null),n=wje(e.date,e.displayMonth,t);return n.isHidden?R.jsx("div",{role:"gridcell"}):n.isButton?R.jsx(Rb,at({name:"day",ref:t},n.buttonProps)):R.jsx("div",at({},n.divProps))}function _je(e){var t=e.number,n=e.dates,r=hn(),i=r.onWeekNumberClick,o=r.styles,a=r.classNames,u=r.locale,s=r.labels.labelWeekNumber,l=r.formatters.formatWeekNumber,c=l(Number(t),{locale:u});if(!i)return R.jsx("span",{className:a.weeknumber,style:o.weeknumber,children:c});var d=s(Number(t),{locale:u}),h=function(m){i(t,n,m)};return R.jsx(Rb,{name:"week-number","aria-label":d,className:a.weeknumber,style:o.weeknumber,onClick:h,children:c})}function Sje(e){var t,n,r=hn(),i=r.styles,o=r.classNames,a=r.showWeekNumber,u=r.components,s=(t=u?.Day)!==null&&t!==void 0?t:xje,l=(n=u?.WeekNumber)!==null&&n!==void 0?n:_je,c;return a&&(c=R.jsx("td",{className:o.cell,style:i.cell,children:R.jsx(l,{number:e.weekNumber,dates:e.dates})})),R.jsxs("tr",{className:o.row,style:i.row,children:[c,e.dates.map(function(d){return R.jsx("td",{className:o.cell,style:i.cell,role:"presentation",children:R.jsx(s,{displayMonth:e.displayMonth,date:d})},JFe(d))})]})}function P7(e,t,n){for(var r=n?.ISOWeek?gq(t):e4(t,n),i=n?.ISOWeek?Pc(e):Wa(e,n),o=Ta(r,i),a=[],u=0;u<=o;u++)a.push(Xr(i,u));var s=a.reduce(function(l,c){var d=n?.ISOWeek?yq(c):wq(c,n),h=l.find(function(m){return m.weekNumber===d});return h?(h.dates.push(c),l):(l.push({weekNumber:d,dates:[c]}),l)},[]);return s}function Cje(e,t){var n=P7(_i(e),JP(e),t);if(t?.useFixedWeeks){var r=tLe(e,t);if(r<6){var i=n[n.length-1],o=i.dates[i.dates.length-1],a=x6(o,6-r),u=P7(x6(o,1),a,t);n.push.apply(n,u)}}return n}function Eje(e){var t,n,r,i=hn(),o=i.locale,a=i.classNames,u=i.styles,s=i.hideHead,l=i.fixedWeeks,c=i.components,d=i.weekStartsOn,h=i.firstWeekContainsDate,m=i.ISOWeek,g=Cje(e.displayMonth,{useFixedWeeks:!!l,ISOWeek:m,locale:o,weekStartsOn:d,firstWeekContainsDate:h}),v=(t=c?.Head)!==null&&t!==void 0?t:BLe,y=(n=c?.Row)!==null&&n!==void 0?n:Sje,x=(r=c?.Footer)!==null&&r!==void 0?r:FLe;return R.jsxs("table",{id:e.id,className:a.table,style:u.table,role:"grid","aria-labelledby":e["aria-labelledby"],children:[!s&&R.jsx(v,{}),R.jsx("tbody",{className:a.tbody,style:u.tbody,children:g.map(function(w){return R.jsx(y,{displayMonth:e.displayMonth,dates:w.dates,weekNumber:w.weekNumber},w.weekNumber)})}),R.jsx(x,{displayMonth:e.displayMonth})]})}function Aje(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var Oje=Aje()?b.useLayoutEffect:b.useEffect,FS=!1,Pje=0;function k7(){return"react-day-picker-".concat(++Pje)}function kje(e){var t,n=e??(FS?k7():null),r=b.useState(n),i=r[0],o=r[1];return Oje(function(){i===null&&o(k7())},[]),b.useEffect(function(){FS===!1&&(FS=!0)},[]),(t=e??i)!==null&&t!==void 0?t:void 0}function Tje(e){var t,n,r=hn(),i=r.dir,o=r.classNames,a=r.styles,u=r.components,s=lg().displayMonths,l=kje(r.id?"".concat(r.id,"-").concat(e.displayIndex):void 0),c=r.id?"".concat(r.id,"-grid-").concat(e.displayIndex):void 0,d=[o.month],h=a.month,m=e.displayIndex===0,g=e.displayIndex===s.length-1,v=!m&&!g;i==="rtl"&&(t=[m,g],g=t[0],m=t[1]),m&&(d.push(o.caption_start),h=at(at({},h),a.caption_start)),g&&(d.push(o.caption_end),h=at(at({},h),a.caption_end)),v&&(d.push(o.caption_between),h=at(at({},h),a.caption_between));var y=(n=u?.Caption)!==null&&n!==void 0?n:NLe;return R.jsxs("div",{className:d.join(" "),style:h,children:[R.jsx(y,{id:l,displayMonth:e.displayMonth,displayIndex:e.displayIndex}),R.jsx(Eje,{id:c,"aria-labelledby":l,displayMonth:e.displayMonth})]},e.displayIndex)}function Mje(e){var t=hn(),n=t.classNames,r=t.styles;return R.jsx("div",{className:n.months,style:r.months,children:e.children})}function Rje(e){var t,n,r=e.initialProps,i=hn(),o=u4(),a=lg(),u=b.useState(!1),s=u[0],l=u[1];b.useEffect(function(){i.initialFocus&&o.focusTarget&&(s||(o.focus(o.focusTarget),l(!0)))},[i.initialFocus,s,o.focus,o.focusTarget,o]);var c=[i.classNames.root,i.className];i.numberOfMonths>1&&c.push(i.classNames.multiple_months),i.showWeekNumber&&c.push(i.classNames.with_weeknumber);var d=at(at({},i.styles.root),i.style),h=Object.keys(r).filter(function(g){return g.startsWith("data-")}).reduce(function(g,v){var y;return at(at({},g),(y={},y[v]=r[v],y))},{}),m=(n=(t=r.components)===null||t===void 0?void 0:t.Months)!==null&&n!==void 0?n:Mje;return R.jsx("div",at({className:c.join(" "),style:d,dir:i.dir,id:i.id,nonce:r.nonce,title:r.title,lang:r.lang},h,{children:R.jsx(m,{children:a.displayMonths.map(function(g,v){return R.jsx(Tje,{displayIndex:v,displayMonth:g},v)})})}))}function Dje(e){var t=e.children,n=rLe(e,["children"]);return R.jsx(_Le,{initialProps:n,children:R.jsx(RLe,{children:R.jsx(hje,{initialProps:n,children:R.jsx(ULe,{initialProps:n,children:R.jsx(HLe,{initialProps:n,children:R.jsx(JLe,{children:R.jsx(fje,{children:t})})})})})})})}function xKe(e){return R.jsx(Dje,at({},e,{children:R.jsx(Rje,{initialProps:e})}))}var l4="Popover",[Dq,_Ke]=ri(l4,[al]),cg=al(),[$je,pl]=Dq(l4),$q=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:o,modal:a=!1}=e,u=cg(t),s=b.useRef(null),[l,c]=b.useState(!1),[d=!1,h]=sa({prop:r,defaultProp:i,onChange:o});return R.jsx(xw,{...u,children:R.jsx($je,{scope:t,contentId:Hi(),triggerRef:s,open:d,onOpenChange:h,onOpenToggle:b.useCallback(()=>h(m=>!m),[h]),hasCustomAnchor:l,onCustomAnchorAdd:b.useCallback(()=>c(!0),[]),onCustomAnchorRemove:b.useCallback(()=>c(!1),[]),modal:a,children:n})})};$q.displayName=l4;var Iq="PopoverAnchor",Ije=b.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=pl(Iq,n),o=cg(n),{onCustomAnchorAdd:a,onCustomAnchorRemove:u}=i;return b.useEffect(()=>(a(),()=>u()),[a,u]),R.jsx(qm,{...o,...r,ref:t})});Ije.displayName=Iq;var Nq="PopoverTrigger",Fq=b.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=pl(Nq,n),o=cg(n),a=kt(t,i.triggerRef),u=R.jsx(Qe.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":Uq(i.open),...r,ref:a,onClick:De(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?u:R.jsx(qm,{asChild:!0,...o,children:u})});Fq.displayName=Nq;var c4="PopoverPortal",[Nje,Fje]=Dq(c4,{forceMount:void 0}),Lq=e=>{const{__scopePopover:t,forceMount:n,children:r,container:i}=e,o=pl(c4,t);return R.jsx(Nje,{scope:t,forceMount:n,children:R.jsx(Ci,{present:n||o.open,children:R.jsx(Um,{asChild:!0,container:i,children:r})})})};Lq.displayName=c4;var Vd="PopoverContent",jq=b.forwardRef((e,t)=>{const n=Fje(Vd,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,o=pl(Vd,e.__scopePopover);return R.jsx(Ci,{present:r||o.open,children:o.modal?R.jsx(Lje,{...i,ref:t}):R.jsx(jje,{...i,ref:t})})});jq.displayName=Vd;var Lje=b.forwardRef((e,t)=>{const n=pl(Vd,e.__scopePopover),r=b.useRef(null),i=kt(t,r),o=b.useRef(!1);return b.useEffect(()=>{const a=r.current;if(a)return Vm(a)},[]),R.jsx(Wm,{as:qs,allowPinchZoom:!0,children:R.jsx(Bq,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:De(e.onCloseAutoFocus,a=>{a.preventDefault(),o.current||n.triggerRef.current?.focus()}),onPointerDownOutside:De(e.onPointerDownOutside,a=>{const u=a.detail.originalEvent,s=u.button===0&&u.ctrlKey===!0,l=u.button===2||s;o.current=l},{checkForDefaultPrevented:!1}),onFocusOutside:De(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),jje=b.forwardRef((e,t)=>{const n=pl(Vd,e.__scopePopover),r=b.useRef(!1),i=b.useRef(!1);return R.jsx(Bq,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{e.onCloseAutoFocus?.(o),o.defaultPrevented||(r.current||n.triggerRef.current?.focus(),o.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:o=>{e.onInteractOutside?.(o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const a=o.target;n.triggerRef.current?.contains(a)&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&i.current&&o.preventDefault()}})}),Bq=b.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:o,disableOutsidePointerEvents:a,onEscapeKeyDown:u,onPointerDownOutside:s,onFocusOutside:l,onInteractOutside:c,...d}=e,h=pl(Vd,n),m=cg(n);return gw(),R.jsx(zm,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:o,children:R.jsx(th,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:c,onEscapeKeyDown:u,onPointerDownOutside:s,onFocusOutside:l,onDismiss:()=>h.onOpenChange(!1),children:R.jsx(_w,{"data-state":Uq(h.open),role:"dialog",id:h.contentId,...m,...d,ref:t,style:{...d.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),zq="PopoverClose",Bje=b.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=pl(zq,n);return R.jsx(Qe.button,{type:"button",...r,ref:t,onClick:De(e.onClick,()=>i.onOpenChange(!1))})});Bje.displayName=zq;var zje="PopoverArrow",Uje=b.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=cg(n);return R.jsx(Sw,{...i,...r,ref:t})});Uje.displayName=zje;function Uq(e){return e?"open":"closed"}var SKe=$q,CKe=Fq,EKe=Lq,AKe=jq,Db={exports:{}};/** + A `).concat(g,",").concat(g,",0,0,").concat(l,",").concat(t,",").concat(n+i-u*g," Z")}else c="M ".concat(t,",").concat(n," h ").concat(r," v ").concat(i," h ").concat(-r," Z");return c},zRe=function(t,n){if(!t||!n)return!1;var r=t.x,i=t.y,o=n.x,a=n.y,u=n.width,s=n.height;if(Math.abs(u)>0&&Math.abs(s)>0){var l=Math.min(o,o+u),c=Math.max(o,o+u),d=Math.min(a,a+s),h=Math.max(a,a+s);return r>=l&&r<=c&&i>=d&&i<=h}return!1},URe={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},JP=function(t){var n=D7(D7({},URe),t),r=y.useRef(),i=y.useState(-1),o=DRe(i,2),a=o[0],u=o[1];y.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var A=r.current.getTotalLength();A&&u(A)}catch{}},[]);var s=n.x,l=n.y,c=n.width,d=n.height,h=n.radius,v=n.className,g=n.animationEasing,m=n.animationDuration,b=n.animationBegin,w=n.isAnimationActive,x=n.isUpdateAnimationActive;if(s!==+s||l!==+l||c!==+c||d!==+d||c===0||d===0)return null;var S=cn("recharts-rectangle",v);return x?j.createElement(Ya,{canBegin:a>0,from:{width:c,height:d,x:s,y:l},to:{width:c,height:d,x:s,y:l},duration:m,animationEasing:g,isActive:x},function(A){var E=A.width,C=A.height,T=A.x,M=A.y;return j.createElement(Ya,{canBegin:a>0,from:"0px ".concat(a===-1?1:a,"px"),to:"".concat(a,"px 0px"),attributeName:"strokeDasharray",begin:b,duration:m,isActive:w,easing:g},j.createElement("path",kb({},Bt(n,!0),{className:S,d:$7(T,M,E,C,h),ref:r})))}):j.createElement("path",kb({},Bt(n,!0),{className:S,d:$7(s,l,c,d,h)}))};function n6(){return n6=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function YRe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var ZRe=function(t,n,r,i,o,a){return"M".concat(t,",").concat(o,"v").concat(i,"M").concat(a,",").concat(n,"h").concat(r)},XRe=function(t){var n=t.x,r=n===void 0?0:n,i=t.y,o=i===void 0?0:i,a=t.top,u=a===void 0?0:a,s=t.left,l=s===void 0?0:s,c=t.width,d=c===void 0?0:c,h=t.height,v=h===void 0?0:h,g=t.className,m=GRe(t,WRe),b=VRe({x:r,y:o,top:u,left:l,width:d,height:v},m);return!Ke(r)||!Ke(o)||!Ke(d)||!Ke(v)||!Ke(u)||!Ke(l)?null:j.createElement("path",r6({},Bt(b,!0),{className:cn("recharts-cross",g),d:ZRe(r,o,d,v,u,l)}))},QRe=cW,JRe=QRe(Object.getPrototypeOf,Object),eDe=JRe,tDe=As,nDe=eDe,rDe=Ps,iDe="[object Object]",oDe=Function.prototype,aDe=Object.prototype,GV=oDe.toString,uDe=aDe.hasOwnProperty,sDe=GV.call(Object);function lDe(e){if(!rDe(e)||tDe(e)!=iDe)return!1;var t=nDe(e);if(t===null)return!0;var n=uDe.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&GV.call(n)==sDe}var cDe=lDe;const fDe=Pn(cDe);var dDe=As,hDe=Ps,pDe="[object Boolean]";function vDe(e){return e===!0||e===!1||hDe(e)&&dDe(e)==pDe}var gDe=vDe;const mDe=Pn(gDe);function $v(e){"@babel/helpers - typeof";return $v=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$v(e)}function Tb(){return Tb=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0,from:{upperWidth:0,lowerWidth:0,height:h,x:s,y:l},to:{upperWidth:c,lowerWidth:d,height:h,x:s,y:l},duration:m,animationEasing:g,isActive:w},function(S){var A=S.upperWidth,E=S.lowerWidth,C=S.height,T=S.x,M=S.y;return j.createElement(Ya,{canBegin:a>0,from:"0px ".concat(a===-1?1:a,"px"),to:"".concat(a,"px 0px"),attributeName:"strokeDasharray",begin:b,duration:m,easing:g},j.createElement("path",Tb({},Bt(n,!0),{className:x,d:j7(T,M,A,E,C),ref:r})))}):j.createElement("g",null,j.createElement("path",Tb({},Bt(n,!0),{className:x,d:j7(s,l,c,d,h)})))},ODe=["option","shapeType","propTransformer","activeClassName","isActive"];function Iv(e){"@babel/helpers - typeof";return Iv=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Iv(e)}function kDe(e,t){if(e==null)return{};var n=TDe(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function TDe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function B7(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Mb(e){for(var t=1;t0&&r.handleDrag(i.changedTouches[0])}),Eo(r,"handleDragEnd",function(){r.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var i=r.props,o=i.endIndex,a=i.onDragEnd,u=i.startIndex;a?.({endIndex:o,startIndex:u})}),r.detachDragEndListener()}),Eo(r,"handleLeaveWrapper",function(){(r.state.isTravellerMoving||r.state.isSlideMoving)&&(r.leaveTimer=window.setTimeout(r.handleDragEnd,r.props.leaveTimeOut))}),Eo(r,"handleEnterSlideOrTraveller",function(){r.setState({isTextActive:!0})}),Eo(r,"handleLeaveSlideOrTraveller",function(){r.setState({isTextActive:!1})}),Eo(r,"handleSlideDragStart",function(i){var o=K7(i)?i.changedTouches[0]:i;r.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:o.pageX}),r.attachDragEndListener()}),r.travellerDragStartHandlers={startX:r.handleTravellerDragStart.bind(r,"startX"),endX:r.handleTravellerDragStart.bind(r,"endX")},r.state={},r}return h9e(t,e),l9e(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(r){var i=r.startX,o=r.endX,a=this.state.scaleValues,u=this.props,s=u.gap,l=u.data,c=l.length-1,d=Math.min(i,o),h=Math.max(i,o),v=t.getIndexInRange(a,d),g=t.getIndexInRange(a,h);return{startIndex:v-v%s,endIndex:g===c?c:g-g%s}}},{key:"getTextOfTick",value:function(r){var i=this.props,o=i.data,a=i.tickFormatter,u=i.dataKey,s=qr(o[r],u,r);return Wt(a)?a(s,r):s}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(r){var i=this.state,o=i.slideMoveStartX,a=i.startX,u=i.endX,s=this.props,l=s.x,c=s.width,d=s.travellerWidth,h=s.startIndex,v=s.endIndex,g=s.onChange,m=r.pageX-o;m>0?m=Math.min(m,l+c-d-u,l+c-d-a):m<0&&(m=Math.max(m,l-a,l-u));var b=this.getIndex({startX:a+m,endX:u+m});(b.startIndex!==h||b.endIndex!==v)&&g&&g(b),this.setState({startX:a+m,endX:u+m,slideMoveStartX:r.pageX})}},{key:"handleTravellerDragStart",value:function(r,i){var o=K7(i)?i.changedTouches[0]:i;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:r,brushMoveStartX:o.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(r){var i=this.state,o=i.brushMoveStartX,a=i.movingTravellerId,u=i.endX,s=i.startX,l=this.state[a],c=this.props,d=c.x,h=c.width,v=c.travellerWidth,g=c.onChange,m=c.gap,b=c.data,w={startX:this.state.startX,endX:this.state.endX},x=r.pageX-o;x>0?x=Math.min(x,d+h-v-l):x<0&&(x=Math.max(x,d-l)),w[a]=l+x;var S=this.getIndex(w),A=S.startIndex,E=S.endIndex,C=function(){var M=b.length-1;return a==="startX"&&(u>s?A%m===0:E%m===0)||us?E%m===0:A%m===0)||u>s&&E===M};this.setState(Eo(Eo({},a,l+x),"brushMoveStartX",r.pageX),function(){g&&C()&&g(S)})}},{key:"handleTravellerMoveKeyboard",value:function(r,i){var o=this,a=this.state,u=a.scaleValues,s=a.startX,l=a.endX,c=this.state[i],d=u.indexOf(c);if(d!==-1){var h=d+r;if(!(h===-1||h>=u.length)){var v=u[h];i==="startX"&&v>=l||i==="endX"&&v<=s||this.setState(Eo({},i,v),function(){o.props.onChange(o.getIndex({startX:o.state.startX,endX:o.state.endX}))})}}}},{key:"renderBackground",value:function(){var r=this.props,i=r.x,o=r.y,a=r.width,u=r.height,s=r.fill,l=r.stroke;return j.createElement("rect",{stroke:l,fill:s,x:i,y:o,width:a,height:u})}},{key:"renderPanorama",value:function(){var r=this.props,i=r.x,o=r.y,a=r.width,u=r.height,s=r.data,l=r.children,c=r.padding,d=y.Children.only(l);return d?j.cloneElement(d,{x:i,y:o,width:a,height:u,margin:c,compact:!0,data:s}):null}},{key:"renderTravellerLayer",value:function(r,i){var o,a,u=this,s=this.props,l=s.y,c=s.travellerWidth,d=s.height,h=s.traveller,v=s.ariaLabel,g=s.data,m=s.startIndex,b=s.endIndex,w=Math.max(r,this.props.x),x=zS(zS({},Bt(this.props,!1)),{},{x:w,y:l,width:c,height:d}),S=v||"Min value: ".concat((o=g[m])===null||o===void 0?void 0:o.name,", Max value: ").concat((a=g[b])===null||a===void 0?void 0:a.name);return j.createElement(Sn,{tabIndex:0,role:"slider","aria-label":S,"aria-valuenow":r,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[i],onTouchStart:this.travellerDragStartHandlers[i],onKeyDown:function(E){["ArrowLeft","ArrowRight"].includes(E.key)&&(E.preventDefault(),E.stopPropagation(),u.handleTravellerMoveKeyboard(E.key==="ArrowRight"?1:-1,i))},onFocus:function(){u.setState({isTravellerFocused:!0})},onBlur:function(){u.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(h,x))}},{key:"renderSlide",value:function(r,i){var o=this.props,a=o.y,u=o.height,s=o.stroke,l=o.travellerWidth,c=Math.min(r,i)+l,d=Math.max(Math.abs(i-r)-l,0);return j.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:s,fillOpacity:.2,x:c,y:a,width:d,height:u})}},{key:"renderText",value:function(){var r=this.props,i=r.startIndex,o=r.endIndex,a=r.y,u=r.height,s=r.travellerWidth,l=r.stroke,c=this.state,d=c.startX,h=c.endX,v=5,g={pointerEvents:"none",fill:l};return j.createElement(Sn,{className:"recharts-brush-texts"},j.createElement(lb,Db({textAnchor:"end",verticalAnchor:"middle",x:Math.min(d,h)-v,y:a+u/2},g),this.getTextOfTick(i)),j.createElement(lb,Db({textAnchor:"start",verticalAnchor:"middle",x:Math.max(d,h)+s+v,y:a+u/2},g),this.getTextOfTick(o)))}},{key:"render",value:function(){var r=this.props,i=r.data,o=r.className,a=r.children,u=r.x,s=r.y,l=r.width,c=r.height,d=r.alwaysShowText,h=this.state,v=h.startX,g=h.endX,m=h.isTextActive,b=h.isSlideMoving,w=h.isTravellerMoving,x=h.isTravellerFocused;if(!i||!i.length||!Ke(u)||!Ke(s)||!Ke(l)||!Ke(c)||l<=0||c<=0)return null;var S=cn("recharts-brush",o),A=j.Children.count(a)===1,E=u9e("userSelect","none");return j.createElement(Sn,{className:S,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:E},this.renderBackground(),A&&this.renderPanorama(),this.renderSlide(v,g),this.renderTravellerLayer(v,"startX"),this.renderTravellerLayer(g,"endX"),(m||b||w||x||d)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(r){var i=r.x,o=r.y,a=r.width,u=r.height,s=r.stroke,l=Math.floor(o+u/2)-1;return j.createElement(j.Fragment,null,j.createElement("rect",{x:i,y:o,width:a,height:u,fill:s,stroke:"none"}),j.createElement("line",{x1:i+1,y1:l,x2:i+a-1,y2:l,fill:"none",stroke:"#fff"}),j.createElement("line",{x1:i+1,y1:l+2,x2:i+a-1,y2:l+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(r,i){var o;return j.isValidElement(r)?o=j.cloneElement(r,i):Wt(r)?o=r(i):o=t.renderDefaultTraveller(i),o}},{key:"getDerivedStateFromProps",value:function(r,i){var o=r.data,a=r.width,u=r.x,s=r.travellerWidth,l=r.updateId,c=r.startIndex,d=r.endIndex;if(o!==i.prevData||l!==i.prevUpdateId)return zS({prevData:o,prevTravellerWidth:s,prevUpdateId:l,prevX:u,prevWidth:a},o&&o.length?v9e({data:o,width:a,x:u,travellerWidth:s,startIndex:c,endIndex:d}):{scale:null,scaleValues:null});if(i.scale&&(a!==i.prevWidth||u!==i.prevX||s!==i.prevTravellerWidth)){i.scale.range([u,u+a-s]);var h=i.scale.domain().map(function(v){return i.scale(v)});return{prevData:o,prevTravellerWidth:s,prevUpdateId:l,prevX:u,prevWidth:a,startX:i.scale(r.startIndex),endX:i.scale(r.endIndex),scaleValues:h}}return null}},{key:"getIndexInRange",value:function(r,i){for(var o=r.length,a=0,u=o-1;u-a>1;){var s=Math.floor((a+u)/2);r[s]>i?u=s:a=s}return i>=r[u]?u:a}}])}(y.PureComponent);Eo(rh,"displayName","Brush");Eo(rh,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var g9e=CP;function m9e(e,t){var n;return g9e(e,function(r,i,o){return n=t(r,i,o),!n}),!!n}var y9e=m9e,b9e=nW,x9e=jl,w9e=y9e,_9e=vo,S9e=Cw;function C9e(e,t,n){var r=_9e(e)?b9e:w9e;return n&&S9e(e,t,n)&&(t=void 0),r(e,x9e(t))}var E9e=C9e;const A9e=Pn(E9e);var Cu=function(t,n){var r=t.alwaysShow,i=t.ifOverflow;return r&&(i="extendDomain"),i===n},G7=CW;function P9e(e,t,n){t=="__proto__"&&G7?G7(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var O9e=P9e,k9e=O9e,T9e=_W,M9e=jl;function R9e(e,t){var n={};return t=M9e(t),T9e(e,function(r,i,o){k9e(n,i,t(r,i,o))}),n}var D9e=R9e;const $9e=Pn(D9e);function I9e(e,t){for(var n=-1,r=e==null?0:e.length;++n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Q9e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function J9e(e,t){var n=e.x,r=e.y,i=X9e(e,K9e),o="".concat(n),a=parseInt(o,10),u="".concat(r),s=parseInt(u,10),l="".concat(t.height||i.height),c=parseInt(l,10),d="".concat(t.width||i.width),h=parseInt(d,10);return Lp(Lp(Lp(Lp(Lp({},t),i),a?{x:a}:{}),s?{y:s}:{}),{},{height:c,width:h,name:t.name,radius:t.radius})}function Z7(e){return j.createElement(i6,a6({shapeType:"rectangle",propTransformer:J9e,activeClassName:"recharts-active-bar"},e))}var e7e=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(r,i){if(typeof t=="number")return t;var o=typeof r=="number";return o?t(r,i):(o||Qc(),n)}},t7e=["value","background"],eH;function ih(e){"@babel/helpers - typeof";return ih=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ih(e)}function n7e(e,t){if(e==null)return{};var n=r7e(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function r7e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Ib(){return Ib=Object.assign?Object.assign.bind():function(e){for(var t=1;t0&&Math.abs(G)0&&Math.abs(Z)0&&(ie=Math.min((se||0)-(Z[de-1]||0),ie))}),Number.isFinite(ie)){var G=ie/W,K=m.layout==="vertical"?r.height:r.width;if(m.padding==="gap"&&(T=G*K/2),m.padding==="no-gap"){var V=Yc(t.barCategoryGap,G*K),B=G*K/2;T=B-V-(B-V)/K*V}}}i==="xAxis"?M=[r.left+(S.left||0)+(T||0),r.left+r.width-(S.right||0)-(T||0)]:i==="yAxis"?M=s==="horizontal"?[r.top+r.height-(S.bottom||0),r.top+(S.top||0)]:[r.top+(S.top||0)+(T||0),r.top+r.height-(S.bottom||0)-(T||0)]:M=m.range,E&&(M=[M[1],M[0]]);var q=eTe(m,o,h),Y=q.scale,ue=q.realScaleType;Y.domain(w).range(M),tTe(Y);var Q=lTe(Y,Ra(Ra({},m),{},{realScaleType:ue}));i==="xAxis"?(H=b==="top"&&!A||b==="bottom"&&A,F=r.left,U=d[C]-H*m.height):i==="yAxis"&&(H=b==="left"&&!A||b==="right"&&A,F=d[C]-H*m.width,U=r.top);var J=Ra(Ra(Ra({},m),Q),{},{realScaleType:ue,x:F,y:U,scale:Y,width:i==="xAxis"?r.width:m.width,height:i==="yAxis"?r.height:m.height});return J.bandSize=Sb(J,Q),!m.hide&&i==="xAxis"?d[C]+=(H?-1:1)*J.height:m.hide||(d[C]+=(H?-1:1)*J.width),Ra(Ra({},v),{},Fw({},g,J))},{})},iH=function(t,n){var r=t.x,i=t.y,o=n.x,a=n.y;return{x:Math.min(r,o),y:Math.min(i,a),width:Math.abs(o-r),height:Math.abs(a-i)}},v7e=function(t){var n=t.x1,r=t.y1,i=t.x2,o=t.y2;return iH({x:n,y:r},{x:i,y:o})},oH=function(){function e(t){f7e(this,e),this.scale=t}return d7e(e,[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.bandAware,o=r.position;if(n!==void 0){if(o)switch(o){case"start":return this.scale(n);case"middle":{var a=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+a}case"end":{var u=this.bandwidth?this.bandwidth():0;return this.scale(n)+u}default:return this.scale(n)}if(i){var s=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+s}return this.scale(n)}}},{key:"isInRange",value:function(n){var r=this.range(),i=r[0],o=r[r.length-1];return i<=o?n>=i&&n<=o:n>=o&&n<=i}}],[{key:"create",value:function(n){return new e(n)}}])}();Fw(oH,"EPS",1e-4);var eO=function(t){var n=Object.keys(t).reduce(function(r,i){return Ra(Ra({},r),{},Fw({},i,oH.create(t[i])))},{});return Ra(Ra({},n),{},{apply:function(i){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=o.bandAware,u=o.position;return $9e(i,function(s,l){return n[l].apply(s,{bandAware:a,position:u})})},isInRange:function(i){return JV(i,function(o,a){return n[a].isInRange(o)})}})};function g7e(e){return(e%180+180)%180}var m7e=function(t){var n=t.width,r=t.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=g7e(i),a=o*Math.PI/180,u=Math.atan(r/n),s=a>u&&a-1?i[o?t[a]:a]:void 0}}var _7e=w7e,S7e=YV;function C7e(e){var t=S7e(e),n=t%1;return t===t?n?t-n:t:0}var E7e=C7e,A7e=gW,P7e=jl,O7e=E7e,k7e=Math.max;function T7e(e,t,n){var r=e==null?0:e.length;if(!r)return-1;var i=n==null?0:O7e(n);return i<0&&(i=k7e(r+i,0)),A7e(e,P7e(t),i)}var M7e=T7e,R7e=_7e,D7e=M7e,$7e=R7e(D7e),I7e=$7e;const N7e=Pn(I7e);var F7e=jbe(function(e){return{x:e.left,y:e.top,width:e.width,height:e.height}},function(e){return["l",e.left,"t",e.top,"w",e.width,"h",e.height].join("")}),tO=y.createContext(void 0),nO=y.createContext(void 0),aH=y.createContext(void 0),uH=y.createContext({}),sH=y.createContext(void 0),lH=y.createContext(0),cH=y.createContext(0),t$=function(t){var n=t.state,r=n.xAxisMap,i=n.yAxisMap,o=n.offset,a=t.clipPathId,u=t.children,s=t.width,l=t.height,c=F7e(o);return j.createElement(tO.Provider,{value:r},j.createElement(nO.Provider,{value:i},j.createElement(uH.Provider,{value:o},j.createElement(aH.Provider,{value:c},j.createElement(sH.Provider,{value:a},j.createElement(lH.Provider,{value:l},j.createElement(cH.Provider,{value:s},u)))))))},L7e=function(){return y.useContext(sH)},fH=function(t){var n=y.useContext(tO);n==null&&Qc();var r=n[t];return r==null&&Qc(),r},j7e=function(){var t=y.useContext(tO);return Js(t)},B7e=function(){var t=y.useContext(nO),n=N7e(t,function(r){return JV(r.domain,Number.isFinite)});return n||Js(t)},dH=function(t){var n=y.useContext(nO);n==null&&Qc();var r=n[t];return r==null&&Qc(),r},z7e=function(){var t=y.useContext(aH);return t},U7e=function(){return y.useContext(uH)},rO=function(){return y.useContext(cH)},iO=function(){return y.useContext(lH)};function oh(e){"@babel/helpers - typeof";return oh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},oh(e)}function W7e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function V7e(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);ne*i)return!1;var o=n();return e*(t-e*o/2-r)>=0&&e*(t+e*o/2-i)<=0}function E$e(e,t){return bH(e,t+1)}function A$e(e,t,n,r,i){for(var o=(r||[]).slice(),a=t.start,u=t.end,s=0,l=1,c=a,d=function(){var g=r?.[s];if(g===void 0)return{v:bH(r,l)};var m=s,b,w=function(){return b===void 0&&(b=n(g,m)),b},x=g.coordinate,S=s===0||Bb(e,x,w,c,u);S||(s=0,c=a,l+=1),S&&(c=x+e*(w()/2+i),s+=l)},h;l<=o.length;)if(h=d(),h)return h.v;return[]}function Bv(e){"@babel/helpers - typeof";return Bv=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bv(e)}function l$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Pi(e){for(var t=1;t0?v.coordinate-b*e:v.coordinate})}else o[h]=v=Pi(Pi({},v),{},{tickCoord:v.coordinate});var w=Bb(e,v.tickCoord,m,u,s);w&&(s=v.tickCoord-e*(m()/2+i),o[h]=Pi(Pi({},v),{},{isShow:!0}))},c=a-1;c>=0;c--)l(c);return o}function M$e(e,t,n,r,i,o){var a=(r||[]).slice(),u=a.length,s=t.start,l=t.end;if(o){var c=r[u-1],d=n(c,u-1),h=e*(c.coordinate+e*d/2-l);a[u-1]=c=Pi(Pi({},c),{},{tickCoord:h>0?c.coordinate-h*e:c.coordinate});var v=Bb(e,c.tickCoord,function(){return d},s,l);v&&(l=c.tickCoord-e*(d/2+i),a[u-1]=Pi(Pi({},c),{},{isShow:!0}))}for(var g=o?u-1:u,m=function(x){var S=a[x],A,E=function(){return A===void 0&&(A=n(S,x)),A};if(x===0){var C=e*(S.coordinate-e*E()/2-s);a[x]=S=Pi(Pi({},S),{},{tickCoord:C<0?S.coordinate-C*e:S.coordinate})}else a[x]=S=Pi(Pi({},S),{},{tickCoord:S.coordinate});var T=Bb(e,S.tickCoord,E,s,l);T&&(s=S.tickCoord+e*(E()/2+i),a[x]=Pi(Pi({},S),{},{isShow:!0}))},b=0;b=2?Ba(i[1].coordinate-i[0].coordinate):1,w=C$e(o,b,v);return s==="equidistantPreserveStart"?A$e(b,w,m,i,a):(s==="preserveStart"||s==="preserveStartEnd"?h=M$e(b,w,m,i,a,s==="preserveStartEnd"):h=T$e(b,w,m,i,a),h.filter(function(x){return x.isShow}))}var R$e=["viewBox"],D$e=["viewBox"],$$e=["ticks"];function sh(e){"@babel/helpers - typeof";return sh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},sh(e)}function cd(){return cd=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function I$e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function N$e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f$(e,t){for(var n=0;n0?s(this.props):s(v)),a<=0||u<=0||!g||!g.length?null:j.createElement(Sn,{className:cn("recharts-cartesian-axis",l),ref:function(b){r.layerReference=b}},o&&this.renderAxisLine(),this.renderTicks(g,this.state.fontSize,this.state.letterSpacing),ki.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(r,i,o){var a;return j.isValidElement(r)?a=j.cloneElement(r,i):Wt(r)?a=r(i):a=j.createElement(lb,cd({},i,{className:"recharts-cartesian-axis-tick-value"}),o),a}}])}(y.Component);sO(Gh,"displayName","CartesianAxis");sO(Gh,"defaultProps",{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"});var W$e=["x1","y1","x2","y2","key"],V$e=["offset"];function Jc(e){"@babel/helpers - typeof";return Jc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Jc(e)}function d$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ti(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function G$e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var Y$e=function(t){var n=t.fill;if(!n||n==="none")return null;var r=t.fillOpacity,i=t.x,o=t.y,a=t.width,u=t.height,s=t.ry;return j.createElement("rect",{x:i,y:o,ry:s,width:a,height:u,stroke:"none",fill:n,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function _H(e,t){var n;if(j.isValidElement(e))n=j.cloneElement(e,t);else if(Wt(e))n=e(t);else{var r=t.x1,i=t.y1,o=t.x2,a=t.y2,u=t.key,s=h$(t,W$e),l=Bt(s,!1);l.offset;var c=h$(l,V$e);n=j.createElement("line",_c({},c,{x1:r,y1:i,x2:o,y2:a,fill:"none",key:u}))}return n}function Z$e(e){var t=e.x,n=e.width,r=e.horizontal,i=r===void 0?!0:r,o=e.horizontalPoints;if(!i||!o||!o.length)return null;var a=o.map(function(u,s){var l=Ti(Ti({},e),{},{x1:t,y1:u,x2:t+n,y2:u,key:"line-".concat(s),index:s});return _H(i,l)});return j.createElement("g",{className:"recharts-cartesian-grid-horizontal"},a)}function X$e(e){var t=e.y,n=e.height,r=e.vertical,i=r===void 0?!0:r,o=e.verticalPoints;if(!i||!o||!o.length)return null;var a=o.map(function(u,s){var l=Ti(Ti({},e),{},{x1:u,y1:t,x2:u,y2:t+n,key:"line-".concat(s),index:s});return _H(i,l)});return j.createElement("g",{className:"recharts-cartesian-grid-vertical"},a)}function Q$e(e){var t=e.horizontalFill,n=e.fillOpacity,r=e.x,i=e.y,o=e.width,a=e.height,u=e.horizontalPoints,s=e.horizontal,l=s===void 0?!0:s;if(!l||!t||!t.length)return null;var c=u.map(function(h){return Math.round(h+i-i)}).sort(function(h,v){return h-v});i!==c[0]&&c.unshift(0);var d=c.map(function(h,v){var g=!c[v+1],m=g?i+a-h:c[v+1]-h;if(m<=0)return null;var b=v%t.length;return j.createElement("rect",{key:"react-".concat(v),y:h,x:r,height:m,width:o,stroke:"none",fill:t[b],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return j.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},d)}function J$e(e){var t=e.vertical,n=t===void 0?!0:t,r=e.verticalFill,i=e.fillOpacity,o=e.x,a=e.y,u=e.width,s=e.height,l=e.verticalPoints;if(!n||!r||!r.length)return null;var c=l.map(function(h){return Math.round(h+o-o)}).sort(function(h,v){return h-v});o!==c[0]&&c.unshift(0);var d=c.map(function(h,v){var g=!c[v+1],m=g?o+u-h:c[v+1]-h;if(m<=0)return null;var b=v%r.length;return j.createElement("rect",{key:"react-".concat(v),x:h,y:a,width:m,height:s,stroke:"none",fill:r[b],fillOpacity:i,className:"recharts-cartesian-grid-bg"})});return j.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},d)}var eIe=function(t,n){var r=t.xAxis,i=t.width,o=t.height,a=t.offset;return $V(uO(Ti(Ti(Ti({},Gh.defaultProps),r),{},{ticks:rs(r,!0),viewBox:{x:0,y:0,width:i,height:o}})),a.left,a.left+a.width,n)},tIe=function(t,n){var r=t.yAxis,i=t.width,o=t.height,a=t.offset;return $V(uO(Ti(Ti(Ti({},Gh.defaultProps),r),{},{ticks:rs(r,!0),viewBox:{x:0,y:0,width:i,height:o}})),a.top,a.top+a.height,n)},Wf={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function nIe(e){var t,n,r,i,o,a,u=rO(),s=iO(),l=U7e(),c=Ti(Ti({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:Wf.stroke,fill:(n=e.fill)!==null&&n!==void 0?n:Wf.fill,horizontal:(r=e.horizontal)!==null&&r!==void 0?r:Wf.horizontal,horizontalFill:(i=e.horizontalFill)!==null&&i!==void 0?i:Wf.horizontalFill,vertical:(o=e.vertical)!==null&&o!==void 0?o:Wf.vertical,verticalFill:(a=e.verticalFill)!==null&&a!==void 0?a:Wf.verticalFill,x:Ke(e.x)?e.x:l.left,y:Ke(e.y)?e.y:l.top,width:Ke(e.width)?e.width:l.width,height:Ke(e.height)?e.height:l.height}),d=c.x,h=c.y,v=c.width,g=c.height,m=c.syncWithTicks,b=c.horizontalValues,w=c.verticalValues,x=j7e(),S=B7e();if(!Ke(v)||v<=0||!Ke(g)||g<=0||!Ke(d)||d!==+d||!Ke(h)||h!==+h)return null;var A=c.verticalCoordinatesGenerator||eIe,E=c.horizontalCoordinatesGenerator||tIe,C=c.horizontalPoints,T=c.verticalPoints;if((!C||!C.length)&&Wt(E)){var M=b&&b.length,F=E({yAxis:S?Ti(Ti({},S),{},{ticks:M?b:S.ticks}):void 0,width:u,height:s,offset:l},M?!0:m);ss(Array.isArray(F),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(Jc(F),"]")),Array.isArray(F)&&(C=F)}if((!T||!T.length)&&Wt(A)){var U=w&&w.length,H=A({xAxis:x?Ti(Ti({},x),{},{ticks:U?w:x.ticks}):void 0,width:u,height:s,offset:l},U?!0:m);ss(Array.isArray(H),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(Jc(H),"]")),Array.isArray(H)&&(T=H)}return j.createElement("g",{className:"recharts-cartesian-grid"},j.createElement(Y$e,{fill:c.fill,fillOpacity:c.fillOpacity,x:c.x,y:c.y,width:c.width,height:c.height,ry:c.ry}),j.createElement(Z$e,_c({},c,{offset:l,horizontalPoints:C,xAxis:x,yAxis:S})),j.createElement(X$e,_c({},c,{offset:l,verticalPoints:T,xAxis:x,yAxis:S})),j.createElement(Q$e,_c({},c,{horizontalPoints:C})),j.createElement(J$e,_c({},c,{verticalPoints:T})))}nIe.displayName="CartesianGrid";var rIe=["type","layout","connectNulls","ref"],iIe=["key"];function lh(e){"@babel/helpers - typeof";return lh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},lh(e)}function p$(e,t){if(e==null)return{};var n=oIe(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function oIe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function v0(){return v0=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);nd){v=[].concat(Vf(s.slice(0,g)),[d-m]);break}var b=v.length%2===0?[0,h]:[h];return[].concat(Vf(t.repeat(s,c)),Vf(v),b).map(function(w){return"".concat(w,"px")}).join(", ")}),Da(n,"id",df("recharts-line-")),Da(n,"pathRef",function(a){n.mainCurve=a}),Da(n,"handleAnimationEnd",function(){n.setState({isAnimationFinished:!0}),n.props.onAnimationEnd&&n.props.onAnimationEnd()}),Da(n,"handleAnimationStart",function(){n.setState({isAnimationFinished:!1}),n.props.onAnimationStart&&n.props.onAnimationStart()}),n}return vIe(t,e),fIe(t,[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var r=this.getTotalLength();this.setState({totalLength:r})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var r=this.getTotalLength();r!==this.state.totalLength&&this.setState({totalLength:r})}}},{key:"getTotalLength",value:function(){var r=this.mainCurve;try{return r&&r.getTotalLength&&r.getTotalLength()||0}catch{return 0}}},{key:"renderErrorBar",value:function(r,i){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var o=this.props,a=o.points,u=o.xAxis,s=o.yAxis,l=o.layout,c=o.children,d=fo(c,Hh);if(!d)return null;var h=function(m,b){return{x:m.x,y:m.y,value:m.value,errorVal:qr(m.payload,b)}},v={clipPath:r?"url(#clipPath-".concat(i,")"):null};return j.createElement(Sn,v,d.map(function(g){return j.cloneElement(g,{key:"bar-".concat(g.props.dataKey),data:a,xAxis:u,yAxis:s,layout:l,dataPointFormatter:h})}))}},{key:"renderDots",value:function(r,i,o){var a=this.props.isAnimationActive;if(a&&!this.state.isAnimationFinished)return null;var u=this.props,s=u.dot,l=u.points,c=u.dataKey,d=Bt(this.props,!1),h=Bt(s,!0),v=l.map(function(m,b){var w=Co(Co(Co({key:"dot-".concat(b),r:3},d),h),{},{value:m.value,dataKey:c,cx:m.x,cy:m.y,index:b,payload:m.payload});return t.renderDotItem(s,w)}),g={clipPath:r?"url(#clipPath-".concat(i?"":"dots-").concat(o,")"):null};return j.createElement(Sn,v0({className:"recharts-line-dots",key:"dots"},g),v)}},{key:"renderCurveStatically",value:function(r,i,o,a){var u=this.props,s=u.type,l=u.layout,c=u.connectNulls;u.ref;var d=p$(u,rIe),h=Co(Co(Co({},Bt(d,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:i?"url(#clipPath-".concat(o,")"):null,points:r},a),{},{type:s,layout:l,connectNulls:c});return j.createElement(Tc,v0({},h,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(r,i){var o=this,a=this.props,u=a.points,s=a.strokeDasharray,l=a.isAnimationActive,c=a.animationBegin,d=a.animationDuration,h=a.animationEasing,v=a.animationId,g=a.animateNewValues,m=a.width,b=a.height,w=this.state,x=w.prevPoints,S=w.totalLength;return j.createElement(Ya,{begin:c,duration:d,isActive:l,easing:h,from:{t:0},to:{t:1},key:"line-".concat(v),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(A){var E=A.t;if(x){var C=x.length/u.length,T=u.map(function(W,ie){var Z=Math.floor(ie*C);if(x[Z]){var G=x[Z],K=Er(G.x,W.x),V=Er(G.y,W.y);return Co(Co({},W),{},{x:K(E),y:V(E)})}if(g){var B=Er(m*2,W.x),q=Er(b/2,W.y);return Co(Co({},W),{},{x:B(E),y:q(E)})}return Co(Co({},W),{},{x:W.x,y:W.y})});return o.renderCurveStatically(T,r,i)}var M=Er(0,S),F=M(E),U;if(s){var H="".concat(s).split(/[,\s]+/gim).map(function(W){return parseFloat(W)});U=o.getStrokeDasharray(F,S,H)}else U=o.generateSimpleStrokeDasharray(S,F);return o.renderCurveStatically(u,r,i,{strokeDasharray:U})})}},{key:"renderCurve",value:function(r,i){var o=this.props,a=o.points,u=o.isAnimationActive,s=this.state,l=s.prevPoints,c=s.totalLength;return u&&a&&a.length&&(!l&&c>0||!Zc(l,a))?this.renderCurveWithAnimation(r,i):this.renderCurveStatically(a,r,i)}},{key:"render",value:function(){var r,i=this.props,o=i.hide,a=i.dot,u=i.points,s=i.className,l=i.xAxis,c=i.yAxis,d=i.top,h=i.left,v=i.width,g=i.height,m=i.isAnimationActive,b=i.id;if(o||!u||!u.length)return null;var w=this.state.isAnimationFinished,x=u.length===1,S=cn("recharts-line",s),A=l&&l.allowDataOverflow,E=c&&c.allowDataOverflow,C=A||E,T=zt(b)?this.id:b,M=(r=Bt(a,!1))!==null&&r!==void 0?r:{r:3,strokeWidth:2},F=M.r,U=F===void 0?3:F,H=M.strokeWidth,W=H===void 0?2:H,ie=PU(a)?a:{},Z=ie.clipDot,G=Z===void 0?!0:Z,K=U*2+W;return j.createElement(Sn,{className:S},A||E?j.createElement("defs",null,j.createElement("clipPath",{id:"clipPath-".concat(T)},j.createElement("rect",{x:A?h:h-v/2,y:E?d:d-g/2,width:A?v:v*2,height:E?g:g*2})),!G&&j.createElement("clipPath",{id:"clipPath-dots-".concat(T)},j.createElement("rect",{x:h-K/2,y:d-K/2,width:v+K,height:g+K}))):null,!x&&this.renderCurve(C,T),this.renderErrorBar(C,T),(x||a)&&this.renderDots(C,G,T),(!m||w)&&Su.renderCallByParent(this.props,u))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return r.animationId!==i.prevAnimationId?{prevAnimationId:r.animationId,curPoints:r.points,prevPoints:i.curPoints}:r.points!==i.curPoints?{curPoints:r.points}:null}},{key:"repeat",value:function(r,i){for(var o=r.length%2!==0?[].concat(Vf(r),[0]):r,a=[],u=0;u=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function bIe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Sc(){return Sc=Object.assign?Object.assign.bind():function(e){for(var t=1;t0||!Zc(c,a)||!Zc(d,u))?this.renderAreaWithAnimation(r,i):this.renderAreaStatically(a,u,r,i)}},{key:"render",value:function(){var r,i=this.props,o=i.hide,a=i.dot,u=i.points,s=i.className,l=i.top,c=i.left,d=i.xAxis,h=i.yAxis,v=i.width,g=i.height,m=i.isAnimationActive,b=i.id;if(o||!u||!u.length)return null;var w=this.state.isAnimationFinished,x=u.length===1,S=cn("recharts-area",s),A=d&&d.allowDataOverflow,E=h&&h.allowDataOverflow,C=A||E,T=zt(b)?this.id:b,M=(r=Bt(a,!1))!==null&&r!==void 0?r:{r:3,strokeWidth:2},F=M.r,U=F===void 0?3:F,H=M.strokeWidth,W=H===void 0?2:H,ie=PU(a)?a:{},Z=ie.clipDot,G=Z===void 0?!0:Z,K=U*2+W;return j.createElement(Sn,{className:S},A||E?j.createElement("defs",null,j.createElement("clipPath",{id:"clipPath-".concat(T)},j.createElement("rect",{x:A?c:c-v/2,y:E?l:l-g/2,width:A?v:v*2,height:E?g:g*2})),!G&&j.createElement("clipPath",{id:"clipPath-dots-".concat(T)},j.createElement("rect",{x:c-K/2,y:l-K/2,width:v+K,height:g+K}))):null,x?null:this.renderArea(C,T),(a||x)&&this.renderDots(C,G,T),(!m||w)&&Su.renderCallByParent(this.props,u))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return r.animationId!==i.prevAnimationId?{prevAnimationId:r.animationId,curPoints:r.points,curBaseLine:r.baseLine,prevPoints:i.curPoints,prevBaseLine:i.curBaseLine}:r.points!==i.curPoints||r.baseLine!==i.curBaseLine?{curPoints:r.points,curBaseLine:r.baseLine}:null}}])}(y.PureComponent);EH=vf;vu(vf,"displayName","Area");vu(vf,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!Va.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"});vu(vf,"getBaseValue",function(e,t,n,r){var i=e.layout,o=e.baseValue,a=t.props.baseValue,u=a??o;if(Ke(u)&&typeof u=="number")return u;var s=i==="horizontal"?r:n,l=s.scale.domain();if(s.type==="number"){var c=Math.max(l[0],l[1]),d=Math.min(l[0],l[1]);return u==="dataMin"?d:u==="dataMax"||c<0?c:Math.max(Math.min(l[0],l[1]),0)}return u==="dataMin"?l[0]:u==="dataMax"?l[1]:l[0]});vu(vf,"getComposedData",function(e){var t=e.props,n=e.item,r=e.xAxis,i=e.yAxis,o=e.xAxisTicks,a=e.yAxisTicks,u=e.bandSize,s=e.dataKey,l=e.stackedData,c=e.dataStartIndex,d=e.displayedData,h=e.offset,v=t.layout,g=l&&l.length,m=EH.getBaseValue(t,n,r,i),b=v==="horizontal",w=!1,x=d.map(function(A,E){var C;g?C=l[c+E]:(C=qr(A,s),Array.isArray(C)?w=!0:C=[m,C]);var T=C[1]==null||g&&qr(A,s)==null;return b?{x:eh({axis:r,ticks:o,bandSize:u,entry:A,index:E}),y:T?null:i.scale(C[1]),value:C,payload:A}:{x:T?null:r.scale(C[1]),y:eh({axis:i,ticks:a,bandSize:u,entry:A,index:E}),value:C,payload:A}}),S;return g||w?S=x.map(function(A){var E=Array.isArray(A.value)?A.value[0]:null;return b?{x:A.x,y:E!=null&&A.y!=null?i.scale(E):null}:{x:E!=null?r.scale(E):null,y:A.y}}):S=b?i.scale(m):r.scale(m),Hs({points:x,baseLine:S,layout:v,isRange:w},h)});vu(vf,"renderDotItem",function(e,t){var n;if(j.isValidElement(e))n=j.cloneElement(e,t);else if(Wt(e))n=e(t);else{var r=cn("recharts-area-dot",typeof e!="boolean"?e.className:""),i=t.key,o=AH(t,yIe);n=j.createElement($w,Sc({},o,{key:i,className:r}))}return n});function fh(e){"@babel/helpers - typeof";return fh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fh(e)}function PIe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function OIe(e,t){for(var n=0;n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function FIe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function LIe(e){var t=e.option,n=e.isActive,r=NIe(e,IIe);return typeof t=="string"?j.createElement(i6,g0({option:j.createElement(ww,g0({type:t},r)),isActive:n,shapeType:"symbols"},r)):j.createElement(i6,g0({option:t,isActive:n,shapeType:"symbols"},r))}function dh(e){"@babel/helpers - typeof";return dh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},dh(e)}function m0(){return m0=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function RNe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function DNe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $Ne(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n0?a:t&&t.length&&Ke(i)&&Ke(o)?t.slice(i,o+1):[]};function GH(e){return e==="number"?[0,"auto"]:void 0}var O6=function(t,n,r,i){var o=t.graphicalItems,a=t.tooltipAxis,u=Hw(n,t);return r<0||!o||!o.length||r>=u.length?null:o.reduce(function(s,l){var c,d=(c=l.props.data)!==null&&c!==void 0?c:n;d&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=r&&(d=d.slice(t.dataStartIndex,t.dataEndIndex+1));var h;if(a.dataKey&&!a.allowDuplicatedCategory){var v=d===void 0?u:d;h=G1(v,a.dataKey,i)}else h=d&&d[r]||u[r];return h?[].concat(gh(s),[NV(l,h)]):s},[])},A$=function(t,n,r,i){var o=i||{x:t.chartX,y:t.chartY},a=qNe(o,r),u=t.orderedTooltipTicks,s=t.tooltipAxis,l=t.tooltipTicks,c=Gke(a,u,l,s);if(c>=0&&l){var d=l[c]&&l[c].value,h=O6(t,n,c,d),v=KNe(r,u,c,o);return{activeTooltipIndex:c,activeLabel:d,activePayload:h,activeCoordinate:v}}return null},GNe=function(t,n){var r=n.axes,i=n.graphicalItems,o=n.axisType,a=n.axisIdKey,u=n.stackGroups,s=n.dataStartIndex,l=n.dataEndIndex,c=t.layout,d=t.children,h=t.stackOffset,v=DV(c,o);return r.reduce(function(g,m){var b,w=m.type.defaultProps!==void 0?Ee(Ee({},m.type.defaultProps),m.props):m.props,x=w.type,S=w.dataKey,A=w.allowDataOverflow,E=w.allowDuplicatedCategory,C=w.scale,T=w.ticks,M=w.includeHidden,F=w[a];if(g[F])return g;var U=Hw(t.data,{graphicalItems:i.filter(function(Q){var J,se=a in Q.props?Q.props[a]:(J=Q.type.defaultProps)===null||J===void 0?void 0:J[a];return se===F}),dataStartIndex:s,dataEndIndex:l}),H=U.length,W,ie,Z;xNe(w.domain,A,x)&&(W=zE(w.domain,null,A),v&&(x==="number"||C!=="auto")&&(Z=h0(U,S,"category")));var G=GH(x);if(!W||W.length===0){var K,V=(K=w.domain)!==null&&K!==void 0?K:G;if(S){if(W=h0(U,S,x),x==="category"&&v){var B=Nxe(W);E&&B?(ie=W,W=Rb(0,H)):E||(W=e7(V,W,m).reduce(function(Q,J){return Q.indexOf(J)>=0?Q:[].concat(gh(Q),[J])},[]))}else if(x==="category")E?W=W.filter(function(Q){return Q!==""&&!zt(Q)}):W=e7(V,W,m).reduce(function(Q,J){return Q.indexOf(J)>=0||J===""||zt(J)?Q:[].concat(gh(Q),[J])},[]);else if(x==="number"){var q=Jke(U,i.filter(function(Q){var J,se,de=a in Q.props?Q.props[a]:(J=Q.type.defaultProps)===null||J===void 0?void 0:J[a],Se="hide"in Q.props?Q.props.hide:(se=Q.type.defaultProps)===null||se===void 0?void 0:se.hide;return de===F&&(M||!Se)}),S,o,c);q&&(W=q)}v&&(x==="number"||C!=="auto")&&(Z=h0(U,S,"category"))}else v?W=Rb(0,H):u&&u[F]&&u[F].hasStack&&x==="number"?W=h==="expand"?[0,1]:IV(u[F].stackGroups,s,l):W=RV(U,i.filter(function(Q){var J=a in Q.props?Q.props[a]:Q.type.defaultProps[a],se="hide"in Q.props?Q.props.hide:Q.type.defaultProps.hide;return J===F&&(M||!se)}),x,c,!0);if(x==="number")W=E6(d,W,F,o,T),V&&(W=zE(V,W,A));else if(x==="category"&&V){var Y=V,ue=W.every(function(Q){return Y.indexOf(Q)>=0});ue&&(W=Y)}}return Ee(Ee({},g),{},kt({},F,Ee(Ee({},w),{},{axisType:o,domain:W,categoricalDomain:Z,duplicateDomain:ie,originalDomain:(b=w.domain)!==null&&b!==void 0?b:G,isCategorical:v,layout:c})))},{})},YNe=function(t,n){var r=n.graphicalItems,i=n.Axis,o=n.axisType,a=n.axisIdKey,u=n.stackGroups,s=n.dataStartIndex,l=n.dataEndIndex,c=t.layout,d=t.children,h=Hw(t.data,{graphicalItems:r,dataStartIndex:s,dataEndIndex:l}),v=h.length,g=DV(c,o),m=-1;return r.reduce(function(b,w){var x=w.type.defaultProps!==void 0?Ee(Ee({},w.type.defaultProps),w.props):w.props,S=x[a],A=GH("number");if(!b[S]){m++;var E;return g?E=Rb(0,v):u&&u[S]&&u[S].hasStack?(E=IV(u[S].stackGroups,s,l),E=E6(d,E,S,o)):(E=zE(A,RV(h,r.filter(function(C){var T,M,F=a in C.props?C.props[a]:(T=C.type.defaultProps)===null||T===void 0?void 0:T[a],U="hide"in C.props?C.props.hide:(M=C.type.defaultProps)===null||M===void 0?void 0:M.hide;return F===S&&!U}),"number",c),i.defaultProps.allowDataOverflow),E=E6(d,E,S,o)),Ee(Ee({},b),{},kt({},S,Ee(Ee({axisType:o},i.defaultProps),{},{hide:!0,orientation:da(VNe,"".concat(o,".").concat(m%2),null),domain:E,originalDomain:A,isCategorical:g,layout:c})))}return b},{})},ZNe=function(t,n){var r=n.axisType,i=r===void 0?"xAxis":r,o=n.AxisComp,a=n.graphicalItems,u=n.stackGroups,s=n.dataStartIndex,l=n.dataEndIndex,c=t.children,d="".concat(i,"Id"),h=fo(c,o),v={};return h.length?v=GNe(t,{axes:h,graphicalItems:a,axisType:i,axisIdKey:d,stackGroups:u,dataStartIndex:s,dataEndIndex:l}):a&&a.length&&(v=YNe(t,{Axis:o,graphicalItems:a,axisType:i,axisIdKey:d,stackGroups:u,dataStartIndex:s,dataEndIndex:l})),v},XNe=function(t){var n=Js(t),r=rs(n,!1,!0);return{tooltipTicks:r,orderedTooltipTicks:EP(r,function(i){return i.coordinate}),tooltipAxis:n,tooltipAxisBandSize:Sb(n,r)}},P$=function(t){var n=t.children,r=t.defaultShowTooltip,i=Oo(n,rh),o=0,a=0;return t.data&&t.data.length!==0&&(a=t.data.length-1),i&&i.props&&(i.props.startIndex>=0&&(o=i.props.startIndex),i.props.endIndex>=0&&(a=i.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:o,dataEndIndex:a,activeTooltipIndex:-1,isTooltipActive:!!r}},QNe=function(t){return!t||!t.length?!1:t.some(function(n){var r=us(n&&n.type);return r&&r.indexOf("Bar")>=0})},O$=function(t){return t==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:t==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:t==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},JNe=function(t,n){var r=t.props,i=t.graphicalItems,o=t.xAxisMap,a=o===void 0?{}:o,u=t.yAxisMap,s=u===void 0?{}:u,l=r.width,c=r.height,d=r.children,h=r.margin||{},v=Oo(d,rh),g=Oo(d,Ad),m=Object.keys(s).reduce(function(E,C){var T=s[C],M=T.orientation;return!T.mirror&&!T.hide?Ee(Ee({},E),{},kt({},M,E[M]+T.width)):E},{left:h.left||0,right:h.right||0}),b=Object.keys(a).reduce(function(E,C){var T=a[C],M=T.orientation;return!T.mirror&&!T.hide?Ee(Ee({},E),{},kt({},M,da(E,"".concat(M))+T.height)):E},{top:h.top||0,bottom:h.bottom||0}),w=Ee(Ee({},b),m),x=w.bottom;v&&(w.bottom+=v.props.height||rh.defaultProps.height),g&&n&&(w=Xke(w,i,r,n));var S=l-w.left-w.right,A=c-w.top-w.bottom;return Ee(Ee({brushBottom:x},w),{},{width:Math.max(S,0),height:Math.max(A,0)})},eFe=function(t,n){if(n==="xAxis")return t[n].width;if(n==="yAxis")return t[n].height},tFe=function(t){var n=t.chartName,r=t.GraphicalChild,i=t.defaultTooltipEventType,o=i===void 0?"axis":i,a=t.validateTooltipEventTypes,u=a===void 0?["axis"]:a,s=t.axisComponents,l=t.legendContent,c=t.formatAxisMap,d=t.defaultProps,h=function(w,x){var S=x.graphicalItems,A=x.stackGroups,E=x.offset,C=x.updateId,T=x.dataStartIndex,M=x.dataEndIndex,F=w.barSize,U=w.layout,H=w.barGap,W=w.barCategoryGap,ie=w.maxBarSize,Z=O$(U),G=Z.numericAxisName,K=Z.cateAxisName,V=QNe(S),B=[];return S.forEach(function(q,Y){var ue=Hw(w.data,{graphicalItems:[q],dataStartIndex:T,dataEndIndex:M}),Q=q.type.defaultProps!==void 0?Ee(Ee({},q.type.defaultProps),q.props):q.props,J=Q.dataKey,se=Q.maxBarSize,de=Q["".concat(G,"Id")],Se=Q["".concat(K,"Id")],ge={},Ze=s.reduce(function(Ue,je){var ke=x["".concat(je.axisType,"Map")],nt=Q["".concat(je.axisType,"Id")];ke&&ke[nt]||je.axisType==="zAxis"||Qc();var gt=ke[nt];return Ee(Ee({},Ue),{},kt(kt({},je.axisType,gt),"".concat(je.axisType,"Ticks"),rs(gt)))},ge),Pe=Ze[K],Fe=Ze["".concat(K,"Ticks")],$e=A&&A[de]&&A[de].hasStack&&fTe(q,A[de].stackGroups),be=us(q.type).indexOf("Bar")>=0,yt=Sb(Pe,Fe),lt=[],It=V&&Yke({barSize:F,stackGroups:A,totalSize:eFe(Ze,K)});if(be){var mn,en,re=zt(se)?ie:se,pe=(mn=(en=Sb(Pe,Fe,!0))!==null&&en!==void 0?en:re)!==null&&mn!==void 0?mn:0;lt=Zke({barGap:H,barCategoryGap:W,bandSize:pe!==yt?pe:yt,sizeList:It[Se],maxBarSize:re}),pe!==yt&&(lt=lt.map(function(Ue){return Ee(Ee({},Ue),{},{position:Ee(Ee({},Ue.position),{},{offset:Ue.position.offset-pe/2})})}))}var ye=q&&q.type&&q.type.getComposedData;ye&&B.push({props:Ee(Ee({},ye(Ee(Ee({},Ze),{},{displayedData:ue,props:w,dataKey:J,item:q,bandSize:yt,barPosition:lt,offset:E,stackedData:$e,layout:U,dataStartIndex:T,dataEndIndex:M}))),{},kt(kt(kt({key:q.key||"item-".concat(Y)},G,Ze[G]),K,Ze[K]),"animationId",C)),childIndex:Gxe(q,w.children),item:q})}),B},v=function(w,x){var S=w.props,A=w.dataStartIndex,E=w.dataEndIndex,C=w.updateId;if(!GR({props:S}))return null;var T=S.children,M=S.layout,F=S.stackOffset,U=S.data,H=S.reverseStackOrder,W=O$(M),ie=W.numericAxisName,Z=W.cateAxisName,G=fo(T,r),K=sTe(U,G,"".concat(ie,"Id"),"".concat(Z,"Id"),F,H),V=s.reduce(function(Q,J){var se="".concat(J.axisType,"Map");return Ee(Ee({},Q),{},kt({},se,ZNe(S,Ee(Ee({},J),{},{graphicalItems:G,stackGroups:J.axisType===ie&&K,dataStartIndex:A,dataEndIndex:E}))))},{}),B=JNe(Ee(Ee({},V),{},{props:S,graphicalItems:G}),x?.legendBBox);Object.keys(V).forEach(function(Q){V[Q]=c(S,V[Q],B,Q.replace("Map",""),n)});var q=V["".concat(Z,"Map")],Y=XNe(q),ue=h(S,Ee(Ee({},V),{},{dataStartIndex:A,dataEndIndex:E,updateId:C,graphicalItems:G,stackGroups:K,offset:B}));return Ee(Ee({formattedGraphicalItems:ue,graphicalItems:G,offset:B,stackGroups:K},Y),V)},g=function(b){function w(x){var S,A,E;return DNe(this,w),E=NNe(this,w,[x]),kt(E,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),kt(E,"accessibilityManager",new bNe),kt(E,"handleLegendBBoxUpdate",function(C){if(C){var T=E.state,M=T.dataStartIndex,F=T.dataEndIndex,U=T.updateId;E.setState(Ee({legendBBox:C},v({props:E.props,dataStartIndex:M,dataEndIndex:F,updateId:U},Ee(Ee({},E.state),{},{legendBBox:C}))))}}),kt(E,"handleReceiveSyncEvent",function(C,T,M){if(E.props.syncId===C){if(M===E.eventEmitterSymbol&&typeof E.props.syncMethod!="function")return;E.applySyncEvent(T)}}),kt(E,"handleBrushChange",function(C){var T=C.startIndex,M=C.endIndex;if(T!==E.state.dataStartIndex||M!==E.state.dataEndIndex){var F=E.state.updateId;E.setState(function(){return Ee({dataStartIndex:T,dataEndIndex:M},v({props:E.props,dataStartIndex:T,dataEndIndex:M,updateId:F},E.state))}),E.triggerSyncEvent({dataStartIndex:T,dataEndIndex:M})}}),kt(E,"handleMouseEnter",function(C){var T=E.getMouseInfo(C);if(T){var M=Ee(Ee({},T),{},{isTooltipActive:!0});E.setState(M),E.triggerSyncEvent(M);var F=E.props.onMouseEnter;Wt(F)&&F(M,C)}}),kt(E,"triggeredAfterMouseMove",function(C){var T=E.getMouseInfo(C),M=T?Ee(Ee({},T),{},{isTooltipActive:!0}):{isTooltipActive:!1};E.setState(M),E.triggerSyncEvent(M);var F=E.props.onMouseMove;Wt(F)&&F(M,C)}),kt(E,"handleItemMouseEnter",function(C){E.setState(function(){return{isTooltipActive:!0,activeItem:C,activePayload:C.tooltipPayload,activeCoordinate:C.tooltipPosition||{x:C.cx,y:C.cy}}})}),kt(E,"handleItemMouseLeave",function(){E.setState(function(){return{isTooltipActive:!1}})}),kt(E,"handleMouseMove",function(C){C.persist(),E.throttleTriggeredAfterMouseMove(C)}),kt(E,"handleMouseLeave",function(C){E.throttleTriggeredAfterMouseMove.cancel();var T={isTooltipActive:!1};E.setState(T),E.triggerSyncEvent(T);var M=E.props.onMouseLeave;Wt(M)&&M(T,C)}),kt(E,"handleOuterEvent",function(C){var T=Kxe(C),M=da(E.props,"".concat(T));if(T&&Wt(M)){var F,U;/.*touch.*/i.test(T)?U=E.getMouseInfo(C.changedTouches[0]):U=E.getMouseInfo(C),M((F=U)!==null&&F!==void 0?F:{},C)}}),kt(E,"handleClick",function(C){var T=E.getMouseInfo(C);if(T){var M=Ee(Ee({},T),{},{isTooltipActive:!0});E.setState(M),E.triggerSyncEvent(M);var F=E.props.onClick;Wt(F)&&F(M,C)}}),kt(E,"handleMouseDown",function(C){var T=E.props.onMouseDown;if(Wt(T)){var M=E.getMouseInfo(C);T(M,C)}}),kt(E,"handleMouseUp",function(C){var T=E.props.onMouseUp;if(Wt(T)){var M=E.getMouseInfo(C);T(M,C)}}),kt(E,"handleTouchMove",function(C){C.changedTouches!=null&&C.changedTouches.length>0&&E.throttleTriggeredAfterMouseMove(C.changedTouches[0])}),kt(E,"handleTouchStart",function(C){C.changedTouches!=null&&C.changedTouches.length>0&&E.handleMouseDown(C.changedTouches[0])}),kt(E,"handleTouchEnd",function(C){C.changedTouches!=null&&C.changedTouches.length>0&&E.handleMouseUp(C.changedTouches[0])}),kt(E,"handleDoubleClick",function(C){var T=E.props.onDoubleClick;if(Wt(T)){var M=E.getMouseInfo(C);T(M,C)}}),kt(E,"handleContextMenu",function(C){var T=E.props.onContextMenu;if(Wt(T)){var M=E.getMouseInfo(C);T(M,C)}}),kt(E,"triggerSyncEvent",function(C){E.props.syncId!==void 0&&WS.emit(VS,E.props.syncId,C,E.eventEmitterSymbol)}),kt(E,"applySyncEvent",function(C){var T=E.props,M=T.layout,F=T.syncMethod,U=E.state.updateId,H=C.dataStartIndex,W=C.dataEndIndex;if(C.dataStartIndex!==void 0||C.dataEndIndex!==void 0)E.setState(Ee({dataStartIndex:H,dataEndIndex:W},v({props:E.props,dataStartIndex:H,dataEndIndex:W,updateId:U},E.state)));else if(C.activeTooltipIndex!==void 0){var ie=C.chartX,Z=C.chartY,G=C.activeTooltipIndex,K=E.state,V=K.offset,B=K.tooltipTicks;if(!V)return;if(typeof F=="function")G=F(B,C);else if(F==="value"){G=-1;for(var q=0;q=0){var $e,be;if(ie.dataKey&&!ie.allowDuplicatedCategory){var yt=typeof ie.dataKey=="function"?Fe:"payload.".concat(ie.dataKey.toString());$e=G1(q,yt,G),be=Y&&ue&&G1(ue,yt,G)}else $e=q?.[Z],be=Y&&ue&&ue[Z];if(Se||de){var lt=C.props.activeIndex!==void 0?C.props.activeIndex:Z;return[y.cloneElement(C,Ee(Ee(Ee({},F.props),Ze),{},{activeIndex:lt})),null,null]}if(!zt($e))return[Pe].concat(gh(E.renderActivePoints({item:F,activePoint:$e,basePoint:be,childIndex:Z,isRange:Y})))}else{var It,mn=(It=E.getItemByXY(E.state.activeCoordinate))!==null&&It!==void 0?It:{graphicalItem:Pe},en=mn.graphicalItem,re=en.item,pe=re===void 0?C:re,ye=en.childIndex,Ue=Ee(Ee(Ee({},F.props),Ze),{},{activeIndex:ye});return[y.cloneElement(pe,Ue),null,null]}return Y?[Pe,null,null]:[Pe,null]}),kt(E,"renderCustomized",function(C,T,M){return y.cloneElement(C,Ee(Ee({key:"recharts-customized-".concat(M)},E.props),E.state))}),kt(E,"renderMap",{CartesianGrid:{handler:dy,once:!0},ReferenceArea:{handler:E.renderReferenceElement},ReferenceLine:{handler:dy},ReferenceDot:{handler:E.renderReferenceElement},XAxis:{handler:dy},YAxis:{handler:dy},Brush:{handler:E.renderBrush,once:!0},Bar:{handler:E.renderGraphicChild},Line:{handler:E.renderGraphicChild},Area:{handler:E.renderGraphicChild},Radar:{handler:E.renderGraphicChild},RadialBar:{handler:E.renderGraphicChild},Scatter:{handler:E.renderGraphicChild},Pie:{handler:E.renderGraphicChild},Funnel:{handler:E.renderGraphicChild},Tooltip:{handler:E.renderCursor,once:!0},PolarGrid:{handler:E.renderPolarGrid,once:!0},PolarAngleAxis:{handler:E.renderPolarAxis},PolarRadiusAxis:{handler:E.renderPolarAxis},Customized:{handler:E.renderCustomized}}),E.clipPathId="".concat((S=x.id)!==null&&S!==void 0?S:df("recharts"),"-clip"),E.throttleTriggeredAfterMouseMove=TW(E.triggeredAfterMouseMove,(A=x.throttleDelay)!==null&&A!==void 0?A:1e3/60),E.state={},E}return jNe(w,b),INe(w,[{key:"componentDidMount",value:function(){var S,A;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(S=this.props.margin.left)!==null&&S!==void 0?S:0,top:(A=this.props.margin.top)!==null&&A!==void 0?A:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var S=this.props,A=S.children,E=S.data,C=S.height,T=S.layout,M=Oo(A,Yu);if(M){var F=M.props.defaultIndex;if(!(typeof F!="number"||F<0||F>this.state.tooltipTicks.length-1)){var U=this.state.tooltipTicks[F]&&this.state.tooltipTicks[F].value,H=O6(this.state,E,F,U),W=this.state.tooltipTicks[F].coordinate,ie=(this.state.offset.top+C)/2,Z=T==="horizontal",G=Z?{x:W,y:ie}:{y:W,x:ie},K=this.state.formattedGraphicalItems.find(function(B){var q=B.item;return q.type.name==="Scatter"});K&&(G=Ee(Ee({},G),K.props.points[F].tooltipPosition),H=K.props.points[F].tooltipPayload);var V={activeTooltipIndex:F,isTooltipActive:!0,activeLabel:U,activePayload:H,activeCoordinate:G};this.setState(V),this.renderCursor(M),this.accessibilityManager.setIndex(F)}}}},{key:"getSnapshotBeforeUpdate",value:function(S,A){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==A.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==S.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==S.margin){var E,C;this.accessibilityManager.setDetails({offset:{left:(E=this.props.margin.left)!==null&&E!==void 0?E:0,top:(C=this.props.margin.top)!==null&&C!==void 0?C:0}})}return null}},{key:"componentDidUpdate",value:function(S){nE([Oo(S.children,Yu)],[Oo(this.props.children,Yu)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var S=Oo(this.props.children,Yu);if(S&&typeof S.props.shared=="boolean"){var A=S.props.shared?"axis":"item";return u.indexOf(A)>=0?A:o}return o}},{key:"getMouseInfo",value:function(S){if(!this.container)return null;var A=this.container,E=A.getBoundingClientRect(),C=xPe(E),T={chartX:Math.round(S.pageX-C.left),chartY:Math.round(S.pageY-C.top)},M=E.width/A.offsetWidth||1,F=this.inRange(T.chartX,T.chartY,M);if(!F)return null;var U=this.state,H=U.xAxisMap,W=U.yAxisMap,ie=this.getTooltipEventType();if(ie!=="axis"&&H&&W){var Z=Js(H).scale,G=Js(W).scale,K=Z&&Z.invert?Z.invert(T.chartX):null,V=G&&G.invert?G.invert(T.chartY):null;return Ee(Ee({},T),{},{xValue:K,yValue:V})}var B=A$(this.state,this.props.data,this.props.layout,F);return B?Ee(Ee({},T),B):null}},{key:"inRange",value:function(S,A){var E=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,C=this.props.layout,T=S/E,M=A/E;if(C==="horizontal"||C==="vertical"){var F=this.state.offset,U=T>=F.left&&T<=F.left+F.width&&M>=F.top&&M<=F.top+F.height;return U?{x:T,y:M}:null}var H=this.state,W=H.angleAxisMap,ie=H.radiusAxisMap;if(W&&ie){var Z=Js(W);return r7({x:T,y:M},Z)}return null}},{key:"parseEventsOfWrapper",value:function(){var S=this.props.children,A=this.getTooltipEventType(),E=Oo(S,Yu),C={};E&&A==="axis"&&(E.props.trigger==="click"?C={onClick:this.handleClick}:C={onMouseEnter:this.handleMouseEnter,onDoubleClick:this.handleDoubleClick,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onContextMenu:this.handleContextMenu});var T=Y1(this.props,this.handleOuterEvent);return Ee(Ee({},T),C)}},{key:"addListener",value:function(){WS.on(VS,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){WS.removeListener(VS,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(S,A,E){for(var C=this.state.formattedGraphicalItems,T=0,M=C.length;T{const{__scopeTabs:n,value:r,onValueChange:i,defaultValue:o,orientation:a="horizontal",dir:u,activationMode:s="automatic",...l}=e,c=hg(u),[d,h]=Ga({prop:r,onChange:i,defaultProp:o});return I.jsx(rFe,{scope:n,baseId:No(),value:d,onValueChange:h,orientation:a,dir:c,activationMode:s,children:I.jsx(pt.div,{dir:c,"data-orientation":a,...l,ref:t})})});ZH.displayName=fO;var XH="TabsList",QH=y.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...i}=e,o=dO(XH,n),a=YH(n);return I.jsx(KB,{asChild:!0,...a,orientation:o.orientation,dir:o.dir,loop:r,children:I.jsx(pt.div,{role:"tablist","aria-orientation":o.orientation,...i,ref:t})})});QH.displayName=XH;var JH="TabsTrigger",eq=y.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:i=!1,...o}=e,a=dO(JH,n),u=YH(n),s=rq(a.baseId,r),l=iq(a.baseId,r),c=r===a.value;return I.jsx(GB,{asChild:!0,...u,focusable:!i,active:c,children:I.jsx(pt.button,{type:"button",role:"tab","aria-selected":c,"aria-controls":l,"data-state":c?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:s,...o,ref:t,onMouseDown:Ye(e.onMouseDown,d=>{!i&&d.button===0&&d.ctrlKey===!1?a.onValueChange(r):d.preventDefault()}),onKeyDown:Ye(e.onKeyDown,d=>{[" ","Enter"].includes(d.key)&&a.onValueChange(r)}),onFocus:Ye(e.onFocus,()=>{const d=a.activationMode!=="manual";!c&&!i&&d&&a.onValueChange(r)})})})});eq.displayName=JH;var tq="TabsContent",nq=y.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:i,children:o,...a}=e,u=dO(tq,n),s=rq(u.baseId,r),l=iq(u.baseId,r),c=r===u.value,d=y.useRef(c);return y.useEffect(()=>{const h=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(h)},[]),I.jsx(ii,{present:i||c,children:({present:h})=>I.jsx(pt.div,{"data-state":c?"active":"inactive","data-orientation":u.orientation,role:"tabpanel","aria-labelledby":s,hidden:!h,id:l,tabIndex:0,...a,ref:t,style:{...e.style,animationDuration:d.current?"0s":void 0},children:h&&o})})});nq.displayName=tq;function rq(e,t){return`${e}-trigger-${t}`}function iq(e,t){return`${e}-content-${t}`}var wYe=ZH,_Ye=QH,SYe=eq,CYe=nq;const hO=6048e5,iFe=864e5,k$=Symbol.for("constructDateFrom");function ri(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&k$ in e?e[k$](t):e instanceof Date?new e.constructor(t):new Date(t)}function Rn(e,t){return ri(t||e,e)}function Ui(e,t,n){const r=Rn(e,n?.in);return isNaN(t)?ri(n?.in||e,NaN):(t&&r.setDate(r.getDate()+t),r)}function Za(e,t,n){const r=Rn(e,n?.in);if(isNaN(t))return ri(n?.in||e,NaN);if(!t)return r;const i=r.getDate(),o=ri(n?.in||e,r.getTime());o.setMonth(r.getMonth()+t+1,0);const a=o.getDate();return i>=a?o:(r.setFullYear(o.getFullYear(),o.getMonth(),i),r)}let oFe={};function Og(){return oFe}function ma(e,t){const n=Og(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=Rn(e,t?.in),o=i.getDay(),a=(o=o.getTime()?r+1:n.getTime()>=u.getTime()?r:r-1}function Yb(e){const t=Rn(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function gf(e,...t){const n=ri.bind(null,e||t.find(r=>typeof r=="object"));return t.map(n)}function tf(e,t){const n=Rn(e,t?.in);return n.setHours(0,0,0,0),n}function gu(e,t,n){const[r,i]=gf(n?.in,e,t),o=tf(r),a=tf(i),u=+o-Yb(o),s=+a-Yb(a);return Math.round((u-s)/iFe)}function aFe(e,t){const n=oq(e,t),r=ri(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),ef(r)}function k6(e,t,n){return Ui(e,t*7,n)}function uFe(e,t,n){return Za(e,t*12,n)}function sFe(e,t){let n,r=t?.in;return e.forEach(i=>{!r&&typeof i=="object"&&(r=ri.bind(null,i));const o=Rn(i,r);(!n||n{!r&&typeof i=="object"&&(r=ri.bind(null,i));const o=Rn(i,r);(!n||n>o||isNaN(+o))&&(n=o)}),ri(r,n||NaN)}function ao(e,t,n){const[r,i]=gf(n?.in,e,t);return+tf(r)==+tf(i)}function pO(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function cFe(e){return!(!pO(e)&&typeof e!="number"||isNaN(+Rn(e)))}function Wv(e,t,n){const[r,i]=gf(n?.in,e,t),o=r.getFullYear()-i.getFullYear(),a=r.getMonth()-i.getMonth();return o*12+a}function fFe(e,t,n){const[r,i]=gf(n?.in,e,t),o=ma(r,n),a=ma(i,n),u=+o-Yb(o),s=+a-Yb(a);return Math.round((u-s)/hO)}function vO(e,t){const n=Rn(e,t?.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function ho(e,t){const n=Rn(e,t?.in);return n.setDate(1),n.setHours(0,0,0,0),n}function aq(e,t){const n=Rn(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function gO(e,t){const n=Og(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=Rn(e,t?.in),o=i.getDay(),a=(o{let r;const i=dFe[e];return typeof i=="string"?r=i:t===1?r=i.one:r=i.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function kd(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const pFe={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},vFe={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},gFe={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},mFe={date:kd({formats:pFe,defaultWidth:"full"}),time:kd({formats:vFe,defaultWidth:"full"}),dateTime:kd({formats:gFe,defaultWidth:"full"})},yFe={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},bFe=(e,t,n,r)=>yFe[e];function fu(e){return(t,n)=>{const r=n?.context?String(n.context):"standalone";let i;if(r==="formatting"&&e.formattingValues){const a=e.defaultFormattingWidth||e.defaultWidth,u=n?.width?String(n.width):a;i=e.formattingValues[u]||e.formattingValues[a]}else{const a=e.defaultWidth,u=n?.width?String(n.width):e.defaultWidth;i=e.values[u]||e.values[a]}const o=e.argumentCallback?e.argumentCallback(t):t;return i[o]}}const xFe={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},wFe={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},_Fe={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},SFe={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},CFe={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},EFe={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},AFe=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},PFe={ordinalNumber:AFe,era:fu({values:xFe,defaultWidth:"wide"}),quarter:fu({values:wFe,defaultWidth:"wide",argumentCallback:e=>e-1}),month:fu({values:_Fe,defaultWidth:"wide"}),day:fu({values:SFe,defaultWidth:"wide"}),dayPeriod:fu({values:CFe,defaultWidth:"wide",formattingValues:EFe,defaultFormattingWidth:"wide"})};function du(e){return(t,n={})=>{const r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],o=t.match(i);if(!o)return null;const a=o[0],u=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],s=Array.isArray(u)?kFe(u,d=>d.test(a)):OFe(u,d=>d.test(a));let l;l=e.valueCallback?e.valueCallback(s):s,l=n.valueCallback?n.valueCallback(l):l;const c=t.slice(a.length);return{value:l,rest:c}}}function OFe(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function kFe(e,t){for(let n=0;n{const r=t.match(e.matchPattern);if(!r)return null;const i=r[0],o=t.match(e.parsePattern);if(!o)return null;let a=e.valueCallback?e.valueCallback(o[0]):o[0];a=n.valueCallback?n.valueCallback(a):a;const u=t.slice(i.length);return{value:a,rest:u}}}const TFe=/^(\d+)(th|st|nd|rd)?/i,MFe=/\d+/i,RFe={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},DFe={any:[/^b/i,/^(a|c)/i]},$Fe={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},IFe={any:[/1/i,/2/i,/3/i,/4/i]},NFe={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},FFe={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},LFe={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},jFe={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},BFe={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},zFe={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},UFe={ordinalNumber:sq({matchPattern:TFe,parsePattern:MFe,valueCallback:e=>parseInt(e,10)}),era:du({matchPatterns:RFe,defaultMatchWidth:"wide",parsePatterns:DFe,defaultParseWidth:"any"}),quarter:du({matchPatterns:$Fe,defaultMatchWidth:"wide",parsePatterns:IFe,defaultParseWidth:"any",valueCallback:e=>e+1}),month:du({matchPatterns:NFe,defaultMatchWidth:"wide",parsePatterns:FFe,defaultParseWidth:"any"}),day:du({matchPatterns:LFe,defaultMatchWidth:"wide",parsePatterns:jFe,defaultParseWidth:"any"}),dayPeriod:du({matchPatterns:BFe,defaultMatchWidth:"any",parsePatterns:zFe,defaultParseWidth:"any"})},lq={code:"en-US",formatDistance:hFe,formatLong:mFe,formatRelative:bFe,localize:PFe,match:UFe,options:{weekStartsOn:0,firstWeekContainsDate:1}};function WFe(e,t){const n=Rn(e,t?.in);return gu(n,aq(n))+1}function cq(e,t){const n=Rn(e,t?.in),r=+ef(n)-+aFe(n);return Math.round(r/hO)+1}function fq(e,t){const n=Rn(e,t?.in),r=n.getFullYear(),i=Og(),o=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,a=ri(t?.in||e,0);a.setFullYear(r+1,0,o),a.setHours(0,0,0,0);const u=ma(a,t),s=ri(t?.in||e,0);s.setFullYear(r,0,o),s.setHours(0,0,0,0);const l=ma(s,t);return+n>=+u?r+1:+n>=+l?r:r-1}function VFe(e,t){const n=Og(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,i=fq(e,t),o=ri(t?.in||e,0);return o.setFullYear(i,0,r),o.setHours(0,0,0,0),ma(o,t)}function dq(e,t){const n=Rn(e,t?.in),r=+ma(n,t)-+VFe(n,t);return Math.round(r/hO)+1}function Tn(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const Us={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return Tn(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):Tn(n+1,2)},d(e,t){return Tn(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return Tn(e.getHours()%12||12,t.length)},H(e,t){return Tn(e.getHours(),t.length)},m(e,t){return Tn(e.getMinutes(),t.length)},s(e,t){return Tn(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),i=Math.trunc(r*Math.pow(10,n-3));return Tn(i,t.length)}},Hf={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},T$={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),i=r>0?r:1-r;return n.ordinalNumber(i,{unit:"year"})}return Us.y(e,t)},Y:function(e,t,n,r){const i=fq(e,r),o=i>0?i:1-i;if(t==="YY"){const a=o%100;return Tn(a,2)}return t==="Yo"?n.ordinalNumber(o,{unit:"year"}):Tn(o,t.length)},R:function(e,t){const n=oq(e);return Tn(n,t.length)},u:function(e,t){const n=e.getFullYear();return Tn(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return Tn(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return Tn(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return Us.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return Tn(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const i=dq(e,r);return t==="wo"?n.ordinalNumber(i,{unit:"week"}):Tn(i,t.length)},I:function(e,t,n){const r=cq(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):Tn(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):Us.d(e,t)},D:function(e,t,n){const r=WFe(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):Tn(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const i=e.getDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return Tn(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});case"eeee":default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const i=e.getDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return Tn(o,t.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});case"cccc":default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),i=r===0?7:r;switch(t){case"i":return String(i);case"ii":return Tn(i,t.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const i=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let i;switch(r===12?i=Hf.noon:r===0?i=Hf.midnight:i=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let i;switch(r>=17?i=Hf.evening:r>=12?i=Hf.afternoon:r>=4?i=Hf.morning:i=Hf.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return Us.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Us.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):Tn(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):Tn(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Us.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Us.s(e,t)},S:function(e,t){return Us.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return R$(r);case"XXXX":case"XX":return cc(r);case"XXXXX":case"XXX":default:return cc(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return R$(r);case"xxxx":case"xx":return cc(r);case"xxxxx":case"xxx":default:return cc(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+M$(r,":");case"OOOO":default:return"GMT"+cc(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+M$(r,":");case"zzzz":default:return"GMT"+cc(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return Tn(r,t.length)},T:function(e,t,n){return Tn(+e,t.length)}};function M$(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Math.trunc(r/60),o=r%60;return o===0?n+String(i):n+String(i)+t+Tn(o,2)}function R$(e,t){return e%60===0?(e>0?"-":"+")+Tn(Math.abs(e)/60,2):cc(e,t)}function cc(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Tn(Math.trunc(r/60),2),o=Tn(r%60,2);return n+i+t+o}const D$=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},hq=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},HFe=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return D$(e,t);let o;switch(r){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;case"PPPP":default:o=t.dateTime({width:"full"});break}return o.replace("{{date}}",D$(r,t)).replace("{{time}}",hq(i,t))},qFe={p:hq,P:HFe},KFe=/^D+$/,GFe=/^Y+$/,YFe=["D","DD","YY","YYYY"];function ZFe(e){return KFe.test(e)}function XFe(e){return GFe.test(e)}function QFe(e,t,n){const r=JFe(e,t,n);if(console.warn(r),YFe.includes(e))throw new RangeError(r)}function JFe(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const eLe=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,tLe=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,nLe=/^'([^]*?)'?$/,rLe=/''/g,iLe=/[a-zA-Z]/;function mf(e,t,n){const r=Og(),i=n?.locale??r.locale??lq,o=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,a=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,u=Rn(e,n?.in);if(!cFe(u))throw new RangeError("Invalid time value");let s=t.match(tLe).map(c=>{const d=c[0];if(d==="p"||d==="P"){const h=qFe[d];return h(c,i.formatLong)}return c}).join("").match(eLe).map(c=>{if(c==="''")return{isToken:!1,value:"'"};const d=c[0];if(d==="'")return{isToken:!1,value:oLe(c)};if(T$[d])return{isToken:!0,value:c};if(d.match(iLe))throw new RangeError("Format string contains an unescaped latin alphabet character `"+d+"`");return{isToken:!1,value:c}});i.localize.preprocessor&&(s=i.localize.preprocessor(u,s));const l={firstWeekContainsDate:o,weekStartsOn:a,locale:i};return s.map(c=>{if(!c.isToken)return c.value;const d=c.value;(!n?.useAdditionalWeekYearTokens&&XFe(d)||!n?.useAdditionalDayOfYearTokens&&ZFe(d))&&QFe(d,t,String(e));const h=T$[d[0]];return h(u,d,i.localize,l)}).join("")}function oLe(e){const t=e.match(nLe);return t?t[1].replace(rLe,"'"):e}function aLe(e,t){const n=Rn(e,t?.in),r=n.getFullYear(),i=n.getMonth(),o=ri(n,0);return o.setFullYear(r,i+1,0),o.setHours(0,0,0,0),o.getDate()}function uLe(e){return Math.trunc(+Rn(e)/1e3)}function sLe(e,t){const n=Rn(e,t?.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(0,0,0,0),Rn(n,t?.in)}function lLe(e,t){const n=Rn(e,t?.in);return fFe(sLe(n,t),ho(n,t),t)+1}function T6(e,t){return+Rn(e)>+Rn(t)}function pq(e,t){return+Rn(e)<+Rn(t)}function cLe(e,t,n){const[r,i]=gf(n?.in,e,t);return+ma(r,n)==+ma(i,n)}function mO(e,t,n){const[r,i]=gf(n?.in,e,t);return r.getFullYear()===i.getFullYear()&&r.getMonth()===i.getMonth()}function fLe(e,t,n){const[r,i]=gf(n?.in,e,t);return r.getFullYear()===i.getFullYear()}function qS(e,t,n){return Ui(e,-t,n)}function KS(e,t,n){const r=Rn(e,n?.in),i=r.getFullYear(),o=r.getDate(),a=ri(e,0);a.setFullYear(i,t,15),a.setHours(0,0,0,0);const u=aLe(a);return r.setMonth(t,Math.min(o,u)),r}function $$(e,t,n){const r=Rn(e,n?.in);return isNaN(+r)?ri(e,NaN):(r.setFullYear(t),r)}function EYe(e){return tf(Date.now(),e)}const dLe={lessThanXSeconds:{one:"不到 1 秒",other:"不到 {{count}} 秒"},xSeconds:{one:"1 秒",other:"{{count}} 秒"},halfAMinute:"半分钟",lessThanXMinutes:{one:"不到 1 分钟",other:"不到 {{count}} 分钟"},xMinutes:{one:"1 分钟",other:"{{count}} 分钟"},xHours:{one:"1 小时",other:"{{count}} 小时"},aboutXHours:{one:"大约 1 小时",other:"大约 {{count}} 小时"},xDays:{one:"1 天",other:"{{count}} 天"},aboutXWeeks:{one:"大约 1 个星期",other:"大约 {{count}} 个星期"},xWeeks:{one:"1 个星期",other:"{{count}} 个星期"},aboutXMonths:{one:"大约 1 个月",other:"大约 {{count}} 个月"},xMonths:{one:"1 个月",other:"{{count}} 个月"},aboutXYears:{one:"大约 1 年",other:"大约 {{count}} 年"},xYears:{one:"1 年",other:"{{count}} 年"},overXYears:{one:"超过 1 年",other:"超过 {{count}} 年"},almostXYears:{one:"将近 1 年",other:"将近 {{count}} 年"}},hLe=(e,t,n)=>{let r;const i=dLe[e];return typeof i=="string"?r=i:t===1?r=i.one:r=i.other.replace("{{count}}",String(t)),n?.addSuffix?n.comparison&&n.comparison>0?r+"内":r+"前":r},pLe={full:"y'年'M'月'd'日' EEEE",long:"y'年'M'月'd'日'",medium:"yyyy-MM-dd",short:"yy-MM-dd"},vLe={full:"zzzz a h:mm:ss",long:"z a h:mm:ss",medium:"a h:mm:ss",short:"a h:mm"},gLe={full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},mLe={date:kd({formats:pLe,defaultWidth:"full"}),time:kd({formats:vLe,defaultWidth:"full"}),dateTime:kd({formats:gLe,defaultWidth:"full"})};function I$(e,t,n){const r="eeee p";return cLe(e,t,n)?r:e.getTime()>t.getTime()?"'下个'"+r:"'上个'"+r}const yLe={lastWeek:I$,yesterday:"'昨天' p",today:"'今天' p",tomorrow:"'明天' p",nextWeek:I$,other:"PP p"},bLe=(e,t,n,r)=>{const i=yLe[e];return typeof i=="function"?i(t,n,r):i},xLe={narrow:["前","公元"],abbreviated:["前","公元"],wide:["公元前","公元"]},wLe={narrow:["1","2","3","4"],abbreviated:["第一季","第二季","第三季","第四季"],wide:["第一季度","第二季度","第三季度","第四季度"]},_Le={narrow:["一","二","三","四","五","六","七","八","九","十","十一","十二"],abbreviated:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],wide:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]},SLe={narrow:["日","一","二","三","四","五","六"],short:["日","一","二","三","四","五","六"],abbreviated:["周日","周一","周二","周三","周四","周五","周六"],wide:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"]},CLe={narrow:{am:"上",pm:"下",midnight:"凌晨",noon:"午",morning:"早",afternoon:"下午",evening:"晚",night:"夜"},abbreviated:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜间"},wide:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜间"}},ELe={narrow:{am:"上",pm:"下",midnight:"凌晨",noon:"午",morning:"早",afternoon:"下午",evening:"晚",night:"夜"},abbreviated:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜间"},wide:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜间"}},ALe=(e,t)=>{const n=Number(e);switch(t?.unit){case"date":return n.toString()+"日";case"hour":return n.toString()+"时";case"minute":return n.toString()+"分";case"second":return n.toString()+"秒";default:return"第 "+n.toString()}},PLe={ordinalNumber:ALe,era:fu({values:xLe,defaultWidth:"wide"}),quarter:fu({values:wLe,defaultWidth:"wide",argumentCallback:e=>e-1}),month:fu({values:_Le,defaultWidth:"wide"}),day:fu({values:SLe,defaultWidth:"wide"}),dayPeriod:fu({values:CLe,defaultWidth:"wide",formattingValues:ELe,defaultFormattingWidth:"wide"})},OLe=/^(第\s*)?\d+(日|时|分|秒)?/i,kLe=/\d+/i,TLe={narrow:/^(前)/i,abbreviated:/^(前)/i,wide:/^(公元前|公元)/i},MLe={any:[/^(前)/i,/^(公元)/i]},RLe={narrow:/^[1234]/i,abbreviated:/^第[一二三四]刻/i,wide:/^第[一二三四]刻钟/i},DLe={any:[/(1|一)/i,/(2|二)/i,/(3|三)/i,/(4|四)/i]},$Le={narrow:/^(一|二|三|四|五|六|七|八|九|十[二一])/i,abbreviated:/^(一|二|三|四|五|六|七|八|九|十[二一]|\d|1[12])月/i,wide:/^(一|二|三|四|五|六|七|八|九|十[二一])月/i},ILe={narrow:[/^一/i,/^二/i,/^三/i,/^四/i,/^五/i,/^六/i,/^七/i,/^八/i,/^九/i,/^十(?!(一|二))/i,/^十一/i,/^十二/i],any:[/^一|1/i,/^二|2/i,/^三|3/i,/^四|4/i,/^五|5/i,/^六|6/i,/^七|7/i,/^八|8/i,/^九|9/i,/^十(?!(一|二))|10/i,/^十一|11/i,/^十二|12/i]},NLe={narrow:/^[一二三四五六日]/i,short:/^[一二三四五六日]/i,abbreviated:/^周[一二三四五六日]/i,wide:/^星期[一二三四五六日]/i},FLe={any:[/日/i,/一/i,/二/i,/三/i,/四/i,/五/i,/六/i]},LLe={any:/^(上午?|下午?|午夜|[中正]午|早上?|下午|晚上?|凌晨|)/i},jLe={any:{am:/^上午?/i,pm:/^下午?/i,midnight:/^午夜/i,noon:/^[中正]午/i,morning:/^早上/i,afternoon:/^下午/i,evening:/^晚上?/i,night:/^凌晨/i}},BLe={ordinalNumber:sq({matchPattern:OLe,parsePattern:kLe,valueCallback:e=>parseInt(e,10)}),era:du({matchPatterns:TLe,defaultMatchWidth:"wide",parsePatterns:MLe,defaultParseWidth:"any"}),quarter:du({matchPatterns:RLe,defaultMatchWidth:"wide",parsePatterns:DLe,defaultParseWidth:"any",valueCallback:e=>e+1}),month:du({matchPatterns:$Le,defaultMatchWidth:"wide",parsePatterns:ILe,defaultParseWidth:"any"}),day:du({matchPatterns:NLe,defaultMatchWidth:"wide",parsePatterns:FLe,defaultParseWidth:"any"}),dayPeriod:du({matchPatterns:LLe,defaultMatchWidth:"any",parsePatterns:jLe,defaultParseWidth:"any"})},AYe={code:"zh-CN",formatDistance:hLe,formatLong:mLe,formatRelative:bLe,localize:PLe,match:BLe,options:{weekStartsOn:1,firstWeekContainsDate:4}};function M6(e,[t,n]){return Math.min(n,Math.max(t,e))}function yO(e){const t=y.useRef({value:e,previous:e});return y.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var zLe=[" ","Enter","ArrowUp","ArrowDown"],ULe=[" ","Enter"],kg="Select",[qw,Kw,WLe]=RA(kg),[Yh,PYe]=mi(kg,[WLe,Fl]),Gw=Fl(),[VLe,Wl]=Yh(kg),[HLe,qLe]=Yh(kg),vq=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:o,value:a,defaultValue:u,onValueChange:s,dir:l,name:c,autoComplete:d,disabled:h,required:v,form:g}=e,m=Gw(t),[b,w]=y.useState(null),[x,S]=y.useState(null),[A,E]=y.useState(!1),C=hg(l),[T=!1,M]=Ga({prop:r,defaultProp:i,onChange:o}),[F,U]=Ga({prop:a,defaultProp:u,onChange:s}),H=y.useRef(null),W=b?g||!!b.closest("form"):!0,[ie,Z]=y.useState(new Set),G=Array.from(ie).map(K=>K.props.value).join(";");return I.jsx(Ux,{...m,children:I.jsxs(VLe,{required:v,scope:t,trigger:b,onTriggerChange:w,valueNode:x,onValueNodeChange:S,valueNodeHasChildren:A,onValueNodeHasChildrenChange:E,contentId:No(),value:F,onValueChange:U,open:T,onOpenChange:M,dir:C,triggerPointerDownPosRef:H,disabled:h,children:[I.jsx(qw.Provider,{scope:t,children:I.jsx(HLe,{scope:e.__scopeSelect,onNativeOptionAdd:y.useCallback(K=>{Z(V=>new Set(V).add(K))},[]),onNativeOptionRemove:y.useCallback(K=>{Z(V=>{const B=new Set(V);return B.delete(K),B})},[]),children:n})}),W?I.jsxs(zq,{"aria-hidden":!0,required:v,tabIndex:-1,name:c,autoComplete:d,value:F,onChange:K=>U(K.target.value),disabled:h,form:g,children:[F===void 0?I.jsx("option",{value:""}):null,Array.from(ie)]},G):null]})})};vq.displayName=kg;var gq="SelectTrigger",mq=y.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...i}=e,o=Gw(n),a=Wl(gq,n),u=a.disabled||r,s=Kt(t,a.onTriggerChange),l=Kw(n),c=y.useRef("touch"),[d,h,v]=Uq(m=>{const b=l().filter(S=>!S.disabled),w=b.find(S=>S.value===a.value),x=Wq(b,m,w);x!==void 0&&a.onValueChange(x.value)}),g=m=>{u||(a.onOpenChange(!0),v()),m&&(a.triggerPointerDownPosRef.current={x:Math.round(m.pageX),y:Math.round(m.pageY)})};return I.jsx(vg,{asChild:!0,...o,children:I.jsx(pt.button,{type:"button",role:"combobox","aria-controls":a.contentId,"aria-expanded":a.open,"aria-required":a.required,"aria-autocomplete":"none",dir:a.dir,"data-state":a.open?"open":"closed",disabled:u,"data-disabled":u?"":void 0,"data-placeholder":Bq(a.value)?"":void 0,...i,ref:s,onClick:Ye(i.onClick,m=>{m.currentTarget.focus(),c.current!=="mouse"&&g(m)}),onPointerDown:Ye(i.onPointerDown,m=>{c.current=m.pointerType;const b=m.target;b.hasPointerCapture(m.pointerId)&&b.releasePointerCapture(m.pointerId),m.button===0&&m.ctrlKey===!1&&m.pointerType==="mouse"&&(g(m),m.preventDefault())}),onKeyDown:Ye(i.onKeyDown,m=>{const b=d.current!=="";!(m.ctrlKey||m.altKey||m.metaKey)&&m.key.length===1&&h(m.key),!(b&&m.key===" ")&&zLe.includes(m.key)&&(g(),m.preventDefault())})})})});mq.displayName=gq;var yq="SelectValue",bq=y.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,children:o,placeholder:a="",...u}=e,s=Wl(yq,n),{onValueNodeHasChildrenChange:l}=s,c=o!==void 0,d=Kt(t,s.onValueNodeChange);return ni(()=>{l(c)},[l,c]),I.jsx(pt.span,{...u,ref:d,style:{pointerEvents:"none"},children:Bq(s.value)?I.jsx(I.Fragment,{children:a}):o})});bq.displayName=yq;var KLe="SelectIcon",xq=y.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...i}=e;return I.jsx(pt.span,{"aria-hidden":!0,...i,ref:t,children:r||"▼"})});xq.displayName=KLe;var GLe="SelectPortal",wq=e=>I.jsx(cg,{asChild:!0,...e});wq.displayName=GLe;var nf="SelectContent",_q=y.forwardRef((e,t)=>{const n=Wl(nf,e.__scopeSelect),[r,i]=y.useState();if(ni(()=>{i(new DocumentFragment)},[]),!n.open){const o=r;return o?Ss.createPortal(I.jsx(Sq,{scope:e.__scopeSelect,children:I.jsx(qw.Slot,{scope:e.__scopeSelect,children:I.jsx("div",{children:e.children})})}),o):null}return I.jsx(Cq,{...e,ref:t})});_q.displayName=nf;var Oa=10,[Sq,Vl]=Yh(nf),YLe="SelectContentImpl",Cq=y.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:o,onPointerDownOutside:a,side:u,sideOffset:s,align:l,alignOffset:c,arrowPadding:d,collisionBoundary:h,collisionPadding:v,sticky:g,hideWhenDetached:m,avoidCollisions:b,...w}=e,x=Wl(nf,n),[S,A]=y.useState(null),[E,C]=y.useState(null),T=Kt(t,ge=>A(ge)),[M,F]=y.useState(null),[U,H]=y.useState(null),W=Kw(n),[ie,Z]=y.useState(!1),G=y.useRef(!1);y.useEffect(()=>{if(S)return dg(S)},[S]),Lx();const K=y.useCallback(ge=>{const[Ze,...Pe]=W().map(be=>be.ref.current),[Fe]=Pe.slice(-1),$e=document.activeElement;for(const be of ge)if(be===$e||(be?.scrollIntoView({block:"nearest"}),be===Ze&&E&&(E.scrollTop=0),be===Fe&&E&&(E.scrollTop=E.scrollHeight),be?.focus(),document.activeElement!==$e))return},[W,E]),V=y.useCallback(()=>K([M,S]),[K,M,S]);y.useEffect(()=>{ie&&V()},[ie,V]);const{onOpenChange:B,triggerPointerDownPosRef:q}=x;y.useEffect(()=>{if(S){let ge={x:0,y:0};const Ze=Fe=>{ge={x:Math.abs(Math.round(Fe.pageX)-(q.current?.x??0)),y:Math.abs(Math.round(Fe.pageY)-(q.current?.y??0))}},Pe=Fe=>{ge.x<=10&&ge.y<=10?Fe.preventDefault():S.contains(Fe.target)||B(!1),document.removeEventListener("pointermove",Ze),q.current=null};return q.current!==null&&(document.addEventListener("pointermove",Ze),document.addEventListener("pointerup",Pe,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Ze),document.removeEventListener("pointerup",Pe,{capture:!0})}}},[S,B,q]),y.useEffect(()=>{const ge=()=>B(!1);return window.addEventListener("blur",ge),window.addEventListener("resize",ge),()=>{window.removeEventListener("blur",ge),window.removeEventListener("resize",ge)}},[B]);const[Y,ue]=Uq(ge=>{const Ze=W().filter($e=>!$e.disabled),Pe=Ze.find($e=>$e.ref.current===document.activeElement),Fe=Wq(Ze,ge,Pe);Fe&&setTimeout(()=>Fe.ref.current.focus())}),Q=y.useCallback((ge,Ze,Pe)=>{const Fe=!G.current&&!Pe;(x.value!==void 0&&x.value===Ze||Fe)&&(F(ge),Fe&&(G.current=!0))},[x.value]),J=y.useCallback(()=>S?.focus(),[S]),se=y.useCallback((ge,Ze,Pe)=>{const Fe=!G.current&&!Pe;(x.value!==void 0&&x.value===Ze||Fe)&&H(ge)},[x.value]),de=r==="popper"?R6:Eq,Se=de===R6?{side:u,sideOffset:s,align:l,alignOffset:c,arrowPadding:d,collisionBoundary:h,collisionPadding:v,sticky:g,hideWhenDetached:m,avoidCollisions:b}:{};return I.jsx(Sq,{scope:n,content:S,viewport:E,onViewportChange:C,itemRefCallback:Q,selectedItem:M,onItemLeave:J,itemTextRefCallback:se,focusSelectedItem:V,selectedItemText:U,position:r,isPositioned:ie,searchRef:Y,children:I.jsx(fg,{as:Sl,allowPinchZoom:!0,children:I.jsx(lg,{asChild:!0,trapped:x.open,onMountAutoFocus:ge=>{ge.preventDefault()},onUnmountAutoFocus:Ye(i,ge=>{x.trigger?.focus({preventScroll:!0}),ge.preventDefault()}),children:I.jsx(kh,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:ge=>ge.preventDefault(),onDismiss:()=>x.onOpenChange(!1),children:I.jsx(de,{role:"listbox",id:x.contentId,"data-state":x.open?"open":"closed",dir:x.dir,onContextMenu:ge=>ge.preventDefault(),...w,...Se,onPlaced:()=>Z(!0),ref:T,style:{display:"flex",flexDirection:"column",outline:"none",...w.style},onKeyDown:Ye(w.onKeyDown,ge=>{const Ze=ge.ctrlKey||ge.altKey||ge.metaKey;if(ge.key==="Tab"&&ge.preventDefault(),!Ze&&ge.key.length===1&&ue(ge.key),["ArrowUp","ArrowDown","Home","End"].includes(ge.key)){let Fe=W().filter($e=>!$e.disabled).map($e=>$e.ref.current);if(["ArrowUp","End"].includes(ge.key)&&(Fe=Fe.slice().reverse()),["ArrowUp","ArrowDown"].includes(ge.key)){const $e=ge.target,be=Fe.indexOf($e);Fe=Fe.slice(be+1)}setTimeout(()=>K(Fe)),ge.preventDefault()}})})})})})})});Cq.displayName=YLe;var ZLe="SelectItemAlignedPosition",Eq=y.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...i}=e,o=Wl(nf,n),a=Vl(nf,n),[u,s]=y.useState(null),[l,c]=y.useState(null),d=Kt(t,T=>c(T)),h=Kw(n),v=y.useRef(!1),g=y.useRef(!0),{viewport:m,selectedItem:b,selectedItemText:w,focusSelectedItem:x}=a,S=y.useCallback(()=>{if(o.trigger&&o.valueNode&&u&&l&&m&&b&&w){const T=o.trigger.getBoundingClientRect(),M=l.getBoundingClientRect(),F=o.valueNode.getBoundingClientRect(),U=w.getBoundingClientRect();if(o.dir!=="rtl"){const $e=U.left-M.left,be=F.left-$e,yt=T.left-be,lt=T.width+yt,It=Math.max(lt,M.width),mn=window.innerWidth-Oa,en=M6(be,[Oa,Math.max(Oa,mn-It)]);u.style.minWidth=lt+"px",u.style.left=en+"px"}else{const $e=M.right-U.right,be=window.innerWidth-F.right-$e,yt=window.innerWidth-T.right-be,lt=T.width+yt,It=Math.max(lt,M.width),mn=window.innerWidth-Oa,en=M6(be,[Oa,Math.max(Oa,mn-It)]);u.style.minWidth=lt+"px",u.style.right=en+"px"}const H=h(),W=window.innerHeight-Oa*2,ie=m.scrollHeight,Z=window.getComputedStyle(l),G=parseInt(Z.borderTopWidth,10),K=parseInt(Z.paddingTop,10),V=parseInt(Z.borderBottomWidth,10),B=parseInt(Z.paddingBottom,10),q=G+K+ie+B+V,Y=Math.min(b.offsetHeight*5,q),ue=window.getComputedStyle(m),Q=parseInt(ue.paddingTop,10),J=parseInt(ue.paddingBottom,10),se=T.top+T.height/2-Oa,de=W-se,Se=b.offsetHeight/2,ge=b.offsetTop+Se,Ze=G+K+ge,Pe=q-Ze;if(Ze<=se){const $e=H.length>0&&b===H[H.length-1].ref.current;u.style.bottom="0px";const be=l.clientHeight-m.offsetTop-m.offsetHeight,yt=Math.max(de,Se+($e?J:0)+be+V),lt=Ze+yt;u.style.height=lt+"px"}else{const $e=H.length>0&&b===H[0].ref.current;u.style.top="0px";const yt=Math.max(se,G+m.offsetTop+($e?Q:0)+Se)+Pe;u.style.height=yt+"px",m.scrollTop=Ze-se+m.offsetTop}u.style.margin=`${Oa}px 0`,u.style.minHeight=Y+"px",u.style.maxHeight=W+"px",r?.(),requestAnimationFrame(()=>v.current=!0)}},[h,o.trigger,o.valueNode,u,l,m,b,w,o.dir,r]);ni(()=>S(),[S]);const[A,E]=y.useState();ni(()=>{l&&E(window.getComputedStyle(l).zIndex)},[l]);const C=y.useCallback(T=>{T&&g.current===!0&&(S(),x?.(),g.current=!1)},[S,x]);return I.jsx(QLe,{scope:n,contentWrapper:u,shouldExpandOnScrollRef:v,onScrollButtonChange:C,children:I.jsx("div",{ref:s,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:A},children:I.jsx(pt.div,{...i,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});Eq.displayName=ZLe;var XLe="SelectPopperPosition",R6=y.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:i=Oa,...o}=e,a=Gw(n);return I.jsx(Wx,{...a,...o,ref:t,align:r,collisionPadding:i,style:{boxSizing:"border-box",...o.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});R6.displayName=XLe;var[QLe,bO]=Yh(nf,{}),D6="SelectViewport",Aq=y.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...i}=e,o=Vl(D6,n),a=bO(D6,n),u=Kt(t,o.onViewportChange),s=y.useRef(0);return I.jsxs(I.Fragment,{children:[I.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),I.jsx(qw.Slot,{scope:n,children:I.jsx(pt.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:u,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:Ye(i.onScroll,l=>{const c=l.currentTarget,{contentWrapper:d,shouldExpandOnScrollRef:h}=a;if(h?.current&&d){const v=Math.abs(s.current-c.scrollTop);if(v>0){const g=window.innerHeight-Oa*2,m=parseFloat(d.style.minHeight),b=parseFloat(d.style.height),w=Math.max(m,b);if(w0?A:0,d.style.justifyContent="flex-end")}}}s.current=c.scrollTop})})})]})});Aq.displayName=D6;var Pq="SelectGroup",[JLe,eje]=Yh(Pq),Oq=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=No();return I.jsx(JLe,{scope:n,id:i,children:I.jsx(pt.div,{role:"group","aria-labelledby":i,...r,ref:t})})});Oq.displayName=Pq;var kq="SelectLabel",Tq=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=eje(kq,n);return I.jsx(pt.div,{id:i.id,...r,ref:t})});Tq.displayName=kq;var Zb="SelectItem",[tje,Mq]=Yh(Zb),Rq=y.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:i=!1,textValue:o,...a}=e,u=Wl(Zb,n),s=Vl(Zb,n),l=u.value===r,[c,d]=y.useState(o??""),[h,v]=y.useState(!1),g=Kt(t,x=>s.itemRefCallback?.(x,r,i)),m=No(),b=y.useRef("touch"),w=()=>{i||(u.onValueChange(r),u.onOpenChange(!1))};if(r==="")throw new Error("A must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return I.jsx(tje,{scope:n,value:r,disabled:i,textId:m,isSelected:l,onItemTextChange:y.useCallback(x=>{d(S=>S||(x?.textContent??"").trim())},[]),children:I.jsx(qw.ItemSlot,{scope:n,value:r,disabled:i,textValue:c,children:I.jsx(pt.div,{role:"option","aria-labelledby":m,"data-highlighted":h?"":void 0,"aria-selected":l&&h,"data-state":l?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...a,ref:g,onFocus:Ye(a.onFocus,()=>v(!0)),onBlur:Ye(a.onBlur,()=>v(!1)),onClick:Ye(a.onClick,()=>{b.current!=="mouse"&&w()}),onPointerUp:Ye(a.onPointerUp,()=>{b.current==="mouse"&&w()}),onPointerDown:Ye(a.onPointerDown,x=>{b.current=x.pointerType}),onPointerMove:Ye(a.onPointerMove,x=>{b.current=x.pointerType,i?s.onItemLeave?.():b.current==="mouse"&&x.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Ye(a.onPointerLeave,x=>{x.currentTarget===document.activeElement&&s.onItemLeave?.()}),onKeyDown:Ye(a.onKeyDown,x=>{s.searchRef?.current!==""&&x.key===" "||(ULe.includes(x.key)&&w(),x.key===" "&&x.preventDefault())})})})})});Rq.displayName=Zb;var Qp="SelectItemText",Dq=y.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,...o}=e,a=Wl(Qp,n),u=Vl(Qp,n),s=Mq(Qp,n),l=qLe(Qp,n),[c,d]=y.useState(null),h=Kt(t,w=>d(w),s.onItemTextChange,w=>u.itemTextRefCallback?.(w,s.value,s.disabled)),v=c?.textContent,g=y.useMemo(()=>I.jsx("option",{value:s.value,disabled:s.disabled,children:v},s.value),[s.disabled,s.value,v]),{onNativeOptionAdd:m,onNativeOptionRemove:b}=l;return ni(()=>(m(g),()=>b(g)),[m,b,g]),I.jsxs(I.Fragment,{children:[I.jsx(pt.span,{id:s.textId,...o,ref:h}),s.isSelected&&a.valueNode&&!a.valueNodeHasChildren?Ss.createPortal(o.children,a.valueNode):null]})});Dq.displayName=Qp;var $q="SelectItemIndicator",Iq=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return Mq($q,n).isSelected?I.jsx(pt.span,{"aria-hidden":!0,...r,ref:t}):null});Iq.displayName=$q;var $6="SelectScrollUpButton",Nq=y.forwardRef((e,t)=>{const n=Vl($6,e.__scopeSelect),r=bO($6,e.__scopeSelect),[i,o]=y.useState(!1),a=Kt(t,r.onScrollButtonChange);return ni(()=>{if(n.viewport&&n.isPositioned){let u=function(){const l=s.scrollTop>0;o(l)};const s=n.viewport;return u(),s.addEventListener("scroll",u),()=>s.removeEventListener("scroll",u)}},[n.viewport,n.isPositioned]),i?I.jsx(Lq,{...e,ref:a,onAutoScroll:()=>{const{viewport:u,selectedItem:s}=n;u&&s&&(u.scrollTop=u.scrollTop-s.offsetHeight)}}):null});Nq.displayName=$6;var I6="SelectScrollDownButton",Fq=y.forwardRef((e,t)=>{const n=Vl(I6,e.__scopeSelect),r=bO(I6,e.__scopeSelect),[i,o]=y.useState(!1),a=Kt(t,r.onScrollButtonChange);return ni(()=>{if(n.viewport&&n.isPositioned){let u=function(){const l=s.scrollHeight-s.clientHeight,c=Math.ceil(s.scrollTop)s.removeEventListener("scroll",u)}},[n.viewport,n.isPositioned]),i?I.jsx(Lq,{...e,ref:a,onAutoScroll:()=>{const{viewport:u,selectedItem:s}=n;u&&s&&(u.scrollTop=u.scrollTop+s.offsetHeight)}}):null});Fq.displayName=I6;var Lq=y.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...i}=e,o=Vl("SelectScrollButton",n),a=y.useRef(null),u=Kw(n),s=y.useCallback(()=>{a.current!==null&&(window.clearInterval(a.current),a.current=null)},[]);return y.useEffect(()=>()=>s(),[s]),ni(()=>{u().find(c=>c.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[u]),I.jsx(pt.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:Ye(i.onPointerDown,()=>{a.current===null&&(a.current=window.setInterval(r,50))}),onPointerMove:Ye(i.onPointerMove,()=>{o.onItemLeave?.(),a.current===null&&(a.current=window.setInterval(r,50))}),onPointerLeave:Ye(i.onPointerLeave,()=>{s()})})}),nje="SelectSeparator",jq=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return I.jsx(pt.div,{"aria-hidden":!0,...r,ref:t})});jq.displayName=nje;var N6="SelectArrow",rje=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=Gw(n),o=Wl(N6,n),a=Vl(N6,n);return o.open&&a.position==="popper"?I.jsx(Vx,{...i,...r,ref:t}):null});rje.displayName=N6;function Bq(e){return e===""||e===void 0}var zq=y.forwardRef((e,t)=>{const{value:n,...r}=e,i=y.useRef(null),o=Kt(t,i),a=yO(n);return y.useEffect(()=>{const u=i.current,s=window.HTMLSelectElement.prototype,c=Object.getOwnPropertyDescriptor(s,"value").set;if(a!==n&&c){const d=new Event("change",{bubbles:!0});c.call(u,n),u.dispatchEvent(d)}},[a,n]),I.jsx(ZA,{asChild:!0,children:I.jsx("select",{...r,ref:o,defaultValue:n})})});zq.displayName="BubbleSelect";function Uq(e){const t=Wr(e),n=y.useRef(""),r=y.useRef(0),i=y.useCallback(a=>{const u=n.current+a;t(u),function s(l){n.current=l,window.clearTimeout(r.current),l!==""&&(r.current=window.setTimeout(()=>s(""),1e3))}(u)},[t]),o=y.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return y.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,o]}function Wq(e,t,n){const i=t.length>1&&Array.from(t).every(l=>l===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let a=ije(e,Math.max(o,0));i.length===1&&(a=a.filter(l=>l!==n));const s=a.find(l=>l.textValue.toLowerCase().startsWith(i.toLowerCase()));return s!==n?s:void 0}function ije(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var OYe=vq,kYe=mq,TYe=bq,MYe=xq,RYe=wq,DYe=_q,$Ye=Aq,IYe=Oq,NYe=Tq,FYe=Rq,LYe=Dq,jYe=Iq,BYe=Nq,zYe=Fq,UYe=jq,Rt=function(){return Rt=Object.assign||function(t){for(var n,r=1,i=arguments.length;r1&&(s||!l),d=t>1&&(l||!s),h=function(){r&&o(r)},v=function(){i&&o(i)};return I.jsx(Fje,{displayMonth:e.displayMonth,hideNext:c,hidePrevious:d,nextMonth:i,previousMonth:r,onPreviousClick:h,onNextClick:v})}function Lje(e){var t,n=Hn(),r=n.classNames,i=n.disableNavigation,o=n.styles,a=n.captionLayout,u=n.components,s=(t=u?.CaptionLabel)!==null&&t!==void 0?t:qq,l;return i?l=I.jsx(s,{id:e.id,displayMonth:e.displayMonth}):a==="dropdown"?l=I.jsx(N$,{displayMonth:e.displayMonth,id:e.id}):a==="dropdown-buttons"?l=I.jsxs(I.Fragment,{children:[I.jsx(N$,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id}),I.jsx(F$,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id})]}):l=I.jsxs(I.Fragment,{children:[I.jsx(s,{id:e.id,displayMonth:e.displayMonth,displayIndex:e.displayIndex}),I.jsx(F$,{displayMonth:e.displayMonth,id:e.id})]}),I.jsx("div",{className:r.caption,style:o.caption,children:l})}function jje(e){var t=Hn(),n=t.footer,r=t.styles,i=t.classNames.tfoot;return n?I.jsx("tfoot",{className:i,style:r.tfoot,children:I.jsx("tr",{children:I.jsx("td",{colSpan:8,children:n})})}):I.jsx(I.Fragment,{})}function Bje(e,t,n){for(var r=n?ef(new Date):ma(new Date,{locale:e,weekStartsOn:t}),i=[],o=0;o<7;o++){var a=Ui(r,o);i.push(a)}return i}function zje(){var e=Hn(),t=e.classNames,n=e.styles,r=e.showWeekNumber,i=e.locale,o=e.weekStartsOn,a=e.ISOWeek,u=e.formatters.formatWeekdayName,s=e.labels.labelWeekday,l=Bje(i,o,a);return I.jsxs("tr",{style:n.head_row,className:t.head_row,children:[r&&I.jsx("td",{style:n.head_cell,className:t.head_cell}),l.map(function(c,d){return I.jsx("th",{scope:"col",className:t.head_cell,style:n.head_cell,"aria-label":s(c,{locale:i}),children:u(c,{locale:i})},d)})]})}function Uje(){var e,t=Hn(),n=t.classNames,r=t.styles,i=t.components,o=(e=i?.HeadRow)!==null&&e!==void 0?e:zje;return I.jsx("thead",{style:r.head,className:n.head,children:I.jsx(o,{})})}function Wje(e){var t=Hn(),n=t.locale,r=t.formatters.formatDay;return I.jsx(I.Fragment,{children:r(e.date,{locale:n})})}var xO=y.createContext(void 0);function Vje(e){if(!Tg(e.initialProps)){var t={selected:void 0,modifiers:{disabled:[]}};return I.jsx(xO.Provider,{value:t,children:e.children})}return I.jsx(Hje,{initialProps:e.initialProps,children:e.children})}function Hje(e){var t=e.initialProps,n=e.children,r=t.selected,i=t.min,o=t.max,a=function(l,c,d){var h,v;(h=t.onDayClick)===null||h===void 0||h.call(t,l,c,d);var g=!!(c.selected&&i&&r?.length===i);if(!g){var m=!!(!c.selected&&o&&r?.length===o);if(!m){var b=r?Vq([],r):[];if(c.selected){var w=b.findIndex(function(x){return ao(l,x)});b.splice(w,1)}else b.push(l);(v=t.onSelect)===null||v===void 0||v.call(t,b,l,c,d)}}},u={disabled:[]};r&&u.disabled.push(function(l){var c=o&&r.length>o-1,d=r.some(function(h){return ao(h,l)});return!!(c&&!d)});var s={selected:r,onDayClick:a,modifiers:u};return I.jsx(xO.Provider,{value:s,children:n})}function wO(){var e=y.useContext(xO);if(!e)throw new Error("useSelectMultiple must be used within a SelectMultipleProvider");return e}function qje(e,t){var n=t||{},r=n.from,i=n.to;return r&&i?ao(i,e)&&ao(r,e)?void 0:ao(i,e)?{from:i,to:void 0}:ao(r,e)?void 0:T6(r,e)?{from:e,to:i}:{from:r,to:e}:i?T6(e,i)?{from:i,to:e}:{from:e,to:i}:r?pq(e,r)?{from:e,to:r}:{from:r,to:e}:{from:e,to:void 0}}var _O=y.createContext(void 0);function Kje(e){if(!Mg(e.initialProps)){var t={selected:void 0,modifiers:{range_start:[],range_end:[],range_middle:[],disabled:[]}};return I.jsx(_O.Provider,{value:t,children:e.children})}return I.jsx(Gje,{initialProps:e.initialProps,children:e.children})}function Gje(e){var t=e.initialProps,n=e.children,r=t.selected,i=r||{},o=i.from,a=i.to,u=t.min,s=t.max,l=function(v,g,m){var b,w;(b=t.onDayClick)===null||b===void 0||b.call(t,v,g,m);var x=qje(v,r);(w=t.onSelect)===null||w===void 0||w.call(t,x,v,g,m)},c={range_start:[],range_end:[],range_middle:[],disabled:[]};if(o?(c.range_start=[o],a?(c.range_end=[a],ao(o,a)||(c.range_middle=[{after:o,before:a}])):c.range_end=[o]):a&&(c.range_start=[a],c.range_end=[a]),u&&(o&&!a&&c.disabled.push({after:qS(o,u-1),before:Ui(o,u-1)}),o&&a&&c.disabled.push({after:o,before:Ui(o,u-1)}),!o&&a&&c.disabled.push({after:qS(a,u-1),before:Ui(a,u-1)})),s){if(o&&!a&&(c.disabled.push({before:Ui(o,-s+1)}),c.disabled.push({after:Ui(o,s-1)})),o&&a){var d=gu(a,o)+1,h=s-d;c.disabled.push({before:qS(o,h)}),c.disabled.push({after:Ui(a,h)})}!o&&a&&(c.disabled.push({before:Ui(a,-s+1)}),c.disabled.push({after:Ui(a,s-1)}))}return I.jsx(_O.Provider,{value:{selected:r,onDayClick:l,modifiers:c},children:n})}function SO(){var e=y.useContext(_O);if(!e)throw new Error("useSelectRange must be used within a SelectRangeProvider");return e}function Wy(e){return Array.isArray(e)?Vq([],e):e!==void 0?[e]:[]}function Yje(e){var t={};return Object.entries(e).forEach(function(n){var r=n[0],i=n[1];t[r]=Wy(i)}),t}var Xa;(function(e){e.Outside="outside",e.Disabled="disabled",e.Selected="selected",e.Hidden="hidden",e.Today="today",e.RangeStart="range_start",e.RangeEnd="range_end",e.RangeMiddle="range_middle"})(Xa||(Xa={}));var Zje=Xa.Selected,Hu=Xa.Disabled,Xje=Xa.Hidden,Qje=Xa.Today,GS=Xa.RangeEnd,YS=Xa.RangeMiddle,ZS=Xa.RangeStart,Jje=Xa.Outside;function eBe(e,t,n){var r,i=(r={},r[Zje]=Wy(e.selected),r[Hu]=Wy(e.disabled),r[Xje]=Wy(e.hidden),r[Qje]=[e.today],r[GS]=[],r[YS]=[],r[ZS]=[],r[Jje]=[],r);return e.fromDate&&i[Hu].push({before:e.fromDate}),e.toDate&&i[Hu].push({after:e.toDate}),Tg(e)?i[Hu]=i[Hu].concat(t.modifiers[Hu]):Mg(e)&&(i[Hu]=i[Hu].concat(n.modifiers[Hu]),i[ZS]=n.modifiers[ZS],i[YS]=n.modifiers[YS],i[GS]=n.modifiers[GS]),i}var Yq=y.createContext(void 0);function tBe(e){var t=Hn(),n=wO(),r=SO(),i=eBe(t,n,r),o=Yje(t.modifiers),a=Rt(Rt({},i),o);return I.jsx(Yq.Provider,{value:a,children:e.children})}function Zq(){var e=y.useContext(Yq);if(!e)throw new Error("useModifiers must be used within a ModifiersProvider");return e}function nBe(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function rBe(e){return!!(e&&typeof e=="object"&&"from"in e)}function iBe(e){return!!(e&&typeof e=="object"&&"after"in e)}function oBe(e){return!!(e&&typeof e=="object"&&"before"in e)}function aBe(e){return!!(e&&typeof e=="object"&&"dayOfWeek"in e)}function uBe(e,t){var n,r=t.from,i=t.to;if(r&&i){var o=gu(i,r)<0;o&&(n=[i,r],r=n[0],i=n[1]);var a=gu(e,r)>=0&&gu(i,e)>=0;return a}return i?ao(i,e):r?ao(r,e):!1}function sBe(e){return pO(e)}function lBe(e){return Array.isArray(e)&&e.every(pO)}function cBe(e,t){return t.some(function(n){if(typeof n=="boolean")return n;if(sBe(n))return ao(e,n);if(lBe(n))return n.includes(e);if(rBe(n))return uBe(e,n);if(aBe(n))return n.dayOfWeek.includes(e.getDay());if(nBe(n)){var r=gu(n.before,e),i=gu(n.after,e),o=r>0,a=i<0,u=T6(n.before,n.after);return u?a&&o:o||a}return iBe(n)?gu(e,n.after)>0:oBe(n)?gu(n.before,e)>0:typeof n=="function"?n(e):!1})}function CO(e,t,n){var r=Object.keys(t).reduce(function(o,a){var u=t[a];return cBe(e,u)&&o.push(a),o},[]),i={};return r.forEach(function(o){return i[o]=!0}),n&&!mO(e,n)&&(i.outside=!0),i}function fBe(e,t){for(var n=ho(e[0]),r=vO(e[e.length-1]),i,o,a=n;a<=r;){var u=CO(a,t),s=!u.disabled&&!u.hidden;if(!s){a=Ui(a,1);continue}if(u.selected)return a;u.today&&!o&&(o=a),i||(i=a),a=Ui(a,1)}return o||i}var dBe=365;function Xq(e,t){var n=t.moveBy,r=t.direction,i=t.context,o=t.modifiers,a=t.retry,u=a===void 0?{count:0,lastFocused:e}:a,s=i.weekStartsOn,l=i.fromDate,c=i.toDate,d=i.locale,h={day:Ui,week:k6,month:Za,year:uFe,startOfWeek:function(b){return i.ISOWeek?ef(b):ma(b,{locale:d,weekStartsOn:s})},endOfWeek:function(b){return i.ISOWeek?uq(b):gO(b,{locale:d,weekStartsOn:s})}},v=h[n](e,r==="after"?1:-1);r==="before"&&l?v=sFe([l,v]):r==="after"&&c&&(v=lFe([c,v]));var g=!0;if(o){var m=CO(v,o);g=!m.disabled&&!m.hidden}return g?v:u.count>dBe?u.lastFocused:Xq(v,{moveBy:n,direction:r,context:i,modifiers:o,retry:Rt(Rt({},u),{count:u.count+1})})}var Qq=y.createContext(void 0);function hBe(e){var t=Rg(),n=Zq(),r=y.useState(),i=r[0],o=r[1],a=y.useState(),u=a[0],s=a[1],l=fBe(t.displayMonths,n),c=i??(u&&t.isDateDisplayed(u))?u:l,d=function(){s(i),o(void 0)},h=function(b){o(b)},v=Hn(),g=function(b,w){if(i){var x=Xq(i,{moveBy:b,direction:w,context:v,modifiers:n});ao(i,x)||(t.goToDate(x,i),h(x))}},m={focusedDay:i,focusTarget:c,blur:d,focus:h,focusDayAfter:function(){return g("day","after")},focusDayBefore:function(){return g("day","before")},focusWeekAfter:function(){return g("week","after")},focusWeekBefore:function(){return g("week","before")},focusMonthBefore:function(){return g("month","before")},focusMonthAfter:function(){return g("month","after")},focusYearBefore:function(){return g("year","before")},focusYearAfter:function(){return g("year","after")},focusStartOfWeek:function(){return g("startOfWeek","before")},focusEndOfWeek:function(){return g("endOfWeek","after")}};return I.jsx(Qq.Provider,{value:m,children:e.children})}function EO(){var e=y.useContext(Qq);if(!e)throw new Error("useFocusContext must be used within a FocusProvider");return e}function pBe(e,t){var n=Zq(),r=CO(e,n,t);return r}var AO=y.createContext(void 0);function vBe(e){if(!Yw(e.initialProps)){var t={selected:void 0};return I.jsx(AO.Provider,{value:t,children:e.children})}return I.jsx(gBe,{initialProps:e.initialProps,children:e.children})}function gBe(e){var t=e.initialProps,n=e.children,r=function(o,a,u){var s,l,c;if((s=t.onDayClick)===null||s===void 0||s.call(t,o,a,u),a.selected&&!t.required){(l=t.onSelect)===null||l===void 0||l.call(t,void 0,o,a,u);return}(c=t.onSelect)===null||c===void 0||c.call(t,o,o,a,u)},i={selected:t.selected,onDayClick:r};return I.jsx(AO.Provider,{value:i,children:n})}function Jq(){var e=y.useContext(AO);if(!e)throw new Error("useSelectSingle must be used within a SelectSingleProvider");return e}function mBe(e,t){var n=Hn(),r=Jq(),i=wO(),o=SO(),a=EO(),u=a.focusDayAfter,s=a.focusDayBefore,l=a.focusWeekAfter,c=a.focusWeekBefore,d=a.blur,h=a.focus,v=a.focusMonthBefore,g=a.focusMonthAfter,m=a.focusYearBefore,b=a.focusYearAfter,w=a.focusStartOfWeek,x=a.focusEndOfWeek,S=function(V){var B,q,Y,ue;Yw(n)?(B=r.onDayClick)===null||B===void 0||B.call(r,e,t,V):Tg(n)?(q=i.onDayClick)===null||q===void 0||q.call(i,e,t,V):Mg(n)?(Y=o.onDayClick)===null||Y===void 0||Y.call(o,e,t,V):(ue=n.onDayClick)===null||ue===void 0||ue.call(n,e,t,V)},A=function(V){var B;h(e),(B=n.onDayFocus)===null||B===void 0||B.call(n,e,t,V)},E=function(V){var B;d(),(B=n.onDayBlur)===null||B===void 0||B.call(n,e,t,V)},C=function(V){var B;(B=n.onDayMouseEnter)===null||B===void 0||B.call(n,e,t,V)},T=function(V){var B;(B=n.onDayMouseLeave)===null||B===void 0||B.call(n,e,t,V)},M=function(V){var B;(B=n.onDayPointerEnter)===null||B===void 0||B.call(n,e,t,V)},F=function(V){var B;(B=n.onDayPointerLeave)===null||B===void 0||B.call(n,e,t,V)},U=function(V){var B;(B=n.onDayTouchCancel)===null||B===void 0||B.call(n,e,t,V)},H=function(V){var B;(B=n.onDayTouchEnd)===null||B===void 0||B.call(n,e,t,V)},W=function(V){var B;(B=n.onDayTouchMove)===null||B===void 0||B.call(n,e,t,V)},ie=function(V){var B;(B=n.onDayTouchStart)===null||B===void 0||B.call(n,e,t,V)},Z=function(V){var B;(B=n.onDayKeyUp)===null||B===void 0||B.call(n,e,t,V)},G=function(V){var B;switch(V.key){case"ArrowLeft":V.preventDefault(),V.stopPropagation(),n.dir==="rtl"?u():s();break;case"ArrowRight":V.preventDefault(),V.stopPropagation(),n.dir==="rtl"?s():u();break;case"ArrowDown":V.preventDefault(),V.stopPropagation(),l();break;case"ArrowUp":V.preventDefault(),V.stopPropagation(),c();break;case"PageUp":V.preventDefault(),V.stopPropagation(),V.shiftKey?m():v();break;case"PageDown":V.preventDefault(),V.stopPropagation(),V.shiftKey?b():g();break;case"Home":V.preventDefault(),V.stopPropagation(),w();break;case"End":V.preventDefault(),V.stopPropagation(),x();break}(B=n.onDayKeyDown)===null||B===void 0||B.call(n,e,t,V)},K={onClick:S,onFocus:A,onBlur:E,onKeyDown:G,onKeyUp:Z,onMouseEnter:C,onMouseLeave:T,onPointerEnter:M,onPointerLeave:F,onTouchCancel:U,onTouchEnd:H,onTouchMove:W,onTouchStart:ie};return K}function yBe(){var e=Hn(),t=Jq(),n=wO(),r=SO(),i=Yw(e)?t.selected:Tg(e)?n.selected:Mg(e)?r.selected:void 0;return i}function bBe(e){return Object.values(Xa).includes(e)}function xBe(e,t){var n=[e.classNames.day];return Object.keys(t).forEach(function(r){var i=e.modifiersClassNames[r];if(i)n.push(i);else if(bBe(r)){var o=e.classNames["day_".concat(r)];o&&n.push(o)}}),n}function wBe(e,t){var n=Rt({},e.styles.day);return Object.keys(t).forEach(function(r){var i;n=Rt(Rt({},n),(i=e.modifiersStyles)===null||i===void 0?void 0:i[r])}),n}function _Be(e,t,n){var r,i,o,a=Hn(),u=EO(),s=pBe(e,t),l=mBe(e,s),c=yBe(),d=!!(a.onDayClick||a.mode!=="default");y.useEffect(function(){var C;s.outside||u.focusedDay&&d&&ao(u.focusedDay,e)&&((C=n.current)===null||C===void 0||C.focus())},[u.focusedDay,e,n,d,s.outside]);var h=xBe(a,s).join(" "),v=wBe(a,s),g=!!(s.outside&&!a.showOutsideDays||s.hidden),m=(o=(i=a.components)===null||i===void 0?void 0:i.DayContent)!==null&&o!==void 0?o:Wje,b=I.jsx(m,{date:e,displayMonth:t,activeModifiers:s}),w={style:v,className:h,children:b,role:"gridcell"},x=u.focusTarget&&ao(u.focusTarget,e)&&!s.outside,S=u.focusedDay&&ao(u.focusedDay,e),A=Rt(Rt(Rt({},w),(r={disabled:s.disabled,role:"gridcell"},r["aria-selected"]=s.selected,r.tabIndex=S||x?0:-1,r)),l),E={isButton:d,isHidden:g,activeModifiers:s,selectedDays:c,buttonProps:A,divProps:w};return E}function SBe(e){var t=y.useRef(null),n=_Be(e.date,e.displayMonth,t);return n.isHidden?I.jsx("div",{role:"gridcell"}):n.isButton?I.jsx(Xb,Rt({name:"day",ref:t},n.buttonProps)):I.jsx("div",Rt({},n.divProps))}function CBe(e){var t=e.number,n=e.dates,r=Hn(),i=r.onWeekNumberClick,o=r.styles,a=r.classNames,u=r.locale,s=r.labels.labelWeekNumber,l=r.formatters.formatWeekNumber,c=l(Number(t),{locale:u});if(!i)return I.jsx("span",{className:a.weeknumber,style:o.weeknumber,children:c});var d=s(Number(t),{locale:u}),h=function(v){i(t,n,v)};return I.jsx(Xb,{name:"week-number","aria-label":d,className:a.weeknumber,style:o.weeknumber,onClick:h,children:c})}function EBe(e){var t,n,r=Hn(),i=r.styles,o=r.classNames,a=r.showWeekNumber,u=r.components,s=(t=u?.Day)!==null&&t!==void 0?t:SBe,l=(n=u?.WeekNumber)!==null&&n!==void 0?n:CBe,c;return a&&(c=I.jsx("td",{className:o.cell,style:i.cell,children:I.jsx(l,{number:e.weekNumber,dates:e.dates})})),I.jsxs("tr",{className:o.row,style:i.row,children:[c,e.dates.map(function(d){return I.jsx("td",{className:o.cell,style:i.cell,role:"presentation",children:I.jsx(s,{displayMonth:e.displayMonth,date:d})},uLe(d))})]})}function L$(e,t,n){for(var r=n?.ISOWeek?uq(t):gO(t,n),i=n?.ISOWeek?ef(e):ma(e,n),o=gu(r,i),a=[],u=0;u<=o;u++)a.push(Ui(i,u));var s=a.reduce(function(l,c){var d=n?.ISOWeek?cq(c):dq(c,n),h=l.find(function(v){return v.weekNumber===d});return h?(h.dates.push(c),l):(l.push({weekNumber:d,dates:[c]}),l)},[]);return s}function ABe(e,t){var n=L$(ho(e),vO(e),t);if(t?.useFixedWeeks){var r=lLe(e,t);if(r<6){var i=n[n.length-1],o=i.dates[i.dates.length-1],a=k6(o,6-r),u=L$(k6(o,1),a,t);n.push.apply(n,u)}}return n}function PBe(e){var t,n,r,i=Hn(),o=i.locale,a=i.classNames,u=i.styles,s=i.hideHead,l=i.fixedWeeks,c=i.components,d=i.weekStartsOn,h=i.firstWeekContainsDate,v=i.ISOWeek,g=ABe(e.displayMonth,{useFixedWeeks:!!l,ISOWeek:v,locale:o,weekStartsOn:d,firstWeekContainsDate:h}),m=(t=c?.Head)!==null&&t!==void 0?t:Uje,b=(n=c?.Row)!==null&&n!==void 0?n:EBe,w=(r=c?.Footer)!==null&&r!==void 0?r:jje;return I.jsxs("table",{id:e.id,className:a.table,style:u.table,role:"grid","aria-labelledby":e["aria-labelledby"],children:[!s&&I.jsx(m,{}),I.jsx("tbody",{className:a.tbody,style:u.tbody,children:g.map(function(x){return I.jsx(b,{displayMonth:e.displayMonth,dates:x.dates,weekNumber:x.weekNumber},x.weekNumber)})}),I.jsx(w,{displayMonth:e.displayMonth})]})}function OBe(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var kBe=OBe()?y.useLayoutEffect:y.useEffect,XS=!1,TBe=0;function j$(){return"react-day-picker-".concat(++TBe)}function MBe(e){var t,n=e??(XS?j$():null),r=y.useState(n),i=r[0],o=r[1];return kBe(function(){i===null&&o(j$())},[]),y.useEffect(function(){XS===!1&&(XS=!0)},[]),(t=e??i)!==null&&t!==void 0?t:void 0}function RBe(e){var t,n,r=Hn(),i=r.dir,o=r.classNames,a=r.styles,u=r.components,s=Rg().displayMonths,l=MBe(r.id?"".concat(r.id,"-").concat(e.displayIndex):void 0),c=r.id?"".concat(r.id,"-grid-").concat(e.displayIndex):void 0,d=[o.month],h=a.month,v=e.displayIndex===0,g=e.displayIndex===s.length-1,m=!v&&!g;i==="rtl"&&(t=[v,g],g=t[0],v=t[1]),v&&(d.push(o.caption_start),h=Rt(Rt({},h),a.caption_start)),g&&(d.push(o.caption_end),h=Rt(Rt({},h),a.caption_end)),m&&(d.push(o.caption_between),h=Rt(Rt({},h),a.caption_between));var b=(n=u?.Caption)!==null&&n!==void 0?n:Lje;return I.jsxs("div",{className:d.join(" "),style:h,children:[I.jsx(b,{id:l,displayMonth:e.displayMonth,displayIndex:e.displayIndex}),I.jsx(PBe,{id:c,"aria-labelledby":l,displayMonth:e.displayMonth})]},e.displayIndex)}function DBe(e){var t=Hn(),n=t.classNames,r=t.styles;return I.jsx("div",{className:n.months,style:r.months,children:e.children})}function $Be(e){var t,n,r=e.initialProps,i=Hn(),o=EO(),a=Rg(),u=y.useState(!1),s=u[0],l=u[1];y.useEffect(function(){i.initialFocus&&o.focusTarget&&(s||(o.focus(o.focusTarget),l(!0)))},[i.initialFocus,s,o.focus,o.focusTarget,o]);var c=[i.classNames.root,i.className];i.numberOfMonths>1&&c.push(i.classNames.multiple_months),i.showWeekNumber&&c.push(i.classNames.with_weeknumber);var d=Rt(Rt({},i.styles.root),i.style),h=Object.keys(r).filter(function(g){return g.startsWith("data-")}).reduce(function(g,m){var b;return Rt(Rt({},g),(b={},b[m]=r[m],b))},{}),v=(n=(t=r.components)===null||t===void 0?void 0:t.Months)!==null&&n!==void 0?n:DBe;return I.jsx("div",Rt({className:c.join(" "),style:d,dir:i.dir,id:i.id,nonce:r.nonce,title:r.title,lang:r.lang},h,{children:I.jsx(v,{children:a.displayMonths.map(function(g,m){return I.jsx(RBe,{displayIndex:m,displayMonth:g},m)})})}))}function IBe(e){var t=e.children,n=oje(e,["children"]);return I.jsx(Cje,{initialProps:n,children:I.jsx($je,{children:I.jsx(vBe,{initialProps:n,children:I.jsx(Vje,{initialProps:n,children:I.jsx(Kje,{initialProps:n,children:I.jsx(tBe,{children:I.jsx(hBe,{children:t})})})})})})})}function WYe(e){return I.jsx(IBe,Rt({},e,{children:I.jsx($Be,{initialProps:e})}))}var PO="Popover",[eK,VYe]=mi(PO,[Fl]),Dg=Fl(),[NBe,Hl]=eK(PO),tK=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:o,modal:a=!1}=e,u=Dg(t),s=y.useRef(null),[l,c]=y.useState(!1),[d=!1,h]=Ga({prop:r,defaultProp:i,onChange:o});return I.jsx(Ux,{...u,children:I.jsx(NBe,{scope:t,contentId:No(),triggerRef:s,open:d,onOpenChange:h,onOpenToggle:y.useCallback(()=>h(v=>!v),[h]),hasCustomAnchor:l,onCustomAnchorAdd:y.useCallback(()=>c(!0),[]),onCustomAnchorRemove:y.useCallback(()=>c(!1),[]),modal:a,children:n})})};tK.displayName=PO;var nK="PopoverAnchor",FBe=y.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=Hl(nK,n),o=Dg(n),{onCustomAnchorAdd:a,onCustomAnchorRemove:u}=i;return y.useEffect(()=>(a(),()=>u()),[a,u]),I.jsx(vg,{...o,...r,ref:t})});FBe.displayName=nK;var rK="PopoverTrigger",iK=y.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=Hl(rK,n),o=Dg(n),a=Kt(t,i.triggerRef),u=I.jsx(pt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":lK(i.open),...r,ref:a,onClick:Ye(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?u:I.jsx(vg,{asChild:!0,...o,children:u})});iK.displayName=rK;var OO="PopoverPortal",[LBe,jBe]=eK(OO,{forceMount:void 0}),oK=e=>{const{__scopePopover:t,forceMount:n,children:r,container:i}=e,o=Hl(OO,t);return I.jsx(LBe,{scope:t,forceMount:n,children:I.jsx(ii,{present:n||o.open,children:I.jsx(cg,{asChild:!0,container:i,children:r})})})};oK.displayName=OO;var mh="PopoverContent",aK=y.forwardRef((e,t)=>{const n=jBe(mh,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,o=Hl(mh,e.__scopePopover);return I.jsx(ii,{present:r||o.open,children:o.modal?I.jsx(BBe,{...i,ref:t}):I.jsx(zBe,{...i,ref:t})})});aK.displayName=mh;var BBe=y.forwardRef((e,t)=>{const n=Hl(mh,e.__scopePopover),r=y.useRef(null),i=Kt(t,r),o=y.useRef(!1);return y.useEffect(()=>{const a=r.current;if(a)return dg(a)},[]),I.jsx(fg,{as:Sl,allowPinchZoom:!0,children:I.jsx(uK,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ye(e.onCloseAutoFocus,a=>{a.preventDefault(),o.current||n.triggerRef.current?.focus()}),onPointerDownOutside:Ye(e.onPointerDownOutside,a=>{const u=a.detail.originalEvent,s=u.button===0&&u.ctrlKey===!0,l=u.button===2||s;o.current=l},{checkForDefaultPrevented:!1}),onFocusOutside:Ye(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),zBe=y.forwardRef((e,t)=>{const n=Hl(mh,e.__scopePopover),r=y.useRef(!1),i=y.useRef(!1);return I.jsx(uK,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{e.onCloseAutoFocus?.(o),o.defaultPrevented||(r.current||n.triggerRef.current?.focus(),o.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:o=>{e.onInteractOutside?.(o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const a=o.target;n.triggerRef.current?.contains(a)&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&i.current&&o.preventDefault()}})}),uK=y.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:o,disableOutsidePointerEvents:a,onEscapeKeyDown:u,onPointerDownOutside:s,onFocusOutside:l,onInteractOutside:c,...d}=e,h=Hl(mh,n),v=Dg(n);return Lx(),I.jsx(lg,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:o,children:I.jsx(kh,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:c,onEscapeKeyDown:u,onPointerDownOutside:s,onFocusOutside:l,onDismiss:()=>h.onOpenChange(!1),children:I.jsx(Wx,{"data-state":lK(h.open),role:"dialog",id:h.contentId,...v,...d,ref:t,style:{...d.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),sK="PopoverClose",UBe=y.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=Hl(sK,n);return I.jsx(pt.button,{type:"button",...r,ref:t,onClick:Ye(e.onClick,()=>i.onOpenChange(!1))})});UBe.displayName=sK;var WBe="PopoverArrow",VBe=y.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=Dg(n);return I.jsx(Vx,{...i,...r,ref:t})});VBe.displayName=WBe;function lK(e){return e?"open":"closed"}var HYe=tK,qYe=iK,KYe=oK,GYe=aK,Qb={exports:{}};/** * @license * Lodash * Copyright OpenJS Foundation and other contributors * Released under MIT license * Based on Underscore.js 1.8.3 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */Db.exports;(function(e,t){(function(){var n,r="4.17.21",i=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",u="Invalid `variable` option passed into `_.template`",s="__lodash_hash_undefined__",l=500,c="__lodash_placeholder__",d=1,h=2,m=4,g=1,v=2,y=1,x=2,w=4,S=8,A=16,E=32,C=64,P=128,k=256,M=512,L=30,B="...",F=800,Y=16,H=1,W=2,V=3,j=1/0,I=9007199254740991,z=17976931348623157e292,U=NaN,X=4294967295,q=X-1,G=X>>>1,ee=[["ary",P],["bind",y],["bindKey",x],["curry",S],["curryRight",A],["flip",M],["partial",E],["partialRight",C],["rearg",k]],ue="[object Arguments]",fe="[object Array]",ie="[object AsyncFunction]",Ae="[object Boolean]",de="[object Date]",we="[object DOMException]",ge="[object Error]",ae="[object Function]",$e="[object GeneratorFunction]",Te="[object Map]",qe="[object Number]",zt="[object Null]",Rt="[object Object]",Z="[object Promise]",oe="[object Proxy]",se="[object RegExp]",Ce="[object Set]",Ee="[object String]",ye="[object Symbol]",Ie="[object Undefined]",Ye="[object WeakMap]",sn="[object WeakSet]",xt="[object ArrayBuffer]",rn="[object DataView]",eo="[object Float32Array]",Yn="[object Float64Array]",to="[object Int8Array]",Zn="[object Int16Array]",no="[object Int32Array]",va="[object Uint8Array]",ro="[object Uint8ClampedArray]",Gu="[object Uint16Array]",Ku="[object Uint32Array]",ya=/\b__p \+= '';/g,Ai=/\b(__p \+=) '' \+/g,ml=/(__e\(.*?\)|\b__t\)) \+\n'';/g,rt=/&(?:amp|lt|gt|quot|#39);/g,$t=/[&<>"']/g,Ht=RegExp(rt.source),Wr=RegExp($t.source),Vr=/<%-([\s\S]+?)%>/g,$o=/<%([\s\S]+?)%>/g,Ga=/<%=([\s\S]+?)%>/g,Lx=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,jx=/^\w*$/,J=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,re=/[\\^$.*+?()[\]{}|]/g,le=RegExp(re.source),xe=/^\s+/,Fe=/\s/,Ge=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,st=/\{\n\/\* \[wrapped with (.+)\] \*/,Ue=/,? & /,We=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Le=/[()=,{}\[\]\/\s]/,Ke=/\\(\\)?/g,_t=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Et=/\w*$/,Xn=/^[-+]0x[0-9a-f]+$/i,Xt=/^0b[01]+$/i,It=/^\[object .+?Constructor\]$/,xn=/^0o[0-7]+$/i,Yu=/^(?:0|[1-9]\d*)$/,gl=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,oi=/($^)/,io=/['\n\r\u2028\u2029\\]/g,Zu="\\ud800-\\udfff",vl="\\u0300-\\u036f",Ka="\\ufe20-\\ufe2f",Vc="\\u20d0-\\u20ff",yl=vl+Ka+Vc,Tt="\\u2700-\\u27bf",pn="a-z\\xdf-\\xf6\\xf8-\\xff",Xu="\\xac\\xb1\\xd7\\xf7",bl="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Rn="\\u2000-\\u206f",Qu=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Sh="A-Z\\xc0-\\xd6\\xd8-\\xde",pg="\\ufe0e\\ufe0f",L4=Xu+bl+Rn+Qu,Bx="['’]",VK="["+Zu+"]",j4="["+L4+"]",mg="["+yl+"]",B4="\\d+",HK="["+Tt+"]",z4="["+pn+"]",U4="[^"+Zu+L4+B4+Tt+pn+Sh+"]",zx="\\ud83c[\\udffb-\\udfff]",qK="(?:"+mg+"|"+zx+")",W4="[^"+Zu+"]",Ux="(?:\\ud83c[\\udde6-\\uddff]){2}",Wx="[\\ud800-\\udbff][\\udc00-\\udfff]",Hc="["+Sh+"]",V4="\\u200d",H4="(?:"+z4+"|"+U4+")",GK="(?:"+Hc+"|"+U4+")",q4="(?:"+Bx+"(?:d|ll|m|re|s|t|ve))?",G4="(?:"+Bx+"(?:D|LL|M|RE|S|T|VE))?",K4=qK+"?",Y4="["+pg+"]?",KK="(?:"+V4+"(?:"+[W4,Ux,Wx].join("|")+")"+Y4+K4+")*",YK="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",ZK="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Z4=Y4+K4+KK,XK="(?:"+[HK,Ux,Wx].join("|")+")"+Z4,QK="(?:"+[W4+mg+"?",mg,Ux,Wx,VK].join("|")+")",JK=RegExp(Bx,"g"),eY=RegExp(mg,"g"),Vx=RegExp(zx+"(?="+zx+")|"+QK+Z4,"g"),tY=RegExp([Hc+"?"+z4+"+"+q4+"(?="+[j4,Hc,"$"].join("|")+")",GK+"+"+G4+"(?="+[j4,Hc+H4,"$"].join("|")+")",Hc+"?"+H4+"+"+q4,Hc+"+"+G4,ZK,YK,B4,XK].join("|"),"g"),nY=RegExp("["+V4+Zu+yl+pg+"]"),rY=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,iY=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],oY=-1,mn={};mn[eo]=mn[Yn]=mn[to]=mn[Zn]=mn[no]=mn[va]=mn[ro]=mn[Gu]=mn[Ku]=!0,mn[ue]=mn[fe]=mn[xt]=mn[Ae]=mn[rn]=mn[de]=mn[ge]=mn[ae]=mn[Te]=mn[qe]=mn[Rt]=mn[se]=mn[Ce]=mn[Ee]=mn[Ye]=!1;var ln={};ln[ue]=ln[fe]=ln[xt]=ln[rn]=ln[Ae]=ln[de]=ln[eo]=ln[Yn]=ln[to]=ln[Zn]=ln[no]=ln[Te]=ln[qe]=ln[Rt]=ln[se]=ln[Ce]=ln[Ee]=ln[ye]=ln[va]=ln[ro]=ln[Gu]=ln[Ku]=!0,ln[ge]=ln[ae]=ln[Ye]=!1;var aY={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},uY={"&":"&","<":"<",">":">",'"':""","'":"'"},sY={"&":"&","<":"<",">":">",""":'"',"'":"'"},lY={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},cY=parseFloat,fY=parseInt,X4=typeof Yo=="object"&&Yo&&Yo.Object===Object&&Yo,dY=typeof self=="object"&&self&&self.Object===Object&&self,yr=X4||dY||Function("return this")(),Hx=t&&!t.nodeType&&t,wl=Hx&&!0&&e&&!e.nodeType&&e,Q4=wl&&wl.exports===Hx,qx=Q4&&X4.process,oo=function(){try{var te=wl&&wl.require&&wl.require("util").types;return te||qx&&qx.binding&&qx.binding("util")}catch{}}(),J4=oo&&oo.isArrayBuffer,ek=oo&&oo.isDate,tk=oo&&oo.isMap,nk=oo&&oo.isRegExp,rk=oo&&oo.isSet,ik=oo&&oo.isTypedArray;function Oi(te,me,ce){switch(ce.length){case 0:return te.call(me);case 1:return te.call(me,ce[0]);case 2:return te.call(me,ce[0],ce[1]);case 3:return te.call(me,ce[0],ce[1],ce[2])}return te.apply(me,ce)}function hY(te,me,ce,je){for(var lt=-1,Lt=te==null?0:te.length;++lt-1}function Gx(te,me,ce){for(var je=-1,lt=te==null?0:te.length;++je-1;);return ce}function dk(te,me){for(var ce=te.length;ce--&&qc(me,te[ce],0)>-1;);return ce}function _Y(te,me){for(var ce=te.length,je=0;ce--;)te[ce]===me&&++je;return je}var SY=Xx(aY),CY=Xx(uY);function EY(te){return"\\"+lY[te]}function AY(te,me){return te==null?n:te[me]}function Gc(te){return nY.test(te)}function OY(te){return rY.test(te)}function PY(te){for(var me,ce=[];!(me=te.next()).done;)ce.push(me.value);return ce}function t2(te){var me=-1,ce=Array(te.size);return te.forEach(function(je,lt){ce[++me]=[lt,je]}),ce}function hk(te,me){return function(ce){return te(me(ce))}}function ts(te,me){for(var ce=-1,je=te.length,lt=0,Lt=[];++ce-1}function mZ(f,p){var _=this.__data__,O=Dg(_,f);return O<0?(++this.size,_.push([f,p])):_[O][1]=p,this}Ya.prototype.clear=fZ,Ya.prototype.delete=dZ,Ya.prototype.get=hZ,Ya.prototype.has=pZ,Ya.prototype.set=mZ;function Za(f){var p=-1,_=f==null?0:f.length;for(this.clear();++p<_;){var O=f[p];this.set(O[0],O[1])}}function gZ(){this.size=0,this.__data__={hash:new _l,map:new(Ah||Ya),string:new _l}}function vZ(f){var p=Hg(this,f).delete(f);return this.size-=p?1:0,p}function yZ(f){return Hg(this,f).get(f)}function bZ(f){return Hg(this,f).has(f)}function wZ(f,p){var _=Hg(this,f),O=_.size;return _.set(f,p),this.size+=_.size==O?0:1,this}Za.prototype.clear=gZ,Za.prototype.delete=vZ,Za.prototype.get=yZ,Za.prototype.has=bZ,Za.prototype.set=wZ;function Sl(f){var p=-1,_=f==null?0:f.length;for(this.__data__=new Za;++p<_;)this.add(f[p])}function xZ(f){return this.__data__.set(f,s),this}function _Z(f){return this.__data__.has(f)}Sl.prototype.add=Sl.prototype.push=xZ,Sl.prototype.has=_Z;function No(f){var p=this.__data__=new Ya(f);this.size=p.size}function SZ(){this.__data__=new Ya,this.size=0}function CZ(f){var p=this.__data__,_=p.delete(f);return this.size=p.size,_}function EZ(f){return this.__data__.get(f)}function AZ(f){return this.__data__.has(f)}function OZ(f,p){var _=this.__data__;if(_ instanceof Ya){var O=_.__data__;if(!Ah||O.length=p?f:p)),f}function lo(f,p,_,O,T,N){var K,Q=p&d,ne=p&h,ve=p&m;if(_&&(K=T?_(f,O,T,N):_(f)),K!==n)return K;if(!An(f))return f;var be=dt(f);if(be){if(K=bX(f),!Q)return ai(f,K)}else{var _e=Tr(f),Me=_e==ae||_e==$e;if(us(f))return Yk(f,Q);if(_e==Rt||_e==ue||Me&&!T){if(K=ne||Me?{}:p5(f),!Q)return ne?sX(f,MZ(K,f)):uX(f,Ek(K,f))}else{if(!ln[_e])return T?f:{};K=wX(f,_e,Q)}}N||(N=new No);var Ve=N.get(f);if(Ve)return Ve;N.set(f,K),W5(f)?f.forEach(function(tt){K.add(lo(tt,p,_,tt,f,N))}):z5(f)&&f.forEach(function(tt,St){K.set(St,lo(tt,p,_,St,f,N))});var et=ve?ne?O2:A2:ne?si:lr,yt=be?n:et(f);return ao(yt||f,function(tt,St){yt&&(St=tt,tt=f[St]),Th(K,St,lo(tt,p,_,St,f,N))}),K}function RZ(f){var p=lr(f);return function(_){return Ak(_,f,p)}}function Ak(f,p,_){var O=_.length;if(f==null)return!O;for(f=on(f);O--;){var T=_[O],N=p[T],K=f[T];if(K===n&&!(T in f)||!N(K))return!1}return!0}function Ok(f,p,_){if(typeof f!="function")throw new uo(a);return Fh(function(){f.apply(n,_)},p)}function Mh(f,p,_,O){var T=-1,N=gg,K=!0,Q=f.length,ne=[],ve=p.length;if(!Q)return ne;_&&(p=_n(p,Pi(_))),O?(N=Gx,K=!1):p.length>=i&&(N=Ch,K=!1,p=new Sl(p));e:for(;++TT?0:T+_),O=O===n||O>T?T:gt(O),O<0&&(O+=T),O=_>O?0:H5(O);_0&&_(Q)?p>1?br(Q,p-1,_,O,T):es(T,Q):O||(T[T.length]=Q)}return T}var s2=t5(),Tk=t5(!0);function ba(f,p){return f&&s2(f,p,lr)}function l2(f,p){return f&&Tk(f,p,lr)}function Ig(f,p){return Ju(p,function(_){return tu(f[_])})}function El(f,p){p=os(p,f);for(var _=0,O=p.length;f!=null&&_p}function IZ(f,p){return f!=null&&qt.call(f,p)}function NZ(f,p){return f!=null&&p in on(f)}function FZ(f,p,_){return f>=kr(p,_)&&f=120&&be.length>=120)?new Sl(K&&be):n}be=f[0];var _e=-1,Me=Q[0];e:for(;++_e-1;)Q!==f&&Ag.call(Q,ne,1),Ag.call(f,ne,1);return f}function zk(f,p){for(var _=f?p.length:0,O=_-1;_--;){var T=p[_];if(_==O||T!==N){var N=T;eu(T)?Ag.call(f,T,1):b2(f,T)}}return f}function g2(f,p){return f+kg(xk()*(p-f+1))}function ZZ(f,p,_,O){for(var T=-1,N=Jn(Pg((p-f)/(_||1)),0),K=ce(N);N--;)K[O?N:++T]=f,f+=_;return K}function v2(f,p){var _="";if(!f||p<1||p>I)return _;do p%2&&(_+=f),p=kg(p/2),p&&(f+=f);while(p);return _}function wt(f,p){return $2(v5(f,p,li),f+"")}function XZ(f){return Ck(of(f))}function QZ(f,p){var _=of(f);return qg(_,Cl(p,0,_.length))}function $h(f,p,_,O){if(!An(f))return f;p=os(p,f);for(var T=-1,N=p.length,K=N-1,Q=f;Q!=null&&++TT?0:T+p),_=_>T?T:_,_<0&&(_+=T),T=p>_?0:_-p>>>0,p>>>=0;for(var N=ce(T);++O>>1,K=f[N];K!==null&&!Ti(K)&&(_?K<=p:K=i){var ve=p?null:dX(f);if(ve)return yg(ve);K=!1,T=Ch,ne=new Sl}else ne=p?[]:Q;e:for(;++O=O?f:co(f,p,_)}var Kk=WY||function(f){return yr.clearTimeout(f)};function Yk(f,p){if(p)return f.slice();var _=f.length,O=gk?gk(_):new f.constructor(_);return f.copy(O),O}function S2(f){var p=new f.constructor(f.byteLength);return new Cg(p).set(new Cg(f)),p}function rX(f,p){var _=p?S2(f.buffer):f.buffer;return new f.constructor(_,f.byteOffset,f.byteLength)}function iX(f){var p=new f.constructor(f.source,Et.exec(f));return p.lastIndex=f.lastIndex,p}function oX(f){return kh?on(kh.call(f)):{}}function Zk(f,p){var _=p?S2(f.buffer):f.buffer;return new f.constructor(_,f.byteOffset,f.length)}function Xk(f,p){if(f!==p){var _=f!==n,O=f===null,T=f===f,N=Ti(f),K=p!==n,Q=p===null,ne=p===p,ve=Ti(p);if(!Q&&!ve&&!N&&f>p||N&&K&&ne&&!Q&&!ve||O&&K&&ne||!_&&ne||!T)return 1;if(!O&&!N&&!ve&&f=Q)return ne;var ve=_[O];return ne*(ve=="desc"?-1:1)}}return f.index-p.index}function Qk(f,p,_,O){for(var T=-1,N=f.length,K=_.length,Q=-1,ne=p.length,ve=Jn(N-K,0),be=ce(ne+ve),_e=!O;++Q1?_[T-1]:n,K=T>2?_[2]:n;for(N=f.length>3&&typeof N=="function"?(T--,N):n,K&&qr(_[0],_[1],K)&&(N=T<3?n:N,T=1),p=on(p);++O-1?T[N?p[K]:K]:n}}function i5(f){return Ja(function(p){var _=p.length,O=_,T=so.prototype.thru;for(f&&p.reverse();O--;){var N=p[O];if(typeof N!="function")throw new uo(a);if(T&&!K&&Vg(N)=="wrapper")var K=new so([],!0)}for(O=K?O:_;++O<_;){N=p[O];var Q=Vg(N),ne=Q=="wrapper"?P2(N):n;ne&&R2(ne[0])&&ne[1]==(P|S|E|k)&&!ne[4].length&&ne[9]==1?K=K[Vg(ne[0])].apply(K,ne[3]):K=N.length==1&&R2(N)?K[Q]():K.thru(N)}return function(){var ve=arguments,be=ve[0];if(K&&ve.length==1&&dt(be))return K.plant(be).value();for(var _e=0,Me=_?p[_e].apply(this,ve):be;++_e<_;)Me=p[_e].call(this,Me);return Me}})}function Bg(f,p,_,O,T,N,K,Q,ne,ve){var be=p&P,_e=p&y,Me=p&x,Ve=p&(S|A),et=p&M,yt=Me?n:Ih(f);function tt(){for(var St=arguments.length,Mt=ce(St),Mi=St;Mi--;)Mt[Mi]=arguments[Mi];if(Ve)var Gr=nf(tt),Ri=_Y(Mt,Gr);if(O&&(Mt=Qk(Mt,O,T,Ve)),N&&(Mt=Jk(Mt,N,K,Ve)),St-=Ri,Ve&&St1&&Mt.reverse(),be&&neQ))return!1;var ve=N.get(f),be=N.get(p);if(ve&&be)return ve==p&&be==f;var _e=-1,Me=!0,Ve=_&v?new Sl:n;for(N.set(f,p),N.set(p,f);++_e1?"& ":"")+p[O],p=p.join(_>2?", ":" "),f.replace(Ge,`{ + */Qb.exports;(function(e,t){(function(){var n,r="4.17.21",i=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",u="Invalid `variable` option passed into `_.template`",s="__lodash_hash_undefined__",l=500,c="__lodash_placeholder__",d=1,h=2,v=4,g=1,m=2,b=1,w=2,x=4,S=8,A=16,E=32,C=64,T=128,M=256,F=512,U=30,H="...",W=800,ie=16,Z=1,G=2,K=3,V=1/0,B=9007199254740991,q=17976931348623157e292,Y=NaN,ue=4294967295,Q=ue-1,J=ue>>>1,se=[["ary",T],["bind",b],["bindKey",w],["curry",S],["curryRight",A],["flip",F],["partial",E],["partialRight",C],["rearg",M]],de="[object Arguments]",Se="[object Array]",ge="[object AsyncFunction]",Ze="[object Boolean]",Pe="[object Date]",Fe="[object DOMException]",$e="[object Error]",be="[object Function]",yt="[object GeneratorFunction]",lt="[object Map]",It="[object Number]",mn="[object Null]",en="[object Object]",re="[object Promise]",pe="[object Proxy]",ye="[object RegExp]",Ue="[object Set]",je="[object String]",ke="[object Symbol]",nt="[object Undefined]",gt="[object WeakMap]",bn="[object WeakSet]",Vt="[object ArrayBuffer]",xn="[object DataView]",Ii="[object Float32Array]",br="[object Float64Array]",yi="[object Int8Array]",ar="[object Int16Array]",ui="[object Int32Array]",bi="[object Uint8Array]",Rr="[object Uint8ClampedArray]",Yi="[object Uint16Array]",go="[object Uint32Array]",xi=/\b__p \+= '';/g,Dr=/\b(__p \+=) '' \+/g,wa=/(__e\(.*?\)|\b__t\)) \+\n'';/g,_t=/&(?:amp|lt|gt|quot|#39);/g,fn=/[&<>"']/g,wn=RegExp(_t.source),qn=RegExp(fn.source),ur=/<%-([\s\S]+?)%>/g,Yr=/<%([\s\S]+?)%>/g,mo=/<%=([\s\S]+?)%>/g,ql=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,yf=/^\w*$/,oe=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,le=/[\\^$.*+?()[\]{}|]/g,xe=RegExp(le.source),k=/^\s+/,D=/\s/,$=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,P=/\{\n\/\* \[wrapped with (.+)\] \*/,N=/,? & /,ee=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ne=/[()=,{}\[\]\/\s]/,he=/\\(\\)?/g,Ce=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Be=/\w*$/,He=/^[-+]0x[0-9a-f]+$/i,ct=/^0b[01]+$/i,Ne=/^\[object .+?Constructor\]$/,rt=/^0o[0-7]+$/i,bt=/^(?:0|[1-9]\d*)$/,At=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,vt=/($^)/,ht=/['\n\r\u2028\u2029\\]/g,xt="\\ud800-\\udfff",wt="\\u0300-\\u036f",Je="\\ufe20-\\ufe2f",st="\\u20d0-\\u20ff",Qe=wt+Je+st,Le="\\u2700-\\u27bf",qe="a-z\\xdf-\\xf6\\xf8-\\xff",Ge="\\xac\\xb1\\xd7\\xf7",me="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",ve="\\u2000-\\u206f",De=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Oe="A-Z\\xc0-\\xd6\\xd8-\\xde",Te="\\ufe0e\\ufe0f",ze=Ge+me+ve+De,mt="['’]",Nt="["+xt+"]",Ft="["+ze+"]",$t="["+Qe+"]",te="\\d+",Gt="["+Le+"]",on="["+qe+"]",an="[^"+xt+ze+te+Le+qe+Oe+"]",Lt="\\ud83c[\\udffb-\\udfff]",un="(?:"+$t+"|"+Lt+")",tn="[^"+xt+"]",Kn="(?:\\ud83c[\\udde6-\\uddff]){2}",pn="[\\ud800-\\udbff][\\udc00-\\udfff]",On="["+Oe+"]",Gn="\\u200d",Yn="(?:"+on+"|"+an+")",xr="(?:"+On+"|"+an+")",$r="(?:"+mt+"(?:d|ll|m|re|s|t|ve))?",Ir="(?:"+mt+"(?:D|LL|M|RE|S|T|VE))?",Nr=un+"?",o5="["+Te+"]?",vY="(?:"+Gn+"(?:"+[tn,Kn,pn].join("|")+")"+o5+Nr+")*",gY="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",mY="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",a5=o5+Nr+vY,yY="(?:"+[Gt,Kn,pn].join("|")+")"+a5,bY="(?:"+[tn+$t+"?",$t,Kn,pn,Nt].join("|")+")",xY=RegExp(mt,"g"),wY=RegExp($t,"g"),o2=RegExp(Lt+"(?="+Lt+")|"+bY+a5,"g"),_Y=RegExp([On+"?"+on+"+"+$r+"(?="+[Ft,On,"$"].join("|")+")",xr+"+"+Ir+"(?="+[Ft,On+Yn,"$"].join("|")+")",On+"?"+Yn+"+"+$r,On+"+"+Ir,mY,gY,te,yY].join("|"),"g"),SY=RegExp("["+Gn+xt+Qe+Te+"]"),CY=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,EY=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],AY=-1,Zn={};Zn[Ii]=Zn[br]=Zn[yi]=Zn[ar]=Zn[ui]=Zn[bi]=Zn[Rr]=Zn[Yi]=Zn[go]=!0,Zn[de]=Zn[Se]=Zn[Vt]=Zn[Ze]=Zn[xn]=Zn[Pe]=Zn[$e]=Zn[be]=Zn[lt]=Zn[It]=Zn[en]=Zn[ye]=Zn[Ue]=Zn[je]=Zn[gt]=!1;var zn={};zn[de]=zn[Se]=zn[Vt]=zn[xn]=zn[Ze]=zn[Pe]=zn[Ii]=zn[br]=zn[yi]=zn[ar]=zn[ui]=zn[lt]=zn[It]=zn[en]=zn[ye]=zn[Ue]=zn[je]=zn[ke]=zn[bi]=zn[Rr]=zn[Yi]=zn[go]=!0,zn[$e]=zn[be]=zn[gt]=!1;var PY={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},OY={"&":"&","<":"<",">":">",'"':""","'":"'"},kY={"&":"&","<":"<",">":">",""":'"',"'":"'"},TY={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},MY=parseFloat,RY=parseInt,u5=typeof ua=="object"&&ua&&ua.Object===Object&&ua,DY=typeof self=="object"&&self&&self.Object===Object&&self,si=u5||DY||Function("return this")(),a2=t&&!t.nodeType&&t,Kl=a2&&!0&&e&&!e.nodeType&&e,s5=Kl&&Kl.exports===a2,u2=s5&&u5.process,Ho=function(){try{var ce=Kl&&Kl.require&&Kl.require("util").types;return ce||u2&&u2.binding&&u2.binding("util")}catch{}}(),l5=Ho&&Ho.isArrayBuffer,c5=Ho&&Ho.isDate,f5=Ho&&Ho.isMap,d5=Ho&&Ho.isRegExp,h5=Ho&&Ho.isSet,p5=Ho&&Ho.isTypedArray;function yo(ce,Ae,we){switch(we.length){case 0:return ce.call(Ae);case 1:return ce.call(Ae,we[0]);case 2:return ce.call(Ae,we[0],we[1]);case 3:return ce.call(Ae,we[0],we[1],we[2])}return ce.apply(Ae,we)}function $Y(ce,Ae,we,ot){for(var jt=-1,_n=ce==null?0:ce.length;++jt<_n;){var Fr=ce[jt];Ae(ot,Fr,we(Fr),ce)}return ot}function qo(ce,Ae){for(var we=-1,ot=ce==null?0:ce.length;++we-1}function s2(ce,Ae,we){for(var ot=-1,jt=ce==null?0:ce.length;++ot-1;);return we}function _5(ce,Ae){for(var we=ce.length;we--&&bf(Ae,ce[we],0)>-1;);return we}function WY(ce,Ae){for(var we=ce.length,ot=0;we--;)ce[we]===Ae&&++ot;return ot}var VY=d2(PY),HY=d2(OY);function qY(ce){return"\\"+TY[ce]}function KY(ce,Ae){return ce==null?n:ce[Ae]}function xf(ce){return SY.test(ce)}function GY(ce){return CY.test(ce)}function YY(ce){for(var Ae,we=[];!(Ae=ce.next()).done;)we.push(Ae.value);return we}function g2(ce){var Ae=-1,we=Array(ce.size);return ce.forEach(function(ot,jt){we[++Ae]=[jt,ot]}),we}function S5(ce,Ae){return function(we){return ce(Ae(we))}}function Rs(ce,Ae){for(var we=-1,ot=ce.length,jt=0,_n=[];++we-1}function NZ(f,p){var _=this.__data__,O=em(_,f);return O<0?(++this.size,_.push([f,p])):_[O][1]=p,this}Du.prototype.clear=RZ,Du.prototype.delete=DZ,Du.prototype.get=$Z,Du.prototype.has=IZ,Du.prototype.set=NZ;function $u(f){var p=-1,_=f==null?0:f.length;for(this.clear();++p<_;){var O=f[p];this.set(O[0],O[1])}}function FZ(){this.size=0,this.__data__={hash:new Yl,map:new(Jh||Du),string:new Yl}}function LZ(f){var p=dm(this,f).delete(f);return this.size-=p?1:0,p}function jZ(f){return dm(this,f).get(f)}function BZ(f){return dm(this,f).has(f)}function zZ(f,p){var _=dm(this,f),O=_.size;return _.set(f,p),this.size+=_.size==O?0:1,this}$u.prototype.clear=FZ,$u.prototype.delete=LZ,$u.prototype.get=jZ,$u.prototype.has=BZ,$u.prototype.set=zZ;function Zl(f){var p=-1,_=f==null?0:f.length;for(this.__data__=new $u;++p<_;)this.add(f[p])}function UZ(f){return this.__data__.set(f,s),this}function WZ(f){return this.__data__.has(f)}Zl.prototype.add=Zl.prototype.push=UZ,Zl.prototype.has=WZ;function Sa(f){var p=this.__data__=new Du(f);this.size=p.size}function VZ(){this.__data__=new Du,this.size=0}function HZ(f){var p=this.__data__,_=p.delete(f);return this.size=p.size,_}function qZ(f){return this.__data__.get(f)}function KZ(f){return this.__data__.has(f)}function GZ(f,p){var _=this.__data__;if(_ instanceof Du){var O=_.__data__;if(!Jh||O.length=p?f:p)),f}function Yo(f,p,_,O,R,z){var X,ae=p&d,fe=p&h,Me=p&v;if(_&&(X=R?_(f,O,R,z):_(f)),X!==n)return X;if(!sr(f))return f;var Re=Ut(f);if(Re){if(X=BX(f),!ae)return Zi(f,X)}else{var Ie=_i(f),et=Ie==be||Ie==yt;if(Ls(f))return o8(f,ae);if(Ie==en||Ie==de||et&&!R){if(X=fe||et?{}:C8(f),!ae)return fe?kX(f,QZ(X,f)):OX(f,I5(X,f))}else{if(!zn[Ie])return R?f:{};X=zX(f,Ie,ae)}}z||(z=new Sa);var ft=z.get(f);if(ft)return ft;z.set(f,X),J8(f)?f.forEach(function(Ot){X.add(Yo(Ot,p,_,Ot,f,z))}):X8(f)&&f.forEach(function(Ot,nn){X.set(nn,Yo(Ot,p,_,nn,f,z))});var Pt=Me?fe?U2:z2:fe?Qi:Zr,Xt=Re?n:Pt(f);return qo(Xt||f,function(Ot,nn){Xt&&(nn=Ot,Ot=f[nn]),rp(X,nn,Yo(Ot,p,_,nn,f,z))}),X}function JZ(f){var p=Zr(f);return function(_){return N5(_,f,p)}}function N5(f,p,_){var O=_.length;if(f==null)return!O;for(f=Ln(f);O--;){var R=_[O],z=p[R],X=f[R];if(X===n&&!(R in f)||!z(X))return!1}return!0}function F5(f,p,_){if(typeof f!="function")throw new Ko(a);return cp(function(){f.apply(n,_)},p)}function ip(f,p,_,O){var R=-1,z=Fg,X=!0,ae=f.length,fe=[],Me=p.length;if(!ae)return fe;_&&(p=nr(p,bo(_))),O?(z=s2,X=!1):p.length>=i&&(z=Xh,X=!1,p=new Zl(p));e:for(;++RR?0:R+_),O=O===n||O>R?R:Yt(O),O<0&&(O+=R),O=_>O?0:tk(O);_0&&_(ae)?p>1?li(ae,p-1,_,O,R):Ms(R,ae):O||(R[R.length]=ae)}return R}var S2=f8(),B5=f8(!0);function ru(f,p){return f&&S2(f,p,Zr)}function C2(f,p){return f&&B5(f,p,Zr)}function nm(f,p){return Ts(p,function(_){return ju(f[_])})}function Ql(f,p){p=Ns(p,f);for(var _=0,O=p.length;f!=null&&_p}function nX(f,p){return f!=null&&kn.call(f,p)}function rX(f,p){return f!=null&&p in Ln(f)}function iX(f,p,_){return f>=wi(p,_)&&f=120&&Re.length>=120)?new Zl(X&&Re):n}Re=f[0];var Ie=-1,et=ae[0];e:for(;++Ie-1;)ae!==f&&Kg.call(ae,fe,1),Kg.call(f,fe,1);return f}function X5(f,p){for(var _=f?p.length:0,O=_-1;_--;){var R=p[_];if(_==O||R!==z){var z=R;Lu(R)?Kg.call(f,R,1):$2(f,R)}}return f}function M2(f,p){return f+Zg(M5()*(p-f+1))}function mX(f,p,_,O){for(var R=-1,z=Lr(Yg((p-f)/(_||1)),0),X=we(z);z--;)X[O?z:++R]=f,f+=_;return X}function R2(f,p){var _="";if(!f||p<1||p>B)return _;do p%2&&(_+=f),p=Zg(p/2),p&&(f+=f);while(p);return _}function Jt(f,p){return Y2(P8(f,p,Ji),f+"")}function yX(f){return $5(Mf(f))}function bX(f,p){var _=Mf(f);return hm(_,Xl(p,0,_.length))}function up(f,p,_,O){if(!sr(f))return f;p=Ns(p,f);for(var R=-1,z=p.length,X=z-1,ae=f;ae!=null&&++RR?0:R+p),_=_>R?R:_,_<0&&(_+=R),R=p>_?0:_-p>>>0,p>>>=0;for(var z=we(R);++O>>1,X=f[z];X!==null&&!wo(X)&&(_?X<=p:X=i){var Me=p?null:DX(f);if(Me)return jg(Me);X=!1,R=Xh,fe=new Zl}else fe=p?[]:ae;e:for(;++O=O?f:Zo(f,p,_)}var i8=cZ||function(f){return si.clearTimeout(f)};function o8(f,p){if(p)return f.slice();var _=f.length,O=A5?A5(_):new f.constructor(_);return f.copy(O),O}function L2(f){var p=new f.constructor(f.byteLength);return new Hg(p).set(new Hg(f)),p}function CX(f,p){var _=p?L2(f.buffer):f.buffer;return new f.constructor(_,f.byteOffset,f.byteLength)}function EX(f){var p=new f.constructor(f.source,Be.exec(f));return p.lastIndex=f.lastIndex,p}function AX(f){return np?Ln(np.call(f)):{}}function a8(f,p){var _=p?L2(f.buffer):f.buffer;return new f.constructor(_,f.byteOffset,f.length)}function u8(f,p){if(f!==p){var _=f!==n,O=f===null,R=f===f,z=wo(f),X=p!==n,ae=p===null,fe=p===p,Me=wo(p);if(!ae&&!Me&&!z&&f>p||z&&X&&fe&&!ae&&!Me||O&&X&&fe||!_&&fe||!R)return 1;if(!O&&!z&&!Me&&f=ae)return fe;var Me=_[O];return fe*(Me=="desc"?-1:1)}}return f.index-p.index}function s8(f,p,_,O){for(var R=-1,z=f.length,X=_.length,ae=-1,fe=p.length,Me=Lr(z-X,0),Re=we(fe+Me),Ie=!O;++ae1?_[R-1]:n,X=R>2?_[2]:n;for(z=f.length>3&&typeof z=="function"?(R--,z):n,X&&Fi(_[0],_[1],X)&&(z=R<3?n:z,R=1),p=Ln(p);++O-1?R[z?p[X]:X]:n}}function p8(f){return Fu(function(p){var _=p.length,O=_,R=Go.prototype.thru;for(f&&p.reverse();O--;){var z=p[O];if(typeof z!="function")throw new Ko(a);if(R&&!X&&fm(z)=="wrapper")var X=new Go([],!0)}for(O=X?O:_;++O<_;){z=p[O];var ae=fm(z),fe=ae=="wrapper"?W2(z):n;fe&&K2(fe[0])&&fe[1]==(T|S|E|M)&&!fe[4].length&&fe[9]==1?X=X[fm(fe[0])].apply(X,fe[3]):X=z.length==1&&K2(z)?X[ae]():X.thru(z)}return function(){var Me=arguments,Re=Me[0];if(X&&Me.length==1&&Ut(Re))return X.plant(Re).value();for(var Ie=0,et=_?p[Ie].apply(this,Me):Re;++Ie<_;)et=p[Ie].call(this,et);return et}})}function um(f,p,_,O,R,z,X,ae,fe,Me){var Re=p&T,Ie=p&b,et=p&w,ft=p&(S|A),Pt=p&F,Xt=et?n:sp(f);function Ot(){for(var nn=arguments.length,dn=we(nn),_o=nn;_o--;)dn[_o]=arguments[_o];if(ft)var Li=kf(Ot),So=WY(dn,Li);if(O&&(dn=s8(dn,O,R,ft)),z&&(dn=l8(dn,z,X,ft)),nn-=So,ft&&nn1&&dn.reverse(),Re&&feae))return!1;var Me=z.get(f),Re=z.get(p);if(Me&&Re)return Me==p&&Re==f;var Ie=-1,et=!0,ft=_&m?new Zl:n;for(z.set(f,p),z.set(p,f);++Ie1?"& ":"")+p[O],p=p.join(_>2?", ":" "),f.replace($,`{ /* [wrapped with `+p+`] */ -`)}function _X(f){return dt(f)||Pl(f)||!!(bk&&f&&f[bk])}function eu(f,p){var _=typeof f;return p=p??I,!!p&&(_=="number"||_!="symbol"&&Yu.test(f))&&f>-1&&f%1==0&&f0){if(++p>=F)return arguments[0]}else p=0;return f.apply(n,arguments)}}function qg(f,p){var _=-1,O=f.length,T=O-1;for(p=p===n?O:p;++_1?f[p-1]:n;return _=typeof _=="function"?(f.pop(),_):n,k5(f,_)});function T5(f){var p=D(f);return p.__chain__=!0,p}function DQ(f,p){return p(f),f}function Gg(f,p){return p(f)}var $Q=Ja(function(f){var p=f.length,_=p?f[0]:0,O=this.__wrapped__,T=function(N){return u2(N,f)};return p>1||this.__actions__.length||!(O instanceof At)||!eu(_)?this.thru(T):(O=O.slice(_,+_+(p?1:0)),O.__actions__.push({func:Gg,args:[T],thisArg:n}),new so(O,this.__chain__).thru(function(N){return p&&!N.length&&N.push(n),N}))});function IQ(){return T5(this)}function NQ(){return new so(this.value(),this.__chain__)}function FQ(){this.__values__===n&&(this.__values__=V5(this.value()));var f=this.__index__>=this.__values__.length,p=f?n:this.__values__[this.__index__++];return{done:f,value:p}}function LQ(){return this}function jQ(f){for(var p,_=this;_ instanceof Rg;){var O=S5(_);O.__index__=0,O.__values__=n,p?T.__wrapped__=O:p=O;var T=O;_=_.__wrapped__}return T.__wrapped__=f,p}function BQ(){var f=this.__wrapped__;if(f instanceof At){var p=f;return this.__actions__.length&&(p=new At(this)),p=p.reverse(),p.__actions__.push({func:Gg,args:[I2],thisArg:n}),new so(p,this.__chain__)}return this.thru(I2)}function zQ(){return qk(this.__wrapped__,this.__actions__)}var UQ=jg(function(f,p,_){qt.call(f,_)?++f[_]:Xa(f,_,1)});function WQ(f,p,_){var O=dt(f)?ok:DZ;return _&&qr(f,p,_)&&(p=n),O(f,Je(p,3))}function VQ(f,p){var _=dt(f)?Ju:kk;return _(f,Je(p,3))}var HQ=r5(C5),qQ=r5(E5);function GQ(f,p){return br(Kg(f,p),1)}function KQ(f,p){return br(Kg(f,p),j)}function YQ(f,p,_){return _=_===n?1:gt(_),br(Kg(f,p),_)}function M5(f,p){var _=dt(f)?ao:rs;return _(f,Je(p,3))}function R5(f,p){var _=dt(f)?pY:Pk;return _(f,Je(p,3))}var ZQ=jg(function(f,p,_){qt.call(f,_)?f[_].push(p):Xa(f,_,[p])});function XQ(f,p,_,O){f=ui(f)?f:of(f),_=_&&!O?gt(_):0;var T=f.length;return _<0&&(_=Jn(T+_,0)),Jg(f)?_<=T&&f.indexOf(p,_)>-1:!!T&&qc(f,p,_)>-1}var QQ=wt(function(f,p,_){var O=-1,T=typeof p=="function",N=ui(f)?ce(f.length):[];return rs(f,function(K){N[++O]=T?Oi(p,K,_):Rh(K,p,_)}),N}),JQ=jg(function(f,p,_){Xa(f,_,p)});function Kg(f,p){var _=dt(f)?_n:Ik;return _(f,Je(p,3))}function eJ(f,p,_,O){return f==null?[]:(dt(p)||(p=p==null?[]:[p]),_=O?n:_,dt(_)||(_=_==null?[]:[_]),jk(f,p,_))}var tJ=jg(function(f,p,_){f[_?0:1].push(p)},function(){return[[],[]]});function nJ(f,p,_){var O=dt(f)?Kx:lk,T=arguments.length<3;return O(f,Je(p,4),_,T,rs)}function rJ(f,p,_){var O=dt(f)?mY:lk,T=arguments.length<3;return O(f,Je(p,4),_,T,Pk)}function iJ(f,p){var _=dt(f)?Ju:kk;return _(f,Xg(Je(p,3)))}function oJ(f){var p=dt(f)?Ck:XZ;return p(f)}function aJ(f,p,_){(_?qr(f,p,_):p===n)?p=1:p=gt(p);var O=dt(f)?PZ:QZ;return O(f,p)}function uJ(f){var p=dt(f)?kZ:eX;return p(f)}function sJ(f){if(f==null)return 0;if(ui(f))return Jg(f)?Kc(f):f.length;var p=Tr(f);return p==Te||p==Ce?f.size:h2(f).length}function lJ(f,p,_){var O=dt(f)?Yx:tX;return _&&qr(f,p,_)&&(p=n),O(f,Je(p,3))}var cJ=wt(function(f,p){if(f==null)return[];var _=p.length;return _>1&&qr(f,p[0],p[1])?p=[]:_>2&&qr(p[0],p[1],p[2])&&(p=[p[0]]),jk(f,br(p,1),[])}),Yg=VY||function(){return yr.Date.now()};function fJ(f,p){if(typeof p!="function")throw new uo(a);return f=gt(f),function(){if(--f<1)return p.apply(this,arguments)}}function D5(f,p,_){return p=_?n:p,p=f&&p==null?f.length:p,Qa(f,P,n,n,n,n,p)}function $5(f,p){var _;if(typeof p!="function")throw new uo(a);return f=gt(f),function(){return--f>0&&(_=p.apply(this,arguments)),f<=1&&(p=n),_}}var F2=wt(function(f,p,_){var O=y;if(_.length){var T=ts(_,nf(F2));O|=E}return Qa(f,O,p,_,T)}),I5=wt(function(f,p,_){var O=y|x;if(_.length){var T=ts(_,nf(I5));O|=E}return Qa(p,O,f,_,T)});function N5(f,p,_){p=_?n:p;var O=Qa(f,S,n,n,n,n,n,p);return O.placeholder=N5.placeholder,O}function F5(f,p,_){p=_?n:p;var O=Qa(f,A,n,n,n,n,n,p);return O.placeholder=F5.placeholder,O}function L5(f,p,_){var O,T,N,K,Q,ne,ve=0,be=!1,_e=!1,Me=!0;if(typeof f!="function")throw new uo(a);p=ho(p)||0,An(_)&&(be=!!_.leading,_e="maxWait"in _,N=_e?Jn(ho(_.maxWait)||0,p):N,Me="trailing"in _?!!_.trailing:Me);function Ve(jn){var Lo=O,ru=T;return O=T=n,ve=jn,K=f.apply(ru,Lo),K}function et(jn){return ve=jn,Q=Fh(St,p),be?Ve(jn):K}function yt(jn){var Lo=jn-ne,ru=jn-ve,r8=p-Lo;return _e?kr(r8,N-ru):r8}function tt(jn){var Lo=jn-ne,ru=jn-ve;return ne===n||Lo>=p||Lo<0||_e&&ru>=N}function St(){var jn=Yg();if(tt(jn))return Mt(jn);Q=Fh(St,yt(jn))}function Mt(jn){return Q=n,Me&&O?Ve(jn):(O=T=n,K)}function Mi(){Q!==n&&Kk(Q),ve=0,O=ne=T=Q=n}function Gr(){return Q===n?K:Mt(Yg())}function Ri(){var jn=Yg(),Lo=tt(jn);if(O=arguments,T=this,ne=jn,Lo){if(Q===n)return et(ne);if(_e)return Kk(Q),Q=Fh(St,p),Ve(ne)}return Q===n&&(Q=Fh(St,p)),K}return Ri.cancel=Mi,Ri.flush=Gr,Ri}var dJ=wt(function(f,p){return Ok(f,1,p)}),hJ=wt(function(f,p,_){return Ok(f,ho(p)||0,_)});function pJ(f){return Qa(f,M)}function Zg(f,p){if(typeof f!="function"||p!=null&&typeof p!="function")throw new uo(a);var _=function(){var O=arguments,T=p?p.apply(this,O):O[0],N=_.cache;if(N.has(T))return N.get(T);var K=f.apply(this,O);return _.cache=N.set(T,K)||N,K};return _.cache=new(Zg.Cache||Za),_}Zg.Cache=Za;function Xg(f){if(typeof f!="function")throw new uo(a);return function(){var p=arguments;switch(p.length){case 0:return!f.call(this);case 1:return!f.call(this,p[0]);case 2:return!f.call(this,p[0],p[1]);case 3:return!f.call(this,p[0],p[1],p[2])}return!f.apply(this,p)}}function mJ(f){return $5(2,f)}var gJ=nX(function(f,p){p=p.length==1&&dt(p[0])?_n(p[0],Pi(Je())):_n(br(p,1),Pi(Je()));var _=p.length;return wt(function(O){for(var T=-1,N=kr(O.length,_);++T=p}),Pl=Rk(function(){return arguments}())?Rk:function(f){return Dn(f)&&qt.call(f,"callee")&&!yk.call(f,"callee")},dt=ce.isArray,MJ=J4?Pi(J4):jZ;function ui(f){return f!=null&&Qg(f.length)&&!tu(f)}function Ln(f){return Dn(f)&&ui(f)}function RJ(f){return f===!0||f===!1||Dn(f)&&Hr(f)==Ae}var us=qY||Y2,DJ=ek?Pi(ek):BZ;function $J(f){return Dn(f)&&f.nodeType===1&&!Lh(f)}function IJ(f){if(f==null)return!0;if(ui(f)&&(dt(f)||typeof f=="string"||typeof f.splice=="function"||us(f)||rf(f)||Pl(f)))return!f.length;var p=Tr(f);if(p==Te||p==Ce)return!f.size;if(Nh(f))return!h2(f).length;for(var _ in f)if(qt.call(f,_))return!1;return!0}function NJ(f,p){return Dh(f,p)}function FJ(f,p,_){_=typeof _=="function"?_:n;var O=_?_(f,p):n;return O===n?Dh(f,p,n,_):!!O}function j2(f){if(!Dn(f))return!1;var p=Hr(f);return p==ge||p==we||typeof f.message=="string"&&typeof f.name=="string"&&!Lh(f)}function LJ(f){return typeof f=="number"&&wk(f)}function tu(f){if(!An(f))return!1;var p=Hr(f);return p==ae||p==$e||p==ie||p==oe}function B5(f){return typeof f=="number"&&f==gt(f)}function Qg(f){return typeof f=="number"&&f>-1&&f%1==0&&f<=I}function An(f){var p=typeof f;return f!=null&&(p=="object"||p=="function")}function Dn(f){return f!=null&&typeof f=="object"}var z5=tk?Pi(tk):UZ;function jJ(f,p){return f===p||d2(f,p,k2(p))}function BJ(f,p,_){return _=typeof _=="function"?_:n,d2(f,p,k2(p),_)}function zJ(f){return U5(f)&&f!=+f}function UJ(f){if(EX(f))throw new lt(o);return Dk(f)}function WJ(f){return f===null}function VJ(f){return f==null}function U5(f){return typeof f=="number"||Dn(f)&&Hr(f)==qe}function Lh(f){if(!Dn(f)||Hr(f)!=Rt)return!1;var p=Eg(f);if(p===null)return!0;var _=qt.call(p,"constructor")&&p.constructor;return typeof _=="function"&&_ instanceof _&&xg.call(_)==BY}var B2=nk?Pi(nk):WZ;function HJ(f){return B5(f)&&f>=-I&&f<=I}var W5=rk?Pi(rk):VZ;function Jg(f){return typeof f=="string"||!dt(f)&&Dn(f)&&Hr(f)==Ee}function Ti(f){return typeof f=="symbol"||Dn(f)&&Hr(f)==ye}var rf=ik?Pi(ik):HZ;function qJ(f){return f===n}function GJ(f){return Dn(f)&&Tr(f)==Ye}function KJ(f){return Dn(f)&&Hr(f)==sn}var YJ=Wg(p2),ZJ=Wg(function(f,p){return f<=p});function V5(f){if(!f)return[];if(ui(f))return Jg(f)?Io(f):ai(f);if(Eh&&f[Eh])return PY(f[Eh]());var p=Tr(f),_=p==Te?t2:p==Ce?yg:of;return _(f)}function nu(f){if(!f)return f===0?f:0;if(f=ho(f),f===j||f===-j){var p=f<0?-1:1;return p*z}return f===f?f:0}function gt(f){var p=nu(f),_=p%1;return p===p?_?p-_:p:0}function H5(f){return f?Cl(gt(f),0,X):0}function ho(f){if(typeof f=="number")return f;if(Ti(f))return U;if(An(f)){var p=typeof f.valueOf=="function"?f.valueOf():f;f=An(p)?p+"":p}if(typeof f!="string")return f===0?f:+f;f=ck(f);var _=Xt.test(f);return _||xn.test(f)?fY(f.slice(2),_?2:8):Xn.test(f)?U:+f}function q5(f){return wa(f,si(f))}function XJ(f){return f?Cl(gt(f),-I,I):f===0?f:0}function Ut(f){return f==null?"":ki(f)}var QJ=ef(function(f,p){if(Nh(p)||ui(p)){wa(p,lr(p),f);return}for(var _ in p)qt.call(p,_)&&Th(f,_,p[_])}),G5=ef(function(f,p){wa(p,si(p),f)}),ev=ef(function(f,p,_,O){wa(p,si(p),f,O)}),JJ=ef(function(f,p,_,O){wa(p,lr(p),f,O)}),eee=Ja(u2);function tee(f,p){var _=Jc(f);return p==null?_:Ek(_,p)}var nee=wt(function(f,p){f=on(f);var _=-1,O=p.length,T=O>2?p[2]:n;for(T&&qr(p[0],p[1],T)&&(O=1);++_1),N}),wa(f,O2(f),_),O&&(_=lo(_,d|h|m,hX));for(var T=p.length;T--;)b2(_,p[T]);return _});function wee(f,p){return Y5(f,Xg(Je(p)))}var xee=Ja(function(f,p){return f==null?{}:KZ(f,p)});function Y5(f,p){if(f==null)return{};var _=_n(O2(f),function(O){return[O]});return p=Je(p),Bk(f,_,function(O,T){return p(O,T[0])})}function _ee(f,p,_){p=os(p,f);var O=-1,T=p.length;for(T||(T=1,f=n);++Op){var O=f;f=p,p=O}if(_||f%1||p%1){var T=xk();return kr(f+T*(p-f+cY("1e-"+((T+"").length-1))),p)}return g2(f,p)}var Dee=tf(function(f,p,_){return p=p.toLowerCase(),f+(_?Q5(p):p)});function Q5(f){return W2(Ut(f).toLowerCase())}function J5(f){return f=Ut(f),f&&f.replace(gl,SY).replace(eY,"")}function $ee(f,p,_){f=Ut(f),p=ki(p);var O=f.length;_=_===n?O:Cl(gt(_),0,O);var T=_;return _-=p.length,_>=0&&f.slice(_,T)==p}function Iee(f){return f=Ut(f),f&&Wr.test(f)?f.replace($t,CY):f}function Nee(f){return f=Ut(f),f&&le.test(f)?f.replace(re,"\\$&"):f}var Fee=tf(function(f,p,_){return f+(_?"-":"")+p.toLowerCase()}),Lee=tf(function(f,p,_){return f+(_?" ":"")+p.toLowerCase()}),jee=n5("toLowerCase");function Bee(f,p,_){f=Ut(f),p=gt(p);var O=p?Kc(f):0;if(!p||O>=p)return f;var T=(p-O)/2;return Ug(kg(T),_)+f+Ug(Pg(T),_)}function zee(f,p,_){f=Ut(f),p=gt(p);var O=p?Kc(f):0;return p&&O>>0,_?(f=Ut(f),f&&(typeof p=="string"||p!=null&&!B2(p))&&(p=ki(p),!p&&Gc(f))?as(Io(f),0,_):f.split(p,_)):[]}var Kee=tf(function(f,p,_){return f+(_?" ":"")+W2(p)});function Yee(f,p,_){return f=Ut(f),_=_==null?0:Cl(gt(_),0,f.length),p=ki(p),f.slice(_,_+p.length)==p}function Zee(f,p,_){var O=D.templateSettings;_&&qr(f,p,_)&&(p=n),f=Ut(f),p=ev({},p,O,l5);var T=ev({},p.imports,O.imports,l5),N=lr(T),K=e2(T,N),Q,ne,ve=0,be=p.interpolate||oi,_e="__p += '",Me=n2((p.escape||oi).source+"|"+be.source+"|"+(be===Ga?_t:oi).source+"|"+(p.evaluate||oi).source+"|$","g"),Ve="//# sourceURL="+(qt.call(p,"sourceURL")?(p.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++oY+"]")+` -`;f.replace(Me,function(tt,St,Mt,Mi,Gr,Ri){return Mt||(Mt=Mi),_e+=f.slice(ve,Ri).replace(io,EY),St&&(Q=!0,_e+=`' + -__e(`+St+`) + -'`),Gr&&(ne=!0,_e+=`'; -`+Gr+`; -__p += '`),Mt&&(_e+=`' + -((__t = (`+Mt+`)) == null ? '' : __t) + -'`),ve=Ri+tt.length,tt}),_e+=`'; -`;var et=qt.call(p,"variable")&&p.variable;if(!et)_e=`with (obj) { -`+_e+` +`)}function WX(f){return Ut(f)||tc(f)||!!(k5&&f&&f[k5])}function Lu(f,p){var _=typeof f;return p=p??B,!!p&&(_=="number"||_!="symbol"&&bt.test(f))&&f>-1&&f%1==0&&f0){if(++p>=W)return arguments[0]}else p=0;return f.apply(n,arguments)}}function hm(f,p){var _=-1,O=f.length,R=O-1;for(p=p===n?O:p;++_1?f[p-1]:n;return _=typeof _=="function"?(f.pop(),_):n,j8(f,_)});function B8(f){var p=L(f);return p.__chain__=!0,p}function eJ(f,p){return p(f),f}function pm(f,p){return p(f)}var tJ=Fu(function(f){var p=f.length,_=p?f[0]:0,O=this.__wrapped__,R=function(z){return _2(z,f)};return p>1||this.__actions__.length||!(O instanceof sn)||!Lu(_)?this.thru(R):(O=O.slice(_,+_+(p?1:0)),O.__actions__.push({func:pm,args:[R],thisArg:n}),new Go(O,this.__chain__).thru(function(z){return p&&!z.length&&z.push(n),z}))});function nJ(){return B8(this)}function rJ(){return new Go(this.value(),this.__chain__)}function iJ(){this.__values__===n&&(this.__values__=ek(this.value()));var f=this.__index__>=this.__values__.length,p=f?n:this.__values__[this.__index__++];return{done:f,value:p}}function oJ(){return this}function aJ(f){for(var p,_=this;_ instanceof Jg;){var O=D8(_);O.__index__=0,O.__values__=n,p?R.__wrapped__=O:p=O;var R=O;_=_.__wrapped__}return R.__wrapped__=f,p}function uJ(){var f=this.__wrapped__;if(f instanceof sn){var p=f;return this.__actions__.length&&(p=new sn(this)),p=p.reverse(),p.__actions__.push({func:pm,args:[Z2],thisArg:n}),new Go(p,this.__chain__)}return this.thru(Z2)}function sJ(){return n8(this.__wrapped__,this.__actions__)}var lJ=am(function(f,p,_){kn.call(f,_)?++f[_]:Iu(f,_,1)});function cJ(f,p,_){var O=Ut(f)?v5:eX;return _&&Fi(f,p,_)&&(p=n),O(f,Et(p,3))}function fJ(f,p){var _=Ut(f)?Ts:j5;return _(f,Et(p,3))}var dJ=h8($8),hJ=h8(I8);function pJ(f,p){return li(vm(f,p),1)}function vJ(f,p){return li(vm(f,p),V)}function gJ(f,p,_){return _=_===n?1:Yt(_),li(vm(f,p),_)}function z8(f,p){var _=Ut(f)?qo:$s;return _(f,Et(p,3))}function U8(f,p){var _=Ut(f)?IY:L5;return _(f,Et(p,3))}var mJ=am(function(f,p,_){kn.call(f,_)?f[_].push(p):Iu(f,_,[p])});function yJ(f,p,_,O){f=Xi(f)?f:Mf(f),_=_&&!O?Yt(_):0;var R=f.length;return _<0&&(_=Lr(R+_,0)),xm(f)?_<=R&&f.indexOf(p,_)>-1:!!R&&bf(f,p,_)>-1}var bJ=Jt(function(f,p,_){var O=-1,R=typeof p=="function",z=Xi(f)?we(f.length):[];return $s(f,function(X){z[++O]=R?yo(p,X,_):op(X,p,_)}),z}),xJ=am(function(f,p,_){Iu(f,_,p)});function vm(f,p){var _=Ut(f)?nr:H5;return _(f,Et(p,3))}function wJ(f,p,_,O){return f==null?[]:(Ut(p)||(p=p==null?[]:[p]),_=O?n:_,Ut(_)||(_=_==null?[]:[_]),Y5(f,p,_))}var _J=am(function(f,p,_){f[_?0:1].push(p)},function(){return[[],[]]});function SJ(f,p,_){var O=Ut(f)?l2:b5,R=arguments.length<3;return O(f,Et(p,4),_,R,$s)}function CJ(f,p,_){var O=Ut(f)?NY:b5,R=arguments.length<3;return O(f,Et(p,4),_,R,L5)}function EJ(f,p){var _=Ut(f)?Ts:j5;return _(f,ym(Et(p,3)))}function AJ(f){var p=Ut(f)?$5:yX;return p(f)}function PJ(f,p,_){(_?Fi(f,p,_):p===n)?p=1:p=Yt(p);var O=Ut(f)?YZ:bX;return O(f,p)}function OJ(f){var p=Ut(f)?ZZ:wX;return p(f)}function kJ(f){if(f==null)return 0;if(Xi(f))return xm(f)?wf(f):f.length;var p=_i(f);return p==lt||p==Ue?f.size:O2(f).length}function TJ(f,p,_){var O=Ut(f)?c2:_X;return _&&Fi(f,p,_)&&(p=n),O(f,Et(p,3))}var MJ=Jt(function(f,p){if(f==null)return[];var _=p.length;return _>1&&Fi(f,p[0],p[1])?p=[]:_>2&&Fi(p[0],p[1],p[2])&&(p=[p[0]]),Y5(f,li(p,1),[])}),gm=fZ||function(){return si.Date.now()};function RJ(f,p){if(typeof p!="function")throw new Ko(a);return f=Yt(f),function(){if(--f<1)return p.apply(this,arguments)}}function W8(f,p,_){return p=_?n:p,p=f&&p==null?f.length:p,Nu(f,T,n,n,n,n,p)}function V8(f,p){var _;if(typeof p!="function")throw new Ko(a);return f=Yt(f),function(){return--f>0&&(_=p.apply(this,arguments)),f<=1&&(p=n),_}}var Q2=Jt(function(f,p,_){var O=b;if(_.length){var R=Rs(_,kf(Q2));O|=E}return Nu(f,O,p,_,R)}),H8=Jt(function(f,p,_){var O=b|w;if(_.length){var R=Rs(_,kf(H8));O|=E}return Nu(p,O,f,_,R)});function q8(f,p,_){p=_?n:p;var O=Nu(f,S,n,n,n,n,n,p);return O.placeholder=q8.placeholder,O}function K8(f,p,_){p=_?n:p;var O=Nu(f,A,n,n,n,n,n,p);return O.placeholder=K8.placeholder,O}function G8(f,p,_){var O,R,z,X,ae,fe,Me=0,Re=!1,Ie=!1,et=!0;if(typeof f!="function")throw new Ko(a);p=Qo(p)||0,sr(_)&&(Re=!!_.leading,Ie="maxWait"in _,z=Ie?Lr(Qo(_.maxWait)||0,p):z,et="trailing"in _?!!_.trailing:et);function ft(_r){var Ea=O,zu=R;return O=R=n,Me=_r,X=f.apply(zu,Ea),X}function Pt(_r){return Me=_r,ae=cp(nn,p),Re?ft(_r):X}function Xt(_r){var Ea=_r-fe,zu=_r-Me,hk=p-Ea;return Ie?wi(hk,z-zu):hk}function Ot(_r){var Ea=_r-fe,zu=_r-Me;return fe===n||Ea>=p||Ea<0||Ie&&zu>=z}function nn(){var _r=gm();if(Ot(_r))return dn(_r);ae=cp(nn,Xt(_r))}function dn(_r){return ae=n,et&&O?ft(_r):(O=R=n,X)}function _o(){ae!==n&&i8(ae),Me=0,O=fe=R=ae=n}function Li(){return ae===n?X:dn(gm())}function So(){var _r=gm(),Ea=Ot(_r);if(O=arguments,R=this,fe=_r,Ea){if(ae===n)return Pt(fe);if(Ie)return i8(ae),ae=cp(nn,p),ft(fe)}return ae===n&&(ae=cp(nn,p)),X}return So.cancel=_o,So.flush=Li,So}var DJ=Jt(function(f,p){return F5(f,1,p)}),$J=Jt(function(f,p,_){return F5(f,Qo(p)||0,_)});function IJ(f){return Nu(f,F)}function mm(f,p){if(typeof f!="function"||p!=null&&typeof p!="function")throw new Ko(a);var _=function(){var O=arguments,R=p?p.apply(this,O):O[0],z=_.cache;if(z.has(R))return z.get(R);var X=f.apply(this,O);return _.cache=z.set(R,X)||z,X};return _.cache=new(mm.Cache||$u),_}mm.Cache=$u;function ym(f){if(typeof f!="function")throw new Ko(a);return function(){var p=arguments;switch(p.length){case 0:return!f.call(this);case 1:return!f.call(this,p[0]);case 2:return!f.call(this,p[0],p[1]);case 3:return!f.call(this,p[0],p[1],p[2])}return!f.apply(this,p)}}function NJ(f){return V8(2,f)}var FJ=SX(function(f,p){p=p.length==1&&Ut(p[0])?nr(p[0],bo(Et())):nr(li(p,1),bo(Et()));var _=p.length;return Jt(function(O){for(var R=-1,z=wi(O.length,_);++R=p}),tc=U5(function(){return arguments}())?U5:function(f){return pr(f)&&kn.call(f,"callee")&&!O5.call(f,"callee")},Ut=we.isArray,QJ=l5?bo(l5):aX;function Xi(f){return f!=null&&bm(f.length)&&!ju(f)}function wr(f){return pr(f)&&Xi(f)}function JJ(f){return f===!0||f===!1||pr(f)&&Ni(f)==Ze}var Ls=hZ||c_,eee=c5?bo(c5):uX;function tee(f){return pr(f)&&f.nodeType===1&&!fp(f)}function nee(f){if(f==null)return!0;if(Xi(f)&&(Ut(f)||typeof f=="string"||typeof f.splice=="function"||Ls(f)||Tf(f)||tc(f)))return!f.length;var p=_i(f);if(p==lt||p==Ue)return!f.size;if(lp(f))return!O2(f).length;for(var _ in f)if(kn.call(f,_))return!1;return!0}function ree(f,p){return ap(f,p)}function iee(f,p,_){_=typeof _=="function"?_:n;var O=_?_(f,p):n;return O===n?ap(f,p,n,_):!!O}function e_(f){if(!pr(f))return!1;var p=Ni(f);return p==$e||p==Fe||typeof f.message=="string"&&typeof f.name=="string"&&!fp(f)}function oee(f){return typeof f=="number"&&T5(f)}function ju(f){if(!sr(f))return!1;var p=Ni(f);return p==be||p==yt||p==ge||p==pe}function Z8(f){return typeof f=="number"&&f==Yt(f)}function bm(f){return typeof f=="number"&&f>-1&&f%1==0&&f<=B}function sr(f){var p=typeof f;return f!=null&&(p=="object"||p=="function")}function pr(f){return f!=null&&typeof f=="object"}var X8=f5?bo(f5):lX;function aee(f,p){return f===p||P2(f,p,V2(p))}function uee(f,p,_){return _=typeof _=="function"?_:n,P2(f,p,V2(p),_)}function see(f){return Q8(f)&&f!=+f}function lee(f){if(qX(f))throw new jt(o);return W5(f)}function cee(f){return f===null}function fee(f){return f==null}function Q8(f){return typeof f=="number"||pr(f)&&Ni(f)==It}function fp(f){if(!pr(f)||Ni(f)!=en)return!1;var p=qg(f);if(p===null)return!0;var _=kn.call(p,"constructor")&&p.constructor;return typeof _=="function"&&_ instanceof _&&Ug.call(_)==uZ}var t_=d5?bo(d5):cX;function dee(f){return Z8(f)&&f>=-B&&f<=B}var J8=h5?bo(h5):fX;function xm(f){return typeof f=="string"||!Ut(f)&&pr(f)&&Ni(f)==je}function wo(f){return typeof f=="symbol"||pr(f)&&Ni(f)==ke}var Tf=p5?bo(p5):dX;function hee(f){return f===n}function pee(f){return pr(f)&&_i(f)==gt}function vee(f){return pr(f)&&Ni(f)==bn}var gee=cm(k2),mee=cm(function(f,p){return f<=p});function ek(f){if(!f)return[];if(Xi(f))return xm(f)?_a(f):Zi(f);if(Qh&&f[Qh])return YY(f[Qh]());var p=_i(f),_=p==lt?g2:p==Ue?jg:Mf;return _(f)}function Bu(f){if(!f)return f===0?f:0;if(f=Qo(f),f===V||f===-V){var p=f<0?-1:1;return p*q}return f===f?f:0}function Yt(f){var p=Bu(f),_=p%1;return p===p?_?p-_:p:0}function tk(f){return f?Xl(Yt(f),0,ue):0}function Qo(f){if(typeof f=="number")return f;if(wo(f))return Y;if(sr(f)){var p=typeof f.valueOf=="function"?f.valueOf():f;f=sr(p)?p+"":p}if(typeof f!="string")return f===0?f:+f;f=x5(f);var _=ct.test(f);return _||rt.test(f)?RY(f.slice(2),_?2:8):He.test(f)?Y:+f}function nk(f){return iu(f,Qi(f))}function yee(f){return f?Xl(Yt(f),-B,B):f===0?f:0}function En(f){return f==null?"":xo(f)}var bee=Pf(function(f,p){if(lp(p)||Xi(p)){iu(p,Zr(p),f);return}for(var _ in p)kn.call(p,_)&&rp(f,_,p[_])}),rk=Pf(function(f,p){iu(p,Qi(p),f)}),wm=Pf(function(f,p,_,O){iu(p,Qi(p),f,O)}),xee=Pf(function(f,p,_,O){iu(p,Zr(p),f,O)}),wee=Fu(_2);function _ee(f,p){var _=Af(f);return p==null?_:I5(_,p)}var See=Jt(function(f,p){f=Ln(f);var _=-1,O=p.length,R=O>2?p[2]:n;for(R&&Fi(p[0],p[1],R)&&(O=1);++_1),z}),iu(f,U2(f),_),O&&(_=Yo(_,d|h|v,$X));for(var R=p.length;R--;)$2(_,p[R]);return _});function zee(f,p){return ok(f,ym(Et(p)))}var Uee=Fu(function(f,p){return f==null?{}:vX(f,p)});function ok(f,p){if(f==null)return{};var _=nr(U2(f),function(O){return[O]});return p=Et(p),Z5(f,_,function(O,R){return p(O,R[0])})}function Wee(f,p,_){p=Ns(p,f);var O=-1,R=p.length;for(R||(R=1,f=n);++Op){var O=f;f=p,p=O}if(_||f%1||p%1){var R=M5();return wi(f+R*(p-f+MY("1e-"+((R+"").length-1))),p)}return M2(f,p)}var ete=Of(function(f,p,_){return p=p.toLowerCase(),f+(_?sk(p):p)});function sk(f){return i_(En(f).toLowerCase())}function lk(f){return f=En(f),f&&f.replace(At,VY).replace(wY,"")}function tte(f,p,_){f=En(f),p=xo(p);var O=f.length;_=_===n?O:Xl(Yt(_),0,O);var R=_;return _-=p.length,_>=0&&f.slice(_,R)==p}function nte(f){return f=En(f),f&&qn.test(f)?f.replace(fn,HY):f}function rte(f){return f=En(f),f&&xe.test(f)?f.replace(le,"\\$&"):f}var ite=Of(function(f,p,_){return f+(_?"-":"")+p.toLowerCase()}),ote=Of(function(f,p,_){return f+(_?" ":"")+p.toLowerCase()}),ate=d8("toLowerCase");function ute(f,p,_){f=En(f),p=Yt(p);var O=p?wf(f):0;if(!p||O>=p)return f;var R=(p-O)/2;return lm(Zg(R),_)+f+lm(Yg(R),_)}function ste(f,p,_){f=En(f),p=Yt(p);var O=p?wf(f):0;return p&&O>>0,_?(f=En(f),f&&(typeof p=="string"||p!=null&&!t_(p))&&(p=xo(p),!p&&xf(f))?Fs(_a(f),0,_):f.split(p,_)):[]}var vte=Of(function(f,p,_){return f+(_?" ":"")+i_(p)});function gte(f,p,_){return f=En(f),_=_==null?0:Xl(Yt(_),0,f.length),p=xo(p),f.slice(_,_+p.length)==p}function mte(f,p,_){var O=L.templateSettings;_&&Fi(f,p,_)&&(p=n),f=En(f),p=wm({},p,O,b8);var R=wm({},p.imports,O.imports,b8),z=Zr(R),X=v2(R,z),ae,fe,Me=0,Re=p.interpolate||vt,Ie="__p += '",et=m2((p.escape||vt).source+"|"+Re.source+"|"+(Re===mo?Ce:vt).source+"|"+(p.evaluate||vt).source+"|$","g"),ft="//# sourceURL="+(kn.call(p,"sourceURL")?(p.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++AY+"]")+` +`;f.replace(et,function(Ot,nn,dn,_o,Li,So){return dn||(dn=_o),Ie+=f.slice(Me,So).replace(ht,qY),nn&&(ae=!0,Ie+=`' + +__e(`+nn+`) + +'`),Li&&(fe=!0,Ie+=`'; +`+Li+`; +__p += '`),dn&&(Ie+=`' + +((__t = (`+dn+`)) == null ? '' : __t) + +'`),Me=So+Ot.length,Ot}),Ie+=`'; +`;var Pt=kn.call(p,"variable")&&p.variable;if(!Pt)Ie=`with (obj) { +`+Ie+` } -`;else if(Le.test(et))throw new lt(u);_e=(ne?_e.replace(ya,""):_e).replace(Ai,"$1").replace(ml,"$1;"),_e="function("+(et||"obj")+`) { -`+(et?"":`obj || (obj = {}); -`)+"var __t, __p = ''"+(Q?", __e = _.escape":"")+(ne?`, __j = Array.prototype.join; +`;else if(ne.test(Pt))throw new jt(u);Ie=(fe?Ie.replace(xi,""):Ie).replace(Dr,"$1").replace(wa,"$1;"),Ie="function("+(Pt||"obj")+`) { +`+(Pt?"":`obj || (obj = {}); +`)+"var __t, __p = ''"+(ae?", __e = _.escape":"")+(fe?`, __j = Array.prototype.join; function print() { __p += __j.call(arguments, '') } `:`; -`)+_e+`return __p -}`;var yt=t8(function(){return Lt(N,Ve+"return "+_e).apply(n,K)});if(yt.source=_e,j2(yt))throw yt;return yt}function Xee(f){return Ut(f).toLowerCase()}function Qee(f){return Ut(f).toUpperCase()}function Jee(f,p,_){if(f=Ut(f),f&&(_||p===n))return ck(f);if(!f||!(p=ki(p)))return f;var O=Io(f),T=Io(p),N=fk(O,T),K=dk(O,T)+1;return as(O,N,K).join("")}function ete(f,p,_){if(f=Ut(f),f&&(_||p===n))return f.slice(0,pk(f)+1);if(!f||!(p=ki(p)))return f;var O=Io(f),T=dk(O,Io(p))+1;return as(O,0,T).join("")}function tte(f,p,_){if(f=Ut(f),f&&(_||p===n))return f.replace(xe,"");if(!f||!(p=ki(p)))return f;var O=Io(f),T=fk(O,Io(p));return as(O,T).join("")}function nte(f,p){var _=L,O=B;if(An(p)){var T="separator"in p?p.separator:T;_="length"in p?gt(p.length):_,O="omission"in p?ki(p.omission):O}f=Ut(f);var N=f.length;if(Gc(f)){var K=Io(f);N=K.length}if(_>=N)return f;var Q=_-Kc(O);if(Q<1)return O;var ne=K?as(K,0,Q).join(""):f.slice(0,Q);if(T===n)return ne+O;if(K&&(Q+=ne.length-Q),B2(T)){if(f.slice(Q).search(T)){var ve,be=ne;for(T.global||(T=n2(T.source,Ut(Et.exec(T))+"g")),T.lastIndex=0;ve=T.exec(be);)var _e=ve.index;ne=ne.slice(0,_e===n?Q:_e)}}else if(f.indexOf(ki(T),Q)!=Q){var Me=ne.lastIndexOf(T);Me>-1&&(ne=ne.slice(0,Me))}return ne+O}function rte(f){return f=Ut(f),f&&Ht.test(f)?f.replace(rt,RY):f}var ite=tf(function(f,p,_){return f+(_?" ":"")+p.toUpperCase()}),W2=n5("toUpperCase");function e8(f,p,_){return f=Ut(f),p=_?n:p,p===n?OY(f)?IY(f):yY(f):f.match(p)||[]}var t8=wt(function(f,p){try{return Oi(f,n,p)}catch(_){return j2(_)?_:new lt(_)}}),ote=Ja(function(f,p){return ao(p,function(_){_=xa(_),Xa(f,_,F2(f[_],f))}),f});function ate(f){var p=f==null?0:f.length,_=Je();return f=p?_n(f,function(O){if(typeof O[1]!="function")throw new uo(a);return[_(O[0]),O[1]]}):[],wt(function(O){for(var T=-1;++TI)return[];var _=X,O=kr(f,X);p=Je(p),f-=X;for(var T=Jx(O,p);++_0||p<0)?new At(_):(f<0?_=_.takeRight(-f):f&&(_=_.drop(f)),p!==n&&(p=gt(p),_=p<0?_.dropRight(-p):_.take(p-f)),_)},At.prototype.takeRightWhile=function(f){return this.reverse().takeWhile(f).reverse()},At.prototype.toArray=function(){return this.take(X)},ba(At.prototype,function(f,p){var _=/^(?:filter|find|map|reject)|While$/.test(p),O=/^(?:head|last)$/.test(p),T=D[O?"take"+(p=="last"?"Right":""):p],N=O||/^find/.test(p);T&&(D.prototype[p]=function(){var K=this.__wrapped__,Q=O?[1]:arguments,ne=K instanceof At,ve=Q[0],be=ne||dt(K),_e=function(St){var Mt=T.apply(D,es([St],Q));return O&&Me?Mt[0]:Mt};be&&_&&typeof ve=="function"&&ve.length!=1&&(ne=be=!1);var Me=this.__chain__,Ve=!!this.__actions__.length,et=N&&!Me,yt=ne&&!Ve;if(!N&&be){K=yt?K:new At(this);var tt=f.apply(K,Q);return tt.__actions__.push({func:Gg,args:[_e],thisArg:n}),new so(tt,Me)}return et&&yt?f.apply(this,Q):(tt=this.thru(_e),et?O?tt.value()[0]:tt.value():tt)})}),ao(["pop","push","shift","sort","splice","unshift"],function(f){var p=bg[f],_=/^(?:push|sort|unshift)$/.test(f)?"tap":"thru",O=/^(?:pop|shift)$/.test(f);D.prototype[f]=function(){var T=arguments;if(O&&!this.__chain__){var N=this.value();return p.apply(dt(N)?N:[],T)}return this[_](function(K){return p.apply(dt(K)?K:[],T)})}}),ba(At.prototype,function(f,p){var _=D[p];if(_){var O=_.name+"";qt.call(Qc,O)||(Qc[O]=[]),Qc[O].push({name:p,func:_})}}),Qc[Bg(n,x).name]=[{name:"wrapper",func:n}],At.prototype.clone=rZ,At.prototype.reverse=iZ,At.prototype.value=oZ,D.prototype.at=$Q,D.prototype.chain=IQ,D.prototype.commit=NQ,D.prototype.next=FQ,D.prototype.plant=jQ,D.prototype.reverse=BQ,D.prototype.toJSON=D.prototype.valueOf=D.prototype.value=zQ,D.prototype.first=D.prototype.head,Eh&&(D.prototype[Eh]=LQ),D},Yc=NY();wl?((wl.exports=Yc)._=Yc,Hx._=Yc):yr._=Yc}).call(Yo)})(Db,Db.exports);var OKe=Db.exports,Wje="Separator",T7="horizontal",Vje=["horizontal","vertical"],Wq=b.forwardRef((e,t)=>{const{decorative:n,orientation:r=T7,...i}=e,o=Hje(r)?r:T7,u=n?{role:"none"}:{"aria-orientation":o==="vertical"?o:void 0,role:"separator"};return R.jsx(Qe.div,{"data-orientation":o,...u,...i,ref:t})});Wq.displayName=Wje;function Hje(e){return Vje.includes(e)}var PKe=Wq,f4="Switch",[qje,kKe]=ri(f4),[Gje,Kje]=qje(f4),Vq=b.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:i,defaultChecked:o,required:a,disabled:u,value:s="on",onCheckedChange:l,form:c,...d}=e,[h,m]=b.useState(null),g=kt(t,S=>m(S)),v=b.useRef(!1),y=h?c||!!h.closest("form"):!0,[x=!1,w]=sa({prop:i,defaultProp:o,onChange:l});return R.jsxs(Gje,{scope:n,checked:x,disabled:u,children:[R.jsx(Qe.button,{type:"button",role:"switch","aria-checked":x,"aria-required":a,"data-state":Gq(x),"data-disabled":u?"":void 0,disabled:u,value:s,...d,ref:g,onClick:De(e.onClick,S=>{w(A=>!A),y&&(v.current=S.isPropagationStopped(),v.current||S.stopPropagation())})}),y&&R.jsx(Yje,{control:h,bubbles:!v.current,name:r,value:s,checked:x,required:a,disabled:u,form:c,style:{transform:"translateX(-100%)"}})]})});Vq.displayName=f4;var Hq="SwitchThumb",qq=b.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,i=Kje(Hq,n);return R.jsx(Qe.span,{"data-state":Gq(i.checked),"data-disabled":i.disabled?"":void 0,...r,ref:t})});qq.displayName=Hq;var Yje=e=>{const{control:t,checked:n,bubbles:r=!0,...i}=e,o=b.useRef(null),a=YP(n),u=EO(t);return b.useEffect(()=>{const s=o.current,l=window.HTMLInputElement.prototype,d=Object.getOwnPropertyDescriptor(l,"checked").set;if(a!==n&&d){const h=new Event("click",{bubbles:r});d.call(s,n),s.dispatchEvent(h)}},[a,n,r]),R.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...i,tabIndex:-1,ref:o,style:{...e.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function Gq(e){return e?"checked":"unchecked"}var TKe=Vq,MKe=qq;/** +`)+Ie+`return __p +}`;var Xt=fk(function(){return _n(z,ft+"return "+Ie).apply(n,X)});if(Xt.source=Ie,e_(Xt))throw Xt;return Xt}function yte(f){return En(f).toLowerCase()}function bte(f){return En(f).toUpperCase()}function xte(f,p,_){if(f=En(f),f&&(_||p===n))return x5(f);if(!f||!(p=xo(p)))return f;var O=_a(f),R=_a(p),z=w5(O,R),X=_5(O,R)+1;return Fs(O,z,X).join("")}function wte(f,p,_){if(f=En(f),f&&(_||p===n))return f.slice(0,C5(f)+1);if(!f||!(p=xo(p)))return f;var O=_a(f),R=_5(O,_a(p))+1;return Fs(O,0,R).join("")}function _te(f,p,_){if(f=En(f),f&&(_||p===n))return f.replace(k,"");if(!f||!(p=xo(p)))return f;var O=_a(f),R=w5(O,_a(p));return Fs(O,R).join("")}function Ste(f,p){var _=U,O=H;if(sr(p)){var R="separator"in p?p.separator:R;_="length"in p?Yt(p.length):_,O="omission"in p?xo(p.omission):O}f=En(f);var z=f.length;if(xf(f)){var X=_a(f);z=X.length}if(_>=z)return f;var ae=_-wf(O);if(ae<1)return O;var fe=X?Fs(X,0,ae).join(""):f.slice(0,ae);if(R===n)return fe+O;if(X&&(ae+=fe.length-ae),t_(R)){if(f.slice(ae).search(R)){var Me,Re=fe;for(R.global||(R=m2(R.source,En(Be.exec(R))+"g")),R.lastIndex=0;Me=R.exec(Re);)var Ie=Me.index;fe=fe.slice(0,Ie===n?ae:Ie)}}else if(f.indexOf(xo(R),ae)!=ae){var et=fe.lastIndexOf(R);et>-1&&(fe=fe.slice(0,et))}return fe+O}function Cte(f){return f=En(f),f&&wn.test(f)?f.replace(_t,JY):f}var Ete=Of(function(f,p,_){return f+(_?" ":"")+p.toUpperCase()}),i_=d8("toUpperCase");function ck(f,p,_){return f=En(f),p=_?n:p,p===n?GY(f)?nZ(f):jY(f):f.match(p)||[]}var fk=Jt(function(f,p){try{return yo(f,n,p)}catch(_){return e_(_)?_:new jt(_)}}),Ate=Fu(function(f,p){return qo(p,function(_){_=ou(_),Iu(f,_,Q2(f[_],f))}),f});function Pte(f){var p=f==null?0:f.length,_=Et();return f=p?nr(f,function(O){if(typeof O[1]!="function")throw new Ko(a);return[_(O[0]),O[1]]}):[],Jt(function(O){for(var R=-1;++RB)return[];var _=ue,O=wi(f,ue);p=Et(p),f-=ue;for(var R=p2(O,p);++_0||p<0)?new sn(_):(f<0?_=_.takeRight(-f):f&&(_=_.drop(f)),p!==n&&(p=Yt(p),_=p<0?_.dropRight(-p):_.take(p-f)),_)},sn.prototype.takeRightWhile=function(f){return this.reverse().takeWhile(f).reverse()},sn.prototype.toArray=function(){return this.take(ue)},ru(sn.prototype,function(f,p){var _=/^(?:filter|find|map|reject)|While$/.test(p),O=/^(?:head|last)$/.test(p),R=L[O?"take"+(p=="last"?"Right":""):p],z=O||/^find/.test(p);R&&(L.prototype[p]=function(){var X=this.__wrapped__,ae=O?[1]:arguments,fe=X instanceof sn,Me=ae[0],Re=fe||Ut(X),Ie=function(nn){var dn=R.apply(L,Ms([nn],ae));return O&&et?dn[0]:dn};Re&&_&&typeof Me=="function"&&Me.length!=1&&(fe=Re=!1);var et=this.__chain__,ft=!!this.__actions__.length,Pt=z&&!et,Xt=fe&&!ft;if(!z&&Re){X=Xt?X:new sn(this);var Ot=f.apply(X,ae);return Ot.__actions__.push({func:pm,args:[Ie],thisArg:n}),new Go(Ot,et)}return Pt&&Xt?f.apply(this,ae):(Ot=this.thru(Ie),Pt?O?Ot.value()[0]:Ot.value():Ot)})}),qo(["pop","push","shift","sort","splice","unshift"],function(f){var p=Bg[f],_=/^(?:push|sort|unshift)$/.test(f)?"tap":"thru",O=/^(?:pop|shift)$/.test(f);L.prototype[f]=function(){var R=arguments;if(O&&!this.__chain__){var z=this.value();return p.apply(Ut(z)?z:[],R)}return this[_](function(X){return p.apply(Ut(X)?X:[],R)})}}),ru(sn.prototype,function(f,p){var _=L[p];if(_){var O=_.name+"";kn.call(Ef,O)||(Ef[O]=[]),Ef[O].push({name:p,func:_})}}),Ef[um(n,w).name]=[{name:"wrapper",func:n}],sn.prototype.clone=CZ,sn.prototype.reverse=EZ,sn.prototype.value=AZ,L.prototype.at=tJ,L.prototype.chain=nJ,L.prototype.commit=rJ,L.prototype.next=iJ,L.prototype.plant=aJ,L.prototype.reverse=uJ,L.prototype.toJSON=L.prototype.valueOf=L.prototype.value=sJ,L.prototype.first=L.prototype.head,Qh&&(L.prototype[Qh]=oJ),L},_f=rZ();Kl?((Kl.exports=_f)._=_f,a2._=_f):si._=_f}).call(ua)})(Qb,Qb.exports);var YYe=Qb.exports;function HBe(e,t){return y.useReducer((n,r)=>t[n][r]??n,e)}var kO="ScrollArea",[cK,ZYe]=mi(kO),[qBe,xa]=cK(kO),fK=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:i,scrollHideDelay:o=600,...a}=e,[u,s]=y.useState(null),[l,c]=y.useState(null),[d,h]=y.useState(null),[v,g]=y.useState(null),[m,b]=y.useState(null),[w,x]=y.useState(0),[S,A]=y.useState(0),[E,C]=y.useState(!1),[T,M]=y.useState(!1),F=Kt(t,H=>s(H)),U=hg(i);return I.jsx(qBe,{scope:n,type:r,dir:U,scrollHideDelay:o,scrollArea:u,viewport:l,onViewportChange:c,content:d,onContentChange:h,scrollbarX:v,onScrollbarXChange:g,scrollbarXEnabled:E,onScrollbarXEnabledChange:C,scrollbarY:m,onScrollbarYChange:b,scrollbarYEnabled:T,onScrollbarYEnabledChange:M,onCornerWidthChange:x,onCornerHeightChange:A,children:I.jsx(pt.div,{dir:U,...a,ref:F,style:{position:"relative","--radix-scroll-area-corner-width":w+"px","--radix-scroll-area-corner-height":S+"px",...e.style}})})});fK.displayName=kO;var dK="ScrollAreaViewport",hK=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:i,...o}=e,a=xa(dK,n),u=y.useRef(null),s=Kt(t,u,a.onViewportChange);return I.jsxs(I.Fragment,{children:[I.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:i}),I.jsx(pt.div,{"data-radix-scroll-area-viewport":"",...o,ref:s,style:{overflowX:a.scrollbarXEnabled?"scroll":"hidden",overflowY:a.scrollbarYEnabled?"scroll":"hidden",...e.style},children:I.jsx("div",{ref:a.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});hK.displayName=dK;var Tu="ScrollAreaScrollbar",KBe=y.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=xa(Tu,e.__scopeScrollArea),{onScrollbarXEnabledChange:o,onScrollbarYEnabledChange:a}=i,u=e.orientation==="horizontal";return y.useEffect(()=>(u?o(!0):a(!0),()=>{u?o(!1):a(!1)}),[u,o,a]),i.type==="hover"?I.jsx(GBe,{...r,ref:t,forceMount:n}):i.type==="scroll"?I.jsx(YBe,{...r,ref:t,forceMount:n}):i.type==="auto"?I.jsx(pK,{...r,ref:t,forceMount:n}):i.type==="always"?I.jsx(TO,{...r,ref:t}):null});KBe.displayName=Tu;var GBe=y.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=xa(Tu,e.__scopeScrollArea),[o,a]=y.useState(!1);return y.useEffect(()=>{const u=i.scrollArea;let s=0;if(u){const l=()=>{window.clearTimeout(s),a(!0)},c=()=>{s=window.setTimeout(()=>a(!1),i.scrollHideDelay)};return u.addEventListener("pointerenter",l),u.addEventListener("pointerleave",c),()=>{window.clearTimeout(s),u.removeEventListener("pointerenter",l),u.removeEventListener("pointerleave",c)}}},[i.scrollArea,i.scrollHideDelay]),I.jsx(ii,{present:n||o,children:I.jsx(pK,{"data-state":o?"visible":"hidden",...r,ref:t})})}),YBe=y.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=xa(Tu,e.__scopeScrollArea),o=e.orientation==="horizontal",a=Xw(()=>s("SCROLL_END"),100),[u,s]=HBe("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return y.useEffect(()=>{if(u==="idle"){const l=window.setTimeout(()=>s("HIDE"),i.scrollHideDelay);return()=>window.clearTimeout(l)}},[u,i.scrollHideDelay,s]),y.useEffect(()=>{const l=i.viewport,c=o?"scrollLeft":"scrollTop";if(l){let d=l[c];const h=()=>{const v=l[c];d!==v&&(s("SCROLL"),a()),d=v};return l.addEventListener("scroll",h),()=>l.removeEventListener("scroll",h)}},[i.viewport,o,s,a]),I.jsx(ii,{present:n||u!=="hidden",children:I.jsx(TO,{"data-state":u==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:Ye(e.onPointerEnter,()=>s("POINTER_ENTER")),onPointerLeave:Ye(e.onPointerLeave,()=>s("POINTER_LEAVE"))})})}),pK=y.forwardRef((e,t)=>{const n=xa(Tu,e.__scopeScrollArea),{forceMount:r,...i}=e,[o,a]=y.useState(!1),u=e.orientation==="horizontal",s=Xw(()=>{if(n.viewport){const l=n.viewport.offsetWidth{const{orientation:n="vertical",...r}=e,i=xa(Tu,e.__scopeScrollArea),o=y.useRef(null),a=y.useRef(0),[u,s]=y.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),l=yK(u.viewport,u.content),c={...r,sizes:u,onSizesChange:s,hasThumb:l>0&&l<1,onThumbChange:h=>o.current=h,onThumbPointerUp:()=>a.current=0,onThumbPointerDown:h=>a.current=h};function d(h,v){return nze(h,a.current,u,v)}return n==="horizontal"?I.jsx(ZBe,{...c,ref:t,onThumbPositionChange:()=>{if(i.viewport&&o.current){const h=i.viewport.scrollLeft,v=B$(h,u,i.dir);o.current.style.transform=`translate3d(${v}px, 0, 0)`}},onWheelScroll:h=>{i.viewport&&(i.viewport.scrollLeft=h)},onDragScroll:h=>{i.viewport&&(i.viewport.scrollLeft=d(h,i.dir))}}):n==="vertical"?I.jsx(XBe,{...c,ref:t,onThumbPositionChange:()=>{if(i.viewport&&o.current){const h=i.viewport.scrollTop,v=B$(h,u);o.current.style.transform=`translate3d(0, ${v}px, 0)`}},onWheelScroll:h=>{i.viewport&&(i.viewport.scrollTop=h)},onDragScroll:h=>{i.viewport&&(i.viewport.scrollTop=d(h))}}):null}),ZBe=y.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...i}=e,o=xa(Tu,e.__scopeScrollArea),[a,u]=y.useState(),s=y.useRef(null),l=Kt(t,s,o.onScrollbarXChange);return y.useEffect(()=>{s.current&&u(getComputedStyle(s.current))},[s]),I.jsx(gK,{"data-orientation":"horizontal",...i,ref:l,sizes:n,style:{bottom:0,left:o.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:o.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":Zw(n)+"px",...e.style},onThumbPointerDown:c=>e.onThumbPointerDown(c.x),onDragScroll:c=>e.onDragScroll(c.x),onWheelScroll:(c,d)=>{if(o.viewport){const h=o.viewport.scrollLeft+c.deltaX;e.onWheelScroll(h),xK(h,d)&&c.preventDefault()}},onResize:()=>{s.current&&o.viewport&&a&&r({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:s.current.clientWidth,paddingStart:ex(a.paddingLeft),paddingEnd:ex(a.paddingRight)}})}})}),XBe=y.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...i}=e,o=xa(Tu,e.__scopeScrollArea),[a,u]=y.useState(),s=y.useRef(null),l=Kt(t,s,o.onScrollbarYChange);return y.useEffect(()=>{s.current&&u(getComputedStyle(s.current))},[s]),I.jsx(gK,{"data-orientation":"vertical",...i,ref:l,sizes:n,style:{top:0,right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":Zw(n)+"px",...e.style},onThumbPointerDown:c=>e.onThumbPointerDown(c.y),onDragScroll:c=>e.onDragScroll(c.y),onWheelScroll:(c,d)=>{if(o.viewport){const h=o.viewport.scrollTop+c.deltaY;e.onWheelScroll(h),xK(h,d)&&c.preventDefault()}},onResize:()=>{s.current&&o.viewport&&a&&r({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:s.current.clientHeight,paddingStart:ex(a.paddingTop),paddingEnd:ex(a.paddingBottom)}})}})}),[QBe,vK]=cK(Tu),gK=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:i,onThumbChange:o,onThumbPointerUp:a,onThumbPointerDown:u,onThumbPositionChange:s,onDragScroll:l,onWheelScroll:c,onResize:d,...h}=e,v=xa(Tu,n),[g,m]=y.useState(null),b=Kt(t,F=>m(F)),w=y.useRef(null),x=y.useRef(""),S=v.viewport,A=r.content-r.viewport,E=Wr(c),C=Wr(s),T=Xw(d,10);function M(F){if(w.current){const U=F.clientX-w.current.left,H=F.clientY-w.current.top;l({x:U,y:H})}}return y.useEffect(()=>{const F=U=>{const H=U.target;g?.contains(H)&&E(U,A)};return document.addEventListener("wheel",F,{passive:!1}),()=>document.removeEventListener("wheel",F,{passive:!1})},[S,g,A,E]),y.useEffect(C,[r,C]),yh(g,T),yh(v.content,T),I.jsx(QBe,{scope:n,scrollbar:g,hasThumb:i,onThumbChange:Wr(o),onThumbPointerUp:Wr(a),onThumbPositionChange:C,onThumbPointerDown:Wr(u),children:I.jsx(pt.div,{...h,ref:b,style:{position:"absolute",...h.style},onPointerDown:Ye(e.onPointerDown,F=>{F.button===0&&(F.target.setPointerCapture(F.pointerId),w.current=g.getBoundingClientRect(),x.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",v.viewport&&(v.viewport.style.scrollBehavior="auto"),M(F))}),onPointerMove:Ye(e.onPointerMove,M),onPointerUp:Ye(e.onPointerUp,F=>{const U=F.target;U.hasPointerCapture(F.pointerId)&&U.releasePointerCapture(F.pointerId),document.body.style.webkitUserSelect=x.current,v.viewport&&(v.viewport.style.scrollBehavior=""),w.current=null})})})}),Jb="ScrollAreaThumb",JBe=y.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=vK(Jb,e.__scopeScrollArea);return I.jsx(ii,{present:n||i.hasThumb,children:I.jsx(eze,{ref:t,...r})})}),eze=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...i}=e,o=xa(Jb,n),a=vK(Jb,n),{onThumbPositionChange:u}=a,s=Kt(t,d=>a.onThumbChange(d)),l=y.useRef(void 0),c=Xw(()=>{l.current&&(l.current(),l.current=void 0)},100);return y.useEffect(()=>{const d=o.viewport;if(d){const h=()=>{if(c(),!l.current){const v=rze(d,u);l.current=v,u()}};return u(),d.addEventListener("scroll",h),()=>d.removeEventListener("scroll",h)}},[o.viewport,c,u]),I.jsx(pt.div,{"data-state":a.hasThumb?"visible":"hidden",...i,ref:s,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:Ye(e.onPointerDownCapture,d=>{const v=d.target.getBoundingClientRect(),g=d.clientX-v.left,m=d.clientY-v.top;a.onThumbPointerDown({x:g,y:m})}),onPointerUp:Ye(e.onPointerUp,a.onThumbPointerUp)})});JBe.displayName=Jb;var MO="ScrollAreaCorner",mK=y.forwardRef((e,t)=>{const n=xa(MO,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?I.jsx(tze,{...e,ref:t}):null});mK.displayName=MO;var tze=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,i=xa(MO,n),[o,a]=y.useState(0),[u,s]=y.useState(0),l=!!(o&&u);return yh(i.scrollbarX,()=>{const c=i.scrollbarX?.offsetHeight||0;i.onCornerHeightChange(c),s(c)}),yh(i.scrollbarY,()=>{const c=i.scrollbarY?.offsetWidth||0;i.onCornerWidthChange(c),a(c)}),l?I.jsx(pt.div,{...r,ref:t,style:{width:o,height:u,position:"absolute",right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function ex(e){return e?parseInt(e,10):0}function yK(e,t){const n=e/t;return isNaN(n)?0:n}function Zw(e){const t=yK(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function nze(e,t,n,r="ltr"){const i=Zw(n),o=i/2,a=t||o,u=i-a,s=n.scrollbar.paddingStart+a,l=n.scrollbar.size-n.scrollbar.paddingEnd-u,c=n.content-n.viewport,d=r==="ltr"?[0,c]:[c*-1,0];return bK([s,l],d)(e)}function B$(e,t,n="ltr"){const r=Zw(t),i=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,o=t.scrollbar.size-i,a=t.content-t.viewport,u=o-r,s=n==="ltr"?[0,a]:[a*-1,0],l=M6(e,s);return bK([0,a],[0,u])(l)}function bK(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function xK(e,t){return e>0&&e{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return function i(){const o={left:e.scrollLeft,top:e.scrollTop},a=n.left!==o.left,u=n.top!==o.top;(a||u)&&t(),n=o,r=window.requestAnimationFrame(i)}(),()=>window.cancelAnimationFrame(r)};function Xw(e,t){const n=Wr(e),r=y.useRef(0);return y.useEffect(()=>()=>window.clearTimeout(r.current),[]),y.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function yh(e,t){const n=Wr(t);ni(()=>{let r=0;if(e){const i=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return i.observe(e),()=>{window.cancelAnimationFrame(r),i.unobserve(e)}}},[e,n])}var XYe=fK,QYe=hK,JYe=mK,RO="Progress",DO=100,[ize,eZe]=mi(RO),[oze,aze]=ize(RO),wK=y.forwardRef((e,t)=>{const{__scopeProgress:n,value:r=null,max:i,getValueLabel:o=uze,...a}=e;(i||i===0)&&!z$(i)&&console.error(sze(`${i}`,"Progress"));const u=z$(i)?i:DO;r!==null&&!U$(r,u)&&console.error(lze(`${r}`,"Progress"));const s=U$(r,u)?r:null,l=tx(s)?o(s,u):void 0;return I.jsx(oze,{scope:n,value:s,max:u,children:I.jsx(pt.div,{"aria-valuemax":u,"aria-valuemin":0,"aria-valuenow":tx(s)?s:void 0,"aria-valuetext":l,role:"progressbar","data-state":CK(s,u),"data-value":s??void 0,"data-max":u,...a,ref:t})})});wK.displayName=RO;var _K="ProgressIndicator",SK=y.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,i=aze(_K,n);return I.jsx(pt.div,{"data-state":CK(i.value,i.max),"data-value":i.value??void 0,"data-max":i.max,...r,ref:t})});SK.displayName=_K;function uze(e,t){return`${Math.round(e/t*100)}%`}function CK(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function tx(e){return typeof e=="number"}function z$(e){return tx(e)&&!isNaN(e)&&e>0}function U$(e,t){return tx(e)&&!isNaN(e)&&e<=t&&e>=0}function sze(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${DO}\`.`}function lze(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be: + - a positive number + - less than the value passed to \`max\` (or ${DO} if no \`max\` prop is set) + - \`null\` or \`undefined\` if the progress is indeterminate. + +Defaulting to \`null\`.`}var tZe=wK,nZe=SK,cze="Separator",W$="horizontal",fze=["horizontal","vertical"],EK=y.forwardRef((e,t)=>{const{decorative:n,orientation:r=W$,...i}=e,o=dze(r)?r:W$,u=n?{role:"none"}:{"aria-orientation":o==="vertical"?o:void 0,role:"separator"};return I.jsx(pt.div,{"data-orientation":o,...u,...i,ref:t})});EK.displayName=cze;function dze(e){return fze.includes(e)}var rZe=EK,$O="Switch",[hze,iZe]=mi($O),[pze,vze]=hze($O),AK=y.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:i,defaultChecked:o,required:a,disabled:u,value:s="on",onCheckedChange:l,form:c,...d}=e,[h,v]=y.useState(null),g=Kt(t,S=>v(S)),m=y.useRef(!1),b=h?c||!!h.closest("form"):!0,[w=!1,x]=Ga({prop:i,defaultProp:o,onChange:l});return I.jsxs(pze,{scope:n,checked:w,disabled:u,children:[I.jsx(pt.button,{type:"button",role:"switch","aria-checked":w,"aria-required":a,"data-state":kK(w),"data-disabled":u?"":void 0,disabled:u,value:s,...d,ref:g,onClick:Ye(e.onClick,S=>{x(A=>!A),b&&(m.current=S.isPropagationStopped(),m.current||S.stopPropagation())})}),b&&I.jsx(gze,{control:h,bubbles:!m.current,name:r,value:s,checked:w,required:a,disabled:u,form:c,style:{transform:"translateX(-100%)"}})]})});AK.displayName=$O;var PK="SwitchThumb",OK=y.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,i=vze(PK,n);return I.jsx(pt.span,{"data-state":kK(i.checked),"data-disabled":i.disabled?"":void 0,...r,ref:t})});OK.displayName=PK;var gze=e=>{const{control:t,checked:n,bubbles:r=!0,...i}=e,o=y.useRef(null),a=yO(n),u=jA(t);return y.useEffect(()=>{const s=o.current,l=window.HTMLInputElement.prototype,d=Object.getOwnPropertyDescriptor(l,"checked").set;if(a!==n&&d){const h=new Event("click",{bubbles:r});d.call(s,n),s.dispatchEvent(h)}},[a,n,r]),I.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...i,tabIndex:-1,ref:o,style:{...e.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function kK(e){return e?"checked":"unchecked"}var oZe=AK,aZe=OK;/** * table-core * * Copyright (c) TanStack @@ -431,10 +461,10 @@ function print() { __p += __j.call(arguments, '') } * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function Ts(e,t){return typeof e=="function"?e(t):e}function Zi(e,t){return n=>{t.setState(r=>({...r,[e]:Ts(n,r[e])}))}}function Mx(e){return e instanceof Function}function Zje(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function Xje(e,t){const n=[],r=i=>{i.forEach(o=>{n.push(o);const a=t(o);a!=null&&a.length&&r(a)})};return r(e),n}function Ze(e,t,n){let r=[],i;return o=>{let a;n.key&&n.debug&&(a=Date.now());const u=e(o);if(!(u.length!==r.length||u.some((c,d)=>r[d]!==c)))return i;r=u;let l;if(n.key&&n.debug&&(l=Date.now()),i=t(...u),n==null||n.onChange==null||n.onChange(i),n.key&&n.debug&&n!=null&&n.debug()){const c=Math.round((Date.now()-a)*100)/100,d=Math.round((Date.now()-l)*100)/100,h=d/16,m=(g,v)=>{for(g=String(g);g.length{t.setState(r=>({...r,[e]:ul(n,r[e])}))}}function Qw(e){return e instanceof Function}function mze(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function yze(e,t){const n=[],r=i=>{i.forEach(o=>{n.push(o);const a=t(o);a!=null&&a.length&&r(a)})};return r(e),n}function St(e,t,n){let r=[],i;return o=>{let a;n.key&&n.debug&&(a=Date.now());const u=e(o);if(!(u.length!==r.length||u.some((c,d)=>r[d]!==c)))return i;r=u;let l;if(n.key&&n.debug&&(l=Date.now()),i=t(...u),n==null||n.onChange==null||n.onChange(i),n.key&&n.debug&&n!=null&&n.debug()){const c=Math.round((Date.now()-a)*100)/100,d=Math.round((Date.now()-l)*100)/100,h=d/16,v=(g,m)=>{for(g=String(g);g.length{var i;return(i=e?.debugAll)!=null?i:e[t]},key:!1,onChange:r}}function Qje(e,t,n,r){const i=()=>{var a;return(a=o.getValue())!=null?a:e.options.renderFallbackValue},o={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(r),renderValue:i,getContext:Ze(()=>[e,n,t,o],(a,u,s,l)=>({table:a,column:u,row:s,cell:l,getValue:l.getValue,renderValue:l.renderValue}),Xe(e.options,"debugCells"))};return e._features.forEach(a=>{a.createCell==null||a.createCell(o,n,t,e)},{}),o}function Jje(e,t,n,r){var i,o;const u={...e._getDefaultColumnDef(),...t},s=u.accessorKey;let l=(i=(o=u.id)!=null?o:s?typeof String.prototype.replaceAll=="function"?s.replaceAll(".","_"):s.replace(/\./g,"_"):void 0)!=null?i:typeof u.header=="string"?u.header:void 0,c;if(u.accessorFn?c=u.accessorFn:s&&(s.includes(".")?c=h=>{let m=h;for(const v of s.split(".")){var g;m=(g=m)==null?void 0:g[v]}return m}:c=h=>h[u.accessorKey]),!l)throw new Error;let d={id:`${String(l)}`,accessorFn:c,parent:r,depth:n,columnDef:u,columns:[],getFlatColumns:Ze(()=>[!0],()=>{var h;return[d,...(h=d.columns)==null?void 0:h.flatMap(m=>m.getFlatColumns())]},Xe(e.options,"debugColumns")),getLeafColumns:Ze(()=>[e._getOrderColumnsFn()],h=>{var m;if((m=d.columns)!=null&&m.length){let g=d.columns.flatMap(v=>v.getLeafColumns());return h(g)}return[d]},Xe(e.options,"debugColumns"))};for(const h of e._features)h.createColumn==null||h.createColumn(d,e);return d}const Dr="debugHeaders";function M7(e,t,n){var r;let o={id:(r=n.id)!=null?r:t.id,column:t,index:n.index,isPlaceholder:!!n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const a=[],u=s=>{s.subHeaders&&s.subHeaders.length&&s.subHeaders.map(u),a.push(s)};return u(o),a},getContext:()=>({table:e,header:o,column:t})};return e._features.forEach(a=>{a.createHeader==null||a.createHeader(o,e)}),o}const eBe={createTable:e=>{e.getHeaderGroups=Ze(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,i)=>{var o,a;const u=(o=r?.map(d=>n.find(h=>h.id===d)).filter(Boolean))!=null?o:[],s=(a=i?.map(d=>n.find(h=>h.id===d)).filter(Boolean))!=null?a:[],l=n.filter(d=>!(r!=null&&r.includes(d.id))&&!(i!=null&&i.includes(d.id)));return qv(t,[...u,...l,...s],e)},Xe(e.options,Dr)),e.getCenterHeaderGroups=Ze(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,i)=>(n=n.filter(o=>!(r!=null&&r.includes(o.id))&&!(i!=null&&i.includes(o.id))),qv(t,n,e,"center")),Xe(e.options,Dr)),e.getLeftHeaderGroups=Ze(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,n,r)=>{var i;const o=(i=r?.map(a=>n.find(u=>u.id===a)).filter(Boolean))!=null?i:[];return qv(t,o,e,"left")},Xe(e.options,Dr)),e.getRightHeaderGroups=Ze(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,n,r)=>{var i;const o=(i=r?.map(a=>n.find(u=>u.id===a)).filter(Boolean))!=null?i:[];return qv(t,o,e,"right")},Xe(e.options,Dr)),e.getFooterGroups=Ze(()=>[e.getHeaderGroups()],t=>[...t].reverse(),Xe(e.options,Dr)),e.getLeftFooterGroups=Ze(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),Xe(e.options,Dr)),e.getCenterFooterGroups=Ze(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),Xe(e.options,Dr)),e.getRightFooterGroups=Ze(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),Xe(e.options,Dr)),e.getFlatHeaders=Ze(()=>[e.getHeaderGroups()],t=>t.map(n=>n.headers).flat(),Xe(e.options,Dr)),e.getLeftFlatHeaders=Ze(()=>[e.getLeftHeaderGroups()],t=>t.map(n=>n.headers).flat(),Xe(e.options,Dr)),e.getCenterFlatHeaders=Ze(()=>[e.getCenterHeaderGroups()],t=>t.map(n=>n.headers).flat(),Xe(e.options,Dr)),e.getRightFlatHeaders=Ze(()=>[e.getRightHeaderGroups()],t=>t.map(n=>n.headers).flat(),Xe(e.options,Dr)),e.getCenterLeafHeaders=Ze(()=>[e.getCenterFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),Xe(e.options,Dr)),e.getLeftLeafHeaders=Ze(()=>[e.getLeftFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),Xe(e.options,Dr)),e.getRightLeafHeaders=Ze(()=>[e.getRightFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),Xe(e.options,Dr)),e.getLeafHeaders=Ze(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(t,n,r)=>{var i,o,a,u,s,l;return[...(i=(o=t[0])==null?void 0:o.headers)!=null?i:[],...(a=(u=n[0])==null?void 0:u.headers)!=null?a:[],...(s=(l=r[0])==null?void 0:l.headers)!=null?s:[]].map(c=>c.getLeafHeaders()).flat()},Xe(e.options,Dr))}};function qv(e,t,n,r){var i,o;let a=0;const u=function(h,m){m===void 0&&(m=1),a=Math.max(a,m),h.filter(g=>g.getIsVisible()).forEach(g=>{var v;(v=g.columns)!=null&&v.length&&u(g.columns,m+1)},0)};u(e);let s=[];const l=(h,m)=>{const g={depth:m,id:[r,`${m}`].filter(Boolean).join("_"),headers:[]},v=[];h.forEach(y=>{const x=[...v].reverse()[0],w=y.column.depth===g.depth;let S,A=!1;if(w&&y.column.parent?S=y.column.parent:(S=y.column,A=!0),x&&x?.column===S)x.subHeaders.push(y);else{const E=M7(n,S,{id:[r,m,S.id,y?.id].filter(Boolean).join("_"),isPlaceholder:A,placeholderId:A?`${v.filter(C=>C.column===S).length}`:void 0,depth:m,index:v.length});E.subHeaders.push(y),v.push(E)}g.headers.push(y),y.headerGroup=g}),s.push(g),m>0&&l(v,m-1)},c=t.map((h,m)=>M7(n,h,{depth:a,index:m}));l(c,a-1),s.reverse();const d=h=>h.filter(g=>g.column.getIsVisible()).map(g=>{let v=0,y=0,x=[0];g.subHeaders&&g.subHeaders.length?(x=[],d(g.subHeaders).forEach(S=>{let{colSpan:A,rowSpan:E}=S;v+=A,x.push(E)})):v=1;const w=Math.min(...x);return y=y+w,g.colSpan=v,g.rowSpan=y,{colSpan:v,rowSpan:y}});return d((i=(o=s[0])==null?void 0:o.headers)!=null?i:[]),s}const d4=(e,t,n,r,i,o,a)=>{let u={id:t,index:r,original:n,depth:i,parentId:a,_valuesCache:{},_uniqueValuesCache:{},getValue:s=>{if(u._valuesCache.hasOwnProperty(s))return u._valuesCache[s];const l=e.getColumn(s);if(l!=null&&l.accessorFn)return u._valuesCache[s]=l.accessorFn(u.original,r),u._valuesCache[s]},getUniqueValues:s=>{if(u._uniqueValuesCache.hasOwnProperty(s))return u._uniqueValuesCache[s];const l=e.getColumn(s);if(l!=null&&l.accessorFn)return l.columnDef.getUniqueValues?(u._uniqueValuesCache[s]=l.columnDef.getUniqueValues(u.original,r),u._uniqueValuesCache[s]):(u._uniqueValuesCache[s]=[u.getValue(s)],u._uniqueValuesCache[s])},renderValue:s=>{var l;return(l=u.getValue(s))!=null?l:e.options.renderFallbackValue},subRows:[],getLeafRows:()=>Xje(u.subRows,s=>s.subRows),getParentRow:()=>u.parentId?e.getRow(u.parentId,!0):void 0,getParentRows:()=>{let s=[],l=u;for(;;){const c=l.getParentRow();if(!c)break;s.push(c),l=c}return s.reverse()},getAllCells:Ze(()=>[e.getAllLeafColumns()],s=>s.map(l=>Qje(e,u,l,l.id)),Xe(e.options,"debugRows")),_getAllCellsByColumnId:Ze(()=>[u.getAllCells()],s=>s.reduce((l,c)=>(l[c.column.id]=c,l),{}),Xe(e.options,"debugRows"))};for(let s=0;s{e._getFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():t.getPreFilteredRowModel(),e._getFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},Kq=(e,t,n)=>{var r,i;const o=n==null||(r=n.toString())==null?void 0:r.toLowerCase();return!!(!((i=e.getValue(t))==null||(i=i.toString())==null||(i=i.toLowerCase())==null)&&i.includes(o))};Kq.autoRemove=e=>oa(e);const Yq=(e,t,n)=>{var r;return!!(!((r=e.getValue(t))==null||(r=r.toString())==null)&&r.includes(n))};Yq.autoRemove=e=>oa(e);const Zq=(e,t,n)=>{var r;return((r=e.getValue(t))==null||(r=r.toString())==null?void 0:r.toLowerCase())===n?.toLowerCase()};Zq.autoRemove=e=>oa(e);const Xq=(e,t,n)=>{var r;return(r=e.getValue(t))==null?void 0:r.includes(n)};Xq.autoRemove=e=>oa(e)||!(e!=null&&e.length);const Qq=(e,t,n)=>!n.some(r=>{var i;return!((i=e.getValue(t))!=null&&i.includes(r))});Qq.autoRemove=e=>oa(e)||!(e!=null&&e.length);const Jq=(e,t,n)=>n.some(r=>{var i;return(i=e.getValue(t))==null?void 0:i.includes(r)});Jq.autoRemove=e=>oa(e)||!(e!=null&&e.length);const eG=(e,t,n)=>e.getValue(t)===n;eG.autoRemove=e=>oa(e);const tG=(e,t,n)=>e.getValue(t)==n;tG.autoRemove=e=>oa(e);const h4=(e,t,n)=>{let[r,i]=n;const o=e.getValue(t);return o>=r&&o<=i};h4.resolveFilterValue=e=>{let[t,n]=e,r=typeof t!="number"?parseFloat(t):t,i=typeof n!="number"?parseFloat(n):n,o=t===null||Number.isNaN(r)?-1/0:r,a=n===null||Number.isNaN(i)?1/0:i;if(o>a){const u=o;o=a,a=u}return[o,a]};h4.autoRemove=e=>oa(e)||oa(e[0])&&oa(e[1]);const du={includesString:Kq,includesStringSensitive:Yq,equalsString:Zq,arrIncludes:Xq,arrIncludesAll:Qq,arrIncludesSome:Jq,equals:eG,weakEquals:tG,inNumberRange:h4};function oa(e){return e==null||e===""}const nBe={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:Zi("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=n?.getValue(e.id);return typeof r=="string"?du.includesString:typeof r=="number"?du.inNumberRange:typeof r=="boolean"||r!==null&&typeof r=="object"?du.equals:Array.isArray(r)?du.arrIncludes:du.weakEquals},e.getFilterFn=()=>{var n,r;return Mx(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn==="auto"?e.getAutoFilterFn():(n=(r=t.options.filterFns)==null?void 0:r[e.columnDef.filterFn])!=null?n:du[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,r,i;return((n=e.columnDef.enableColumnFilter)!=null?n:!0)&&((r=t.options.enableColumnFilters)!=null?r:!0)&&((i=t.options.enableFilters)!=null?i:!0)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var n;return(n=t.getState().columnFilters)==null||(n=n.find(r=>r.id===e.id))==null?void 0:n.value},e.getFilterIndex=()=>{var n,r;return(n=(r=t.getState().columnFilters)==null?void 0:r.findIndex(i=>i.id===e.id))!=null?n:-1},e.setFilterValue=n=>{t.setColumnFilters(r=>{const i=e.getFilterFn(),o=r?.find(c=>c.id===e.id),a=Ts(n,o?o.value:void 0);if(R7(i,a,e)){var u;return(u=r?.filter(c=>c.id!==e.id))!=null?u:[]}const s={id:e.id,value:a};if(o){var l;return(l=r?.map(c=>c.id===e.id?s:c))!=null?l:[]}return r!=null&&r.length?[...r,s]:[s]})}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=t=>{const n=e.getAllLeafColumns(),r=i=>{var o;return(o=Ts(t,i))==null?void 0:o.filter(a=>{const u=n.find(s=>s.id===a.id);if(u){const s=u.getFilterFn();if(R7(s,a.value,u))return!1}return!0})};e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(r)},e.resetColumnFilters=t=>{var n,r;e.setColumnFilters(t?[]:(n=(r=e.initialState)==null?void 0:r.columnFilters)!=null?n:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel())}};function R7(e,t,n){return(e&&e.autoRemove?e.autoRemove(t,n):!1)||typeof t>"u"||typeof t=="string"&&!t}const rBe=(e,t,n)=>n.reduce((r,i)=>{const o=i.getValue(e);return r+(typeof o=="number"?o:0)},0),iBe=(e,t,n)=>{let r;return n.forEach(i=>{const o=i.getValue(e);o!=null&&(r>o||r===void 0&&o>=o)&&(r=o)}),r},oBe=(e,t,n)=>{let r;return n.forEach(i=>{const o=i.getValue(e);o!=null&&(r=o)&&(r=o)}),r},aBe=(e,t,n)=>{let r,i;return n.forEach(o=>{const a=o.getValue(e);a!=null&&(r===void 0?a>=a&&(r=i=a):(r>a&&(r=a),i{let n=0,r=0;if(t.forEach(i=>{let o=i.getValue(e);o!=null&&(o=+o)>=o&&(++n,r+=o)}),n)return r/n},sBe=(e,t)=>{if(!t.length)return;const n=t.map(o=>o.getValue(e));if(!Zje(n))return;if(n.length===1)return n[0];const r=Math.floor(n.length/2),i=n.sort((o,a)=>o-a);return n.length%2!==0?i[r]:(i[r-1]+i[r])/2},lBe=(e,t)=>Array.from(new Set(t.map(n=>n.getValue(e))).values()),cBe=(e,t)=>new Set(t.map(n=>n.getValue(e))).size,fBe=(e,t)=>t.length,LS={sum:rBe,min:iBe,max:oBe,extent:aBe,mean:uBe,median:sBe,unique:lBe,uniqueCount:cBe,count:fBe},dBe={getDefaultColumnDef:()=>({aggregatedCell:e=>{var t,n;return(t=(n=e.getValue())==null||n.toString==null?void 0:n.toString())!=null?t:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:Zi("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping(n=>n!=null&&n.includes(e.id)?n.filter(r=>r!==e.id):[...n??[],e.id])},e.getCanGroup=()=>{var n,r;return((n=e.columnDef.enableGrouping)!=null?n:!0)&&((r=t.options.enableGrouping)!=null?r:!0)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue)},e.getIsGrouped=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.includes(e.id)},e.getGroupedIndex=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.indexOf(e.id)},e.getToggleGroupingHandler=()=>{const n=e.getCanGroup();return()=>{n&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=n?.getValue(e.id);if(typeof r=="number")return LS.sum;if(Object.prototype.toString.call(r)==="[object Date]")return LS.extent},e.getAggregationFn=()=>{var n,r;if(!e)throw new Error;return Mx(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn==="auto"?e.getAutoAggregationFn():(n=(r=t.options.aggregationFns)==null?void 0:r[e.columnDef.aggregationFn])!=null?n:LS[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var n,r;e.setGrouping(t?[]:(n=(r=e.initialState)==null?void 0:r.grouping)!=null?n:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,t)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=n=>{if(e._groupingValuesCache.hasOwnProperty(n))return e._groupingValuesCache[n];const r=t.getColumn(n);return r!=null&&r.columnDef.getGroupingValue?(e._groupingValuesCache[n]=r.columnDef.getGroupingValue(e.original),e._groupingValuesCache[n]):e.getValue(n)},e._groupingValuesCache={}},createCell:(e,t,n,r)=>{e.getIsGrouped=()=>t.getIsGrouped()&&t.id===n.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&t.getIsGrouped(),e.getIsAggregated=()=>{var i;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((i=n.subRows)!=null&&i.length)}}};function hBe(e,t,n){if(!(t!=null&&t.length)||!n)return e;const r=e.filter(o=>!t.includes(o.id));return n==="remove"?r:[...t.map(o=>e.find(a=>a.id===o)).filter(Boolean),...r]}const pBe={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:Zi("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=Ze(n=>[Yp(t,n)],n=>n.findIndex(r=>r.id===e.id),Xe(t.options,"debugColumns")),e.getIsFirstColumn=n=>{var r;return((r=Yp(t,n)[0])==null?void 0:r.id)===e.id},e.getIsLastColumn=n=>{var r;const i=Yp(t,n);return((r=i[i.length-1])==null?void 0:r.id)===e.id}},createTable:e=>{e.setColumnOrder=t=>e.options.onColumnOrderChange==null?void 0:e.options.onColumnOrderChange(t),e.resetColumnOrder=t=>{var n;e.setColumnOrder(t?[]:(n=e.initialState.columnOrder)!=null?n:[])},e._getOrderColumnsFn=Ze(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(t,n,r)=>i=>{let o=[];if(!(t!=null&&t.length))o=i;else{const a=[...t],u=[...i];for(;u.length&&a.length;){const s=a.shift(),l=u.findIndex(c=>c.id===s);l>-1&&o.push(u.splice(l,1)[0])}o=[...o,...u]}return hBe(o,n,r)},Xe(e.options,"debugTable"))}},jS=()=>({left:[],right:[]}),mBe={getInitialState:e=>({columnPinning:jS(),...e}),getDefaultOptions:e=>({onColumnPinningChange:Zi("columnPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{const r=e.getLeafColumns().map(i=>i.id).filter(Boolean);t.setColumnPinning(i=>{var o,a;if(n==="right"){var u,s;return{left:((u=i?.left)!=null?u:[]).filter(d=>!(r!=null&&r.includes(d))),right:[...((s=i?.right)!=null?s:[]).filter(d=>!(r!=null&&r.includes(d))),...r]}}if(n==="left"){var l,c;return{left:[...((l=i?.left)!=null?l:[]).filter(d=>!(r!=null&&r.includes(d))),...r],right:((c=i?.right)!=null?c:[]).filter(d=>!(r!=null&&r.includes(d)))}}return{left:((o=i?.left)!=null?o:[]).filter(d=>!(r!=null&&r.includes(d))),right:((a=i?.right)!=null?a:[]).filter(d=>!(r!=null&&r.includes(d)))}})},e.getCanPin=()=>e.getLeafColumns().some(r=>{var i,o,a;return((i=r.columnDef.enablePinning)!=null?i:!0)&&((o=(a=t.options.enableColumnPinning)!=null?a:t.options.enablePinning)!=null?o:!0)}),e.getIsPinned=()=>{const n=e.getLeafColumns().map(u=>u.id),{left:r,right:i}=t.getState().columnPinning,o=n.some(u=>r?.includes(u)),a=n.some(u=>i?.includes(u));return o?"left":a?"right":!1},e.getPinnedIndex=()=>{var n,r;const i=e.getIsPinned();return i?(n=(r=t.getState().columnPinning)==null||(r=r[i])==null?void 0:r.indexOf(e.id))!=null?n:-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=Ze(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(n,r,i)=>{const o=[...r??[],...i??[]];return n.filter(a=>!o.includes(a.column.id))},Xe(t.options,"debugRows")),e.getLeftVisibleCells=Ze(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(n,r)=>(r??[]).map(o=>n.find(a=>a.column.id===o)).filter(Boolean).map(o=>({...o,position:"left"})),Xe(t.options,"debugRows")),e.getRightVisibleCells=Ze(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(n,r)=>(r??[]).map(o=>n.find(a=>a.column.id===o)).filter(Boolean).map(o=>({...o,position:"right"})),Xe(t.options,"debugRows"))},createTable:e=>{e.setColumnPinning=t=>e.options.onColumnPinningChange==null?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>{var n,r;return e.setColumnPinning(t?jS():(n=(r=e.initialState)==null?void 0:r.columnPinning)!=null?n:jS())},e.getIsSomeColumnsPinned=t=>{var n;const r=e.getState().columnPinning;if(!t){var i,o;return!!((i=r.left)!=null&&i.length||(o=r.right)!=null&&o.length)}return!!((n=r[t])!=null&&n.length)},e.getLeftLeafColumns=Ze(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(t,n)=>(n??[]).map(r=>t.find(i=>i.id===r)).filter(Boolean),Xe(e.options,"debugColumns")),e.getRightLeafColumns=Ze(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(t,n)=>(n??[]).map(r=>t.find(i=>i.id===r)).filter(Boolean),Xe(e.options,"debugColumns")),e.getCenterLeafColumns=Ze(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r)=>{const i=[...n??[],...r??[]];return t.filter(o=>!i.includes(o.id))},Xe(e.options,"debugColumns"))}},Gv={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},BS=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),gBe={getDefaultColumnDef:()=>Gv,getInitialState:e=>({columnSizing:{},columnSizingInfo:BS(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:Zi("columnSizing",e),onColumnSizingInfoChange:Zi("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,r,i;const o=t.getState().columnSizing[e.id];return Math.min(Math.max((n=e.columnDef.minSize)!=null?n:Gv.minSize,(r=o??e.columnDef.size)!=null?r:Gv.size),(i=e.columnDef.maxSize)!=null?i:Gv.maxSize)},e.getStart=Ze(n=>[n,Yp(t,n),t.getState().columnSizing],(n,r)=>r.slice(0,e.getIndex(n)).reduce((i,o)=>i+o.getSize(),0),Xe(t.options,"debugColumns")),e.getAfter=Ze(n=>[n,Yp(t,n),t.getState().columnSizing],(n,r)=>r.slice(e.getIndex(n)+1).reduce((i,o)=>i+o.getSize(),0),Xe(t.options,"debugColumns")),e.resetSize=()=>{t.setColumnSizing(n=>{let{[e.id]:r,...i}=n;return i})},e.getCanResize=()=>{var n,r;return((n=e.columnDef.enableResizing)!=null?n:!0)&&((r=t.options.enableColumnResizing)!=null?r:!0)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let n=0;const r=i=>{if(i.subHeaders.length)i.subHeaders.forEach(r);else{var o;n+=(o=i.column.getSize())!=null?o:0}};return r(e),n},e.getStart=()=>{if(e.index>0){const n=e.headerGroup.headers[e.index-1];return n.getStart()+n.getSize()}return 0},e.getResizeHandler=n=>{const r=t.getColumn(e.column.id),i=r?.getCanResize();return o=>{if(!r||!i||(o.persist==null||o.persist(),zS(o)&&o.touches&&o.touches.length>1))return;const a=e.getSize(),u=e?e.getLeafHeaders().map(x=>[x.column.id,x.column.getSize()]):[[r.id,r.getSize()]],s=zS(o)?Math.round(o.touches[0].clientX):o.clientX,l={},c=(x,w)=>{typeof w=="number"&&(t.setColumnSizingInfo(S=>{var A,E;const C=t.options.columnResizeDirection==="rtl"?-1:1,P=(w-((A=S?.startOffset)!=null?A:0))*C,k=Math.max(P/((E=S?.startSize)!=null?E:0),-.999999);return S.columnSizingStart.forEach(M=>{let[L,B]=M;l[L]=Math.round(Math.max(B+B*k,0)*100)/100}),{...S,deltaOffset:P,deltaPercentage:k}}),(t.options.columnResizeMode==="onChange"||x==="end")&&t.setColumnSizing(S=>({...S,...l})))},d=x=>c("move",x),h=x=>{c("end",x),t.setColumnSizingInfo(w=>({...w,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},m=n||typeof document<"u"?document:null,g={moveHandler:x=>d(x.clientX),upHandler:x=>{m?.removeEventListener("mousemove",g.moveHandler),m?.removeEventListener("mouseup",g.upHandler),h(x.clientX)}},v={moveHandler:x=>(x.cancelable&&(x.preventDefault(),x.stopPropagation()),d(x.touches[0].clientX),!1),upHandler:x=>{var w;m?.removeEventListener("touchmove",v.moveHandler),m?.removeEventListener("touchend",v.upHandler),x.cancelable&&(x.preventDefault(),x.stopPropagation()),h((w=x.touches[0])==null?void 0:w.clientX)}},y=vBe()?{passive:!1}:!1;zS(o)?(m?.addEventListener("touchmove",v.moveHandler,y),m?.addEventListener("touchend",v.upHandler,y)):(m?.addEventListener("mousemove",g.moveHandler,y),m?.addEventListener("mouseup",g.upHandler,y)),t.setColumnSizingInfo(x=>({...x,startOffset:s,startSize:a,deltaOffset:0,deltaPercentage:0,columnSizingStart:u,isResizingColumn:r.id}))}}},createTable:e=>{e.setColumnSizing=t=>e.options.onColumnSizingChange==null?void 0:e.options.onColumnSizingChange(t),e.setColumnSizingInfo=t=>e.options.onColumnSizingInfoChange==null?void 0:e.options.onColumnSizingInfoChange(t),e.resetColumnSizing=t=>{var n;e.setColumnSizing(t?{}:(n=e.initialState.columnSizing)!=null?n:{})},e.resetHeaderSizeInfo=t=>{var n;e.setColumnSizingInfo(t?BS():(n=e.initialState.columnSizingInfo)!=null?n:BS())},e.getTotalSize=()=>{var t,n;return(t=(n=e.getHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0},e.getLeftTotalSize=()=>{var t,n;return(t=(n=e.getLeftHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0},e.getCenterTotalSize=()=>{var t,n;return(t=(n=e.getCenterHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0},e.getRightTotalSize=()=>{var t,n;return(t=(n=e.getRightHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0}}};let Kv=null;function vBe(){if(typeof Kv=="boolean")return Kv;let e=!1;try{const t={get passive(){return e=!0,!1}},n=()=>{};window.addEventListener("test",n,t),window.removeEventListener("test",n)}catch{e=!1}return Kv=e,Kv}function zS(e){return e.type==="touchstart"}const yBe={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:Zi("columnVisibility",e)}),createColumn:(e,t)=>{e.toggleVisibility=n=>{e.getCanHide()&&t.setColumnVisibility(r=>({...r,[e.id]:n??!e.getIsVisible()}))},e.getIsVisible=()=>{var n,r;const i=e.columns;return(n=i.length?i.some(o=>o.getIsVisible()):(r=t.getState().columnVisibility)==null?void 0:r[e.id])!=null?n:!0},e.getCanHide=()=>{var n,r;return((n=e.columnDef.enableHiding)!=null?n:!0)&&((r=t.options.enableHiding)!=null?r:!0)},e.getToggleVisibilityHandler=()=>n=>{e.toggleVisibility==null||e.toggleVisibility(n.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=Ze(()=>[e.getAllCells(),t.getState().columnVisibility],n=>n.filter(r=>r.column.getIsVisible()),Xe(t.options,"debugRows")),e.getVisibleCells=Ze(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(n,r,i)=>[...n,...r,...i],Xe(t.options,"debugRows"))},createTable:e=>{const t=(n,r)=>Ze(()=>[r(),r().filter(i=>i.getIsVisible()).map(i=>i.id).join("_")],i=>i.filter(o=>o.getIsVisible==null?void 0:o.getIsVisible()),Xe(e.options,"debugColumns"));e.getVisibleFlatColumns=t("getVisibleFlatColumns",()=>e.getAllFlatColumns()),e.getVisibleLeafColumns=t("getVisibleLeafColumns",()=>e.getAllLeafColumns()),e.getLeftVisibleLeafColumns=t("getLeftVisibleLeafColumns",()=>e.getLeftLeafColumns()),e.getRightVisibleLeafColumns=t("getRightVisibleLeafColumns",()=>e.getRightLeafColumns()),e.getCenterVisibleLeafColumns=t("getCenterVisibleLeafColumns",()=>e.getCenterLeafColumns()),e.setColumnVisibility=n=>e.options.onColumnVisibilityChange==null?void 0:e.options.onColumnVisibilityChange(n),e.resetColumnVisibility=n=>{var r;e.setColumnVisibility(n?{}:(r=e.initialState.columnVisibility)!=null?r:{})},e.toggleAllColumnsVisible=n=>{var r;n=(r=n)!=null?r:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((i,o)=>({...i,[o.id]:n||!(o.getCanHide!=null&&o.getCanHide())}),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(n=>!(n.getIsVisible!=null&&n.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(n=>n.getIsVisible==null?void 0:n.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>n=>{var r;e.toggleAllColumnsVisible((r=n.target)==null?void 0:r.checked)}}};function Yp(e,t){return t?t==="center"?e.getCenterVisibleLeafColumns():t==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const bBe={createTable:e=>{e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}},wBe={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:Zi("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var n;const r=(n=e.getCoreRowModel().flatRows[0])==null||(n=n._getAllCellsByColumnId()[t.id])==null?void 0:n.getValue();return typeof r=="string"||typeof r=="number"}}),createColumn:(e,t)=>{e.getCanGlobalFilter=()=>{var n,r,i,o;return((n=e.columnDef.enableGlobalFilter)!=null?n:!0)&&((r=t.options.enableGlobalFilter)!=null?r:!0)&&((i=t.options.enableFilters)!=null?i:!0)&&((o=t.options.getColumnCanGlobalFilter==null?void 0:t.options.getColumnCanGlobalFilter(e))!=null?o:!0)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>du.includesString,e.getGlobalFilterFn=()=>{var t,n;const{globalFilterFn:r}=e.options;return Mx(r)?r:r==="auto"?e.getGlobalAutoFilterFn():(t=(n=e.options.filterFns)==null?void 0:n[r])!=null?t:du[r]},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},xBe={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:Zi("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{var r,i;if(!t){e._queue(()=>{t=!0});return}if((r=(i=e.options.autoResetAll)!=null?i:e.options.autoResetExpanded)!=null?r:!e.options.manualExpanding){if(n)return;n=!0,e._queue(()=>{e.resetExpanded(),n=!1})}},e.setExpanded=r=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(r),e.toggleAllRowsExpanded=r=>{r??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=r=>{var i,o;e.setExpanded(r?{}:(i=(o=e.initialState)==null?void 0:o.expanded)!=null?i:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(r=>r.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>r=>{r.persist==null||r.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{const r=e.getState().expanded;return r===!0||Object.values(r).some(Boolean)},e.getIsAllRowsExpanded=()=>{const r=e.getState().expanded;return typeof r=="boolean"?r===!0:!(!Object.keys(r).length||e.getRowModel().flatRows.some(i=>!i.getIsExpanded()))},e.getExpandedDepth=()=>{let r=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(o=>{const a=o.split(".");r=Math.max(r,a.length)}),r},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,t)=>{e.toggleExpanded=n=>{t.setExpanded(r=>{var i;const o=r===!0?!0:!!(r!=null&&r[e.id]);let a={};if(r===!0?Object.keys(t.getRowModel().rowsById).forEach(u=>{a[u]=!0}):a=r,n=(i=n)!=null?i:!o,!o&&n)return{...a,[e.id]:!0};if(o&&!n){const{[e.id]:u,...s}=a;return s}return r})},e.getIsExpanded=()=>{var n;const r=t.getState().expanded;return!!((n=t.options.getIsRowExpanded==null?void 0:t.options.getIsRowExpanded(e))!=null?n:r===!0||r?.[e.id])},e.getCanExpand=()=>{var n,r,i;return(n=t.options.getRowCanExpand==null?void 0:t.options.getRowCanExpand(e))!=null?n:((r=t.options.enableExpanding)!=null?r:!0)&&!!((i=e.subRows)!=null&&i.length)},e.getIsAllParentsExpanded=()=>{let n=!0,r=e;for(;n&&r.parentId;)r=t.getRow(r.parentId,!0),n=r.getIsExpanded();return n},e.getToggleExpandedHandler=()=>{const n=e.getCanExpand();return()=>{n&&e.toggleExpanded()}}}},S6=0,C6=10,US=()=>({pageIndex:S6,pageSize:C6}),_Be={getInitialState:e=>({...e,pagination:{...US(),...e?.pagination}}),getDefaultOptions:e=>({onPaginationChange:Zi("pagination",e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{var r,i;if(!t){e._queue(()=>{t=!0});return}if((r=(i=e.options.autoResetAll)!=null?i:e.options.autoResetPageIndex)!=null?r:!e.options.manualPagination){if(n)return;n=!0,e._queue(()=>{e.resetPageIndex(),n=!1})}},e.setPagination=r=>{const i=o=>Ts(r,o);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(i)},e.resetPagination=r=>{var i;e.setPagination(r?US():(i=e.initialState.pagination)!=null?i:US())},e.setPageIndex=r=>{e.setPagination(i=>{let o=Ts(r,i.pageIndex);const a=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return o=Math.max(0,Math.min(o,a)),{...i,pageIndex:o}})},e.resetPageIndex=r=>{var i,o;e.setPageIndex(r?S6:(i=(o=e.initialState)==null||(o=o.pagination)==null?void 0:o.pageIndex)!=null?i:S6)},e.resetPageSize=r=>{var i,o;e.setPageSize(r?C6:(i=(o=e.initialState)==null||(o=o.pagination)==null?void 0:o.pageSize)!=null?i:C6)},e.setPageSize=r=>{e.setPagination(i=>{const o=Math.max(1,Ts(r,i.pageSize)),a=i.pageSize*i.pageIndex,u=Math.floor(a/o);return{...i,pageIndex:u,pageSize:o}})},e.setPageCount=r=>e.setPagination(i=>{var o;let a=Ts(r,(o=e.options.pageCount)!=null?o:-1);return typeof a=="number"&&(a=Math.max(-1,a)),{...i,pageCount:a}}),e.getPageOptions=Ze(()=>[e.getPageCount()],r=>{let i=[];return r&&r>0&&(i=[...new Array(r)].fill(null).map((o,a)=>a)),i},Xe(e.options,"debugTable")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:r}=e.getState().pagination,i=e.getPageCount();return i===-1?!0:i===0?!1:re.setPageIndex(r=>r-1),e.nextPage=()=>e.setPageIndex(r=>r+1),e.firstPage=()=>e.setPageIndex(0),e.lastPage=()=>e.setPageIndex(e.getPageCount()-1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>{var r;return(r=e.options.pageCount)!=null?r:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var r;return(r=e.options.rowCount)!=null?r:e.getPrePaginationRowModel().rows.length}}},WS=()=>({top:[],bottom:[]}),SBe={getInitialState:e=>({rowPinning:WS(),...e}),getDefaultOptions:e=>({onRowPinningChange:Zi("rowPinning",e)}),createRow:(e,t)=>{e.pin=(n,r,i)=>{const o=r?e.getLeafRows().map(s=>{let{id:l}=s;return l}):[],a=i?e.getParentRows().map(s=>{let{id:l}=s;return l}):[],u=new Set([...a,e.id,...o]);t.setRowPinning(s=>{var l,c;if(n==="bottom"){var d,h;return{top:((d=s?.top)!=null?d:[]).filter(v=>!(u!=null&&u.has(v))),bottom:[...((h=s?.bottom)!=null?h:[]).filter(v=>!(u!=null&&u.has(v))),...Array.from(u)]}}if(n==="top"){var m,g;return{top:[...((m=s?.top)!=null?m:[]).filter(v=>!(u!=null&&u.has(v))),...Array.from(u)],bottom:((g=s?.bottom)!=null?g:[]).filter(v=>!(u!=null&&u.has(v)))}}return{top:((l=s?.top)!=null?l:[]).filter(v=>!(u!=null&&u.has(v))),bottom:((c=s?.bottom)!=null?c:[]).filter(v=>!(u!=null&&u.has(v)))}})},e.getCanPin=()=>{var n;const{enableRowPinning:r,enablePinning:i}=t.options;return typeof r=="function"?r(e):(n=r??i)!=null?n:!0},e.getIsPinned=()=>{const n=[e.id],{top:r,bottom:i}=t.getState().rowPinning,o=n.some(u=>r?.includes(u)),a=n.some(u=>i?.includes(u));return o?"top":a?"bottom":!1},e.getPinnedIndex=()=>{var n,r;const i=e.getIsPinned();if(!i)return-1;const o=(n=i==="top"?t.getTopRows():t.getBottomRows())==null?void 0:n.map(a=>{let{id:u}=a;return u});return(r=o?.indexOf(e.id))!=null?r:-1}},createTable:e=>{e.setRowPinning=t=>e.options.onRowPinningChange==null?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>{var n,r;return e.setRowPinning(t?WS():(n=(r=e.initialState)==null?void 0:r.rowPinning)!=null?n:WS())},e.getIsSomeRowsPinned=t=>{var n;const r=e.getState().rowPinning;if(!t){var i,o;return!!((i=r.top)!=null&&i.length||(o=r.bottom)!=null&&o.length)}return!!((n=r[t])!=null&&n.length)},e._getPinnedRows=(t,n,r)=>{var i;return((i=e.options.keepPinnedRows)==null||i?(n??[]).map(a=>{const u=e.getRow(a,!0);return u.getIsAllParentsExpanded()?u:null}):(n??[]).map(a=>t.find(u=>u.id===a))).filter(Boolean).map(a=>({...a,position:r}))},e.getTopRows=Ze(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(t,n)=>e._getPinnedRows(t,n,"top"),Xe(e.options,"debugRows")),e.getBottomRows=Ze(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(t,n)=>e._getPinnedRows(t,n,"bottom"),Xe(e.options,"debugRows")),e.getCenterRows=Ze(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(t,n,r)=>{const i=new Set([...n??[],...r??[]]);return t.filter(o=>!i.has(o.id))},Xe(e.options,"debugRows"))}},CBe={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:Zi("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=t=>e.options.onRowSelectionChange==null?void 0:e.options.onRowSelectionChange(t),e.resetRowSelection=t=>{var n;return e.setRowSelection(t?{}:(n=e.initialState.rowSelection)!=null?n:{})},e.toggleAllRowsSelected=t=>{e.setRowSelection(n=>{t=typeof t<"u"?t:!e.getIsAllRowsSelected();const r={...n},i=e.getPreGroupedRowModel().flatRows;return t?i.forEach(o=>{o.getCanSelect()&&(r[o.id]=!0)}):i.forEach(o=>{delete r[o.id]}),r})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(n=>{const r=typeof t<"u"?t:!e.getIsAllPageRowsSelected(),i={...n};return e.getRowModel().rows.forEach(o=>{E6(i,o.id,r,!0,e)}),i}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=Ze(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,n)=>Object.keys(t).length?VS(e,n):{rows:[],flatRows:[],rowsById:{}},Xe(e.options,"debugTable")),e.getFilteredSelectedRowModel=Ze(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,n)=>Object.keys(t).length?VS(e,n):{rows:[],flatRows:[],rowsById:{}},Xe(e.options,"debugTable")),e.getGroupedSelectedRowModel=Ze(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,n)=>Object.keys(t).length?VS(e,n):{rows:[],flatRows:[],rowsById:{}},Xe(e.options,"debugTable")),e.getIsAllRowsSelected=()=>{const t=e.getFilteredRowModel().flatRows,{rowSelection:n}=e.getState();let r=!!(t.length&&Object.keys(n).length);return r&&t.some(i=>i.getCanSelect()&&!n[i.id])&&(r=!1),r},e.getIsAllPageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows.filter(i=>i.getCanSelect()),{rowSelection:n}=e.getState();let r=!!t.length;return r&&t.some(i=>!n[i.id])&&(r=!1),r},e.getIsSomeRowsSelected=()=>{var t;const n=Object.keys((t=e.getState().rowSelection)!=null?t:{}).length;return n>0&&n{const t=e.getPaginationRowModel().flatRows;return e.getIsAllPageRowsSelected()?!1:t.filter(n=>n.getCanSelect()).some(n=>n.getIsSelected()||n.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>t=>{e.toggleAllRowsSelected(t.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}},createRow:(e,t)=>{e.toggleSelected=(n,r)=>{const i=e.getIsSelected();t.setRowSelection(o=>{var a;if(n=typeof n<"u"?n:!i,e.getCanSelect()&&i===n)return o;const u={...o};return E6(u,e.id,n,(a=r?.selectChildren)!=null?a:!0,t),u})},e.getIsSelected=()=>{const{rowSelection:n}=t.getState();return p4(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=t.getState();return A6(e,n)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState();return A6(e,n)==="all"},e.getCanSelect=()=>{var n;return typeof t.options.enableRowSelection=="function"?t.options.enableRowSelection(e):(n=t.options.enableRowSelection)!=null?n:!0},e.getCanSelectSubRows=()=>{var n;return typeof t.options.enableSubRowSelection=="function"?t.options.enableSubRowSelection(e):(n=t.options.enableSubRowSelection)!=null?n:!0},e.getCanMultiSelect=()=>{var n;return typeof t.options.enableMultiRowSelection=="function"?t.options.enableMultiRowSelection(e):(n=t.options.enableMultiRowSelection)!=null?n:!0},e.getToggleSelectedHandler=()=>{const n=e.getCanSelect();return r=>{var i;n&&e.toggleSelected((i=r.target)==null?void 0:i.checked)}}}},E6=(e,t,n,r,i)=>{var o;const a=i.getRow(t,!0);n?(a.getCanMultiSelect()||Object.keys(e).forEach(u=>delete e[u]),a.getCanSelect()&&(e[t]=!0)):delete e[t],r&&(o=a.subRows)!=null&&o.length&&a.getCanSelectSubRows()&&a.subRows.forEach(u=>E6(e,u.id,n,r,i))};function VS(e,t){const n=e.getState().rowSelection,r=[],i={},o=function(a,u){return a.map(s=>{var l;const c=p4(s,n);if(c&&(r.push(s),i[s.id]=s),(l=s.subRows)!=null&&l.length&&(s={...s,subRows:o(s.subRows)}),c)return s}).filter(Boolean)};return{rows:o(t.rows),flatRows:r,rowsById:i}}function p4(e,t){var n;return(n=t[e.id])!=null?n:!1}function A6(e,t,n){var r;if(!((r=e.subRows)!=null&&r.length))return!1;let i=!0,o=!1;return e.subRows.forEach(a=>{if(!(o&&!i)&&(a.getCanSelect()&&(p4(a,t)?o=!0:i=!1),a.subRows&&a.subRows.length)){const u=A6(a,t);u==="all"?o=!0:(u==="some"&&(o=!0),i=!1)}}),i?"all":o?"some":!1}const O6=/([0-9]+)/gm,EBe=(e,t,n)=>nG(el(e.getValue(n)).toLowerCase(),el(t.getValue(n)).toLowerCase()),ABe=(e,t,n)=>nG(el(e.getValue(n)),el(t.getValue(n))),OBe=(e,t,n)=>m4(el(e.getValue(n)).toLowerCase(),el(t.getValue(n)).toLowerCase()),PBe=(e,t,n)=>m4(el(e.getValue(n)),el(t.getValue(n))),kBe=(e,t,n)=>{const r=e.getValue(n),i=t.getValue(n);return r>i?1:rm4(e.getValue(n),t.getValue(n));function m4(e,t){return e===t?0:e>t?1:-1}function el(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function nG(e,t){const n=e.split(O6).filter(Boolean),r=t.split(O6).filter(Boolean);for(;n.length&&r.length;){const i=n.shift(),o=r.shift(),a=parseInt(i,10),u=parseInt(o,10),s=[a,u].sort();if(isNaN(s[0])){if(i>o)return 1;if(o>i)return-1;continue}if(isNaN(s[1]))return isNaN(a)?-1:1;if(a>u)return 1;if(u>a)return-1}return n.length-r.length}const pp={alphanumeric:EBe,alphanumericCaseSensitive:ABe,text:OBe,textCaseSensitive:PBe,datetime:kBe,basic:TBe},MBe={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:Zi("sorting",e),isMultiSortEvent:t=>t.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{const n=t.getFilteredRowModel().flatRows.slice(10);let r=!1;for(const i of n){const o=i?.getValue(e.id);if(Object.prototype.toString.call(o)==="[object Date]")return pp.datetime;if(typeof o=="string"&&(r=!0,o.split(O6).length>1))return pp.alphanumeric}return r?pp.text:pp.basic},e.getAutoSortDir=()=>{const n=t.getFilteredRowModel().flatRows[0];return typeof n?.getValue(e.id)=="string"?"asc":"desc"},e.getSortingFn=()=>{var n,r;if(!e)throw new Error;return Mx(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn==="auto"?e.getAutoSortingFn():(n=(r=t.options.sortingFns)==null?void 0:r[e.columnDef.sortingFn])!=null?n:pp[e.columnDef.sortingFn]},e.toggleSorting=(n,r)=>{const i=e.getNextSortingOrder(),o=typeof n<"u"&&n!==null;t.setSorting(a=>{const u=a?.find(m=>m.id===e.id),s=a?.findIndex(m=>m.id===e.id);let l=[],c,d=o?n:i==="desc";if(a!=null&&a.length&&e.getCanMultiSort()&&r?u?c="toggle":c="add":a!=null&&a.length&&s!==a.length-1?c="replace":u?c="toggle":c="replace",c==="toggle"&&(o||i||(c="remove")),c==="add"){var h;l=[...a,{id:e.id,desc:d}],l.splice(0,l.length-((h=t.options.maxMultiSortColCount)!=null?h:Number.MAX_SAFE_INTEGER))}else c==="toggle"?l=a.map(m=>m.id===e.id?{...m,desc:d}:m):c==="remove"?l=a.filter(m=>m.id!==e.id):l=[{id:e.id,desc:d}];return l})},e.getFirstSortDir=()=>{var n,r;return((n=(r=e.columnDef.sortDescFirst)!=null?r:t.options.sortDescFirst)!=null?n:e.getAutoSortDir()==="desc")?"desc":"asc"},e.getNextSortingOrder=n=>{var r,i;const o=e.getFirstSortDir(),a=e.getIsSorted();return a?a!==o&&((r=t.options.enableSortingRemoval)==null||r)&&(!(n&&(i=t.options.enableMultiRemove)!=null)||i)?!1:a==="desc"?"asc":"desc":o},e.getCanSort=()=>{var n,r;return((n=e.columnDef.enableSorting)!=null?n:!0)&&((r=t.options.enableSorting)!=null?r:!0)&&!!e.accessorFn},e.getCanMultiSort=()=>{var n,r;return(n=(r=e.columnDef.enableMultiSort)!=null?r:t.options.enableMultiSort)!=null?n:!!e.accessorFn},e.getIsSorted=()=>{var n;const r=(n=t.getState().sorting)==null?void 0:n.find(i=>i.id===e.id);return r?r.desc?"desc":"asc":!1},e.getSortIndex=()=>{var n,r;return(n=(r=t.getState().sorting)==null?void 0:r.findIndex(i=>i.id===e.id))!=null?n:-1},e.clearSorting=()=>{t.setSorting(n=>n!=null&&n.length?n.filter(r=>r.id!==e.id):[])},e.getToggleSortingHandler=()=>{const n=e.getCanSort();return r=>{n&&(r.persist==null||r.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?t.options.isMultiSortEvent==null?void 0:t.options.isMultiSortEvent(r):!1))}}},createTable:e=>{e.setSorting=t=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var n,r;e.setSorting(t?[]:(n=(r=e.initialState)==null?void 0:r.sorting)!=null?n:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},RBe=[eBe,yBe,pBe,mBe,tBe,nBe,bBe,wBe,MBe,dBe,xBe,_Be,SBe,CBe,gBe];function DBe(e){var t,n;const r=[...RBe,...(t=e._features)!=null?t:[]];let i={_features:r};const o=i._features.reduce((h,m)=>Object.assign(h,m.getDefaultOptions==null?void 0:m.getDefaultOptions(i)),{}),a=h=>i.options.mergeOptions?i.options.mergeOptions(o,h):{...o,...h};let s={...{},...(n=e.initialState)!=null?n:{}};i._features.forEach(h=>{var m;s=(m=h.getInitialState==null?void 0:h.getInitialState(s))!=null?m:s});const l=[];let c=!1;const d={_features:r,options:{...o,...e},initialState:s,_queue:h=>{l.push(h),c||(c=!0,Promise.resolve().then(()=>{for(;l.length;)l.shift()();c=!1}).catch(m=>setTimeout(()=>{throw m})))},reset:()=>{i.setState(i.initialState)},setOptions:h=>{const m=Ts(h,i.options);i.options=a(m)},getState:()=>i.options.state,setState:h=>{i.options.onStateChange==null||i.options.onStateChange(h)},_getRowId:(h,m,g)=>{var v;return(v=i.options.getRowId==null?void 0:i.options.getRowId(h,m,g))!=null?v:`${g?[g.id,m].join("."):m}`},getCoreRowModel:()=>(i._getCoreRowModel||(i._getCoreRowModel=i.options.getCoreRowModel(i)),i._getCoreRowModel()),getRowModel:()=>i.getPaginationRowModel(),getRow:(h,m)=>{let g=(m?i.getPrePaginationRowModel():i.getRowModel()).rowsById[h];if(!g&&(g=i.getCoreRowModel().rowsById[h],!g))throw new Error;return g},_getDefaultColumnDef:Ze(()=>[i.options.defaultColumn],h=>{var m;return h=(m=h)!=null?m:{},{header:g=>{const v=g.header.column.columnDef;return v.accessorKey?v.accessorKey:v.accessorFn?v.id:null},cell:g=>{var v,y;return(v=(y=g.renderValue())==null||y.toString==null?void 0:y.toString())!=null?v:null},...i._features.reduce((g,v)=>Object.assign(g,v.getDefaultColumnDef==null?void 0:v.getDefaultColumnDef()),{}),...h}},Xe(e,"debugColumns")),_getColumnDefs:()=>i.options.columns,getAllColumns:Ze(()=>[i._getColumnDefs()],h=>{const m=function(g,v,y){return y===void 0&&(y=0),g.map(x=>{const w=Jje(i,x,y,v),S=x;return w.columns=S.columns?m(S.columns,w,y+1):[],w})};return m(h)},Xe(e,"debugColumns")),getAllFlatColumns:Ze(()=>[i.getAllColumns()],h=>h.flatMap(m=>m.getFlatColumns()),Xe(e,"debugColumns")),_getAllFlatColumnsById:Ze(()=>[i.getAllFlatColumns()],h=>h.reduce((m,g)=>(m[g.id]=g,m),{}),Xe(e,"debugColumns")),getAllLeafColumns:Ze(()=>[i.getAllColumns(),i._getOrderColumnsFn()],(h,m)=>{let g=h.flatMap(v=>v.getLeafColumns());return m(g)},Xe(e,"debugColumns")),getColumn:h=>i._getAllFlatColumnsById()[h]};Object.assign(i,d);for(let h=0;hZe(()=>[e.options.data],t=>{const n={rows:[],flatRows:[],rowsById:{}},r=function(i,o,a){o===void 0&&(o=0);const u=[];for(let l=0;le._autoResetPageIndex()))}function $Be(e){const t=[],n=r=>{var i;t.push(r),(i=r.subRows)!=null&&i.length&&r.getIsExpanded()&&r.subRows.forEach(n)};return e.rows.forEach(n),{rows:t,flatRows:e.flatRows,rowsById:e.rowsById}}function rG(e,t,n){return n.options.filterFromLeafRows?IBe(e,t,n):NBe(e,t,n)}function IBe(e,t,n){var r;const i=[],o={},a=(r=n.options.maxLeafRowFilterDepth)!=null?r:100,u=function(s,l){l===void 0&&(l=0);const c=[];for(let h=0;hZe(()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter,e.getFilteredRowModel()],(n,r,i)=>{if(!n.rows.length||!(r!=null&&r.length)&&!i)return n;const o=[...r.map(u=>u.id).filter(u=>u!==t),i?"__global__":void 0].filter(Boolean),a=u=>{for(let s=0;sZe(()=>{var n;return[(n=e.getColumn(t))==null?void 0:n.getFacetedRowModel()]},n=>{if(!n)return new Map;let r=new Map;for(let o=0;oZe(()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter],(t,n,r)=>{if(!t.rows.length||!(n!=null&&n.length)&&!r){for(let h=0;h{var m;const g=e.getColumn(h.id);if(!g)return;const v=g.getFilterFn();v&&i.push({id:h.id,filterFn:v,resolvedValue:(m=v.resolveFilterValue==null?void 0:v.resolveFilterValue(h.value))!=null?m:h.value})});const a=(n??[]).map(h=>h.id),u=e.getGlobalFilterFn(),s=e.getAllLeafColumns().filter(h=>h.getCanGlobalFilter());r&&u&&s.length&&(a.push("__global__"),s.forEach(h=>{var m;o.push({id:h.id,filterFn:u,resolvedValue:(m=u.resolveFilterValue==null?void 0:u.resolveFilterValue(r))!=null?m:r})}));let l,c;for(let h=0;h{m.columnFiltersMeta[v]=y})}if(o.length){for(let g=0;g{m.columnFiltersMeta[v]=y})){m.columnFilters.__global__=!0;break}}m.columnFilters.__global__!==!0&&(m.columnFilters.__global__=!1)}}const d=h=>{for(let m=0;me._autoResetPageIndex()))}function NKe(e){return t=>Ze(()=>[t.getState().pagination,t.getPrePaginationRowModel(),t.options.paginateExpandedRows?void 0:t.getState().expanded],(n,r)=>{if(!r.rows.length)return r;const{pageSize:i,pageIndex:o}=n;let{rows:a,flatRows:u,rowsById:s}=r;const l=i*o,c=l+i;a=a.slice(l,c);let d;t.options.paginateExpandedRows?d={rows:a,flatRows:u,rowsById:s}:d=$Be({rows:a,flatRows:u,rowsById:s}),d.flatRows=[];const h=m=>{d.flatRows.push(m),m.subRows.length&&m.subRows.forEach(h)};return d.rows.forEach(h),d},Xe(t.options,"debugTable"))}function FKe(){return e=>Ze(()=>[e.getState().sorting,e.getPreSortedRowModel()],(t,n)=>{if(!n.rows.length||!(t!=null&&t.length))return n;const r=e.getState().sorting,i=[],o=r.filter(s=>{var l;return(l=e.getColumn(s.id))==null?void 0:l.getCanSort()}),a={};o.forEach(s=>{const l=e.getColumn(s.id);l&&(a[s.id]={sortUndefined:l.columnDef.sortUndefined,invertSorting:l.columnDef.invertSorting,sortingFn:l.getSortingFn()})});const u=s=>{const l=s.map(c=>({...c}));return l.sort((c,d)=>{for(let m=0;m{var d;i.push(c),(d=c.subRows)!=null&&d.length&&(c.subRows=u(c.subRows))}),l};return{rows:u(n.rows),flatRows:i,rowsById:n.rowsById}},Xe(e.options,"debugTable","getSortedRowModel",()=>e._autoResetPageIndex()))}/** + color: hsl(${Math.max(0,Math.min(120-120*h,120))}deg 100% 31%);`,n?.key)}return i}}function Ct(e,t,n,r){return{debug:()=>{var i;return(i=e?.debugAll)!=null?i:e[t]},key:!1,onChange:r}}function bze(e,t,n,r){const i=()=>{var a;return(a=o.getValue())!=null?a:e.options.renderFallbackValue},o={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(r),renderValue:i,getContext:St(()=>[e,n,t,o],(a,u,s,l)=>({table:a,column:u,row:s,cell:l,getValue:l.getValue,renderValue:l.renderValue}),Ct(e.options,"debugCells"))};return e._features.forEach(a=>{a.createCell==null||a.createCell(o,n,t,e)},{}),o}function xze(e,t,n,r){var i,o;const u={...e._getDefaultColumnDef(),...t},s=u.accessorKey;let l=(i=(o=u.id)!=null?o:s?typeof String.prototype.replaceAll=="function"?s.replaceAll(".","_"):s.replace(/\./g,"_"):void 0)!=null?i:typeof u.header=="string"?u.header:void 0,c;if(u.accessorFn?c=u.accessorFn:s&&(s.includes(".")?c=h=>{let v=h;for(const m of s.split(".")){var g;v=(g=v)==null?void 0:g[m]}return v}:c=h=>h[u.accessorKey]),!l)throw new Error;let d={id:`${String(l)}`,accessorFn:c,parent:r,depth:n,columnDef:u,columns:[],getFlatColumns:St(()=>[!0],()=>{var h;return[d,...(h=d.columns)==null?void 0:h.flatMap(v=>v.getFlatColumns())]},Ct(e.options,"debugColumns")),getLeafColumns:St(()=>[e._getOrderColumnsFn()],h=>{var v;if((v=d.columns)!=null&&v.length){let g=d.columns.flatMap(m=>m.getLeafColumns());return h(g)}return[d]},Ct(e.options,"debugColumns"))};for(const h of e._features)h.createColumn==null||h.createColumn(d,e);return d}const Ei="debugHeaders";function V$(e,t,n){var r;let o={id:(r=n.id)!=null?r:t.id,column:t,index:n.index,isPlaceholder:!!n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const a=[],u=s=>{s.subHeaders&&s.subHeaders.length&&s.subHeaders.map(u),a.push(s)};return u(o),a},getContext:()=>({table:e,header:o,column:t})};return e._features.forEach(a=>{a.createHeader==null||a.createHeader(o,e)}),o}const wze={createTable:e=>{e.getHeaderGroups=St(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,i)=>{var o,a;const u=(o=r?.map(d=>n.find(h=>h.id===d)).filter(Boolean))!=null?o:[],s=(a=i?.map(d=>n.find(h=>h.id===d)).filter(Boolean))!=null?a:[],l=n.filter(d=>!(r!=null&&r.includes(d.id))&&!(i!=null&&i.includes(d.id)));return hy(t,[...u,...l,...s],e)},Ct(e.options,Ei)),e.getCenterHeaderGroups=St(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,i)=>(n=n.filter(o=>!(r!=null&&r.includes(o.id))&&!(i!=null&&i.includes(o.id))),hy(t,n,e,"center")),Ct(e.options,Ei)),e.getLeftHeaderGroups=St(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,n,r)=>{var i;const o=(i=r?.map(a=>n.find(u=>u.id===a)).filter(Boolean))!=null?i:[];return hy(t,o,e,"left")},Ct(e.options,Ei)),e.getRightHeaderGroups=St(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,n,r)=>{var i;const o=(i=r?.map(a=>n.find(u=>u.id===a)).filter(Boolean))!=null?i:[];return hy(t,o,e,"right")},Ct(e.options,Ei)),e.getFooterGroups=St(()=>[e.getHeaderGroups()],t=>[...t].reverse(),Ct(e.options,Ei)),e.getLeftFooterGroups=St(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),Ct(e.options,Ei)),e.getCenterFooterGroups=St(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),Ct(e.options,Ei)),e.getRightFooterGroups=St(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),Ct(e.options,Ei)),e.getFlatHeaders=St(()=>[e.getHeaderGroups()],t=>t.map(n=>n.headers).flat(),Ct(e.options,Ei)),e.getLeftFlatHeaders=St(()=>[e.getLeftHeaderGroups()],t=>t.map(n=>n.headers).flat(),Ct(e.options,Ei)),e.getCenterFlatHeaders=St(()=>[e.getCenterHeaderGroups()],t=>t.map(n=>n.headers).flat(),Ct(e.options,Ei)),e.getRightFlatHeaders=St(()=>[e.getRightHeaderGroups()],t=>t.map(n=>n.headers).flat(),Ct(e.options,Ei)),e.getCenterLeafHeaders=St(()=>[e.getCenterFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),Ct(e.options,Ei)),e.getLeftLeafHeaders=St(()=>[e.getLeftFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),Ct(e.options,Ei)),e.getRightLeafHeaders=St(()=>[e.getRightFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),Ct(e.options,Ei)),e.getLeafHeaders=St(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(t,n,r)=>{var i,o,a,u,s,l;return[...(i=(o=t[0])==null?void 0:o.headers)!=null?i:[],...(a=(u=n[0])==null?void 0:u.headers)!=null?a:[],...(s=(l=r[0])==null?void 0:l.headers)!=null?s:[]].map(c=>c.getLeafHeaders()).flat()},Ct(e.options,Ei))}};function hy(e,t,n,r){var i,o;let a=0;const u=function(h,v){v===void 0&&(v=1),a=Math.max(a,v),h.filter(g=>g.getIsVisible()).forEach(g=>{var m;(m=g.columns)!=null&&m.length&&u(g.columns,v+1)},0)};u(e);let s=[];const l=(h,v)=>{const g={depth:v,id:[r,`${v}`].filter(Boolean).join("_"),headers:[]},m=[];h.forEach(b=>{const w=[...m].reverse()[0],x=b.column.depth===g.depth;let S,A=!1;if(x&&b.column.parent?S=b.column.parent:(S=b.column,A=!0),w&&w?.column===S)w.subHeaders.push(b);else{const E=V$(n,S,{id:[r,v,S.id,b?.id].filter(Boolean).join("_"),isPlaceholder:A,placeholderId:A?`${m.filter(C=>C.column===S).length}`:void 0,depth:v,index:m.length});E.subHeaders.push(b),m.push(E)}g.headers.push(b),b.headerGroup=g}),s.push(g),v>0&&l(m,v-1)},c=t.map((h,v)=>V$(n,h,{depth:a,index:v}));l(c,a-1),s.reverse();const d=h=>h.filter(g=>g.column.getIsVisible()).map(g=>{let m=0,b=0,w=[0];g.subHeaders&&g.subHeaders.length?(w=[],d(g.subHeaders).forEach(S=>{let{colSpan:A,rowSpan:E}=S;m+=A,w.push(E)})):m=1;const x=Math.min(...w);return b=b+x,g.colSpan=m,g.rowSpan=b,{colSpan:m,rowSpan:b}});return d((i=(o=s[0])==null?void 0:o.headers)!=null?i:[]),s}const IO=(e,t,n,r,i,o,a)=>{let u={id:t,index:r,original:n,depth:i,parentId:a,_valuesCache:{},_uniqueValuesCache:{},getValue:s=>{if(u._valuesCache.hasOwnProperty(s))return u._valuesCache[s];const l=e.getColumn(s);if(l!=null&&l.accessorFn)return u._valuesCache[s]=l.accessorFn(u.original,r),u._valuesCache[s]},getUniqueValues:s=>{if(u._uniqueValuesCache.hasOwnProperty(s))return u._uniqueValuesCache[s];const l=e.getColumn(s);if(l!=null&&l.accessorFn)return l.columnDef.getUniqueValues?(u._uniqueValuesCache[s]=l.columnDef.getUniqueValues(u.original,r),u._uniqueValuesCache[s]):(u._uniqueValuesCache[s]=[u.getValue(s)],u._uniqueValuesCache[s])},renderValue:s=>{var l;return(l=u.getValue(s))!=null?l:e.options.renderFallbackValue},subRows:[],getLeafRows:()=>yze(u.subRows,s=>s.subRows),getParentRow:()=>u.parentId?e.getRow(u.parentId,!0):void 0,getParentRows:()=>{let s=[],l=u;for(;;){const c=l.getParentRow();if(!c)break;s.push(c),l=c}return s.reverse()},getAllCells:St(()=>[e.getAllLeafColumns()],s=>s.map(l=>bze(e,u,l,l.id)),Ct(e.options,"debugRows")),_getAllCellsByColumnId:St(()=>[u.getAllCells()],s=>s.reduce((l,c)=>(l[c.column.id]=c,l),{}),Ct(e.options,"debugRows"))};for(let s=0;s{e._getFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():t.getPreFilteredRowModel(),e._getFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},TK=(e,t,n)=>{var r,i;const o=n==null||(r=n.toString())==null?void 0:r.toLowerCase();return!!(!((i=e.getValue(t))==null||(i=i.toString())==null||(i=i.toLowerCase())==null)&&i.includes(o))};TK.autoRemove=e=>Ha(e);const MK=(e,t,n)=>{var r;return!!(!((r=e.getValue(t))==null||(r=r.toString())==null)&&r.includes(n))};MK.autoRemove=e=>Ha(e);const RK=(e,t,n)=>{var r;return((r=e.getValue(t))==null||(r=r.toString())==null?void 0:r.toLowerCase())===n?.toLowerCase()};RK.autoRemove=e=>Ha(e);const DK=(e,t,n)=>{var r;return(r=e.getValue(t))==null?void 0:r.includes(n)};DK.autoRemove=e=>Ha(e)||!(e!=null&&e.length);const $K=(e,t,n)=>!n.some(r=>{var i;return!((i=e.getValue(t))!=null&&i.includes(r))});$K.autoRemove=e=>Ha(e)||!(e!=null&&e.length);const IK=(e,t,n)=>n.some(r=>{var i;return(i=e.getValue(t))==null?void 0:i.includes(r)});IK.autoRemove=e=>Ha(e)||!(e!=null&&e.length);const NK=(e,t,n)=>e.getValue(t)===n;NK.autoRemove=e=>Ha(e);const FK=(e,t,n)=>e.getValue(t)==n;FK.autoRemove=e=>Ha(e);const NO=(e,t,n)=>{let[r,i]=n;const o=e.getValue(t);return o>=r&&o<=i};NO.resolveFilterValue=e=>{let[t,n]=e,r=typeof t!="number"?parseFloat(t):t,i=typeof n!="number"?parseFloat(n):n,o=t===null||Number.isNaN(r)?-1/0:r,a=n===null||Number.isNaN(i)?1/0:i;if(o>a){const u=o;o=a,a=u}return[o,a]};NO.autoRemove=e=>Ha(e)||Ha(e[0])&&Ha(e[1]);const Zu={includesString:TK,includesStringSensitive:MK,equalsString:RK,arrIncludes:DK,arrIncludesAll:$K,arrIncludesSome:IK,equals:NK,weakEquals:FK,inNumberRange:NO};function Ha(e){return e==null||e===""}const Sze={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:zo("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=n?.getValue(e.id);return typeof r=="string"?Zu.includesString:typeof r=="number"?Zu.inNumberRange:typeof r=="boolean"||r!==null&&typeof r=="object"?Zu.equals:Array.isArray(r)?Zu.arrIncludes:Zu.weakEquals},e.getFilterFn=()=>{var n,r;return Qw(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn==="auto"?e.getAutoFilterFn():(n=(r=t.options.filterFns)==null?void 0:r[e.columnDef.filterFn])!=null?n:Zu[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,r,i;return((n=e.columnDef.enableColumnFilter)!=null?n:!0)&&((r=t.options.enableColumnFilters)!=null?r:!0)&&((i=t.options.enableFilters)!=null?i:!0)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var n;return(n=t.getState().columnFilters)==null||(n=n.find(r=>r.id===e.id))==null?void 0:n.value},e.getFilterIndex=()=>{var n,r;return(n=(r=t.getState().columnFilters)==null?void 0:r.findIndex(i=>i.id===e.id))!=null?n:-1},e.setFilterValue=n=>{t.setColumnFilters(r=>{const i=e.getFilterFn(),o=r?.find(c=>c.id===e.id),a=ul(n,o?o.value:void 0);if(H$(i,a,e)){var u;return(u=r?.filter(c=>c.id!==e.id))!=null?u:[]}const s={id:e.id,value:a};if(o){var l;return(l=r?.map(c=>c.id===e.id?s:c))!=null?l:[]}return r!=null&&r.length?[...r,s]:[s]})}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=t=>{const n=e.getAllLeafColumns(),r=i=>{var o;return(o=ul(t,i))==null?void 0:o.filter(a=>{const u=n.find(s=>s.id===a.id);if(u){const s=u.getFilterFn();if(H$(s,a.value,u))return!1}return!0})};e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(r)},e.resetColumnFilters=t=>{var n,r;e.setColumnFilters(t?[]:(n=(r=e.initialState)==null?void 0:r.columnFilters)!=null?n:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel())}};function H$(e,t,n){return(e&&e.autoRemove?e.autoRemove(t,n):!1)||typeof t>"u"||typeof t=="string"&&!t}const Cze=(e,t,n)=>n.reduce((r,i)=>{const o=i.getValue(e);return r+(typeof o=="number"?o:0)},0),Eze=(e,t,n)=>{let r;return n.forEach(i=>{const o=i.getValue(e);o!=null&&(r>o||r===void 0&&o>=o)&&(r=o)}),r},Aze=(e,t,n)=>{let r;return n.forEach(i=>{const o=i.getValue(e);o!=null&&(r=o)&&(r=o)}),r},Pze=(e,t,n)=>{let r,i;return n.forEach(o=>{const a=o.getValue(e);a!=null&&(r===void 0?a>=a&&(r=i=a):(r>a&&(r=a),i{let n=0,r=0;if(t.forEach(i=>{let o=i.getValue(e);o!=null&&(o=+o)>=o&&(++n,r+=o)}),n)return r/n},kze=(e,t)=>{if(!t.length)return;const n=t.map(o=>o.getValue(e));if(!mze(n))return;if(n.length===1)return n[0];const r=Math.floor(n.length/2),i=n.sort((o,a)=>o-a);return n.length%2!==0?i[r]:(i[r-1]+i[r])/2},Tze=(e,t)=>Array.from(new Set(t.map(n=>n.getValue(e))).values()),Mze=(e,t)=>new Set(t.map(n=>n.getValue(e))).size,Rze=(e,t)=>t.length,QS={sum:Cze,min:Eze,max:Aze,extent:Pze,mean:Oze,median:kze,unique:Tze,uniqueCount:Mze,count:Rze},Dze={getDefaultColumnDef:()=>({aggregatedCell:e=>{var t,n;return(t=(n=e.getValue())==null||n.toString==null?void 0:n.toString())!=null?t:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:zo("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping(n=>n!=null&&n.includes(e.id)?n.filter(r=>r!==e.id):[...n??[],e.id])},e.getCanGroup=()=>{var n,r;return((n=e.columnDef.enableGrouping)!=null?n:!0)&&((r=t.options.enableGrouping)!=null?r:!0)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue)},e.getIsGrouped=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.includes(e.id)},e.getGroupedIndex=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.indexOf(e.id)},e.getToggleGroupingHandler=()=>{const n=e.getCanGroup();return()=>{n&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=n?.getValue(e.id);if(typeof r=="number")return QS.sum;if(Object.prototype.toString.call(r)==="[object Date]")return QS.extent},e.getAggregationFn=()=>{var n,r;if(!e)throw new Error;return Qw(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn==="auto"?e.getAutoAggregationFn():(n=(r=t.options.aggregationFns)==null?void 0:r[e.columnDef.aggregationFn])!=null?n:QS[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var n,r;e.setGrouping(t?[]:(n=(r=e.initialState)==null?void 0:r.grouping)!=null?n:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,t)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=n=>{if(e._groupingValuesCache.hasOwnProperty(n))return e._groupingValuesCache[n];const r=t.getColumn(n);return r!=null&&r.columnDef.getGroupingValue?(e._groupingValuesCache[n]=r.columnDef.getGroupingValue(e.original),e._groupingValuesCache[n]):e.getValue(n)},e._groupingValuesCache={}},createCell:(e,t,n,r)=>{e.getIsGrouped=()=>t.getIsGrouped()&&t.id===n.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&t.getIsGrouped(),e.getIsAggregated=()=>{var i;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((i=n.subRows)!=null&&i.length)}}};function $ze(e,t,n){if(!(t!=null&&t.length)||!n)return e;const r=e.filter(o=>!t.includes(o.id));return n==="remove"?r:[...t.map(o=>e.find(a=>a.id===o)).filter(Boolean),...r]}const Ize={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:zo("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=St(n=>[y0(t,n)],n=>n.findIndex(r=>r.id===e.id),Ct(t.options,"debugColumns")),e.getIsFirstColumn=n=>{var r;return((r=y0(t,n)[0])==null?void 0:r.id)===e.id},e.getIsLastColumn=n=>{var r;const i=y0(t,n);return((r=i[i.length-1])==null?void 0:r.id)===e.id}},createTable:e=>{e.setColumnOrder=t=>e.options.onColumnOrderChange==null?void 0:e.options.onColumnOrderChange(t),e.resetColumnOrder=t=>{var n;e.setColumnOrder(t?[]:(n=e.initialState.columnOrder)!=null?n:[])},e._getOrderColumnsFn=St(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(t,n,r)=>i=>{let o=[];if(!(t!=null&&t.length))o=i;else{const a=[...t],u=[...i];for(;u.length&&a.length;){const s=a.shift(),l=u.findIndex(c=>c.id===s);l>-1&&o.push(u.splice(l,1)[0])}o=[...o,...u]}return $ze(o,n,r)},Ct(e.options,"debugTable"))}},JS=()=>({left:[],right:[]}),Nze={getInitialState:e=>({columnPinning:JS(),...e}),getDefaultOptions:e=>({onColumnPinningChange:zo("columnPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{const r=e.getLeafColumns().map(i=>i.id).filter(Boolean);t.setColumnPinning(i=>{var o,a;if(n==="right"){var u,s;return{left:((u=i?.left)!=null?u:[]).filter(d=>!(r!=null&&r.includes(d))),right:[...((s=i?.right)!=null?s:[]).filter(d=>!(r!=null&&r.includes(d))),...r]}}if(n==="left"){var l,c;return{left:[...((l=i?.left)!=null?l:[]).filter(d=>!(r!=null&&r.includes(d))),...r],right:((c=i?.right)!=null?c:[]).filter(d=>!(r!=null&&r.includes(d)))}}return{left:((o=i?.left)!=null?o:[]).filter(d=>!(r!=null&&r.includes(d))),right:((a=i?.right)!=null?a:[]).filter(d=>!(r!=null&&r.includes(d)))}})},e.getCanPin=()=>e.getLeafColumns().some(r=>{var i,o,a;return((i=r.columnDef.enablePinning)!=null?i:!0)&&((o=(a=t.options.enableColumnPinning)!=null?a:t.options.enablePinning)!=null?o:!0)}),e.getIsPinned=()=>{const n=e.getLeafColumns().map(u=>u.id),{left:r,right:i}=t.getState().columnPinning,o=n.some(u=>r?.includes(u)),a=n.some(u=>i?.includes(u));return o?"left":a?"right":!1},e.getPinnedIndex=()=>{var n,r;const i=e.getIsPinned();return i?(n=(r=t.getState().columnPinning)==null||(r=r[i])==null?void 0:r.indexOf(e.id))!=null?n:-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=St(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(n,r,i)=>{const o=[...r??[],...i??[]];return n.filter(a=>!o.includes(a.column.id))},Ct(t.options,"debugRows")),e.getLeftVisibleCells=St(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(n,r)=>(r??[]).map(o=>n.find(a=>a.column.id===o)).filter(Boolean).map(o=>({...o,position:"left"})),Ct(t.options,"debugRows")),e.getRightVisibleCells=St(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(n,r)=>(r??[]).map(o=>n.find(a=>a.column.id===o)).filter(Boolean).map(o=>({...o,position:"right"})),Ct(t.options,"debugRows"))},createTable:e=>{e.setColumnPinning=t=>e.options.onColumnPinningChange==null?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>{var n,r;return e.setColumnPinning(t?JS():(n=(r=e.initialState)==null?void 0:r.columnPinning)!=null?n:JS())},e.getIsSomeColumnsPinned=t=>{var n;const r=e.getState().columnPinning;if(!t){var i,o;return!!((i=r.left)!=null&&i.length||(o=r.right)!=null&&o.length)}return!!((n=r[t])!=null&&n.length)},e.getLeftLeafColumns=St(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(t,n)=>(n??[]).map(r=>t.find(i=>i.id===r)).filter(Boolean),Ct(e.options,"debugColumns")),e.getRightLeafColumns=St(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(t,n)=>(n??[]).map(r=>t.find(i=>i.id===r)).filter(Boolean),Ct(e.options,"debugColumns")),e.getCenterLeafColumns=St(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r)=>{const i=[...n??[],...r??[]];return t.filter(o=>!i.includes(o.id))},Ct(e.options,"debugColumns"))}},py={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},e3=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),Fze={getDefaultColumnDef:()=>py,getInitialState:e=>({columnSizing:{},columnSizingInfo:e3(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:zo("columnSizing",e),onColumnSizingInfoChange:zo("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,r,i;const o=t.getState().columnSizing[e.id];return Math.min(Math.max((n=e.columnDef.minSize)!=null?n:py.minSize,(r=o??e.columnDef.size)!=null?r:py.size),(i=e.columnDef.maxSize)!=null?i:py.maxSize)},e.getStart=St(n=>[n,y0(t,n),t.getState().columnSizing],(n,r)=>r.slice(0,e.getIndex(n)).reduce((i,o)=>i+o.getSize(),0),Ct(t.options,"debugColumns")),e.getAfter=St(n=>[n,y0(t,n),t.getState().columnSizing],(n,r)=>r.slice(e.getIndex(n)+1).reduce((i,o)=>i+o.getSize(),0),Ct(t.options,"debugColumns")),e.resetSize=()=>{t.setColumnSizing(n=>{let{[e.id]:r,...i}=n;return i})},e.getCanResize=()=>{var n,r;return((n=e.columnDef.enableResizing)!=null?n:!0)&&((r=t.options.enableColumnResizing)!=null?r:!0)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let n=0;const r=i=>{if(i.subHeaders.length)i.subHeaders.forEach(r);else{var o;n+=(o=i.column.getSize())!=null?o:0}};return r(e),n},e.getStart=()=>{if(e.index>0){const n=e.headerGroup.headers[e.index-1];return n.getStart()+n.getSize()}return 0},e.getResizeHandler=n=>{const r=t.getColumn(e.column.id),i=r?.getCanResize();return o=>{if(!r||!i||(o.persist==null||o.persist(),t3(o)&&o.touches&&o.touches.length>1))return;const a=e.getSize(),u=e?e.getLeafHeaders().map(w=>[w.column.id,w.column.getSize()]):[[r.id,r.getSize()]],s=t3(o)?Math.round(o.touches[0].clientX):o.clientX,l={},c=(w,x)=>{typeof x=="number"&&(t.setColumnSizingInfo(S=>{var A,E;const C=t.options.columnResizeDirection==="rtl"?-1:1,T=(x-((A=S?.startOffset)!=null?A:0))*C,M=Math.max(T/((E=S?.startSize)!=null?E:0),-.999999);return S.columnSizingStart.forEach(F=>{let[U,H]=F;l[U]=Math.round(Math.max(H+H*M,0)*100)/100}),{...S,deltaOffset:T,deltaPercentage:M}}),(t.options.columnResizeMode==="onChange"||w==="end")&&t.setColumnSizing(S=>({...S,...l})))},d=w=>c("move",w),h=w=>{c("end",w),t.setColumnSizingInfo(x=>({...x,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},v=n||typeof document<"u"?document:null,g={moveHandler:w=>d(w.clientX),upHandler:w=>{v?.removeEventListener("mousemove",g.moveHandler),v?.removeEventListener("mouseup",g.upHandler),h(w.clientX)}},m={moveHandler:w=>(w.cancelable&&(w.preventDefault(),w.stopPropagation()),d(w.touches[0].clientX),!1),upHandler:w=>{var x;v?.removeEventListener("touchmove",m.moveHandler),v?.removeEventListener("touchend",m.upHandler),w.cancelable&&(w.preventDefault(),w.stopPropagation()),h((x=w.touches[0])==null?void 0:x.clientX)}},b=Lze()?{passive:!1}:!1;t3(o)?(v?.addEventListener("touchmove",m.moveHandler,b),v?.addEventListener("touchend",m.upHandler,b)):(v?.addEventListener("mousemove",g.moveHandler,b),v?.addEventListener("mouseup",g.upHandler,b)),t.setColumnSizingInfo(w=>({...w,startOffset:s,startSize:a,deltaOffset:0,deltaPercentage:0,columnSizingStart:u,isResizingColumn:r.id}))}}},createTable:e=>{e.setColumnSizing=t=>e.options.onColumnSizingChange==null?void 0:e.options.onColumnSizingChange(t),e.setColumnSizingInfo=t=>e.options.onColumnSizingInfoChange==null?void 0:e.options.onColumnSizingInfoChange(t),e.resetColumnSizing=t=>{var n;e.setColumnSizing(t?{}:(n=e.initialState.columnSizing)!=null?n:{})},e.resetHeaderSizeInfo=t=>{var n;e.setColumnSizingInfo(t?e3():(n=e.initialState.columnSizingInfo)!=null?n:e3())},e.getTotalSize=()=>{var t,n;return(t=(n=e.getHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0},e.getLeftTotalSize=()=>{var t,n;return(t=(n=e.getLeftHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0},e.getCenterTotalSize=()=>{var t,n;return(t=(n=e.getCenterHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0},e.getRightTotalSize=()=>{var t,n;return(t=(n=e.getRightHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0}}};let vy=null;function Lze(){if(typeof vy=="boolean")return vy;let e=!1;try{const t={get passive(){return e=!0,!1}},n=()=>{};window.addEventListener("test",n,t),window.removeEventListener("test",n)}catch{e=!1}return vy=e,vy}function t3(e){return e.type==="touchstart"}const jze={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:zo("columnVisibility",e)}),createColumn:(e,t)=>{e.toggleVisibility=n=>{e.getCanHide()&&t.setColumnVisibility(r=>({...r,[e.id]:n??!e.getIsVisible()}))},e.getIsVisible=()=>{var n,r;const i=e.columns;return(n=i.length?i.some(o=>o.getIsVisible()):(r=t.getState().columnVisibility)==null?void 0:r[e.id])!=null?n:!0},e.getCanHide=()=>{var n,r;return((n=e.columnDef.enableHiding)!=null?n:!0)&&((r=t.options.enableHiding)!=null?r:!0)},e.getToggleVisibilityHandler=()=>n=>{e.toggleVisibility==null||e.toggleVisibility(n.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=St(()=>[e.getAllCells(),t.getState().columnVisibility],n=>n.filter(r=>r.column.getIsVisible()),Ct(t.options,"debugRows")),e.getVisibleCells=St(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(n,r,i)=>[...n,...r,...i],Ct(t.options,"debugRows"))},createTable:e=>{const t=(n,r)=>St(()=>[r(),r().filter(i=>i.getIsVisible()).map(i=>i.id).join("_")],i=>i.filter(o=>o.getIsVisible==null?void 0:o.getIsVisible()),Ct(e.options,"debugColumns"));e.getVisibleFlatColumns=t("getVisibleFlatColumns",()=>e.getAllFlatColumns()),e.getVisibleLeafColumns=t("getVisibleLeafColumns",()=>e.getAllLeafColumns()),e.getLeftVisibleLeafColumns=t("getLeftVisibleLeafColumns",()=>e.getLeftLeafColumns()),e.getRightVisibleLeafColumns=t("getRightVisibleLeafColumns",()=>e.getRightLeafColumns()),e.getCenterVisibleLeafColumns=t("getCenterVisibleLeafColumns",()=>e.getCenterLeafColumns()),e.setColumnVisibility=n=>e.options.onColumnVisibilityChange==null?void 0:e.options.onColumnVisibilityChange(n),e.resetColumnVisibility=n=>{var r;e.setColumnVisibility(n?{}:(r=e.initialState.columnVisibility)!=null?r:{})},e.toggleAllColumnsVisible=n=>{var r;n=(r=n)!=null?r:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((i,o)=>({...i,[o.id]:n||!(o.getCanHide!=null&&o.getCanHide())}),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(n=>!(n.getIsVisible!=null&&n.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(n=>n.getIsVisible==null?void 0:n.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>n=>{var r;e.toggleAllColumnsVisible((r=n.target)==null?void 0:r.checked)}}};function y0(e,t){return t?t==="center"?e.getCenterVisibleLeafColumns():t==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const Bze={createTable:e=>{e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}},zze={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:zo("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var n;const r=(n=e.getCoreRowModel().flatRows[0])==null||(n=n._getAllCellsByColumnId()[t.id])==null?void 0:n.getValue();return typeof r=="string"||typeof r=="number"}}),createColumn:(e,t)=>{e.getCanGlobalFilter=()=>{var n,r,i,o;return((n=e.columnDef.enableGlobalFilter)!=null?n:!0)&&((r=t.options.enableGlobalFilter)!=null?r:!0)&&((i=t.options.enableFilters)!=null?i:!0)&&((o=t.options.getColumnCanGlobalFilter==null?void 0:t.options.getColumnCanGlobalFilter(e))!=null?o:!0)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>Zu.includesString,e.getGlobalFilterFn=()=>{var t,n;const{globalFilterFn:r}=e.options;return Qw(r)?r:r==="auto"?e.getGlobalAutoFilterFn():(t=(n=e.options.filterFns)==null?void 0:n[r])!=null?t:Zu[r]},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},Uze={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:zo("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{var r,i;if(!t){e._queue(()=>{t=!0});return}if((r=(i=e.options.autoResetAll)!=null?i:e.options.autoResetExpanded)!=null?r:!e.options.manualExpanding){if(n)return;n=!0,e._queue(()=>{e.resetExpanded(),n=!1})}},e.setExpanded=r=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(r),e.toggleAllRowsExpanded=r=>{r??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=r=>{var i,o;e.setExpanded(r?{}:(i=(o=e.initialState)==null?void 0:o.expanded)!=null?i:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(r=>r.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>r=>{r.persist==null||r.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{const r=e.getState().expanded;return r===!0||Object.values(r).some(Boolean)},e.getIsAllRowsExpanded=()=>{const r=e.getState().expanded;return typeof r=="boolean"?r===!0:!(!Object.keys(r).length||e.getRowModel().flatRows.some(i=>!i.getIsExpanded()))},e.getExpandedDepth=()=>{let r=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(o=>{const a=o.split(".");r=Math.max(r,a.length)}),r},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,t)=>{e.toggleExpanded=n=>{t.setExpanded(r=>{var i;const o=r===!0?!0:!!(r!=null&&r[e.id]);let a={};if(r===!0?Object.keys(t.getRowModel().rowsById).forEach(u=>{a[u]=!0}):a=r,n=(i=n)!=null?i:!o,!o&&n)return{...a,[e.id]:!0};if(o&&!n){const{[e.id]:u,...s}=a;return s}return r})},e.getIsExpanded=()=>{var n;const r=t.getState().expanded;return!!((n=t.options.getIsRowExpanded==null?void 0:t.options.getIsRowExpanded(e))!=null?n:r===!0||r?.[e.id])},e.getCanExpand=()=>{var n,r,i;return(n=t.options.getRowCanExpand==null?void 0:t.options.getRowCanExpand(e))!=null?n:((r=t.options.enableExpanding)!=null?r:!0)&&!!((i=e.subRows)!=null&&i.length)},e.getIsAllParentsExpanded=()=>{let n=!0,r=e;for(;n&&r.parentId;)r=t.getRow(r.parentId,!0),n=r.getIsExpanded();return n},e.getToggleExpandedHandler=()=>{const n=e.getCanExpand();return()=>{n&&e.toggleExpanded()}}}},F6=0,L6=10,n3=()=>({pageIndex:F6,pageSize:L6}),Wze={getInitialState:e=>({...e,pagination:{...n3(),...e?.pagination}}),getDefaultOptions:e=>({onPaginationChange:zo("pagination",e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{var r,i;if(!t){e._queue(()=>{t=!0});return}if((r=(i=e.options.autoResetAll)!=null?i:e.options.autoResetPageIndex)!=null?r:!e.options.manualPagination){if(n)return;n=!0,e._queue(()=>{e.resetPageIndex(),n=!1})}},e.setPagination=r=>{const i=o=>ul(r,o);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(i)},e.resetPagination=r=>{var i;e.setPagination(r?n3():(i=e.initialState.pagination)!=null?i:n3())},e.setPageIndex=r=>{e.setPagination(i=>{let o=ul(r,i.pageIndex);const a=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return o=Math.max(0,Math.min(o,a)),{...i,pageIndex:o}})},e.resetPageIndex=r=>{var i,o;e.setPageIndex(r?F6:(i=(o=e.initialState)==null||(o=o.pagination)==null?void 0:o.pageIndex)!=null?i:F6)},e.resetPageSize=r=>{var i,o;e.setPageSize(r?L6:(i=(o=e.initialState)==null||(o=o.pagination)==null?void 0:o.pageSize)!=null?i:L6)},e.setPageSize=r=>{e.setPagination(i=>{const o=Math.max(1,ul(r,i.pageSize)),a=i.pageSize*i.pageIndex,u=Math.floor(a/o);return{...i,pageIndex:u,pageSize:o}})},e.setPageCount=r=>e.setPagination(i=>{var o;let a=ul(r,(o=e.options.pageCount)!=null?o:-1);return typeof a=="number"&&(a=Math.max(-1,a)),{...i,pageCount:a}}),e.getPageOptions=St(()=>[e.getPageCount()],r=>{let i=[];return r&&r>0&&(i=[...new Array(r)].fill(null).map((o,a)=>a)),i},Ct(e.options,"debugTable")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:r}=e.getState().pagination,i=e.getPageCount();return i===-1?!0:i===0?!1:re.setPageIndex(r=>r-1),e.nextPage=()=>e.setPageIndex(r=>r+1),e.firstPage=()=>e.setPageIndex(0),e.lastPage=()=>e.setPageIndex(e.getPageCount()-1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>{var r;return(r=e.options.pageCount)!=null?r:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var r;return(r=e.options.rowCount)!=null?r:e.getPrePaginationRowModel().rows.length}}},r3=()=>({top:[],bottom:[]}),Vze={getInitialState:e=>({rowPinning:r3(),...e}),getDefaultOptions:e=>({onRowPinningChange:zo("rowPinning",e)}),createRow:(e,t)=>{e.pin=(n,r,i)=>{const o=r?e.getLeafRows().map(s=>{let{id:l}=s;return l}):[],a=i?e.getParentRows().map(s=>{let{id:l}=s;return l}):[],u=new Set([...a,e.id,...o]);t.setRowPinning(s=>{var l,c;if(n==="bottom"){var d,h;return{top:((d=s?.top)!=null?d:[]).filter(m=>!(u!=null&&u.has(m))),bottom:[...((h=s?.bottom)!=null?h:[]).filter(m=>!(u!=null&&u.has(m))),...Array.from(u)]}}if(n==="top"){var v,g;return{top:[...((v=s?.top)!=null?v:[]).filter(m=>!(u!=null&&u.has(m))),...Array.from(u)],bottom:((g=s?.bottom)!=null?g:[]).filter(m=>!(u!=null&&u.has(m)))}}return{top:((l=s?.top)!=null?l:[]).filter(m=>!(u!=null&&u.has(m))),bottom:((c=s?.bottom)!=null?c:[]).filter(m=>!(u!=null&&u.has(m)))}})},e.getCanPin=()=>{var n;const{enableRowPinning:r,enablePinning:i}=t.options;return typeof r=="function"?r(e):(n=r??i)!=null?n:!0},e.getIsPinned=()=>{const n=[e.id],{top:r,bottom:i}=t.getState().rowPinning,o=n.some(u=>r?.includes(u)),a=n.some(u=>i?.includes(u));return o?"top":a?"bottom":!1},e.getPinnedIndex=()=>{var n,r;const i=e.getIsPinned();if(!i)return-1;const o=(n=i==="top"?t.getTopRows():t.getBottomRows())==null?void 0:n.map(a=>{let{id:u}=a;return u});return(r=o?.indexOf(e.id))!=null?r:-1}},createTable:e=>{e.setRowPinning=t=>e.options.onRowPinningChange==null?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>{var n,r;return e.setRowPinning(t?r3():(n=(r=e.initialState)==null?void 0:r.rowPinning)!=null?n:r3())},e.getIsSomeRowsPinned=t=>{var n;const r=e.getState().rowPinning;if(!t){var i,o;return!!((i=r.top)!=null&&i.length||(o=r.bottom)!=null&&o.length)}return!!((n=r[t])!=null&&n.length)},e._getPinnedRows=(t,n,r)=>{var i;return((i=e.options.keepPinnedRows)==null||i?(n??[]).map(a=>{const u=e.getRow(a,!0);return u.getIsAllParentsExpanded()?u:null}):(n??[]).map(a=>t.find(u=>u.id===a))).filter(Boolean).map(a=>({...a,position:r}))},e.getTopRows=St(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(t,n)=>e._getPinnedRows(t,n,"top"),Ct(e.options,"debugRows")),e.getBottomRows=St(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(t,n)=>e._getPinnedRows(t,n,"bottom"),Ct(e.options,"debugRows")),e.getCenterRows=St(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(t,n,r)=>{const i=new Set([...n??[],...r??[]]);return t.filter(o=>!i.has(o.id))},Ct(e.options,"debugRows"))}},Hze={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:zo("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=t=>e.options.onRowSelectionChange==null?void 0:e.options.onRowSelectionChange(t),e.resetRowSelection=t=>{var n;return e.setRowSelection(t?{}:(n=e.initialState.rowSelection)!=null?n:{})},e.toggleAllRowsSelected=t=>{e.setRowSelection(n=>{t=typeof t<"u"?t:!e.getIsAllRowsSelected();const r={...n},i=e.getPreGroupedRowModel().flatRows;return t?i.forEach(o=>{o.getCanSelect()&&(r[o.id]=!0)}):i.forEach(o=>{delete r[o.id]}),r})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(n=>{const r=typeof t<"u"?t:!e.getIsAllPageRowsSelected(),i={...n};return e.getRowModel().rows.forEach(o=>{j6(i,o.id,r,!0,e)}),i}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=St(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,n)=>Object.keys(t).length?i3(e,n):{rows:[],flatRows:[],rowsById:{}},Ct(e.options,"debugTable")),e.getFilteredSelectedRowModel=St(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,n)=>Object.keys(t).length?i3(e,n):{rows:[],flatRows:[],rowsById:{}},Ct(e.options,"debugTable")),e.getGroupedSelectedRowModel=St(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,n)=>Object.keys(t).length?i3(e,n):{rows:[],flatRows:[],rowsById:{}},Ct(e.options,"debugTable")),e.getIsAllRowsSelected=()=>{const t=e.getFilteredRowModel().flatRows,{rowSelection:n}=e.getState();let r=!!(t.length&&Object.keys(n).length);return r&&t.some(i=>i.getCanSelect()&&!n[i.id])&&(r=!1),r},e.getIsAllPageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows.filter(i=>i.getCanSelect()),{rowSelection:n}=e.getState();let r=!!t.length;return r&&t.some(i=>!n[i.id])&&(r=!1),r},e.getIsSomeRowsSelected=()=>{var t;const n=Object.keys((t=e.getState().rowSelection)!=null?t:{}).length;return n>0&&n{const t=e.getPaginationRowModel().flatRows;return e.getIsAllPageRowsSelected()?!1:t.filter(n=>n.getCanSelect()).some(n=>n.getIsSelected()||n.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>t=>{e.toggleAllRowsSelected(t.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}},createRow:(e,t)=>{e.toggleSelected=(n,r)=>{const i=e.getIsSelected();t.setRowSelection(o=>{var a;if(n=typeof n<"u"?n:!i,e.getCanSelect()&&i===n)return o;const u={...o};return j6(u,e.id,n,(a=r?.selectChildren)!=null?a:!0,t),u})},e.getIsSelected=()=>{const{rowSelection:n}=t.getState();return FO(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=t.getState();return B6(e,n)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState();return B6(e,n)==="all"},e.getCanSelect=()=>{var n;return typeof t.options.enableRowSelection=="function"?t.options.enableRowSelection(e):(n=t.options.enableRowSelection)!=null?n:!0},e.getCanSelectSubRows=()=>{var n;return typeof t.options.enableSubRowSelection=="function"?t.options.enableSubRowSelection(e):(n=t.options.enableSubRowSelection)!=null?n:!0},e.getCanMultiSelect=()=>{var n;return typeof t.options.enableMultiRowSelection=="function"?t.options.enableMultiRowSelection(e):(n=t.options.enableMultiRowSelection)!=null?n:!0},e.getToggleSelectedHandler=()=>{const n=e.getCanSelect();return r=>{var i;n&&e.toggleSelected((i=r.target)==null?void 0:i.checked)}}}},j6=(e,t,n,r,i)=>{var o;const a=i.getRow(t,!0);n?(a.getCanMultiSelect()||Object.keys(e).forEach(u=>delete e[u]),a.getCanSelect()&&(e[t]=!0)):delete e[t],r&&(o=a.subRows)!=null&&o.length&&a.getCanSelectSubRows()&&a.subRows.forEach(u=>j6(e,u.id,n,r,i))};function i3(e,t){const n=e.getState().rowSelection,r=[],i={},o=function(a,u){return a.map(s=>{var l;const c=FO(s,n);if(c&&(r.push(s),i[s.id]=s),(l=s.subRows)!=null&&l.length&&(s={...s,subRows:o(s.subRows)}),c)return s}).filter(Boolean)};return{rows:o(t.rows),flatRows:r,rowsById:i}}function FO(e,t){var n;return(n=t[e.id])!=null?n:!1}function B6(e,t,n){var r;if(!((r=e.subRows)!=null&&r.length))return!1;let i=!0,o=!1;return e.subRows.forEach(a=>{if(!(o&&!i)&&(a.getCanSelect()&&(FO(a,t)?o=!0:i=!1),a.subRows&&a.subRows.length)){const u=B6(a,t);u==="all"?o=!0:(u==="some"&&(o=!0),i=!1)}}),i?"all":o?"some":!1}const z6=/([0-9]+)/gm,qze=(e,t,n)=>LK(Ml(e.getValue(n)).toLowerCase(),Ml(t.getValue(n)).toLowerCase()),Kze=(e,t,n)=>LK(Ml(e.getValue(n)),Ml(t.getValue(n))),Gze=(e,t,n)=>LO(Ml(e.getValue(n)).toLowerCase(),Ml(t.getValue(n)).toLowerCase()),Yze=(e,t,n)=>LO(Ml(e.getValue(n)),Ml(t.getValue(n))),Zze=(e,t,n)=>{const r=e.getValue(n),i=t.getValue(n);return r>i?1:rLO(e.getValue(n),t.getValue(n));function LO(e,t){return e===t?0:e>t?1:-1}function Ml(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function LK(e,t){const n=e.split(z6).filter(Boolean),r=t.split(z6).filter(Boolean);for(;n.length&&r.length;){const i=n.shift(),o=r.shift(),a=parseInt(i,10),u=parseInt(o,10),s=[a,u].sort();if(isNaN(s[0])){if(i>o)return 1;if(o>i)return-1;continue}if(isNaN(s[1]))return isNaN(a)?-1:1;if(a>u)return 1;if(u>a)return-1}return n.length-r.length}const jp={alphanumeric:qze,alphanumericCaseSensitive:Kze,text:Gze,textCaseSensitive:Yze,datetime:Zze,basic:Xze},Qze={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:zo("sorting",e),isMultiSortEvent:t=>t.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{const n=t.getFilteredRowModel().flatRows.slice(10);let r=!1;for(const i of n){const o=i?.getValue(e.id);if(Object.prototype.toString.call(o)==="[object Date]")return jp.datetime;if(typeof o=="string"&&(r=!0,o.split(z6).length>1))return jp.alphanumeric}return r?jp.text:jp.basic},e.getAutoSortDir=()=>{const n=t.getFilteredRowModel().flatRows[0];return typeof n?.getValue(e.id)=="string"?"asc":"desc"},e.getSortingFn=()=>{var n,r;if(!e)throw new Error;return Qw(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn==="auto"?e.getAutoSortingFn():(n=(r=t.options.sortingFns)==null?void 0:r[e.columnDef.sortingFn])!=null?n:jp[e.columnDef.sortingFn]},e.toggleSorting=(n,r)=>{const i=e.getNextSortingOrder(),o=typeof n<"u"&&n!==null;t.setSorting(a=>{const u=a?.find(v=>v.id===e.id),s=a?.findIndex(v=>v.id===e.id);let l=[],c,d=o?n:i==="desc";if(a!=null&&a.length&&e.getCanMultiSort()&&r?u?c="toggle":c="add":a!=null&&a.length&&s!==a.length-1?c="replace":u?c="toggle":c="replace",c==="toggle"&&(o||i||(c="remove")),c==="add"){var h;l=[...a,{id:e.id,desc:d}],l.splice(0,l.length-((h=t.options.maxMultiSortColCount)!=null?h:Number.MAX_SAFE_INTEGER))}else c==="toggle"?l=a.map(v=>v.id===e.id?{...v,desc:d}:v):c==="remove"?l=a.filter(v=>v.id!==e.id):l=[{id:e.id,desc:d}];return l})},e.getFirstSortDir=()=>{var n,r;return((n=(r=e.columnDef.sortDescFirst)!=null?r:t.options.sortDescFirst)!=null?n:e.getAutoSortDir()==="desc")?"desc":"asc"},e.getNextSortingOrder=n=>{var r,i;const o=e.getFirstSortDir(),a=e.getIsSorted();return a?a!==o&&((r=t.options.enableSortingRemoval)==null||r)&&(!(n&&(i=t.options.enableMultiRemove)!=null)||i)?!1:a==="desc"?"asc":"desc":o},e.getCanSort=()=>{var n,r;return((n=e.columnDef.enableSorting)!=null?n:!0)&&((r=t.options.enableSorting)!=null?r:!0)&&!!e.accessorFn},e.getCanMultiSort=()=>{var n,r;return(n=(r=e.columnDef.enableMultiSort)!=null?r:t.options.enableMultiSort)!=null?n:!!e.accessorFn},e.getIsSorted=()=>{var n;const r=(n=t.getState().sorting)==null?void 0:n.find(i=>i.id===e.id);return r?r.desc?"desc":"asc":!1},e.getSortIndex=()=>{var n,r;return(n=(r=t.getState().sorting)==null?void 0:r.findIndex(i=>i.id===e.id))!=null?n:-1},e.clearSorting=()=>{t.setSorting(n=>n!=null&&n.length?n.filter(r=>r.id!==e.id):[])},e.getToggleSortingHandler=()=>{const n=e.getCanSort();return r=>{n&&(r.persist==null||r.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?t.options.isMultiSortEvent==null?void 0:t.options.isMultiSortEvent(r):!1))}}},createTable:e=>{e.setSorting=t=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var n,r;e.setSorting(t?[]:(n=(r=e.initialState)==null?void 0:r.sorting)!=null?n:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},Jze=[wze,jze,Ize,Nze,_ze,Sze,Bze,zze,Qze,Dze,Uze,Wze,Vze,Hze,Fze];function eUe(e){var t,n;const r=[...Jze,...(t=e._features)!=null?t:[]];let i={_features:r};const o=i._features.reduce((h,v)=>Object.assign(h,v.getDefaultOptions==null?void 0:v.getDefaultOptions(i)),{}),a=h=>i.options.mergeOptions?i.options.mergeOptions(o,h):{...o,...h};let s={...{},...(n=e.initialState)!=null?n:{}};i._features.forEach(h=>{var v;s=(v=h.getInitialState==null?void 0:h.getInitialState(s))!=null?v:s});const l=[];let c=!1;const d={_features:r,options:{...o,...e},initialState:s,_queue:h=>{l.push(h),c||(c=!0,Promise.resolve().then(()=>{for(;l.length;)l.shift()();c=!1}).catch(v=>setTimeout(()=>{throw v})))},reset:()=>{i.setState(i.initialState)},setOptions:h=>{const v=ul(h,i.options);i.options=a(v)},getState:()=>i.options.state,setState:h=>{i.options.onStateChange==null||i.options.onStateChange(h)},_getRowId:(h,v,g)=>{var m;return(m=i.options.getRowId==null?void 0:i.options.getRowId(h,v,g))!=null?m:`${g?[g.id,v].join("."):v}`},getCoreRowModel:()=>(i._getCoreRowModel||(i._getCoreRowModel=i.options.getCoreRowModel(i)),i._getCoreRowModel()),getRowModel:()=>i.getPaginationRowModel(),getRow:(h,v)=>{let g=(v?i.getPrePaginationRowModel():i.getRowModel()).rowsById[h];if(!g&&(g=i.getCoreRowModel().rowsById[h],!g))throw new Error;return g},_getDefaultColumnDef:St(()=>[i.options.defaultColumn],h=>{var v;return h=(v=h)!=null?v:{},{header:g=>{const m=g.header.column.columnDef;return m.accessorKey?m.accessorKey:m.accessorFn?m.id:null},cell:g=>{var m,b;return(m=(b=g.renderValue())==null||b.toString==null?void 0:b.toString())!=null?m:null},...i._features.reduce((g,m)=>Object.assign(g,m.getDefaultColumnDef==null?void 0:m.getDefaultColumnDef()),{}),...h}},Ct(e,"debugColumns")),_getColumnDefs:()=>i.options.columns,getAllColumns:St(()=>[i._getColumnDefs()],h=>{const v=function(g,m,b){return b===void 0&&(b=0),g.map(w=>{const x=xze(i,w,b,m),S=w;return x.columns=S.columns?v(S.columns,x,b+1):[],x})};return v(h)},Ct(e,"debugColumns")),getAllFlatColumns:St(()=>[i.getAllColumns()],h=>h.flatMap(v=>v.getFlatColumns()),Ct(e,"debugColumns")),_getAllFlatColumnsById:St(()=>[i.getAllFlatColumns()],h=>h.reduce((v,g)=>(v[g.id]=g,v),{}),Ct(e,"debugColumns")),getAllLeafColumns:St(()=>[i.getAllColumns(),i._getOrderColumnsFn()],(h,v)=>{let g=h.flatMap(m=>m.getLeafColumns());return v(g)},Ct(e,"debugColumns")),getColumn:h=>i._getAllFlatColumnsById()[h]};Object.assign(i,d);for(let h=0;hSt(()=>[e.options.data],t=>{const n={rows:[],flatRows:[],rowsById:{}},r=function(i,o,a){o===void 0&&(o=0);const u=[];for(let l=0;le._autoResetPageIndex()))}function tUe(e){const t=[],n=r=>{var i;t.push(r),(i=r.subRows)!=null&&i.length&&r.getIsExpanded()&&r.subRows.forEach(n)};return e.rows.forEach(n),{rows:t,flatRows:e.flatRows,rowsById:e.rowsById}}function jK(e,t,n){return n.options.filterFromLeafRows?nUe(e,t,n):rUe(e,t,n)}function nUe(e,t,n){var r;const i=[],o={},a=(r=n.options.maxLeafRowFilterDepth)!=null?r:100,u=function(s,l){l===void 0&&(l=0);const c=[];for(let h=0;hSt(()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter,e.getFilteredRowModel()],(n,r,i)=>{if(!n.rows.length||!(r!=null&&r.length)&&!i)return n;const o=[...r.map(u=>u.id).filter(u=>u!==t),i?"__global__":void 0].filter(Boolean),a=u=>{for(let s=0;sSt(()=>{var n;return[(n=e.getColumn(t))==null?void 0:n.getFacetedRowModel()]},n=>{if(!n)return new Map;let r=new Map;for(let o=0;oSt(()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter],(t,n,r)=>{if(!t.rows.length||!(n!=null&&n.length)&&!r){for(let h=0;h{var v;const g=e.getColumn(h.id);if(!g)return;const m=g.getFilterFn();m&&i.push({id:h.id,filterFn:m,resolvedValue:(v=m.resolveFilterValue==null?void 0:m.resolveFilterValue(h.value))!=null?v:h.value})});const a=(n??[]).map(h=>h.id),u=e.getGlobalFilterFn(),s=e.getAllLeafColumns().filter(h=>h.getCanGlobalFilter());r&&u&&s.length&&(a.push("__global__"),s.forEach(h=>{var v;o.push({id:h.id,filterFn:u,resolvedValue:(v=u.resolveFilterValue==null?void 0:u.resolveFilterValue(r))!=null?v:r})}));let l,c;for(let h=0;h{v.columnFiltersMeta[m]=b})}if(o.length){for(let g=0;g{v.columnFiltersMeta[m]=b})){v.columnFilters.__global__=!0;break}}v.columnFilters.__global__!==!0&&(v.columnFilters.__global__=!1)}}const d=h=>{for(let v=0;ve._autoResetPageIndex()))}function fZe(e){return t=>St(()=>[t.getState().pagination,t.getPrePaginationRowModel(),t.options.paginateExpandedRows?void 0:t.getState().expanded],(n,r)=>{if(!r.rows.length)return r;const{pageSize:i,pageIndex:o}=n;let{rows:a,flatRows:u,rowsById:s}=r;const l=i*o,c=l+i;a=a.slice(l,c);let d;t.options.paginateExpandedRows?d={rows:a,flatRows:u,rowsById:s}:d=tUe({rows:a,flatRows:u,rowsById:s}),d.flatRows=[];const h=v=>{d.flatRows.push(v),v.subRows.length&&v.subRows.forEach(h)};return d.rows.forEach(h),d},Ct(t.options,"debugTable"))}function dZe(){return e=>St(()=>[e.getState().sorting,e.getPreSortedRowModel()],(t,n)=>{if(!n.rows.length||!(t!=null&&t.length))return n;const r=e.getState().sorting,i=[],o=r.filter(s=>{var l;return(l=e.getColumn(s.id))==null?void 0:l.getCanSort()}),a={};o.forEach(s=>{const l=e.getColumn(s.id);l&&(a[s.id]={sortUndefined:l.columnDef.sortUndefined,invertSorting:l.columnDef.invertSorting,sortingFn:l.getSortingFn()})});const u=s=>{const l=s.map(c=>({...c}));return l.sort((c,d)=>{for(let v=0;v{var d;i.push(c),(d=c.subRows)!=null&&d.length&&(c.subRows=u(c.subRows))}),l};return{rows:u(n.rows),flatRows:i,rowsById:n.rowsById}},Ct(e.options,"debugTable","getSortedRowModel",()=>e._autoResetPageIndex()))}/** * react-table * * Copyright (c) TanStack @@ -443,56 +473,56 @@ function print() { __p += __j.call(arguments, '') } * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function LKe(e,t){return e?FBe(e)?b.createElement(e,t):e:null}function FBe(e){return LBe(e)||typeof e=="function"||jBe(e)}function LBe(e){return typeof e=="function"&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function jBe(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function jKe(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=b.useState(()=>({current:DBe(t)})),[r,i]=b.useState(()=>n.current.initialState);return n.current.setOptions(o=>({...o,...e,state:{...r,...e.state},onStateChange:a=>{i(a),e.onStateChange==null||e.onStateChange(a)}})),n.current}const iG=Object.freeze({left:0,top:0,width:16,height:16}),$b=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),g4=Object.freeze({...iG,...$b}),P6=Object.freeze({...g4,body:"",hidden:!1});function BBe(e,t){const n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);const r=((e.rotate||0)+(t.rotate||0))%4;return r&&(n.rotate=r),n}function D7(e,t){const n=BBe(e,t);for(const r in P6)r in $b?r in e&&!(r in n)&&(n[r]=$b[r]):r in t?n[r]=t[r]:r in e&&(n[r]=e[r]);return n}function zBe(e,t){const n=e.icons,r=e.aliases||Object.create(null),i=Object.create(null);function o(a){if(n[a])return i[a]=[];if(!(a in i)){i[a]=null;const u=r[a]&&r[a].parent,s=u&&o(u);s&&(i[a]=[u].concat(s))}return i[a]}return Object.keys(n).concat(Object.keys(r)).forEach(o),i}function UBe(e,t,n){const r=e.icons,i=e.aliases||Object.create(null);let o={};function a(u){o=D7(r[u]||i[u],o)}return a(t),n.forEach(a),D7(e,o)}function oG(e,t){const n=[];if(typeof e!="object"||typeof e.icons!="object")return n;e.not_found instanceof Array&&e.not_found.forEach(i=>{t(i,null),n.push(i)});const r=zBe(e);for(const i in r){const o=r[i];o&&(t(i,UBe(e,i,o)),n.push(i))}return n}const WBe={provider:"",aliases:{},not_found:{},...iG};function HS(e,t){for(const n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function aG(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!HS(e,WBe))return null;const n=t.icons;for(const i in n){const o=n[i];if(!i||typeof o.body!="string"||!HS(o,P6))return null}const r=t.aliases||Object.create(null);for(const i in r){const o=r[i],a=o.parent;if(!i||typeof a!="string"||!n[a]&&!r[a]||!HS(o,P6))return null}return t}const uG=/^[a-z0-9]+(-[a-z0-9]+)*$/,Rx=(e,t,n,r="")=>{const i=e.split(":");if(e.slice(0,1)==="@"){if(i.length<2||i.length>3)return null;r=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){const u=i.pop(),s=i.pop(),l={provider:i.length>0?i[0]:r,prefix:s,name:u};return t&&!Ey(l)?null:l}const o=i[0],a=o.split("-");if(a.length>1){const u={provider:r,prefix:a.shift(),name:a.join("-")};return t&&!Ey(u)?null:u}if(n&&r===""){const u={provider:r,prefix:"",name:o};return t&&!Ey(u,n)?null:u}return null},Ey=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1,$7=Object.create(null);function VBe(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function Tc(e,t){const n=$7[e]||($7[e]=Object.create(null));return n[t]||(n[t]=VBe(e,t))}function v4(e,t){return aG(t)?oG(t,(n,r)=>{r?e.icons[n]=r:e.missing.add(n)}):[]}function HBe(e,t,n){try{if(typeof n.body=="string")return e.icons[t]={...n},!0}catch{}return!1}let xm=!1;function sG(e){return typeof e=="boolean"&&(xm=e),xm}function I7(e){const t=typeof e=="string"?Rx(e,!0,xm):e;if(t){const n=Tc(t.provider,t.prefix),r=t.name;return n.icons[r]||(n.missing.has(r)?null:void 0)}}function qBe(e,t){const n=Rx(e,!0,xm);if(!n)return!1;const r=Tc(n.provider,n.prefix);return t?HBe(r,n.name,t):(r.missing.add(n.name),!0)}function GBe(e,t){if(typeof e!="object")return!1;if(typeof t!="string"&&(t=e.provider||""),xm&&!t&&!e.prefix){let i=!1;return aG(e)&&(e.prefix="",oG(e,(o,a)=>{qBe(o,a)&&(i=!0)})),i}const n=e.prefix;if(!Ey({provider:t,prefix:n,name:"a"}))return!1;const r=Tc(t,n);return!!v4(r,e)}const lG=Object.freeze({width:null,height:null}),cG=Object.freeze({...lG,...$b}),KBe=/(-?[0-9.]*[0-9]+[0-9.]*)/g,YBe=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function N7(e,t,n){if(t===1)return e;if(n=n||100,typeof e=="number")return Math.ceil(e*t*n)/n;if(typeof e!="string")return e;const r=e.split(KBe);if(r===null||!r.length)return e;const i=[];let o=r.shift(),a=YBe.test(o);for(;;){if(a){const u=parseFloat(o);isNaN(u)?i.push(o):i.push(Math.ceil(u*t*n)/n)}else i.push(o);if(o=r.shift(),o===void 0)return i.join("");a=!a}}function ZBe(e,t="defs"){let n="";const r=e.indexOf("<"+t);for(;r>=0;){const i=e.indexOf(">",r),o=e.indexOf("",o);if(a===-1)break;n+=e.slice(i+1,o).trim(),e=e.slice(0,r).trim()+e.slice(a+1)}return{defs:n,content:e}}function XBe(e,t){return e?""+e+""+t:t}function QBe(e,t,n){const r=ZBe(e);return XBe(r.defs,t+r.content+n)}const JBe=e=>e==="unset"||e==="undefined"||e==="none";function eze(e,t){const n={...g4,...e},r={...cG,...t},i={left:n.left,top:n.top,width:n.width,height:n.height};let o=n.body;[n,r].forEach(v=>{const y=[],x=v.hFlip,w=v.vFlip;let S=v.rotate;x?w?S+=2:(y.push("translate("+(i.width+i.left).toString()+" "+(0-i.top).toString()+")"),y.push("scale(-1 1)"),i.top=i.left=0):w&&(y.push("translate("+(0-i.left).toString()+" "+(i.height+i.top).toString()+")"),y.push("scale(1 -1)"),i.top=i.left=0);let A;switch(S<0&&(S-=Math.floor(S/4)*4),S=S%4,S){case 1:A=i.height/2+i.top,y.unshift("rotate(90 "+A.toString()+" "+A.toString()+")");break;case 2:y.unshift("rotate(180 "+(i.width/2+i.left).toString()+" "+(i.height/2+i.top).toString()+")");break;case 3:A=i.width/2+i.left,y.unshift("rotate(-90 "+A.toString()+" "+A.toString()+")");break}S%2===1&&(i.left!==i.top&&(A=i.left,i.left=i.top,i.top=A),i.width!==i.height&&(A=i.width,i.width=i.height,i.height=A)),y.length&&(o=QBe(o,'',""))});const a=r.width,u=r.height,s=i.width,l=i.height;let c,d;a===null?(d=u===null?"1em":u==="auto"?l:u,c=N7(d,s/l)):(c=a==="auto"?s:a,d=u===null?N7(c,l/s):u==="auto"?l:u);const h={},m=(v,y)=>{JBe(y)||(h[v]=y.toString())};m("width",c),m("height",d);const g=[i.left,i.top,s,l];return h.viewBox=g.join(" "),{attributes:h,viewBox:g,body:o}}const tze=/\sid="(\S+)"/g,nze="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let rze=0;function ize(e,t=nze){const n=[];let r;for(;r=tze.exec(e);)n.push(r[1]);if(!n.length)return e;const i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return n.forEach(o=>{const a=typeof t=="function"?t(o):t+(rze++).toString(),u=o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+u+')([")]|\\.[a-z])',"g"),"$1"+a+i+"$3")}),e=e.replace(new RegExp(i,"g"),""),e}const k6=Object.create(null);function oze(e,t){k6[e]=t}function T6(e){return k6[e]||k6[""]}function y4(e){let t;if(typeof e.resources=="string")t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const b4=Object.create(null),mp=["https://api.simplesvg.com","https://api.unisvg.com"],Ay=[];for(;mp.length>0;)mp.length===1||Math.random()>.5?Ay.push(mp.shift()):Ay.push(mp.pop());b4[""]=y4({resources:["https://api.iconify.design"].concat(Ay)});function aze(e,t){const n=y4(t);return n===null?!1:(b4[e]=n,!0)}function w4(e){return b4[e]}const uze=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let F7=uze();function sze(e,t){const n=w4(e);if(!n)return 0;let r;if(!n.maxURL)r=0;else{let i=0;n.resources.forEach(a=>{i=Math.max(i,a.length)});const o=t+".json?icons=";r=n.maxURL-i-n.path.length-o.length}return r}function lze(e){return e===404}const cze=(e,t,n)=>{const r=[],i=sze(e,t),o="icons";let a={type:o,provider:e,prefix:t,icons:[]},u=0;return n.forEach((s,l)=>{u+=s.length+1,u>=i&&l>0&&(r.push(a),a={type:o,provider:e,prefix:t,icons:[]},u=s.length),a.icons.push(s)}),r.push(a),r};function fze(e){if(typeof e=="string"){const t=w4(e);if(t)return t.path}return"/"}const dze=(e,t,n)=>{if(!F7){n("abort",424);return}let r=fze(t.provider);switch(t.type){case"icons":{const o=t.prefix,u=t.icons.join(","),s=new URLSearchParams({icons:u});r+=o+".json?"+s.toString();break}case"custom":{const o=t.uri;r+=o.slice(0,1)==="/"?o.slice(1):o;break}default:n("abort",400);return}let i=503;F7(e+r).then(o=>{const a=o.status;if(a!==200){setTimeout(()=>{n(lze(a)?"abort":"next",a)});return}return i=501,o.json()}).then(o=>{if(typeof o!="object"||o===null){setTimeout(()=>{o===404?n("abort",o):n("next",i)});return}setTimeout(()=>{n("success",o)})}).catch(()=>{n("next",i)})},hze={prepare:cze,send:dze};function pze(e){const t={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((i,o)=>i.provider!==o.provider?i.provider.localeCompare(o.provider):i.prefix!==o.prefix?i.prefix.localeCompare(o.prefix):i.name.localeCompare(o.name));let r={provider:"",prefix:"",name:""};return e.forEach(i=>{if(r.name===i.name&&r.prefix===i.prefix&&r.provider===i.provider)return;r=i;const o=i.provider,a=i.prefix,u=i.name,s=n[o]||(n[o]=Object.create(null)),l=s[a]||(s[a]=Tc(o,a));let c;u in l.icons?c=t.loaded:a===""||l.missing.has(u)?c=t.missing:c=t.pending;const d={provider:o,prefix:a,name:u};c.push(d)}),t}function fG(e,t){e.forEach(n=>{const r=n.loaderCallbacks;r&&(n.loaderCallbacks=r.filter(i=>i.id!==t))})}function mze(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let n=!1;const r=e.provider,i=e.prefix;t.forEach(o=>{const a=o.icons,u=a.pending.length;a.pending=a.pending.filter(s=>{if(s.prefix!==i)return!0;const l=s.name;if(e.icons[l])a.loaded.push({provider:r,prefix:i,name:l});else if(e.missing.has(l))a.missing.push({provider:r,prefix:i,name:l});else return n=!0,!0;return!1}),a.pending.length!==u&&(n||fG([e],o.id),o.callback(a.loaded.slice(0),a.missing.slice(0),a.pending.slice(0),o.abort))})}))}let gze=0;function vze(e,t,n){const r=gze++,i=fG.bind(null,n,r);if(!t.pending.length)return i;const o={id:r,icons:t,callback:e,abort:i};return n.forEach(a=>{(a.loaderCallbacks||(a.loaderCallbacks=[])).push(o)}),i}function yze(e,t=!0,n=!1){const r=[];return e.forEach(i=>{const o=typeof i=="string"?Rx(i,t,n):i;o&&r.push(o)}),r}var bze={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function wze(e,t,n,r){const i=e.resources.length,o=e.random?Math.floor(Math.random()*i):e.index;let a;if(e.random){let C=e.resources.slice(0);for(a=[];C.length>1;){const P=Math.floor(Math.random()*C.length);a.push(C[P]),C=C.slice(0,P).concat(C.slice(P+1))}a=a.concat(C)}else a=e.resources.slice(o).concat(e.resources.slice(0,o));const u=Date.now();let s="pending",l=0,c,d=null,h=[],m=[];typeof r=="function"&&m.push(r);function g(){d&&(clearTimeout(d),d=null)}function v(){s==="pending"&&(s="aborted"),g(),h.forEach(C=>{C.status==="pending"&&(C.status="aborted")}),h=[]}function y(C,P){P&&(m=[]),typeof C=="function"&&m.push(C)}function x(){return{startTime:u,payload:t,status:s,queriesSent:l,queriesPending:h.length,subscribe:y,abort:v}}function w(){s="failed",m.forEach(C=>{C(void 0,c)})}function S(){h.forEach(C=>{C.status==="pending"&&(C.status="aborted")}),h=[]}function A(C,P,k){const M=P!=="success";switch(h=h.filter(L=>L!==C),s){case"pending":break;case"failed":if(M||!e.dataAfterTimeout)return;break;default:return}if(P==="abort"){c=k,w();return}if(M){c=k,h.length||(a.length?E():w());return}if(g(),S(),!e.random){const L=e.resources.indexOf(C.resource);L!==-1&&L!==e.index&&(e.index=L)}s="completed",m.forEach(L=>{L(k)})}function E(){if(s!=="pending")return;g();const C=a.shift();if(C===void 0){if(h.length){d=setTimeout(()=>{g(),s==="pending"&&(S(),w())},e.timeout);return}w();return}const P={status:"pending",resource:C,callback:(k,M)=>{A(P,k,M)}};h.push(P),l++,d=setTimeout(E,e.rotate),n(C,t,P.callback)}return setTimeout(E),x}function dG(e){const t={...bze,...e};let n=[];function r(){n=n.filter(u=>u().status==="pending")}function i(u,s,l){const c=wze(t,u,s,(d,h)=>{r(),l&&l(d,h)});return n.push(c),c}function o(u){return n.find(s=>u(s))||null}return{query:i,find:o,setIndex:u=>{t.index=u},getIndex:()=>t.index,cleanup:r}}function L7(){}const qS=Object.create(null);function xze(e){if(!qS[e]){const t=w4(e);if(!t)return;const n=dG(t),r={config:t,redundancy:n};qS[e]=r}return qS[e]}function _ze(e,t,n){let r,i;if(typeof e=="string"){const o=T6(e);if(!o)return n(void 0,424),L7;i=o.send;const a=xze(e);a&&(r=a.redundancy)}else{const o=y4(e);if(o){r=dG(o);const a=e.resources?e.resources[0]:"",u=T6(a);u&&(i=u.send)}}return!r||!i?(n(void 0,424),L7):r.query(t,i,n)().abort}const j7="iconify2",_m="iconify",hG=_m+"-count",B7=_m+"-version",pG=36e5,Sze=168,Cze=50;function M6(e,t){try{return e.getItem(t)}catch{}}function x4(e,t,n){try{return e.setItem(t,n),!0}catch{}}function z7(e,t){try{e.removeItem(t)}catch{}}function R6(e,t){return x4(e,hG,t.toString())}function D6(e){return parseInt(M6(e,hG))||0}const Dx={local:!0,session:!0},mG={local:new Set,session:new Set};let _4=!1;function Eze(e){_4=e}let Yv=typeof window>"u"?{}:window;function gG(e){const t=e+"Storage";try{if(Yv&&Yv[t]&&typeof Yv[t].length=="number")return Yv[t]}catch{}Dx[e]=!1}function vG(e,t){const n=gG(e);if(!n)return;const r=M6(n,B7);if(r!==j7){if(r){const u=D6(n);for(let s=0;s{const s=_m+u.toString(),l=M6(n,s);if(typeof l=="string"){try{const c=JSON.parse(l);if(typeof c=="object"&&typeof c.cached=="number"&&c.cached>i&&typeof c.provider=="string"&&typeof c.data=="object"&&typeof c.data.prefix=="string"&&t(c,u))return!0}catch{}z7(n,s)}};let a=D6(n);for(let u=a-1;u>=0;u--)o(u)||(u===a-1?(a--,R6(n,a)):mG[e].add(u))}function yG(){if(!_4){Eze(!0);for(const e in Dx)vG(e,t=>{const n=t.data,r=t.provider,i=n.prefix,o=Tc(r,i);if(!v4(o,n).length)return!1;const a=n.lastModified||-1;return o.lastModifiedCached=o.lastModifiedCached?Math.min(o.lastModifiedCached,a):a,!0})}}function Aze(e,t){const n=e.lastModifiedCached;if(n&&n>=t)return n===t;if(e.lastModifiedCached=t,n)for(const r in Dx)vG(r,i=>{const o=i.data;return i.provider!==e.provider||o.prefix!==e.prefix||o.lastModified===t});return!0}function Oze(e,t){_4||yG();function n(r){let i;if(!Dx[r]||!(i=gG(r)))return;const o=mG[r];let a;if(o.size)o.delete(a=Array.from(o).shift());else if(a=D6(i),a>=Cze||!R6(i,a+1))return;const u={cached:Math.floor(Date.now()/pG),provider:e.provider,data:t};return x4(i,_m+a.toString(),JSON.stringify(u))}t.lastModified&&!Aze(e,t.lastModified)||Object.keys(t.icons).length&&(t.not_found&&(t=Object.assign({},t),delete t.not_found),n("local")||n("session"))}function Pze(){}function kze(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,mze(e)}))}function Tze(e){const t=[],n=[];return e.forEach(r=>{(r.match(uG)?t:n).push(r)}),{valid:t,invalid:n}}function gp(e,t,n,r){function i(){const o=e.pendingIcons;t.forEach(a=>{o&&o.delete(a),e.icons[a]||e.missing.add(a)})}if(n&&typeof n=="object")try{if(!v4(e,n).length){i();return}r&&Oze(e,n)}catch(o){console.error(o)}i(),kze(e)}function U7(e,t){e instanceof Promise?e.then(n=>{t(n)}).catch(()=>{t(null)}):t(e)}function Mze(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:n,prefix:r}=e,i=e.iconsToLoad;if(delete e.iconsToLoad,!i||!i.length)return;const o=e.loadIcon;if(e.loadIcons&&(i.length>1||!o)){U7(e.loadIcons(i,r,n),c=>{gp(e,i,c,!1)});return}if(o){i.forEach(c=>{const d=o(c,r,n);U7(d,h=>{const m=h?{prefix:r,icons:{[c]:h}}:null;gp(e,[c],m,!1)})});return}const{valid:a,invalid:u}=Tze(i);if(u.length&&gp(e,u,null,!1),!a.length)return;const s=r.match(uG)?T6(n):null;if(!s){gp(e,a,null,!1);return}s.prepare(n,r,a).forEach(c=>{_ze(n,c,d=>{gp(e,c.icons,d,!0)})})}))}const Rze=(e,t)=>{const n=yze(e,!0,sG()),r=pze(n);if(!r.pending.length){let s=!0;return setTimeout(()=>{s&&t(r.loaded,r.missing,r.pending,Pze)}),()=>{s=!1}}const i=Object.create(null),o=[];let a,u;return r.pending.forEach(s=>{const{provider:l,prefix:c}=s;if(c===u&&l===a)return;a=l,u=c,o.push(Tc(l,c));const d=i[l]||(i[l]=Object.create(null));d[c]||(d[c]=[])}),r.pending.forEach(s=>{const{provider:l,prefix:c,name:d}=s,h=Tc(l,c),m=h.pendingIcons||(h.pendingIcons=new Set);m.has(d)||(m.add(d),i[l][c].push(d))}),o.forEach(s=>{const l=i[s.provider][s.prefix];l.length&&Mze(s,l)}),vze(t,r,o)};function Dze(e,t){const n={...e};for(const r in t){const i=t[r],o=typeof i;r in lG?(i===null||i&&(o==="string"||o==="number"))&&(n[r]=i):o===typeof n[r]&&(n[r]=r==="rotate"?i%4:i)}return n}const $ze=/[\s,]+/;function Ize(e,t){t.split($ze).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}function Nze(e,t=0){const n=e.replace(/^-?[0-9.]*/,"");function r(i){for(;i<0;)i+=4;return i%4}if(n===""){const i=parseInt(e);return isNaN(i)?0:r(i)}else if(n!==e){let i=0;switch(n){case"%":i=25;break;case"deg":i=90}if(i){let o=parseFloat(e.slice(0,e.length-n.length));return isNaN(o)?0:(o=o/i,o%1===0?r(o):0)}}return t}function Fze(e,t){let n=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const r in t)n+=" "+r+'="'+t[r]+'"';return'"+e+""}function Lze(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(//g,"%3E").replace(/\s+/g," ")}function jze(e){return"data:image/svg+xml,"+Lze(e)}function Bze(e){return'url("'+jze(e)+'")'}let Zp;function zze(){try{Zp=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{Zp=null}}function Uze(e){return Zp===void 0&&zze(),Zp?Zp.createHTML(e):e}const bG={...cG,inline:!1},Wze={xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},Vze={display:"inline-block"},$6={backgroundColor:"currentColor"},wG={backgroundColor:"transparent"},W7={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},V7={WebkitMask:$6,mask:$6,background:wG};for(const e in V7){const t=V7[e];for(const n in W7)t[e+n]=W7[n]}const Hze={...bG,inline:!0};function H7(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}const qze=(e,t,n)=>{const r=t.inline?Hze:bG,i=Dze(r,t),o=t.mode||"svg",a={},u=t.style||{},s={...o==="svg"?Wze:{}};if(n){const y=Rx(n,!1,!0);if(y){const x=["iconify"],w=["provider","prefix"];for(const S of w)y[S]&&x.push("iconify--"+y[S]);s.className=x.join(" ")}}for(let y in t){const x=t[y];if(x!==void 0)switch(y){case"icon":case"style":case"children":case"onLoad":case"mode":case"ssr":break;case"_ref":s.ref=x;break;case"className":s[y]=(s[y]?s[y]+" ":"")+x;break;case"inline":case"hFlip":case"vFlip":i[y]=x===!0||x==="true"||x===1;break;case"flip":typeof x=="string"&&Ize(i,x);break;case"color":a.color=x;break;case"rotate":typeof x=="string"?i[y]=Nze(x):typeof x=="number"&&(i[y]=x);break;case"ariaHidden":case"aria-hidden":x!==!0&&x!=="true"&&delete s["aria-hidden"];break;default:r[y]===void 0&&(s[y]=x)}}const l=eze(e,i),c=l.attributes;if(i.inline&&(a.verticalAlign="-0.125em"),o==="svg"){s.style={...a,...u},Object.assign(s,c);let y=0,x=t.id;return typeof x=="string"&&(x=x.replace(/-/g,"_")),s.dangerouslySetInnerHTML={__html:Uze(ize(l.body,x?()=>x+"ID"+y++:"iconifyReact"))},b.createElement("svg",s)}const{body:d,width:h,height:m}=e,g=o==="mask"||(o==="bg"?!1:d.indexOf("currentColor")!==-1),v=Fze(d,{...c,width:h+"",height:m+""});return s.style={...a,"--svg":Bze(v),width:H7(c.width),height:H7(c.height),...Vze,...g?$6:wG,...u},b.createElement("span",s)};sG(!0);oze("",hze);if(typeof document<"u"&&typeof window<"u"){yG();const e=window;if(e.IconifyPreload!==void 0){const t=e.IconifyPreload,n="Invalid IconifyPreload syntax.";typeof t=="object"&&t!==null&&(t instanceof Array?t:[t]).forEach(r=>{try{(typeof r!="object"||r===null||r instanceof Array||typeof r.icons!="object"||typeof r.prefix!="string"||!GBe(r))&&console.error(n)}catch{console.error(n)}})}if(e.IconifyProviders!==void 0){const t=e.IconifyProviders;if(typeof t=="object"&&t!==null)for(let n in t){const r="IconifyProviders["+n+"] is invalid.";try{const i=t[n];if(typeof i!="object"||!i||i.resources===void 0)continue;aze(n,i)||console.error(r)}catch{console.error(r)}}}}function xG(e){const[t,n]=b.useState(!!e.ssr),[r,i]=b.useState({});function o(m){if(m){const g=e.icon;if(typeof g=="object")return{name:"",data:g};const v=I7(g);if(v)return{name:g,data:v}}return{name:""}}const[a,u]=b.useState(o(!!e.ssr));function s(){const m=r.callback;m&&(m(),i({}))}function l(m){if(JSON.stringify(a)!==JSON.stringify(m))return s(),u(m),!0}function c(){var m;const g=e.icon;if(typeof g=="object"){l({name:"",data:g});return}const v=I7(g);if(l({name:g,data:v}))if(v===void 0){const y=Rze([g],c);i({callback:y})}else v&&((m=e.onLoad)===null||m===void 0||m.call(e,g))}b.useEffect(()=>(n(!0),s),[]),b.useEffect(()=>{t&&c()},[e.icon,t]);const{name:d,data:h}=a;return h?qze({...g4,...h},e,d):e.children?e.children:b.createElement("span",{})}const BKe=b.forwardRef((e,t)=>xG({...e,_ref:t}));b.forwardRef((e,t)=>xG({inline:!0,...e,_ref:t}));var _G="AlertDialog",[Gze,zKe]=ri(_G,[Hj]),qu=Hj(),SG=e=>{const{__scopeAlertDialog:t,...n}=e,r=qu(t);return R.jsx(jhe,{...r,...n,modal:!0})};SG.displayName=_G;var Kze="AlertDialogTrigger",CG=b.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=qu(n);return R.jsx(Bhe,{...i,...r,ref:t})});CG.displayName=Kze;var Yze="AlertDialogPortal",EG=e=>{const{__scopeAlertDialog:t,...n}=e,r=qu(t);return R.jsx(zhe,{...r,...n})};EG.displayName=Yze;var Zze="AlertDialogOverlay",AG=b.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=qu(n);return R.jsx(Uhe,{...i,...r,ref:t})});AG.displayName=Zze;var rd="AlertDialogContent",[Xze,Qze]=Gze(rd),OG=b.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:r,...i}=e,o=qu(n),a=b.useRef(null),u=kt(t,a),s=b.useRef(null);return R.jsx(Ihe,{contentName:rd,titleName:PG,docsSlug:"alert-dialog",children:R.jsx(Xze,{scope:n,cancelRef:s,children:R.jsxs(Whe,{role:"alertdialog",...o,...i,ref:u,onOpenAutoFocus:De(i.onOpenAutoFocus,l=>{l.preventDefault(),s.current?.focus({preventScroll:!0})}),onPointerDownOutside:l=>l.preventDefault(),onInteractOutside:l=>l.preventDefault(),children:[R.jsx(UA,{children:r}),R.jsx(eUe,{contentRef:a})]})})})});OG.displayName=rd;var PG="AlertDialogTitle",kG=b.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=qu(n);return R.jsx(Vhe,{...i,...r,ref:t})});kG.displayName=PG;var TG="AlertDialogDescription",MG=b.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=qu(n);return R.jsx(Hhe,{...i,...r,ref:t})});MG.displayName=TG;var Jze="AlertDialogAction",RG=b.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=qu(n);return R.jsx(uB,{...i,...r,ref:t})});RG.displayName=Jze;var DG="AlertDialogCancel",$G=b.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,{cancelRef:i}=Qze(DG,n),o=qu(n),a=kt(t,i);return R.jsx(uB,{...o,...r,ref:a})});$G.displayName=DG;var eUe=({contentRef:e})=>{const t=`\`${rd}\` requires a description for the component to be accessible for screen reader users. + */function hZe(e,t){return e?iUe(e)?y.createElement(e,t):e:null}function iUe(e){return oUe(e)||typeof e=="function"||aUe(e)}function oUe(e){return typeof e=="function"&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function aUe(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function pZe(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=y.useState(()=>({current:eUe(t)})),[r,i]=y.useState(()=>n.current.initialState);return n.current.setOptions(o=>({...o,...e,state:{...r,...e.state},onStateChange:a=>{i(a),e.onStateChange==null||e.onStateChange(a)}})),n.current}const BK=Object.freeze({left:0,top:0,width:16,height:16}),nx=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),jO=Object.freeze({...BK,...nx}),U6=Object.freeze({...jO,body:"",hidden:!1});function uUe(e,t){const n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);const r=((e.rotate||0)+(t.rotate||0))%4;return r&&(n.rotate=r),n}function q$(e,t){const n=uUe(e,t);for(const r in U6)r in nx?r in e&&!(r in n)&&(n[r]=nx[r]):r in t?n[r]=t[r]:r in e&&(n[r]=e[r]);return n}function sUe(e,t){const n=e.icons,r=e.aliases||Object.create(null),i=Object.create(null);function o(a){if(n[a])return i[a]=[];if(!(a in i)){i[a]=null;const u=r[a]&&r[a].parent,s=u&&o(u);s&&(i[a]=[u].concat(s))}return i[a]}return Object.keys(n).concat(Object.keys(r)).forEach(o),i}function lUe(e,t,n){const r=e.icons,i=e.aliases||Object.create(null);let o={};function a(u){o=q$(r[u]||i[u],o)}return a(t),n.forEach(a),q$(e,o)}function zK(e,t){const n=[];if(typeof e!="object"||typeof e.icons!="object")return n;e.not_found instanceof Array&&e.not_found.forEach(i=>{t(i,null),n.push(i)});const r=sUe(e);for(const i in r){const o=r[i];o&&(t(i,lUe(e,i,o)),n.push(i))}return n}const cUe={provider:"",aliases:{},not_found:{},...BK};function o3(e,t){for(const n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function UK(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!o3(e,cUe))return null;const n=t.icons;for(const i in n){const o=n[i];if(!i||typeof o.body!="string"||!o3(o,U6))return null}const r=t.aliases||Object.create(null);for(const i in r){const o=r[i],a=o.parent;if(!i||typeof a!="string"||!n[a]&&!r[a]||!o3(o,U6))return null}return t}const WK=/^[a-z0-9]+(-[a-z0-9]+)*$/,Jw=(e,t,n,r="")=>{const i=e.split(":");if(e.slice(0,1)==="@"){if(i.length<2||i.length>3)return null;r=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){const u=i.pop(),s=i.pop(),l={provider:i.length>0?i[0]:r,prefix:s,name:u};return t&&!Vy(l)?null:l}const o=i[0],a=o.split("-");if(a.length>1){const u={provider:r,prefix:a.shift(),name:a.join("-")};return t&&!Vy(u)?null:u}if(n&&r===""){const u={provider:r,prefix:"",name:o};return t&&!Vy(u,n)?null:u}return null},Vy=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1,K$=Object.create(null);function fUe(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function rf(e,t){const n=K$[e]||(K$[e]=Object.create(null));return n[t]||(n[t]=fUe(e,t))}function BO(e,t){return UK(t)?zK(t,(n,r)=>{r?e.icons[n]=r:e.missing.add(n)}):[]}function dUe(e,t,n){try{if(typeof n.body=="string")return e.icons[t]={...n},!0}catch{}return!1}let Vv=!1;function VK(e){return typeof e=="boolean"&&(Vv=e),Vv}function G$(e){const t=typeof e=="string"?Jw(e,!0,Vv):e;if(t){const n=rf(t.provider,t.prefix),r=t.name;return n.icons[r]||(n.missing.has(r)?null:void 0)}}function hUe(e,t){const n=Jw(e,!0,Vv);if(!n)return!1;const r=rf(n.provider,n.prefix);return t?dUe(r,n.name,t):(r.missing.add(n.name),!0)}function pUe(e,t){if(typeof e!="object")return!1;if(typeof t!="string"&&(t=e.provider||""),Vv&&!t&&!e.prefix){let i=!1;return UK(e)&&(e.prefix="",zK(e,(o,a)=>{hUe(o,a)&&(i=!0)})),i}const n=e.prefix;if(!Vy({provider:t,prefix:n,name:"a"}))return!1;const r=rf(t,n);return!!BO(r,e)}const HK=Object.freeze({width:null,height:null}),qK=Object.freeze({...HK,...nx}),vUe=/(-?[0-9.]*[0-9]+[0-9.]*)/g,gUe=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Y$(e,t,n){if(t===1)return e;if(n=n||100,typeof e=="number")return Math.ceil(e*t*n)/n;if(typeof e!="string")return e;const r=e.split(vUe);if(r===null||!r.length)return e;const i=[];let o=r.shift(),a=gUe.test(o);for(;;){if(a){const u=parseFloat(o);isNaN(u)?i.push(o):i.push(Math.ceil(u*t*n)/n)}else i.push(o);if(o=r.shift(),o===void 0)return i.join("");a=!a}}function mUe(e,t="defs"){let n="";const r=e.indexOf("<"+t);for(;r>=0;){const i=e.indexOf(">",r),o=e.indexOf("",o);if(a===-1)break;n+=e.slice(i+1,o).trim(),e=e.slice(0,r).trim()+e.slice(a+1)}return{defs:n,content:e}}function yUe(e,t){return e?""+e+""+t:t}function bUe(e,t,n){const r=mUe(e);return yUe(r.defs,t+r.content+n)}const xUe=e=>e==="unset"||e==="undefined"||e==="none";function wUe(e,t){const n={...jO,...e},r={...qK,...t},i={left:n.left,top:n.top,width:n.width,height:n.height};let o=n.body;[n,r].forEach(m=>{const b=[],w=m.hFlip,x=m.vFlip;let S=m.rotate;w?x?S+=2:(b.push("translate("+(i.width+i.left).toString()+" "+(0-i.top).toString()+")"),b.push("scale(-1 1)"),i.top=i.left=0):x&&(b.push("translate("+(0-i.left).toString()+" "+(i.height+i.top).toString()+")"),b.push("scale(1 -1)"),i.top=i.left=0);let A;switch(S<0&&(S-=Math.floor(S/4)*4),S=S%4,S){case 1:A=i.height/2+i.top,b.unshift("rotate(90 "+A.toString()+" "+A.toString()+")");break;case 2:b.unshift("rotate(180 "+(i.width/2+i.left).toString()+" "+(i.height/2+i.top).toString()+")");break;case 3:A=i.width/2+i.left,b.unshift("rotate(-90 "+A.toString()+" "+A.toString()+")");break}S%2===1&&(i.left!==i.top&&(A=i.left,i.left=i.top,i.top=A),i.width!==i.height&&(A=i.width,i.width=i.height,i.height=A)),b.length&&(o=bUe(o,'',""))});const a=r.width,u=r.height,s=i.width,l=i.height;let c,d;a===null?(d=u===null?"1em":u==="auto"?l:u,c=Y$(d,s/l)):(c=a==="auto"?s:a,d=u===null?Y$(c,l/s):u==="auto"?l:u);const h={},v=(m,b)=>{xUe(b)||(h[m]=b.toString())};v("width",c),v("height",d);const g=[i.left,i.top,s,l];return h.viewBox=g.join(" "),{attributes:h,viewBox:g,body:o}}const _Ue=/\sid="(\S+)"/g,SUe="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let CUe=0;function EUe(e,t=SUe){const n=[];let r;for(;r=_Ue.exec(e);)n.push(r[1]);if(!n.length)return e;const i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return n.forEach(o=>{const a=typeof t=="function"?t(o):t+(CUe++).toString(),u=o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+u+')([")]|\\.[a-z])',"g"),"$1"+a+i+"$3")}),e=e.replace(new RegExp(i,"g"),""),e}const W6=Object.create(null);function AUe(e,t){W6[e]=t}function V6(e){return W6[e]||W6[""]}function zO(e){let t;if(typeof e.resources=="string")t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const UO=Object.create(null),Bp=["https://api.simplesvg.com","https://api.unisvg.com"],Hy=[];for(;Bp.length>0;)Bp.length===1||Math.random()>.5?Hy.push(Bp.shift()):Hy.push(Bp.pop());UO[""]=zO({resources:["https://api.iconify.design"].concat(Hy)});function PUe(e,t){const n=zO(t);return n===null?!1:(UO[e]=n,!0)}function WO(e){return UO[e]}const OUe=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let Z$=OUe();function kUe(e,t){const n=WO(e);if(!n)return 0;let r;if(!n.maxURL)r=0;else{let i=0;n.resources.forEach(a=>{i=Math.max(i,a.length)});const o=t+".json?icons=";r=n.maxURL-i-n.path.length-o.length}return r}function TUe(e){return e===404}const MUe=(e,t,n)=>{const r=[],i=kUe(e,t),o="icons";let a={type:o,provider:e,prefix:t,icons:[]},u=0;return n.forEach((s,l)=>{u+=s.length+1,u>=i&&l>0&&(r.push(a),a={type:o,provider:e,prefix:t,icons:[]},u=s.length),a.icons.push(s)}),r.push(a),r};function RUe(e){if(typeof e=="string"){const t=WO(e);if(t)return t.path}return"/"}const DUe=(e,t,n)=>{if(!Z$){n("abort",424);return}let r=RUe(t.provider);switch(t.type){case"icons":{const o=t.prefix,u=t.icons.join(","),s=new URLSearchParams({icons:u});r+=o+".json?"+s.toString();break}case"custom":{const o=t.uri;r+=o.slice(0,1)==="/"?o.slice(1):o;break}default:n("abort",400);return}let i=503;Z$(e+r).then(o=>{const a=o.status;if(a!==200){setTimeout(()=>{n(TUe(a)?"abort":"next",a)});return}return i=501,o.json()}).then(o=>{if(typeof o!="object"||o===null){setTimeout(()=>{o===404?n("abort",o):n("next",i)});return}setTimeout(()=>{n("success",o)})}).catch(()=>{n("next",i)})},$Ue={prepare:MUe,send:DUe};function IUe(e){const t={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((i,o)=>i.provider!==o.provider?i.provider.localeCompare(o.provider):i.prefix!==o.prefix?i.prefix.localeCompare(o.prefix):i.name.localeCompare(o.name));let r={provider:"",prefix:"",name:""};return e.forEach(i=>{if(r.name===i.name&&r.prefix===i.prefix&&r.provider===i.provider)return;r=i;const o=i.provider,a=i.prefix,u=i.name,s=n[o]||(n[o]=Object.create(null)),l=s[a]||(s[a]=rf(o,a));let c;u in l.icons?c=t.loaded:a===""||l.missing.has(u)?c=t.missing:c=t.pending;const d={provider:o,prefix:a,name:u};c.push(d)}),t}function KK(e,t){e.forEach(n=>{const r=n.loaderCallbacks;r&&(n.loaderCallbacks=r.filter(i=>i.id!==t))})}function NUe(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let n=!1;const r=e.provider,i=e.prefix;t.forEach(o=>{const a=o.icons,u=a.pending.length;a.pending=a.pending.filter(s=>{if(s.prefix!==i)return!0;const l=s.name;if(e.icons[l])a.loaded.push({provider:r,prefix:i,name:l});else if(e.missing.has(l))a.missing.push({provider:r,prefix:i,name:l});else return n=!0,!0;return!1}),a.pending.length!==u&&(n||KK([e],o.id),o.callback(a.loaded.slice(0),a.missing.slice(0),a.pending.slice(0),o.abort))})}))}let FUe=0;function LUe(e,t,n){const r=FUe++,i=KK.bind(null,n,r);if(!t.pending.length)return i;const o={id:r,icons:t,callback:e,abort:i};return n.forEach(a=>{(a.loaderCallbacks||(a.loaderCallbacks=[])).push(o)}),i}function jUe(e,t=!0,n=!1){const r=[];return e.forEach(i=>{const o=typeof i=="string"?Jw(i,t,n):i;o&&r.push(o)}),r}var BUe={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function zUe(e,t,n,r){const i=e.resources.length,o=e.random?Math.floor(Math.random()*i):e.index;let a;if(e.random){let C=e.resources.slice(0);for(a=[];C.length>1;){const T=Math.floor(Math.random()*C.length);a.push(C[T]),C=C.slice(0,T).concat(C.slice(T+1))}a=a.concat(C)}else a=e.resources.slice(o).concat(e.resources.slice(0,o));const u=Date.now();let s="pending",l=0,c,d=null,h=[],v=[];typeof r=="function"&&v.push(r);function g(){d&&(clearTimeout(d),d=null)}function m(){s==="pending"&&(s="aborted"),g(),h.forEach(C=>{C.status==="pending"&&(C.status="aborted")}),h=[]}function b(C,T){T&&(v=[]),typeof C=="function"&&v.push(C)}function w(){return{startTime:u,payload:t,status:s,queriesSent:l,queriesPending:h.length,subscribe:b,abort:m}}function x(){s="failed",v.forEach(C=>{C(void 0,c)})}function S(){h.forEach(C=>{C.status==="pending"&&(C.status="aborted")}),h=[]}function A(C,T,M){const F=T!=="success";switch(h=h.filter(U=>U!==C),s){case"pending":break;case"failed":if(F||!e.dataAfterTimeout)return;break;default:return}if(T==="abort"){c=M,x();return}if(F){c=M,h.length||(a.length?E():x());return}if(g(),S(),!e.random){const U=e.resources.indexOf(C.resource);U!==-1&&U!==e.index&&(e.index=U)}s="completed",v.forEach(U=>{U(M)})}function E(){if(s!=="pending")return;g();const C=a.shift();if(C===void 0){if(h.length){d=setTimeout(()=>{g(),s==="pending"&&(S(),x())},e.timeout);return}x();return}const T={status:"pending",resource:C,callback:(M,F)=>{A(T,M,F)}};h.push(T),l++,d=setTimeout(E,e.rotate),n(C,t,T.callback)}return setTimeout(E),w}function GK(e){const t={...BUe,...e};let n=[];function r(){n=n.filter(u=>u().status==="pending")}function i(u,s,l){const c=zUe(t,u,s,(d,h)=>{r(),l&&l(d,h)});return n.push(c),c}function o(u){return n.find(s=>u(s))||null}return{query:i,find:o,setIndex:u=>{t.index=u},getIndex:()=>t.index,cleanup:r}}function X$(){}const a3=Object.create(null);function UUe(e){if(!a3[e]){const t=WO(e);if(!t)return;const n=GK(t),r={config:t,redundancy:n};a3[e]=r}return a3[e]}function WUe(e,t,n){let r,i;if(typeof e=="string"){const o=V6(e);if(!o)return n(void 0,424),X$;i=o.send;const a=UUe(e);a&&(r=a.redundancy)}else{const o=zO(e);if(o){r=GK(o);const a=e.resources?e.resources[0]:"",u=V6(a);u&&(i=u.send)}}return!r||!i?(n(void 0,424),X$):r.query(t,i,n)().abort}const Q$="iconify2",Hv="iconify",YK=Hv+"-count",J$=Hv+"-version",ZK=36e5,VUe=168,HUe=50;function H6(e,t){try{return e.getItem(t)}catch{}}function VO(e,t,n){try{return e.setItem(t,n),!0}catch{}}function eI(e,t){try{e.removeItem(t)}catch{}}function q6(e,t){return VO(e,YK,t.toString())}function K6(e){return parseInt(H6(e,YK))||0}const e2={local:!0,session:!0},XK={local:new Set,session:new Set};let HO=!1;function qUe(e){HO=e}let gy=typeof window>"u"?{}:window;function QK(e){const t=e+"Storage";try{if(gy&&gy[t]&&typeof gy[t].length=="number")return gy[t]}catch{}e2[e]=!1}function JK(e,t){const n=QK(e);if(!n)return;const r=H6(n,J$);if(r!==Q$){if(r){const u=K6(n);for(let s=0;s{const s=Hv+u.toString(),l=H6(n,s);if(typeof l=="string"){try{const c=JSON.parse(l);if(typeof c=="object"&&typeof c.cached=="number"&&c.cached>i&&typeof c.provider=="string"&&typeof c.data=="object"&&typeof c.data.prefix=="string"&&t(c,u))return!0}catch{}eI(n,s)}};let a=K6(n);for(let u=a-1;u>=0;u--)o(u)||(u===a-1?(a--,q6(n,a)):XK[e].add(u))}function eG(){if(!HO){qUe(!0);for(const e in e2)JK(e,t=>{const n=t.data,r=t.provider,i=n.prefix,o=rf(r,i);if(!BO(o,n).length)return!1;const a=n.lastModified||-1;return o.lastModifiedCached=o.lastModifiedCached?Math.min(o.lastModifiedCached,a):a,!0})}}function KUe(e,t){const n=e.lastModifiedCached;if(n&&n>=t)return n===t;if(e.lastModifiedCached=t,n)for(const r in e2)JK(r,i=>{const o=i.data;return i.provider!==e.provider||o.prefix!==e.prefix||o.lastModified===t});return!0}function GUe(e,t){HO||eG();function n(r){let i;if(!e2[r]||!(i=QK(r)))return;const o=XK[r];let a;if(o.size)o.delete(a=Array.from(o).shift());else if(a=K6(i),a>=HUe||!q6(i,a+1))return;const u={cached:Math.floor(Date.now()/ZK),provider:e.provider,data:t};return VO(i,Hv+a.toString(),JSON.stringify(u))}t.lastModified&&!KUe(e,t.lastModified)||Object.keys(t.icons).length&&(t.not_found&&(t=Object.assign({},t),delete t.not_found),n("local")||n("session"))}function YUe(){}function ZUe(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,NUe(e)}))}function XUe(e){const t=[],n=[];return e.forEach(r=>{(r.match(WK)?t:n).push(r)}),{valid:t,invalid:n}}function zp(e,t,n,r){function i(){const o=e.pendingIcons;t.forEach(a=>{o&&o.delete(a),e.icons[a]||e.missing.add(a)})}if(n&&typeof n=="object")try{if(!BO(e,n).length){i();return}r&&GUe(e,n)}catch(o){console.error(o)}i(),ZUe(e)}function tI(e,t){e instanceof Promise?e.then(n=>{t(n)}).catch(()=>{t(null)}):t(e)}function QUe(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:n,prefix:r}=e,i=e.iconsToLoad;if(delete e.iconsToLoad,!i||!i.length)return;const o=e.loadIcon;if(e.loadIcons&&(i.length>1||!o)){tI(e.loadIcons(i,r,n),c=>{zp(e,i,c,!1)});return}if(o){i.forEach(c=>{const d=o(c,r,n);tI(d,h=>{const v=h?{prefix:r,icons:{[c]:h}}:null;zp(e,[c],v,!1)})});return}const{valid:a,invalid:u}=XUe(i);if(u.length&&zp(e,u,null,!1),!a.length)return;const s=r.match(WK)?V6(n):null;if(!s){zp(e,a,null,!1);return}s.prepare(n,r,a).forEach(c=>{WUe(n,c,d=>{zp(e,c.icons,d,!0)})})}))}const JUe=(e,t)=>{const n=jUe(e,!0,VK()),r=IUe(n);if(!r.pending.length){let s=!0;return setTimeout(()=>{s&&t(r.loaded,r.missing,r.pending,YUe)}),()=>{s=!1}}const i=Object.create(null),o=[];let a,u;return r.pending.forEach(s=>{const{provider:l,prefix:c}=s;if(c===u&&l===a)return;a=l,u=c,o.push(rf(l,c));const d=i[l]||(i[l]=Object.create(null));d[c]||(d[c]=[])}),r.pending.forEach(s=>{const{provider:l,prefix:c,name:d}=s,h=rf(l,c),v=h.pendingIcons||(h.pendingIcons=new Set);v.has(d)||(v.add(d),i[l][c].push(d))}),o.forEach(s=>{const l=i[s.provider][s.prefix];l.length&&QUe(s,l)}),LUe(t,r,o)};function eWe(e,t){const n={...e};for(const r in t){const i=t[r],o=typeof i;r in HK?(i===null||i&&(o==="string"||o==="number"))&&(n[r]=i):o===typeof n[r]&&(n[r]=r==="rotate"?i%4:i)}return n}const tWe=/[\s,]+/;function nWe(e,t){t.split(tWe).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}function rWe(e,t=0){const n=e.replace(/^-?[0-9.]*/,"");function r(i){for(;i<0;)i+=4;return i%4}if(n===""){const i=parseInt(e);return isNaN(i)?0:r(i)}else if(n!==e){let i=0;switch(n){case"%":i=25;break;case"deg":i=90}if(i){let o=parseFloat(e.slice(0,e.length-n.length));return isNaN(o)?0:(o=o/i,o%1===0?r(o):0)}}return t}function iWe(e,t){let n=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const r in t)n+=" "+r+'="'+t[r]+'"';return'"+e+""}function oWe(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(//g,"%3E").replace(/\s+/g," ")}function aWe(e){return"data:image/svg+xml,"+oWe(e)}function uWe(e){return'url("'+aWe(e)+'")'}let b0;function sWe(){try{b0=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{b0=null}}function lWe(e){return b0===void 0&&sWe(),b0?b0.createHTML(e):e}const tG={...qK,inline:!1},cWe={xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},fWe={display:"inline-block"},G6={backgroundColor:"currentColor"},nG={backgroundColor:"transparent"},nI={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},rI={WebkitMask:G6,mask:G6,background:nG};for(const e in rI){const t=rI[e];for(const n in nI)t[e+n]=nI[n]}const dWe={...tG,inline:!0};function iI(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}const hWe=(e,t,n)=>{const r=t.inline?dWe:tG,i=eWe(r,t),o=t.mode||"svg",a={},u=t.style||{},s={...o==="svg"?cWe:{}};if(n){const b=Jw(n,!1,!0);if(b){const w=["iconify"],x=["provider","prefix"];for(const S of x)b[S]&&w.push("iconify--"+b[S]);s.className=w.join(" ")}}for(let b in t){const w=t[b];if(w!==void 0)switch(b){case"icon":case"style":case"children":case"onLoad":case"mode":case"ssr":break;case"_ref":s.ref=w;break;case"className":s[b]=(s[b]?s[b]+" ":"")+w;break;case"inline":case"hFlip":case"vFlip":i[b]=w===!0||w==="true"||w===1;break;case"flip":typeof w=="string"&&nWe(i,w);break;case"color":a.color=w;break;case"rotate":typeof w=="string"?i[b]=rWe(w):typeof w=="number"&&(i[b]=w);break;case"ariaHidden":case"aria-hidden":w!==!0&&w!=="true"&&delete s["aria-hidden"];break;default:r[b]===void 0&&(s[b]=w)}}const l=wUe(e,i),c=l.attributes;if(i.inline&&(a.verticalAlign="-0.125em"),o==="svg"){s.style={...a,...u},Object.assign(s,c);let b=0,w=t.id;return typeof w=="string"&&(w=w.replace(/-/g,"_")),s.dangerouslySetInnerHTML={__html:lWe(EUe(l.body,w?()=>w+"ID"+b++:"iconifyReact"))},y.createElement("svg",s)}const{body:d,width:h,height:v}=e,g=o==="mask"||(o==="bg"?!1:d.indexOf("currentColor")!==-1),m=iWe(d,{...c,width:h+"",height:v+""});return s.style={...a,"--svg":uWe(m),width:iI(c.width),height:iI(c.height),...fWe,...g?G6:nG,...u},y.createElement("span",s)};VK(!0);AUe("",$Ue);if(typeof document<"u"&&typeof window<"u"){eG();const e=window;if(e.IconifyPreload!==void 0){const t=e.IconifyPreload,n="Invalid IconifyPreload syntax.";typeof t=="object"&&t!==null&&(t instanceof Array?t:[t]).forEach(r=>{try{(typeof r!="object"||r===null||r instanceof Array||typeof r.icons!="object"||typeof r.prefix!="string"||!pUe(r))&&console.error(n)}catch{console.error(n)}})}if(e.IconifyProviders!==void 0){const t=e.IconifyProviders;if(typeof t=="object"&&t!==null)for(let n in t){const r="IconifyProviders["+n+"] is invalid.";try{const i=t[n];if(typeof i!="object"||!i||i.resources===void 0)continue;PUe(n,i)||console.error(r)}catch{console.error(r)}}}}function rG(e){const[t,n]=y.useState(!!e.ssr),[r,i]=y.useState({});function o(v){if(v){const g=e.icon;if(typeof g=="object")return{name:"",data:g};const m=G$(g);if(m)return{name:g,data:m}}return{name:""}}const[a,u]=y.useState(o(!!e.ssr));function s(){const v=r.callback;v&&(v(),i({}))}function l(v){if(JSON.stringify(a)!==JSON.stringify(v))return s(),u(v),!0}function c(){var v;const g=e.icon;if(typeof g=="object"){l({name:"",data:g});return}const m=G$(g);if(l({name:g,data:m}))if(m===void 0){const b=JUe([g],c);i({callback:b})}else m&&((v=e.onLoad)===null||v===void 0||v.call(e,g))}y.useEffect(()=>(n(!0),s),[]),y.useEffect(()=>{t&&c()},[e.icon,t]);const{name:d,data:h}=a;return h?hWe({...jO,...h},e,d):e.children?e.children:y.createElement("span",{})}const vZe=y.forwardRef((e,t)=>rG({...e,_ref:t}));y.forwardRef((e,t)=>rG({inline:!0,...e,_ref:t}));var iG="AlertDialog",[pWe,gZe]=mi(iG,[rB]),ks=rB(),oG=e=>{const{__scopeAlertDialog:t,...n}=e,r=ks(t);return I.jsx(spe,{...r,...n,modal:!0})};oG.displayName=iG;var vWe="AlertDialogTrigger",aG=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=ks(n);return I.jsx(lpe,{...i,...r,ref:t})});aG.displayName=vWe;var gWe="AlertDialogPortal",uG=e=>{const{__scopeAlertDialog:t,...n}=e,r=ks(t);return I.jsx(cpe,{...r,...n})};uG.displayName=gWe;var mWe="AlertDialogOverlay",sG=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=ks(n);return I.jsx(fpe,{...i,...r,ref:t})});sG.displayName=mWe;var Td="AlertDialogContent",[yWe,bWe]=pWe(Td),lG=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:r,...i}=e,o=ks(n),a=y.useRef(null),u=Kt(t,a),s=y.useRef(null);return I.jsx(ipe,{contentName:Td,titleName:cG,docsSlug:"alert-dialog",children:I.jsx(yWe,{scope:n,cancelRef:s,children:I.jsxs(dpe,{role:"alertdialog",...o,...i,ref:u,onOpenAutoFocus:Ye(i.onOpenAutoFocus,l=>{l.preventDefault(),s.current?.focus({preventScroll:!0})}),onPointerDownOutside:l=>l.preventDefault(),onInteractOutside:l=>l.preventDefault(),children:[I.jsx(nA,{children:r}),I.jsx(wWe,{contentRef:a})]})})})});lG.displayName=Td;var cG="AlertDialogTitle",fG=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=ks(n);return I.jsx(hpe,{...i,...r,ref:t})});fG.displayName=cG;var dG="AlertDialogDescription",hG=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=ks(n);return I.jsx(ppe,{...i,...r,ref:t})});hG.displayName=dG;var xWe="AlertDialogAction",pG=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=ks(n);return I.jsx(bB,{...i,...r,ref:t})});pG.displayName=xWe;var vG="AlertDialogCancel",gG=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,{cancelRef:i}=bWe(vG,n),o=ks(n),a=Kt(t,i);return I.jsx(bB,{...o,...r,ref:a})});gG.displayName=vG;var wWe=({contentRef:e})=>{const t=`\`${Td}\` requires a description for the component to be accessible for screen reader users. -You can add a description to the \`${rd}\` by passing a \`${TG}\` component as a child, which also benefits sighted users by adding visible context to the dialog. +You can add a description to the \`${Td}\` by passing a \`${dG}\` component as a child, which also benefits sighted users by adding visible context to the dialog. -Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${rd}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component. +Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${Td}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component. -For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return b.useEffect(()=>{document.getElementById(e.current?.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},UKe=SG,WKe=CG,VKe=EG,HKe=AG,qKe=OG,GKe=RG,KKe=$G,YKe=kG,ZKe=MG,Zv,tUe=new Uint8Array(16);function nUe(){if(!Zv&&(Zv=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!Zv))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Zv(tUe)}const rUe=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function iUe(e){return typeof e=="string"&&rUe.test(e)}var wr=[];for(var GS=0;GS<256;++GS)wr.push((GS+256).toString(16).substr(1));function oUe(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=(wr[e[t+0]]+wr[e[t+1]]+wr[e[t+2]]+wr[e[t+3]]+"-"+wr[e[t+4]]+wr[e[t+5]]+"-"+wr[e[t+6]]+wr[e[t+7]]+"-"+wr[e[t+8]]+wr[e[t+9]]+"-"+wr[e[t+10]]+wr[e[t+11]]+wr[e[t+12]]+wr[e[t+13]]+wr[e[t+14]]+wr[e[t+15]]).toLowerCase();if(!iUe(n))throw TypeError("Stringified UUID is invalid");return n}function IG(e,t,n){e=e||{};var r=e.random||(e.rng||nUe)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,oUe(r)}function Vn(e){return b.createElement("i",{className:"rmel-iconfont rmel-icon-"+e.type})}function aUe(e){return b.createElement("div",{className:"rc-md-navigation "+(e.visible?"visible":"in-visible")},b.createElement("div",{className:"navigation-nav left"},b.createElement("div",{className:"button-wrap"},e.left)),b.createElement("div",{className:"navigation-nav right"},b.createElement("div",{className:"button-wrap"},e.right)))}function uUe(e){return b.createElement("div",{className:"tool-bar",style:e.style},e.children)}var NG=function(e){nn(t,e);function t(){for(var n,r=arguments.length,i=new Array(r),o=0;o"u")){var r="enUS";if(navigator.language){var i=navigator.language.split("-");r=i[0],i.length!==1&&(r+=i[i.length-1].toUpperCase())}if(navigator.browserLanguage){var o=navigator.browserLanguage.split("-");r=o[0],o[1]&&(r+=o[1].toUpperCase())}this.current!==r&&this.isAvailable(r)&&(this.current=r,Ms.emit(Ms.EVENT_LANG_CHANGE,this,r,this.langs[r]))}},t.isAvailable=function(r){return typeof this.langs[r]<"u"},t.add=function(r,i){this.langs[r]=i},t.setCurrent=function(r){if(!this.isAvailable(r))throw new Error("Language "+r+" is not exists");this.current!==r&&(this.current=r,Ms.emit(Ms.EVENT_LANG_CHANGE,this,r,this.langs[r]))},t.get=function(r,i){var o=this.langs[this.current][r]||"";return i&&Object.keys(i).forEach(function(a){o=o.replace(new RegExp("\\{"+a+"\\}","g"),i[a])}),o},t.getCurrent=function(){return this.current},e}(),en=new cUe;function Sm(e){"@babel/helpers - typeof";return Sm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Sm(e)}function fUe(e,t){if(Sm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Sm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function dUe(e){var t=fUe(e,"string");return Sm(t)=="symbol"?t:t+""}function hUe(e,t){for(var n=0;n=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function gUe(e,t){if(e){if(typeof e=="string")return q7(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return q7(e,t)}}function q7(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0)for(var u=mUe(n),s;!(s=u()).done;){var l=s.value;if(typeof a[l]<"u"&&!a[l])return!1}else if(a.metaKey||a.ctrlKey||a.shiftKey||a.altKey)return!1;return a.key?a.key===i:a.keyCode===r}function KS(e,t){var n=e.split(` +For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return y.useEffect(()=>{document.getElementById(e.current?.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},mZe=oG,yZe=aG,bZe=uG,xZe=sG,wZe=lG,_Ze=pG,SZe=gG,CZe=fG,EZe=hG,my,_We=new Uint8Array(16);function SWe(){if(!my&&(my=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!my))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return my(_We)}const CWe=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function EWe(e){return typeof e=="string"&&CWe.test(e)}var ci=[];for(var u3=0;u3<256;++u3)ci.push((u3+256).toString(16).substr(1));function AWe(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=(ci[e[t+0]]+ci[e[t+1]]+ci[e[t+2]]+ci[e[t+3]]+"-"+ci[e[t+4]]+ci[e[t+5]]+"-"+ci[e[t+6]]+ci[e[t+7]]+"-"+ci[e[t+8]]+ci[e[t+9]]+"-"+ci[e[t+10]]+ci[e[t+11]]+ci[e[t+12]]+ci[e[t+13]]+ci[e[t+14]]+ci[e[t+15]]).toLowerCase();if(!EWe(n))throw TypeError("Stringified UUID is invalid");return n}function mG(e,t,n){e=e||{};var r=e.random||(e.rng||SWe)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,AWe(r)}function Pr(e){return y.createElement("i",{className:"rmel-iconfont rmel-icon-"+e.type})}function PWe(e){return y.createElement("div",{className:"rc-md-navigation "+(e.visible?"visible":"in-visible")},y.createElement("div",{className:"navigation-nav left"},y.createElement("div",{className:"button-wrap"},e.left)),y.createElement("div",{className:"navigation-nav right"},y.createElement("div",{className:"button-wrap"},e.right)))}function OWe(e){return y.createElement("div",{className:"tool-bar",style:e.style},e.children)}var yG=function(e){Fn(t,e);function t(){for(var n,r=arguments.length,i=new Array(r),o=0;o"u")){var r="enUS";if(navigator.language){var i=navigator.language.split("-");r=i[0],i.length!==1&&(r+=i[i.length-1].toUpperCase())}if(navigator.browserLanguage){var o=navigator.browserLanguage.split("-");r=o[0],o[1]&&(r+=o[1].toUpperCase())}this.current!==r&&this.isAvailable(r)&&(this.current=r,sl.emit(sl.EVENT_LANG_CHANGE,this,r,this.langs[r]))}},t.isAvailable=function(r){return typeof this.langs[r]<"u"},t.add=function(r,i){this.langs[r]=i},t.setCurrent=function(r){if(!this.isAvailable(r))throw new Error("Language "+r+" is not exists");this.current!==r&&(this.current=r,sl.emit(sl.EVENT_LANG_CHANGE,this,r,this.langs[r]))},t.get=function(r,i){var o=this.langs[this.current][r]||"";return i&&Object.keys(i).forEach(function(a){o=o.replace(new RegExp("\\{"+a+"\\}","g"),i[a])}),o},t.getCurrent=function(){return this.current},e}(),Nn=new MWe;function qv(e){"@babel/helpers - typeof";return qv=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qv(e)}function RWe(e,t){if(qv(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(qv(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function DWe(e){var t=RWe(e,"string");return qv(t)=="symbol"?t:t+""}function $We(e,t){for(var n=0;n=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function FWe(e,t){if(e){if(typeof e=="string")return oI(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return oI(e,t)}}function oI(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0)for(var u=NWe(n),s;!(s=u()).done;){var l=s.value;if(typeof a[l]<"u"&&!a[l])return!1}else if(a.metaKey||a.ctrlKey||a.shiftKey||a.altKey)return!1;return a.key?a.key===i:a.keyCode===r}function s3(e,t){var n=e.split(` `),r=e.substr(0,t).split(` -`),i=r.length,o=r[r.length-1].length,a=n[r.length-1],u=r.length>1?r[r.length-2]:null,s=n.length>r.length?n[r.length]:null;return{line:i,col:o,beforeText:e.substr(0,t),afterText:e.substr(t),curLine:a,prevLine:u,nextLine:s}}var Sf={bold:["**","**"],italic:["*","*"],underline:["++","++"],strikethrough:["~~","~~"],quote:[` +`),i=r.length,o=r[r.length-1].length,a=n[r.length-1],u=r.length>1?r[r.length-2]:null,s=n.length>r.length?n[r.length]:null;return{line:i,col:o,beforeText:e.substr(0,t),afterText:e.substr(t),curLine:a,prevLine:u,nextLine:s}}var Yf={bold:["**","**"],italic:["*","*"],underline:["++","++"],strikethrough:["~~","~~"],quote:[` > `,` -`],inlinecode:["`","`"],code:["\n```\n","\n```\n"]};for(var Xv=1;Xv<=6;Xv++)Sf["h"+Xv]=[` -`+vUe("#",Xv)+" ",` -`];function bUe(e){for(var t=e.row,n=t===void 0?2:t,r=e.col,i=r===void 0?2:r,o=["|"],a=["|"],u=["|"],s="",l=1;l<=i;l++)o.push(" Head |"),u.push(" --- |"),a.push(" Data |");for(var c=1;c<=n;c++)s+=` +`],inlinecode:["`","`"],code:["\n```\n","\n```\n"]};for(var yy=1;yy<=6;yy++)Yf["h"+yy]=[` +`+LWe("#",yy)+" ",` +`];function BWe(e){for(var t=e.row,n=t===void 0?2:t,r=e.col,i=r===void 0?2:r,o=["|"],a=["|"],u=["|"],s="",l=1;l<=i;l++)o.push(" Head |"),u.push(" --- |"),a.push(" Data |");for(var c=1;c<=n;c++)s+=` `+a.join("");return o.join("")+` -`+u.join("")+s}function G7(e,t){var n=t;if(n.substr(0,1)!==` +`+u.join("")+s}function aI(e,t){var n=t;if(n.substr(0,1)!==` `&&(n=` `+n),e==="unordered")return n.length>1?n.replace(/\n/g,` * `).trim():"* ";var r=1;return n.length>1?n.replace(/\n/g,function(){return` -`+r+++". "}).trim():"1. "}function YS(e,t){return{text:e,newBlock:t,selection:{start:e.length,end:e.length}}}function N6(e,t,n){if(typeof Sf[t]<"u")return{text:""+Sf[t][0]+e+Sf[t][1],selection:{start:Sf[t][0].length,end:Sf[t][0].length+e.length}};switch(t){case"tab":var r=n.tabMapValue===1?" ":" ".repeat(n.tabMapValue),i=r+e.replace(/\n/g,` +`+r+++". "}).trim():"1. "}function l3(e,t){return{text:e,newBlock:t,selection:{start:e.length,end:e.length}}}function Z6(e,t,n){if(typeof Yf[t]<"u")return{text:""+Yf[t][0]+e+Yf[t][1],selection:{start:Yf[t][0].length,end:Yf[t][0].length+e.length}};switch(t){case"tab":var r=n.tabMapValue===1?" ":" ".repeat(n.tabMapValue),i=r+e.replace(/\n/g,` `+r),o=e.includes(` -`)?e.match(/\n/g).length:0;return{text:i,selection:{start:n.tabMapValue,end:n.tabMapValue*(o+1)+e.length}};case"unordered":return YS(G7("unordered",e),!0);case"order":return YS(G7("order",e),!0);case"hr":return YS("---",!0);case"table":return{text:bUe(n),newBlock:!0};case"image":return{text:"!["+(e||n.target)+"]("+(n.imageUrl||"")+")",selection:{start:2,end:e.length+2}};case"link":return{text:"["+e+"]("+(n.linkUrl||"")+")",selection:{start:1,end:e.length+1}}}return{text:e,selection:{start:0,end:e.length}}}function LG(e,t){var n={};return Object.keys(e).forEach(function(r){if(typeof t[r]>"u"){n[r]=e[r];return}if(typeof t[r]=="object"){Array.isArray(t[r])?n[r]=[].concat(t[r]):n[r]=LG(e[r],t[r]);return}n[r]=t[r]}),n}function wUe(e){for(var t=kn({},e),n=arguments.length,r=new Array(n>1?n-1:0),i=1;i=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function SUe(e,t){if(e){if(typeof e=="string")return Y7(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Y7(e,t)}}function Y7(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n"u"&&(c[d.comp.align]=[]);var h=d.comp.pluginName==="divider"?IG():d.comp.pluginName;c[d.comp.align].push(b.createElement(d.comp,{editor:i,editorConfig:i.config,config:kn({},d.comp.defaultConfig||{},d.config||{}),key:h}))}),c},n.handleSyncScroll=function(i,o){var a=this;if(i===this.shouldSyncScroll){this.props.onScroll&&this.props.onScroll(o,i),this.emitter.emit(this.emitter.EVENT_SCROLL,o,i);var u=this.config.syncScrollMode,s=u===void 0?[]:u;s.includes(i==="md"?"rightFollowLeft":"leftFollowRight")&&(this.hasContentChanged&&this.nodeMdText.current&&this.nodeMdPreviewWrapper.current&&(this.scrollScale=this.nodeMdText.current.scrollHeight/this.nodeMdPreviewWrapper.current.scrollHeight,this.hasContentChanged=!1),this.isSyncingScroll||(this.isSyncingScroll=!0,requestAnimationFrame(function(){a.nodeMdText.current&&a.nodeMdPreviewWrapper.current&&(i==="md"?a.nodeMdPreviewWrapper.current.scrollTop=a.nodeMdText.current.scrollTop/a.scrollScale:a.nodeMdText.current.scrollTop=a.nodeMdPreviewWrapper.current.scrollTop*a.scrollScale),a.isSyncingScroll=!1})))}},n.renderHTML=function(i){var o=this;if(!this.props.renderHTML)return console.error("renderHTML props is required!"),Promise.resolve();var a=this.props.renderHTML(i);return S4(a)?a.then(function(u){return o.setHtml(u)}):typeof a=="function"?this.setHtml(a()):this.setHtml(a)},n.setHtml=function(i){var o=this;return new Promise(function(a){o.setState({html:i},a)})},n.handleToggleMenu=function(){this.setView({menu:!this.state.view.menu})},n.handleFocus=function(i){var o=this.props.onFocus;o&&o(i),this.emitter.emit(this.emitter.EVENT_FOCUS,i)},n.handleBlur=function(i){var o=this.props.onBlur;o&&o(i),this.emitter.emit(this.emitter.EVENT_BLUR,i)},n.handleChange=function(i){i.persist();var o=i.target.value;this.setText(o,i)},n.handlePaste=function(i){if(!(!this.config.allowPasteImage||!this.config.onImageUpload)){var o=i.nativeEvent,a=(o.clipboardData||window.clipboardData).items;a&&(i.preventDefault(),this.uploadWithDataTransfer(a))}},n.handleDrop=function(i){if(this.config.onImageUpload){var o=i.nativeEvent;if(o.dataTransfer){var a=o.dataTransfer.items;a&&(i.preventDefault(),this.uploadWithDataTransfer(a))}}},n.handleEditorKeyDown=function(i){var o=this,a=i.keyCode,u=i.key,s=i.currentTarget;if((a===13||u==="Enter")&&this.composing===!1){var l=s.value,c=s.selectionStart,d=KS(l,c),h=function(){var w=s.value.substr(0,c-d.curLine.length)+s.value.substr(c);o.setText(w,void 0,{start:c-d.curLine.length,end:c-d.curLine.length}),i.preventDefault()},m=function(w){o.insertText(` -`+w,!1,{start:w.length+1,end:w.length+1}),i.preventDefault()},g=d.curLine.match(/^(\s*?)\* /);if(g){if(/^(\s*?)\* $/.test(d.curLine)){h();return}m(g[0]);return}var v=d.curLine.match(/^(\s*?)(\d+)\. /);if(v){if(/^(\s*?)(\d+)\. $/.test(d.curLine)){h();return}var y=""+v[1]+(parseInt(v[2],10)+1)+". ";m(y);return}}this.emitter.emit(this.emitter.EVENT_EDITOR_KEY_DOWN,i)},n.handleLocaleUpdate=function(){this.forceUpdate()},n.getMdElement=function(){return this.nodeMdText.current},n.getHtmlElement=function(){return this.nodeMdPreviewWrapper.current},n.clearSelection=function(){this.nodeMdText.current&&this.nodeMdText.current.setSelectionRange(0,0,"none")},n.getSelection=function(){var i=this.nodeMdText.current;if(!i)return kn({},pUe);var o=i.selectionStart,a=i.selectionEnd,u=(i.value||"").slice(o,a);return{start:o,end:a,text:u}},n.setSelection=function(i){this.nodeMdText.current&&(this.nodeMdText.current.setSelectionRange(i.start,i.end,"forward"),this.nodeMdText.current.focus())},n.insertMarkdown=function(i,o){o===void 0&&(o={});var a=this.getSelection(),u=o?kn({},o):{};if(i==="image"&&(u=kn({},u,{target:o.target||a.text||"",imageUrl:o.imageUrl||this.config.imageUrl})),i==="link"&&(u=kn({},u,{linkUrl:this.config.linkUrl})),i==="tab"&&a.start!==a.end){var s=this.getMdValue().slice(0,a.start).lastIndexOf(` -`)+1;this.setSelection({start:s,end:a.end})}var l=N6(a.text,i,u),c=l.text,d=l.selection;if(l.newBlock){var h=KS(this.getMdValue(),a.start),m=h.col,g=h.curLine;m>0&&g.length>0&&(c=` -`+c,d&&(d.start++,d.end++));var v=h.afterText;a.start!==a.end&&(v=KS(this.getMdValue(),a.end).afterText),v.trim()!==""&&v.substr(0,2)!==` +`)?e.match(/\n/g).length:0;return{text:i,selection:{start:n.tabMapValue,end:n.tabMapValue*(o+1)+e.length}};case"unordered":return l3(aI("unordered",e),!0);case"order":return l3(aI("order",e),!0);case"hr":return l3("---",!0);case"table":return{text:BWe(n),newBlock:!0};case"image":return{text:"!["+(e||n.target)+"]("+(n.imageUrl||"")+")",selection:{start:2,end:e.length+2}};case"link":return{text:"["+e+"]("+(n.linkUrl||"")+")",selection:{start:1,end:e.length+1}}}return{text:e,selection:{start:0,end:e.length}}}function xG(e,t){var n={};return Object.keys(e).forEach(function(r){if(typeof t[r]>"u"){n[r]=e[r];return}if(typeof t[r]=="object"){Array.isArray(t[r])?n[r]=[].concat(t[r]):n[r]=xG(e[r],t[r]);return}n[r]=t[r]}),n}function zWe(e){for(var t=fr({},e),n=arguments.length,r=new Array(n>1?n-1:0),i=1;i=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function VWe(e,t){if(e){if(typeof e=="string")return sI(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return sI(e,t)}}function sI(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n"u"&&(c[d.comp.align]=[]);var h=d.comp.pluginName==="divider"?mG():d.comp.pluginName;c[d.comp.align].push(y.createElement(d.comp,{editor:i,editorConfig:i.config,config:fr({},d.comp.defaultConfig||{},d.config||{}),key:h}))}),c},n.handleSyncScroll=function(i,o){var a=this;if(i===this.shouldSyncScroll){this.props.onScroll&&this.props.onScroll(o,i),this.emitter.emit(this.emitter.EVENT_SCROLL,o,i);var u=this.config.syncScrollMode,s=u===void 0?[]:u;s.includes(i==="md"?"rightFollowLeft":"leftFollowRight")&&(this.hasContentChanged&&this.nodeMdText.current&&this.nodeMdPreviewWrapper.current&&(this.scrollScale=this.nodeMdText.current.scrollHeight/this.nodeMdPreviewWrapper.current.scrollHeight,this.hasContentChanged=!1),this.isSyncingScroll||(this.isSyncingScroll=!0,requestAnimationFrame(function(){a.nodeMdText.current&&a.nodeMdPreviewWrapper.current&&(i==="md"?a.nodeMdPreviewWrapper.current.scrollTop=a.nodeMdText.current.scrollTop/a.scrollScale:a.nodeMdText.current.scrollTop=a.nodeMdPreviewWrapper.current.scrollTop*a.scrollScale),a.isSyncingScroll=!1})))}},n.renderHTML=function(i){var o=this;if(!this.props.renderHTML)return console.error("renderHTML props is required!"),Promise.resolve();var a=this.props.renderHTML(i);return qO(a)?a.then(function(u){return o.setHtml(u)}):typeof a=="function"?this.setHtml(a()):this.setHtml(a)},n.setHtml=function(i){var o=this;return new Promise(function(a){o.setState({html:i},a)})},n.handleToggleMenu=function(){this.setView({menu:!this.state.view.menu})},n.handleFocus=function(i){var o=this.props.onFocus;o&&o(i),this.emitter.emit(this.emitter.EVENT_FOCUS,i)},n.handleBlur=function(i){var o=this.props.onBlur;o&&o(i),this.emitter.emit(this.emitter.EVENT_BLUR,i)},n.handleChange=function(i){i.persist();var o=i.target.value;this.setText(o,i)},n.handlePaste=function(i){if(!(!this.config.allowPasteImage||!this.config.onImageUpload)){var o=i.nativeEvent,a=(o.clipboardData||window.clipboardData).items;a&&(i.preventDefault(),this.uploadWithDataTransfer(a))}},n.handleDrop=function(i){if(this.config.onImageUpload){var o=i.nativeEvent;if(o.dataTransfer){var a=o.dataTransfer.items;a&&(i.preventDefault(),this.uploadWithDataTransfer(a))}}},n.handleEditorKeyDown=function(i){var o=this,a=i.keyCode,u=i.key,s=i.currentTarget;if((a===13||u==="Enter")&&this.composing===!1){var l=s.value,c=s.selectionStart,d=s3(l,c),h=function(){var x=s.value.substr(0,c-d.curLine.length)+s.value.substr(c);o.setText(x,void 0,{start:c-d.curLine.length,end:c-d.curLine.length}),i.preventDefault()},v=function(x){o.insertText(` +`+x,!1,{start:x.length+1,end:x.length+1}),i.preventDefault()},g=d.curLine.match(/^(\s*?)\* /);if(g){if(/^(\s*?)\* $/.test(d.curLine)){h();return}v(g[0]);return}var m=d.curLine.match(/^(\s*?)(\d+)\. /);if(m){if(/^(\s*?)(\d+)\. $/.test(d.curLine)){h();return}var b=""+m[1]+(parseInt(m[2],10)+1)+". ";v(b);return}}this.emitter.emit(this.emitter.EVENT_EDITOR_KEY_DOWN,i)},n.handleLocaleUpdate=function(){this.forceUpdate()},n.getMdElement=function(){return this.nodeMdText.current},n.getHtmlElement=function(){return this.nodeMdPreviewWrapper.current},n.clearSelection=function(){this.nodeMdText.current&&this.nodeMdText.current.setSelectionRange(0,0,"none")},n.getSelection=function(){var i=this.nodeMdText.current;if(!i)return fr({},IWe);var o=i.selectionStart,a=i.selectionEnd,u=(i.value||"").slice(o,a);return{start:o,end:a,text:u}},n.setSelection=function(i){this.nodeMdText.current&&(this.nodeMdText.current.setSelectionRange(i.start,i.end,"forward"),this.nodeMdText.current.focus())},n.insertMarkdown=function(i,o){o===void 0&&(o={});var a=this.getSelection(),u=o?fr({},o):{};if(i==="image"&&(u=fr({},u,{target:o.target||a.text||"",imageUrl:o.imageUrl||this.config.imageUrl})),i==="link"&&(u=fr({},u,{linkUrl:this.config.linkUrl})),i==="tab"&&a.start!==a.end){var s=this.getMdValue().slice(0,a.start).lastIndexOf(` +`)+1;this.setSelection({start:s,end:a.end})}var l=Z6(a.text,i,u),c=l.text,d=l.selection;if(l.newBlock){var h=s3(this.getMdValue(),a.start),v=h.col,g=h.curLine;v>0&&g.length>0&&(c=` +`+c,d&&(d.start++,d.end++));var m=h.afterText;a.start!==a.end&&(m=s3(this.getMdValue(),a.end).afterText),m.trim()!==""&&m.substr(0,2)!==` -`&&(v.substr(0,1)!==` +`&&(m.substr(0,1)!==` `&&(c+=` `),c+=` `)}this.insertText(c,!0,d)},n.insertPlaceholder=function(i,o){var a=this;this.insertText(i,!0),o.then(function(u){var s=a.getMdValue().replace(i,u);a.setText(s)})},n.insertText=function(i,o,a){i===void 0&&(i=""),o===void 0&&(o=!1);var u=this.state.text,s=this.getSelection(),l=u.slice(0,s.start),c=u.slice(o?s.end:s.start,u.length);this.setText(l+i+c,void 0,a?{start:a.start+l.length,end:a.end+l.length}:{start:s.start,end:s.start})},n.setText=function(i,o,a){var u=this;i===void 0&&(i="");var s=this.config.onChangeTrigger,l=s===void 0?"both":s,c=i.replace(/↵/g,` -`);if(this.state.text!==i){this.setState({text:c}),this.props.onChange&&(l==="both"||l==="beforeRender")&&this.props.onChange({text:c,html:this.getHtmlValue()},o),this.emitter.emit(this.emitter.EVENT_CHANGE,i,o,typeof o>"u"),a&&setTimeout(function(){return u.setSelection(a)}),this.hasContentChanged||(this.hasContentChanged=!0);var d=this.renderHTML(c);(l==="both"||l==="afterRender")&&d.then(function(){u.props.onChange&&u.props.onChange({text:u.state.text,html:u.getHtmlValue()},o)})}},n.getMdValue=function(){return this.state.text},n.getHtmlValue=function(){return typeof this.state.html=="string"?this.state.html:this.nodeMdPreview.current?this.nodeMdPreview.current.getHtml():""},n.onKeyboard=function(i){var o=this;if(Array.isArray(i)){i.forEach(function(a){return o.onKeyboard(a)});return}this.keyboardListeners.includes(i)||this.keyboardListeners.push(i)},n.offKeyboard=function(i){var o=this;if(Array.isArray(i)){i.forEach(function(u){return o.offKeyboard(u)});return}var a=this.keyboardListeners.indexOf(i);a>=0&&this.keyboardListeners.splice(a,1)},n.handleKeyDown=function(i){for(var o=ZS(this.keyboardListeners),a;!(a=o()).done;){var u=a.value;if(yUe(i,u)){i.preventDefault(),u.callback(i);return}}this.emitter.emit(this.emitter.EVENT_KEY_DOWN,i)},n.getEventType=function(i){switch(i){case"change":return this.emitter.EVENT_CHANGE;case"fullscreen":return this.emitter.EVENT_FULL_SCREEN;case"viewchange":return this.emitter.EVENT_VIEW_CHANGE;case"keydown":return this.emitter.EVENT_KEY_DOWN;case"editor_keydown":return this.emitter.EVENT_EDITOR_KEY_DOWN;case"blur":return this.emitter.EVENT_BLUR;case"focus":return this.emitter.EVENT_FOCUS;case"scroll":return this.emitter.EVENT_SCROLL}},n.on=function(i,o){var a=this.getEventType(i);a&&this.emitter.on(a,o)},n.off=function(i,o){var a=this.getEventType(i);a&&this.emitter.off(a,o)},n.setView=function(i){var o=this,a=kn({},this.state.view,i);this.setState({view:a},function(){o.emitter.emit(o.emitter.EVENT_VIEW_CHANGE,a)})},n.getView=function(){return kn({},this.state.view)},n.fullScreen=function(i){var o=this;this.state.fullScreen!==i&&this.setState({fullScreen:i},function(){o.emitter.emit(o.emitter.EVENT_FULL_SCREEN,i)})},n.registerPluginApi=function(i,o){this.pluginApis.set(i,o)},n.unregisterPluginApi=function(i){this.pluginApis.delete(i)},n.callPluginApi=function(i){var o=this.pluginApis.get(i);if(!o)throw new Error("API "+i+" not found");for(var a=arguments.length,u=new Array(a>1?a-1:0),s=1;s0&&i.onImageChanged(u.target.files[0])}}))},t}(Nn);XG.pluginName="image";var QG=function(e){nn(t,e);function t(r){var i;return i=e.call(this,r)||this,i.handleKeyboard={key:"k",keyCode:75,aliasCommand:!0,withKey:["ctrlKey"],callback:function(){return i.editor.insertMarkdown("link")}},i}var n=t.prototype;return n.componentDidMount=function(){this.editorConfig.shortcuts&&this.editor.onKeyboard(this.handleKeyboard)},n.componentWillUnmount=function(){this.editor.offKeyboard(this.handleKeyboard)},n.render=function(){var i=this;return b.createElement("span",{className:"button button-type-link",title:en.get("btnLink"),onClick:function(){return i.editor.insertMarkdown("link")}},b.createElement(Vn,{type:"link"}))},t}(Nn);QG.pluginName="link";var JG=function(e){nn(t,e);function t(r){var i;return i=e.call(this,r)||this,i.handleKeyboard={key:"7",keyCode:55,withKey:["ctrlKey","shiftKey"],aliasCommand:!0,callback:function(){return i.editor.insertMarkdown("order")}},i}var n=t.prototype;return n.componentDidMount=function(){this.editorConfig.shortcuts&&this.editor.onKeyboard(this.handleKeyboard)},n.componentWillUnmount=function(){this.editor.offKeyboard(this.handleKeyboard)},n.render=function(){var i=this;return b.createElement("span",{className:"button button-type-ordered",title:en.get("btnOrdered"),onClick:function(){return i.editor.insertMarkdown("order")}},b.createElement(Vn,{type:"list-ordered"}))},t}(Nn);JG.pluginName="list-ordered";var eK=function(e){nn(t,e);function t(r){var i;return i=e.call(this,r)||this,i.handleKeyboard={key:"8",keyCode:56,withKey:["ctrlKey","shiftKey"],aliasCommand:!0,callback:function(){return i.editor.insertMarkdown("unordered")}},i}var n=t.prototype;return n.componentDidMount=function(){this.editorConfig.shortcuts&&this.editor.onKeyboard(this.handleKeyboard)},n.componentWillUnmount=function(){this.editor.offKeyboard(this.handleKeyboard)},n.render=function(){var i=this;return b.createElement("span",{className:"button button-type-unordered",title:en.get("btnUnordered"),onClick:function(){return i.editor.insertMarkdown("unordered")}},b.createElement(Vn,{type:"list-unordered"}))},t}(Nn);eK.pluginName="list-unordered";var AUe=100,OUe=function(){function e(n){n===void 0&&(n={}),this.record=[],this.recycle=[],this.initValue="";var r=n,i=r.maxSize,o=i===void 0?AUe:i;this.maxSize=o}var t=e.prototype;return t.push=function(r){for(var i=this.record.push(r);this.record.length>this.maxSize;)this.record.shift();return i},t.get=function(){return this.record},t.getLast=function(){var r=this.record.length;return this.record[r-1]},t.undo=function(r){var i=this.record.pop();if(typeof i>"u")return this.initValue;if(i!==r)return this.recycle.push(i),i;var o=this.record.pop();return typeof o>"u"?(this.recycle.push(i),this.initValue):(this.recycle.push(i),o)},t.redo=function(){var r=this.recycle.pop();if(typeof r<"u")return this.push(r),r},t.cleanRedo=function(){this.recycle=[]},t.getUndoCount=function(){return this.undo.length},t.getRedoCount=function(){return this.recycle.length},e}(),tK=function(e){nn(t,e);function t(r){var i;return i=e.call(this,r)||this,i.handleKeyboards=[],i.lastPop=null,i.handleChange=i.handleChange.bind(an(i)),i.handleRedo=i.handleRedo.bind(an(i)),i.handleUndo=i.handleUndo.bind(an(i)),i.handleKeyboards=[{key:"y",keyCode:89,withKey:["ctrlKey"],callback:i.handleRedo},{key:"z",keyCode:90,withKey:["metaKey","shiftKey"],callback:i.handleRedo},{key:"z",keyCode:90,aliasCommand:!0,withKey:["ctrlKey"],callback:i.handleUndo}],i.logger=new OUe({maxSize:i.editorConfig.loggerMaxSize}),i.editor.registerPluginApi("undo",i.handleUndo),i.editor.registerPluginApi("redo",i.handleRedo),i}var n=t.prototype;return n.handleUndo=function(){var i=this.logger.undo(this.editor.getMdValue());typeof i<"u"&&(this.pause(),this.lastPop=i,this.editor.setText(i),this.forceUpdate())},n.handleRedo=function(){var i=this.logger.redo();typeof i<"u"&&(this.lastPop=i,this.editor.setText(i),this.forceUpdate())},n.handleChange=function(i,o,a){var u=this;if(!(this.logger.getLast()===i||this.lastPop!==null&&this.lastPop===i)){if(this.logger.cleanRedo(),a){this.logger.push(i),this.lastPop=null,this.forceUpdate();return}this.timerId&&(window.clearTimeout(this.timerId),this.timerId=0),this.timerId=window.setTimeout(function(){u.logger.getLast()!==i&&(u.logger.push(i),u.lastPop=null,u.forceUpdate()),window.clearTimeout(u.timerId),u.timerId=0},this.editorConfig.loggerInterval)}},n.componentDidMount=function(){var i=this;this.editor.on("change",this.handleChange),this.handleKeyboards.forEach(function(o){return i.editor.onKeyboard(o)}),this.logger.initValue=this.editor.getMdValue(),this.forceUpdate()},n.componentWillUnmount=function(){var i=this;this.timerId&&window.clearTimeout(this.timerId),this.editor.off("change",this.handleChange),this.editor.unregisterPluginApi("undo"),this.editor.unregisterPluginApi("redo"),this.handleKeyboards.forEach(function(o){return i.editor.offKeyboard(o)})},n.pause=function(){this.timerId&&(window.clearTimeout(this.timerId),this.timerId=void 0)},n.render=function(){var i=this.logger.getUndoCount()>1||this.logger.initValue!==this.editor.getMdValue(),o=this.logger.getRedoCount()>0;return b.createElement(b.Fragment,null,b.createElement("span",{className:"button button-type-undo "+(i?"":"disabled"),title:en.get("btnUndo"),onClick:this.handleUndo},b.createElement(Vn,{type:"undo"})),b.createElement("span",{className:"button button-type-redo "+(o?"":"disabled"),title:en.get("btnRedo"),onClick:this.handleRedo},b.createElement(Vn,{type:"redo"})))},t}(Nn);tK.pluginName="logger";var $r;(function(e){e[e.SHOW_ALL=0]="SHOW_ALL",e[e.SHOW_MD=1]="SHOW_MD",e[e.SHOW_HTML=2]="SHOW_HTML"})($r||($r={}));var E4=function(e){nn(t,e);function t(r){var i;return i=e.call(this,r)||this,i.handleClick=i.handleClick.bind(an(i)),i.handleChange=i.handleChange.bind(an(i)),i.state={view:i.editor.getView()},i}var n=t.prototype;return n.handleClick=function(){switch(this.next){case $r.SHOW_ALL:this.editor.setView({html:!0,md:!0});break;case $r.SHOW_HTML:this.editor.setView({html:!0,md:!1});break;case $r.SHOW_MD:this.editor.setView({html:!1,md:!0});break}},n.handleChange=function(i){this.setState({view:i})},n.componentDidMount=function(){this.editor.on("viewchange",this.handleChange)},n.componentWillUnmount=function(){this.editor.off("viewchange",this.handleChange)},n.getDisplayInfo=function(){var i=this.next;switch(i){case $r.SHOW_ALL:return{icon:"view-split",title:"All"};case $r.SHOW_HTML:return{icon:"visibility",title:"Preview"};default:return{icon:"keyboard",title:"Editor"}}},n.render=function(){if(this.isDisplay){var i=this.getDisplayInfo();return b.createElement("span",{className:"button button-type-mode",title:en.get("btnMode"+i.title),onClick:this.handleClick},b.createElement(Vn,{type:i.icon}))}return null},FG(t,[{key:"isDisplay",get:function(){var i=this.editorConfig.canView;return i?[i.html,i.md,i.both].filter(function(o){return o}).length>=2:!1}},{key:"next",get:function(){var i=this.editorConfig.canView,o=this.state.view,a=[$r.SHOW_ALL,$r.SHOW_MD,$r.SHOW_HTML];i&&(i.both||a.splice(a.indexOf($r.SHOW_ALL),1),i.md||a.splice(a.indexOf($r.SHOW_MD),1),i.html||a.splice(a.indexOf($r.SHOW_HTML),1));var u=$r.SHOW_MD;if(o.html&&(u=$r.SHOW_HTML),o.html&&o.md&&(u=$r.SHOW_ALL),a.length===0)return u;if(a.length===1)return a[0];var s=a.indexOf(u);return s"u"),a&&setTimeout(function(){return u.setSelection(a)}),this.hasContentChanged||(this.hasContentChanged=!0);var d=this.renderHTML(c);(l==="both"||l==="afterRender")&&d.then(function(){u.props.onChange&&u.props.onChange({text:u.state.text,html:u.getHtmlValue()},o)})}},n.getMdValue=function(){return this.state.text},n.getHtmlValue=function(){return typeof this.state.html=="string"?this.state.html:this.nodeMdPreview.current?this.nodeMdPreview.current.getHtml():""},n.onKeyboard=function(i){var o=this;if(Array.isArray(i)){i.forEach(function(a){return o.onKeyboard(a)});return}this.keyboardListeners.includes(i)||this.keyboardListeners.push(i)},n.offKeyboard=function(i){var o=this;if(Array.isArray(i)){i.forEach(function(u){return o.offKeyboard(u)});return}var a=this.keyboardListeners.indexOf(i);a>=0&&this.keyboardListeners.splice(a,1)},n.handleKeyDown=function(i){for(var o=c3(this.keyboardListeners),a;!(a=o()).done;){var u=a.value;if(jWe(i,u)){i.preventDefault(),u.callback(i);return}}this.emitter.emit(this.emitter.EVENT_KEY_DOWN,i)},n.getEventType=function(i){switch(i){case"change":return this.emitter.EVENT_CHANGE;case"fullscreen":return this.emitter.EVENT_FULL_SCREEN;case"viewchange":return this.emitter.EVENT_VIEW_CHANGE;case"keydown":return this.emitter.EVENT_KEY_DOWN;case"editor_keydown":return this.emitter.EVENT_EDITOR_KEY_DOWN;case"blur":return this.emitter.EVENT_BLUR;case"focus":return this.emitter.EVENT_FOCUS;case"scroll":return this.emitter.EVENT_SCROLL}},n.on=function(i,o){var a=this.getEventType(i);a&&this.emitter.on(a,o)},n.off=function(i,o){var a=this.getEventType(i);a&&this.emitter.off(a,o)},n.setView=function(i){var o=this,a=fr({},this.state.view,i);this.setState({view:a},function(){o.emitter.emit(o.emitter.EVENT_VIEW_CHANGE,a)})},n.getView=function(){return fr({},this.state.view)},n.fullScreen=function(i){var o=this;this.state.fullScreen!==i&&this.setState({fullScreen:i},function(){o.emitter.emit(o.emitter.EVENT_FULL_SCREEN,i)})},n.registerPluginApi=function(i,o){this.pluginApis.set(i,o)},n.unregisterPluginApi=function(i){this.pluginApis.delete(i)},n.callPluginApi=function(i){var o=this.pluginApis.get(i);if(!o)throw new Error("API "+i+" not found");for(var a=arguments.length,u=new Array(a>1?a-1:0),s=1;s0&&i.onImageChanged(u.target.files[0])}}))},t}(mr);DG.pluginName="image";var $G=function(e){Fn(t,e);function t(r){var i;return i=e.call(this,r)||this,i.handleKeyboard={key:"k",keyCode:75,aliasCommand:!0,withKey:["ctrlKey"],callback:function(){return i.editor.insertMarkdown("link")}},i}var n=t.prototype;return n.componentDidMount=function(){this.editorConfig.shortcuts&&this.editor.onKeyboard(this.handleKeyboard)},n.componentWillUnmount=function(){this.editor.offKeyboard(this.handleKeyboard)},n.render=function(){var i=this;return y.createElement("span",{className:"button button-type-link",title:Nn.get("btnLink"),onClick:function(){return i.editor.insertMarkdown("link")}},y.createElement(Pr,{type:"link"}))},t}(mr);$G.pluginName="link";var IG=function(e){Fn(t,e);function t(r){var i;return i=e.call(this,r)||this,i.handleKeyboard={key:"7",keyCode:55,withKey:["ctrlKey","shiftKey"],aliasCommand:!0,callback:function(){return i.editor.insertMarkdown("order")}},i}var n=t.prototype;return n.componentDidMount=function(){this.editorConfig.shortcuts&&this.editor.onKeyboard(this.handleKeyboard)},n.componentWillUnmount=function(){this.editor.offKeyboard(this.handleKeyboard)},n.render=function(){var i=this;return y.createElement("span",{className:"button button-type-ordered",title:Nn.get("btnOrdered"),onClick:function(){return i.editor.insertMarkdown("order")}},y.createElement(Pr,{type:"list-ordered"}))},t}(mr);IG.pluginName="list-ordered";var NG=function(e){Fn(t,e);function t(r){var i;return i=e.call(this,r)||this,i.handleKeyboard={key:"8",keyCode:56,withKey:["ctrlKey","shiftKey"],aliasCommand:!0,callback:function(){return i.editor.insertMarkdown("unordered")}},i}var n=t.prototype;return n.componentDidMount=function(){this.editorConfig.shortcuts&&this.editor.onKeyboard(this.handleKeyboard)},n.componentWillUnmount=function(){this.editor.offKeyboard(this.handleKeyboard)},n.render=function(){var i=this;return y.createElement("span",{className:"button button-type-unordered",title:Nn.get("btnUnordered"),onClick:function(){return i.editor.insertMarkdown("unordered")}},y.createElement(Pr,{type:"list-unordered"}))},t}(mr);NG.pluginName="list-unordered";var KWe=100,GWe=function(){function e(n){n===void 0&&(n={}),this.record=[],this.recycle=[],this.initValue="";var r=n,i=r.maxSize,o=i===void 0?KWe:i;this.maxSize=o}var t=e.prototype;return t.push=function(r){for(var i=this.record.push(r);this.record.length>this.maxSize;)this.record.shift();return i},t.get=function(){return this.record},t.getLast=function(){var r=this.record.length;return this.record[r-1]},t.undo=function(r){var i=this.record.pop();if(typeof i>"u")return this.initValue;if(i!==r)return this.recycle.push(i),i;var o=this.record.pop();return typeof o>"u"?(this.recycle.push(i),this.initValue):(this.recycle.push(i),o)},t.redo=function(){var r=this.recycle.pop();if(typeof r<"u")return this.push(r),r},t.cleanRedo=function(){this.recycle=[]},t.getUndoCount=function(){return this.undo.length},t.getRedoCount=function(){return this.recycle.length},e}(),FG=function(e){Fn(t,e);function t(r){var i;return i=e.call(this,r)||this,i.handleKeyboards=[],i.lastPop=null,i.handleChange=i.handleChange.bind(jn(i)),i.handleRedo=i.handleRedo.bind(jn(i)),i.handleUndo=i.handleUndo.bind(jn(i)),i.handleKeyboards=[{key:"y",keyCode:89,withKey:["ctrlKey"],callback:i.handleRedo},{key:"z",keyCode:90,withKey:["metaKey","shiftKey"],callback:i.handleRedo},{key:"z",keyCode:90,aliasCommand:!0,withKey:["ctrlKey"],callback:i.handleUndo}],i.logger=new GWe({maxSize:i.editorConfig.loggerMaxSize}),i.editor.registerPluginApi("undo",i.handleUndo),i.editor.registerPluginApi("redo",i.handleRedo),i}var n=t.prototype;return n.handleUndo=function(){var i=this.logger.undo(this.editor.getMdValue());typeof i<"u"&&(this.pause(),this.lastPop=i,this.editor.setText(i),this.forceUpdate())},n.handleRedo=function(){var i=this.logger.redo();typeof i<"u"&&(this.lastPop=i,this.editor.setText(i),this.forceUpdate())},n.handleChange=function(i,o,a){var u=this;if(!(this.logger.getLast()===i||this.lastPop!==null&&this.lastPop===i)){if(this.logger.cleanRedo(),a){this.logger.push(i),this.lastPop=null,this.forceUpdate();return}this.timerId&&(window.clearTimeout(this.timerId),this.timerId=0),this.timerId=window.setTimeout(function(){u.logger.getLast()!==i&&(u.logger.push(i),u.lastPop=null,u.forceUpdate()),window.clearTimeout(u.timerId),u.timerId=0},this.editorConfig.loggerInterval)}},n.componentDidMount=function(){var i=this;this.editor.on("change",this.handleChange),this.handleKeyboards.forEach(function(o){return i.editor.onKeyboard(o)}),this.logger.initValue=this.editor.getMdValue(),this.forceUpdate()},n.componentWillUnmount=function(){var i=this;this.timerId&&window.clearTimeout(this.timerId),this.editor.off("change",this.handleChange),this.editor.unregisterPluginApi("undo"),this.editor.unregisterPluginApi("redo"),this.handleKeyboards.forEach(function(o){return i.editor.offKeyboard(o)})},n.pause=function(){this.timerId&&(window.clearTimeout(this.timerId),this.timerId=void 0)},n.render=function(){var i=this.logger.getUndoCount()>1||this.logger.initValue!==this.editor.getMdValue(),o=this.logger.getRedoCount()>0;return y.createElement(y.Fragment,null,y.createElement("span",{className:"button button-type-undo "+(i?"":"disabled"),title:Nn.get("btnUndo"),onClick:this.handleUndo},y.createElement(Pr,{type:"undo"})),y.createElement("span",{className:"button button-type-redo "+(o?"":"disabled"),title:Nn.get("btnRedo"),onClick:this.handleRedo},y.createElement(Pr,{type:"redo"})))},t}(mr);FG.pluginName="logger";var Ai;(function(e){e[e.SHOW_ALL=0]="SHOW_ALL",e[e.SHOW_MD=1]="SHOW_MD",e[e.SHOW_HTML=2]="SHOW_HTML"})(Ai||(Ai={}));var GO=function(e){Fn(t,e);function t(r){var i;return i=e.call(this,r)||this,i.handleClick=i.handleClick.bind(jn(i)),i.handleChange=i.handleChange.bind(jn(i)),i.state={view:i.editor.getView()},i}var n=t.prototype;return n.handleClick=function(){switch(this.next){case Ai.SHOW_ALL:this.editor.setView({html:!0,md:!0});break;case Ai.SHOW_HTML:this.editor.setView({html:!0,md:!1});break;case Ai.SHOW_MD:this.editor.setView({html:!1,md:!0});break}},n.handleChange=function(i){this.setState({view:i})},n.componentDidMount=function(){this.editor.on("viewchange",this.handleChange)},n.componentWillUnmount=function(){this.editor.off("viewchange",this.handleChange)},n.getDisplayInfo=function(){var i=this.next;switch(i){case Ai.SHOW_ALL:return{icon:"view-split",title:"All"};case Ai.SHOW_HTML:return{icon:"visibility",title:"Preview"};default:return{icon:"keyboard",title:"Editor"}}},n.render=function(){if(this.isDisplay){var i=this.getDisplayInfo();return y.createElement("span",{className:"button button-type-mode",title:Nn.get("btnMode"+i.title),onClick:this.handleClick},y.createElement(Pr,{type:i.icon}))}return null},bG(t,[{key:"isDisplay",get:function(){var i=this.editorConfig.canView;return i?[i.html,i.md,i.both].filter(function(o){return o}).length>=2:!1}},{key:"next",get:function(){var i=this.editorConfig.canView,o=this.state.view,a=[Ai.SHOW_ALL,Ai.SHOW_MD,Ai.SHOW_HTML];i&&(i.both||a.splice(a.indexOf(Ai.SHOW_ALL),1),i.md||a.splice(a.indexOf(Ai.SHOW_MD),1),i.html||a.splice(a.indexOf(Ai.SHOW_HTML),1));var u=Ai.SHOW_MD;if(o.html&&(u=Ai.SHOW_HTML),o.html&&o.md&&(u=Ai.SHOW_ALL),a.length===0)return u;if(a.length===1)return a[0];var s=a.indexOf(u);return s=55296&&c<=57343?i+="���":i+=String.fromCharCode(c),o+=6;continue}}if((u&248)===240&&o+91114111?i+="����":(d-=65536,i+=String.fromCharCode(55296+(d>>10),56320+(d&1023))),o+=9;continue}}i+="�"}return i})}Hd.defaultChars=";/?:@&=+$,#";Hd.componentChars="";const X7={};function MUe(e){let t=X7[e];if(t)return t;t=X7[e]=[];for(let n=0;n<128;n++){const r=String.fromCharCode(n);/^[0-9a-z]$/i.test(r)?t.push(r):t.push("%"+("0"+n.toString(16).toUpperCase()).slice(-2))}for(let n=0;n"u"&&(n=!0);const r=MUe(t);let i="";for(let o=0,a=e.length;o=55296&&u<=57343){if(u>=55296&&u<=56319&&o+1=56320&&s<=57343){i+=encodeURIComponent(e[o]+e[o+1]),o++;continue}}i+="%EF%BF%BD";continue}i+=encodeURIComponent(e[o])}return i}fg.defaultChars=";/?:@&=+$,-_.!~*'()#";fg.componentChars="-_.!~*'()";function O4(e){let t="";return t+=e.protocol||"",t+=e.slashes?"//":"",t+=e.auth?e.auth+"@":"",e.hostname&&e.hostname.indexOf(":")!==-1?t+="["+e.hostname+"]":t+=e.hostname||"",t+=e.port?":"+e.port:"",t+=e.pathname||"",t+=e.search||"",t+=e.hash||"",t}function Ib(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}const RUe=/^([a-z0-9.+-]+:)/i,DUe=/:[0-9]*$/,$Ue=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,IUe=["<",">",'"',"`"," ","\r",` -`," "],NUe=["{","}","|","\\","^","`"].concat(IUe),FUe=["'"].concat(NUe),Q7=["%","/","?",";","#"].concat(FUe),J7=["/","?","#"],LUe=255,eI=/^[+a-z0-9A-Z_-]{0,63}$/,jUe=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,tI={javascript:!0,"javascript:":!0},nI={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function P4(e,t){if(e&&e instanceof Ib)return e;const n=new Ib;return n.parse(e,t),n}Ib.prototype.parse=function(e,t){let n,r,i,o=e;if(o=o.trim(),!t&&e.split("#").length===1){const l=$Ue.exec(o);if(l)return this.pathname=l[1],l[2]&&(this.search=l[2]),this}let a=RUe.exec(o);if(a&&(a=a[0],n=a.toLowerCase(),this.protocol=a,o=o.substr(a.length)),(t||a||o.match(/^\/\/[^@\/]+@[^@\/]+/))&&(i=o.substr(0,2)==="//",i&&!(a&&tI[a])&&(o=o.substr(2),this.slashes=!0)),!tI[a]&&(i||a&&!nI[a])){let l=-1;for(let g=0;g127?w+="x":w+=x[S];if(!w.match(eI)){const S=g.slice(0,v),A=g.slice(v+1),E=x.match(jUe);E&&(S.push(E[1]),A.unshift(E[2])),A.length&&(o=A.join(".")+o),this.hostname=S.join(".");break}}}}this.hostname.length>LUe&&(this.hostname=""),m&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}const u=o.indexOf("#");u!==-1&&(this.hash=o.substr(u),o=o.slice(0,u));const s=o.indexOf("?");return s!==-1&&(this.search=o.substr(s),o=o.slice(0,s)),o&&(this.pathname=o),nI[n]&&this.hostname&&!this.pathname&&(this.pathname=""),this};Ib.prototype.parseHost=function(e){let t=DUe.exec(e);t&&(t=t[0],t!==":"&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};const BUe=Object.freeze(Object.defineProperty({__proto__:null,decode:Hd,encode:fg,format:O4,parse:P4},Symbol.toStringTag,{value:"Module"})),nK=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,rK=/[\0-\x1F\x7F-\x9F]/,zUe=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/,k4=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/,iK=/[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC2\uFD40-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC5\uDECE-\uDEDB\uDEE0-\uDEE8\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFCA]/,oK=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,UUe=Object.freeze(Object.defineProperty({__proto__:null,Any:nK,Cc:rK,Cf:zUe,P:k4,S:iK,Z:oK},Symbol.toStringTag,{value:"Module"})),WUe=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),VUe=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(e=>e.charCodeAt(0)));var XS;const HUe=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),qUe=(XS=String.fromCodePoint)!==null&&XS!==void 0?XS:function(e){let t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|e&1023),t+=String.fromCharCode(e),t};function GUe(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=HUe.get(e))!==null&&t!==void 0?t:e}var hr;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(hr||(hr={}));const KUe=32;var Rs;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Rs||(Rs={}));function F6(e){return e>=hr.ZERO&&e<=hr.NINE}function YUe(e){return e>=hr.UPPER_A&&e<=hr.UPPER_F||e>=hr.LOWER_A&&e<=hr.LOWER_F}function ZUe(e){return e>=hr.UPPER_A&&e<=hr.UPPER_Z||e>=hr.LOWER_A&&e<=hr.LOWER_Z||F6(e)}function XUe(e){return e===hr.EQUALS||ZUe(e)}var cr;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(cr||(cr={}));var Ss;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Ss||(Ss={}));class QUe{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=cr.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Ss.Strict}startEntity(t){this.decodeMode=t,this.state=cr.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case cr.EntityStart:return t.charCodeAt(n)===hr.NUM?(this.state=cr.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=cr.NamedEntity,this.stateNamedEntity(t,n));case cr.NumericStart:return this.stateNumericStart(t,n);case cr.NumericDecimal:return this.stateNumericDecimal(t,n);case cr.NumericHex:return this.stateNumericHex(t,n);case cr.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|KUe)===hr.LOWER_X?(this.state=cr.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=cr.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,i){if(n!==r){const o=r-n;this.result=this.result*Math.pow(i,o)+parseInt(t.substr(n,o),i),this.consumed+=o}}stateNumericHex(t,n){const r=n;for(;n>14;for(;n>14,o!==0){if(a===hr.SEMI)return this.emitNamedEntityData(this.treeIndex,o,this.consumed+this.excess);this.decodeMode!==Ss.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,i=(r[n]&Rs.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,i,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:i}=this;return this.emitCodePoint(n===1?i[t]&~Rs.VALUE_LENGTH:i[t+1],r),n===3&&this.emitCodePoint(i[t+2],r),r}end(){var t;switch(this.state){case cr.NamedEntity:return this.result!==0&&(this.decodeMode!==Ss.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case cr.NumericDecimal:return this.emitNumericEntity(0,2);case cr.NumericHex:return this.emitNumericEntity(0,3);case cr.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case cr.EntityStart:return 0}}}function aK(e){let t="";const n=new QUe(e,r=>t+=qUe(r));return function(i,o){let a=0,u=0;for(;(u=i.indexOf("&",u))>=0;){t+=i.slice(a,u),n.startEntity(o);const l=n.write(i,u+1);if(l<0){a=u+n.end();break}a=u+l,u=l===0?a+1:a}const s=t+i.slice(a);return t="",s}}function JUe(e,t,n,r){const i=(t&Rs.BRANCH_LENGTH)>>7,o=t&Rs.JUMP_TABLE;if(i===0)return o!==0&&r===o?n:-1;if(o){const s=r-o;return s<0||s>=i?-1:e[n+s]-1}let a=n,u=a+i-1;for(;a<=u;){const s=a+u>>>1,l=e[s];if(lr)u=s-1;else return e[s+i]}return-1}const eWe=aK(WUe);aK(VUe);function uK(e,t=Ss.Legacy){return eWe(e,t)}function tWe(e){return Object.prototype.toString.call(e)}function T4(e){return tWe(e)==="[object String]"}const nWe=Object.prototype.hasOwnProperty;function rWe(e,t){return nWe.call(e,t)}function $x(e){return Array.prototype.slice.call(arguments,1).forEach(function(n){if(n){if(typeof n!="object")throw new TypeError(n+"must be object");Object.keys(n).forEach(function(r){e[r]=n[r]})}}),e}function sK(e,t,n){return[].concat(e.slice(0,t),n,e.slice(t+1))}function M4(e){return!(e>=55296&&e<=57343||e>=64976&&e<=65007||(e&65535)===65535||(e&65535)===65534||e>=0&&e<=8||e===11||e>=14&&e<=31||e>=127&&e<=159||e>1114111)}function Nb(e){if(e>65535){e-=65536;const t=55296+(e>>10),n=56320+(e&1023);return String.fromCharCode(t,n)}return String.fromCharCode(e)}const lK=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,iWe=/&([a-z#][a-z0-9]{1,31});/gi,oWe=new RegExp(lK.source+"|"+iWe.source,"gi"),aWe=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function uWe(e,t){if(t.charCodeAt(0)===35&&aWe.test(t)){const r=t[1].toLowerCase()==="x"?parseInt(t.slice(2),16):parseInt(t.slice(1),10);return M4(r)?Nb(r):e}const n=uK(e);return n!==e?n:e}function sWe(e){return e.indexOf("\\")<0?e:e.replace(lK,"$1")}function qd(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(oWe,function(t,n,r){return n||uWe(t,r)})}const lWe=/[&<>"]/,cWe=/[&<>"]/g,fWe={"&":"&","<":"<",">":">",'"':"""};function dWe(e){return fWe[e]}function tl(e){return lWe.test(e)?e.replace(cWe,dWe):e}const hWe=/[.?*+^$[\]\\(){}|-]/g;function pWe(e){return e.replace(hWe,"\\$&")}function dn(e){switch(e){case 9:case 32:return!0}return!1}function Cm(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function Em(e){return k4.test(e)||iK.test(e)}function Am(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function Ix(e){return e=e.trim().replace(/\s+/g," "),"ẞ".toLowerCase()==="Ṿ"&&(e=e.replace(/ẞ/g,"ß")),e.toLowerCase().toUpperCase()}const mWe={mdurl:BUe,ucmicro:UUe},gWe=Object.freeze(Object.defineProperty({__proto__:null,arrayReplaceAt:sK,assign:$x,escapeHtml:tl,escapeRE:pWe,fromCodePoint:Nb,has:rWe,isMdAsciiPunct:Am,isPunctChar:Em,isSpace:dn,isString:T4,isValidEntityCode:M4,isWhiteSpace:Cm,lib:mWe,normalizeReference:Ix,unescapeAll:qd,unescapeMd:sWe},Symbol.toStringTag,{value:"Module"}));function vWe(e,t,n){let r,i,o,a;const u=e.posMax,s=e.pos;for(e.pos=t+1,r=1;e.pos32))return o;if(r===41){if(a===0)break;a--}i++}return t===i||a!==0||(o.str=qd(e.slice(t,i)),o.pos=i,o.ok=!0),o}function bWe(e,t,n,r){let i,o=t;const a={ok:!1,can_continue:!1,pos:0,str:"",marker:0};if(r)a.str=r.str,a.marker=r.marker;else{if(o>=n)return a;let u=e.charCodeAt(o);if(u!==34&&u!==39&&u!==40)return a;t++,o++,u===40&&(u=41),a.marker=u}for(;o"+tl(o.content)+""};Ha.code_block=function(e,t,n,r,i){const o=e[t];return""+tl(e[t].content)+` -`};Ha.fence=function(e,t,n,r,i){const o=e[t],a=o.info?qd(o.info).trim():"";let u="",s="";if(a){const c=a.split(/(\s+)/g);u=c[0],s=c.slice(2).join("")}let l;if(n.highlight?l=n.highlight(o.content,u,s)||tl(o.content):l=tl(o.content),l.indexOf("=55296&&c<=57343?i+="���":i+=String.fromCharCode(c),o+=6;continue}}if((u&248)===240&&o+91114111?i+="����":(d-=65536,i+=String.fromCharCode(55296+(d>>10),56320+(d&1023))),o+=9;continue}}i+="�"}return i})}bh.defaultChars=";/?:@&=+$,#";bh.componentChars="";const cI={};function QWe(e){let t=cI[e];if(t)return t;t=cI[e]=[];for(let n=0;n<128;n++){const r=String.fromCharCode(n);/^[0-9a-z]$/i.test(r)?t.push(r):t.push("%"+("0"+n.toString(16).toUpperCase()).slice(-2))}for(let n=0;n"u"&&(n=!0);const r=QWe(t);let i="";for(let o=0,a=e.length;o=55296&&u<=57343){if(u>=55296&&u<=56319&&o+1=56320&&s<=57343){i+=encodeURIComponent(e[o]+e[o+1]),o++;continue}}i+="%EF%BF%BD";continue}i+=encodeURIComponent(e[o])}return i}$g.defaultChars=";/?:@&=+$,-_.!~*'()#";$g.componentChars="-_.!~*'()";function ZO(e){let t="";return t+=e.protocol||"",t+=e.slashes?"//":"",t+=e.auth?e.auth+"@":"",e.hostname&&e.hostname.indexOf(":")!==-1?t+="["+e.hostname+"]":t+=e.hostname||"",t+=e.port?":"+e.port:"",t+=e.pathname||"",t+=e.search||"",t+=e.hash||"",t}function rx(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}const JWe=/^([a-z0-9.+-]+:)/i,eVe=/:[0-9]*$/,tVe=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,nVe=["<",">",'"',"`"," ","\r",` +`," "],rVe=["{","}","|","\\","^","`"].concat(nVe),iVe=["'"].concat(rVe),fI=["%","/","?",";","#"].concat(iVe),dI=["/","?","#"],oVe=255,hI=/^[+a-z0-9A-Z_-]{0,63}$/,aVe=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,pI={javascript:!0,"javascript:":!0},vI={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function XO(e,t){if(e&&e instanceof rx)return e;const n=new rx;return n.parse(e,t),n}rx.prototype.parse=function(e,t){let n,r,i,o=e;if(o=o.trim(),!t&&e.split("#").length===1){const l=tVe.exec(o);if(l)return this.pathname=l[1],l[2]&&(this.search=l[2]),this}let a=JWe.exec(o);if(a&&(a=a[0],n=a.toLowerCase(),this.protocol=a,o=o.substr(a.length)),(t||a||o.match(/^\/\/[^@\/]+@[^@\/]+/))&&(i=o.substr(0,2)==="//",i&&!(a&&pI[a])&&(o=o.substr(2),this.slashes=!0)),!pI[a]&&(i||a&&!vI[a])){let l=-1;for(let g=0;g127?x+="x":x+=w[S];if(!x.match(hI)){const S=g.slice(0,m),A=g.slice(m+1),E=w.match(aVe);E&&(S.push(E[1]),A.unshift(E[2])),A.length&&(o=A.join(".")+o),this.hostname=S.join(".");break}}}}this.hostname.length>oVe&&(this.hostname=""),v&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}const u=o.indexOf("#");u!==-1&&(this.hash=o.substr(u),o=o.slice(0,u));const s=o.indexOf("?");return s!==-1&&(this.search=o.substr(s),o=o.slice(0,s)),o&&(this.pathname=o),vI[n]&&this.hostname&&!this.pathname&&(this.pathname=""),this};rx.prototype.parseHost=function(e){let t=eVe.exec(e);t&&(t=t[0],t!==":"&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};const uVe=Object.freeze(Object.defineProperty({__proto__:null,decode:bh,encode:$g,format:ZO,parse:XO},Symbol.toStringTag,{value:"Module"})),LG=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,jG=/[\0-\x1F\x7F-\x9F]/,sVe=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/,QO=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/,BG=/[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC2\uFD40-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC5\uDECE-\uDEDB\uDEE0-\uDEE8\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFCA]/,zG=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,lVe=Object.freeze(Object.defineProperty({__proto__:null,Any:LG,Cc:jG,Cf:sVe,P:QO,S:BG,Z:zG},Symbol.toStringTag,{value:"Module"})),cVe=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),fVe=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(e=>e.charCodeAt(0)));var f3;const dVe=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),hVe=(f3=String.fromCodePoint)!==null&&f3!==void 0?f3:function(e){let t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|e&1023),t+=String.fromCharCode(e),t};function pVe(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=dVe.get(e))!==null&&t!==void 0?t:e}var ei;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(ei||(ei={}));const vVe=32;var ll;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(ll||(ll={}));function X6(e){return e>=ei.ZERO&&e<=ei.NINE}function gVe(e){return e>=ei.UPPER_A&&e<=ei.UPPER_F||e>=ei.LOWER_A&&e<=ei.LOWER_F}function mVe(e){return e>=ei.UPPER_A&&e<=ei.UPPER_Z||e>=ei.LOWER_A&&e<=ei.LOWER_Z||X6(e)}function yVe(e){return e===ei.EQUALS||mVe(e)}var Xr;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(Xr||(Xr={}));var el;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(el||(el={}));class bVe{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=Xr.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=el.Strict}startEntity(t){this.decodeMode=t,this.state=Xr.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case Xr.EntityStart:return t.charCodeAt(n)===ei.NUM?(this.state=Xr.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=Xr.NamedEntity,this.stateNamedEntity(t,n));case Xr.NumericStart:return this.stateNumericStart(t,n);case Xr.NumericDecimal:return this.stateNumericDecimal(t,n);case Xr.NumericHex:return this.stateNumericHex(t,n);case Xr.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|vVe)===ei.LOWER_X?(this.state=Xr.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=Xr.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,i){if(n!==r){const o=r-n;this.result=this.result*Math.pow(i,o)+parseInt(t.substr(n,o),i),this.consumed+=o}}stateNumericHex(t,n){const r=n;for(;n>14;for(;n>14,o!==0){if(a===ei.SEMI)return this.emitNamedEntityData(this.treeIndex,o,this.consumed+this.excess);this.decodeMode!==el.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,i=(r[n]&ll.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,i,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:i}=this;return this.emitCodePoint(n===1?i[t]&~ll.VALUE_LENGTH:i[t+1],r),n===3&&this.emitCodePoint(i[t+2],r),r}end(){var t;switch(this.state){case Xr.NamedEntity:return this.result!==0&&(this.decodeMode!==el.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Xr.NumericDecimal:return this.emitNumericEntity(0,2);case Xr.NumericHex:return this.emitNumericEntity(0,3);case Xr.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Xr.EntityStart:return 0}}}function UG(e){let t="";const n=new bVe(e,r=>t+=hVe(r));return function(i,o){let a=0,u=0;for(;(u=i.indexOf("&",u))>=0;){t+=i.slice(a,u),n.startEntity(o);const l=n.write(i,u+1);if(l<0){a=u+n.end();break}a=u+l,u=l===0?a+1:a}const s=t+i.slice(a);return t="",s}}function xVe(e,t,n,r){const i=(t&ll.BRANCH_LENGTH)>>7,o=t&ll.JUMP_TABLE;if(i===0)return o!==0&&r===o?n:-1;if(o){const s=r-o;return s<0||s>=i?-1:e[n+s]-1}let a=n,u=a+i-1;for(;a<=u;){const s=a+u>>>1,l=e[s];if(lr)u=s-1;else return e[s+i]}return-1}const wVe=UG(cVe);UG(fVe);function WG(e,t=el.Legacy){return wVe(e,t)}function _Ve(e){return Object.prototype.toString.call(e)}function JO(e){return _Ve(e)==="[object String]"}const SVe=Object.prototype.hasOwnProperty;function CVe(e,t){return SVe.call(e,t)}function t2(e){return Array.prototype.slice.call(arguments,1).forEach(function(n){if(n){if(typeof n!="object")throw new TypeError(n+"must be object");Object.keys(n).forEach(function(r){e[r]=n[r]})}}),e}function VG(e,t,n){return[].concat(e.slice(0,t),n,e.slice(t+1))}function e5(e){return!(e>=55296&&e<=57343||e>=64976&&e<=65007||(e&65535)===65535||(e&65535)===65534||e>=0&&e<=8||e===11||e>=14&&e<=31||e>=127&&e<=159||e>1114111)}function ix(e){if(e>65535){e-=65536;const t=55296+(e>>10),n=56320+(e&1023);return String.fromCharCode(t,n)}return String.fromCharCode(e)}const HG=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,EVe=/&([a-z#][a-z0-9]{1,31});/gi,AVe=new RegExp(HG.source+"|"+EVe.source,"gi"),PVe=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function OVe(e,t){if(t.charCodeAt(0)===35&&PVe.test(t)){const r=t[1].toLowerCase()==="x"?parseInt(t.slice(2),16):parseInt(t.slice(1),10);return e5(r)?ix(r):e}const n=WG(e);return n!==e?n:e}function kVe(e){return e.indexOf("\\")<0?e:e.replace(HG,"$1")}function xh(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(AVe,function(t,n,r){return n||OVe(t,r)})}const TVe=/[&<>"]/,MVe=/[&<>"]/g,RVe={"&":"&","<":"<",">":">",'"':"""};function DVe(e){return RVe[e]}function Rl(e){return TVe.test(e)?e.replace(MVe,DVe):e}const $Ve=/[.?*+^$[\]\\(){}|-]/g;function IVe(e){return e.replace($Ve,"\\$&")}function Vn(e){switch(e){case 9:case 32:return!0}return!1}function Kv(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function Gv(e){return QO.test(e)||BG.test(e)}function Yv(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function n2(e){return e=e.trim().replace(/\s+/g," "),"ẞ".toLowerCase()==="Ṿ"&&(e=e.replace(/ẞ/g,"ß")),e.toLowerCase().toUpperCase()}const NVe={mdurl:uVe,ucmicro:lVe},FVe=Object.freeze(Object.defineProperty({__proto__:null,arrayReplaceAt:VG,assign:t2,escapeHtml:Rl,escapeRE:IVe,fromCodePoint:ix,has:CVe,isMdAsciiPunct:Yv,isPunctChar:Gv,isSpace:Vn,isString:JO,isValidEntityCode:e5,isWhiteSpace:Kv,lib:NVe,normalizeReference:n2,unescapeAll:xh,unescapeMd:kVe},Symbol.toStringTag,{value:"Module"}));function LVe(e,t,n){let r,i,o,a;const u=e.posMax,s=e.pos;for(e.pos=t+1,r=1;e.pos32))return o;if(r===41){if(a===0)break;a--}i++}return t===i||a!==0||(o.str=xh(e.slice(t,i)),o.pos=i,o.ok=!0),o}function BVe(e,t,n,r){let i,o=t;const a={ok:!1,can_continue:!1,pos:0,str:"",marker:0};if(r)a.str=r.str,a.marker=r.marker;else{if(o>=n)return a;let u=e.charCodeAt(o);if(u!==34&&u!==39&&u!==40)return a;t++,o++,u===40&&(u=41),a.marker=u}for(;o"+Rl(o.content)+""};Mu.code_block=function(e,t,n,r,i){const o=e[t];return""+Rl(e[t].content)+` +`};Mu.fence=function(e,t,n,r,i){const o=e[t],a=o.info?xh(o.info).trim():"";let u="",s="";if(a){const c=a.split(/(\s+)/g);u=c[0],s=c.slice(2).join("")}let l;if(n.highlight?l=n.highlight(o.content,u,s)||Rl(o.content):l=Rl(o.content),l.indexOf("${l} `}return`
${l}
-`};Ha.image=function(e,t,n,r,i){const o=e[t];return o.attrs[o.attrIndex("alt")][1]=i.renderInlineAsText(o.children,n,r),i.renderToken(e,t,n)};Ha.hardbreak=function(e,t,n){return n.xhtmlOut?`
+`};Mu.image=function(e,t,n,r,i){const o=e[t];return o.attrs[o.attrIndex("alt")][1]=i.renderInlineAsText(o.children,n,r),i.renderToken(e,t,n)};Mu.hardbreak=function(e,t,n){return n.xhtmlOut?`
`:`
-`};Ha.softbreak=function(e,t,n){return n.breaks?n.xhtmlOut?`
+`};Mu.softbreak=function(e,t,n){return n.breaks?n.xhtmlOut?`
`:`
`:` -`};Ha.text=function(e,t){return tl(e[t].content)};Ha.html_block=function(e,t){return e[t].content};Ha.html_inline=function(e,t){return e[t].content};function _h(){this.rules=$x({},Ha)}_h.prototype.renderAttrs=function(t){let n,r,i;if(!t.attrs)return"";for(i="",n=0,r=t.attrs.length;n -`:">",o};_h.prototype.renderInline=function(e,t,n){let r="";const i=this.rules;for(let o=0,a=e.length;o=0&&(r=this.attrs[n][1]),r};ga.prototype.attrJoin=function(t,n){const r=this.attrIndex(t);r<0?this.attrPush([t,n]):this.attrs[r][1]=this.attrs[r][1]+" "+n};function cK(e,t,n){this.src=e,this.env=n,this.tokens=[],this.inlineMode=!1,this.md=t}cK.prototype.Token=ga;const xWe=/\r\n?|\n/g,_We=/\0/g;function SWe(e){let t;t=e.src.replace(xWe,` -`),t=t.replace(_We,"�"),e.src=t}function CWe(e){let t;e.inlineMode?(t=new e.Token("inline","",0),t.content=e.src,t.map=[0,1],t.children=[],e.tokens.push(t)):e.md.block.parse(e.src,e.md,e.env,e.tokens)}function EWe(e){const t=e.tokens;for(let n=0,r=t.length;n\s]/i.test(e)}function OWe(e){return/^<\/a\s*>/i.test(e)}function PWe(e){const t=e.tokens;if(e.md.options.linkify)for(let n=0,r=t.length;n=0;a--){const u=i[a];if(u.type==="link_close"){for(a--;i[a].level!==u.level&&i[a].type!=="link_open";)a--;continue}if(u.type==="html_inline"&&(AWe(u.content)&&o>0&&o--,OWe(u.content)&&o++),!(o>0)&&u.type==="text"&&e.md.linkify.test(u.content)){const s=u.content;let l=e.md.linkify.match(s);const c=[];let d=u.level,h=0;l.length>0&&l[0].index===0&&a>0&&i[a-1].type==="text_special"&&(l=l.slice(1));for(let m=0;mh){const E=new e.Token("text","",0);E.content=s.slice(h,x),E.level=d,c.push(E)}const w=new e.Token("link_open","a",1);w.attrs=[["href",v]],w.level=d++,w.markup="linkify",w.info="auto",c.push(w);const S=new e.Token("text","",0);S.content=y,S.level=d,c.push(S);const A=new e.Token("link_close","a",-1);A.level=--d,A.markup="linkify",A.info="auto",c.push(A),h=l[m].lastIndex}if(h=0;n--){const r=e[n];r.type==="text"&&!t&&(r.content=r.content.replace(TWe,RWe)),r.type==="link_open"&&r.info==="auto"&&t--,r.type==="link_close"&&r.info==="auto"&&t++}}function $We(e){let t=0;for(let n=e.length-1;n>=0;n--){const r=e[n];r.type==="text"&&!t&&fK.test(r.content)&&(r.content=r.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/mg,"$1—").replace(/(^|\s)--(?=\s|$)/mg,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/mg,"$1–")),r.type==="link_open"&&r.info==="auto"&&t--,r.type==="link_close"&&r.info==="auto"&&t++}}function IWe(e){let t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)e.tokens[t].type==="inline"&&(kWe.test(e.tokens[t].content)&&DWe(e.tokens[t].children),fK.test(e.tokens[t].content)&&$We(e.tokens[t].children))}const NWe=/['"]/,rI=/['"]/g,iI="’";function Qv(e,t,n){return e.slice(0,t)+n+e.slice(t+1)}function FWe(e,t){let n;const r=[];for(let i=0;i=0&&!(r[n].level<=a);n--);if(r.length=n+1,o.type!=="text")continue;let u=o.content,s=0,l=u.length;e:for(;s=0)g=u.charCodeAt(c.index-1);else for(n=i-1;n>=0&&!(e[n].type==="softbreak"||e[n].type==="hardbreak");n--)if(e[n].content){g=e[n].content.charCodeAt(e[n].content.length-1);break}let v=32;if(s=48&&g<=57&&(h=d=!1),d&&h&&(d=y,h=x),!d&&!h){m&&(o.content=Qv(o.content,c.index,iI));continue}if(h)for(n=r.length-1;n>=0;n--){let A=r[n];if(r[n].level=0;t--)e.tokens[t].type!=="inline"||!NWe.test(e.tokens[t].content)||FWe(e.tokens[t].children,e)}function jWe(e){let t,n;const r=e.tokens,i=r.length;for(let o=0;o0&&this.level++,this.tokens.push(r),r};qa.prototype.isEmpty=function(t){return this.bMarks[t]+this.tShift[t]>=this.eMarks[t]};qa.prototype.skipEmptyLines=function(t){for(let n=this.lineMax;tn;)if(!dn(this.src.charCodeAt(--t)))return t+1;return t};qa.prototype.skipChars=function(t,n){for(let r=this.src.length;tr;)if(n!==this.src.charCodeAt(--t))return t+1;return t};qa.prototype.getLines=function(t,n,r,i){if(t>=n)return"";const o=new Array(n-t);for(let a=0,u=t;ur?o[a]=new Array(s-r+1).join(" ")+this.src.slice(c,d):o[a]=this.src.slice(c,d)}return o.join("")};qa.prototype.Token=ga;const BWe=65536;function JS(e,t){const n=e.bMarks[t]+e.tShift[t],r=e.eMarks[t];return e.src.slice(n,r)}function oI(e){const t=[],n=e.length;let r=0,i=e.charCodeAt(r),o=!1,a=0,u="";for(;rn)return!1;let i=t+1;if(e.sCount[i]=4)return!1;let o=e.bMarks[i]+e.tShift[i];if(o>=e.eMarks[i])return!1;const a=e.src.charCodeAt(o++);if(a!==124&&a!==45&&a!==58||o>=e.eMarks[i])return!1;const u=e.src.charCodeAt(o++);if(u!==124&&u!==45&&u!==58&&!dn(u)||a===45&&dn(u))return!1;for(;o=4)return!1;l=oI(s),l.length&&l[0]===""&&l.shift(),l.length&&l[l.length-1]===""&&l.pop();const d=l.length;if(d===0||d!==c.length)return!1;if(r)return!0;const h=e.parentType;e.parentType="table";const m=e.md.block.ruler.getRules("blockquote"),g=e.push("table_open","table",1),v=[t,0];g.map=v;const y=e.push("thead_open","thead",1);y.map=[t,t+1];const x=e.push("tr_open","tr",1);x.map=[t,t+1];for(let A=0;A=4||(l=oI(s),l.length&&l[0]===""&&l.shift(),l.length&&l[l.length-1]===""&&l.pop(),S+=d-l.length,S>BWe))break;if(i===t+2){const C=e.push("tbody_open","tbody",1);C.map=w=[t+2,0]}const E=e.push("tr_open","tr",1);E.map=[i,i+1];for(let C=0;C=4){r++,i=r;continue}break}e.line=i;const o=e.push("code_block","code",0);return o.content=e.getLines(t,i,4+e.blkIndent,!1)+` -`,o.map=[t,e.line],!0}function WWe(e,t,n,r){let i=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||i+3>o)return!1;const a=e.src.charCodeAt(i);if(a!==126&&a!==96)return!1;let u=i;i=e.skipChars(i,a);let s=i-u;if(s<3)return!1;const l=e.src.slice(u,i),c=e.src.slice(i,o);if(a===96&&c.indexOf(String.fromCharCode(a))>=0)return!1;if(r)return!0;let d=t,h=!1;for(;d++,!(d>=n||(i=u=e.bMarks[d]+e.tShift[d],o=e.eMarks[d],i=4)&&(i=e.skipChars(i,a),!(i-u=4||e.src.charCodeAt(i)!==62)return!1;if(r)return!0;const u=[],s=[],l=[],c=[],d=e.md.block.ruler.getRules("blockquote"),h=e.parentType;e.parentType="blockquote";let m=!1,g;for(g=t;g=o)break;if(e.src.charCodeAt(i++)===62&&!S){let E=e.sCount[g]+1,C,P;e.src.charCodeAt(i)===32?(i++,E++,P=!1,C=!0):e.src.charCodeAt(i)===9?(C=!0,(e.bsCount[g]+E)%4===3?(i++,E++,P=!1):P=!0):C=!1;let k=E;for(u.push(e.bMarks[g]),e.bMarks[g]=i;i=o,s.push(e.bsCount[g]),e.bsCount[g]=e.sCount[g]+1+(C?1:0),l.push(e.sCount[g]),e.sCount[g]=k-E,c.push(e.tShift[g]),e.tShift[g]=i-e.bMarks[g];continue}if(m)break;let A=!1;for(let E=0,C=d.length;E";const x=[t,0];y.map=x,e.md.block.tokenize(e,t,g);const w=e.push("blockquote_close","blockquote",-1);w.markup=">",e.lineMax=a,e.parentType=h,x[1]=e.line;for(let S=0;S=4)return!1;let o=e.bMarks[t]+e.tShift[t];const a=e.src.charCodeAt(o++);if(a!==42&&a!==45&&a!==95)return!1;let u=1;for(;o=r)return-1;let o=e.src.charCodeAt(i++);if(o<48||o>57)return-1;for(;;){if(i>=r)return-1;if(o=e.src.charCodeAt(i++),o>=48&&o<=57){if(i-n>=10)return-1;continue}if(o===41||o===46)break;return-1}return i=4||e.listIndent>=0&&e.sCount[s]-e.listIndent>=4&&e.sCount[s]=e.blkIndent&&(c=!0);let d,h,m;if((m=uI(e,s))>=0){if(d=!0,a=e.bMarks[s]+e.tShift[s],h=Number(e.src.slice(a,m-1)),c&&h!==1)return!1}else if((m=aI(e,s))>=0)d=!1;else return!1;if(c&&e.skipSpaces(m)>=e.eMarks[s])return!1;if(r)return!0;const g=e.src.charCodeAt(m-1),v=e.tokens.length;d?(u=e.push("ordered_list_open","ol",1),h!==1&&(u.attrs=[["start",h]])):u=e.push("bullet_list_open","ul",1);const y=[s,0];u.map=y,u.markup=String.fromCharCode(g);let x=!1;const w=e.md.block.ruler.getRules("list"),S=e.parentType;for(e.parentType="list";s=i?P=1:P=E-A,P>4&&(P=1);const k=A+P;u=e.push("list_item_open","li",1),u.markup=String.fromCharCode(g);const M=[s,0];u.map=M,d&&(u.info=e.src.slice(a,m-1));const L=e.tight,B=e.tShift[s],F=e.sCount[s],Y=e.listIndent;if(e.listIndent=e.blkIndent,e.blkIndent=k,e.tight=!0,e.tShift[s]=C-e.bMarks[s],e.sCount[s]=E,C>=i&&e.isEmpty(s+1)?e.line=Math.min(e.line+2,n):e.md.block.tokenize(e,s,n,!0),(!e.tight||x)&&(l=!1),x=e.line-s>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=Y,e.tShift[s]=B,e.sCount[s]=F,e.tight=L,u=e.push("list_item_close","li",-1),u.markup=String.fromCharCode(g),s=e.line,M[1]=s,s>=n||e.sCount[s]=4)break;let H=!1;for(let W=0,V=w.length;W=4||e.src.charCodeAt(i)!==91)return!1;function u(w){const S=e.lineMax;if(w>=S||e.isEmpty(w))return null;let A=!1;if(e.sCount[w]-e.blkIndent>3&&(A=!0),e.sCount[w]<0&&(A=!0),!A){const P=e.md.block.ruler.getRules("reference"),k=e.parentType;e.parentType="reference";let M=!1;for(let L=0,B=P.length;L"u"&&(e.env.references={}),typeof e.env.references[x]>"u"&&(e.env.references[x]={title:y,href:d}),e.line=a),!0):!1}const YWe=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],ZWe="[a-zA-Z_:][a-zA-Z0-9:._-]*",XWe="[^\"'=<>`\\x00-\\x20]+",QWe="'[^']*'",JWe='"[^"]*"',eVe="(?:"+XWe+"|"+QWe+"|"+JWe+")",tVe="(?:\\s+"+ZWe+"(?:\\s*=\\s*"+eVe+")?)",dK="<[A-Za-z][A-Za-z0-9\\-]*"+tVe+"*\\s*\\/?>",hK="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",nVe="",rVe="<[?][\\s\\S]*?[?]>",iVe="]*>",oVe="",aVe=new RegExp("^(?:"+dK+"|"+hK+"|"+nVe+"|"+rVe+"|"+iVe+"|"+oVe+")"),uVe=new RegExp("^(?:"+dK+"|"+hK+")"),wf=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^/,!0],[/^<\?/,/\?>/,!0],[/^/,!0],[/^/,!0],[new RegExp("^|$))","i"),/^$/,!0],[new RegExp(uVe.source+"\\s*$"),/^$/,!1]];function sVe(e,t,n,r){let i=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||!e.md.options.html||e.src.charCodeAt(i)!==60)return!1;let a=e.src.slice(i,o),u=0;for(;u=4)return!1;let a=e.src.charCodeAt(i);if(a!==35||i>=o)return!1;let u=1;for(a=e.src.charCodeAt(++i);a===35&&i6||ii&&dn(e.src.charCodeAt(s-1))&&(o=s),e.line=t+1;const l=e.push("heading_open","h"+String(u),1);l.markup="########".slice(0,u),l.map=[t,e.line];const c=e.push("inline","",0);c.content=e.src.slice(i,o).trim(),c.map=[t,e.line],c.children=[];const d=e.push("heading_close","h"+String(u),-1);return d.markup="########".slice(0,u),!0}function cVe(e,t,n){const r=e.md.block.ruler.getRules("paragraph");if(e.sCount[t]-e.blkIndent>=4)return!1;const i=e.parentType;e.parentType="paragraph";let o=0,a,u=t+1;for(;u3)continue;if(e.sCount[u]>=e.blkIndent){let m=e.bMarks[u]+e.tShift[u];const g=e.eMarks[u];if(m=g))){o=a===61?1:2;break}}if(e.sCount[u]<0)continue;let h=!1;for(let m=0,g=r.length;m3||e.sCount[o]<0)continue;let l=!1;for(let c=0,d=r.length;c=n||e.sCount[a]=o){e.line=n;break}const s=e.line;let l=!1;for(let c=0;c=e.line)throw new Error("block rule didn't increment state.line");break}if(!l)throw new Error("none of the block rules matched");e.tight=!u,e.isEmpty(e.line-1)&&(u=!0),a=e.line,a0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],i={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(r),this.tokens_meta.push(i),r};dg.prototype.scanDelims=function(e,t){const n=this.posMax,r=this.src.charCodeAt(e),i=e>0?this.src.charCodeAt(e-1):32;let o=e;for(;o0)return!1;const n=e.pos,r=e.posMax;if(n+3>r||e.src.charCodeAt(n)!==58||e.src.charCodeAt(n+1)!==47||e.src.charCodeAt(n+2)!==47)return!1;const i=e.pending.match(pVe);if(!i)return!1;const o=i[1],a=e.md.linkify.matchAtStart(e.src.slice(n-o.length));if(!a)return!1;let u=a.url;if(u.length<=o.length)return!1;u=u.replace(/\*+$/,"");const s=e.md.normalizeLink(u);if(!e.md.validateLink(s))return!1;if(!t){e.pending=e.pending.slice(0,-o.length);const l=e.push("link_open","a",1);l.attrs=[["href",s]],l.markup="linkify",l.info="auto";const c=e.push("text","",0);c.content=e.md.normalizeLinkText(u);const d=e.push("link_close","a",-1);d.markup="linkify",d.info="auto"}return e.pos+=u.length-o.length,!0}function gVe(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==10)return!1;const r=e.pending.length-1,i=e.posMax;if(!t)if(r>=0&&e.pending.charCodeAt(r)===32)if(r>=1&&e.pending.charCodeAt(r-1)===32){let o=r-1;for(;o>=1&&e.pending.charCodeAt(o-1)===32;)o--;e.pending=e.pending.slice(0,o),e.push("hardbreak","br",0)}else e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0);else e.push("softbreak","br",0);for(n++;n?@[]^_`{|}~-".split("").forEach(function(e){D4[e.charCodeAt(0)]=1});function vVe(e,t){let n=e.pos;const r=e.posMax;if(e.src.charCodeAt(n)!==92||(n++,n>=r))return!1;let i=e.src.charCodeAt(n);if(i===10){for(t||e.push("hardbreak","br",0),n++;n=55296&&i<=56319&&n+1=56320&&u<=57343&&(o+=e.src[n+1],n++)}const a="\\"+o;if(!t){const u=e.push("text_special","",0);i<256&&D4[i]!==0?u.content=o:u.content=a,u.markup=a,u.info="escape"}return e.pos=n+1,!0}function yVe(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==96)return!1;const i=n;n++;const o=e.posMax;for(;n=0;r--){const i=t[r];if(i.marker!==95&&i.marker!==42||i.end===-1)continue;const o=t[i.end],a=r>0&&t[r-1].end===i.end+1&&t[r-1].marker===i.marker&&t[r-1].token===i.token-1&&t[i.end+1].token===o.token+1,u=String.fromCharCode(i.marker),s=e.tokens[i.token];s.type=a?"strong_open":"em_open",s.tag=a?"strong":"em",s.nesting=1,s.markup=a?u+u:u,s.content="";const l=e.tokens[o.token];l.type=a?"strong_close":"em_close",l.tag=a?"strong":"em",l.nesting=-1,l.markup=a?u+u:u,l.content="",a&&(e.tokens[t[r-1].token].content="",e.tokens[t[i.end+1].token].content="",r--)}}function _Ve(e){const t=e.tokens_meta,n=e.tokens_meta.length;lI(e,e.delimiters);for(let r=0;r=d)return!1;if(s=g,i=e.md.helpers.parseLinkDestination(e.src,g,e.posMax),i.ok){for(a=e.md.normalizeLink(i.str),e.md.validateLink(a)?g=i.pos:a="",s=g;g=d||e.src.charCodeAt(g)!==41)&&(l=!0),g++}if(l){if(typeof e.env.references>"u")return!1;if(g=0?r=e.src.slice(s,g++):g=m+1):g=m+1,r||(r=e.src.slice(h,m)),o=e.env.references[Ix(r)],!o)return e.pos=c,!1;a=o.href,u=o.title}if(!t){e.pos=h,e.posMax=m;const v=e.push("link_open","a",1),y=[["href",a]];v.attrs=y,u&&y.push(["title",u]),e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,e.push("link_close","a",-1)}return e.pos=g,e.posMax=d,!0}function CVe(e,t){let n,r,i,o,a,u,s,l,c="";const d=e.pos,h=e.posMax;if(e.src.charCodeAt(e.pos)!==33||e.src.charCodeAt(e.pos+1)!==91)return!1;const m=e.pos+2,g=e.md.helpers.parseLinkLabel(e,e.pos+1,!1);if(g<0)return!1;if(o=g+1,o=h)return!1;for(l=o,u=e.md.helpers.parseLinkDestination(e.src,o,e.posMax),u.ok&&(c=e.md.normalizeLink(u.str),e.md.validateLink(c)?o=u.pos:c=""),l=o;o=h||e.src.charCodeAt(o)!==41)return e.pos=d,!1;o++}else{if(typeof e.env.references>"u")return!1;if(o=0?i=e.src.slice(l,o++):o=g+1):o=g+1,i||(i=e.src.slice(m,g)),a=e.env.references[Ix(i)],!a)return e.pos=d,!1;c=a.href,s=a.title}if(!t){r=e.src.slice(m,g);const v=[];e.md.inline.parse(r,e.md,e.env,v);const y=e.push("image","img",0),x=[["src",c],["alt",""]];y.attrs=x,y.children=v,y.content=r,s&&x.push(["title",s])}return e.pos=o,e.posMax=h,!0}const EVe=/^([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,AVe=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function OVe(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==60)return!1;const r=e.pos,i=e.posMax;for(;;){if(++n>=i)return!1;const a=e.src.charCodeAt(n);if(a===60)return!1;if(a===62)break}const o=e.src.slice(r+1,n);if(AVe.test(o)){const a=e.md.normalizeLink(o);if(!e.md.validateLink(a))return!1;if(!t){const u=e.push("link_open","a",1);u.attrs=[["href",a]],u.markup="autolink",u.info="auto";const s=e.push("text","",0);s.content=e.md.normalizeLinkText(o);const l=e.push("link_close","a",-1);l.markup="autolink",l.info="auto"}return e.pos+=o.length+2,!0}if(EVe.test(o)){const a=e.md.normalizeLink("mailto:"+o);if(!e.md.validateLink(a))return!1;if(!t){const u=e.push("link_open","a",1);u.attrs=[["href",a]],u.markup="autolink",u.info="auto";const s=e.push("text","",0);s.content=e.md.normalizeLinkText(o);const l=e.push("link_close","a",-1);l.markup="autolink",l.info="auto"}return e.pos+=o.length+2,!0}return!1}function PVe(e){return/^\s]/i.test(e)}function kVe(e){return/^<\/a\s*>/i.test(e)}function TVe(e){const t=e|32;return t>=97&&t<=122}function MVe(e,t){if(!e.md.options.html)return!1;const n=e.posMax,r=e.pos;if(e.src.charCodeAt(r)!==60||r+2>=n)return!1;const i=e.src.charCodeAt(r+1);if(i!==33&&i!==63&&i!==47&&!TVe(i))return!1;const o=e.src.slice(r).match(aVe);if(!o)return!1;if(!t){const a=e.push("html_inline","",0);a.content=o[0],PVe(a.content)&&e.linkLevel++,kVe(a.content)&&e.linkLevel--}return e.pos+=o[0].length,!0}const RVe=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,DVe=/^&([a-z][a-z0-9]{1,31});/i;function $Ve(e,t){const n=e.pos,r=e.posMax;if(e.src.charCodeAt(n)!==38||n+1>=r)return!1;if(e.src.charCodeAt(n+1)===35){const o=e.src.slice(n).match(RVe);if(o){if(!t){const a=o[1][0].toLowerCase()==="x"?parseInt(o[1].slice(1),16):parseInt(o[1],10),u=e.push("text_special","",0);u.content=M4(a)?Nb(a):Nb(65533),u.markup=o[0],u.info="entity"}return e.pos+=o[0].length,!0}}else{const o=e.src.slice(n).match(DVe);if(o){const a=uK(o[0]);if(a!==o[0]){if(!t){const u=e.push("text_special","",0);u.content=a,u.markup=o[0],u.info="entity"}return e.pos+=o[0].length,!0}}}return!1}function cI(e){const t={},n=e.length;if(!n)return;let r=0,i=-2;const o=[];for(let a=0;as;l-=o[l]+1){const d=e[l];if(d.marker===u.marker&&d.open&&d.end<0){let h=!1;if((d.close||u.open)&&(d.length+u.length)%3===0&&(d.length%3!==0||u.length%3!==0)&&(h=!0),!h){const m=l>0&&!e[l-1].open?o[l-1]+1:0;o[a]=a-l+m,o[l]=m,u.open=!1,d.end=a,d.close=!1,c=-1,i=-2;break}}}c!==-1&&(t[u.marker][(u.open?3:0)+(u.length||0)%3]=c)}}function IVe(e){const t=e.tokens_meta,n=e.tokens_meta.length;cI(e.delimiters);for(let r=0;r0&&r++,i[t].type==="text"&&t+1=e.pos)throw new Error("inline rule didn't increment state.pos");break}}else e.pos=e.posMax;a||e.pos++,o[t]=e.pos};hg.prototype.tokenize=function(e){const t=this.ruler.getRules(""),n=t.length,r=e.posMax,i=e.md.options.maxNesting;for(;e.pos=e.pos)throw new Error("inline rule didn't increment state.pos");break}}if(a){if(e.pos>=r)break;continue}e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()};hg.prototype.parse=function(e,t,n,r){const i=new this.State(e,t,n,r);this.tokenize(i);const o=this.ruler2.getRules(""),a=o.length;for(let u=0;u|$))",t.tpl_email_fuzzy="(^|"+n+'|"|\\(|'+t.src_ZCc+")("+t.src_email_name+"@"+t.tpl_host_fuzzy_strict+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_fuzzy_strict+t.src_path+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+")",t}function L6(e){return Array.prototype.slice.call(arguments,1).forEach(function(n){n&&Object.keys(n).forEach(function(r){e[r]=n[r]})}),e}function Fx(e){return Object.prototype.toString.call(e)}function LVe(e){return Fx(e)==="[object String]"}function jVe(e){return Fx(e)==="[object Object]"}function BVe(e){return Fx(e)==="[object RegExp]"}function fI(e){return Fx(e)==="[object Function]"}function zVe(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}const gK={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function UVe(e){return Object.keys(e||{}).reduce(function(t,n){return t||gK.hasOwnProperty(n)},!1)}const WVe={"http:":{validate:function(e,t,n){const r=e.slice(t);return n.re.http||(n.re.http=new RegExp("^\\/\\/"+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,"i")),n.re.http.test(r)?r.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,n){const r=e.slice(t);return n.re.no_http||(n.re.no_http=new RegExp("^"+n.re.src_auth+"(?:localhost|(?:(?:"+n.re.src_domain+")\\.)+"+n.re.src_domain_root+")"+n.re.src_port+n.re.src_host_terminator+n.re.src_path,"i")),n.re.no_http.test(r)?t>=3&&e[t-3]===":"||t>=3&&e[t-3]==="/"?0:r.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,n){const r=e.slice(t);return n.re.mailto||(n.re.mailto=new RegExp("^"+n.re.src_email_name+"@"+n.re.src_host_strict,"i")),n.re.mailto.test(r)?r.match(n.re.mailto)[0].length:0}}},VVe="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",HVe="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function qVe(e){e.__index__=-1,e.__text_cache__=""}function GVe(e){return function(t,n){const r=t.slice(n);return e.test(r)?r.match(e)[0].length:0}}function dI(){return function(e,t){t.normalize(e)}}function Fb(e){const t=e.re=FVe(e.__opts__),n=e.__tlds__.slice();e.onCompile(),e.__tlds_replaced__||n.push(VVe),n.push(t.src_xn),t.src_tlds=n.join("|");function r(u){return u.replace("%TLDS%",t.src_tlds)}t.email_fuzzy=RegExp(r(t.tpl_email_fuzzy),"i"),t.link_fuzzy=RegExp(r(t.tpl_link_fuzzy),"i"),t.link_no_ip_fuzzy=RegExp(r(t.tpl_link_no_ip_fuzzy),"i"),t.host_fuzzy_test=RegExp(r(t.tpl_host_fuzzy_test),"i");const i=[];e.__compiled__={};function o(u,s){throw new Error('(LinkifyIt) Invalid schema "'+u+'": '+s)}Object.keys(e.__schemas__).forEach(function(u){const s=e.__schemas__[u];if(s===null)return;const l={validate:null,link:null};if(e.__compiled__[u]=l,jVe(s)){BVe(s.validate)?l.validate=GVe(s.validate):fI(s.validate)?l.validate=s.validate:o(u,s),fI(s.normalize)?l.normalize=s.normalize:s.normalize?o(u,s):l.normalize=dI();return}if(LVe(s)){i.push(u);return}o(u,s)}),i.forEach(function(u){e.__compiled__[e.__schemas__[u]]&&(e.__compiled__[u].validate=e.__compiled__[e.__schemas__[u]].validate,e.__compiled__[u].normalize=e.__compiled__[e.__schemas__[u]].normalize)}),e.__compiled__[""]={validate:null,normalize:dI()};const a=Object.keys(e.__compiled__).filter(function(u){return u.length>0&&e.__compiled__[u]}).map(zVe).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+a+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+a+")","ig"),e.re.schema_at_start=RegExp("^"+e.re.schema_search.source,"i"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i"),qVe(e)}function KVe(e,t){const n=e.__index__,r=e.__last_index__,i=e.__text_cache__.slice(n,r);this.schema=e.__schema__.toLowerCase(),this.index=n+t,this.lastIndex=r+t,this.raw=i,this.text=i,this.url=i}function j6(e,t){const n=new KVe(e,t);return e.__compiled__[n.schema].normalize(n,e),n}function Xi(e,t){if(!(this instanceof Xi))return new Xi(e,t);t||UVe(e)&&(t=e,e={}),this.__opts__=L6({},gK,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=L6({},WVe,e),this.__compiled__={},this.__tlds__=HVe,this.__tlds_replaced__=!1,this.re={},Fb(this)}Xi.prototype.add=function(t,n){return this.__schemas__[t]=n,Fb(this),this};Xi.prototype.set=function(t){return this.__opts__=L6(this.__opts__,t),this};Xi.prototype.test=function(t){if(this.__text_cache__=t,this.__index__=-1,!t.length)return!1;let n,r,i,o,a,u,s,l,c;if(this.re.schema_test.test(t)){for(s=this.re.schema_search,s.lastIndex=0;(n=s.exec(t))!==null;)if(o=this.testSchemaAt(t,n[2],s.lastIndex),o){this.__schema__=n[2],this.__index__=n.index+n[1].length,this.__last_index__=n.index+n[0].length+o;break}}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(l=t.search(this.re.host_fuzzy_test),l>=0&&(this.__index__<0||l=0&&(i=t.match(this.re.email_fuzzy))!==null&&(a=i.index+i[1].length,u=i.index+i[0].length,(this.__index__<0||athis.__last_index__)&&(this.__schema__="mailto:",this.__index__=a,this.__last_index__=u))),this.__index__>=0};Xi.prototype.pretest=function(t){return this.re.pretest.test(t)};Xi.prototype.testSchemaAt=function(t,n,r){return this.__compiled__[n.toLowerCase()]?this.__compiled__[n.toLowerCase()].validate(t,r,this):0};Xi.prototype.match=function(t){const n=[];let r=0;this.__index__>=0&&this.__text_cache__===t&&(n.push(j6(this,r)),r=this.__last_index__);let i=r?t.slice(r):t;for(;this.test(i);)n.push(j6(this,r)),i=i.slice(this.__last_index__),r+=this.__last_index__;return n.length?n:null};Xi.prototype.matchAtStart=function(t){if(this.__text_cache__=t,this.__index__=-1,!t.length)return null;const n=this.re.schema_at_start.exec(t);if(!n)return null;const r=this.testSchemaAt(t,n[2],n[0].length);return r?(this.__schema__=n[2],this.__index__=n.index+n[1].length,this.__last_index__=n.index+n[0].length+r,j6(this,0)):null};Xi.prototype.tlds=function(t,n){return t=Array.isArray(t)?t:[t],n?(this.__tlds__=this.__tlds__.concat(t).sort().filter(function(r,i,o){return r!==o[i-1]}).reverse(),Fb(this),this):(this.__tlds__=t.slice(),this.__tlds_replaced__=!0,Fb(this),this)};Xi.prototype.normalize=function(t){t.schema||(t.url="http://"+t.url),t.schema==="mailto:"&&!/^mailto:/i.test(t.url)&&(t.url="mailto:"+t.url)};Xi.prototype.onCompile=function(){};const id=2147483647,Ma=36,$4=1,Om=26,YVe=38,ZVe=700,vK=72,yK=128,bK="-",XVe=/^xn--/,QVe=/[^\0-\x7F]/,JVe=/[\x2E\u3002\uFF0E\uFF61]/g,eHe={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},nC=Ma-$4,Ra=Math.floor,rC=String.fromCharCode;function ys(e){throw new RangeError(eHe[e])}function tHe(e,t){const n=[];let r=e.length;for(;r--;)n[r]=t(e[r]);return n}function wK(e,t){const n=e.split("@");let r="";n.length>1&&(r=n[0]+"@",e=n[1]),e=e.replace(JVe,".");const i=e.split("."),o=tHe(i,t).join(".");return r+o}function xK(e){const t=[];let n=0;const r=e.length;for(;n=55296&&i<=56319&&nString.fromCodePoint(...e),rHe=function(e){return e>=48&&e<58?26+(e-48):e>=65&&e<91?e-65:e>=97&&e<123?e-97:Ma},hI=function(e,t){return e+22+75*(e<26)-((t!=0)<<5)},_K=function(e,t,n){let r=0;for(e=n?Ra(e/ZVe):e>>1,e+=Ra(e/t);e>nC*Om>>1;r+=Ma)e=Ra(e/nC);return Ra(r+(nC+1)*e/(e+YVe))},SK=function(e){const t=[],n=e.length;let r=0,i=yK,o=vK,a=e.lastIndexOf(bK);a<0&&(a=0);for(let u=0;u=128&&ys("not-basic"),t.push(e.charCodeAt(u));for(let u=a>0?a+1:0;u=n&&ys("invalid-input");const h=rHe(e.charCodeAt(u++));h>=Ma&&ys("invalid-input"),h>Ra((id-r)/c)&&ys("overflow"),r+=h*c;const m=d<=o?$4:d>=o+Om?Om:d-o;if(hRa(id/g)&&ys("overflow"),c*=g}const l=t.length+1;o=_K(r-s,l,s==0),Ra(r/l)>id-i&&ys("overflow"),i+=Ra(r/l),r%=l,t.splice(r++,0,i)}return String.fromCodePoint(...t)},CK=function(e){const t=[];e=xK(e);const n=e.length;let r=yK,i=0,o=vK;for(const s of e)s<128&&t.push(rC(s));const a=t.length;let u=a;for(a&&t.push(bK);u=r&&cRa((id-i)/l)&&ys("overflow"),i+=(s-r)*l,r=s;for(const c of e)if(cid&&ys("overflow"),c===r){let d=i;for(let h=Ma;;h+=Ma){const m=h<=o?$4:h>=o+Om?Om:h-o;if(d=0))try{t.hostname=EK.toASCII(t.hostname)}catch{}return fg(O4(t))}function pHe(e){const t=P4(e,!0);if(t.hostname&&(!t.protocol||AK.indexOf(t.protocol)>=0))try{t.hostname=EK.toUnicode(t.hostname)}catch{}return Hd(O4(t),Hd.defaultChars+"%")}function da(e,t){if(!(this instanceof da))return new da(e,t);t||T4(e)||(t=e||{},e="default"),this.inline=new hg,this.block=new Nx,this.core=new R4,this.renderer=new _h,this.linkify=new Xi,this.validateLink=dHe,this.normalizeLink=hHe,this.normalizeLinkText=pHe,this.utils=gWe,this.helpers=$x({},wWe),this.options={},this.configure(e),t&&this.set(t)}da.prototype.set=function(e){return $x(this.options,e),this};da.prototype.configure=function(e){const t=this;if(T4(e)){const n=e;if(e=lHe[n],!e)throw new Error('Wrong `markdown-it` preset "'+n+'", check name')}if(!e)throw new Error("Wrong `markdown-it` preset, can't be empty");return e.options&&t.set(e.options),e.components&&Object.keys(e.components).forEach(function(n){e.components[n].rules&&t[n].ruler.enableOnly(e.components[n].rules),e.components[n].rules2&&t[n].ruler2.enableOnly(e.components[n].rules2)}),this};da.prototype.enable=function(e,t){let n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(i){n=n.concat(this[i].ruler.enable(e,!0))},this),n=n.concat(this.inline.ruler2.enable(e,!0));const r=e.filter(function(i){return n.indexOf(i)<0});if(r.length&&!t)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+r);return this};da.prototype.disable=function(e,t){let n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(i){n=n.concat(this[i].ruler.disable(e,!0))},this),n=n.concat(this.inline.ruler2.disable(e,!0));const r=e.filter(function(i){return n.indexOf(i)<0});if(r.length&&!t)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+r);return this};da.prototype.use=function(e){const t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this};da.prototype.parse=function(e,t){if(typeof e!="string")throw new Error("Input data should be a String");const n=new this.core.State(e,this,t);return this.core.process(n),n.tokens};da.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)};da.prototype.parseInline=function(e,t){const n=new this.core.State(e,this,t);return n.inlineMode=!0,this.core.process(n),n.tokens};da.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)};function Pm(e){return new Uint8Array(e)}function OK(e){return new Float64Array(e)}var pI=65536;function PK(e,t){for(var n=0;n>16&1),n[i-1]&=65535;n[15]=r[15]-32767-(n[14]>>16&1),a=n[15]>>16&1,n[14]&=65535,kp(r,n,1-a)}for(i=0;i<16;i++)e[2*i]=r[i]&255,e[2*i+1]=r[i]>>8}function vHe(e,t){for(var n=0;n<16;n++)e[n]=t[2*n]+(t[2*n+1]<<8);e[15]&=32767}function yHe(e,t){var n=Cr(),r;for(r=0;r<16;r++)n[r]=t[r];for(r=253;r>=0;r--)Pp(n,n),r!==2&&r!==4&&hu(n,n,t);for(r=0;r<16;r++)e[r]=n[r]}function bHe(e,t,n){var r=Pm(32),i=OK(80),o=Cr(),a=Cr(),u=Cr(),s=Cr(),l=Cr(),c=Cr(),d,h;for(h=0;h<31;h++)r[h]=t[h];for(r[31]=t[31]&127|64,r[0]&=248,vHe(i,n),h=0;h<16;h++)a[h]=i[h],s[h]=o[h]=u[h]=0;for(o[0]=s[0]=1,h=254;h>=0;--h)d=r[h>>>3]>>>(h&7)&1,kp(o,a,d),kp(u,s,d),ey(l,o,u),ty(o,o,u),ey(u,a,s),ty(a,a,s),Pp(s,l),Pp(c,o),hu(o,u,o),hu(u,a,l),ey(l,o,u),ty(o,o,u),Pp(a,o),ty(u,s,c),hu(o,u,mHe),ey(o,o,s),hu(u,u,o),hu(o,s,c),hu(s,a,i),Pp(a,l),kp(o,a,d),kp(u,s,d);for(h=0;h<16;h++)i[h+16]=o[h],i[h+32]=u[h],i[h+48]=a[h],i[h+64]=s[h];var m=i.subarray(32),g=i.subarray(16);return yHe(m,m),hu(g,g,m),gHe(e,g),0}function wHe(e,t){return bHe(e,t,kK)}function QKe(){var e=Pm(32),t=Pm(32);return xHe(e,t),{publicKey:e,secretKey:t}}function xHe(e,t){return PK(t,32),wHe(e,t)}var I4="Checkbox",[_He,JKe]=ri(I4),[SHe,CHe]=_He(I4),TK=b.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:i,defaultChecked:o,required:a,disabled:u,value:s="on",onCheckedChange:l,form:c,...d}=e,[h,m]=b.useState(null),g=kt(t,A=>m(A)),v=b.useRef(!1),y=h?c||!!h.closest("form"):!0,[x=!1,w]=sa({prop:i,defaultProp:o,onChange:l}),S=b.useRef(x);return b.useEffect(()=>{const A=h?.form;if(A){const E=()=>w(S.current);return A.addEventListener("reset",E),()=>A.removeEventListener("reset",E)}},[h,w]),R.jsxs(SHe,{scope:n,state:x,disabled:u,children:[R.jsx(Qe.button,{type:"button",role:"checkbox","aria-checked":Us(x)?"mixed":x,"aria-required":a,"data-state":DK(x),"data-disabled":u?"":void 0,disabled:u,value:s,...d,ref:g,onKeyDown:De(e.onKeyDown,A=>{A.key==="Enter"&&A.preventDefault()}),onClick:De(e.onClick,A=>{w(E=>Us(E)?!0:!E),y&&(v.current=A.isPropagationStopped(),v.current||A.stopPropagation())})}),y&&R.jsx(EHe,{control:h,bubbles:!v.current,name:r,value:s,checked:x,required:a,disabled:u,form:c,style:{transform:"translateX(-100%)"},defaultChecked:Us(o)?!1:o})]})});TK.displayName=I4;var MK="CheckboxIndicator",RK=b.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...i}=e,o=CHe(MK,n);return R.jsx(Ci,{present:r||Us(o.state)||o.state===!0,children:R.jsx(Qe.span,{"data-state":DK(o.state),"data-disabled":o.disabled?"":void 0,...i,ref:t,style:{pointerEvents:"none",...e.style}})})});RK.displayName=MK;var EHe=e=>{const{control:t,checked:n,bubbles:r=!0,defaultChecked:i,...o}=e,a=b.useRef(null),u=YP(n),s=EO(t);b.useEffect(()=>{const c=a.current,d=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(d,"checked").set;if(u!==n&&m){const g=new Event("click",{bubbles:r});c.indeterminate=Us(n),m.call(c,Us(n)?!1:n),c.dispatchEvent(g)}},[u,n,r]);const l=b.useRef(Us(n)?!1:n);return R.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:i??l.current,...o,tabIndex:-1,ref:a,style:{...e.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function Us(e){return e==="indeterminate"}function DK(e){return Us(e)?"indeterminate":e?"checked":"unchecked"}var eYe=TK,tYe=RK,N4="Tabs",[AHe,nYe]=ri(N4,[Ew]),$K=Ew(),[OHe,F4]=AHe(N4),IK=b.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:i,defaultValue:o,orientation:a="horizontal",dir:u,activationMode:s="automatic",...l}=e,c=yw(u),[d,h]=sa({prop:r,onChange:i,defaultProp:o});return R.jsx(OHe,{scope:n,baseId:Hi(),value:d,onValueChange:h,orientation:a,dir:c,activationMode:s,children:R.jsx(Qe.div,{dir:c,"data-orientation":a,...l,ref:t})})});IK.displayName=N4;var NK="TabsList",FK=b.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...i}=e,o=F4(NK,n),a=$K(n);return R.jsx(IB,{asChild:!0,...a,orientation:o.orientation,dir:o.dir,loop:r,children:R.jsx(Qe.div,{role:"tablist","aria-orientation":o.orientation,...i,ref:t})})});FK.displayName=NK;var LK="TabsTrigger",jK=b.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:i=!1,...o}=e,a=F4(LK,n),u=$K(n),s=UK(a.baseId,r),l=WK(a.baseId,r),c=r===a.value;return R.jsx(NB,{asChild:!0,...u,focusable:!i,active:c,children:R.jsx(Qe.button,{type:"button",role:"tab","aria-selected":c,"aria-controls":l,"data-state":c?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:s,...o,ref:t,onMouseDown:De(e.onMouseDown,d=>{!i&&d.button===0&&d.ctrlKey===!1?a.onValueChange(r):d.preventDefault()}),onKeyDown:De(e.onKeyDown,d=>{[" ","Enter"].includes(d.key)&&a.onValueChange(r)}),onFocus:De(e.onFocus,()=>{const d=a.activationMode!=="manual";!c&&!i&&d&&a.onValueChange(r)})})})});jK.displayName=LK;var BK="TabsContent",zK=b.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:i,children:o,...a}=e,u=F4(BK,n),s=UK(u.baseId,r),l=WK(u.baseId,r),c=r===u.value,d=b.useRef(c);return b.useEffect(()=>{const h=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(h)},[]),R.jsx(Ci,{present:i||c,children:({present:h})=>R.jsx(Qe.div,{"data-state":c?"active":"inactive","data-orientation":u.orientation,role:"tabpanel","aria-labelledby":s,hidden:!h,id:l,tabIndex:0,...a,ref:t,style:{...e.style,animationDuration:d.current?"0s":void 0},children:h&&o})})});zK.displayName=BK;function UK(e,t){return`${e}-trigger-${t}`}function WK(e,t){return`${e}-content-${t}`}var rYe=IK,iYe=FK,oYe=jK,aYe=zK;export{sGe as $,jhe as A,wqe as B,Oqe as C,Uhe as D,Whe as E,Aqe as F,uB as G,zqe as H,eqe as I,Hhe as J,Bhe as K,zhe as L,qHe as M,Jqe as N,kHe as O,$He as P,xqe as Q,$ as R,qs as S,Vhe as T,dpe as U,hpe as V,hGe as W,Lqe as X,pGe as Y,iGe as Z,oGe as _,FHe as a,uKe as a$,lGe as a0,fGe as a1,$qe as a2,cGe as a3,Wqe as a4,uGe as a5,dGe as a6,nGe as a7,rGe as a8,aGe as a9,_Ge as aA,Gqe as aB,VGe as aC,iqe as aD,cqe as aE,QGe as aF,JGe as aG,eKe as aH,NHe as aI,tKe as aJ,rKe as aK,Cx as aL,Ex as aM,R7e as aN,fu as aO,ed as aP,Uc as aQ,xx as aR,Cqe as aS,zGe as aT,TGe as aU,CGe as aV,kGe as aW,OGe as aX,YGe as aY,GGe as aZ,oKe as a_,vGe as aa,wGe as ab,yGe as ac,bGe as ad,RHe as ae,VHe as af,KHe as ag,lqe as ah,jHe as ai,YHe as aj,oqe as ak,GHe as al,JHe as am,sqe as an,uqe as ao,tqe as ap,aqe as aq,WHe as ar,zHe as as,ZHe as at,pqe as au,hqe as av,fqe as aw,mqe as ax,rqe as ay,HHe as az,Im as b,BGe as b$,aKe as b0,sKe as b1,Nqe as b2,vKe as b3,jqe as b4,yKe as b5,lKe as b6,cKe as b7,fKe as b8,hKe as b9,BHe as bA,TKe as bB,MKe as bC,Eqe as bD,Vqe as bE,Hqe as bF,LKe as bG,BKe as bH,$Ge as bI,AGe as bJ,HKe as bK,qKe as bL,YKe as bM,ZKe as bN,GKe as bO,KKe as bP,UKe as bQ,WKe as bR,VKe as bS,qqe as bT,Kqe as bU,qGe as bV,jKe as bW,RKe as bX,IKe as bY,NKe as bZ,FKe as b_,pKe as ba,gKe as bb,mKe as bc,bKe as bd,dKe as be,xKe as bf,Fqe as bg,EKe as bh,AKe as bi,SKe as bj,CKe as bk,RS as bl,OKe as bm,UGe as bn,SGe as bo,PGe as bp,EGe as bq,nKe as br,zc as bs,wKe as bt,MGe as bu,Wc as bv,PKe as bw,UHe as bx,dqe as by,nqe as bz,Pt as c,KGe as c0,ZGe as c1,DKe as c2,$Ke as c3,da as c4,Fn as c5,Yqe as c6,xc as c7,QKe as c8,XKe as c9,HGe as ca,NGe as cb,LGe as cc,WGe as cd,FGe as ce,eYe as cf,tYe as cg,Bqe as ch,Xqe as ci,Iqe as cj,Uqe as ck,Zqe as cl,jGe as cm,DGe as cn,Bje as co,DHe as cp,iYe as cq,oYe as cr,aYe as cs,rYe as ct,IGe as cu,RGe as cv,THe as d,ur as e,bqe as f,vqe as g,yqe as h,gqe as i,R as j,u8 as k,Sqe as l,MHe as m,Mqe as n,rO as o,QHe as p,XHe as q,b as r,Rqe as s,LHe as t,BF as u,Dqe as v,IHe as w,Pqe as x,Tqe as y,kqe as z}; +`:">",o};Zh.prototype.renderInline=function(e,t,n){let r="";const i=this.rules;for(let o=0,a=e.length;o=0&&(r=this.attrs[n][1]),r};nu.prototype.attrJoin=function(t,n){const r=this.attrIndex(t);r<0?this.attrPush([t,n]):this.attrs[r][1]=this.attrs[r][1]+" "+n};function qG(e,t,n){this.src=e,this.env=n,this.tokens=[],this.inlineMode=!1,this.md=t}qG.prototype.Token=nu;const UVe=/\r\n?|\n/g,WVe=/\0/g;function VVe(e){let t;t=e.src.replace(UVe,` +`),t=t.replace(WVe,"�"),e.src=t}function HVe(e){let t;e.inlineMode?(t=new e.Token("inline","",0),t.content=e.src,t.map=[0,1],t.children=[],e.tokens.push(t)):e.md.block.parse(e.src,e.md,e.env,e.tokens)}function qVe(e){const t=e.tokens;for(let n=0,r=t.length;n\s]/i.test(e)}function GVe(e){return/^<\/a\s*>/i.test(e)}function YVe(e){const t=e.tokens;if(e.md.options.linkify)for(let n=0,r=t.length;n=0;a--){const u=i[a];if(u.type==="link_close"){for(a--;i[a].level!==u.level&&i[a].type!=="link_open";)a--;continue}if(u.type==="html_inline"&&(KVe(u.content)&&o>0&&o--,GVe(u.content)&&o++),!(o>0)&&u.type==="text"&&e.md.linkify.test(u.content)){const s=u.content;let l=e.md.linkify.match(s);const c=[];let d=u.level,h=0;l.length>0&&l[0].index===0&&a>0&&i[a-1].type==="text_special"&&(l=l.slice(1));for(let v=0;vh){const E=new e.Token("text","",0);E.content=s.slice(h,w),E.level=d,c.push(E)}const x=new e.Token("link_open","a",1);x.attrs=[["href",m]],x.level=d++,x.markup="linkify",x.info="auto",c.push(x);const S=new e.Token("text","",0);S.content=b,S.level=d,c.push(S);const A=new e.Token("link_close","a",-1);A.level=--d,A.markup="linkify",A.info="auto",c.push(A),h=l[v].lastIndex}if(h=0;n--){const r=e[n];r.type==="text"&&!t&&(r.content=r.content.replace(XVe,JVe)),r.type==="link_open"&&r.info==="auto"&&t--,r.type==="link_close"&&r.info==="auto"&&t++}}function tHe(e){let t=0;for(let n=e.length-1;n>=0;n--){const r=e[n];r.type==="text"&&!t&&KG.test(r.content)&&(r.content=r.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/mg,"$1—").replace(/(^|\s)--(?=\s|$)/mg,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/mg,"$1–")),r.type==="link_open"&&r.info==="auto"&&t--,r.type==="link_close"&&r.info==="auto"&&t++}}function nHe(e){let t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)e.tokens[t].type==="inline"&&(ZVe.test(e.tokens[t].content)&&eHe(e.tokens[t].children),KG.test(e.tokens[t].content)&&tHe(e.tokens[t].children))}const rHe=/['"]/,gI=/['"]/g,mI="’";function by(e,t,n){return e.slice(0,t)+n+e.slice(t+1)}function iHe(e,t){let n;const r=[];for(let i=0;i=0&&!(r[n].level<=a);n--);if(r.length=n+1,o.type!=="text")continue;let u=o.content,s=0,l=u.length;e:for(;s=0)g=u.charCodeAt(c.index-1);else for(n=i-1;n>=0&&!(e[n].type==="softbreak"||e[n].type==="hardbreak");n--)if(e[n].content){g=e[n].content.charCodeAt(e[n].content.length-1);break}let m=32;if(s=48&&g<=57&&(h=d=!1),d&&h&&(d=b,h=w),!d&&!h){v&&(o.content=by(o.content,c.index,mI));continue}if(h)for(n=r.length-1;n>=0;n--){let A=r[n];if(r[n].level=0;t--)e.tokens[t].type!=="inline"||!rHe.test(e.tokens[t].content)||iHe(e.tokens[t].children,e)}function aHe(e){let t,n;const r=e.tokens,i=r.length;for(let o=0;o0&&this.level++,this.tokens.push(r),r};Ru.prototype.isEmpty=function(t){return this.bMarks[t]+this.tShift[t]>=this.eMarks[t]};Ru.prototype.skipEmptyLines=function(t){for(let n=this.lineMax;tn;)if(!Vn(this.src.charCodeAt(--t)))return t+1;return t};Ru.prototype.skipChars=function(t,n){for(let r=this.src.length;tr;)if(n!==this.src.charCodeAt(--t))return t+1;return t};Ru.prototype.getLines=function(t,n,r,i){if(t>=n)return"";const o=new Array(n-t);for(let a=0,u=t;ur?o[a]=new Array(s-r+1).join(" ")+this.src.slice(c,d):o[a]=this.src.slice(c,d)}return o.join("")};Ru.prototype.Token=nu;const uHe=65536;function h3(e,t){const n=e.bMarks[t]+e.tShift[t],r=e.eMarks[t];return e.src.slice(n,r)}function yI(e){const t=[],n=e.length;let r=0,i=e.charCodeAt(r),o=!1,a=0,u="";for(;rn)return!1;let i=t+1;if(e.sCount[i]=4)return!1;let o=e.bMarks[i]+e.tShift[i];if(o>=e.eMarks[i])return!1;const a=e.src.charCodeAt(o++);if(a!==124&&a!==45&&a!==58||o>=e.eMarks[i])return!1;const u=e.src.charCodeAt(o++);if(u!==124&&u!==45&&u!==58&&!Vn(u)||a===45&&Vn(u))return!1;for(;o=4)return!1;l=yI(s),l.length&&l[0]===""&&l.shift(),l.length&&l[l.length-1]===""&&l.pop();const d=l.length;if(d===0||d!==c.length)return!1;if(r)return!0;const h=e.parentType;e.parentType="table";const v=e.md.block.ruler.getRules("blockquote"),g=e.push("table_open","table",1),m=[t,0];g.map=m;const b=e.push("thead_open","thead",1);b.map=[t,t+1];const w=e.push("tr_open","tr",1);w.map=[t,t+1];for(let A=0;A=4||(l=yI(s),l.length&&l[0]===""&&l.shift(),l.length&&l[l.length-1]===""&&l.pop(),S+=d-l.length,S>uHe))break;if(i===t+2){const C=e.push("tbody_open","tbody",1);C.map=x=[t+2,0]}const E=e.push("tr_open","tr",1);E.map=[i,i+1];for(let C=0;C=4){r++,i=r;continue}break}e.line=i;const o=e.push("code_block","code",0);return o.content=e.getLines(t,i,4+e.blkIndent,!1)+` +`,o.map=[t,e.line],!0}function cHe(e,t,n,r){let i=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||i+3>o)return!1;const a=e.src.charCodeAt(i);if(a!==126&&a!==96)return!1;let u=i;i=e.skipChars(i,a);let s=i-u;if(s<3)return!1;const l=e.src.slice(u,i),c=e.src.slice(i,o);if(a===96&&c.indexOf(String.fromCharCode(a))>=0)return!1;if(r)return!0;let d=t,h=!1;for(;d++,!(d>=n||(i=u=e.bMarks[d]+e.tShift[d],o=e.eMarks[d],i=4)&&(i=e.skipChars(i,a),!(i-u=4||e.src.charCodeAt(i)!==62)return!1;if(r)return!0;const u=[],s=[],l=[],c=[],d=e.md.block.ruler.getRules("blockquote"),h=e.parentType;e.parentType="blockquote";let v=!1,g;for(g=t;g=o)break;if(e.src.charCodeAt(i++)===62&&!S){let E=e.sCount[g]+1,C,T;e.src.charCodeAt(i)===32?(i++,E++,T=!1,C=!0):e.src.charCodeAt(i)===9?(C=!0,(e.bsCount[g]+E)%4===3?(i++,E++,T=!1):T=!0):C=!1;let M=E;for(u.push(e.bMarks[g]),e.bMarks[g]=i;i=o,s.push(e.bsCount[g]),e.bsCount[g]=e.sCount[g]+1+(C?1:0),l.push(e.sCount[g]),e.sCount[g]=M-E,c.push(e.tShift[g]),e.tShift[g]=i-e.bMarks[g];continue}if(v)break;let A=!1;for(let E=0,C=d.length;E";const w=[t,0];b.map=w,e.md.block.tokenize(e,t,g);const x=e.push("blockquote_close","blockquote",-1);x.markup=">",e.lineMax=a,e.parentType=h,w[1]=e.line;for(let S=0;S=4)return!1;let o=e.bMarks[t]+e.tShift[t];const a=e.src.charCodeAt(o++);if(a!==42&&a!==45&&a!==95)return!1;let u=1;for(;o=r)return-1;let o=e.src.charCodeAt(i++);if(o<48||o>57)return-1;for(;;){if(i>=r)return-1;if(o=e.src.charCodeAt(i++),o>=48&&o<=57){if(i-n>=10)return-1;continue}if(o===41||o===46)break;return-1}return i=4||e.listIndent>=0&&e.sCount[s]-e.listIndent>=4&&e.sCount[s]=e.blkIndent&&(c=!0);let d,h,v;if((v=xI(e,s))>=0){if(d=!0,a=e.bMarks[s]+e.tShift[s],h=Number(e.src.slice(a,v-1)),c&&h!==1)return!1}else if((v=bI(e,s))>=0)d=!1;else return!1;if(c&&e.skipSpaces(v)>=e.eMarks[s])return!1;if(r)return!0;const g=e.src.charCodeAt(v-1),m=e.tokens.length;d?(u=e.push("ordered_list_open","ol",1),h!==1&&(u.attrs=[["start",h]])):u=e.push("bullet_list_open","ul",1);const b=[s,0];u.map=b,u.markup=String.fromCharCode(g);let w=!1;const x=e.md.block.ruler.getRules("list"),S=e.parentType;for(e.parentType="list";s=i?T=1:T=E-A,T>4&&(T=1);const M=A+T;u=e.push("list_item_open","li",1),u.markup=String.fromCharCode(g);const F=[s,0];u.map=F,d&&(u.info=e.src.slice(a,v-1));const U=e.tight,H=e.tShift[s],W=e.sCount[s],ie=e.listIndent;if(e.listIndent=e.blkIndent,e.blkIndent=M,e.tight=!0,e.tShift[s]=C-e.bMarks[s],e.sCount[s]=E,C>=i&&e.isEmpty(s+1)?e.line=Math.min(e.line+2,n):e.md.block.tokenize(e,s,n,!0),(!e.tight||w)&&(l=!1),w=e.line-s>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=ie,e.tShift[s]=H,e.sCount[s]=W,e.tight=U,u=e.push("list_item_close","li",-1),u.markup=String.fromCharCode(g),s=e.line,F[1]=s,s>=n||e.sCount[s]=4)break;let Z=!1;for(let G=0,K=x.length;G=4||e.src.charCodeAt(i)!==91)return!1;function u(x){const S=e.lineMax;if(x>=S||e.isEmpty(x))return null;let A=!1;if(e.sCount[x]-e.blkIndent>3&&(A=!0),e.sCount[x]<0&&(A=!0),!A){const T=e.md.block.ruler.getRules("reference"),M=e.parentType;e.parentType="reference";let F=!1;for(let U=0,H=T.length;U"u"&&(e.env.references={}),typeof e.env.references[w]>"u"&&(e.env.references[w]={title:b,href:d}),e.line=a),!0):!1}const gHe=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],mHe="[a-zA-Z_:][a-zA-Z0-9:._-]*",yHe="[^\"'=<>`\\x00-\\x20]+",bHe="'[^']*'",xHe='"[^"]*"',wHe="(?:"+yHe+"|"+bHe+"|"+xHe+")",_He="(?:\\s+"+mHe+"(?:\\s*=\\s*"+wHe+")?)",GG="<[A-Za-z][A-Za-z0-9\\-]*"+_He+"*\\s*\\/?>",YG="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",SHe="",CHe="<[?][\\s\\S]*?[?]>",EHe="]*>",AHe="",PHe=new RegExp("^(?:"+GG+"|"+YG+"|"+SHe+"|"+CHe+"|"+EHe+"|"+AHe+")"),OHe=new RegExp("^(?:"+GG+"|"+YG+")"),qf=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^/,!0],[/^<\?/,/\?>/,!0],[/^/,!0],[/^/,!0],[new RegExp("^|$))","i"),/^$/,!0],[new RegExp(OHe.source+"\\s*$"),/^$/,!1]];function kHe(e,t,n,r){let i=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||!e.md.options.html||e.src.charCodeAt(i)!==60)return!1;let a=e.src.slice(i,o),u=0;for(;u=4)return!1;let a=e.src.charCodeAt(i);if(a!==35||i>=o)return!1;let u=1;for(a=e.src.charCodeAt(++i);a===35&&i6||ii&&Vn(e.src.charCodeAt(s-1))&&(o=s),e.line=t+1;const l=e.push("heading_open","h"+String(u),1);l.markup="########".slice(0,u),l.map=[t,e.line];const c=e.push("inline","",0);c.content=e.src.slice(i,o).trim(),c.map=[t,e.line],c.children=[];const d=e.push("heading_close","h"+String(u),-1);return d.markup="########".slice(0,u),!0}function MHe(e,t,n){const r=e.md.block.ruler.getRules("paragraph");if(e.sCount[t]-e.blkIndent>=4)return!1;const i=e.parentType;e.parentType="paragraph";let o=0,a,u=t+1;for(;u3)continue;if(e.sCount[u]>=e.blkIndent){let v=e.bMarks[u]+e.tShift[u];const g=e.eMarks[u];if(v=g))){o=a===61?1:2;break}}if(e.sCount[u]<0)continue;let h=!1;for(let v=0,g=r.length;v3||e.sCount[o]<0)continue;let l=!1;for(let c=0,d=r.length;c=n||e.sCount[a]=o){e.line=n;break}const s=e.line;let l=!1;for(let c=0;c=e.line)throw new Error("block rule didn't increment state.line");break}if(!l)throw new Error("none of the block rules matched");e.tight=!u,e.isEmpty(e.line-1)&&(u=!0),a=e.line,a0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],i={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(r),this.tokens_meta.push(i),r};Ig.prototype.scanDelims=function(e,t){const n=this.posMax,r=this.src.charCodeAt(e),i=e>0?this.src.charCodeAt(e-1):32;let o=e;for(;o0)return!1;const n=e.pos,r=e.posMax;if(n+3>r||e.src.charCodeAt(n)!==58||e.src.charCodeAt(n+1)!==47||e.src.charCodeAt(n+2)!==47)return!1;const i=e.pending.match(IHe);if(!i)return!1;const o=i[1],a=e.md.linkify.matchAtStart(e.src.slice(n-o.length));if(!a)return!1;let u=a.url;if(u.length<=o.length)return!1;u=u.replace(/\*+$/,"");const s=e.md.normalizeLink(u);if(!e.md.validateLink(s))return!1;if(!t){e.pending=e.pending.slice(0,-o.length);const l=e.push("link_open","a",1);l.attrs=[["href",s]],l.markup="linkify",l.info="auto";const c=e.push("text","",0);c.content=e.md.normalizeLinkText(u);const d=e.push("link_close","a",-1);d.markup="linkify",d.info="auto"}return e.pos+=u.length-o.length,!0}function FHe(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==10)return!1;const r=e.pending.length-1,i=e.posMax;if(!t)if(r>=0&&e.pending.charCodeAt(r)===32)if(r>=1&&e.pending.charCodeAt(r-1)===32){let o=r-1;for(;o>=1&&e.pending.charCodeAt(o-1)===32;)o--;e.pending=e.pending.slice(0,o),e.push("hardbreak","br",0)}else e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0);else e.push("softbreak","br",0);for(n++;n?@[]^_`{|}~-".split("").forEach(function(e){n5[e.charCodeAt(0)]=1});function LHe(e,t){let n=e.pos;const r=e.posMax;if(e.src.charCodeAt(n)!==92||(n++,n>=r))return!1;let i=e.src.charCodeAt(n);if(i===10){for(t||e.push("hardbreak","br",0),n++;n=55296&&i<=56319&&n+1=56320&&u<=57343&&(o+=e.src[n+1],n++)}const a="\\"+o;if(!t){const u=e.push("text_special","",0);i<256&&n5[i]!==0?u.content=o:u.content=a,u.markup=a,u.info="escape"}return e.pos=n+1,!0}function jHe(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==96)return!1;const i=n;n++;const o=e.posMax;for(;n=0;r--){const i=t[r];if(i.marker!==95&&i.marker!==42||i.end===-1)continue;const o=t[i.end],a=r>0&&t[r-1].end===i.end+1&&t[r-1].marker===i.marker&&t[r-1].token===i.token-1&&t[i.end+1].token===o.token+1,u=String.fromCharCode(i.marker),s=e.tokens[i.token];s.type=a?"strong_open":"em_open",s.tag=a?"strong":"em",s.nesting=1,s.markup=a?u+u:u,s.content="";const l=e.tokens[o.token];l.type=a?"strong_close":"em_close",l.tag=a?"strong":"em",l.nesting=-1,l.markup=a?u+u:u,l.content="",a&&(e.tokens[t[r-1].token].content="",e.tokens[t[i.end+1].token].content="",r--)}}function WHe(e){const t=e.tokens_meta,n=e.tokens_meta.length;_I(e,e.delimiters);for(let r=0;r=d)return!1;if(s=g,i=e.md.helpers.parseLinkDestination(e.src,g,e.posMax),i.ok){for(a=e.md.normalizeLink(i.str),e.md.validateLink(a)?g=i.pos:a="",s=g;g=d||e.src.charCodeAt(g)!==41)&&(l=!0),g++}if(l){if(typeof e.env.references>"u")return!1;if(g=0?r=e.src.slice(s,g++):g=v+1):g=v+1,r||(r=e.src.slice(h,v)),o=e.env.references[n2(r)],!o)return e.pos=c,!1;a=o.href,u=o.title}if(!t){e.pos=h,e.posMax=v;const m=e.push("link_open","a",1),b=[["href",a]];m.attrs=b,u&&b.push(["title",u]),e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,e.push("link_close","a",-1)}return e.pos=g,e.posMax=d,!0}function HHe(e,t){let n,r,i,o,a,u,s,l,c="";const d=e.pos,h=e.posMax;if(e.src.charCodeAt(e.pos)!==33||e.src.charCodeAt(e.pos+1)!==91)return!1;const v=e.pos+2,g=e.md.helpers.parseLinkLabel(e,e.pos+1,!1);if(g<0)return!1;if(o=g+1,o=h)return!1;for(l=o,u=e.md.helpers.parseLinkDestination(e.src,o,e.posMax),u.ok&&(c=e.md.normalizeLink(u.str),e.md.validateLink(c)?o=u.pos:c=""),l=o;o=h||e.src.charCodeAt(o)!==41)return e.pos=d,!1;o++}else{if(typeof e.env.references>"u")return!1;if(o=0?i=e.src.slice(l,o++):o=g+1):o=g+1,i||(i=e.src.slice(v,g)),a=e.env.references[n2(i)],!a)return e.pos=d,!1;c=a.href,s=a.title}if(!t){r=e.src.slice(v,g);const m=[];e.md.inline.parse(r,e.md,e.env,m);const b=e.push("image","img",0),w=[["src",c],["alt",""]];b.attrs=w,b.children=m,b.content=r,s&&w.push(["title",s])}return e.pos=o,e.posMax=h,!0}const qHe=/^([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,KHe=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function GHe(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==60)return!1;const r=e.pos,i=e.posMax;for(;;){if(++n>=i)return!1;const a=e.src.charCodeAt(n);if(a===60)return!1;if(a===62)break}const o=e.src.slice(r+1,n);if(KHe.test(o)){const a=e.md.normalizeLink(o);if(!e.md.validateLink(a))return!1;if(!t){const u=e.push("link_open","a",1);u.attrs=[["href",a]],u.markup="autolink",u.info="auto";const s=e.push("text","",0);s.content=e.md.normalizeLinkText(o);const l=e.push("link_close","a",-1);l.markup="autolink",l.info="auto"}return e.pos+=o.length+2,!0}if(qHe.test(o)){const a=e.md.normalizeLink("mailto:"+o);if(!e.md.validateLink(a))return!1;if(!t){const u=e.push("link_open","a",1);u.attrs=[["href",a]],u.markup="autolink",u.info="auto";const s=e.push("text","",0);s.content=e.md.normalizeLinkText(o);const l=e.push("link_close","a",-1);l.markup="autolink",l.info="auto"}return e.pos+=o.length+2,!0}return!1}function YHe(e){return/^\s]/i.test(e)}function ZHe(e){return/^<\/a\s*>/i.test(e)}function XHe(e){const t=e|32;return t>=97&&t<=122}function QHe(e,t){if(!e.md.options.html)return!1;const n=e.posMax,r=e.pos;if(e.src.charCodeAt(r)!==60||r+2>=n)return!1;const i=e.src.charCodeAt(r+1);if(i!==33&&i!==63&&i!==47&&!XHe(i))return!1;const o=e.src.slice(r).match(PHe);if(!o)return!1;if(!t){const a=e.push("html_inline","",0);a.content=o[0],YHe(a.content)&&e.linkLevel++,ZHe(a.content)&&e.linkLevel--}return e.pos+=o[0].length,!0}const JHe=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,eqe=/^&([a-z][a-z0-9]{1,31});/i;function tqe(e,t){const n=e.pos,r=e.posMax;if(e.src.charCodeAt(n)!==38||n+1>=r)return!1;if(e.src.charCodeAt(n+1)===35){const o=e.src.slice(n).match(JHe);if(o){if(!t){const a=o[1][0].toLowerCase()==="x"?parseInt(o[1].slice(1),16):parseInt(o[1],10),u=e.push("text_special","",0);u.content=e5(a)?ix(a):ix(65533),u.markup=o[0],u.info="entity"}return e.pos+=o[0].length,!0}}else{const o=e.src.slice(n).match(eqe);if(o){const a=WG(o[0]);if(a!==o[0]){if(!t){const u=e.push("text_special","",0);u.content=a,u.markup=o[0],u.info="entity"}return e.pos+=o[0].length,!0}}}return!1}function SI(e){const t={},n=e.length;if(!n)return;let r=0,i=-2;const o=[];for(let a=0;as;l-=o[l]+1){const d=e[l];if(d.marker===u.marker&&d.open&&d.end<0){let h=!1;if((d.close||u.open)&&(d.length+u.length)%3===0&&(d.length%3!==0||u.length%3!==0)&&(h=!0),!h){const v=l>0&&!e[l-1].open?o[l-1]+1:0;o[a]=a-l+v,o[l]=v,u.open=!1,d.end=a,d.close=!1,c=-1,i=-2;break}}}c!==-1&&(t[u.marker][(u.open?3:0)+(u.length||0)%3]=c)}}function nqe(e){const t=e.tokens_meta,n=e.tokens_meta.length;SI(e.delimiters);for(let r=0;r0&&r++,i[t].type==="text"&&t+1=e.pos)throw new Error("inline rule didn't increment state.pos");break}}else e.pos=e.posMax;a||e.pos++,o[t]=e.pos};Ng.prototype.tokenize=function(e){const t=this.ruler.getRules(""),n=t.length,r=e.posMax,i=e.md.options.maxNesting;for(;e.pos=e.pos)throw new Error("inline rule didn't increment state.pos");break}}if(a){if(e.pos>=r)break;continue}e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()};Ng.prototype.parse=function(e,t,n,r){const i=new this.State(e,t,n,r);this.tokenize(i);const o=this.ruler2.getRules(""),a=o.length;for(let u=0;u|$))",t.tpl_email_fuzzy="(^|"+n+'|"|\\(|'+t.src_ZCc+")("+t.src_email_name+"@"+t.tpl_host_fuzzy_strict+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_fuzzy_strict+t.src_path+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+")",t}function Q6(e){return Array.prototype.slice.call(arguments,1).forEach(function(n){n&&Object.keys(n).forEach(function(r){e[r]=n[r]})}),e}function i2(e){return Object.prototype.toString.call(e)}function oqe(e){return i2(e)==="[object String]"}function aqe(e){return i2(e)==="[object Object]"}function uqe(e){return i2(e)==="[object RegExp]"}function CI(e){return i2(e)==="[object Function]"}function sqe(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}const QG={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function lqe(e){return Object.keys(e||{}).reduce(function(t,n){return t||QG.hasOwnProperty(n)},!1)}const cqe={"http:":{validate:function(e,t,n){const r=e.slice(t);return n.re.http||(n.re.http=new RegExp("^\\/\\/"+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,"i")),n.re.http.test(r)?r.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,n){const r=e.slice(t);return n.re.no_http||(n.re.no_http=new RegExp("^"+n.re.src_auth+"(?:localhost|(?:(?:"+n.re.src_domain+")\\.)+"+n.re.src_domain_root+")"+n.re.src_port+n.re.src_host_terminator+n.re.src_path,"i")),n.re.no_http.test(r)?t>=3&&e[t-3]===":"||t>=3&&e[t-3]==="/"?0:r.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,n){const r=e.slice(t);return n.re.mailto||(n.re.mailto=new RegExp("^"+n.re.src_email_name+"@"+n.re.src_host_strict,"i")),n.re.mailto.test(r)?r.match(n.re.mailto)[0].length:0}}},fqe="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",dqe="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function hqe(e){e.__index__=-1,e.__text_cache__=""}function pqe(e){return function(t,n){const r=t.slice(n);return e.test(r)?r.match(e)[0].length:0}}function EI(){return function(e,t){t.normalize(e)}}function ox(e){const t=e.re=iqe(e.__opts__),n=e.__tlds__.slice();e.onCompile(),e.__tlds_replaced__||n.push(fqe),n.push(t.src_xn),t.src_tlds=n.join("|");function r(u){return u.replace("%TLDS%",t.src_tlds)}t.email_fuzzy=RegExp(r(t.tpl_email_fuzzy),"i"),t.link_fuzzy=RegExp(r(t.tpl_link_fuzzy),"i"),t.link_no_ip_fuzzy=RegExp(r(t.tpl_link_no_ip_fuzzy),"i"),t.host_fuzzy_test=RegExp(r(t.tpl_host_fuzzy_test),"i");const i=[];e.__compiled__={};function o(u,s){throw new Error('(LinkifyIt) Invalid schema "'+u+'": '+s)}Object.keys(e.__schemas__).forEach(function(u){const s=e.__schemas__[u];if(s===null)return;const l={validate:null,link:null};if(e.__compiled__[u]=l,aqe(s)){uqe(s.validate)?l.validate=pqe(s.validate):CI(s.validate)?l.validate=s.validate:o(u,s),CI(s.normalize)?l.normalize=s.normalize:s.normalize?o(u,s):l.normalize=EI();return}if(oqe(s)){i.push(u);return}o(u,s)}),i.forEach(function(u){e.__compiled__[e.__schemas__[u]]&&(e.__compiled__[u].validate=e.__compiled__[e.__schemas__[u]].validate,e.__compiled__[u].normalize=e.__compiled__[e.__schemas__[u]].normalize)}),e.__compiled__[""]={validate:null,normalize:EI()};const a=Object.keys(e.__compiled__).filter(function(u){return u.length>0&&e.__compiled__[u]}).map(sqe).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+a+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+a+")","ig"),e.re.schema_at_start=RegExp("^"+e.re.schema_search.source,"i"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i"),hqe(e)}function vqe(e,t){const n=e.__index__,r=e.__last_index__,i=e.__text_cache__.slice(n,r);this.schema=e.__schema__.toLowerCase(),this.index=n+t,this.lastIndex=r+t,this.raw=i,this.text=i,this.url=i}function J6(e,t){const n=new vqe(e,t);return e.__compiled__[n.schema].normalize(n,e),n}function Uo(e,t){if(!(this instanceof Uo))return new Uo(e,t);t||lqe(e)&&(t=e,e={}),this.__opts__=Q6({},QG,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=Q6({},cqe,e),this.__compiled__={},this.__tlds__=dqe,this.__tlds_replaced__=!1,this.re={},ox(this)}Uo.prototype.add=function(t,n){return this.__schemas__[t]=n,ox(this),this};Uo.prototype.set=function(t){return this.__opts__=Q6(this.__opts__,t),this};Uo.prototype.test=function(t){if(this.__text_cache__=t,this.__index__=-1,!t.length)return!1;let n,r,i,o,a,u,s,l,c;if(this.re.schema_test.test(t)){for(s=this.re.schema_search,s.lastIndex=0;(n=s.exec(t))!==null;)if(o=this.testSchemaAt(t,n[2],s.lastIndex),o){this.__schema__=n[2],this.__index__=n.index+n[1].length,this.__last_index__=n.index+n[0].length+o;break}}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(l=t.search(this.re.host_fuzzy_test),l>=0&&(this.__index__<0||l=0&&(i=t.match(this.re.email_fuzzy))!==null&&(a=i.index+i[1].length,u=i.index+i[0].length,(this.__index__<0||athis.__last_index__)&&(this.__schema__="mailto:",this.__index__=a,this.__last_index__=u))),this.__index__>=0};Uo.prototype.pretest=function(t){return this.re.pretest.test(t)};Uo.prototype.testSchemaAt=function(t,n,r){return this.__compiled__[n.toLowerCase()]?this.__compiled__[n.toLowerCase()].validate(t,r,this):0};Uo.prototype.match=function(t){const n=[];let r=0;this.__index__>=0&&this.__text_cache__===t&&(n.push(J6(this,r)),r=this.__last_index__);let i=r?t.slice(r):t;for(;this.test(i);)n.push(J6(this,r)),i=i.slice(this.__last_index__),r+=this.__last_index__;return n.length?n:null};Uo.prototype.matchAtStart=function(t){if(this.__text_cache__=t,this.__index__=-1,!t.length)return null;const n=this.re.schema_at_start.exec(t);if(!n)return null;const r=this.testSchemaAt(t,n[2],n[0].length);return r?(this.__schema__=n[2],this.__index__=n.index+n[1].length,this.__last_index__=n.index+n[0].length+r,J6(this,0)):null};Uo.prototype.tlds=function(t,n){return t=Array.isArray(t)?t:[t],n?(this.__tlds__=this.__tlds__.concat(t).sort().filter(function(r,i,o){return r!==o[i-1]}).reverse(),ox(this),this):(this.__tlds__=t.slice(),this.__tlds_replaced__=!0,ox(this),this)};Uo.prototype.normalize=function(t){t.schema||(t.url="http://"+t.url),t.schema==="mailto:"&&!/^mailto:/i.test(t.url)&&(t.url="mailto:"+t.url)};Uo.prototype.onCompile=function(){};const Md=2147483647,mu=36,r5=1,Zv=26,gqe=38,mqe=700,JG=72,eY=128,tY="-",yqe=/^xn--/,bqe=/[^\0-\x7F]/,xqe=/[\x2E\u3002\uFF0E\uFF61]/g,wqe={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},g3=mu-r5,yu=Math.floor,m3=String.fromCharCode;function Ys(e){throw new RangeError(wqe[e])}function _qe(e,t){const n=[];let r=e.length;for(;r--;)n[r]=t(e[r]);return n}function nY(e,t){const n=e.split("@");let r="";n.length>1&&(r=n[0]+"@",e=n[1]),e=e.replace(xqe,".");const i=e.split("."),o=_qe(i,t).join(".");return r+o}function rY(e){const t=[];let n=0;const r=e.length;for(;n=55296&&i<=56319&&nString.fromCodePoint(...e),Cqe=function(e){return e>=48&&e<58?26+(e-48):e>=65&&e<91?e-65:e>=97&&e<123?e-97:mu},AI=function(e,t){return e+22+75*(e<26)-((t!=0)<<5)},iY=function(e,t,n){let r=0;for(e=n?yu(e/mqe):e>>1,e+=yu(e/t);e>g3*Zv>>1;r+=mu)e=yu(e/g3);return yu(r+(g3+1)*e/(e+gqe))},oY=function(e){const t=[],n=e.length;let r=0,i=eY,o=JG,a=e.lastIndexOf(tY);a<0&&(a=0);for(let u=0;u=128&&Ys("not-basic"),t.push(e.charCodeAt(u));for(let u=a>0?a+1:0;u=n&&Ys("invalid-input");const h=Cqe(e.charCodeAt(u++));h>=mu&&Ys("invalid-input"),h>yu((Md-r)/c)&&Ys("overflow"),r+=h*c;const v=d<=o?r5:d>=o+Zv?Zv:d-o;if(hyu(Md/g)&&Ys("overflow"),c*=g}const l=t.length+1;o=iY(r-s,l,s==0),yu(r/l)>Md-i&&Ys("overflow"),i+=yu(r/l),r%=l,t.splice(r++,0,i)}return String.fromCodePoint(...t)},aY=function(e){const t=[];e=rY(e);const n=e.length;let r=eY,i=0,o=JG;for(const s of e)s<128&&t.push(m3(s));const a=t.length;let u=a;for(a&&t.push(tY);u=r&&cyu((Md-i)/l)&&Ys("overflow"),i+=(s-r)*l,r=s;for(const c of e)if(cMd&&Ys("overflow"),c===r){let d=i;for(let h=mu;;h+=mu){const v=h<=o?r5:h>=o+Zv?Zv:h-o;if(d=0))try{t.hostname=uY.toASCII(t.hostname)}catch{}return $g(ZO(t))}function Iqe(e){const t=XO(e,!0);if(t.hostname&&(!t.protocol||sY.indexOf(t.protocol)>=0))try{t.hostname=uY.toUnicode(t.hostname)}catch{}return bh(ZO(t),bh.defaultChars+"%")}function Qa(e,t){if(!(this instanceof Qa))return new Qa(e,t);t||JO(e)||(t=e||{},e="default"),this.inline=new Ng,this.block=new r2,this.core=new t5,this.renderer=new Zh,this.linkify=new Uo,this.validateLink=Dqe,this.normalizeLink=$qe,this.normalizeLinkText=Iqe,this.utils=FVe,this.helpers=t2({},zVe),this.options={},this.configure(e),t&&this.set(t)}Qa.prototype.set=function(e){return t2(this.options,e),this};Qa.prototype.configure=function(e){const t=this;if(JO(e)){const n=e;if(e=Tqe[n],!e)throw new Error('Wrong `markdown-it` preset "'+n+'", check name')}if(!e)throw new Error("Wrong `markdown-it` preset, can't be empty");return e.options&&t.set(e.options),e.components&&Object.keys(e.components).forEach(function(n){e.components[n].rules&&t[n].ruler.enableOnly(e.components[n].rules),e.components[n].rules2&&t[n].ruler2.enableOnly(e.components[n].rules2)}),this};Qa.prototype.enable=function(e,t){let n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(i){n=n.concat(this[i].ruler.enable(e,!0))},this),n=n.concat(this.inline.ruler2.enable(e,!0));const r=e.filter(function(i){return n.indexOf(i)<0});if(r.length&&!t)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+r);return this};Qa.prototype.disable=function(e,t){let n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(i){n=n.concat(this[i].ruler.disable(e,!0))},this),n=n.concat(this.inline.ruler2.disable(e,!0));const r=e.filter(function(i){return n.indexOf(i)<0});if(r.length&&!t)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+r);return this};Qa.prototype.use=function(e){const t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this};Qa.prototype.parse=function(e,t){if(typeof e!="string")throw new Error("Input data should be a String");const n=new this.core.State(e,this,t);return this.core.process(n),n.tokens};Qa.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)};Qa.prototype.parseInline=function(e,t){const n=new this.core.State(e,this,t);return n.inlineMode=!0,this.core.process(n),n.tokens};Qa.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)};var lY={exports:{}};(function(e){(function(t){var n=function(k){var D,$=new Float64Array(16);if(k)for(D=0;D>24&255,k[D+1]=$>>16&255,k[D+2]=$>>8&255,k[D+3]=$&255,k[D+4]=P>>24&255,k[D+5]=P>>16&255,k[D+6]=P>>8&255,k[D+7]=P&255}function m(k,D,$,P,N){var ee,ne=0;for(ee=0;ee>>8)-1}function b(k,D,$,P){return m(k,D,$,P,16)}function w(k,D,$,P){return m(k,D,$,P,32)}function x(k,D,$,P){for(var N=P[0]&255|(P[1]&255)<<8|(P[2]&255)<<16|(P[3]&255)<<24,ee=$[0]&255|($[1]&255)<<8|($[2]&255)<<16|($[3]&255)<<24,ne=$[4]&255|($[5]&255)<<8|($[6]&255)<<16|($[7]&255)<<24,he=$[8]&255|($[9]&255)<<8|($[10]&255)<<16|($[11]&255)<<24,Ce=$[12]&255|($[13]&255)<<8|($[14]&255)<<16|($[15]&255)<<24,Be=P[4]&255|(P[5]&255)<<8|(P[6]&255)<<16|(P[7]&255)<<24,He=D[0]&255|(D[1]&255)<<8|(D[2]&255)<<16|(D[3]&255)<<24,ct=D[4]&255|(D[5]&255)<<8|(D[6]&255)<<16|(D[7]&255)<<24,Ne=D[8]&255|(D[9]&255)<<8|(D[10]&255)<<16|(D[11]&255)<<24,rt=D[12]&255|(D[13]&255)<<8|(D[14]&255)<<16|(D[15]&255)<<24,bt=P[8]&255|(P[9]&255)<<8|(P[10]&255)<<16|(P[11]&255)<<24,At=$[16]&255|($[17]&255)<<8|($[18]&255)<<16|($[19]&255)<<24,vt=$[20]&255|($[21]&255)<<8|($[22]&255)<<16|($[23]&255)<<24,ht=$[24]&255|($[25]&255)<<8|($[26]&255)<<16|($[27]&255)<<24,xt=$[28]&255|($[29]&255)<<8|($[30]&255)<<16|($[31]&255)<<24,wt=P[12]&255|(P[13]&255)<<8|(P[14]&255)<<16|(P[15]&255)<<24,Je=N,st=ee,Qe=ne,Le=he,qe=Ce,Ge=Be,me=He,ve=ct,De=Ne,Oe=rt,Te=bt,ze=At,mt=vt,Nt=ht,Ft=xt,$t=wt,te,Gt=0;Gt<20;Gt+=2)te=Je+mt|0,qe^=te<<7|te>>>25,te=qe+Je|0,De^=te<<9|te>>>23,te=De+qe|0,mt^=te<<13|te>>>19,te=mt+De|0,Je^=te<<18|te>>>14,te=Ge+st|0,Oe^=te<<7|te>>>25,te=Oe+Ge|0,Nt^=te<<9|te>>>23,te=Nt+Oe|0,st^=te<<13|te>>>19,te=st+Nt|0,Ge^=te<<18|te>>>14,te=Te+me|0,Ft^=te<<7|te>>>25,te=Ft+Te|0,Qe^=te<<9|te>>>23,te=Qe+Ft|0,me^=te<<13|te>>>19,te=me+Qe|0,Te^=te<<18|te>>>14,te=$t+ze|0,Le^=te<<7|te>>>25,te=Le+$t|0,ve^=te<<9|te>>>23,te=ve+Le|0,ze^=te<<13|te>>>19,te=ze+ve|0,$t^=te<<18|te>>>14,te=Je+Le|0,st^=te<<7|te>>>25,te=st+Je|0,Qe^=te<<9|te>>>23,te=Qe+st|0,Le^=te<<13|te>>>19,te=Le+Qe|0,Je^=te<<18|te>>>14,te=Ge+qe|0,me^=te<<7|te>>>25,te=me+Ge|0,ve^=te<<9|te>>>23,te=ve+me|0,qe^=te<<13|te>>>19,te=qe+ve|0,Ge^=te<<18|te>>>14,te=Te+Oe|0,ze^=te<<7|te>>>25,te=ze+Te|0,De^=te<<9|te>>>23,te=De+ze|0,Oe^=te<<13|te>>>19,te=Oe+De|0,Te^=te<<18|te>>>14,te=$t+Ft|0,mt^=te<<7|te>>>25,te=mt+$t|0,Nt^=te<<9|te>>>23,te=Nt+mt|0,Ft^=te<<13|te>>>19,te=Ft+Nt|0,$t^=te<<18|te>>>14;Je=Je+N|0,st=st+ee|0,Qe=Qe+ne|0,Le=Le+he|0,qe=qe+Ce|0,Ge=Ge+Be|0,me=me+He|0,ve=ve+ct|0,De=De+Ne|0,Oe=Oe+rt|0,Te=Te+bt|0,ze=ze+At|0,mt=mt+vt|0,Nt=Nt+ht|0,Ft=Ft+xt|0,$t=$t+wt|0,k[0]=Je>>>0&255,k[1]=Je>>>8&255,k[2]=Je>>>16&255,k[3]=Je>>>24&255,k[4]=st>>>0&255,k[5]=st>>>8&255,k[6]=st>>>16&255,k[7]=st>>>24&255,k[8]=Qe>>>0&255,k[9]=Qe>>>8&255,k[10]=Qe>>>16&255,k[11]=Qe>>>24&255,k[12]=Le>>>0&255,k[13]=Le>>>8&255,k[14]=Le>>>16&255,k[15]=Le>>>24&255,k[16]=qe>>>0&255,k[17]=qe>>>8&255,k[18]=qe>>>16&255,k[19]=qe>>>24&255,k[20]=Ge>>>0&255,k[21]=Ge>>>8&255,k[22]=Ge>>>16&255,k[23]=Ge>>>24&255,k[24]=me>>>0&255,k[25]=me>>>8&255,k[26]=me>>>16&255,k[27]=me>>>24&255,k[28]=ve>>>0&255,k[29]=ve>>>8&255,k[30]=ve>>>16&255,k[31]=ve>>>24&255,k[32]=De>>>0&255,k[33]=De>>>8&255,k[34]=De>>>16&255,k[35]=De>>>24&255,k[36]=Oe>>>0&255,k[37]=Oe>>>8&255,k[38]=Oe>>>16&255,k[39]=Oe>>>24&255,k[40]=Te>>>0&255,k[41]=Te>>>8&255,k[42]=Te>>>16&255,k[43]=Te>>>24&255,k[44]=ze>>>0&255,k[45]=ze>>>8&255,k[46]=ze>>>16&255,k[47]=ze>>>24&255,k[48]=mt>>>0&255,k[49]=mt>>>8&255,k[50]=mt>>>16&255,k[51]=mt>>>24&255,k[52]=Nt>>>0&255,k[53]=Nt>>>8&255,k[54]=Nt>>>16&255,k[55]=Nt>>>24&255,k[56]=Ft>>>0&255,k[57]=Ft>>>8&255,k[58]=Ft>>>16&255,k[59]=Ft>>>24&255,k[60]=$t>>>0&255,k[61]=$t>>>8&255,k[62]=$t>>>16&255,k[63]=$t>>>24&255}function S(k,D,$,P){for(var N=P[0]&255|(P[1]&255)<<8|(P[2]&255)<<16|(P[3]&255)<<24,ee=$[0]&255|($[1]&255)<<8|($[2]&255)<<16|($[3]&255)<<24,ne=$[4]&255|($[5]&255)<<8|($[6]&255)<<16|($[7]&255)<<24,he=$[8]&255|($[9]&255)<<8|($[10]&255)<<16|($[11]&255)<<24,Ce=$[12]&255|($[13]&255)<<8|($[14]&255)<<16|($[15]&255)<<24,Be=P[4]&255|(P[5]&255)<<8|(P[6]&255)<<16|(P[7]&255)<<24,He=D[0]&255|(D[1]&255)<<8|(D[2]&255)<<16|(D[3]&255)<<24,ct=D[4]&255|(D[5]&255)<<8|(D[6]&255)<<16|(D[7]&255)<<24,Ne=D[8]&255|(D[9]&255)<<8|(D[10]&255)<<16|(D[11]&255)<<24,rt=D[12]&255|(D[13]&255)<<8|(D[14]&255)<<16|(D[15]&255)<<24,bt=P[8]&255|(P[9]&255)<<8|(P[10]&255)<<16|(P[11]&255)<<24,At=$[16]&255|($[17]&255)<<8|($[18]&255)<<16|($[19]&255)<<24,vt=$[20]&255|($[21]&255)<<8|($[22]&255)<<16|($[23]&255)<<24,ht=$[24]&255|($[25]&255)<<8|($[26]&255)<<16|($[27]&255)<<24,xt=$[28]&255|($[29]&255)<<8|($[30]&255)<<16|($[31]&255)<<24,wt=P[12]&255|(P[13]&255)<<8|(P[14]&255)<<16|(P[15]&255)<<24,Je=N,st=ee,Qe=ne,Le=he,qe=Ce,Ge=Be,me=He,ve=ct,De=Ne,Oe=rt,Te=bt,ze=At,mt=vt,Nt=ht,Ft=xt,$t=wt,te,Gt=0;Gt<20;Gt+=2)te=Je+mt|0,qe^=te<<7|te>>>25,te=qe+Je|0,De^=te<<9|te>>>23,te=De+qe|0,mt^=te<<13|te>>>19,te=mt+De|0,Je^=te<<18|te>>>14,te=Ge+st|0,Oe^=te<<7|te>>>25,te=Oe+Ge|0,Nt^=te<<9|te>>>23,te=Nt+Oe|0,st^=te<<13|te>>>19,te=st+Nt|0,Ge^=te<<18|te>>>14,te=Te+me|0,Ft^=te<<7|te>>>25,te=Ft+Te|0,Qe^=te<<9|te>>>23,te=Qe+Ft|0,me^=te<<13|te>>>19,te=me+Qe|0,Te^=te<<18|te>>>14,te=$t+ze|0,Le^=te<<7|te>>>25,te=Le+$t|0,ve^=te<<9|te>>>23,te=ve+Le|0,ze^=te<<13|te>>>19,te=ze+ve|0,$t^=te<<18|te>>>14,te=Je+Le|0,st^=te<<7|te>>>25,te=st+Je|0,Qe^=te<<9|te>>>23,te=Qe+st|0,Le^=te<<13|te>>>19,te=Le+Qe|0,Je^=te<<18|te>>>14,te=Ge+qe|0,me^=te<<7|te>>>25,te=me+Ge|0,ve^=te<<9|te>>>23,te=ve+me|0,qe^=te<<13|te>>>19,te=qe+ve|0,Ge^=te<<18|te>>>14,te=Te+Oe|0,ze^=te<<7|te>>>25,te=ze+Te|0,De^=te<<9|te>>>23,te=De+ze|0,Oe^=te<<13|te>>>19,te=Oe+De|0,Te^=te<<18|te>>>14,te=$t+Ft|0,mt^=te<<7|te>>>25,te=mt+$t|0,Nt^=te<<9|te>>>23,te=Nt+mt|0,Ft^=te<<13|te>>>19,te=Ft+Nt|0,$t^=te<<18|te>>>14;k[0]=Je>>>0&255,k[1]=Je>>>8&255,k[2]=Je>>>16&255,k[3]=Je>>>24&255,k[4]=Ge>>>0&255,k[5]=Ge>>>8&255,k[6]=Ge>>>16&255,k[7]=Ge>>>24&255,k[8]=Te>>>0&255,k[9]=Te>>>8&255,k[10]=Te>>>16&255,k[11]=Te>>>24&255,k[12]=$t>>>0&255,k[13]=$t>>>8&255,k[14]=$t>>>16&255,k[15]=$t>>>24&255,k[16]=me>>>0&255,k[17]=me>>>8&255,k[18]=me>>>16&255,k[19]=me>>>24&255,k[20]=ve>>>0&255,k[21]=ve>>>8&255,k[22]=ve>>>16&255,k[23]=ve>>>24&255,k[24]=De>>>0&255,k[25]=De>>>8&255,k[26]=De>>>16&255,k[27]=De>>>24&255,k[28]=Oe>>>0&255,k[29]=Oe>>>8&255,k[30]=Oe>>>16&255,k[31]=Oe>>>24&255}function A(k,D,$,P){x(k,D,$,P)}function E(k,D,$,P){S(k,D,$,P)}var C=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function T(k,D,$,P,N,ee,ne){var he=new Uint8Array(16),Ce=new Uint8Array(64),Be,He;for(He=0;He<16;He++)he[He]=0;for(He=0;He<8;He++)he[He]=ee[He];for(;N>=64;){for(A(Ce,he,ne,C),He=0;He<64;He++)k[D+He]=$[P+He]^Ce[He];for(Be=1,He=8;He<16;He++)Be=Be+(he[He]&255)|0,he[He]=Be&255,Be>>>=8;N-=64,D+=64,P+=64}if(N>0)for(A(Ce,he,ne,C),He=0;He=64;){for(A(ne,ee,N,C),Ce=0;Ce<64;Ce++)k[D+Ce]=ne[Ce];for(he=1,Ce=8;Ce<16;Ce++)he=he+(ee[Ce]&255)|0,ee[Ce]=he&255,he>>>=8;$-=64,D+=64}if($>0)for(A(ne,ee,N,C),Ce=0;Ce<$;Ce++)k[D+Ce]=ne[Ce];return 0}function F(k,D,$,P,N){var ee=new Uint8Array(32);E(ee,P,N,C);for(var ne=new Uint8Array(8),he=0;he<8;he++)ne[he]=P[he+16];return M(k,D,$,ne,ee)}function U(k,D,$,P,N,ee,ne){var he=new Uint8Array(32);E(he,ee,ne,C);for(var Ce=new Uint8Array(8),Be=0;Be<8;Be++)Ce[Be]=ee[Be+16];return T(k,D,$,P,N,Ce,he)}var H=function(k){this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.leftover=0,this.fin=0;var D,$,P,N,ee,ne,he,Ce;D=k[0]&255|(k[1]&255)<<8,this.r[0]=D&8191,$=k[2]&255|(k[3]&255)<<8,this.r[1]=(D>>>13|$<<3)&8191,P=k[4]&255|(k[5]&255)<<8,this.r[2]=($>>>10|P<<6)&7939,N=k[6]&255|(k[7]&255)<<8,this.r[3]=(P>>>7|N<<9)&8191,ee=k[8]&255|(k[9]&255)<<8,this.r[4]=(N>>>4|ee<<12)&255,this.r[5]=ee>>>1&8190,ne=k[10]&255|(k[11]&255)<<8,this.r[6]=(ee>>>14|ne<<2)&8191,he=k[12]&255|(k[13]&255)<<8,this.r[7]=(ne>>>11|he<<5)&8065,Ce=k[14]&255|(k[15]&255)<<8,this.r[8]=(he>>>8|Ce<<8)&8191,this.r[9]=Ce>>>5&127,this.pad[0]=k[16]&255|(k[17]&255)<<8,this.pad[1]=k[18]&255|(k[19]&255)<<8,this.pad[2]=k[20]&255|(k[21]&255)<<8,this.pad[3]=k[22]&255|(k[23]&255)<<8,this.pad[4]=k[24]&255|(k[25]&255)<<8,this.pad[5]=k[26]&255|(k[27]&255)<<8,this.pad[6]=k[28]&255|(k[29]&255)<<8,this.pad[7]=k[30]&255|(k[31]&255)<<8};H.prototype.blocks=function(k,D,$){for(var P=this.fin?0:2048,N,ee,ne,he,Ce,Be,He,ct,Ne,rt,bt,At,vt,ht,xt,wt,Je,st,Qe,Le=this.h[0],qe=this.h[1],Ge=this.h[2],me=this.h[3],ve=this.h[4],De=this.h[5],Oe=this.h[6],Te=this.h[7],ze=this.h[8],mt=this.h[9],Nt=this.r[0],Ft=this.r[1],$t=this.r[2],te=this.r[3],Gt=this.r[4],on=this.r[5],an=this.r[6],Lt=this.r[7],un=this.r[8],tn=this.r[9];$>=16;)N=k[D+0]&255|(k[D+1]&255)<<8,Le+=N&8191,ee=k[D+2]&255|(k[D+3]&255)<<8,qe+=(N>>>13|ee<<3)&8191,ne=k[D+4]&255|(k[D+5]&255)<<8,Ge+=(ee>>>10|ne<<6)&8191,he=k[D+6]&255|(k[D+7]&255)<<8,me+=(ne>>>7|he<<9)&8191,Ce=k[D+8]&255|(k[D+9]&255)<<8,ve+=(he>>>4|Ce<<12)&8191,De+=Ce>>>1&8191,Be=k[D+10]&255|(k[D+11]&255)<<8,Oe+=(Ce>>>14|Be<<2)&8191,He=k[D+12]&255|(k[D+13]&255)<<8,Te+=(Be>>>11|He<<5)&8191,ct=k[D+14]&255|(k[D+15]&255)<<8,ze+=(He>>>8|ct<<8)&8191,mt+=ct>>>5|P,Ne=0,rt=Ne,rt+=Le*Nt,rt+=qe*(5*tn),rt+=Ge*(5*un),rt+=me*(5*Lt),rt+=ve*(5*an),Ne=rt>>>13,rt&=8191,rt+=De*(5*on),rt+=Oe*(5*Gt),rt+=Te*(5*te),rt+=ze*(5*$t),rt+=mt*(5*Ft),Ne+=rt>>>13,rt&=8191,bt=Ne,bt+=Le*Ft,bt+=qe*Nt,bt+=Ge*(5*tn),bt+=me*(5*un),bt+=ve*(5*Lt),Ne=bt>>>13,bt&=8191,bt+=De*(5*an),bt+=Oe*(5*on),bt+=Te*(5*Gt),bt+=ze*(5*te),bt+=mt*(5*$t),Ne+=bt>>>13,bt&=8191,At=Ne,At+=Le*$t,At+=qe*Ft,At+=Ge*Nt,At+=me*(5*tn),At+=ve*(5*un),Ne=At>>>13,At&=8191,At+=De*(5*Lt),At+=Oe*(5*an),At+=Te*(5*on),At+=ze*(5*Gt),At+=mt*(5*te),Ne+=At>>>13,At&=8191,vt=Ne,vt+=Le*te,vt+=qe*$t,vt+=Ge*Ft,vt+=me*Nt,vt+=ve*(5*tn),Ne=vt>>>13,vt&=8191,vt+=De*(5*un),vt+=Oe*(5*Lt),vt+=Te*(5*an),vt+=ze*(5*on),vt+=mt*(5*Gt),Ne+=vt>>>13,vt&=8191,ht=Ne,ht+=Le*Gt,ht+=qe*te,ht+=Ge*$t,ht+=me*Ft,ht+=ve*Nt,Ne=ht>>>13,ht&=8191,ht+=De*(5*tn),ht+=Oe*(5*un),ht+=Te*(5*Lt),ht+=ze*(5*an),ht+=mt*(5*on),Ne+=ht>>>13,ht&=8191,xt=Ne,xt+=Le*on,xt+=qe*Gt,xt+=Ge*te,xt+=me*$t,xt+=ve*Ft,Ne=xt>>>13,xt&=8191,xt+=De*Nt,xt+=Oe*(5*tn),xt+=Te*(5*un),xt+=ze*(5*Lt),xt+=mt*(5*an),Ne+=xt>>>13,xt&=8191,wt=Ne,wt+=Le*an,wt+=qe*on,wt+=Ge*Gt,wt+=me*te,wt+=ve*$t,Ne=wt>>>13,wt&=8191,wt+=De*Ft,wt+=Oe*Nt,wt+=Te*(5*tn),wt+=ze*(5*un),wt+=mt*(5*Lt),Ne+=wt>>>13,wt&=8191,Je=Ne,Je+=Le*Lt,Je+=qe*an,Je+=Ge*on,Je+=me*Gt,Je+=ve*te,Ne=Je>>>13,Je&=8191,Je+=De*$t,Je+=Oe*Ft,Je+=Te*Nt,Je+=ze*(5*tn),Je+=mt*(5*un),Ne+=Je>>>13,Je&=8191,st=Ne,st+=Le*un,st+=qe*Lt,st+=Ge*an,st+=me*on,st+=ve*Gt,Ne=st>>>13,st&=8191,st+=De*te,st+=Oe*$t,st+=Te*Ft,st+=ze*Nt,st+=mt*(5*tn),Ne+=st>>>13,st&=8191,Qe=Ne,Qe+=Le*tn,Qe+=qe*un,Qe+=Ge*Lt,Qe+=me*an,Qe+=ve*on,Ne=Qe>>>13,Qe&=8191,Qe+=De*Gt,Qe+=Oe*te,Qe+=Te*$t,Qe+=ze*Ft,Qe+=mt*Nt,Ne+=Qe>>>13,Qe&=8191,Ne=(Ne<<2)+Ne|0,Ne=Ne+rt|0,rt=Ne&8191,Ne=Ne>>>13,bt+=Ne,Le=rt,qe=bt,Ge=At,me=vt,ve=ht,De=xt,Oe=wt,Te=Je,ze=st,mt=Qe,D+=16,$-=16;this.h[0]=Le,this.h[1]=qe,this.h[2]=Ge,this.h[3]=me,this.h[4]=ve,this.h[5]=De,this.h[6]=Oe,this.h[7]=Te,this.h[8]=ze,this.h[9]=mt},H.prototype.finish=function(k,D){var $=new Uint16Array(10),P,N,ee,ne;if(this.leftover){for(ne=this.leftover,this.buffer[ne++]=1;ne<16;ne++)this.buffer[ne]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(P=this.h[1]>>>13,this.h[1]&=8191,ne=2;ne<10;ne++)this.h[ne]+=P,P=this.h[ne]>>>13,this.h[ne]&=8191;for(this.h[0]+=P*5,P=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=P,P=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=P,$[0]=this.h[0]+5,P=$[0]>>>13,$[0]&=8191,ne=1;ne<10;ne++)$[ne]=this.h[ne]+P,P=$[ne]>>>13,$[ne]&=8191;for($[9]-=8192,N=(P^1)-1,ne=0;ne<10;ne++)$[ne]&=N;for(N=~N,ne=0;ne<10;ne++)this.h[ne]=this.h[ne]&N|$[ne];for(this.h[0]=(this.h[0]|this.h[1]<<13)&65535,this.h[1]=(this.h[1]>>>3|this.h[2]<<10)&65535,this.h[2]=(this.h[2]>>>6|this.h[3]<<7)&65535,this.h[3]=(this.h[3]>>>9|this.h[4]<<4)&65535,this.h[4]=(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14)&65535,this.h[5]=(this.h[6]>>>2|this.h[7]<<11)&65535,this.h[6]=(this.h[7]>>>5|this.h[8]<<8)&65535,this.h[7]=(this.h[8]>>>8|this.h[9]<<5)&65535,ee=this.h[0]+this.pad[0],this.h[0]=ee&65535,ne=1;ne<8;ne++)ee=(this.h[ne]+this.pad[ne]|0)+(ee>>>16)|0,this.h[ne]=ee&65535;k[D+0]=this.h[0]>>>0&255,k[D+1]=this.h[0]>>>8&255,k[D+2]=this.h[1]>>>0&255,k[D+3]=this.h[1]>>>8&255,k[D+4]=this.h[2]>>>0&255,k[D+5]=this.h[2]>>>8&255,k[D+6]=this.h[3]>>>0&255,k[D+7]=this.h[3]>>>8&255,k[D+8]=this.h[4]>>>0&255,k[D+9]=this.h[4]>>>8&255,k[D+10]=this.h[5]>>>0&255,k[D+11]=this.h[5]>>>8&255,k[D+12]=this.h[6]>>>0&255,k[D+13]=this.h[6]>>>8&255,k[D+14]=this.h[7]>>>0&255,k[D+15]=this.h[7]>>>8&255},H.prototype.update=function(k,D,$){var P,N;if(this.leftover){for(N=16-this.leftover,N>$&&(N=$),P=0;P=16&&(N=$-$%16,this.blocks(k,D,N),D+=N,$-=N),$){for(P=0;P<$;P++)this.buffer[this.leftover+P]=k[D+P];this.leftover+=$}};function W(k,D,$,P,N,ee){var ne=new H(ee);return ne.update($,P,N),ne.finish(k,D),0}function ie(k,D,$,P,N,ee){var ne=new Uint8Array(16);return W(ne,0,$,P,N,ee),b(k,D,ne,0)}function Z(k,D,$,P,N){var ee;if($<32)return-1;for(U(k,0,D,0,$,P,N),W(k,16,k,32,$-32,k),ee=0;ee<16;ee++)k[ee]=0;return 0}function G(k,D,$,P,N){var ee,ne=new Uint8Array(32);if($<32||(F(ne,0,32,P,N),ie(D,16,D,32,$-32,ne)!==0))return-1;for(U(k,0,D,0,$,P,N),ee=0;ee<32;ee++)k[ee]=0;return 0}function K(k,D){var $;for($=0;$<16;$++)k[$]=D[$]|0}function V(k){var D,$,P=1;for(D=0;D<16;D++)$=k[D]+P+65535,P=Math.floor($/65536),k[D]=$-P*65536;k[0]+=P-1+37*(P-1)}function B(k,D,$){for(var P,N=~($-1),ee=0;ee<16;ee++)P=N&(k[ee]^D[ee]),k[ee]^=P,D[ee]^=P}function q(k,D){var $,P,N,ee=n(),ne=n();for($=0;$<16;$++)ne[$]=D[$];for(V(ne),V(ne),V(ne),P=0;P<2;P++){for(ee[0]=ne[0]-65517,$=1;$<15;$++)ee[$]=ne[$]-65535-(ee[$-1]>>16&1),ee[$-1]&=65535;ee[15]=ne[15]-32767-(ee[14]>>16&1),N=ee[15]>>16&1,ee[14]&=65535,B(ne,ee,1-N)}for($=0;$<16;$++)k[2*$]=ne[$]&255,k[2*$+1]=ne[$]>>8}function Y(k,D){var $=new Uint8Array(32),P=new Uint8Array(32);return q($,k),q(P,D),w($,0,P,0)}function ue(k){var D=new Uint8Array(32);return q(D,k),D[0]&1}function Q(k,D){var $;for($=0;$<16;$++)k[$]=D[2*$]+(D[2*$+1]<<8);k[15]&=32767}function J(k,D,$){for(var P=0;P<16;P++)k[P]=D[P]+$[P]}function se(k,D,$){for(var P=0;P<16;P++)k[P]=D[P]-$[P]}function de(k,D,$){var P,N,ee=0,ne=0,he=0,Ce=0,Be=0,He=0,ct=0,Ne=0,rt=0,bt=0,At=0,vt=0,ht=0,xt=0,wt=0,Je=0,st=0,Qe=0,Le=0,qe=0,Ge=0,me=0,ve=0,De=0,Oe=0,Te=0,ze=0,mt=0,Nt=0,Ft=0,$t=0,te=$[0],Gt=$[1],on=$[2],an=$[3],Lt=$[4],un=$[5],tn=$[6],Kn=$[7],pn=$[8],On=$[9],Gn=$[10],Yn=$[11],xr=$[12],$r=$[13],Ir=$[14],Nr=$[15];P=D[0],ee+=P*te,ne+=P*Gt,he+=P*on,Ce+=P*an,Be+=P*Lt,He+=P*un,ct+=P*tn,Ne+=P*Kn,rt+=P*pn,bt+=P*On,At+=P*Gn,vt+=P*Yn,ht+=P*xr,xt+=P*$r,wt+=P*Ir,Je+=P*Nr,P=D[1],ne+=P*te,he+=P*Gt,Ce+=P*on,Be+=P*an,He+=P*Lt,ct+=P*un,Ne+=P*tn,rt+=P*Kn,bt+=P*pn,At+=P*On,vt+=P*Gn,ht+=P*Yn,xt+=P*xr,wt+=P*$r,Je+=P*Ir,st+=P*Nr,P=D[2],he+=P*te,Ce+=P*Gt,Be+=P*on,He+=P*an,ct+=P*Lt,Ne+=P*un,rt+=P*tn,bt+=P*Kn,At+=P*pn,vt+=P*On,ht+=P*Gn,xt+=P*Yn,wt+=P*xr,Je+=P*$r,st+=P*Ir,Qe+=P*Nr,P=D[3],Ce+=P*te,Be+=P*Gt,He+=P*on,ct+=P*an,Ne+=P*Lt,rt+=P*un,bt+=P*tn,At+=P*Kn,vt+=P*pn,ht+=P*On,xt+=P*Gn,wt+=P*Yn,Je+=P*xr,st+=P*$r,Qe+=P*Ir,Le+=P*Nr,P=D[4],Be+=P*te,He+=P*Gt,ct+=P*on,Ne+=P*an,rt+=P*Lt,bt+=P*un,At+=P*tn,vt+=P*Kn,ht+=P*pn,xt+=P*On,wt+=P*Gn,Je+=P*Yn,st+=P*xr,Qe+=P*$r,Le+=P*Ir,qe+=P*Nr,P=D[5],He+=P*te,ct+=P*Gt,Ne+=P*on,rt+=P*an,bt+=P*Lt,At+=P*un,vt+=P*tn,ht+=P*Kn,xt+=P*pn,wt+=P*On,Je+=P*Gn,st+=P*Yn,Qe+=P*xr,Le+=P*$r,qe+=P*Ir,Ge+=P*Nr,P=D[6],ct+=P*te,Ne+=P*Gt,rt+=P*on,bt+=P*an,At+=P*Lt,vt+=P*un,ht+=P*tn,xt+=P*Kn,wt+=P*pn,Je+=P*On,st+=P*Gn,Qe+=P*Yn,Le+=P*xr,qe+=P*$r,Ge+=P*Ir,me+=P*Nr,P=D[7],Ne+=P*te,rt+=P*Gt,bt+=P*on,At+=P*an,vt+=P*Lt,ht+=P*un,xt+=P*tn,wt+=P*Kn,Je+=P*pn,st+=P*On,Qe+=P*Gn,Le+=P*Yn,qe+=P*xr,Ge+=P*$r,me+=P*Ir,ve+=P*Nr,P=D[8],rt+=P*te,bt+=P*Gt,At+=P*on,vt+=P*an,ht+=P*Lt,xt+=P*un,wt+=P*tn,Je+=P*Kn,st+=P*pn,Qe+=P*On,Le+=P*Gn,qe+=P*Yn,Ge+=P*xr,me+=P*$r,ve+=P*Ir,De+=P*Nr,P=D[9],bt+=P*te,At+=P*Gt,vt+=P*on,ht+=P*an,xt+=P*Lt,wt+=P*un,Je+=P*tn,st+=P*Kn,Qe+=P*pn,Le+=P*On,qe+=P*Gn,Ge+=P*Yn,me+=P*xr,ve+=P*$r,De+=P*Ir,Oe+=P*Nr,P=D[10],At+=P*te,vt+=P*Gt,ht+=P*on,xt+=P*an,wt+=P*Lt,Je+=P*un,st+=P*tn,Qe+=P*Kn,Le+=P*pn,qe+=P*On,Ge+=P*Gn,me+=P*Yn,ve+=P*xr,De+=P*$r,Oe+=P*Ir,Te+=P*Nr,P=D[11],vt+=P*te,ht+=P*Gt,xt+=P*on,wt+=P*an,Je+=P*Lt,st+=P*un,Qe+=P*tn,Le+=P*Kn,qe+=P*pn,Ge+=P*On,me+=P*Gn,ve+=P*Yn,De+=P*xr,Oe+=P*$r,Te+=P*Ir,ze+=P*Nr,P=D[12],ht+=P*te,xt+=P*Gt,wt+=P*on,Je+=P*an,st+=P*Lt,Qe+=P*un,Le+=P*tn,qe+=P*Kn,Ge+=P*pn,me+=P*On,ve+=P*Gn,De+=P*Yn,Oe+=P*xr,Te+=P*$r,ze+=P*Ir,mt+=P*Nr,P=D[13],xt+=P*te,wt+=P*Gt,Je+=P*on,st+=P*an,Qe+=P*Lt,Le+=P*un,qe+=P*tn,Ge+=P*Kn,me+=P*pn,ve+=P*On,De+=P*Gn,Oe+=P*Yn,Te+=P*xr,ze+=P*$r,mt+=P*Ir,Nt+=P*Nr,P=D[14],wt+=P*te,Je+=P*Gt,st+=P*on,Qe+=P*an,Le+=P*Lt,qe+=P*un,Ge+=P*tn,me+=P*Kn,ve+=P*pn,De+=P*On,Oe+=P*Gn,Te+=P*Yn,ze+=P*xr,mt+=P*$r,Nt+=P*Ir,Ft+=P*Nr,P=D[15],Je+=P*te,st+=P*Gt,Qe+=P*on,Le+=P*an,qe+=P*Lt,Ge+=P*un,me+=P*tn,ve+=P*Kn,De+=P*pn,Oe+=P*On,Te+=P*Gn,ze+=P*Yn,mt+=P*xr,Nt+=P*$r,Ft+=P*Ir,$t+=P*Nr,ee+=38*st,ne+=38*Qe,he+=38*Le,Ce+=38*qe,Be+=38*Ge,He+=38*me,ct+=38*ve,Ne+=38*De,rt+=38*Oe,bt+=38*Te,At+=38*ze,vt+=38*mt,ht+=38*Nt,xt+=38*Ft,wt+=38*$t,N=1,P=ee+N+65535,N=Math.floor(P/65536),ee=P-N*65536,P=ne+N+65535,N=Math.floor(P/65536),ne=P-N*65536,P=he+N+65535,N=Math.floor(P/65536),he=P-N*65536,P=Ce+N+65535,N=Math.floor(P/65536),Ce=P-N*65536,P=Be+N+65535,N=Math.floor(P/65536),Be=P-N*65536,P=He+N+65535,N=Math.floor(P/65536),He=P-N*65536,P=ct+N+65535,N=Math.floor(P/65536),ct=P-N*65536,P=Ne+N+65535,N=Math.floor(P/65536),Ne=P-N*65536,P=rt+N+65535,N=Math.floor(P/65536),rt=P-N*65536,P=bt+N+65535,N=Math.floor(P/65536),bt=P-N*65536,P=At+N+65535,N=Math.floor(P/65536),At=P-N*65536,P=vt+N+65535,N=Math.floor(P/65536),vt=P-N*65536,P=ht+N+65535,N=Math.floor(P/65536),ht=P-N*65536,P=xt+N+65535,N=Math.floor(P/65536),xt=P-N*65536,P=wt+N+65535,N=Math.floor(P/65536),wt=P-N*65536,P=Je+N+65535,N=Math.floor(P/65536),Je=P-N*65536,ee+=N-1+37*(N-1),N=1,P=ee+N+65535,N=Math.floor(P/65536),ee=P-N*65536,P=ne+N+65535,N=Math.floor(P/65536),ne=P-N*65536,P=he+N+65535,N=Math.floor(P/65536),he=P-N*65536,P=Ce+N+65535,N=Math.floor(P/65536),Ce=P-N*65536,P=Be+N+65535,N=Math.floor(P/65536),Be=P-N*65536,P=He+N+65535,N=Math.floor(P/65536),He=P-N*65536,P=ct+N+65535,N=Math.floor(P/65536),ct=P-N*65536,P=Ne+N+65535,N=Math.floor(P/65536),Ne=P-N*65536,P=rt+N+65535,N=Math.floor(P/65536),rt=P-N*65536,P=bt+N+65535,N=Math.floor(P/65536),bt=P-N*65536,P=At+N+65535,N=Math.floor(P/65536),At=P-N*65536,P=vt+N+65535,N=Math.floor(P/65536),vt=P-N*65536,P=ht+N+65535,N=Math.floor(P/65536),ht=P-N*65536,P=xt+N+65535,N=Math.floor(P/65536),xt=P-N*65536,P=wt+N+65535,N=Math.floor(P/65536),wt=P-N*65536,P=Je+N+65535,N=Math.floor(P/65536),Je=P-N*65536,ee+=N-1+37*(N-1),k[0]=ee,k[1]=ne,k[2]=he,k[3]=Ce,k[4]=Be,k[5]=He,k[6]=ct,k[7]=Ne,k[8]=rt,k[9]=bt,k[10]=At,k[11]=vt,k[12]=ht,k[13]=xt,k[14]=wt,k[15]=Je}function Se(k,D){de(k,D,D)}function ge(k,D){var $=n(),P;for(P=0;P<16;P++)$[P]=D[P];for(P=253;P>=0;P--)Se($,$),P!==2&&P!==4&&de($,$,D);for(P=0;P<16;P++)k[P]=$[P]}function Ze(k,D){var $=n(),P;for(P=0;P<16;P++)$[P]=D[P];for(P=250;P>=0;P--)Se($,$),P!==1&&de($,$,D);for(P=0;P<16;P++)k[P]=$[P]}function Pe(k,D,$){var P=new Uint8Array(32),N=new Float64Array(80),ee,ne,he=n(),Ce=n(),Be=n(),He=n(),ct=n(),Ne=n();for(ne=0;ne<31;ne++)P[ne]=D[ne];for(P[31]=D[31]&127|64,P[0]&=248,Q(N,$),ne=0;ne<16;ne++)Ce[ne]=N[ne],He[ne]=he[ne]=Be[ne]=0;for(he[0]=He[0]=1,ne=254;ne>=0;--ne)ee=P[ne>>>3]>>>(ne&7)&1,B(he,Ce,ee),B(Be,He,ee),J(ct,he,Be),se(he,he,Be),J(Be,Ce,He),se(Ce,Ce,He),Se(He,ct),Se(Ne,he),de(he,Be,he),de(Be,Ce,ct),J(ct,he,Be),se(he,he,Be),Se(Ce,he),se(Be,He,Ne),de(he,Be,s),J(he,he,He),de(Be,Be,he),de(he,He,Ne),de(He,Ce,N),Se(Ce,ct),B(he,Ce,ee),B(Be,He,ee);for(ne=0;ne<16;ne++)N[ne+16]=he[ne],N[ne+32]=Be[ne],N[ne+48]=Ce[ne],N[ne+64]=He[ne];var rt=N.subarray(32),bt=N.subarray(16);return ge(rt,rt),de(bt,bt,rt),q(k,bt),0}function Fe(k,D){return Pe(k,D,o)}function $e(k,D){return r(D,32),Fe(k,D)}function be(k,D,$){var P=new Uint8Array(32);return Pe(P,$,D),E(k,i,P,C)}var yt=Z,lt=G;function It(k,D,$,P,N,ee){var ne=new Uint8Array(32);return be(ne,N,ee),yt(k,D,$,P,ne)}function mn(k,D,$,P,N,ee){var ne=new Uint8Array(32);return be(ne,N,ee),lt(k,D,$,P,ne)}var en=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function re(k,D,$,P){for(var N=new Int32Array(16),ee=new Int32Array(16),ne,he,Ce,Be,He,ct,Ne,rt,bt,At,vt,ht,xt,wt,Je,st,Qe,Le,qe,Ge,me,ve,De,Oe,Te,ze,mt=k[0],Nt=k[1],Ft=k[2],$t=k[3],te=k[4],Gt=k[5],on=k[6],an=k[7],Lt=D[0],un=D[1],tn=D[2],Kn=D[3],pn=D[4],On=D[5],Gn=D[6],Yn=D[7],xr=0;P>=128;){for(qe=0;qe<16;qe++)Ge=8*qe+xr,N[qe]=$[Ge+0]<<24|$[Ge+1]<<16|$[Ge+2]<<8|$[Ge+3],ee[qe]=$[Ge+4]<<24|$[Ge+5]<<16|$[Ge+6]<<8|$[Ge+7];for(qe=0;qe<80;qe++)if(ne=mt,he=Nt,Ce=Ft,Be=$t,He=te,ct=Gt,Ne=on,rt=an,bt=Lt,At=un,vt=tn,ht=Kn,xt=pn,wt=On,Je=Gn,st=Yn,me=an,ve=Yn,De=ve&65535,Oe=ve>>>16,Te=me&65535,ze=me>>>16,me=(te>>>14|pn<<18)^(te>>>18|pn<<14)^(pn>>>9|te<<23),ve=(pn>>>14|te<<18)^(pn>>>18|te<<14)^(te>>>9|pn<<23),De+=ve&65535,Oe+=ve>>>16,Te+=me&65535,ze+=me>>>16,me=te&Gt^~te&on,ve=pn&On^~pn&Gn,De+=ve&65535,Oe+=ve>>>16,Te+=me&65535,ze+=me>>>16,me=en[qe*2],ve=en[qe*2+1],De+=ve&65535,Oe+=ve>>>16,Te+=me&65535,ze+=me>>>16,me=N[qe%16],ve=ee[qe%16],De+=ve&65535,Oe+=ve>>>16,Te+=me&65535,ze+=me>>>16,Oe+=De>>>16,Te+=Oe>>>16,ze+=Te>>>16,Qe=Te&65535|ze<<16,Le=De&65535|Oe<<16,me=Qe,ve=Le,De=ve&65535,Oe=ve>>>16,Te=me&65535,ze=me>>>16,me=(mt>>>28|Lt<<4)^(Lt>>>2|mt<<30)^(Lt>>>7|mt<<25),ve=(Lt>>>28|mt<<4)^(mt>>>2|Lt<<30)^(mt>>>7|Lt<<25),De+=ve&65535,Oe+=ve>>>16,Te+=me&65535,ze+=me>>>16,me=mt&Nt^mt&Ft^Nt&Ft,ve=Lt&un^Lt&tn^un&tn,De+=ve&65535,Oe+=ve>>>16,Te+=me&65535,ze+=me>>>16,Oe+=De>>>16,Te+=Oe>>>16,ze+=Te>>>16,rt=Te&65535|ze<<16,st=De&65535|Oe<<16,me=Be,ve=ht,De=ve&65535,Oe=ve>>>16,Te=me&65535,ze=me>>>16,me=Qe,ve=Le,De+=ve&65535,Oe+=ve>>>16,Te+=me&65535,ze+=me>>>16,Oe+=De>>>16,Te+=Oe>>>16,ze+=Te>>>16,Be=Te&65535|ze<<16,ht=De&65535|Oe<<16,Nt=ne,Ft=he,$t=Ce,te=Be,Gt=He,on=ct,an=Ne,mt=rt,un=bt,tn=At,Kn=vt,pn=ht,On=xt,Gn=wt,Yn=Je,Lt=st,qe%16===15)for(Ge=0;Ge<16;Ge++)me=N[Ge],ve=ee[Ge],De=ve&65535,Oe=ve>>>16,Te=me&65535,ze=me>>>16,me=N[(Ge+9)%16],ve=ee[(Ge+9)%16],De+=ve&65535,Oe+=ve>>>16,Te+=me&65535,ze+=me>>>16,Qe=N[(Ge+1)%16],Le=ee[(Ge+1)%16],me=(Qe>>>1|Le<<31)^(Qe>>>8|Le<<24)^Qe>>>7,ve=(Le>>>1|Qe<<31)^(Le>>>8|Qe<<24)^(Le>>>7|Qe<<25),De+=ve&65535,Oe+=ve>>>16,Te+=me&65535,ze+=me>>>16,Qe=N[(Ge+14)%16],Le=ee[(Ge+14)%16],me=(Qe>>>19|Le<<13)^(Le>>>29|Qe<<3)^Qe>>>6,ve=(Le>>>19|Qe<<13)^(Qe>>>29|Le<<3)^(Le>>>6|Qe<<26),De+=ve&65535,Oe+=ve>>>16,Te+=me&65535,ze+=me>>>16,Oe+=De>>>16,Te+=Oe>>>16,ze+=Te>>>16,N[Ge]=Te&65535|ze<<16,ee[Ge]=De&65535|Oe<<16;me=mt,ve=Lt,De=ve&65535,Oe=ve>>>16,Te=me&65535,ze=me>>>16,me=k[0],ve=D[0],De+=ve&65535,Oe+=ve>>>16,Te+=me&65535,ze+=me>>>16,Oe+=De>>>16,Te+=Oe>>>16,ze+=Te>>>16,k[0]=mt=Te&65535|ze<<16,D[0]=Lt=De&65535|Oe<<16,me=Nt,ve=un,De=ve&65535,Oe=ve>>>16,Te=me&65535,ze=me>>>16,me=k[1],ve=D[1],De+=ve&65535,Oe+=ve>>>16,Te+=me&65535,ze+=me>>>16,Oe+=De>>>16,Te+=Oe>>>16,ze+=Te>>>16,k[1]=Nt=Te&65535|ze<<16,D[1]=un=De&65535|Oe<<16,me=Ft,ve=tn,De=ve&65535,Oe=ve>>>16,Te=me&65535,ze=me>>>16,me=k[2],ve=D[2],De+=ve&65535,Oe+=ve>>>16,Te+=me&65535,ze+=me>>>16,Oe+=De>>>16,Te+=Oe>>>16,ze+=Te>>>16,k[2]=Ft=Te&65535|ze<<16,D[2]=tn=De&65535|Oe<<16,me=$t,ve=Kn,De=ve&65535,Oe=ve>>>16,Te=me&65535,ze=me>>>16,me=k[3],ve=D[3],De+=ve&65535,Oe+=ve>>>16,Te+=me&65535,ze+=me>>>16,Oe+=De>>>16,Te+=Oe>>>16,ze+=Te>>>16,k[3]=$t=Te&65535|ze<<16,D[3]=Kn=De&65535|Oe<<16,me=te,ve=pn,De=ve&65535,Oe=ve>>>16,Te=me&65535,ze=me>>>16,me=k[4],ve=D[4],De+=ve&65535,Oe+=ve>>>16,Te+=me&65535,ze+=me>>>16,Oe+=De>>>16,Te+=Oe>>>16,ze+=Te>>>16,k[4]=te=Te&65535|ze<<16,D[4]=pn=De&65535|Oe<<16,me=Gt,ve=On,De=ve&65535,Oe=ve>>>16,Te=me&65535,ze=me>>>16,me=k[5],ve=D[5],De+=ve&65535,Oe+=ve>>>16,Te+=me&65535,ze+=me>>>16,Oe+=De>>>16,Te+=Oe>>>16,ze+=Te>>>16,k[5]=Gt=Te&65535|ze<<16,D[5]=On=De&65535|Oe<<16,me=on,ve=Gn,De=ve&65535,Oe=ve>>>16,Te=me&65535,ze=me>>>16,me=k[6],ve=D[6],De+=ve&65535,Oe+=ve>>>16,Te+=me&65535,ze+=me>>>16,Oe+=De>>>16,Te+=Oe>>>16,ze+=Te>>>16,k[6]=on=Te&65535|ze<<16,D[6]=Gn=De&65535|Oe<<16,me=an,ve=Yn,De=ve&65535,Oe=ve>>>16,Te=me&65535,ze=me>>>16,me=k[7],ve=D[7],De+=ve&65535,Oe+=ve>>>16,Te+=me&65535,ze+=me>>>16,Oe+=De>>>16,Te+=Oe>>>16,ze+=Te>>>16,k[7]=an=Te&65535|ze<<16,D[7]=Yn=De&65535|Oe<<16,xr+=128,P-=128}return P}function pe(k,D,$){var P=new Int32Array(8),N=new Int32Array(8),ee=new Uint8Array(256),ne,he=$;for(P[0]=1779033703,P[1]=3144134277,P[2]=1013904242,P[3]=2773480762,P[4]=1359893119,P[5]=2600822924,P[6]=528734635,P[7]=1541459225,N[0]=4089235720,N[1]=2227873595,N[2]=4271175723,N[3]=1595750129,N[4]=2917565137,N[5]=725511199,N[6]=4215389547,N[7]=327033209,re(P,N,D,$),$%=128,ne=0;ne<$;ne++)ee[ne]=D[he-$+ne];for(ee[$]=128,$=256-128*($<112?1:0),ee[$-9]=0,g(ee,$-8,he/536870912|0,he<<3),re(P,N,ee,$),ne=0;ne<8;ne++)g(k,8*ne,P[ne],N[ne]);return 0}function ye(k,D){var $=n(),P=n(),N=n(),ee=n(),ne=n(),he=n(),Ce=n(),Be=n(),He=n();se($,k[1],k[0]),se(He,D[1],D[0]),de($,$,He),J(P,k[0],k[1]),J(He,D[0],D[1]),de(P,P,He),de(N,k[3],D[3]),de(N,N,c),de(ee,k[2],D[2]),J(ee,ee,ee),se(ne,P,$),se(he,ee,N),J(Ce,ee,N),J(Be,P,$),de(k[0],ne,he),de(k[1],Be,Ce),de(k[2],Ce,he),de(k[3],ne,Be)}function Ue(k,D,$){var P;for(P=0;P<4;P++)B(k[P],D[P],$)}function je(k,D){var $=n(),P=n(),N=n();ge(N,D[2]),de($,D[0],N),de(P,D[1],N),q(k,P),k[31]^=ue($)<<7}function ke(k,D,$){var P,N;for(K(k[0],a),K(k[1],u),K(k[2],u),K(k[3],a),N=255;N>=0;--N)P=$[N/8|0]>>(N&7)&1,Ue(k,D,P),ye(D,k),ye(k,k),Ue(k,D,P)}function nt(k,D){var $=[n(),n(),n(),n()];K($[0],d),K($[1],h),K($[2],u),de($[3],d,h),ke(k,$,D)}function gt(k,D,$){var P=new Uint8Array(64),N=[n(),n(),n(),n()],ee;for($||r(D,32),pe(P,D,32),P[0]&=248,P[31]&=127,P[31]|=64,nt(N,P),je(k,N),ee=0;ee<32;ee++)D[ee+32]=k[ee];return 0}var bn=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function Vt(k,D){var $,P,N,ee;for(P=63;P>=32;--P){for($=0,N=P-32,ee=P-12;N>4)*bn[N],$=D[N]>>8,D[N]&=255;for(N=0;N<32;N++)D[N]-=$*bn[N];for(P=0;P<32;P++)D[P+1]+=D[P]>>8,k[P]=D[P]&255}function xn(k){var D=new Float64Array(64),$;for($=0;$<64;$++)D[$]=k[$];for($=0;$<64;$++)k[$]=0;Vt(k,D)}function Ii(k,D,$,P){var N=new Uint8Array(64),ee=new Uint8Array(64),ne=new Uint8Array(64),he,Ce,Be=new Float64Array(64),He=[n(),n(),n(),n()];pe(N,P,32),N[0]&=248,N[31]&=127,N[31]|=64;var ct=$+64;for(he=0;he<$;he++)k[64+he]=D[he];for(he=0;he<32;he++)k[32+he]=N[32+he];for(pe(ne,k.subarray(32),$+32),xn(ne),nt(He,ne),je(k,He),he=32;he<64;he++)k[he]=P[he];for(pe(ee,k,$+64),xn(ee),he=0;he<64;he++)Be[he]=0;for(he=0;he<32;he++)Be[he]=ne[he];for(he=0;he<32;he++)for(Ce=0;Ce<32;Ce++)Be[he+Ce]+=ee[he]*N[Ce];return Vt(k.subarray(32),Be),ct}function br(k,D){var $=n(),P=n(),N=n(),ee=n(),ne=n(),he=n(),Ce=n();return K(k[2],u),Q(k[1],D),Se(N,k[1]),de(ee,N,l),se(N,N,k[2]),J(ee,k[2],ee),Se(ne,ee),Se(he,ne),de(Ce,he,ne),de($,Ce,N),de($,$,ee),Ze($,$),de($,$,N),de($,$,ee),de($,$,ee),de(k[0],$,ee),Se(P,k[0]),de(P,P,ee),Y(P,N)&&de(k[0],k[0],v),Se(P,k[0]),de(P,P,ee),Y(P,N)?-1:(ue(k[0])===D[31]>>7&&se(k[0],a,k[0]),de(k[3],k[0],k[1]),0)}function yi(k,D,$,P){var N,ee=new Uint8Array(32),ne=new Uint8Array(64),he=[n(),n(),n(),n()],Ce=[n(),n(),n(),n()];if($<64||br(Ce,P))return-1;for(N=0;N<$;N++)k[N]=D[N];for(N=0;N<32;N++)k[N+32]=P[N];if(pe(ne,k,$),xn(ne),ke(he,Ce,ne),nt(Ce,D.subarray(32)),ye(he,Ce),je(ee,he),$-=64,w(D,0,ee,0)){for(N=0;N<$;N++)k[N]=0;return-1}for(N=0;N<$;N++)k[N]=D[N+64];return $}var ar=32,ui=24,bi=32,Rr=16,Yi=32,go=32,xi=32,Dr=32,wa=32,_t=ui,fn=bi,wn=Rr,qn=64,ur=32,Yr=64,mo=32,ql=64;t.lowlevel={crypto_core_hsalsa20:E,crypto_stream_xor:U,crypto_stream:F,crypto_stream_salsa20_xor:T,crypto_stream_salsa20:M,crypto_onetimeauth:W,crypto_onetimeauth_verify:ie,crypto_verify_16:b,crypto_verify_32:w,crypto_secretbox:Z,crypto_secretbox_open:G,crypto_scalarmult:Pe,crypto_scalarmult_base:Fe,crypto_box_beforenm:be,crypto_box_afternm:yt,crypto_box:It,crypto_box_open:mn,crypto_box_keypair:$e,crypto_hash:pe,crypto_sign:Ii,crypto_sign_keypair:gt,crypto_sign_open:yi,crypto_secretbox_KEYBYTES:ar,crypto_secretbox_NONCEBYTES:ui,crypto_secretbox_ZEROBYTES:bi,crypto_secretbox_BOXZEROBYTES:Rr,crypto_scalarmult_BYTES:Yi,crypto_scalarmult_SCALARBYTES:go,crypto_box_PUBLICKEYBYTES:xi,crypto_box_SECRETKEYBYTES:Dr,crypto_box_BEFORENMBYTES:wa,crypto_box_NONCEBYTES:_t,crypto_box_ZEROBYTES:fn,crypto_box_BOXZEROBYTES:wn,crypto_sign_BYTES:qn,crypto_sign_PUBLICKEYBYTES:ur,crypto_sign_SECRETKEYBYTES:Yr,crypto_sign_SEEDBYTES:mo,crypto_hash_BYTES:ql,gf:n,D:l,L:bn,pack25519:q,unpack25519:Q,M:de,A:J,S:Se,Z:se,pow2523:Ze,add:ye,set25519:K,modL:Vt,scalarmult:ke,scalarbase:nt};function yf(k,D){if(k.length!==ar)throw new Error("bad key size");if(D.length!==ui)throw new Error("bad nonce size")}function oe(k,D){if(k.length!==xi)throw new Error("bad public key size");if(D.length!==Dr)throw new Error("bad secret key size")}function le(){for(var k=0;k=0},t.sign.keyPair=function(){var k=new Uint8Array(ur),D=new Uint8Array(Yr);return gt(k,D),{publicKey:k,secretKey:D}},t.sign.keyPair.fromSecretKey=function(k){if(le(k),k.length!==Yr)throw new Error("bad secret key size");for(var D=new Uint8Array(ur),$=0;$"u"?typeof Buffer.from<"u"?(t.encodeBase64=function(r){return Buffer.from(r).toString("base64")},t.decodeBase64=function(r){return n(r),new Uint8Array(Array.prototype.slice.call(Buffer.from(r,"base64"),0))}):(t.encodeBase64=function(r){return new Buffer(r).toString("base64")},t.decodeBase64=function(r){return n(r),new Uint8Array(Array.prototype.slice.call(new Buffer(r,"base64"),0))}):(t.encodeBase64=function(r){var i,o=[],a=r.length;for(i=0;i{const{__scopeCheckbox:n,name:r,checked:i,defaultChecked:o,required:a,disabled:u,value:s="on",onCheckedChange:l,form:c,...d}=e,[h,v]=y.useState(null),g=Kt(t,A=>v(A)),m=y.useRef(!1),b=h?c||!!h.closest("form"):!0,[w=!1,x]=Ga({prop:i,defaultProp:o,onChange:l}),S=y.useRef(w);return y.useEffect(()=>{const A=h?.form;if(A){const E=()=>x(S.current);return A.addEventListener("reset",E),()=>A.removeEventListener("reset",E)}},[h,x]),I.jsxs(Fqe,{scope:n,state:w,disabled:u,children:[I.jsx(pt.button,{type:"button",role:"checkbox","aria-checked":bl(w)?"mixed":w,"aria-required":a,"data-state":pY(w),"data-disabled":u?"":void 0,disabled:u,value:s,...d,ref:g,onKeyDown:Ye(e.onKeyDown,A=>{A.key==="Enter"&&A.preventDefault()}),onClick:Ye(e.onClick,A=>{x(E=>bl(E)?!0:!E),b&&(m.current=A.isPropagationStopped(),m.current||A.stopPropagation())})}),b&&I.jsx(jqe,{control:h,bubbles:!m.current,name:r,value:s,checked:w,required:a,disabled:u,form:c,style:{transform:"translateX(-100%)"},defaultChecked:bl(o)?!1:o})]})});fY.displayName=i5;var dY="CheckboxIndicator",hY=y.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...i}=e,o=Lqe(dY,n);return I.jsx(ii,{present:r||bl(o.state)||o.state===!0,children:I.jsx(pt.span,{"data-state":pY(o.state),"data-disabled":o.disabled?"":void 0,...i,ref:t,style:{pointerEvents:"none",...e.style}})})});hY.displayName=dY;var jqe=e=>{const{control:t,checked:n,bubbles:r=!0,defaultChecked:i,...o}=e,a=y.useRef(null),u=yO(n),s=jA(t);y.useEffect(()=>{const c=a.current,d=window.HTMLInputElement.prototype,v=Object.getOwnPropertyDescriptor(d,"checked").set;if(u!==n&&v){const g=new Event("click",{bubbles:r});c.indeterminate=bl(n),v.call(c,bl(n)?!1:n),c.dispatchEvent(g)}},[u,n,r]);const l=y.useRef(bl(n)?!1:n);return I.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:i??l.current,...o,tabIndex:-1,ref:a,style:{...e.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function bl(e){return e==="indeterminate"}function pY(e){return bl(e)?"indeterminate":e?"checked":"unchecked"}var kZe=fY,TZe=hY;export{xGe as $,spe as A,RKe as B,jKe as C,fpe as D,dpe as E,LKe as F,bB as G,JKe as H,dKe as I,ppe as J,lpe as K,cpe as L,iKe as M,fGe as N,zqe as O,qqe as P,DKe as Q,j as R,Sl as S,hpe as T,Ipe as U,Npe as V,EGe as W,ZKe as X,AGe as Y,gGe as Z,mGe as _,Yqe as a,NGe as a$,wGe as a0,SGe as a1,qKe as a2,_Ge as a3,tGe as a4,bGe as a5,CGe as a6,pGe as a7,vGe as a8,yGe as a9,$Ge as aA,oGe as aB,aYe as aC,gKe as aD,_Ke as aE,vYe as aF,gYe as aG,mYe as aH,Gqe as aI,_Ye as aJ,SYe as aK,CYe as aL,wYe as aM,qS as aN,NKe as aO,mf as aP,yYe as aQ,bYe as aR,lO as aS,cO as aT,nIe as aU,Yu as aV,vf as aW,Kh as aX,AYe as aY,nYe as aZ,UGe as a_,kGe as aa,RGe as ab,TGe as ac,MGe as ad,Vqe as ae,nKe as af,aKe as ag,wKe as ah,Xqe as ai,uKe as aj,mKe as ak,oKe as al,fKe as am,xKe as an,bKe as ao,hKe as ap,yKe as aq,tKe as ar,Jqe as as,sKe as at,AKe as au,EKe as av,SKe as aw,PKe as ax,vKe as ay,rKe as az,rg as b,CZe as b$,zGe as b0,jGe as b1,dYe as b2,cYe as b3,OYe as b4,TYe as b5,kYe as b6,MYe as b7,GKe as b8,BYe as b9,FGe as bA,EYe as bB,WGe as bC,tZe as bD,nZe as bE,tYe as bF,sYe as bG,oYe as bH,QGe as bI,KGe as bJ,qGe as bK,rZe as bL,eKe as bM,CKe as bN,pKe as bO,Qqe as bP,oZe as bQ,aZe as bR,FKe as bS,nGe as bT,rGe as bU,hZe as bV,vZe as bW,GGe as bX,LGe as bY,xZe as bZ,wZe as b_,XKe as ba,zYe as bb,RYe as bc,DYe as bd,$Ye as be,NYe as bf,FYe as bg,jYe as bh,LYe as bi,UYe as bj,IYe as bk,WYe as bl,YKe as bm,KYe as bn,GYe as bo,HYe as bp,qYe as bq,XYe as br,QYe as bs,JYe as bt,KBe as bu,JBe as bv,YYe as bw,rYe as bx,IGe as by,BGe as bz,cn as c,EZe as c0,_Ze as c1,SZe as c2,mZe as c3,yZe as c4,bZe as c5,iGe as c6,aGe as c7,lYe as c8,pZe as c9,eYe as cA,HGe as cB,UBe as cC,Hqe as cD,YGe as cE,VGe as cF,uZe as ca,cZe as cb,fZe as cc,dZe as cd,fYe as ce,hYe as cf,sZe as cg,lZe as ch,Qa as ci,yr as cj,uGe as ck,Gc as cl,AZe as cm,PZe as cn,uYe as co,ZGe as cp,JGe as cq,iYe as cr,XGe as cs,kZe as ct,TZe as cu,QKe as cv,lGe as cw,KKe as cx,eGe as cy,sGe as cz,Uqe as d,Kr as e,MKe as f,kKe as g,TKe as h,OKe as i,I as j,mk as k,IKe as l,Wqe as m,WKe as n,mA as o,cKe as p,lKe as q,y as r,VKe as s,Zqe as t,QF as u,HKe as v,Kqe as w,BKe as x,UKe as y,zKe as z};