diff --git a/app/Http/Controllers/AdminController.php b/app/Http/Controllers/AdminController.php index 86abeedd..e6fca850 100644 --- a/app/Http/Controllers/AdminController.php +++ b/app/Http/Controllers/AdminController.php @@ -358,18 +358,18 @@ class AdminController extends Controller } - private function fa2en_numbers($input) - { - if (is_string($input)) { - $fa_numbers = ['۰', '۱', '۲', '۳', '۴', '۵', '۶', '۷', '۸', '۹']; - $en_numbers = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9']; - return str_replace($fa_numbers, $en_numbers, $input); - } elseif (is_array($input)) { - return array_map([$this, __FUNCTION__], $input); - } else { - return $input; - } - } +// private function fa2en_numbers($input) +// { +// if (is_string($input)) { +// $fa_numbers = ['۰', '۱', '۲', '۳', '۴', '۵', '۶', '۷', '۸', '۹']; +// $en_numbers = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9']; +// return str_replace($fa_numbers, $en_numbers, $input); +// } elseif (is_array($input)) { +// return array_map([$this, __FUNCTION__], $input); +// } else { +// return $input; +// } +// } } diff --git a/app/Http/Controllers/AttendanceController.php b/app/Http/Controllers/AttendanceController.php index a991ec18..24e7c436 100644 --- a/app/Http/Controllers/AttendanceController.php +++ b/app/Http/Controllers/AttendanceController.php @@ -82,8 +82,7 @@ class AttendanceController extends Controller ? 'admin/' : 'attendance/'; $now = Carbon::now()->format('Y-m-d 00:00:00'); - $existed = $Attendance->whereNull('exited_at')->where('entered_at', '>=', $now)->first(); - + $existed = $Attendance->whereNull('exited_at')->where('entered_at', '>=', now()->format('Y-m-d 00:00:00'))->where('entered_at', '<=', now()->format('Y-m-d 23:59:59'))->first(); $user = User::where('user_name', $_COOKIE['user_identity'])->first(); $until_now = null; @@ -321,7 +320,7 @@ class AttendanceController extends Controller $attendance->duration = $duration; $attendance->save(); - send_tel($user->name, $attendance, 'attendance'); + $this->send($user->name, $attendance, 'attendance'); return redirect()->back()->with('message', [ 'color' => '#3b82f6', @@ -340,7 +339,7 @@ class AttendanceController extends Controller $attendance->office_location = ['lat' => $officeLat, 'lng' => $officeLng]; $attendance->save(); - send_tel($user->name, $attendance, 'attendance'); + $this->send($user->name, $attendance, 'attendance'); return redirect()->back()->with('message', [ 'color' => '#22c55e', @@ -354,15 +353,15 @@ class AttendanceController extends Controller if (!$user) { return response()->json(['error' => 'Unauthorized'], 401); } - $attendance = Attendance::where('user_identity', $user->user_name) ->whereNull('exited_at') - ->latest('entered_at') + ->where('entered_at', '>=', now()->format('Y-m-d 00:00:00'))->where('entered_at', '<=', now()->format('Y-m-d 23:59:59')) ->first(); + $today = Carbon::now()->format('Y-m-d'); $day = Carbon::parse($attendance->entered_at)->format('Y-m-d'); - if ($today !== $day || !$attendance) { + if (!$attendance) { return response()->json([ 'status' => 'error', 'color' => '#C30004', @@ -386,7 +385,7 @@ class AttendanceController extends Controller 'duration' => $durationSeconds ]); - dd(send_tel($user->name, $break, 'break')); +// dd($this->send($user->name, $break, 'break')); return response()->json([ "break_status" => 'ended', 'duration' => $durationSeconds @@ -398,7 +397,7 @@ class AttendanceController extends Controller 'break_start' => $now, ]); - dd(send_tel($user->name, $break, 'break')); +// dd($this->send($user->name, $break, 'break')); $user->update([ 'break' => 1 @@ -486,7 +485,7 @@ class AttendanceController extends Controller $status = 'request'; $d = "ایجاد روز کاری"; - send_tel($user->name, $d, $status); + $this->send($user->name, $d, $status); $user->req_counts += 1; $user->save(); return redirect('/')->with('message', [ @@ -517,7 +516,7 @@ class AttendanceController extends Controller $att->save(); $status = 'request'; $d = "تغییر ساعت کاری"; - send_tel($user->name, $d, $status); + $this->send($user->name, $d, $status); $user->req_counts += 1; $user->save(); return redirect('/')->with('message', [ @@ -564,7 +563,7 @@ class AttendanceController extends Controller $attendance->save(); $status = 'request'; $d = "حذف روز کاری"; - send_tel($user->name, $d, $status); + $this->send($user->name, $d, $status); $user->req_counts += 1; $user->save(); return redirect()->back()->with('message', [ @@ -643,122 +642,46 @@ class AttendanceController extends Controller ]); } - private function fa2en_numbers($input) - { - if (is_string($input)) { - $fa_numbers = ['۰', '۱', '۲', '۳', '۴', '۵', '۶', '۷', '۸', '۹']; - $en_numbers = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9']; - return str_replace($fa_numbers, $en_numbers, $input); - } elseif (is_array($input)) { - return array_map([$this, __FUNCTION__], $input); - } else { - return $input; - } - } } -function send_tel($user, $data, $status) -{ - if ($status == 'attendance') { -// dd('hi'); - $enter = Carbon::parse($data->entered_at)->format('H:i'); - $date = Jalalian::fromCarbon(Carbon::parse($data->entered_at))->format('Y/m/d'); - $exit = $data->exited_at ? Carbon::parse($data->exited_at)->format('H:i') : null; -// $user = json_decode($user); - $message = "تاریخ: {$date}\n {$user} در ساعت "; - if (!$exit) { - $message .= "{$enter} وارد شد."; - } else { - $message .= "{$exit} خارج شد."; - } - } - if ($status == 'break') { - $date = Jalalian::fromCarbon(Carbon::parse($data->break_start))->format('Y/m/d'); - $start = Carbon::parse($data->break_start)->format('H:i'); - $end = Carbon::parse($data->break_end)->format('H:i'); - if (!$data->break_end) - $message = "تاریخ: {$date}\n {$user} در ساعت {$start} شروع به استراحت کرد."; - else - $message = "تاریخ: {$date}\n {$user} در ساعت {$end} به استراحت پایان داد."; - } - - if ($status == 'request') { - $message = "{$user} درخواست {$data} ثبت کرد."; - } - - $admins = User::whereIn('is_admin', [1,2])->whereNotNull('chatid')->select('chatid', 'bale', 'user_name')->get(); - if ($_COOKIE['user_identity'] !== 'test') { - foreach ($admins as $admin) { - if (!$admin->bale) {continue;} -// dd($admin->chatid); -// Http::get("https://api.wwwapp.ir/telegran_send.php", [ -// 'botToken' => "7467099619:AAF2V6yYcbAb8oSIRSCyH5i2GKfdWVO3a7k", -// 'chatId' => $admin->chatid, -// 'message' => $message, -// ]); - if ($admin->bale) { - try { - $response = Http::post('https://tapi.bale.ai/1482838710:sYbLzby0tuLRzHvP4d3LsbcNwg2sjSDLTAU/sendMessage', [ - "chat_id" => $admin->bale, - 'text' => $message, - ]); - }catch (\Exception $e){} - } - Log::create([ - 'error' => $response->body(), - 'user' => "کاربر: $user -ادمین: {$admin->user_name}", - ]); - } - }else{ - try { - $response = Http::post('https://tapi.bale.ai/1482838710:sYbLzby0tuLRzHvP4d3LsbcNwg2sjSDLTAU/sendMessage', [ - "chat_id" => '985309723', - 'text' => $message, - ]); - }catch (\Exception $e){} - } -// return $message; -} - -function auto_break($user_id, $force_method = null) -{ - $user = User::where('user_name', $user_id)->first(); - if (!$attendances = Attendance::whereNull('exited_at')->latest('entered_at')->where('user_identity', $user_id)->first()) { - throw new UnprocessableEntityHttpException('attendance not found'); - } - $break = "start"; - if ($AttendanceBreak = AttendanceBreak::where('attendance_id', $attendances->id)->whereNull('break_end')->first()) { - $break = "end"; - - } - if ($force_method) { - $break = $force_method; - } - - if ($break == "end") { - $start = Carbon::parse($break->break_start)->format('H:i:s'); - $end = Carbon::parse($break->break_end)->format('H:i:s'); - $status = 'ended'; - $att = new Attendance(); - $break->break_end = now(); - $break->duration = $att->duration($start, $end); - $break->save(); - $time = Carbon::parse($break->break_end)->format('H:i:s'); - sendbot($user->chatid, "پایان استراحت: $time"); - - } elseif ($break == "start" and empty($AttendanceBreak)) { - $status = 'started'; - $break = new AttendanceBreak(); - $break->attendance_id = $attendances->id; - $break->break_start = now(); - $break->save(); - $time = Carbon::parse($break->break_start)->format('H:i:s'); - - sendbot($user->chatid, "شروع استراحت: $time"); - - } - return $status ?? $break; -} \ No newline at end of file +//function auto_break($user_id, $force_method = null) +//{ +// $user = User::where('user_name', $user_id)->first(); +// if (!$attendances = Attendance::whereNull('exited_at')->latest('entered_at')->where('user_identity', $user_id)->first()) { +// throw new UnprocessableEntityHttpException('attendance not found'); +// } +// $break = "start"; +// if ($AttendanceBreak = AttendanceBreak::where('attendance_id', $attendances->id)->whereNull('break_end')->first()) { +// $break = "end"; +// +// } +// if ($force_method) { +// $break = $force_method; +// } +// +// if ($break == "end") { +// $start = Carbon::parse($break->break_start)->format('H:i:s'); +// $end = Carbon::parse($break->break_end)->format('H:i:s'); +// $status = 'ended'; +// $att = new Attendance(); +// $break->break_end = now(); +// $break->duration = $att->duration($start, $end); +// $break->save(); +// $time = Carbon::parse($break->break_end)->format('H:i:s'); +// sendbot($user->chatid, "پایان استراحت: $time"); +// +// } elseif ($break == "start" and empty($AttendanceBreak)) { +// $status = 'started'; +// $break = new AttendanceBreak(); +// $break->attendance_id = $attendances->id; +// $break->break_start = now(); +// $break->save(); +// $time = Carbon::parse($break->break_start)->format('H:i:s'); +// +// sendbot($user->chatid, "شروع استراحت: $time"); +// +// } +// return $status ?? $break; +//} \ No newline at end of file diff --git a/app/Http/Controllers/Controller.php b/app/Http/Controllers/Controller.php index 0a12553f..f1c4b1b8 100755 --- a/app/Http/Controllers/Controller.php +++ b/app/Http/Controllers/Controller.php @@ -1,11 +1,127 @@ first()->value ?? false; } -} + + public function fa2en_numbers($input) + { + if (is_string($input)) { + $fa_numbers = ['۰', '۱', '۲', '۳', '۴', '۵', '۶', '۷', '۸', '۹']; + $en_numbers = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9']; + return str_replace($fa_numbers, $en_numbers, $input); + } elseif (is_array($input)) { + return array_map([$this, __FUNCTION__], $input); + } else { + return $input; + } + } + + public function send($user, $data, $status) + { + if ($status == 'attendance') { +// dd('hi'); + $enter = Carbon::parse($data->entered_at)->format('H:i'); + $date = Jalalian::fromCarbon(Carbon::parse($data->entered_at))->format('Y/m/d'); + $exit = $data->exited_at ? Carbon::parse($data->exited_at)->format('H:i') : null; +// $user = json_decode($user); + $message = "تاریخ: {$date}\n {$user} در ساعت "; + if (!$exit) { + $message .= "{$enter} وارد شد."; + } else { + $message .= "{$exit} خارج شد."; + } + } + + if ($status == 'break') { + $date = Jalalian::fromCarbon(Carbon::parse($data->break_start))->format('Y/m/d'); + $start = Carbon::parse($data->break_start)->format('H:i'); + $end = Carbon::parse($data->break_end)->format('H:i'); + if (!$data->break_end) + $message = "تاریخ: {$date}\n {$user} در ساعت {$start} شروع به استراحت کرد."; + else + $message = "تاریخ: {$date}\n {$user} در ساعت {$end} به استراحت پایان داد."; + } + + if ($status == 'request') { + $message = "{$user} درخواست {$data} ثبت کرد."; + } + + $admins = User::whereIn('is_admin', [1,2])->whereNotNull('chatid')->select('chatid', 'bale', 'user_name')->get(); + if ($_COOKIE['user_identity'] !== 'test') { + foreach ($admins as $admin) { + if (!$admin->bale) {continue;} +// dd($admin->chatid); +// Http::get("https://api.wwwapp.ir/telegran_send.php", [ +// 'botToken' => "7467099619:AAF2V6yYcbAb8oSIRSCyH5i2GKfdWVO3a7k", +// 'chatId' => $admin->chatid, +// 'message' => $message, +// ]); + if ($admin->bale) { + try { + $response = Http::post('https://tapi.bale.ai/1482838710:sYbLzby0tuLRzHvP4d3LsbcNwg2sjSDLTAU/sendMessage', [ + "chat_id" => $admin->bale, + 'text' => $message, + ]); + }catch (\Exception $e){} + } + Log::create([ + 'error' => $response->body(), + 'user' => "کاربر: $user +ادمین: {$admin->user_name}", + ]); + } + }else{ + try { + $response = Http::post('https://tapi.bale.ai/1482838710:sYbLzby0tuLRzHvP4d3LsbcNwg2sjSDLTAU/sendMessage', [ + "chat_id" => '985309723', + 'text' => $message, + ]); + }catch (\Exception $e){} + } +// return $message; + } + + public function send_admins($message) + { + $admins = User::whereNotNull('is_admin')->whereNotNull('bale')->select('bale')->get(); + + foreach ($admins as $admin) { + try{ + Http::/*withOptions([ + 'curl' => [ + CURLOPT_IPRESOLVE => CURL_IPRESOLVE_V4, + CURLOPT_TCP_FASTOPEN => 1, + ] + ])->*/withoutVerifying()->post('https://tapi.bale.ai/1482838710:sYbLzby0tuLRzHvP4d3LsbcNwg2sjSDLTAU/sendMessage', [ + "chat_id" => $admin->bale, + 'text' => $message, + ]); + }catch (\Exception $e){} + } + } + + public function send_level1_admins($message) + { + $admins = User::where('is_admin', 1)->whereNotNull('bale')->select('bale')->get(); + + foreach ($admins as $admin) { + try { + Http::withoutVerifying()->post('https://tapi.bale.ai/1482838710:sYbLzby0tuLRzHvP4d3LsbcNwg2sjSDLTAU/sendMessage', [ + "chat_id" => $admin->bale, + 'text' => $message, + ]); + } catch (\Exception $e) { + } + } + } + } diff --git a/app/Http/Controllers/TaskController.php b/app/Http/Controllers/TaskController.php index b215274d..0c2f6c26 100644 --- a/app/Http/Controllers/TaskController.php +++ b/app/Http/Controllers/TaskController.php @@ -2,6 +2,11 @@ namespace App\Http\Controllers; +use App\Models\App; +use App\Models\TaskComment; +use App\Models\TaskDuration; +use http\Env\Response; +use http\Message; use Illuminate\Support\Facades\Http; use Illuminate\Http\Request; use App\Models\Pivot_Tasks; @@ -10,262 +15,530 @@ use GuzzleHttp\Client; use App\Models\Tasks; use App\Models\User; use Carbon\Carbon; +use Morilog\Jalali\Jalalian; +use Carbon\CarbonInterval; class TaskController extends Controller { + private function taskChangeMessage(Tasks $task, array $before, array $after, ?User $actor): string + { + $lines = []; + $actorName = $actor?->name ?? 'نامشخص'; + $titleBefore = (string)($before['title'] ?? ''); + $titleAfter = (string)($after['title'] ?? $task->title ?? ''); + + $lines[] = "ویرایش تسک: «{$titleAfter}»"; + $lines[] = "توسط: {$actorName}"; + + $appBefore = $before['app'] ?? null; + $appAfter = $after['app'] ?? $task->app ?? null; + $a1 = App::find($appBefore)?->name_fa ?? ($appBefore ?? '-'); + $a2 = App::find($appAfter)?->name_fa ?? ($appAfter ?? '-'); + $lines[] = ($appBefore != $appAfter) ? "اپ: {$a1} ← {$a2}" : "اپ: {$a2}"; + + $lines[] = (($before['title'] ?? null) !== ($after['title'] ?? null)) + ? "عنوان: {$titleBefore} ← {$titleAfter}" + : "عنوان: {$titleAfter}"; + + $priorityFa = [ + 'none' => 'ندارد', + 'low' => 'کم', + 'medium' => 'عادی', + 'high' => 'زیاد', + 'urgent' => 'فوری', + ]; + $p1 = $before['priority'] ?? null; + $p2 = $after['priority'] ?? null; + $lines[] = ($p1 !== $p2) + ? "اولویت: " . ($priorityFa[$p1] ?? ($p1 ?? '-')) . " ← " . ($priorityFa[$p2] ?? ($p2 ?? '-')) + : "اولویت: " . ($priorityFa[$p2] ?? ($p2 ?? '-')); + + $stateFa = [ + 1 => 'انباشته', + 2 => 'برای انجام', + 3 => 'درحال انجام', + 4 => 'پایان یافته', + ]; + $s1 = (int)($before['state'] ?? 0); + $s2 = (int)($after['state'] ?? 0); + $lines[] = ($s1 !== $s2 && $s2) + ? "وضعیت: " . ($stateFa[$s1] ?? ($before['state'] ?? '-')) . " ← " . ($stateFa[$s2] ?? ($after['state'] ?? '-')) + : "وضعیت: " . ($stateFa[$s2] ?? ($after['state'] ?? '-')); + + $d1 = $before['start_date'] ?? null; + $d2 = $after['start_date'] ?? null; + $lines[] = ($d1 !== $d2) + ? "شروع: " . ($d1 ?: '-') . " ← " . ($d2 ?: '-') + : "شروع: " . ($d2 ?: '-'); + + $t1 = $before['target_date'] ?? null; + $t2 = $after['target_date'] ?? null; + $lines[] = ($t1 !== $t2) + ? "ددلاین: " . ($t1 ?: '-') . " ← " . ($t2 ?: '-') + : "ددلاین: " . ($t2 ?: '-'); + + $desc1 = trim((string)($before['description'] ?? '')); + $desc2 = trim((string)($after['description'] ?? '')); + $lines[] = ($desc1 !== $desc2) + ? "توضیحات: " . (!empty($desc2) ? 'تغییر کرد' : 'پاک شد') + : "توضیحات: بدون تغییر"; + + $aBefore = $before['assignees'] ?? null; + $aAfter = $after['assignees'] ?? null; + $arr1 = is_string($aBefore) ? json_decode($aBefore, true) : $aBefore; + $arr2 = is_string($aAfter) ? json_decode($aAfter, true) : $aAfter; + $arr1 = is_array($arr1) ? array_map('strval', $arr1) : []; + $arr2 = is_array($arr2) ? array_map('strval', $arr2) : []; + sort($arr1); + sort($arr2); + $names1 = User::whereIn('id', $arr1)->pluck('name')->all(); + $names2 = User::whereIn('id', $arr2)->pluck('name')->all(); + $lines[] = ($arr1 !== $arr2) + ? "مسئولین: " . (!empty($names1) ? implode('، ', $names1) : '-') . " ← " . (!empty($names2) ? implode('، ', $names2) : '-') + : "مسئولین: " . (!empty($names2) ? implode('، ', $names2) : '-'); + + return implode("\n", $lines); + } +// public function tasks() +// { +// $user = User::where('user_name', $_COOKIE['user_identity'])->first(); +// $tasks = $user->tasks; +// $users = User::get(); +// +// $state_order = [ +// "c73c2044-ea14-42cb-b08d-cecf3d1fdfb5", +// "a9ce312f-cfca-491e-8e3d-1975aa6ebc10", +// "dea1fb57-a281-4fe7-8f3e-ee5567637e35", +// "770fbe42-99f6-41db-9b9e-773d9cced1a5", +// "b0e464e1-34eb-41ea-b2f7-3ef7483bc9f0", +// "d61d14a3-72f7-4f44-894b-efe8b2a75be1", +// ]; +// +// $work_item = $tasks->whereNull('parent')->sortBy(fn($t) => array_search($t->state, $state_order)); +// $sub_work_items = $tasks->whereNotNull('parent')->sortBy(fn($t) => array_search($t->state, $state_order)); +// +// foreach ($work_item as $w) { +// foreach ($sub_work_items as $t) { +// foreach ($users as $u) { +// if ($t->created_by == $u->plain_id) +// $t->created_by = $u->name; +// if ($w->created_by == $u->plain_id) +// $w->created_by = $u->name; +// } +// } +// } +// +// return view('tasks.tasks', compact('tasks', 'work_item', 'sub_work_items')); +// } public function tasks() { $user = User::where('user_name', $_COOKIE['user_identity'])->first(); - $tasks = $user->tasks; - $users = User::get(); + if ($user) { + if ($user->is_admin == 1) { + $tasks = Tasks::with(['duration', 'comments.user']) + ->orderBy('target_date', 'desc') + ->get(); +// dd($tasks); + foreach ($tasks as $task) { + $totalSeconds = 0; + foreach ($task->duration as $item) { + if ($item->duration !== null) { + $totalSeconds += CarbonInterval::createFromFormat('H:i:s', $item->duration)->totalSeconds; + } + } - $state_order = [ - "c73c2044-ea14-42cb-b08d-cecf3d1fdfb5", - "a9ce312f-cfca-491e-8e3d-1975aa6ebc10", - "dea1fb57-a281-4fe7-8f3e-ee5567637e35", - "770fbe42-99f6-41db-9b9e-773d9cced1a5", - "b0e464e1-34eb-41ea-b2f7-3ef7483bc9f0", - "d61d14a3-72f7-4f44-894b-efe8b2a75be1", - ]; + $task->totalDuration = CarbonInterval::seconds($totalSeconds)->cascade()->format('%H:%I:%S'); + $active_task = TaskDuration::where('task_id', $task->id)->orderBy('start', 'desc')->first(); + $task->active = !empty($active_task) && $active_task->end == null; + } + } else { + $tasks = Tasks::with(['duration', 'comments.user'])->where('created_by', $user->id) + ->orWhereJsonContains('assignees', (string)$user->id) + ->orderBy('target_date', 'desc') + ->get(); +// dd($tasks); + foreach ($tasks as $task) { + $totalSeconds = 0; + foreach ($task->duration as $item) { + if ($user->id == $item->user_id && $item->duration !== null) { + $totalSeconds += CarbonInterval::createFromFormat('H:i:s', $item->duration)->totalSeconds; + } + } - $work_item = $tasks->whereNull('parent')->sortBy(fn($t) => array_search($t->state, $state_order)); - $sub_work_items = $tasks->whereNotNull('parent')->sortBy(fn($t) => array_search($t->state, $state_order)); - - foreach ($work_item as $w) { - foreach ($sub_work_items as $t) { - foreach ($users as $u) { - if ($t->created_by == $u->plain_id) - $t->created_by = $u->name; - if ($w->created_by == $u->plain_id) - $w->created_by = $u->name; + $task->totalDuration = CarbonInterval::seconds($totalSeconds)->cascade()->format('%H:%I:%S'); + $active_task = TaskDuration::where('task_id', $task->id)->where('user_id', $user->id)->orderBy('start', 'desc')->first(); + $task->active = !empty($active_task) && $active_task->end == null; } } - } - return view('tasks.tasks', compact('tasks', 'work_item', 'sub_work_items')); + $count = count($tasks); + +// dd((new Tasks())->filterByState($tasks)['backlog'][0], 'count ='.$count); + + return view('tasks.tasks', [ + 'tasks' => (new Tasks())->filterByState($tasks), + 'count' => $count, + 'user_id' => $user->id, + ]); + } else { + return back()->with('message', [ + 'color' => 'red', + 'text' => 'کاربر یافت نشد!' + ]); + } } - public function activeTask(Request $request) + public function showTask($id) { -// dd($request->all()); -// dd($request->uid); - $user = User::where('id', $request->uid)->first(); - $p_task = Pivot_Tasks::where('task_id', $request->task_id) - ->where('user_id', $user->plain_id)->first(); - $task = Tasks::where('task_id', $request->task_id)->first(); - if ($p_task) { -// dd('task is set in pivot'); - if ($p_task->started_at == null || ($p_task->started_at !== null && $p_task->ended_at !== null)) { -// dd('in if'); - $p_task->started_at = now(); - $p_task->ended_at = null; - $user->active_task = $task->name; - $p_task->save(); - $user->save(); - return back()->with('message', [ - 'color' => 'green', - 'text' => 'وظیفه شما شروع شد، موفق باشید.' - ]); - } else { -// dd('in elseif'); + $task = Tasks::with(['comments.user'])->find($id ?? null); + return view('tasks.create', ['task' => $task]); - $now = now(); - $attendance = new Attendance(); - $s = Carbon::parse($p_task->started_at)->format('H:i:s'); - $e = Carbon::parse($now)->format('H:i:s'); - $duration = $p_task->duration; - if ($e > $s) { - $diff = $attendance->duration($s, $e); - if ($duration !== null) { - [$h1, $m1, $s1] = explode(':', $duration); - $durationSeconds = $h1 * 3600 + $m1 * 60 + $s1; + } - [$h2, $m2, $s2] = explode(':', $diff); - $diffSeconds = $h2 * 3600 + $m2 * 60 + $s2; + public function editTask(Request $request) + { +// dd($request->all()); + if (!isset($_COOKIE['user_identity'])) { + return back()->with('message', [ + 'color' => 'red', + 'text' => 'ابتدا باید وارد شوید!' + ]); + } + $actor = User::where('user_name', $_COOKIE['user_identity'])->first(); - $totalSeconds = $durationSeconds + $diffSeconds; + $data = $request->all(); + $task = Tasks::find($data['id'] ?? null); + if (!$task) { + return back()->with('message', [ + 'color' => 'red', + 'text' => 'وظیفه یافت نشد!' + ]); + } - $hours = floor($totalSeconds / 3600); - $minutes = floor(($totalSeconds % 3600) / 60); - $seconds = $totalSeconds % 60; + $before = $task->toArray(); - $duration = sprintf('%02d:%02d:%02d', $hours, $minutes, $seconds); - } else { - $duration = $diff; - } - $p_task->ended_at = $now; - $p_task->duration = $duration; - $user->active_task = null; - $p_task->save(); - $user->save(); - return back()->with('message', [ - 'color' => 'green', - 'text' => 'وظیفه شما با موفقیت پایان یافت.' - ]); + $data['updated_by'] = $actor?->id; + if (array_key_exists('assignees', $data)) { + $data['assignees'] = !empty($data['assignees']) ? json_encode($data['assignees']) : null; + } else { + unset($data['assignees']); + } + unset($data['_token'], $data['id'], $data['start_date_display'], $data['target_date_display']); + + $task->update($data); + $after = $task->toArray(); + + $title = $task->title; + $message = "تسک «{$title}» برای شما به‌روزرسانی شد."; + $message_admin = $this->taskChangeMessage($task, $before, $after, $actor); + + if (!empty($request->assignees)) { + foreach ($request->assignees as $assignee) { + $assigneeUser = User::where('id', $assignee)->first(); + if ($assigneeUser && $assigneeUser->bale !== null) { + $this->send_bale($assigneeUser->bale, $message); } } } - +// dd($data, $message, $message_admin); + $this->send_level1_admins($message_admin); return back()->with('message', [ - 'color' => 'red', - 'text' => 'وظیفه یافت نشد✖️' + 'color' => 'green', + 'text' => $message ]); -// $action = $request->input('action_type'); -// $start = $request->input('started_at'); -// $end = $request->input('ended_at'); -// $duration = $request->input('duration'); -// -// if ($action == 'end') { -// $attendance = new Attendance(); -// $s = Carbon::parse($start)->format('H:i:s'); -// $e = Carbon::parse($end)->format('H:i:s'); -// if ($e > $s) { -// $diff = $attendance->duration($s, $e); -// if ($duration !== null) { -// [$h1, $m1, $s1] = explode(':', $duration); -// $durationSeconds = $h1 * 3600 + $m1 * 60 + $s1; -// -// [$h2, $m2, $s2] = explode(':', $diff); -// $diffSeconds = $h2 * 3600 + $m2 * 60 + $s2; -// -// $totalSeconds = $durationSeconds + $diffSeconds; -// -// $hours = floor($totalSeconds / 3600); -// $minutes = floor(($totalSeconds % 3600) / 60); -// $seconds = $totalSeconds % 60; -// -// $duration = sprintf('%02d:%02d:%02d', $hours, $minutes, $seconds); -// } else { -// $duration = $diff; -// } -// } -// $data = [ -// 'started_at' => $start, -// 'ended_at' => $end, -// 'duration' => $duration, -// ]; -// } else { -// $data = [ -// 'started_at' => $start, -// 'ended_at' => null, -// -// ]; -// } -// try { -// -// DB::table('pivot_tasks')->where('id', $request->p_id)->update($data); -// -// -// return "record saved"; -// } catch (\Exception $e) { -// return $e->getMessage(); -// } } public function createTask() { - $users = User::whereNotNull('plain_id')->get(); - $tasks = Tasks::all(); + return view('tasks.create'); + } - return view('tasks.create', [ - 'users' => $users, - 'tasks' => $tasks, + public function deleteTask($id) + { + Tasks::destroy($id); + + return response()->json([ + "success" => true, + "message" => "Task deleted successfully.", + "task_id" => 45 ]); } - public function addTask(Request $request){ -// dd($request); - $task = new Tasks(); - $task->name = $request->input('taskTitle'); - $task->created_at = Carbon::now()->format('Y-m-d H:i:s'); - $task->save(); - return response()->with('message', "تسک اضافه شد"); - - } public function storeTask(Request $request) { - $created_by = User::where('user_name', $_COOKIE['user_identity'])->first()->plain_id; +// dd($request->all()); + if (!isset($_COOKIE['user_identity'])) { + return back()->with('message', [ + 'color' => 'red', + 'text' => 'ابتدا باید وارد شوید!' + ]); + } + $user = User::where('user_name', $_COOKIE['user_identity'])->first(); - Tasks::create([ - "name" => $request->name, - "desc" => $request->description_html, - "priority" => $request->priority, - "start_date" => $request->start_date, - "target_date" => $request->target_date, - "state" => $request->state, - "assignees" => $request->assignees, - "parent" => $request->parent, - "estimate_point" => $request->estimate_point, + $data = $request->all(); + $data['created_by'] = $user->id; + $data['assignees'] = !empty($data['assignees']) ? json_encode($data['assignees']) : null; - ]); + $task = Tasks::create($data); -// $headers = [ -// 'x-api-key' => 'plane_api_ec378e977ceb4bd1bbd2332855370645', -// 'Content-Type' => 'application/json' -// ]; -// -// $body = json_encode([ -// "name" => $name, -// "description_html" => $desc ?: '', -// "priority" => $priority ?: 'none', -// "start_date" => $start_date ?: null, -// "target_date" => $target_date ?: null, -// "estimate_point" => $estimate_point ?: '', -// "state" => $state ?: '', -// "parent" => $parent ?: '', -// "assignees" => $assignees ?: '', -// // "labels" => $labels ?: null, -// // "created_by" => $created_by -// ], JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT); -// -// $client = new Client(); -// -// $response = $client->post( -// 'https://api.plane.so/api/v1/workspaces/montzar/projects/c1df4085-582f-4b57-b3c6-95b7d4d19007/issues/', -// [ -// 'headers' => $headers, -// 'body' => $body, -// ] -// ); -// -// $data = json_decode($response->getBody(), true); + $message = "تسک جدیدی با عنوان {$data['title']} برای شما ایجاد شد."; + $deadline = !empty($data['target_date']) ? Jalalian::fromCarbon(Carbon::parse($data['target_date']))->format('Y-m-d') : null; + $app = App::find($data['app']); + $message_admin = "ایجاد تسک: «{$data['title']}»"; + $message_admin .= !empty($app) ? "\nاپ {$app->name_fa}" : null; + $message_admin .= !empty($deadline) ? "\nددلاین {$deadline}" : null; + $message_admin .= !empty($data['start_date']) ? "\nتاریخ شروع {$data['start_date']}" : null; + $message_admin .= !empty($data['state_fa']) ? "\nوضعیت: {$data['state_fa']}" : null; + $message_admin .= !empty($data['description']) ? "\nبا توضیحات:\n" . $data['description'] : null; + $message_admin .= !empty($data['assignees']) ? "\nتوسط " . $user->name . " ساخته شد و به" : null; - // update_tasks($data); + if (!empty($data['assignees'])) { + foreach ($request->assignees as $assignee) { + $user = User::where('id', $assignee)->first(); + $message_admin .= "\n$user->name"; + if ($user && $user->bale !== null) { + $this->send_bale($user->bale, $message); + } + } + $message_admin .= "\nاختصاص یافت."; + } else { + $message_admin .= "\nتوسط " . $user->name . " ساخته شد"; + } +// dd($data, $message, $message_admin); + $this->send_level1_admins($message_admin); return back()->with('message', [ 'color' => 'green', - 'text' => 'وظیفه با موفقیت ایجاد شد.' + 'text' => $message ]); } -// public function webhookPlane(Request $request) -// { -// $d = $request->all(); -// -// // فقط وقتی تغییر state هست -// if (isset($d['event'], $d['action'], $d['data']['name'], $d['data']['state']['name'])) { -// $msg = "Event: {$d['event']}\nAction: {$d['action']}\nName: {$d['data']['name']}\nNew Status: {$d['data']['state']['name']}"; -// -// // ارسال به تلگرام -// Http::get("https://api.wwwapp.ir/telegran_send.php", [ -// 'botToken' => "7467099619:AAF2V6yYcbAb8oSIRSCyH5i2GKfdWVO3a7k", -// 'chatId' => "-4742642674", -// 'message' => $msg, -// ]); -// } -// -// // اگر خواستی ثبت در دیتابیس هم اضافه کنی -// // DB::table('tst')->insert([ -// // 'data' => json_encode($d, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE), -// // ]); -// -// return response()->json(['status' => 'ok'], 200); -// } + public function activeTask(Request $request) + { +// dd($request); + $user = User::where('user_name', $_COOKIE['user_identity'])->first(); + $task = Tasks::find($request->task_id); + if (!$task) { + return response()->json([ + 'action' => 'not_found', + 'status' => false + ]); + } + + $taskDU = TaskDuration::where('user_id', $user->id) + ->where('task_id', $request->task_id) + ->orderBy('id', 'desc') + ->first(); + + // اگر رکورد باز داریم => پایان + if (!empty($taskDU) && ($taskDU->start !== null && $taskDU->end == null)) { +// dd('in if'); + + $attendance = new Attendance(); + $s = Carbon::parse($taskDU->start)->format('H:i:s'); + $e = Carbon::parse(now())->format('H:i:s'); + $duration = $taskDU->duration; + if ($e > $s) { + $diff = $attendance->duration($s, $e); + if ($duration !== null) { + [$h1, $m1, $s1] = explode(':', $duration); + $durationSeconds = $h1 * 3600 + $m1 * 60 + $s1; + + [$h2, $m2, $s2] = explode(':', $diff); + $diffSeconds = $h2 * 3600 + $m2 * 60 + $s2; + + $totalSeconds = $durationSeconds + $diffSeconds; + + $hours = floor($totalSeconds / 3600); + $minutes = floor(($totalSeconds % 3600) / 60); + $seconds = $totalSeconds % 60; + + $duration = sprintf('%02d:%02d:%02d', $hours, $minutes, $seconds); + } else { + $duration = $diff; + } + $taskDU->end = now(); + $taskDU->duration = $duration; + $user->active_task = null; + $taskDU->save(); + $user->save(); + $this->send_level1_admins("پایان تسک: «{$task->title}»\nتوسط: {$user->name}\nمدت این نوبت: {$duration}"); + return response()->json([ + 'action' => 'ended', + 'status' => true, + 'duration' => $duration, + 'start' => $taskDU->start, + 'end' => $taskDU->end, + ]); + } else + return response()->json([ + 'action' => 'end', + 'status' => false + ]); + } else { + // شروع => همیشه یک رکورد جدید بساز + $new_task_duration = TaskDuration::create([ + 'task_id' => $task->id, + 'user_id' => $user->id, + 'start' => now(), + 'end' => null, + ]); + $user->active_task = $task->title; + $user->save(); + $this->send_level1_admins("شروع تسک: «{$task->title}»\nتوسط: {$user->name}"); + return response()->json([ + 'action' => 'start', + 'status' => true, + 'start' => $new_task_duration->start, + 'id' => $new_task_duration->id, + ]); + } + return back()->with('message', ['color' => 'red', + 'text' => 'وظیفه یافت نشد✖️']); + + } + public function addTask(Request $request) + { + if (isset($_COOKIE['user_identity'])) { + $user = User::where('user_name', $_COOKIE['user_identity'])->first(); + } else { + return back()->with('message', [ + 'color' => 'red', + 'text' => 'auth failed!' + ]); + } + $request->validate([ + 'title' => 'required', + 'description' => 'required', + 'assignees' => 'required', + 'start_date' => 'required', + 'target_date' => 'required', + 'priority' => 'required', + 'description_html' => 'required', + 'completed_at' => 'required', + 'state' => 'required', + 'created_at' => 'required', + 'updated_at' => 'required', + 'app' => 'required', + 'task_type' => 'required', + ]); + $data = $request->all(); + $data['user_id'] = $user->id; + + Tasks::create([$data]); + return back()->with('message', [ + 'color' => 'green', + 'text' => 'وظیفه ایجاد شد.' + ]); + } + + public function storeComment(Request $request, $id) + { + if (!isset($_COOKIE['user_identity'])) { + return back()->with('message', [ + 'color' => 'red', + 'text' => 'ابتدا باید وارد شوید!' + ]); + } + + $actor = User::where('user_name', $_COOKIE['user_identity'])->first(); + $task = Tasks::find($id ?? null); + if (!$task) { + return back()->with('message', [ + 'color' => 'red', + 'text' => 'وظیفه یافت نشد!' + ]); + } + + $request->validate([ + 'body' => 'required|string', + ]); + + $body = trim((string)$request->input('body')); + + preg_match_all('/@([\p{L}\p{N}_.-]+)/u', $body, $matches); + $usernames = array_values(array_unique($matches[1] ?? [])); + + $mentionedUsers = !empty($usernames) + ? User::whereIn('user_name', $usernames)->get() + : collect(); + + $mentionedIds = $mentionedUsers->pluck('id')->values()->all(); + + TaskComment::create([ + 'task_id' => $task->id, + 'user_id' => $actor->id, + 'body' => $body, + 'mentioned_user_ids' => !empty($mentionedIds) ? $mentionedIds : null, + ]); + + $text = "کامنت جدید روی تسک «{$task->title}»\n" + . "توسط: {$actor->name}\n\n" + . $body; + + foreach ($mentionedUsers as $mu) { + if ($mu->id === $actor->id) { + continue; + } + if ($mu->bale) { + $this->send_bale($mu->bale, $text); + } + } + + $this->send_level1_admins($text); + + return back()->with('message', [ + 'color' => 'green', + 'text' => 'کامنت ثبت شد.' + ]); + } + + + public function webhookPlane(Request $request) + { + $d = $request->all(); + + // فقط وقتی تغییر state هست + if (isset($d['event'], $d['action'], $d['data']['name'], $d['data']['state']['name'])) { + $msg = "Event: {$d['event']}\nAction: {$d['action']}\nName: {$d['data']['name']}\nNew Status: {$d['data']['state']['name']}"; + + // ارسال به تلگرام + Http::get("https://api.wwwapp.ir/telegran_send.php", [ + 'botToken' => "7467099619:AAF2V6yYcbAb8oSIRSCyH5i2GKfdWVO3a7k", + 'chatId' => "-4742642674", + 'message' => $msg, + ]); + } + + // اگر خواستی ثبت در دیتابیس هم اضافه کنی + // DB::table('tst')->insert([ + // 'data' => json_encode($d, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE), + // ]); + + return response()->json(['status' => 'ok'], 200); + } + + + private function send_bale($chat_id, $message) + { + try { + Http::withOptions([ + 'curl' => [ + CURLOPT_IPRESOLVE => CURL_IPRESOLVE_V4, + CURLOPT_TCP_FASTOPEN => 1, + ] + ])->withoutVerifying()->post('https://tapi.bale.ai/1482838710:sYbLzby0tuLRzHvP4d3LsbcNwg2sjSDLTAU/sendMessage', [ + "chat_id" => $chat_id, + 'text' => $message, + ]); + } catch (\Exception $e) { + } + } } diff --git a/app/Models/App.php b/app/Models/App.php new file mode 100644 index 00000000..4d91504c --- /dev/null +++ b/app/Models/App.php @@ -0,0 +1,31 @@ +'خانگی', + 2=>'همکار' + ]; +} \ No newline at end of file diff --git a/app/Models/TaskComment.php b/app/Models/TaskComment.php new file mode 100644 index 00000000..5f4efb33 --- /dev/null +++ b/app/Models/TaskComment.php @@ -0,0 +1,35 @@ + 'array', + ]; + + public function task() + { + return $this->belongsTo(Tasks::class, 'task_id'); + } + + public function user() + { + return $this->belongsTo(User::class, 'user_id'); + } +} + diff --git a/app/Models/TaskDuration.php b/app/Models/TaskDuration.php new file mode 100644 index 00000000..bb9736d8 --- /dev/null +++ b/app/Models/TaskDuration.php @@ -0,0 +1,33 @@ +belongsTo(Tasks::class, 'task_id', 'id'); + } + + public function user() + { + return $this->belongsTo(User::class, 'user_id', 'id'); + } +} \ No newline at end of file diff --git a/app/Models/Tasks.php b/app/Models/Tasks.php index 5fdec9a2..a0af21c4 100644 --- a/app/Models/Tasks.php +++ b/app/Models/Tasks.php @@ -6,15 +6,16 @@ use Illuminate\Console\View\Components\Task; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; use Illuminate\Support\Facades\DB; +use Illuminate\Database\Eloquent\SoftDeletes; + class Tasks extends Model { - use HasFactory; + use HasFactory,SoftDeletes; protected $table = 'tasks'; - protected $fillable = [ 'task_id', 'title', @@ -65,6 +66,21 @@ class Tasks extends Model return $this->belogsTo(App::class); } + public function duration(){ + return $this->hasMany(TaskDuration::class, 'task_id', 'id'); + } + + public function comments() + { + return $this->hasMany(TaskComment::class, 'task_id', 'id')->orderBy('id', 'desc'); + } + + public function userDurations($userId = null) + { + $userId = $userId ?: User::where('user_name', $_COOKIE['user_identity'])->first()->id; // پیش‌فرض: کاربر جاری + return $this->taskDurations()->where('user_id', $userId); + } + public function filterByState($tasks){ $backlog = []; $todo = []; @@ -86,7 +102,7 @@ class Tasks extends Model 'todo' => $todo, 'inprogress' => $inprogress, 'done' => $done, - 'count' => count($tasks), +// 'count' => count($tasks), ]; return $tasks; } diff --git a/app/Models/User.php b/app/Models/User.php index fbe03f83..af48fa83 100755 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -6,6 +6,7 @@ namespace App\Models; use Carbon\Carbon; use Illuminate\Database\Eloquent\Factories\HasFactory; +use Illuminate\Database\Eloquent\SoftDeletes; use Illuminate\Foundation\Auth\User as Authenticatable; use Illuminate\Notifications\Notifiable; use Illuminate\Support\Facades\DB; @@ -15,7 +16,7 @@ use Morilog\Jalali\Jalalian; class User extends Authenticatable { /** @use HasFactory<\Database\Factories\UserFactory> */ - use HasFactory, Notifiable; + use HasFactory, Notifiable, softDeletes; /** diff --git a/composer.json b/composer.json index 8fac4f2b..d1b83894 100755 --- a/composer.json +++ b/composer.json @@ -10,9 +10,7 @@ "laravel/framework": "^12.0", "laravel/tinker": "^2.10.1", "morilog/jalali": "^3.4", - "predis/predis": "^3.2", - "tymon/jwt-auth": "^1.0" - + "predis/predis": "^3.2" }, "require-dev": { "fakerphp/faker": "^1.23", diff --git a/composer.lock b/composer.lock index 477a9ca6..0df2ab9a 100755 --- a/composer.lock +++ b/composer.lock @@ -5840,91 +5840,6 @@ ], "time": "2025-04-30T23:37:27+00:00" }, - { - "name": "tymon/jwt-auth", - "version": "dev-develop", - "source": { - "type": "git", - "url": "https://github.com/tymondesigns/jwt-auth.git", - "reference": "014be8d493d228d14bbc291b24e835d330c092a0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/tymondesigns/jwt-auth/zipball/014be8d493d228d14bbc291b24e835d330c092a0", - "reference": "014be8d493d228d14bbc291b24e835d330c092a0", - "shasum": "" - }, - "require": { - "illuminate/auth": "^5.2|^6|^7|^8|^9", - "illuminate/contracts": "^5.2|^6|^7|^8|^9", - "illuminate/http": "^5.2|^6|^7|^8|^9", - "illuminate/support": "^5.2|^6|^7|^8|^9", - "lcobucci/jwt": "^3.4|^4.0", - "namshi/jose": "^7.0", - "nesbot/carbon": "^1.0|^2.0", - "php": "^7.4|^8.0" - }, - "require-dev": { - "illuminate/console": "^5.2|^6|^7|^8|^9", - "illuminate/database": "^5.2|^6|^7|^8|^9", - "illuminate/routing": "^5.2|^6|^7|^8|^9", - "mockery/mockery": ">=0.9.9", - "phpunit/phpunit": "^8.5|^9.4", - "yoast/phpunit-polyfills": "^0.2.0" - }, - "type": "library", - "extra": { - "laravel": { - "aliases": { - "JWTAuth": "Tymon\\JWTAuth\\Facades\\JWTAuth", - "JWTFactory": "Tymon\\JWTAuth\\Facades\\JWTFactory" - }, - "providers": [ - "Tymon\\JWTAuth\\Providers\\LaravelServiceProvider" - ] - }, - "branch-alias": { - "dev-develop": "1.0-dev" - } - }, - "autoload": { - "psr-4": { - "Tymon\\JWTAuth\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Sean Tymon", - "email": "tymon148@gmail.com", - "homepage": "https://tymon.xyz", - "role": "Developer" - } - ], - "description": "JSON Web Token Authentication for Laravel and Lumen", - "homepage": "https://github.com/tymondesigns/jwt-auth", - "keywords": [ - "Authentication", - "JSON Web Token", - "auth", - "jwt", - "laravel" - ], - "support": { - "issues": "https://github.com/tymondesigns/jwt-auth/issues", - "source": "https://github.com/tymondesigns/jwt-auth" - }, - "funding": [ - { - "url": "https://www.patreon.com/seantymon", - "type": "patreon" - } - ], - "time": "2022-04-27T08:53:50+00:00" - }, { "name": "voku/portable-ascii", "version": "2.0.3", diff --git a/config/rich-text-laravel.php b/config/rich-text-laravel.php new file mode 100644 index 00000000..4d40cf1c --- /dev/null +++ b/config/rich-text-laravel.php @@ -0,0 +1,78 @@ + RichText::class, + + /* + |-------------------------------------------------------------------------- + | Encrypted Rich Text Model + |-------------------------------------------------------------------------- + | + | When setting the `encrypted` option to `true` on the attribute, the package + | will use this model instead of the base RichText model. + | + */ + 'encrypted_model' => EncryptedRichText::class, + + /* + |-------------------------------------------------------------------------- + | Supported Files Content-Types + |-------------------------------------------------------------------------- + | + | When attaching non-image files to Trix, you can control here which files + | you want to handle and render in the default "remote file" template + | by explicitly adding your supported Content-Types to this list. + | + */ + 'supported_files_content_types' => [ + 'application/pdf', + 'text/csv', + 'application/msword', + 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', + 'text/plain', + 'application/vnd.ms-excel', + 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', + ], + + /* + |-------------------------------------------------------------------------- + | Default Editor + |-------------------------------------------------------------------------- + | + | Here you may specify the default rich text editor. Use the editor name + | (e.g., 'trix') which will be used to resolve the editor class and + | install the corresponding frontend assets during installation. + | + */ + 'editor' => env('RICH_TEXT_EDITOR', 'lexxy'), + + /* + |-------------------------------------------------------------------------- + | Registered Editors + |-------------------------------------------------------------------------- + | + | Here you may register the available editors for your application. + | The key is the editor name used above, and the value is the + | fully qualified class name of the editor implementation. + | + */ + 'editors' => [ + 'trix' => TrixEditor::class, + 'lexxy' => LexxyEditor::class, + ], +]; diff --git a/database/migrations/2026_04_21_134542_create_rich_texts_table.php b/database/migrations/2026_04_21_134542_create_rich_texts_table.php new file mode 100644 index 00000000..31eff544 --- /dev/null +++ b/database/migrations/2026_04_21_134542_create_rich_texts_table.php @@ -0,0 +1,25 @@ +id(); + $table->morphs('record'); + $table->string('field'); + $table->longText('body')->nullable(); + $table->timestamps(); + + $table->unique(['field', 'record_type', 'record_id']); + }); + } + + public function down() + { + Schema::dropIfExists('rich_texts'); + } +}; diff --git a/database/migrations/2026_04_23_000001_create_task_comments_table.php b/database/migrations/2026_04_23_000001_create_task_comments_table.php new file mode 100644 index 00000000..984ca0cb --- /dev/null +++ b/database/migrations/2026_04_23_000001_create_task_comments_table.php @@ -0,0 +1,28 @@ +id(); + $table->unsignedBigInteger('task_id'); + $table->unsignedBigInteger('user_id'); + $table->text('body'); + $table->json('mentioned_user_ids')->nullable(); + $table->timestamps(); + + $table->index(['task_id', 'created_at']); + $table->index(['user_id', 'created_at']); + }); + } + + public function down(): void + { + Schema::dropIfExists('task_comments'); + } +}; + diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 00000000..e6f4c0e3 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,2718 @@ +{ + "name": "a.montask", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "devDependencies": { + "@37signals/lexxy": "^0.8.5-beta", + "@tailwindcss/vite": "^4.0.0", + "axios": "^1.8.2", + "concurrently": "^9.0.1", + "laravel-vite-plugin": "^1.2.0", + "tailwindcss": "^4.0.0", + "trix": "^2.1.16", + "vite": "^6.2.4" + } + }, + "node_modules/@37signals/lexxy": { + "version": "0.8.5-beta", + "resolved": "https://registry.npmjs.org/@37signals/lexxy/-/lexxy-0.8.5-beta.tgz", + "integrity": "sha512-RK2VDCZi/7xQ08dT5oIfoGrFkoKCl2p5g+y1kt+DkEYhNHofluCMPnjkkSQnPoBrlSxGNCClqLVW0es5kbdjSQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@lexical/clipboard": "^0.41.0", + "@lexical/code": "^0.41.0", + "@lexical/extension": "^0.41.0", + "@lexical/history": "^0.41.0", + "@lexical/html": "^0.41.0", + "@lexical/link": "^0.41.0", + "@lexical/list": "^0.41.0", + "@lexical/markdown": "^0.41.0", + "@lexical/plain-text": "^0.41.0", + "@lexical/rich-text": "^0.41.0", + "@lexical/selection": "^0.41.0", + "@lexical/table": "^0.41.0", + "@lexical/utils": "^0.41.0", + "dompurify": "^3.3.0", + "lexical": "^0.41.0", + "marked": "^16.4.1", + "prismjs": "^1.30.0" + }, + "peerDependencies": { + "@rails/activestorage": ">= 7.0.0" + }, + "peerDependenciesMeta": { + "@rails/activestorage": { + "optional": true + } + } + }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.25.12", + "resolved": "https://mirror2.chabokan.net/npm/@esbuild%2Faix-ppc64/-/aix-ppc64-0.25.12.tgz", + "integrity": "sha512-Hhmwd6CInZ3dwpuGTF8fJG6yoWmsToE+vYgD4nytZVxcu1ulHpUQRAB1UJ8+N1Am3Mz4+xOByoQoSZf4D+CpkA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.25.12", + "resolved": "https://mirror2.chabokan.net/npm/@esbuild%2Fandroid-arm/-/android-arm-0.25.12.tgz", + "integrity": "sha512-VJ+sKvNA/GE7Ccacc9Cha7bpS8nyzVv0jdVgwNDaR4gDMC/2TTRc33Ip8qrNYUcpkOHUT5OZ0bUcNNVZQ9RLlg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.25.12", + "resolved": "https://mirror2.chabokan.net/npm/@esbuild%2Fandroid-arm64/-/android-arm64-0.25.12.tgz", + "integrity": "sha512-6AAmLG7zwD1Z159jCKPvAxZd4y/VTO0VkprYy+3N2FtJ8+BQWFXU+OxARIwA46c5tdD9SsKGZ/1ocqBS/gAKHg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.25.12", + "resolved": "https://mirror2.chabokan.net/npm/@esbuild%2Fandroid-x64/-/android-x64-0.25.12.tgz", + "integrity": "sha512-5jbb+2hhDHx5phYR2By8GTWEzn6I9UqR11Kwf22iKbNpYrsmRB18aX/9ivc5cabcUiAT/wM+YIZ6SG9QO6a8kg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.25.12", + "resolved": "https://mirror2.chabokan.net/npm/@esbuild%2Fdarwin-arm64/-/darwin-arm64-0.25.12.tgz", + "integrity": "sha512-N3zl+lxHCifgIlcMUP5016ESkeQjLj/959RxxNYIthIg+CQHInujFuXeWbWMgnTo4cp5XVHqFPmpyu9J65C1Yg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.25.12", + "resolved": "https://mirror2.chabokan.net/npm/@esbuild%2Fdarwin-x64/-/darwin-x64-0.25.12.tgz", + "integrity": "sha512-HQ9ka4Kx21qHXwtlTUVbKJOAnmG1ipXhdWTmNXiPzPfWKpXqASVcWdnf2bnL73wgjNrFXAa3yYvBSd9pzfEIpA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.25.12", + "resolved": "https://mirror2.chabokan.net/npm/@esbuild%2Ffreebsd-arm64/-/freebsd-arm64-0.25.12.tgz", + "integrity": "sha512-gA0Bx759+7Jve03K1S0vkOu5Lg/85dou3EseOGUes8flVOGxbhDDh/iZaoek11Y8mtyKPGF3vP8XhnkDEAmzeg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.25.12", + "resolved": "https://mirror2.chabokan.net/npm/@esbuild%2Ffreebsd-x64/-/freebsd-x64-0.25.12.tgz", + "integrity": "sha512-TGbO26Yw2xsHzxtbVFGEXBFH0FRAP7gtcPE7P5yP7wGy7cXK2oO7RyOhL5NLiqTlBh47XhmIUXuGciXEqYFfBQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.25.12", + "resolved": "https://mirror2.chabokan.net/npm/@esbuild%2Flinux-arm/-/linux-arm-0.25.12.tgz", + "integrity": "sha512-lPDGyC1JPDou8kGcywY0YILzWlhhnRjdof3UlcoqYmS9El818LLfJJc3PXXgZHrHCAKs/Z2SeZtDJr5MrkxtOw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.25.12", + "resolved": "https://mirror2.chabokan.net/npm/@esbuild%2Flinux-arm64/-/linux-arm64-0.25.12.tgz", + "integrity": "sha512-8bwX7a8FghIgrupcxb4aUmYDLp8pX06rGh5HqDT7bB+8Rdells6mHvrFHHW2JAOPZUbnjUpKTLg6ECyzvas2AQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.25.12", + "resolved": "https://mirror2.chabokan.net/npm/@esbuild%2Flinux-ia32/-/linux-ia32-0.25.12.tgz", + "integrity": "sha512-0y9KrdVnbMM2/vG8KfU0byhUN+EFCny9+8g202gYqSSVMonbsCfLjUO+rCci7pM0WBEtz+oK/PIwHkzxkyharA==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.25.12", + "resolved": "https://mirror2.chabokan.net/npm/@esbuild%2Flinux-loong64/-/linux-loong64-0.25.12.tgz", + "integrity": "sha512-h///Lr5a9rib/v1GGqXVGzjL4TMvVTv+s1DPoxQdz7l/AYv6LDSxdIwzxkrPW438oUXiDtwM10o9PmwS/6Z0Ng==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.25.12", + "resolved": "https://mirror2.chabokan.net/npm/@esbuild%2Flinux-mips64el/-/linux-mips64el-0.25.12.tgz", + "integrity": "sha512-iyRrM1Pzy9GFMDLsXn1iHUm18nhKnNMWscjmp4+hpafcZjrr2WbT//d20xaGljXDBYHqRcl8HnxbX6uaA/eGVw==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.25.12", + "resolved": "https://mirror2.chabokan.net/npm/@esbuild%2Flinux-ppc64/-/linux-ppc64-0.25.12.tgz", + "integrity": "sha512-9meM/lRXxMi5PSUqEXRCtVjEZBGwB7P/D4yT8UG/mwIdze2aV4Vo6U5gD3+RsoHXKkHCfSxZKzmDssVlRj1QQA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.25.12", + "resolved": "https://mirror2.chabokan.net/npm/@esbuild%2Flinux-riscv64/-/linux-riscv64-0.25.12.tgz", + "integrity": "sha512-Zr7KR4hgKUpWAwb1f3o5ygT04MzqVrGEGXGLnj15YQDJErYu/BGg+wmFlIDOdJp0PmB0lLvxFIOXZgFRrdjR0w==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.25.12", + "resolved": "https://mirror2.chabokan.net/npm/@esbuild%2Flinux-s390x/-/linux-s390x-0.25.12.tgz", + "integrity": "sha512-MsKncOcgTNvdtiISc/jZs/Zf8d0cl/t3gYWX8J9ubBnVOwlk65UIEEvgBORTiljloIWnBzLs4qhzPkJcitIzIg==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.25.12", + "resolved": "https://mirror2.chabokan.net/npm/@esbuild%2Flinux-x64/-/linux-x64-0.25.12.tgz", + "integrity": "sha512-uqZMTLr/zR/ed4jIGnwSLkaHmPjOjJvnm6TVVitAa08SLS9Z0VM8wIRx7gWbJB5/J54YuIMInDquWyYvQLZkgw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-arm64": { + "version": "0.25.12", + "resolved": "https://mirror2.chabokan.net/npm/@esbuild%2Fnetbsd-arm64/-/netbsd-arm64-0.25.12.tgz", + "integrity": "sha512-xXwcTq4GhRM7J9A8Gv5boanHhRa/Q9KLVmcyXHCTaM4wKfIpWkdXiMog/KsnxzJ0A1+nD+zoecuzqPmCRyBGjg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.25.12", + "resolved": "https://mirror2.chabokan.net/npm/@esbuild%2Fnetbsd-x64/-/netbsd-x64-0.25.12.tgz", + "integrity": "sha512-Ld5pTlzPy3YwGec4OuHh1aCVCRvOXdH8DgRjfDy/oumVovmuSzWfnSJg+VtakB9Cm0gxNO9BzWkj6mtO1FMXkQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.25.12", + "resolved": "https://mirror2.chabokan.net/npm/@esbuild%2Fopenbsd-arm64/-/openbsd-arm64-0.25.12.tgz", + "integrity": "sha512-fF96T6KsBo/pkQI950FARU9apGNTSlZGsv1jZBAlcLL1MLjLNIWPBkj5NlSz8aAzYKg+eNqknrUJ24QBybeR5A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.25.12", + "resolved": "https://mirror2.chabokan.net/npm/@esbuild%2Fopenbsd-x64/-/openbsd-x64-0.25.12.tgz", + "integrity": "sha512-MZyXUkZHjQxUvzK7rN8DJ3SRmrVrke8ZyRusHlP+kuwqTcfWLyqMOE3sScPPyeIXN/mDJIfGXvcMqCgYKekoQw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openharmony-arm64": { + "version": "0.25.12", + "resolved": "https://mirror2.chabokan.net/npm/@esbuild%2Fopenharmony-arm64/-/openharmony-arm64-0.25.12.tgz", + "integrity": "sha512-rm0YWsqUSRrjncSXGA7Zv78Nbnw4XL6/dzr20cyrQf7ZmRcsovpcRBdhD43Nuk3y7XIoW2OxMVvwuRvk9XdASg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.25.12", + "resolved": "https://mirror2.chabokan.net/npm/@esbuild%2Fsunos-x64/-/sunos-x64-0.25.12.tgz", + "integrity": "sha512-3wGSCDyuTHQUzt0nV7bocDy72r2lI33QL3gkDNGkod22EsYl04sMf0qLb8luNKTOmgF/eDEDP5BFNwoBKH441w==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.25.12", + "resolved": "https://mirror2.chabokan.net/npm/@esbuild%2Fwin32-arm64/-/win32-arm64-0.25.12.tgz", + "integrity": "sha512-rMmLrur64A7+DKlnSuwqUdRKyd3UE7oPJZmnljqEptesKM8wx9J8gx5u0+9Pq0fQQW8vqeKebwNXdfOyP+8Bsg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.25.12", + "resolved": "https://mirror2.chabokan.net/npm/@esbuild%2Fwin32-ia32/-/win32-ia32-0.25.12.tgz", + "integrity": "sha512-HkqnmmBoCbCwxUKKNPBixiWDGCpQGVsrQfJoVGYLPT41XWF8lHuE5N6WhVia2n4o5QK5M4tYr21827fNhi4byQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.25.12", + "resolved": "https://mirror2.chabokan.net/npm/@esbuild%2Fwin32-x64/-/win32-x64-0.25.12.tgz", + "integrity": "sha512-alJC0uCZpTFrSL0CCDjcgleBXPnCrEAhTBILpeAp7M/OFgoqtAetfBzX0xM00MUsVVPpVjlPuMbREqnZCXaTnA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.13", + "resolved": "https://mirror2.chabokan.net/npm/@jridgewell%2Fgen-mapping/-/gen-mapping-0.3.13.tgz", + "integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.0", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "node_modules/@jridgewell/remapping": { + "version": "2.3.5", + "resolved": "https://mirror2.chabokan.net/npm/@jridgewell%2Fremapping/-/remapping-2.3.5.tgz", + "integrity": "sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://mirror2.chabokan.net/npm/@jridgewell%2Fresolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.5", + "resolved": "https://mirror2.chabokan.net/npm/@jridgewell%2Fsourcemap-codec/-/sourcemap-codec-1.5.5.tgz", + "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==", + "dev": true, + "license": "MIT" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.31", + "resolved": "https://mirror2.chabokan.net/npm/@jridgewell%2Ftrace-mapping/-/trace-mapping-0.3.31.tgz", + "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@lexical/clipboard": { + "version": "0.41.0", + "resolved": "https://registry.npmjs.org/@lexical/clipboard/-/clipboard-0.41.0.tgz", + "integrity": "sha512-Ex5lPkb4NBBX1DCPzOAIeHBJFH1bJcmATjREaqpnTfxCbuOeQkt44wchezUA0oDl+iAxNZ3+pLLWiUju9icoSA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@lexical/html": "0.41.0", + "@lexical/list": "0.41.0", + "@lexical/selection": "0.41.0", + "@lexical/utils": "0.41.0", + "lexical": "0.41.0" + } + }, + "node_modules/@lexical/code": { + "version": "0.41.0", + "resolved": "https://registry.npmjs.org/@lexical/code/-/code-0.41.0.tgz", + "integrity": "sha512-0hoNi1KC9/N3SBOGcOcFqnT0OpwmcRRAhfxTKMGqfCtCvAMzULVwZ8RWc9/NV9bKYESgBTW5D9xkDANP2mspHg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@lexical/utils": "0.41.0", + "lexical": "0.41.0", + "prismjs": "^1.30.0" + } + }, + "node_modules/@lexical/dragon": { + "version": "0.41.0", + "resolved": "https://registry.npmjs.org/@lexical/dragon/-/dragon-0.41.0.tgz", + "integrity": "sha512-gBEqkk8Q6ZPruvDaRcOdF1EK9suCVBODzOCcR+EnoJTaTjfDkCM7pkPAm4w90Wa1wCZEtFHvCfas+jU9MDSumg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@lexical/extension": "0.41.0", + "lexical": "0.41.0" + } + }, + "node_modules/@lexical/extension": { + "version": "0.41.0", + "resolved": "https://registry.npmjs.org/@lexical/extension/-/extension-0.41.0.tgz", + "integrity": "sha512-sF4SPiP72yXvIGchmmIZ7Yg2XZTxNLOpFEIIzdqG7X/1fa1Ham9P/T7VbrblWpF6Ei5LJtK9JgNVB0hb4l3o1g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@lexical/utils": "0.41.0", + "@preact/signals-core": "^1.11.0", + "lexical": "0.41.0" + } + }, + "node_modules/@lexical/history": { + "version": "0.41.0", + "resolved": "https://registry.npmjs.org/@lexical/history/-/history-0.41.0.tgz", + "integrity": "sha512-kGoVWsiOn62+RMjRolRa+NXZl8jFwxav6GNDiHH8yzivtoaH8n1SwUfLJELXCzeqzs81HySqD4q30VLJVTGoDg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@lexical/extension": "0.41.0", + "@lexical/utils": "0.41.0", + "lexical": "0.41.0" + } + }, + "node_modules/@lexical/html": { + "version": "0.41.0", + "resolved": "https://registry.npmjs.org/@lexical/html/-/html-0.41.0.tgz", + "integrity": "sha512-3RyZy+H/IDKz2D66rNN/NqYx87xVFrngfEbyu1OWtbY963RUFnopiVHCQvsge/8kT04QSZ7U/DzjVFqeNS6clg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@lexical/selection": "0.41.0", + "@lexical/utils": "0.41.0", + "lexical": "0.41.0" + } + }, + "node_modules/@lexical/link": { + "version": "0.41.0", + "resolved": "https://registry.npmjs.org/@lexical/link/-/link-0.41.0.tgz", + "integrity": "sha512-Rjtx5cGWAkKcnacncbVsZ1TqRnUB2Wm4eEVKpaAEG41+kHgqghzM2P+UGT15yROroxJu8KvAC9ISiYFiU4XE1w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@lexical/extension": "0.41.0", + "@lexical/utils": "0.41.0", + "lexical": "0.41.0" + } + }, + "node_modules/@lexical/list": { + "version": "0.41.0", + "resolved": "https://registry.npmjs.org/@lexical/list/-/list-0.41.0.tgz", + "integrity": "sha512-RXvB+xcbzVoQLGRDOBRCacztG7V+bI95tdoTwl8pz5xvgPtAaRnkZWMDP+yMNzMJZsqEChdtpxbf0NgtMkun6g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@lexical/extension": "0.41.0", + "@lexical/selection": "0.41.0", + "@lexical/utils": "0.41.0", + "lexical": "0.41.0" + } + }, + "node_modules/@lexical/markdown": { + "version": "0.41.0", + "resolved": "https://registry.npmjs.org/@lexical/markdown/-/markdown-0.41.0.tgz", + "integrity": "sha512-bzI73JMXpjGFhqUWNV6KqfjWcgAWzwFT+J3RHtbCF5rysC8HLldBYojOgAAtPfXqfxyv2mDzsY7SoJ75s9uHZA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@lexical/code": "0.41.0", + "@lexical/link": "0.41.0", + "@lexical/list": "0.41.0", + "@lexical/rich-text": "0.41.0", + "@lexical/text": "0.41.0", + "@lexical/utils": "0.41.0", + "lexical": "0.41.0" + } + }, + "node_modules/@lexical/plain-text": { + "version": "0.41.0", + "resolved": "https://registry.npmjs.org/@lexical/plain-text/-/plain-text-0.41.0.tgz", + "integrity": "sha512-HIsGgmFUYRUNNyvckun33UQfU7LRzDlxymHUq67+Bxd5bXqdZOrStEKJXuDX+LuLh/GXZbaWNbDLqwLBObfbQg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@lexical/clipboard": "0.41.0", + "@lexical/dragon": "0.41.0", + "@lexical/selection": "0.41.0", + "@lexical/utils": "0.41.0", + "lexical": "0.41.0" + } + }, + "node_modules/@lexical/rich-text": { + "version": "0.41.0", + "resolved": "https://registry.npmjs.org/@lexical/rich-text/-/rich-text-0.41.0.tgz", + "integrity": "sha512-yUcr7ZaaVTZNi8bow4CK1M8jy2qyyls1Vr+5dVjwBclVShOL/F/nFyzBOSb6RtXXRbd3Ahuk9fEleppX/RNIdw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@lexical/clipboard": "0.41.0", + "@lexical/dragon": "0.41.0", + "@lexical/selection": "0.41.0", + "@lexical/utils": "0.41.0", + "lexical": "0.41.0" + } + }, + "node_modules/@lexical/selection": { + "version": "0.41.0", + "resolved": "https://registry.npmjs.org/@lexical/selection/-/selection-0.41.0.tgz", + "integrity": "sha512-1s7/kNyRzcv5uaTwsUL28NpiisqTf5xZ1zNukLsCN1xY+TWbv9RE9OxIv+748wMm4pxNczQe/UbIBODkbeknLw==", + "dev": true, + "license": "MIT", + "dependencies": { + "lexical": "0.41.0" + } + }, + "node_modules/@lexical/table": { + "version": "0.41.0", + "resolved": "https://registry.npmjs.org/@lexical/table/-/table-0.41.0.tgz", + "integrity": "sha512-d3SPThBAr+oZ8O74TXU0iXM3rLbrAVC7/HcOnSAq7/AhWQW8yMutT51JQGN+0fMLP9kqoWSAojNtkdvzXfU/+A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@lexical/clipboard": "0.41.0", + "@lexical/extension": "0.41.0", + "@lexical/utils": "0.41.0", + "lexical": "0.41.0" + } + }, + "node_modules/@lexical/text": { + "version": "0.41.0", + "resolved": "https://registry.npmjs.org/@lexical/text/-/text-0.41.0.tgz", + "integrity": "sha512-gGA+Anc7ck110EXo4KVKtq6Ui3M7Vz3OpGJ4QE6zJHWW8nV5h273koUGSutAMeoZgRVb6t01Izh3ORoFt/j1CA==", + "dev": true, + "license": "MIT", + "dependencies": { + "lexical": "0.41.0" + } + }, + "node_modules/@lexical/utils": { + "version": "0.41.0", + "resolved": "https://registry.npmjs.org/@lexical/utils/-/utils-0.41.0.tgz", + "integrity": "sha512-Wlsokr5NQCq83D+7kxZ9qs5yQ3dU3Qaf2M+uXxLRoPoDaXqW8xTWZq1+ZFoEzsHzx06QoPa4Vu/40BZR91uQPg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@lexical/selection": "0.41.0", + "lexical": "0.41.0" + } + }, + "node_modules/@preact/signals-core": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@preact/signals-core/-/signals-core-1.14.1.tgz", + "integrity": "sha512-vxPpfXqrwUe9lpjqfYNjAF/0RF/eFGeLgdJzdmIIZjpOnTmGmAB4BjWone562mJGMRP4frU6iZ6ei3PDsu52Ng==", + "dev": true, + "license": "MIT", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/preact" + } + }, + "node_modules/@rollup/rollup-android-arm-eabi": { + "version": "4.60.1", + "resolved": "https://mirror2.chabokan.net/npm/@rollup%2Frollup-android-arm-eabi/-/rollup-android-arm-eabi-4.60.1.tgz", + "integrity": "sha512-d6FinEBLdIiK+1uACUttJKfgZREXrF0Qc2SmLII7W2AD8FfiZ9Wjd+rD/iRuf5s5dWrr1GgwXCvPqOuDquOowA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-android-arm64": { + "version": "4.60.1", + "resolved": "https://mirror2.chabokan.net/npm/@rollup%2Frollup-android-arm64/-/rollup-android-arm64-4.60.1.tgz", + "integrity": "sha512-YjG/EwIDvvYI1YvYbHvDz/BYHtkY4ygUIXHnTdLhG+hKIQFBiosfWiACWortsKPKU/+dUwQQCKQM3qrDe8c9BA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-darwin-arm64": { + "version": "4.60.1", + "resolved": "https://mirror2.chabokan.net/npm/@rollup%2Frollup-darwin-arm64/-/rollup-darwin-arm64-4.60.1.tgz", + "integrity": "sha512-mjCpF7GmkRtSJwon+Rq1N8+pI+8l7w5g9Z3vWj4T7abguC4Czwi3Yu/pFaLvA3TTeMVjnu3ctigusqWUfjZzvw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-darwin-x64": { + "version": "4.60.1", + "resolved": "https://mirror2.chabokan.net/npm/@rollup%2Frollup-darwin-x64/-/rollup-darwin-x64-4.60.1.tgz", + "integrity": "sha512-haZ7hJ1JT4e9hqkoT9R/19XW2QKqjfJVv+i5AGg57S+nLk9lQnJ1F/eZloRO3o9Scy9CM3wQ9l+dkXtcBgN5Ew==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-freebsd-arm64": { + "version": "4.60.1", + "resolved": "https://mirror2.chabokan.net/npm/@rollup%2Frollup-freebsd-arm64/-/rollup-freebsd-arm64-4.60.1.tgz", + "integrity": "sha512-czw90wpQq3ZsAVBlinZjAYTKduOjTywlG7fEeWKUA7oCmpA8xdTkxZZlwNJKWqILlq0wehoZcJYfBvOyhPTQ6w==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-freebsd-x64": { + "version": "4.60.1", + "resolved": "https://mirror2.chabokan.net/npm/@rollup%2Frollup-freebsd-x64/-/rollup-freebsd-x64-4.60.1.tgz", + "integrity": "sha512-KVB2rqsxTHuBtfOeySEyzEOB7ltlB/ux38iu2rBQzkjbwRVlkhAGIEDiiYnO2kFOkJp+Z7pUXKyrRRFuFUKt+g==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.60.1", + "resolved": "https://mirror2.chabokan.net/npm/@rollup%2Frollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.60.1.tgz", + "integrity": "sha512-L+34Qqil+v5uC0zEubW7uByo78WOCIrBvci69E7sFASRl0X7b/MB6Cqd1lky/CtcSVTydWa2WZwFuWexjS5o6g==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm-musleabihf": { + "version": "4.60.1", + "resolved": "https://mirror2.chabokan.net/npm/@rollup%2Frollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.60.1.tgz", + "integrity": "sha512-n83O8rt4v34hgFzlkb1ycniJh7IR5RCIqt6mz1VRJD6pmhRi0CXdmfnLu9dIUS6buzh60IvACM842Ffb3xd6Gg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-gnu": { + "version": "4.60.1", + "resolved": "https://mirror2.chabokan.net/npm/@rollup%2Frollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.60.1.tgz", + "integrity": "sha512-Nql7sTeAzhTAja3QXeAI48+/+GjBJ+QmAH13snn0AJSNL50JsDqotyudHyMbO2RbJkskbMbFJfIJKWA6R1LCJQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-musl": { + "version": "4.60.1", + "resolved": "https://mirror2.chabokan.net/npm/@rollup%2Frollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.60.1.tgz", + "integrity": "sha512-+pUymDhd0ys9GcKZPPWlFiZ67sTWV5UU6zOJat02M1+PiuSGDziyRuI/pPue3hoUwm2uGfxdL+trT6Z9rxnlMA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loong64-gnu": { + "version": "4.60.1", + "resolved": "https://mirror2.chabokan.net/npm/@rollup%2Frollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.60.1.tgz", + "integrity": "sha512-VSvgvQeIcsEvY4bKDHEDWcpW4Yw7BtlKG1GUT4FzBUlEKQK0rWHYBqQt6Fm2taXS+1bXvJT6kICu5ZwqKCnvlQ==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loong64-musl": { + "version": "4.60.1", + "resolved": "https://mirror2.chabokan.net/npm/@rollup%2Frollup-linux-loong64-musl/-/rollup-linux-loong64-musl-4.60.1.tgz", + "integrity": "sha512-4LqhUomJqwe641gsPp6xLfhqWMbQV04KtPp7/dIp0nzPxAkNY1AbwL5W0MQpcalLYk07vaW9Kp1PBhdpZYYcEw==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-ppc64-gnu": { + "version": "4.60.1", + "resolved": "https://mirror2.chabokan.net/npm/@rollup%2Frollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.60.1.tgz", + "integrity": "sha512-tLQQ9aPvkBxOc/EUT6j3pyeMD6Hb8QF2BTBnCQWP/uu1lhc9AIrIjKnLYMEroIz/JvtGYgI9dF3AxHZNaEH0rw==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-ppc64-musl": { + "version": "4.60.1", + "resolved": "https://mirror2.chabokan.net/npm/@rollup%2Frollup-linux-ppc64-musl/-/rollup-linux-ppc64-musl-4.60.1.tgz", + "integrity": "sha512-RMxFhJwc9fSXP6PqmAz4cbv3kAyvD1etJFjTx4ONqFP9DkTkXsAMU4v3Vyc5BgzC+anz7nS/9tp4obsKfqkDHg==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-gnu": { + "version": "4.60.1", + "resolved": "https://mirror2.chabokan.net/npm/@rollup%2Frollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.60.1.tgz", + "integrity": "sha512-QKgFl+Yc1eEk6MmOBfRHYF6lTxiiiV3/z/BRrbSiW2I7AFTXoBFvdMEyglohPj//2mZS4hDOqeB0H1ACh3sBbg==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-musl": { + "version": "4.60.1", + "resolved": "https://mirror2.chabokan.net/npm/@rollup%2Frollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.60.1.tgz", + "integrity": "sha512-RAjXjP/8c6ZtzatZcA1RaQr6O1TRhzC+adn8YZDnChliZHviqIjmvFwHcxi4JKPSDAt6Uhf/7vqcBzQJy0PDJg==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-s390x-gnu": { + "version": "4.60.1", + "resolved": "https://mirror2.chabokan.net/npm/@rollup%2Frollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.60.1.tgz", + "integrity": "sha512-wcuocpaOlaL1COBYiA89O6yfjlp3RwKDeTIA0hM7OpmhR1Bjo9j31G1uQVpDlTvwxGn2nQs65fBFL5UFd76FcQ==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.60.1", + "resolved": "https://mirror2.chabokan.net/npm/@rollup%2Frollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.60.1.tgz", + "integrity": "sha512-77PpsFQUCOiZR9+LQEFg9GClyfkNXj1MP6wRnzYs0EeWbPcHs02AXu4xuUbM1zhwn3wqaizle3AEYg5aeoohhg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-musl": { + "version": "4.60.1", + "resolved": "https://mirror2.chabokan.net/npm/@rollup%2Frollup-linux-x64-musl/-/rollup-linux-x64-musl-4.60.1.tgz", + "integrity": "sha512-5cIATbk5vynAjqqmyBjlciMJl1+R/CwX9oLk/EyiFXDWd95KpHdrOJT//rnUl4cUcskrd0jCCw3wpZnhIHdD9w==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-openbsd-x64": { + "version": "4.60.1", + "resolved": "https://mirror2.chabokan.net/npm/@rollup%2Frollup-openbsd-x64/-/rollup-openbsd-x64-4.60.1.tgz", + "integrity": "sha512-cl0w09WsCi17mcmWqqglez9Gk8isgeWvoUZ3WiJFYSR3zjBQc2J5/ihSjpl+VLjPqjQ/1hJRcqBfLjssREQILw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ] + }, + "node_modules/@rollup/rollup-openharmony-arm64": { + "version": "4.60.1", + "resolved": "https://mirror2.chabokan.net/npm/@rollup%2Frollup-openharmony-arm64/-/rollup-openharmony-arm64-4.60.1.tgz", + "integrity": "sha512-4Cv23ZrONRbNtbZa37mLSueXUCtN7MXccChtKpUnQNgF010rjrjfHx3QxkS2PI7LqGT5xXyYs1a7LbzAwT0iCA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ] + }, + "node_modules/@rollup/rollup-win32-arm64-msvc": { + "version": "4.60.1", + "resolved": "https://mirror2.chabokan.net/npm/@rollup%2Frollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.60.1.tgz", + "integrity": "sha512-i1okWYkA4FJICtr7KpYzFpRTHgy5jdDbZiWfvny21iIKky5YExiDXP+zbXzm3dUcFpkEeYNHgQ5fuG236JPq0g==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-ia32-msvc": { + "version": "4.60.1", + "resolved": "https://mirror2.chabokan.net/npm/@rollup%2Frollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.60.1.tgz", + "integrity": "sha512-u09m3CuwLzShA0EYKMNiFgcjjzwqtUMLmuCJLeZWjjOYA3IT2Di09KaxGBTP9xVztWyIWjVdsB2E9goMjZvTQg==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-gnu": { + "version": "4.60.1", + "resolved": "https://mirror2.chabokan.net/npm/@rollup%2Frollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.60.1.tgz", + "integrity": "sha512-k+600V9Zl1CM7eZxJgMyTUzmrmhB/0XZnF4pRypKAlAgxmedUA+1v9R+XOFv56W4SlHEzfeMtzujLJD22Uz5zg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-msvc": { + "version": "4.60.1", + "resolved": "https://mirror2.chabokan.net/npm/@rollup%2Frollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.60.1.tgz", + "integrity": "sha512-lWMnixq/QzxyhTV6NjQJ4SFo1J6PvOX8vUx5Wb4bBPsEb+8xZ89Bz6kOXpfXj9ak9AHTQVQzlgzBEc1SyM27xQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@tailwindcss/node": { + "version": "4.2.2", + "resolved": "https://mirror2.chabokan.net/npm/@tailwindcss%2Fnode/-/node-4.2.2.tgz", + "integrity": "sha512-pXS+wJ2gZpVXqFaUEjojq7jzMpTGf8rU6ipJz5ovJV6PUGmlJ+jvIwGrzdHdQ80Sg+wmQxUFuoW1UAAwHNEdFA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/remapping": "^2.3.5", + "enhanced-resolve": "^5.19.0", + "jiti": "^2.6.1", + "lightningcss": "1.32.0", + "magic-string": "^0.30.21", + "source-map-js": "^1.2.1", + "tailwindcss": "4.2.2" + } + }, + "node_modules/@tailwindcss/oxide": { + "version": "4.2.2", + "resolved": "https://mirror2.chabokan.net/npm/@tailwindcss%2Foxide/-/oxide-4.2.2.tgz", + "integrity": "sha512-qEUA07+E5kehxYp9BVMpq9E8vnJuBHfJEC0vPC5e7iL/hw7HR61aDKoVoKzrG+QKp56vhNZe4qwkRmMC0zDLvg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 20" + }, + "optionalDependencies": { + "@tailwindcss/oxide-android-arm64": "4.2.2", + "@tailwindcss/oxide-darwin-arm64": "4.2.2", + "@tailwindcss/oxide-darwin-x64": "4.2.2", + "@tailwindcss/oxide-freebsd-x64": "4.2.2", + "@tailwindcss/oxide-linux-arm-gnueabihf": "4.2.2", + "@tailwindcss/oxide-linux-arm64-gnu": "4.2.2", + "@tailwindcss/oxide-linux-arm64-musl": "4.2.2", + "@tailwindcss/oxide-linux-x64-gnu": "4.2.2", + "@tailwindcss/oxide-linux-x64-musl": "4.2.2", + "@tailwindcss/oxide-wasm32-wasi": "4.2.2", + "@tailwindcss/oxide-win32-arm64-msvc": "4.2.2", + "@tailwindcss/oxide-win32-x64-msvc": "4.2.2" + } + }, + "node_modules/@tailwindcss/oxide-android-arm64": { + "version": "4.2.2", + "resolved": "https://mirror2.chabokan.net/npm/@tailwindcss%2Foxide-android-arm64/-/oxide-android-arm64-4.2.2.tgz", + "integrity": "sha512-dXGR1n+P3B6748jZO/SvHZq7qBOqqzQ+yFrXpoOWWALWndF9MoSKAT3Q0fYgAzYzGhxNYOoysRvYlpixRBBoDg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-darwin-arm64": { + "version": "4.2.2", + "resolved": "https://mirror2.chabokan.net/npm/@tailwindcss%2Foxide-darwin-arm64/-/oxide-darwin-arm64-4.2.2.tgz", + "integrity": "sha512-iq9Qjr6knfMpZHj55/37ouZeykwbDqF21gPFtfnhCCKGDcPI/21FKC9XdMO/XyBM7qKORx6UIhGgg6jLl7BZlg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-darwin-x64": { + "version": "4.2.2", + "resolved": "https://mirror2.chabokan.net/npm/@tailwindcss%2Foxide-darwin-x64/-/oxide-darwin-x64-4.2.2.tgz", + "integrity": "sha512-BlR+2c3nzc8f2G639LpL89YY4bdcIdUmiOOkv2GQv4/4M0vJlpXEa0JXNHhCHU7VWOKWT/CjqHdTP8aUuDJkuw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-freebsd-x64": { + "version": "4.2.2", + "resolved": "https://mirror2.chabokan.net/npm/@tailwindcss%2Foxide-freebsd-x64/-/oxide-freebsd-x64-4.2.2.tgz", + "integrity": "sha512-YUqUgrGMSu2CDO82hzlQ5qSb5xmx3RUrke/QgnoEx7KvmRJHQuZHZmZTLSuuHwFf0DJPybFMXMYf+WJdxHy/nQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-linux-arm-gnueabihf": { + "version": "4.2.2", + "resolved": "https://mirror2.chabokan.net/npm/@tailwindcss%2Foxide-linux-arm-gnueabihf/-/oxide-linux-arm-gnueabihf-4.2.2.tgz", + "integrity": "sha512-FPdhvsW6g06T9BWT0qTwiVZYE2WIFo2dY5aCSpjG/S/u1tby+wXoslXS0kl3/KXnULlLr1E3NPRRw0g7t2kgaQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-linux-arm64-gnu": { + "version": "4.2.2", + "resolved": "https://mirror2.chabokan.net/npm/@tailwindcss%2Foxide-linux-arm64-gnu/-/oxide-linux-arm64-gnu-4.2.2.tgz", + "integrity": "sha512-4og1V+ftEPXGttOO7eCmW7VICmzzJWgMx+QXAJRAhjrSjumCwWqMfkDrNu1LXEQzNAwz28NCUpucgQPrR4S2yw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-linux-arm64-musl": { + "version": "4.2.2", + "resolved": "https://mirror2.chabokan.net/npm/@tailwindcss%2Foxide-linux-arm64-musl/-/oxide-linux-arm64-musl-4.2.2.tgz", + "integrity": "sha512-oCfG/mS+/+XRlwNjnsNLVwnMWYH7tn/kYPsNPh+JSOMlnt93mYNCKHYzylRhI51X+TbR+ufNhhKKzm6QkqX8ag==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-linux-x64-gnu": { + "version": "4.2.2", + "resolved": "https://mirror2.chabokan.net/npm/@tailwindcss%2Foxide-linux-x64-gnu/-/oxide-linux-x64-gnu-4.2.2.tgz", + "integrity": "sha512-rTAGAkDgqbXHNp/xW0iugLVmX62wOp2PoE39BTCGKjv3Iocf6AFbRP/wZT/kuCxC9QBh9Pu8XPkv/zCZB2mcMg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-linux-x64-musl": { + "version": "4.2.2", + "resolved": "https://mirror2.chabokan.net/npm/@tailwindcss%2Foxide-linux-x64-musl/-/oxide-linux-x64-musl-4.2.2.tgz", + "integrity": "sha512-XW3t3qwbIwiSyRCggeO2zxe3KWaEbM0/kW9e8+0XpBgyKU4ATYzcVSMKteZJ1iukJ3HgHBjbg9P5YPRCVUxlnQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-wasm32-wasi": { + "version": "4.2.2", + "resolved": "https://mirror2.chabokan.net/npm/@tailwindcss%2Foxide-wasm32-wasi/-/oxide-wasm32-wasi-4.2.2.tgz", + "integrity": "sha512-eKSztKsmEsn1O5lJ4ZAfyn41NfG7vzCg496YiGtMDV86jz1q/irhms5O0VrY6ZwTUkFy/EKG3RfWgxSI3VbZ8Q==", + "bundleDependencies": [ + "@napi-rs/wasm-runtime", + "@emnapi/core", + "@emnapi/runtime", + "@tybys/wasm-util", + "@emnapi/wasi-threads", + "tslib" + ], + "cpu": [ + "wasm32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@emnapi/core": "^1.8.1", + "@emnapi/runtime": "^1.8.1", + "@emnapi/wasi-threads": "^1.1.0", + "@napi-rs/wasm-runtime": "^1.1.1", + "@tybys/wasm-util": "^0.10.1", + "tslib": "^2.8.1" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@tailwindcss/oxide-win32-arm64-msvc": { + "version": "4.2.2", + "resolved": "https://mirror2.chabokan.net/npm/@tailwindcss%2Foxide-win32-arm64-msvc/-/oxide-win32-arm64-msvc-4.2.2.tgz", + "integrity": "sha512-qPmaQM4iKu5mxpsrWZMOZRgZv1tOZpUm+zdhhQP0VhJfyGGO3aUKdbh3gDZc/dPLQwW4eSqWGrrcWNBZWUWaXQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-win32-x64-msvc": { + "version": "4.2.2", + "resolved": "https://mirror2.chabokan.net/npm/@tailwindcss%2Foxide-win32-x64-msvc/-/oxide-win32-x64-msvc-4.2.2.tgz", + "integrity": "sha512-1T/37VvI7WyH66b+vqHj/cLwnCxt7Qt3WFu5Q8hk65aOvlwAhs7rAp1VkulBJw/N4tMirXjVnylTR72uI0HGcA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/vite": { + "version": "4.2.2", + "resolved": "https://mirror2.chabokan.net/npm/@tailwindcss%2Fvite/-/vite-4.2.2.tgz", + "integrity": "sha512-mEiF5HO1QqCLXoNEfXVA1Tzo+cYsrqV7w9Juj2wdUFyW07JRenqMG225MvPwr3ZD9N1bFQj46X7r33iHxLUW0w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@tailwindcss/node": "4.2.2", + "@tailwindcss/oxide": "4.2.2", + "tailwindcss": "4.2.2" + }, + "peerDependencies": { + "vite": "^5.2.0 || ^6 || ^7 || ^8" + } + }, + "node_modules/@types/estree": { + "version": "1.0.8", + "resolved": "https://mirror2.chabokan.net/npm/@types%2Festree/-/estree-1.0.8.tgz", + "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/trusted-types": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/@types/trusted-types/-/trusted-types-2.0.7.tgz", + "integrity": "sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw==", + "dev": true, + "license": "MIT", + "optional": true + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://mirror2.chabokan.net/npm/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://mirror2.chabokan.net/npm/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://mirror2.chabokan.net/npm/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/axios": { + "version": "1.15.0", + "resolved": "https://mirror2.chabokan.net/npm/axios/-/axios-1.15.0.tgz", + "integrity": "sha512-wWyJDlAatxk30ZJer+GeCWS209sA42X+N5jU2jy6oHTp7ufw8uzUTVFBX9+wTfAlhiJXGS0Bq7X6efruWjuK9Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "follow-redirects": "^1.15.11", + "form-data": "^4.0.5", + "proxy-from-env": "^2.1.0" + } + }, + "node_modules/call-bind-apply-helpers": { + "version": "1.0.2", + "resolved": "https://mirror2.chabokan.net/npm/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", + "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://mirror2.chabokan.net/npm/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/chalk/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://mirror2.chabokan.net/npm/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://mirror2.chabokan.net/npm/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://mirror2.chabokan.net/npm/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://mirror2.chabokan.net/npm/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "license": "MIT" + }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://mirror2.chabokan.net/npm/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dev": true, + "license": "MIT", + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/concurrently": { + "version": "9.2.1", + "resolved": "https://mirror2.chabokan.net/npm/concurrently/-/concurrently-9.2.1.tgz", + "integrity": "sha512-fsfrO0MxV64Znoy8/l1vVIjjHa29SZyyqPgQBwhiDcaW8wJc2W3XWVOGx4M3oJBnv/zdUZIIp1gDeS98GzP8Ng==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "4.1.2", + "rxjs": "7.8.2", + "shell-quote": "1.8.3", + "supports-color": "8.1.1", + "tree-kill": "1.2.2", + "yargs": "17.7.2" + }, + "bin": { + "conc": "dist/bin/concurrently.js", + "concurrently": "dist/bin/concurrently.js" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/open-cli-tools/concurrently?sponsor=1" + } + }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://mirror2.chabokan.net/npm/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/detect-libc": { + "version": "2.1.2", + "resolved": "https://mirror2.chabokan.net/npm/detect-libc/-/detect-libc-2.1.2.tgz", + "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=8" + } + }, + "node_modules/dompurify": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.4.0.tgz", + "integrity": "sha512-nolgK9JcaUXMSmW+j1yaSvaEaoXYHwWyGJlkoCTghc97KgGDDSnpoU/PlEnw63Ah+TGKFOyY+X5LnxaWbCSfXg==", + "dev": true, + "license": "(MPL-2.0 OR Apache-2.0)", + "optionalDependencies": { + "@types/trusted-types": "^2.0.7" + } + }, + "node_modules/dunder-proto": { + "version": "1.0.1", + "resolved": "https://mirror2.chabokan.net/npm/dunder-proto/-/dunder-proto-1.0.1.tgz", + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://mirror2.chabokan.net/npm/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, + "license": "MIT" + }, + "node_modules/enhanced-resolve": { + "version": "5.20.1", + "resolved": "https://mirror2.chabokan.net/npm/enhanced-resolve/-/enhanced-resolve-5.20.1.tgz", + "integrity": "sha512-Qohcme7V1inbAfvjItgw0EaxVX5q2rdVEZHRBrEQdRZTssLDGsL8Lwrznl8oQ/6kuTJONLaDcGjkNP247XEhcA==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.4", + "tapable": "^2.3.0" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/es-define-property": { + "version": "1.0.1", + "resolved": "https://mirror2.chabokan.net/npm/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://mirror2.chabokan.net/npm/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-object-atoms": { + "version": "1.1.1", + "resolved": "https://mirror2.chabokan.net/npm/es-object-atoms/-/es-object-atoms-1.1.1.tgz", + "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-set-tostringtag": { + "version": "2.1.0", + "resolved": "https://mirror2.chabokan.net/npm/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz", + "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.6", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/esbuild": { + "version": "0.25.12", + "resolved": "https://mirror2.chabokan.net/npm/esbuild/-/esbuild-0.25.12.tgz", + "integrity": "sha512-bbPBYYrtZbkt6Os6FiTLCTFxvq4tt3JKall1vRwshA3fdVztsLAatFaZobhkBC8/BrPetoa0oksYoKXoG4ryJg==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.25.12", + "@esbuild/android-arm": "0.25.12", + "@esbuild/android-arm64": "0.25.12", + "@esbuild/android-x64": "0.25.12", + "@esbuild/darwin-arm64": "0.25.12", + "@esbuild/darwin-x64": "0.25.12", + "@esbuild/freebsd-arm64": "0.25.12", + "@esbuild/freebsd-x64": "0.25.12", + "@esbuild/linux-arm": "0.25.12", + "@esbuild/linux-arm64": "0.25.12", + "@esbuild/linux-ia32": "0.25.12", + "@esbuild/linux-loong64": "0.25.12", + "@esbuild/linux-mips64el": "0.25.12", + "@esbuild/linux-ppc64": "0.25.12", + "@esbuild/linux-riscv64": "0.25.12", + "@esbuild/linux-s390x": "0.25.12", + "@esbuild/linux-x64": "0.25.12", + "@esbuild/netbsd-arm64": "0.25.12", + "@esbuild/netbsd-x64": "0.25.12", + "@esbuild/openbsd-arm64": "0.25.12", + "@esbuild/openbsd-x64": "0.25.12", + "@esbuild/openharmony-arm64": "0.25.12", + "@esbuild/sunos-x64": "0.25.12", + "@esbuild/win32-arm64": "0.25.12", + "@esbuild/win32-ia32": "0.25.12", + "@esbuild/win32-x64": "0.25.12" + } + }, + "node_modules/escalade": { + "version": "3.2.0", + "resolved": "https://mirror2.chabokan.net/npm/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/fdir": { + "version": "6.5.0", + "resolved": "https://mirror2.chabokan.net/npm/fdir/-/fdir-6.5.0.tgz", + "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, + "node_modules/follow-redirects": { + "version": "1.16.0", + "resolved": "https://mirror2.chabokan.net/npm/follow-redirects/-/follow-redirects-1.16.0.tgz", + "integrity": "sha512-y5rN/uOsadFT/JfYwhxRS5R7Qce+g3zG97+JrtFZlC9klX/W5hD7iiLzScI4nZqUS7DNUdhPgw4xI8W2LuXlUw==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "license": "MIT", + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, + "node_modules/form-data": { + "version": "4.0.5", + "resolved": "https://mirror2.chabokan.net/npm/form-data/-/form-data-4.0.5.tgz", + "integrity": "sha512-8RipRLol37bNs2bhoV67fiTEvdTrbMUYcFTiy3+wuuOnUog2QBHCZWXDRijWQfAkhBj2Uf5UnVaiWwA5vdd82w==", + "dev": true, + "license": "MIT", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "es-set-tostringtag": "^2.1.0", + "hasown": "^2.0.2", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://mirror2.chabokan.net/npm/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://mirror2.chabokan.net/npm/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://mirror2.chabokan.net/npm/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true, + "license": "ISC", + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/get-intrinsic": { + "version": "1.3.0", + "resolved": "https://mirror2.chabokan.net/npm/get-intrinsic/-/get-intrinsic-1.3.0.tgz", + "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", + "function-bind": "^1.1.2", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-proto": { + "version": "1.0.1", + "resolved": "https://mirror2.chabokan.net/npm/get-proto/-/get-proto-1.0.1.tgz", + "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", + "dev": true, + "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/gopd": { + "version": "1.2.0", + "resolved": "https://mirror2.chabokan.net/npm/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://mirror2.chabokan.net/npm/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://mirror2.chabokan.net/npm/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/has-symbols": { + "version": "1.1.0", + "resolved": "https://mirror2.chabokan.net/npm/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-tostringtag": { + "version": "1.0.2", + "resolved": "https://mirror2.chabokan.net/npm/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-symbols": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hasown": { + "version": "2.0.3", + "resolved": "https://mirror2.chabokan.net/npm/hasown/-/hasown-2.0.3.tgz", + "integrity": "sha512-ej4AhfhfL2Q2zpMmLo7U1Uv9+PyhIZpgQLGT1F9miIGmiCJIoCgSmczFdrc97mWT4kVY72KA+WnnhJ5pghSvSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://mirror2.chabokan.net/npm/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/jiti": { + "version": "2.6.1", + "resolved": "https://mirror2.chabokan.net/npm/jiti/-/jiti-2.6.1.tgz", + "integrity": "sha512-ekilCSN1jwRvIbgeg/57YFh8qQDNbwDb9xT/qu2DAHbFFZUicIl4ygVaAvzveMhMVr3LnpSKTNnwt8PoOfmKhQ==", + "dev": true, + "license": "MIT", + "bin": { + "jiti": "lib/jiti-cli.mjs" + } + }, + "node_modules/laravel-vite-plugin": { + "version": "1.3.0", + "resolved": "https://mirror2.chabokan.net/npm/laravel-vite-plugin/-/laravel-vite-plugin-1.3.0.tgz", + "integrity": "sha512-P5qyG56YbYxM8OuYmK2OkhcKe0AksNVJUjq9LUZ5tOekU9fBn9LujYyctI4t9XoLjuMvHJXXpCoPntY1oKltuA==", + "dev": true, + "license": "MIT", + "dependencies": { + "picocolors": "^1.0.0", + "vite-plugin-full-reload": "^1.1.0" + }, + "bin": { + "clean-orphaned-assets": "bin/clean.js" + }, + "engines": { + "node": "^18.0.0 || ^20.0.0 || >=22.0.0" + }, + "peerDependencies": { + "vite": "^5.0.0 || ^6.0.0" + } + }, + "node_modules/lexical": { + "version": "0.41.0", + "resolved": "https://registry.npmjs.org/lexical/-/lexical-0.41.0.tgz", + "integrity": "sha512-pNIm5+n+hVnJHB9gYPDYsIO5Y59dNaDU9rJmPPsfqQhP2ojKFnUoPbcRnrI9FJLXB14sSumcY8LUw7Sq70TZqA==", + "dev": true, + "license": "MIT" + }, + "node_modules/lightningcss": { + "version": "1.32.0", + "resolved": "https://mirror2.chabokan.net/npm/lightningcss/-/lightningcss-1.32.0.tgz", + "integrity": "sha512-NXYBzinNrblfraPGyrbPoD19C1h9lfI/1mzgWYvXUTe414Gz/X1FD2XBZSZM7rRTrMA8JL3OtAaGifrIKhQ5yQ==", + "dev": true, + "license": "MPL-2.0", + "dependencies": { + "detect-libc": "^2.0.3" + }, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + }, + "optionalDependencies": { + "lightningcss-android-arm64": "1.32.0", + "lightningcss-darwin-arm64": "1.32.0", + "lightningcss-darwin-x64": "1.32.0", + "lightningcss-freebsd-x64": "1.32.0", + "lightningcss-linux-arm-gnueabihf": "1.32.0", + "lightningcss-linux-arm64-gnu": "1.32.0", + "lightningcss-linux-arm64-musl": "1.32.0", + "lightningcss-linux-x64-gnu": "1.32.0", + "lightningcss-linux-x64-musl": "1.32.0", + "lightningcss-win32-arm64-msvc": "1.32.0", + "lightningcss-win32-x64-msvc": "1.32.0" + } + }, + "node_modules/lightningcss-android-arm64": { + "version": "1.32.0", + "resolved": "https://mirror2.chabokan.net/npm/lightningcss-android-arm64/-/lightningcss-android-arm64-1.32.0.tgz", + "integrity": "sha512-YK7/ClTt4kAK0vo6w3X+Pnm0D2cf2vPHbhOXdoNti1Ga0al1P4TBZhwjATvjNwLEBCnKvjJc2jQgHXH0NEwlAg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-darwin-arm64": { + "version": "1.32.0", + "resolved": "https://mirror2.chabokan.net/npm/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.32.0.tgz", + "integrity": "sha512-RzeG9Ju5bag2Bv1/lwlVJvBE3q6TtXskdZLLCyfg5pt+HLz9BqlICO7LZM7VHNTTn/5PRhHFBSjk5lc4cmscPQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-darwin-x64": { + "version": "1.32.0", + "resolved": "https://mirror2.chabokan.net/npm/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.32.0.tgz", + "integrity": "sha512-U+QsBp2m/s2wqpUYT/6wnlagdZbtZdndSmut/NJqlCcMLTWp5muCrID+K5UJ6jqD2BFshejCYXniPDbNh73V8w==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-freebsd-x64": { + "version": "1.32.0", + "resolved": "https://mirror2.chabokan.net/npm/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.32.0.tgz", + "integrity": "sha512-JCTigedEksZk3tHTTthnMdVfGf61Fky8Ji2E4YjUTEQX14xiy/lTzXnu1vwiZe3bYe0q+SpsSH/CTeDXK6WHig==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm-gnueabihf": { + "version": "1.32.0", + "resolved": "https://mirror2.chabokan.net/npm/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.32.0.tgz", + "integrity": "sha512-x6rnnpRa2GL0zQOkt6rts3YDPzduLpWvwAF6EMhXFVZXD4tPrBkEFqzGowzCsIWsPjqSK+tyNEODUBXeeVHSkw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm64-gnu": { + "version": "1.32.0", + "resolved": "https://mirror2.chabokan.net/npm/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.32.0.tgz", + "integrity": "sha512-0nnMyoyOLRJXfbMOilaSRcLH3Jw5z9HDNGfT/gwCPgaDjnx0i8w7vBzFLFR1f6CMLKF8gVbebmkUN3fa/kQJpQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm64-musl": { + "version": "1.32.0", + "resolved": "https://mirror2.chabokan.net/npm/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.32.0.tgz", + "integrity": "sha512-UpQkoenr4UJEzgVIYpI80lDFvRmPVg6oqboNHfoH4CQIfNA+HOrZ7Mo7KZP02dC6LjghPQJeBsvXhJod/wnIBg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-x64-gnu": { + "version": "1.32.0", + "resolved": "https://mirror2.chabokan.net/npm/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.32.0.tgz", + "integrity": "sha512-V7Qr52IhZmdKPVr+Vtw8o+WLsQJYCTd8loIfpDaMRWGUZfBOYEJeyJIkqGIDMZPwPx24pUMfwSxxI8phr/MbOA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-x64-musl": { + "version": "1.32.0", + "resolved": "https://mirror2.chabokan.net/npm/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.32.0.tgz", + "integrity": "sha512-bYcLp+Vb0awsiXg/80uCRezCYHNg1/l3mt0gzHnWV9XP1W5sKa5/TCdGWaR/zBM2PeF/HbsQv/j2URNOiVuxWg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-win32-arm64-msvc": { + "version": "1.32.0", + "resolved": "https://mirror2.chabokan.net/npm/lightningcss-win32-arm64-msvc/-/lightningcss-win32-arm64-msvc-1.32.0.tgz", + "integrity": "sha512-8SbC8BR40pS6baCM8sbtYDSwEVQd4JlFTOlaD3gWGHfThTcABnNDBda6eTZeqbofalIJhFx0qKzgHJmcPTnGdw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-win32-x64-msvc": { + "version": "1.32.0", + "resolved": "https://mirror2.chabokan.net/npm/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.32.0.tgz", + "integrity": "sha512-Amq9B/SoZYdDi1kFrojnoqPLxYhQ4Wo5XiL8EVJrVsB8ARoC1PWW6VGtT0WKCemjy8aC+louJnjS7U18x3b06Q==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/magic-string": { + "version": "0.30.21", + "resolved": "https://mirror2.chabokan.net/npm/magic-string/-/magic-string-0.30.21.tgz", + "integrity": "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.5" + } + }, + "node_modules/marked": { + "version": "16.4.2", + "resolved": "https://registry.npmjs.org/marked/-/marked-16.4.2.tgz", + "integrity": "sha512-TI3V8YYWvkVf3KJe1dRkpnjs68JUPyEa5vjKrp1XEEJUAOaQc+Qj+L1qWbPd0SJuAdQkFU0h73sXXqwDYxsiDA==", + "dev": true, + "license": "MIT", + "bin": { + "marked": "bin/marked.js" + }, + "engines": { + "node": ">= 20" + } + }, + "node_modules/math-intrinsics": { + "version": "1.1.0", + "resolved": "https://mirror2.chabokan.net/npm/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://mirror2.chabokan.net/npm/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://mirror2.chabokan.net/npm/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dev": true, + "license": "MIT", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/nanoid": { + "version": "3.3.11", + "resolved": "https://mirror2.chabokan.net/npm/nanoid/-/nanoid-3.3.11.tgz", + "integrity": "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://mirror2.chabokan.net/npm/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "dev": true, + "license": "ISC" + }, + "node_modules/picomatch": { + "version": "4.0.4", + "resolved": "https://mirror2.chabokan.net/npm/picomatch/-/picomatch-4.0.4.tgz", + "integrity": "sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/postcss": { + "version": "8.5.10", + "resolved": "https://mirror2.chabokan.net/npm/postcss/-/postcss-8.5.10.tgz", + "integrity": "sha512-pMMHxBOZKFU6HgAZ4eyGnwXF/EvPGGqUr0MnZ5+99485wwW41kW91A4LOGxSHhgugZmSChL5AlElNdwlNgcnLQ==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "nanoid": "^3.3.11", + "picocolors": "^1.1.1", + "source-map-js": "^1.2.1" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/prismjs": { + "version": "1.30.0", + "resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.30.0.tgz", + "integrity": "sha512-DEvV2ZF2r2/63V+tK8hQvrR2ZGn10srHbXviTlcv7Kpzw8jWiNTqbVgjO3IY8RxrrOUF8VPMQQFysYYYv0YZxw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/proxy-from-env": { + "version": "2.1.0", + "resolved": "https://mirror2.chabokan.net/npm/proxy-from-env/-/proxy-from-env-2.1.0.tgz", + "integrity": "sha512-cJ+oHTW1VAEa8cJslgmUZrc+sjRKgAKl3Zyse6+PV38hZe/V6Z14TbCuXcan9F9ghlz4QrFr2c92TNF82UkYHA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + } + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://mirror2.chabokan.net/npm/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/rollup": { + "version": "4.60.1", + "resolved": "https://mirror2.chabokan.net/npm/rollup/-/rollup-4.60.1.tgz", + "integrity": "sha512-VmtB2rFU/GroZ4oL8+ZqXgSA38O6GR8KSIvWmEFv63pQ0G6KaBH9s07PO8XTXP4vI+3UJUEypOfjkGfmSBBR0w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "1.0.8" + }, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=18.0.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "@rollup/rollup-android-arm-eabi": "4.60.1", + "@rollup/rollup-android-arm64": "4.60.1", + "@rollup/rollup-darwin-arm64": "4.60.1", + "@rollup/rollup-darwin-x64": "4.60.1", + "@rollup/rollup-freebsd-arm64": "4.60.1", + "@rollup/rollup-freebsd-x64": "4.60.1", + "@rollup/rollup-linux-arm-gnueabihf": "4.60.1", + "@rollup/rollup-linux-arm-musleabihf": "4.60.1", + "@rollup/rollup-linux-arm64-gnu": "4.60.1", + "@rollup/rollup-linux-arm64-musl": "4.60.1", + "@rollup/rollup-linux-loong64-gnu": "4.60.1", + "@rollup/rollup-linux-loong64-musl": "4.60.1", + "@rollup/rollup-linux-ppc64-gnu": "4.60.1", + "@rollup/rollup-linux-ppc64-musl": "4.60.1", + "@rollup/rollup-linux-riscv64-gnu": "4.60.1", + "@rollup/rollup-linux-riscv64-musl": "4.60.1", + "@rollup/rollup-linux-s390x-gnu": "4.60.1", + "@rollup/rollup-linux-x64-gnu": "4.60.1", + "@rollup/rollup-linux-x64-musl": "4.60.1", + "@rollup/rollup-openbsd-x64": "4.60.1", + "@rollup/rollup-openharmony-arm64": "4.60.1", + "@rollup/rollup-win32-arm64-msvc": "4.60.1", + "@rollup/rollup-win32-ia32-msvc": "4.60.1", + "@rollup/rollup-win32-x64-gnu": "4.60.1", + "@rollup/rollup-win32-x64-msvc": "4.60.1", + "fsevents": "~2.3.2" + } + }, + "node_modules/rxjs": { + "version": "7.8.2", + "resolved": "https://mirror2.chabokan.net/npm/rxjs/-/rxjs-7.8.2.tgz", + "integrity": "sha512-dhKf903U/PQZY6boNNtAGdWbG85WAbjT/1xYoZIC7FAY0yWapOBQVsVrDl58W86//e1VpMNBtRV4MaXfdMySFA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.1.0" + } + }, + "node_modules/shell-quote": { + "version": "1.8.3", + "resolved": "https://mirror2.chabokan.net/npm/shell-quote/-/shell-quote-1.8.3.tgz", + "integrity": "sha512-ObmnIF4hXNg1BqhnHmgbDETF8dLPCggZWBjkQfhZpbszZnYur5DUljTcCHii5LC3J5E0yeO/1LIMyH+UvHQgyw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/source-map-js": { + "version": "1.2.1", + "resolved": "https://mirror2.chabokan.net/npm/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://mirror2.chabokan.net/npm/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://mirror2.chabokan.net/npm/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://mirror2.chabokan.net/npm/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/tailwindcss": { + "version": "4.2.2", + "resolved": "https://mirror2.chabokan.net/npm/tailwindcss/-/tailwindcss-4.2.2.tgz", + "integrity": "sha512-KWBIxs1Xb6NoLdMVqhbhgwZf2PGBpPEiwOqgI4pFIYbNTfBXiKYyWoTsXgBQ9WFg/OlhnvHaY+AEpW7wSmFo2Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/tapable": { + "version": "2.3.2", + "resolved": "https://mirror2.chabokan.net/npm/tapable/-/tapable-2.3.2.tgz", + "integrity": "sha512-1MOpMXuhGzGL5TTCZFItxCc0AARf1EZFQkGqMm7ERKj8+Hgr5oLvJOVFcC+lRmR8hCe2S3jC4T5D7Vg/d7/fhA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, + "node_modules/tinyglobby": { + "version": "0.2.16", + "resolved": "https://mirror2.chabokan.net/npm/tinyglobby/-/tinyglobby-0.2.16.tgz", + "integrity": "sha512-pn99VhoACYR8nFHhxqix+uvsbXineAasWm5ojXoN8xEwK5Kd3/TrhNn1wByuD52UxWRLy8pu+kRMniEi6Eq9Zg==", + "dev": true, + "license": "MIT", + "dependencies": { + "fdir": "^6.5.0", + "picomatch": "^4.0.4" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/SuperchupuDev" + } + }, + "node_modules/tree-kill": { + "version": "1.2.2", + "resolved": "https://mirror2.chabokan.net/npm/tree-kill/-/tree-kill-1.2.2.tgz", + "integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==", + "dev": true, + "license": "MIT", + "bin": { + "tree-kill": "cli.js" + } + }, + "node_modules/trix": { + "version": "2.1.18", + "resolved": "https://registry.npmjs.org/trix/-/trix-2.1.18.tgz", + "integrity": "sha512-DWOdTsz3n9PO3YBc1R6pGh9MG1cXys/2+rouc/qsISncjc2MBew2UOW8nXh3NjUOjobKsXCIPR6LB02abg2EYg==", + "dev": true, + "license": "MIT", + "dependencies": { + "dompurify": "^3.2.5" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://mirror2.chabokan.net/npm/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "dev": true, + "license": "0BSD" + }, + "node_modules/vite": { + "version": "6.4.2", + "resolved": "https://mirror2.chabokan.net/npm/vite/-/vite-6.4.2.tgz", + "integrity": "sha512-2N/55r4JDJ4gdrCvGgINMy+HH3iRpNIz8K6SFwVsA+JbQScLiC+clmAxBgwiSPgcG9U15QmvqCGWzMbqda5zGQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "esbuild": "^0.25.0", + "fdir": "^6.4.4", + "picomatch": "^4.0.2", + "postcss": "^8.5.3", + "rollup": "^4.34.9", + "tinyglobby": "^0.2.13" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^18.0.0 || ^20.0.0 || >=22.0.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + }, + "peerDependencies": { + "@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0", + "jiti": ">=1.21.0", + "less": "*", + "lightningcss": "^1.21.0", + "sass": "*", + "sass-embedded": "*", + "stylus": "*", + "sugarss": "*", + "terser": "^5.16.0", + "tsx": "^4.8.1", + "yaml": "^2.4.2" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "jiti": { + "optional": true + }, + "less": { + "optional": true + }, + "lightningcss": { + "optional": true + }, + "sass": { + "optional": true + }, + "sass-embedded": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + }, + "tsx": { + "optional": true + }, + "yaml": { + "optional": true + } + } + }, + "node_modules/vite-plugin-full-reload": { + "version": "1.2.0", + "resolved": "https://mirror2.chabokan.net/npm/vite-plugin-full-reload/-/vite-plugin-full-reload-1.2.0.tgz", + "integrity": "sha512-kz18NW79x0IHbxRSHm0jttP4zoO9P9gXh+n6UTwlNKnviTTEpOlum6oS9SmecrTtSr+muHEn5TUuC75UovQzcA==", + "dev": true, + "license": "MIT", + "dependencies": { + "picocolors": "^1.0.0", + "picomatch": "^2.3.1" + } + }, + "node_modules/vite-plugin-full-reload/node_modules/picomatch": { + "version": "2.3.2", + "resolved": "https://mirror2.chabokan.net/npm/picomatch/-/picomatch-2.3.2.tgz", + "integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://mirror2.chabokan.net/npm/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://mirror2.chabokan.net/npm/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs": { + "version": "17.7.2", + "resolved": "https://mirror2.chabokan.net/npm/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://mirror2.chabokan.net/npm/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=12" + } + } + } +} diff --git a/package.json b/package.json index ef47e425..d3da9fb3 100755 --- a/package.json +++ b/package.json @@ -7,11 +7,13 @@ "dev": "vite" }, "devDependencies": { + "@37signals/lexxy": "^0.8.5-beta", "@tailwindcss/vite": "^4.0.0", "axios": "^1.8.2", "concurrently": "^9.0.1", "laravel-vite-plugin": "^1.2.0", "tailwindcss": "^4.0.0", + "trix": "^2.1.16", "vite": "^6.2.4" } } diff --git a/public/vendor/rich-text-laravel/lexxy-64053482.css b/public/vendor/rich-text-laravel/lexxy-64053482.css new file mode 100644 index 00000000..a7e1035f --- /dev/null +++ b/public/vendor/rich-text-laravel/lexxy-64053482.css @@ -0,0 +1 @@ +:where(.lexxy-content){color:var(--lexxy-color-ink);h1,h2,h3,h4,h5,h6 {display: block; font-weight: bold; hyphens: auto; margin-block: 0 var(--lexxy-content-margin); overflow-wrap: break-word; text-wrap: balance;} h1 {font-size: 2rem;} h2 {font-size: 1.5rem;} h3 {font-size: 1.25rem;} h4 {font-size: 1rem;} h5 {font-size: .875rem;} h6 {font-size: .75rem;} p,ul,ol,dl,blockquote,figure,.attachment,.attachment-gallery {margin-block: 0 var(--lexxy-content-margin); position: relative; &:not(lexxy-editor &) {overflow-wrap: break-word; text-wrap: pretty;}} .lexxy-content__italic {font-style: italic;} .lexxy-content__bold {font-weight: bold;} .lexxy-content__strikethrough {text-decoration: line-through;} .lexxy-content__underline {text-decoration: underline;} mark,.lexxy-content__highlight {background-color: transparent; color: inherit;} blockquote {border-inline-start: .25em solid var(--lexxy-color-ink-lighter); font-style: italic; margin: var(--lexxy-content-margin) 0; padding: .5lh 2ch; p:last-child {margin-block-end: 0;}} p:empty {display: none;} a {color: var(--lexxy-color-link); text-decoration: underline;} img,video,embed,object {inline-size: auto; margin-inline: auto; min-block-size: 3em; max-block-size: 32rem; object-fit: contain; a:has(&) {display: inline-block;}} code,pre {background-color: var(--lexxy-color-ink-lightest); border-radius: var(--lexxy-radius); color: var(--lexxy-color-ink); font-family: var(--lexxy-font-mono); font-size: .9em; padding: .25ch .5ch; &:is(pre),&[data-language] {border-radius: var(--lexxy-radius); display: block; hyphens: none; margin-block: 0 var(--lexxy-content-margin); overflow-x: auto; padding: 1ch; tab-size: 2; text-wrap: nowrap; white-space: pre; word-break: break-word;}} ol,ul {margin-inline-start: calc(var(--lexxy-content-margin) * 1.5); padding: 0;} ul {list-style-type: disc;} ol {list-style-type: decimal;} li.lexxy-nested-listitem {list-style-type: none; ol,ul {margin-block-end: 0;}} hr {border: 0; border-block-end: 1px solid currentColor; inline-size: 20%; margin: calc(.5em + var(--lexxy-content-margin)) 0;} .horizontal-divider {margin: 0; padding: calc(.5em + var(--lexxy-content-margin)) 0; hr {margin: 0;}} *:has(+ .horizontal-divider) {margin-block-end: 0;} > :last-child {margin-block-end: 0;} .code-token__attr,.token.attr-name,.token.atrule,.token.attr,.token.keyword {color: var(--lexxy-color-code-token-att);} .code-token__property,.token.boolean,.token.constant,.token.number,.token.property,.token.symbol,.token.tag {color: var(--lexxy-color-code-token-property);} .code-token__selector,.token.attr-value,.token.builtin,.token.char,.token.inserted,.token.line,.token.selector,.token.string {color: var(--lexxy-color-code-token-selector);} .code-token__comment,.token.cdata,.token.comment,.token.doctype,.token.prolog {color: var(--lexxy-color-code-token-comment); font-style: italic;} .code-token__operator,.token.deleted,.token.entity,.token.operator,.token.url,code[data-language="diff"] .code-token__operator + .code-token__selector {color: var(--lexxy-color-code-token-operator);} .code-token__function,.token.class,.token.class-name,.token.function {color: var(--lexxy-color-code-token-function);} .code-token__variable,.token.important,.token.namespace,.token.regex,.token.variable {color: var(--lexxy-color-code-token-variable);} .code-token__punctuation,.token.punctuation {color: var(--lexxy-color-code-token-punctuation);} :where(.lexxy-content__table-wrapper) {margin: 0; margin-block: 1ch; overflow-x: auto;} table {border-collapse: collapse; border-spacing: 0; inline-size: calc(100% - .5ch); margin: .25ch; th,td {border: 1px solid var(--lexxy-color-ink-lighter); min-width: 5ch; max-width: 50ch; padding: 1ch; text-align: start; word-break: normal; *:last-child {margin-block-end: 0;} &.lexxy-content__table-cell--header {background-color: var(--lexxy-color-table-header-bg); font-weight: bold;} *:is(code,pre) {hyphens: auto; text-wrap: wrap; white-space: pre-wrap;}}} p:has(.attachment) {text-align: center;} .attachment { --lexxy-attachment-gap: .75ch; block-size: auto; box-sizing: border-box; border-radius: var(--lexxy-radius); display: table; inline-size: fit-content; margin-inline: auto; max-inline-size: 100%; min-inline-size: 10ch; padding: var(--lexxy-attachment-gap); position: relative; text-align: center; :where(progress) { inline-size: 100%; margin: auto; } } .attachment__caption {caption-side: bottom; color: var(--lexxy-color-text-subtle); display: table-caption; font-size: var(--lexxy-text-small);} .attachment__icon {aspect-ratio: 4/5; background-color: color-mix(var(--lexxy-attachment-icon-color),transparent 90%); block-size: 3lh; border: 2px solid var(--lexxy-attachment-icon-color); border-block-start-width: 1ch; border-radius: var(--lexxy-radius); box-sizing: border-box; color: var(--lexxy-attachment-icon-color); display: grid; font-size: var(--lexxy-text-small); font-weight: bold; inline-size: auto; place-content: center; text-transform: uppercase;} .attachment--preview {img,video {border-radius: var(--lexxy-radius); block-size: auto; display: block; margin-inline: auto; max-inline-size: 100%; user-select: none;} > a {display: block;}} .attachment--file { --lexxy-attachment-icon-color: var(--lexxy-color-text-subtle); align-items: center; display: flex; flex-wrap: wrap; gap: 0; inline-size: auto; .attachment__caption { display: grid; flex: 1; text-align: start; } .attachment__name { color: var(--lexxy-color-ink); font-weight: bold; } } .attachment--psd,.attachment--key,.attachment--sketch,.attachment--ai,.attachment--eps,.attachment--indd,.attachment--svg,.attachment--ppt,.attachment--pptx { --lexxy-attachment-icon-color: var(--lexxy-color-red); } .attachment--css,.attachment--php,.attachment--json,.attachment--htm,.attachment--html,.attachment--rb,.attachment--erb,.attachment--ts,.attachment--js { --lexxy-attachment-icon-color: var(--lexxy-color-purple); } .attachment--txt,.attachment--pages,.attachment--rtf,.attachment--md,.attachment--doc,.attachment--docx { --lexxy-attachment-icon-color: var(--lexxy-color-blue); } .attachment--csv,.attachment--numbers,.attachment--xls,.attachment--xlsx { --lexxy-attachment-icon-color: var(--lexxy-color-green); } .attachment-gallery {display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); .attachment {display: flex; flex-direction: column; gap: 1ch; inline-size: 100%;} &:has(> :nth-child(2):last-child),&:has(> :nth-child(4):last-child) {grid-template-columns: repeat(2,minmax(0,1fr));}} action-text-attachment[content-type^="application/vnd.actiontext"] { --lexxy-attachment-bg-color: transparent; --lexxy-attachment-image-size: 1em; --lexxy-attachment-text-color: currentColor; align-items: center; background: var(--lexxy-attachment-bg-color); border-radius: var(--lexxy-radius); box-shadow: -.25ch 0 0 var(--lexxy-attachment-bg-color), .5ch 0 0 var(--lexxy-attachment-bg-color); color: var(--lexxy-attachment-text-color); display: inline-flex; gap: .25ch; margin: 0; padding: 0; position: relative; white-space: normal; img { block-size: var(--lexxy-attachment-image-size); border-radius: 50%; inline-size: var(--lexxy-attachment-image-size); } &.node--selected { --lexxy-attachment-bg-color: var(--lexxy-color-accent-dark); --lexxy-attachment-text-color: var(--lexxy-color-ink-inverted); } } .horizontal-divider {margin: 0; margin-block-end: .5em; padding: 1.5em 0 .5em; hr {border: 0; border-block-end: 1px solid currentColor; inline-size: 20%; margin: 0;}}}:root{--lexxy-color-ink: oklch(20% 0 0);--lexxy-color-ink-medium: oklch(40% 0 0);--lexxy-color-ink-light: oklch(60% 0 0);--lexxy-color-ink-lighter: oklch(85% 0 0);--lexxy-color-ink-lightest: oklch(96% 0 0);--lexxy-color-ink-inverted: white;--lexxy-color-accent-dark: oklch(57% .19 260);--lexxy-color-accent-medium: oklch(75% .196 258);--lexxy-color-accent-light: oklch(88% .026 254);--lexxy-color-accent-lightest: oklch(92% .026 254);--lexxy-color-red: oklch(60% .15 27);--lexxy-color-green: oklch(60% .15 145);--lexxy-color-blue: oklch(66% .196 258);--lexxy-color-purple: oklch(60% .15 305);--lexxy-color-code-token-att: #d73a49;--lexxy-color-code-token-comment: #6a737d;--lexxy-color-code-token-function: #6f42c1;--lexxy-color-code-token-operator: #d73a49;--lexxy-color-code-token-property: #005cc5;--lexxy-color-code-token-punctuation: #24292e;--lexxy-color-code-token-selector: #22863a;--lexxy-color-code-token-variable: #e36209;--lexxy-color-canvas: var(--lexxy-color-ink-inverted);--lexxy-color-text: var(--lexxy-color-ink);--lexxy-color-text-subtle: var(--lexxy-color-ink-medium);--lexxy-color-link: var(--lexxy-color-accent-dark);--lexxy-color-selected: var(--lexxy-color-accent-lightest);--lexxy-color-selected-hover: var(--lexxy-color-accent-light);--lexxy-color-selected-dark: var(--lexxy-color-blue);--lexxy-color-selected-50: color-mix(in oklch, var(--lexxy-color-selected-dark) 50%, transparent);--lexxy-color-code-bg: var(--lexxy-color-ink-lightest);--highlight-1: rgb(136, 118, 38);--highlight-2: rgb(185, 94, 6);--highlight-3: rgb(207, 0, 0);--highlight-4: rgb(216, 28, 170);--highlight-5: rgb(144, 19, 254);--highlight-6: rgb(5, 98, 185);--highlight-7: rgb(17, 138, 15);--highlight-8: rgb(148, 82, 22);--highlight-9: rgb(102, 102, 102);--highlight-bg-1: rgba(229, 223, 6, .3);--highlight-bg-2: rgba(255, 185, 87, .3);--highlight-bg-3: rgba(255, 118, 118, .3);--highlight-bg-4: rgba(248, 137, 216, .3);--highlight-bg-5: rgba(190, 165, 255, .3);--highlight-bg-6: rgba(124, 192, 252, .3);--highlight-bg-7: rgba(140, 255, 129, .3);--highlight-bg-8: rgba(221, 170, 123, .3);--highlight-bg-9: rgba(200, 200, 200, .3);--lexxy-color-table-header-bg: var(--lexxy-color-ink-lightest);--lexxy-color-table-cell-border: var(--lexxy-color-ink-lighter);--lexxy-color-table-cell-selected: var(--lexxy-color-selected);--lexxy-color-table-cell-selected-border: var(--lexxy-color-selected-dark);--lexxy-color-table-cell-selected-bg: var(--lexxy-color-accent-lightest);--lexxy-color-table-cell-add: var(--lexxy-color-selected-50);--lexxy-color-table-cell-toggle: var(--lexxy-color-accent-lightest);--lexxy-color-table-cell-remove: oklch(60% .15 27 / .1);--lexxy-table-cell-add-size: 4px;--lexxy-font-base: system-ui, sans-serif;--lexxy-font-mono: ui-monospace, "Menlo", "Monaco", Consolas, monospace;--lexxy-text-small: .875rem;--lexxy-content-margin: 1rem;--lexxy-focus-ring-color: var(--lexxy-color-accent-dark);--lexxy-focus-ring-offset: -2px;--lexxy-focus-ring-size: 2px;--lexxy-toolbar-button-size: 2lh;--lexxy-radius: .5ch;--lexxy-shadow: 0 2px 8px rgba(0, 0, 0, .1);--lexxy-z-popup: 1000}:where(lexxy-editor){--lexxy-editor-padding: 1ch;--lexxy-editor-rows: 8lh;@supports (min-block-size: attr(rows lh)){--lexxy-editor-rows: attr(rows lh, 8lh)}--lexxy-toolbar-gap: 2px;--lexxy-toolbar-spacing: .5ch;border:1px solid var(--lexxy-color-ink-lighter);border-radius:calc(var(--lexxy-radius) + var(--lexxy-toolbar-gap));background-color:var(--lexxy-color-canvas);display:block;overflow:visible;position:relative;transition:opacity .15s;p.provisional-paragraph {display: block; &.hidden {block-size: .5ch; margin: 0;}} input,button,summary {&:focus-visible {outline: var(--lexxy-focus-ring-size) solid var(--lexxy-focus-ring-color); outline-offset: var(--lexxy-focus-ring-offset);}} summary {list-style: none; &::-webkit-details-marker {display: none;}} button,summary {-webkit-appearance: none; appearance: none; background: var(--lexxy-color-canvas); border: none; border-radius: var(--lexxy-radius); cursor: pointer; line-height: normal; font-size: inherit; inline-size: auto; padding: 0; @media(any-hover: hover) {&:hover:not([aria-disabled="true"]) {background: var(--lexxy-color-ink-lightest);}}} .node--selected {outline: var(--lexxy-focus-ring-size) solid var(--lexxy-focus-ring-color); outline-offset: var(--lexxy-focus-ring-offset);} table {th,td {position: relative; transition: all .1s ease-in-out; &:after {box-shadow: 0 0 0 0 transparent,0 0 0 0 transparent inset; content: ""; display: block; inset-block-start: -1px; inset-block-end: -1px; inset-inline-start: -1px; inset-inline-end: -1px; pointer-events: none; position: absolute; transition: box-shadow .1s ease-in-out; z-index: 2;} &.lexxy-content__table-cell--selected {background-color: var(--lexxy-color-table-cell-selected-bg);} &.lexxy-content__table-cell--focus {&:after {box-shadow: 0 0 0 0 transparent,0 0 0 2px var(--lexxy-color-table-cell-selected-border) inset;}} &.lexxy-content__table-cell--highlight {&[data-action="insert"] {&[data-child-type="row"] {&[data-direction="after"] {&:after {box-shadow: 0 var(--lexxy-table-cell-add-size) 0 0 var(--lexxy-color-table-cell-add),0 calc(-1 * var(--lexxy-table-cell-add-size) - 1px) 0 0 var(--lexxy-color-table-cell-add) inset;}} &[data-direction="before"] {&:after {box-shadow: 0 calc(-1 * var(--lexxy-table-cell-add-size) - 1px) 0 0 var(--lexxy-color-table-cell-add),0 var(--lexxy-table-cell-add-size) 0 0 var(--lexxy-color-table-cell-add) inset;}}} &[data-child-type="column"] {&[data-direction="after"] {&:after {box-shadow: var(--lexxy-table-cell-add-size) 0 0 0 var(--lexxy-color-table-cell-add),calc(-1 * var(--lexxy-table-cell-add-size) - 1px) 0 0 0 var(--lexxy-color-table-cell-add) inset;}} &[data-direction="before"] {&:after {box-shadow: calc(-1 * var(--lexxy-table-cell-add-size) - 1px) 0 0 0 var(--lexxy-color-table-cell-add),var(--lexxy-table-cell-add-size) 0 0 0 var(--lexxy-color-table-cell-add) inset;}}}} &[data-action="delete"] {background-color: var(--lexxy-color-table-cell-remove); color: var(--lexxy-color-red); &:after {box-shadow: 0 0 0 0 transparent;}} &[data-action="toggle"] {background-color: var(--lexxy-color-table-cell-toggle); &:after {box-shadow: 0 0 0 0 transparent;}}}} tr.lexxy-content__table-cell--highlight[data-action="delete"] {th,td {background-color: var(--lexxy-color-table-cell-remove); color: var(--lexxy-color-red); &:after {box-shadow: 0 0 0 0 transparent;}}} &.lexxy-content__table--selection {::selection {background: transparent;}}} &:has(.lexxy-content__table-cell--selected) {lexxy-table-tools {visibility: hidden;}} [data-lexical-linebreak] {block-size: 0; display: contents; inline-size: 0;} action-text-attachment {cursor: pointer;} .attachment:hover:not(.node--selected) {outline: var(--lexxy-focus-ring-size) solid color-mix(in oklch,var(--lexxy-focus-ring-color) 30%,transparent); outline-offset: var(--lexxy-focus-ring-offset);} .attachment-gallery { --lexxy-attachment-gallery-columns: 3; --lexxy-attachment-gallery-gap: .4ch; --lexxy-focus-ring-offset: -6px; display: block; padding: 0; .attachment { box-sizing: border-box; display: inline-flex; flex-direction: column; gap: 0; inline-size: calc(100% / var(--lexxy-attachment-gallery-columns) - var(--lexxy-attachment-gallery-gap) * 2); margin: var(--lexxy-attachment-gallery-gap); padding: 0; padding-block-end: var(--lexxy-attachment-gap); vertical-align: top; .attachment__container { display: block; margin: 0; padding: 1ch; padding-block-end: 0; } img { block-size: auto; box-sizing: border-box; inline-size: auto; margin: auto; max-block-size: 50rem; max-inline-size: 100%; object-fit: contain; } } &:has(> .attachment:nth-child(2):last-of-type), &:has(> .attachment:nth-child(4):last-of-type) { --lexxy-attachment-gallery-columns: 2; } } .attachment__caption {padding: 0 1ch; textarea {background: transparent; block-size: fit-content; border: 0; border-radius: var(--lexxy-radius); box-sizing: border-box; color: inherit; display: block; font-size: inherit; font-family: inherit; inline-size: 100%; max-inline-size: 100%; resize: none; text-align: center; padding: 1ch 0; &:focus {background: var(--lexxy-color-canvas); outline: 0;} &:placeholder-shown {overflow: hidden; text-overflow: ellipsis; white-space: nowrap;} @supports (field-sizing: content) {field-sizing: content; inline-size: 100%;}}}}:where(.lexxy-editor--empty){.lexxy-editor__content:not(:has(ul,ol))::before {content: attr(placeholder); color: currentColor; cursor: text; opacity: .66; pointer-events: none; position: absolute; white-space: pre-line;}}:where(.lexxy-editor__content){min-block-size:var(--lexxy-editor-rows);outline:0;padding:var(--lexxy-editor-padding)}:where(.lexxy-editor--drag-over){background-color:var(--lexxy-color-selected);border-radius:var(--lexxy-radius);outline:2px dashed var(--lexxy-color-selected-dark)}:where([data-lexical-cursor]){animation:blink 1s infinite;block-size:1lh;border-inline-start:1.5px solid currentColor;line-height:inherit;margin-block:0 var(--lexxy-content-margin)}@keyframes blink{0%{opacity:1}60%{opacity:1}to{opacity:0}}:where(lexxy-toolbar){--lexxy-toolbar-icon-size: 1.125em;border-block-end:1px solid var(--lexxy-color-ink-lighter);color:currentColor;display:flex;font-size:inherit;gap:var(--lexxy-toolbar-gap);max-inline-size:100%;padding:2px;position:relative;&[data-attachments=false] button[name=upload]{display:none}.lexxy-editor__toolbar-button {aspect-ratio: 1; block-size: var(--lexxy-toolbar-button-size); border: 0; border-radius: var(--lexxy-radius); color: currentColor; display: grid; line-height: inherit; place-items: center; &:is(:active):not([aria-disabled="true"]),&[aria-pressed="true"] {background-color: var(--lexxy-color-selected); &:hover {background-color: var(--lexxy-color-selected-hover);}} &[aria-disabled="true"] {cursor: default; opacity: .3;} svg {-webkit-touch-callout: none; block-size: var(--lexxy-toolbar-icon-size); fill: currentColor; grid-area: 1/1; inline-size: var(--lexxy-toolbar-icon-size); user-select: none;} &.lexxy-editor__toolbar-group-end {position: relative; margin-inline-end: calc(var(--lexxy-toolbar-spacing) + 1px); &:after {background-color: var(--lexxy-color-ink-lighter); content: ""; display: block; width: 1px; height: 60%; inset-inline-end: calc(-1 * var(--lexxy-toolbar-spacing)); inset-block-start: 20%; position: absolute; pointer-events: none;}}} .lexxy-editor__toolbar-spacer {flex: 1;}}:where(.lexxy-editor__toolbar-dropdown){user-select:none;-webkit-user-select:none;summary ~ * {background-color: var(--lexxy-color-canvas); border: 2px solid var(--lexxy-color-selected-hover); border-radius: calc(var(--lexxy-radius) + var(--lexxy-toolbar-gap)); box-sizing: border-box; box-shadow: var(--lexxy-shadow); color: var(--lexxy-color-ink); display: flex; gap: var(--lexxy-toolbar-gap); margin: 0; padding: var(--lexxy-toolbar-spacing); position: absolute; z-index: 3;} &:is([open]) > .lexxy-editor__toolbar-button {background-color: var(--lexxy-color-selected-hover); border-end-end-radius: 0; border-end-start-radius: 0; &:hover {background-color: var(--lexxy-color-selected-hover);}} [overflowing] &:not(.lexxy-editor__toolbar-overflow) summary ~ * {inset-inline-end: var(--lexxy-toolbar-spacing); inset-inline-start: var(--lexxy-toolbar-spacing);} button {color: var(--lexxy-color-text); &:hover {opacity: .8;}} &.lexxy-editor__toolbar-overflow {display: none; justify-self: flex-end; z-index: 1; summary ~ * {border-start-end-radius: 0; display: grid; grid-template-columns: repeat(4,1fr); inset-inline-end: var(--lexxy-toolbar-gap);}} lexxy-link-dropdown {font-size: var(--lexxy-text-small); inset-inline-start: var(--lexxy-toolbar-spacing); inset-inline-end: var(--lexxy-toolbar-spacing); form {display: flex; flex: 1; gap: var(--lexxy-toolbar-spacing); [overflowing] & {display: block; .lexxy-editor__toolbar-dropdown-actions {margin-block-start: var(--lexxy-toolbar-spacing);}}} .lexxy-editor__toolbar-dropdown-actions {display: flex; flex: 1; gap: var(--lexxy-toolbar-spacing);} input[type="url"] {background-color: var(--lexxy-color-canvas); border: 1px solid var(--lexxy-color-ink-lighter); border-radius: var(--lexxy-radius); color: var(--lexxy-color-text); block-size: var(--lexxy-toolbar-button-size); box-sizing: border-box; font-size: var(--lexxy-text-small); flex: 2; inline-size: 100%; line-height: normal; padding-block: 0; padding-inline: 1ch;} button {background-color: var(--lexxy-color-ink-lightest); inline-size: 100%; padding-inline: 2ch;} button[type="submit"] {background-color: var(--lexxy-color-accent-dark); color: var(--lexxy-color-ink-inverted); &:hover {background-color: var(--lexxy-color-accent-medium);}}} &:has(lexxy-highlight-dropdown) {position: relative; [overflowing] & {position: static;}} lexxy-highlight-dropdown { --max-inline-size: calc(var(--max-colors) * (var(--lexxy-toolbar-button-size) + var(--lexxy-toolbar-spacing))); border-start-start-radius: 0; display: flex; gap: var(--lexxy-toolbar-spacing); flex-direction: column; font-size: var(--lexxy-text-small); inset-inline-start: 0; max-inline-size: var(--max-inline-size); button { position: relative; } .lexxy-highlight-colors { display: grid; gap: var(--lexxy-toolbar-gap); grid-template-columns: repeat(auto-fill, minmax(var(--lexxy-toolbar-button-size), 1fr)); max-inline-size: var(--max-inline-size); button { block-size: unset; inline-size: 100%; &:after { align-self: center; content: "Aa"; display: inline-block; font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; position: absolute; inset-block-start: 0; inset-block-end: 0; inset-inline-end: 0; inset-inline-start: 0; } &[aria-pressed="true"] { background-color: transparent; box-shadow: 0 0 0 2px currentColor inset; &:after { content: "\2713"; } } } } .lexxy-editor__toolbar-dropdown-reset { background-color: var(--lexxy-color-ink-lightest); &:is([disabled]) { display: none; } } }}:where(.lexxy-floating-controls){--button-size: 2.3lh;--table-tools-radius: calc(var(--lexxy-radius) * 1.5);color:var(--lexxy-color-ink-inverted);font-size:var(--lexxy-text-small);line-height:1;position:absolute;z-index:2;button,summary {align-items: center; background: transparent; block-size: var(--button-size); color: var(--lexxy-color-ink-inverted); display: flex; justify-content: center; line-height: 1; min-block-size: var(--button-size); min-inline-size: var(--button-size); user-select: none; -webkit-user-select: none; @media(any-hover: hover) {&:hover:not([aria-disabled="true"]),[open] &:is(summary) {background: var(--lexxy-color-ink-medium); svg {opacity: 1;}} &:focus-visible {outline-color: var(--lexxy-focus-ring-color);}}} button {aspect-ratio: 1 / 1; font-weight: bold; svg {block-size: 1.125em; inline-size: 1.125em; fill: currentColor; opacity: .8; padding: 1px;} span {display: none;}} summary {box-shadow: 0 0 0 1px inset rgba(128,128,128,.3); padding: 0 1.25ch;} .lexxy-floating-controls__group {background-color: var(--lexxy-color-ink); border-radius: var(--table-tools-radius); padding: .25ch;} &:is(lexxy-table-tools) {flex-direction: row; gap: .25ch; inset-inline-start: var(--lexxy-editor-padding); transform: translate(-50%,-120%); .lexxy-table-control {align-items: stretch; display: flex; flex-direction: row; gap: .25ch; white-space: nowrap; .lexxy-table-control__more-menu {gap: 0; position: relative; .lexxy-table-control__more-menu-details {background: var(--lexxy-color-ink); border-radius: var(--table-tools-radius); display: flex; flex-direction: column; gap: .25ch; inset-block-start: 110%; inset-inline-start: 50%; padding: .25ch; position: absolute; transform: translateX(-50%); button {aspect-ratio: unset; flex-direction: row; font-weight: normal; gap: 1ch; justify-content: flex-start; padding: .75ch; padding-inline-end: 1.5ch; white-space: nowrap; span {display: inline-block;} svg {block-size: 1.3lh; inline-size: 1.3lh; fill: currentColor;}}}} .lexxy-table-control__button--delete-table {align-items: center; block-size: auto; font-weight: normal; justify-content: center; svg {block-size: 1.125em; inline-size: 1.125em; min-block-size: 1.125em; min-inline-size: 1.125em;} span {align-items: center; background: var(--lexxy-color-ink); border-radius: var(--table-tools-radius); color: color-mix(in srgb,var(--lexxy-color-ink-inverted) 80%,transparent); display: flex; inset-inline-end: calc(var(--button-size) + 1ch); inset-block-start: 0; inset-block-end: 0; inset-inline-start: 0; justify-content: center; padding: .5ch 1ch; position: absolute; transition: all .2s ease-out; opacity: 0; pointer-events: none; white-space: nowrap;} &:hover {background-color: var(--lexxy-color-red); svg {color: var(--lexxy-color-ink-inverted);} span {opacity: 1;}}}}} &:is(lexxy-node-delete-button) {inset-block-start: .5ch; inset-inline-end: .5ch; opacity: 0; pointer-events: none; transition: opacity .1s ease-in-out; .node--selected & {opacity: 1; pointer-events: auto;} .lexxy-node-delete:hover {background-color: var(--lexxy-color-red);}} &:is(lexxy-code-language-picker) {inset-inline-end: var(--lexxy-editor-padding); select {-webkit-appearance: none; appearance: none; background-color: var(--lexxy-color-canvas); background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m12 19.5c-.7 0-1.3-.3-1.7-.8l-9.8-11.1c-.7-.8-.6-1.9.2-2.6.8-.6 1.9-.6 2.5.2l8.6 9.8c0 .1.2.1.4 0l8.6-9.8c.7-.8 1.8-.9 2.6-.2s.9 1.8.2 2.6l-9.8 11.1c-.4.5-1.1.8-1.7.8z' fill='%23000'/%3E%3C/svg%3E"); background-position: center right 1ch; background-repeat: no-repeat; background-size: 1ch; block-size: 1.5lh; border: 1px solid var(--lexxy-color-ink-lighter); border-radius: var(--lexxy-radius); color: var(--lexxy-color-ink); font-family: var(--lexxy-font-base); font-size: var(--lexxy-text-small); font-weight: normal; margin: .5ch .5ch 0 -.5ch; padding: 0 2ch 0 1ch; text-align: start; @media (prefers-color-scheme: dark) {background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m12 19.5c-.7 0-1.3-.3-1.7-.8l-9.8-11.1c-.7-.8-.6-1.9.2-2.6.8-.6 1.9-.6 2.5.2l8.6 9.8c0 .1.2.1.4 0l8.6-9.8c.7-.8 1.8-.9 2.6-.2s.9 1.8.2 2.6l-9.8 11.1c-.4.5-1.1.8-1.7.8z' fill='%23fff'/%3E%3C/svg%3E");}}}}:where(.lexxy-prompt-menu){--lexxy-prompt-avatar-size: 24px;--lexxy-prompt-min-width: 20ch;--lexxy-prompt-padding: .5ch;background-color:var(--lexxy-color-canvas);border-radius:calc(var(--lexxy-prompt-padding) * 2);box-shadow:var(--lexxy-shadow);color:var(--lexxy-color-ink);font-family:var(--lexxy-font-base);font-size:var(--lexxy-text-small);list-style:none;margin:0;max-block-size:200px;min-inline-size:var(--lexxy-prompt-min-width);overflow:auto;padding:var(--lexxy-prompt-padding);visibility:hidden;z-index:var(--lexxy-z-popup)}:where(.lexxy-prompt-menu--visible){visibility:initial}:where(.lexxy-prompt-menu__item){align-items:center;border-radius:var(--lexxy-radius);cursor:pointer;display:flex;gap:var(--lexxy-prompt-padding);padding:var(--lexxy-prompt-padding);white-space:nowrap;&:hover{background-color:var(--lexxy-color-ink-lightest)}&[aria-selected]{background-color:var(--lexxy-color-selected)}img {block-size: var(--lexxy-prompt-avatar-size); border-radius: 50%; flex-shrink: 0; inline-size: var(--lexxy-prompt-avatar-size); margin: 0;} + & {margin-top: 2px;}}:where(.lexxy-prompt-menu__item--empty){color:var(--lexxy-color-ink-medium);padding:var(--lexxy-prompt-padding)} diff --git a/public/vendor/rich-text-laravel/lexxy-rich-text-laravel-attachments-4974baec.css b/public/vendor/rich-text-laravel/lexxy-rich-text-laravel-attachments-4974baec.css new file mode 100644 index 00000000..89f202dc --- /dev/null +++ b/public/vendor/rich-text-laravel/lexxy-rich-text-laravel-attachments-4974baec.css @@ -0,0 +1 @@ +:where(lexxy-editor){rich-text-attachment {cursor: pointer;}}:where(rich-text-attachment){--lexxy-attachment-bg-color: transparent;--lexxy-attachment-image-size: 1em;--lexxy-attachment-text-color: currentColor;align-items:center;background:var(--lexxy-attachment-bg-color);border-radius:var(--lexxy-radius);box-shadow:-.25ch 0 0 var(--lexxy-attachment-bg-color),.5ch 0 0 var(--lexxy-attachment-bg-color);color:var(--lexxy-attachment-text-color);display:inline-flex;gap:.25ch;margin:0;padding:0;position:relative;white-space:normal;img {block-size: var(--lexxy-attachment-image-size); border-radius: 50%; inline-size: var(--lexxy-attachment-image-size);} &.node--selected { --lexxy-attachment-bg-color: var(--lexxy-color-accent-dark); --lexxy-attachment-text-color: var(--lexxy-color-ink-inverted); }} diff --git a/public/vendor/rich-text-laravel/lexxy-rich-text-laravel-daisyui-9dcf6ff2.css b/public/vendor/rich-text-laravel/lexxy-rich-text-laravel-daisyui-9dcf6ff2.css new file mode 100644 index 00000000..e951bbb9 --- /dev/null +++ b/public/vendor/rich-text-laravel/lexxy-rich-text-laravel-daisyui-9dcf6ff2.css @@ -0,0 +1 @@ +:root{--lexxy-color-canvas: var(--color-base-100);--lexxy-color-ink: var(--color-base-content);--lexxy-color-ink-medium: color-mix(in oklch, var(--color-base-content) 60%, transparent);--lexxy-color-ink-light: color-mix(in oklch, var(--color-base-content) 40%, transparent);--lexxy-color-ink-lighter: color-mix(in oklch, var(--color-base-content) 20%, transparent);--lexxy-color-ink-lightest: var(--color-base-200);--lexxy-color-ink-inverted: var(--color-base-100);--lexxy-color-accent-dark: var(--color-primary);--lexxy-color-accent-medium: color-mix(in oklch, var(--color-primary) 75%, var(--color-base-100));--lexxy-color-accent-light: color-mix(in oklch, var(--color-primary) 15%, var(--color-base-100));--lexxy-color-accent-lightest: color-mix(in oklch, var(--color-primary) 8%, var(--color-base-100));--lexxy-color-red: var(--color-error);--lexxy-color-green: var(--color-success);--lexxy-color-blue: var(--color-info);--lexxy-color-purple: var(--color-secondary);--lexxy-color-text: var(--color-base-content);--lexxy-color-text-subtle: color-mix(in oklch, var(--color-base-content) 60%, transparent);--lexxy-color-link: var(--color-primary);--lexxy-color-selected: color-mix(in oklch, var(--color-primary) 10%, var(--color-base-100));--lexxy-color-selected-hover: color-mix(in oklch, var(--color-primary) 18%, var(--color-base-100));--lexxy-color-selected-dark: var(--color-primary);--lexxy-color-code-bg: var(--color-base-200);--lexxy-color-table-header-bg: var(--color-base-200);--lexxy-color-table-cell-border: var(--color-base-300);--lexxy-focus-ring-color: var(--color-primary);--lexxy-radius: var(--radius-field);--lexxy-shadow: 0 2px 8px color-mix(in oklch, var(--color-base-content) 10%, transparent)}lexxy-editor{border-width:var(--border);font-size:.875rem;&:focus-within{outline:2px solid var(--color-base-content);outline-offset:2px}:is(code,pre):is(pre,[data-language]) {padding: 2ch;} lexxy-code-language-picker select { --input-color: color-mix(in oklab, var(--color-base-content) 20%, #0000); appearance: none; background-color: var(--color-base-100); border: var(--border) solid var(--input-color); border-radius: var(--radius-field); color: var(--color-base-content); font-family: inherit; font-size: var(--lexxy-text-small); height: calc(var(--size-field, .25rem) * 8); padding-inline-start: .75rem; padding-inline-end: 1.75rem; background-image: linear-gradient(45deg, #0000 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, #0000 50%); background-position: calc(100% - 14px) calc(1px + 50%), calc(100% - 10.1px) calc(1px + 50%); background-size: 4px 4px, 4px 4px; background-repeat: no-repeat; margin: .5ch; &:focus { --input-color: var(--color-base-content); outline: 2px solid var(--input-color); outline-offset: 2px; } }} diff --git a/public/vendor/rich-text-laravel/lexxy-rich-text-laravel-flux-4459f325.css b/public/vendor/rich-text-laravel/lexxy-rich-text-laravel-flux-4459f325.css new file mode 100644 index 00000000..dbde7b93 --- /dev/null +++ b/public/vendor/rich-text-laravel/lexxy-rich-text-laravel-flux-4459f325.css @@ -0,0 +1 @@ +lexxy-editor{border:1px solid var(--color-zinc-200);border-bottom-color:color-mix(in srgb,var(--color-zinc-300) 80%,transparent);border-radius:var(--radius-lg);box-shadow:var(--shadow-xs);font-size:var(--text-base)}@media (min-width: 40rem){lexxy-editor{font-size:var(--text-sm)}}.dark lexxy-editor{border-color:#ffffff1a;box-shadow:none}lexxy-editor:focus-within{outline:none;box-shadow:0 0 0 2px var(--color-accent-foreground),0 0 0 4px var(--color-accent)}:root{--lexxy-color-ink: var(--color-zinc-900);--lexxy-color-ink-medium: var(--color-zinc-500);--lexxy-color-ink-light: var(--color-zinc-400);--lexxy-color-ink-lighter: var(--color-zinc-200);--lexxy-color-ink-lightest: var(--color-zinc-100);--lexxy-color-ink-inverted: white;--lexxy-color-accent-dark: var(--color-accent);--lexxy-color-accent-medium: var(--color-zinc-600);--lexxy-color-accent-light: var(--color-zinc-200);--lexxy-color-accent-lightest: var(--color-zinc-100);--lexxy-color-red: oklch(60% .15 27);--lexxy-color-green: oklch(60% .15 145);--lexxy-color-blue: var(--color-accent);--lexxy-color-purple: oklch(60% .15 305);--lexxy-color-code-token-att: #d73a49;--lexxy-color-code-token-comment: var(--color-zinc-400);--lexxy-color-code-token-function: #6f42c1;--lexxy-color-code-token-operator: #d73a49;--lexxy-color-code-token-property: var(--color-zinc-700);--lexxy-color-code-token-punctuation: var(--color-zinc-900);--lexxy-color-code-token-selector: #22863a;--lexxy-color-code-token-variable: #e36209;--lexxy-color-canvas: var(--lexxy-color-ink-inverted);--lexxy-color-text: var(--lexxy-color-ink);--lexxy-color-text-subtle: var(--lexxy-color-ink-medium);--lexxy-color-link: var(--color-accent);--lexxy-color-selected: var(--color-zinc-100);--lexxy-color-selected-hover: var(--color-zinc-200);--lexxy-color-selected-dark: var(--color-accent);--lexxy-color-selected-50: color-mix(in oklch, var(--lexxy-color-selected-dark) 50%, transparent);--lexxy-color-code-bg: var(--color-zinc-100);--highlight-1: rgb(136, 118, 38);--highlight-2: rgb(185, 94, 6);--highlight-3: rgb(207, 0, 0);--highlight-4: rgb(216, 28, 170);--highlight-5: rgb(144, 19, 254);--highlight-6: rgb(5, 98, 185);--highlight-7: rgb(17, 138, 15);--highlight-8: rgb(148, 82, 22);--highlight-9: rgb(102, 102, 102);--highlight-bg-1: rgba(229, 223, 6, .3);--highlight-bg-2: rgba(255, 185, 87, .3);--highlight-bg-3: rgba(255, 118, 118, .3);--highlight-bg-4: rgba(248, 137, 216, .3);--highlight-bg-5: rgba(190, 165, 255, .3);--highlight-bg-6: rgba(124, 192, 252, .3);--highlight-bg-7: rgba(140, 255, 129, .3);--highlight-bg-8: rgba(221, 170, 123, .3);--highlight-bg-9: rgba(200, 200, 200, .3);--lexxy-color-table-header-bg: var(--color-zinc-100);--lexxy-color-table-cell-border: var(--color-zinc-200);--lexxy-color-table-cell-selected: var(--color-zinc-100);--lexxy-color-table-cell-selected-border: var(--color-accent);--lexxy-color-table-cell-selected-bg: var(--color-zinc-100);--lexxy-color-table-cell-add: var(--lexxy-color-selected-50);--lexxy-color-table-cell-toggle: var(--color-zinc-100);--lexxy-color-table-cell-remove: oklch(60% .15 27 / .1);--lexxy-table-cell-add-size: 4px;--lexxy-font-base: "Instrument Sans", ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--lexxy-font-mono: ui-monospace, "Menlo", "Monaco", Consolas, monospace;--lexxy-text-small: .875rem;--lexxy-content-margin: 1rem;--lexxy-focus-ring-color: var(--color-accent);--lexxy-focus-ring-offset: -2px;--lexxy-focus-ring-size: 2px;--lexxy-toolbar-button-size: 1.5lh;--lexxy-radius: .5ch;--lexxy-shadow: 0 2px 8px rgba(0, 0, 0, .1);--lexxy-z-popup: 1000}.dark{--lexxy-color-ink: var(--color-zinc-100);--lexxy-color-ink-medium: var(--color-zinc-400);--lexxy-color-ink-light: var(--color-zinc-500);--lexxy-color-ink-lighter: var(--color-zinc-500);--lexxy-color-ink-lightest: var(--color-zinc-800);--lexxy-color-ink-inverted: var(--color-zinc-900);--lexxy-color-accent-dark: var(--color-accent);--lexxy-color-accent-medium: var(--color-zinc-400);--lexxy-color-accent-light: var(--color-zinc-700);--lexxy-color-accent-lightest: var(--color-zinc-800);--lexxy-color-blue: var(--color-accent);--lexxy-color-code-token-comment: var(--color-zinc-500);--lexxy-color-code-token-property: var(--color-zinc-300);--lexxy-color-code-token-punctuation: var(--color-zinc-100);--lexxy-color-canvas: rgba(255, 255, 255, .1);--lexxy-color-text: var(--color-zinc-100);--lexxy-color-text-subtle: var(--color-zinc-400);--lexxy-color-link: var(--color-accent);--lexxy-color-selected: var(--color-zinc-800);--lexxy-color-selected-hover: var(--color-zinc-700);--lexxy-color-selected-dark: var(--color-accent);--lexxy-color-code-bg: var(--color-zinc-800);--lexxy-color-table-header-bg: var(--color-zinc-800);--lexxy-color-table-cell-border: var(--color-zinc-700);--lexxy-color-table-cell-selected: var(--color-zinc-800);--lexxy-color-table-cell-selected-border: var(--color-accent);--lexxy-color-table-cell-selected-bg: var(--color-zinc-800);--lexxy-color-table-cell-toggle: var(--color-zinc-800);--lexxy-focus-ring-color: var(--color-accent);--lexxy-shadow: 0 2px 8px rgba(0, 0, 0, .3)}.dark .lexxy-editor__toolbar-dropdown summary~*,.dark .lexxy-prompt-menu{background-color:var(--color-zinc-800)}lexxy-editor code[data-language]{padding:1.75ch}lexxy-code-language-picker select{appearance:none;padding-inline-start:.75rem;padding-inline-end:2.5rem;height:2rem;font-size:var(--text-sm);line-height:1.125rem;border-radius:var(--radius-md);box-shadow:var(--shadow-xs);border:1px solid var(--color-zinc-200);border-bottom-color:color-mix(in srgb,var(--color-zinc-300) 80%,transparent);background-color:#fff;color:var(--color-zinc-700)}.dark lexxy-code-language-picker select{background-color:#ffffff1a;color:var(--color-zinc-300);border-color:#ffffff1a;box-shadow:none}.dark lexxy-code-language-picker select>option{background-color:var(--color-zinc-700);color:#fff} diff --git a/public/vendor/rich-text-laravel/lexxy.esm.js b/public/vendor/rich-text-laravel/lexxy.esm.js new file mode 100644 index 00000000..4562b477 --- /dev/null +++ b/public/vendor/rich-text-laravel/lexxy.esm.js @@ -0,0 +1,267 @@ +var AA=Object.create;var lc=Object.defineProperty;var wA=Object.getOwnPropertyDescriptor;var vA=Object.getOwnPropertyNames;var OA=Object.getPrototypeOf,kA=Object.prototype.hasOwnProperty;var LA=(n,e,t)=>e in n?lc(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var RA=(n,e)=>()=>(e||n((e={exports:{}}).exports,e),e.exports),Lt=(n,e)=>{for(var t in e)lc(n,t,{get:e[t],enumerable:!0})},MA=(n,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of vA(e))!kA.call(n,o)&&o!==t&&lc(n,o,{get:()=>e[o],enumerable:!(r=wA(e,o))||r.enumerable});return n};var cc=(n,e,t)=>(t=n!=null?AA(OA(n)):{},MA(e||!n||!n.__esModule?lc(t,"default",{value:n,enumerable:!0}):t,n));var nn=(n,e,t)=>(LA(n,typeof e!="symbol"?e+"":e,t),t),Tg=(n,e,t)=>{if(!e.has(n))throw TypeError("Cannot "+t)};var R=(n,e,t)=>(Tg(n,e,"read from private field"),t?t.call(n):e.get(n)),k=(n,e,t)=>{if(e.has(n))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(n):e.set(n,t)},ra=(n,e,t,r)=>(Tg(n,e,"write to private field"),r?r.call(n,t):e.set(n,t),t);var L=(n,e,t)=>(Tg(n,e,"access private method"),t);var oa=RA((ZM,uc)=>{var DA=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};var j=function(n){var e=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,t=0,r={},o={manual:n.Prism&&n.Prism.manual,disableWorkerMessageHandler:n.Prism&&n.Prism.disableWorkerMessageHandler,util:{encode:function p(m){return m instanceof s?new s(m.type,p(m.content),m.alias):Array.isArray(m)?m.map(p):m.replace(/&/g,"&").replace(/"u")return null;if(document.currentScript&&document.currentScript.tagName==="SCRIPT"&&1<2)return document.currentScript;try{throw new Error}catch(C){var p=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(C.stack)||[])[1];if(p){var m=document.getElementsByTagName("script");for(var _ in m)if(m[_].src==p)return m[_]}return null}},isActive:function(p,m,_){for(var C="no-"+m;p;){var x=p.classList;if(x.contains(m))return!0;if(x.contains(C))return!1;p=p.parentElement}return!!_}},languages:{plain:r,plaintext:r,text:r,txt:r,extend:function(p,m){var _=o.util.clone(o.languages[p]);for(var C in m)_[C]=m[C];return _},insertBefore:function(p,m,_,C){C=C||o.languages;var x=C[p],y={};for(var S in x)if(x.hasOwnProperty(S)){if(S==m)for(var b in _)_.hasOwnProperty(b)&&(y[b]=_[b]);_.hasOwnProperty(S)||(y[S]=x[S])}var N=C[p];return C[p]=y,o.languages.DFS(o.languages,function(A,O){O===N&&A!=p&&(this[A]=y)}),y},DFS:function p(m,_,C,x){x=x||{};var y=o.util.objId;for(var S in m)if(m.hasOwnProperty(S)){_.call(m,S,m[S],C||S);var b=m[S],N=o.util.type(b);N==="Object"&&!x[y(b)]?(x[y(b)]=!0,p(b,_,null,x)):N==="Array"&&!x[y(b)]&&(x[y(b)]=!0,p(b,_,S,x))}}},plugins:{},highlightAll:function(p,m){o.highlightAllUnder(document,p,m)},highlightAllUnder:function(p,m,_){var C={callback:_,container:p,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};o.hooks.run("before-highlightall",C),C.elements=Array.prototype.slice.apply(C.container.querySelectorAll(C.selector)),o.hooks.run("before-all-elements-highlight",C);for(var x=0,y;y=C.elements[x++];)o.highlightElement(y,m===!0,C.callback)},highlightElement:function(p,m,_){var C=o.util.getLanguage(p),x=o.languages[C];o.util.setLanguage(p,C);var y=p.parentElement;y&&y.nodeName.toLowerCase()==="pre"&&o.util.setLanguage(y,C);var S=p.textContent,b={element:p,language:C,grammar:x,code:S};function N(O){b.highlightedCode=O,o.hooks.run("before-insert",b),b.element.innerHTML=b.highlightedCode,o.hooks.run("after-highlight",b),o.hooks.run("complete",b),_&&_.call(b.element)}if(o.hooks.run("before-sanity-check",b),y=b.element.parentElement,y&&y.nodeName.toLowerCase()==="pre"&&!y.hasAttribute("tabindex")&&y.setAttribute("tabindex","0"),!b.code){o.hooks.run("complete",b),_&&_.call(b.element);return}if(o.hooks.run("before-highlight",b),!b.grammar){N(o.util.encode(b.code));return}if(m&&n.Worker){var A=new Worker(o.filename);A.onmessage=function(O){N(O.data)},A.postMessage(JSON.stringify({language:b.language,code:b.code,immediateClose:!0}))}else N(o.highlight(b.code,b.grammar,b.language))},highlight:function(p,m,_){var C={code:p,grammar:m,language:_};if(o.hooks.run("before-tokenize",C),!C.grammar)throw new Error('The language "'+C.language+'" has no grammar.');return C.tokens=o.tokenize(C.code,C.grammar),o.hooks.run("after-tokenize",C),s.stringify(o.util.encode(C.tokens),C.language)},tokenize:function(p,m){var _=m.rest;if(_){for(var C in _)m[C]=_[C];delete m.rest}var x=new l;return c(x,x.head,p),a(p,x,m,x.head,0),d(x)},hooks:{all:{},add:function(p,m){var _=o.hooks.all;_[p]=_[p]||[],_[p].push(m)},run:function(p,m){var _=o.hooks.all[p];if(!(!_||!_.length))for(var C=0,x;x=_[C++];)x(m)}},Token:s};n.Prism=o;function s(p,m,_,C){this.type=p,this.content=m,this.alias=_,this.length=(C||"").length|0}s.stringify=function p(m,_){if(typeof m=="string")return m;if(Array.isArray(m)){var C="";return m.forEach(function(N){C+=p(N,_)}),C}var x={type:m.type,content:p(m.content,_),tag:"span",classes:["token",m.type],attributes:{},language:_},y=m.alias;y&&(Array.isArray(y)?Array.prototype.push.apply(x.classes,y):x.classes.push(y)),o.hooks.run("wrap",x);var S="";for(var b in x.attributes)S+=" "+b+'="'+(x.attributes[b]||"").replace(/"/g,""")+'"';return"<"+x.tag+' class="'+x.classes.join(" ")+'"'+S+">"+x.content+""};function i(p,m,_,C){p.lastIndex=m;var x=p.exec(_);if(x&&C&&x[1]){var y=x[1].length;x.index+=y,x[0]=x[0].slice(y)}return x}function a(p,m,_,C,x,y){for(var S in _)if(!(!_.hasOwnProperty(S)||!_[S])){var b=_[S];b=Array.isArray(b)?b:[b];for(var N=0;N=y.reach);le+=K.value.length,K=K.next){var ie=K.value;if(m.length>p.length)return;if(!(ie instanceof s)){var pe=1,xe;if(I){if(xe=i(q,le,p,P),!xe||xe.index>=p.length)break;var ke=xe.index,ht=xe.index+xe[0].length,fe=le;for(fe+=K.value.length;ke>=fe;)K=K.next,fe+=K.value.length;if(fe-=K.value.length,le=fe,K.value instanceof s)continue;for(var Wt=K;Wt!==m.tail&&(fey.reach&&(y.reach=en);var ne=K.prev;ge&&(ne=c(m,ne,ge),le+=ge.length),u(m,ne,pe);var Ue=new s(S,O?o.tokenize(kt,O):kt,z,kt);if(K=c(m,ne,Ue),Qe&&c(m,K,Qe),pe>1){var Ve={cause:S+","+N,reach:en};a(p,m,_,K.prev,le,Ve),y&&Ve.reach>y.reach&&(y.reach=Ve.reach)}}}}}}function l(){var p={value:null,prev:null,next:null},m={value:null,prev:p,next:null};p.next=m,this.head=p,this.tail=m,this.length=0}function c(p,m,_){var C=m.next,x={value:_,prev:m,next:C};return m.next=x,C.prev=x,p.length++,x}function u(p,m,_){for(var C=m.next,x=0;x<_&&C!==p.tail;x++)C=C.next;m.next=C,C.prev=m,p.length-=x}function d(p){for(var m=[],_=p.head.next;_!==p.tail;)m.push(_.value),_=_.next;return m}if(!n.document)return n.addEventListener&&(o.disableWorkerMessageHandler||n.addEventListener("message",function(p){var m=JSON.parse(p.data),_=m.language,C=m.code,x=m.immediateClose;n.postMessage(o.highlight(C,o.languages[_],_)),x&&n.close()},!1)),o;var h=o.util.currentScript();h&&(o.filename=h.src,h.hasAttribute("data-manual")&&(o.manual=!0));function g(){o.manual||o.highlightAll()}if(!o.manual){var f=document.readyState;f==="loading"||f==="interactive"&&h&&h.defer?document.addEventListener("DOMContentLoaded",g):window.requestAnimationFrame?window.requestAnimationFrame(g):window.setTimeout(g,16)}return o}(DA);typeof uc<"u"&&uc.exports&&(uc.exports=j);typeof global<"u"&&(global.Prism=j);j.languages.markup={comment:{pattern://,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]};j.languages.markup.tag.inside["attr-value"].inside.entity=j.languages.markup.entity;j.languages.markup.doctype.inside["internal-subset"].inside=j.languages.markup;j.hooks.add("wrap",function(n){n.type==="entity"&&(n.attributes.title=n.content.replace(/&/,"&"))});Object.defineProperty(j.languages.markup.tag,"addInlined",{value:function(e,t){var r={};r["language-"+t]={pattern:/(^$)/i,lookbehind:!0,inside:j.languages[t]},r.cdata=/^$/i;var o={"included-cdata":{pattern://i,inside:r}};o["language-"+t]={pattern:/[\s\S]+/,inside:j.languages[t]};var s={};s[e]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,function(){return e}),"i"),lookbehind:!0,greedy:!0,inside:o},j.languages.insertBefore("markup","cdata",s)}});Object.defineProperty(j.languages.markup.tag,"addAttribute",{value:function(n,e){j.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+n+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[e,"language-"+e],inside:j.languages[e]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}});j.languages.html=j.languages.markup;j.languages.mathml=j.languages.markup;j.languages.svg=j.languages.markup;j.languages.xml=j.languages.extend("markup",{});j.languages.ssml=j.languages.xml;j.languages.atom=j.languages.xml;j.languages.rss=j.languages.xml;(function(n){var e=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;n.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+e.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+e.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+e.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+e.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:e,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},n.languages.css.atrule.inside.rest=n.languages.css;var t=n.languages.markup;t&&(t.tag.addInlined("style","css"),t.tag.addAttribute("style","css"))})(j);j.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/};j.languages.javascript=j.languages.extend("clike",{"class-name":[j.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/});j.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/;j.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:j.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:j.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:j.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:j.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:j.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/});j.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:j.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}});j.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}});j.languages.markup&&(j.languages.markup.tag.addInlined("script","javascript"),j.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript"));j.languages.js=j.languages.javascript;(function(){if(typeof j>"u"||typeof document>"u")return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var n="Loading\u2026",e=function(h,g){return"\u2716 Error "+h+" while fetching file: "+g},t="\u2716 Error: File does not exist or is empty",r={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},o="data-src-status",s="loading",i="loaded",a="failed",l="pre[data-src]:not(["+o+'="'+i+'"]):not(['+o+'="'+s+'"])';function c(h,g,f){var p=new XMLHttpRequest;p.open("GET",h,!0),p.onreadystatechange=function(){p.readyState==4&&(p.status<400&&p.responseText?g(p.responseText):p.status>=400?f(e(p.status,p.statusText)):f(t))},p.send(null)}function u(h){var g=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(h||"");if(g){var f=Number(g[1]),p=g[2],m=g[3];return p?m?[f,Number(m)]:[f,void 0]:[f,f]}}j.hooks.add("before-highlightall",function(h){h.selector+=", "+l}),j.hooks.add("before-sanity-check",function(h){var g=h.element;if(g.matches(l)){h.code="",g.setAttribute(o,s);var f=g.appendChild(document.createElement("CODE"));f.textContent=n;var p=g.getAttribute("data-src"),m=h.language;if(m==="none"){var _=(/\.(\w+)$/.exec(p)||[,"none"])[1];m=r[_]||_}j.util.setLanguage(f,m),j.util.setLanguage(g,m);var C=j.plugins.autoloader;C&&C.loadLanguages(m),c(p,function(x){g.setAttribute(o,i);var y=u(g.getAttribute("data-range"));if(y){var S=x.split(/\r\n?|\n/g),b=y[0],N=y[1]==null?S.length:y[1];b<0&&(b+=S.length),b=Math.max(0,Math.min(b-1,S.length)),N<0&&(N+=S.length),N=Math.max(0,Math.min(N,S.length)),x=S.slice(b,N).join(` +`),g.hasAttribute("data-start")||g.setAttribute("data-start",String(b+1))}f.textContent=x,j.highlightElement(f)},function(x){g.setAttribute(o,a),f.textContent=x})}}),j.plugins.fileHighlight={highlight:function(g){for(var f=(g||document).querySelectorAll(l),p=0,m;m=f[p++];)j.highlightElement(m)}};var d=!1;j.fileHighlight=function(){d||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),d=!0),j.plugins.fileHighlight.highlight.apply(this,arguments)}})()});var vP=cc(oa(),1);Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/};Prism.languages.markup={comment:{pattern://,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]};Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity;Prism.languages.markup.doctype.inside["internal-subset"].inside=Prism.languages.markup;Prism.hooks.add("wrap",function(n){n.type==="entity"&&(n.attributes.title=n.content.replace(/&/,"&"))});Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(e,t){var r={};r["language-"+t]={pattern:/(^$)/i,lookbehind:!0,inside:Prism.languages[t]},r.cdata=/^$/i;var o={"included-cdata":{pattern://i,inside:r}};o["language-"+t]={pattern:/[\s\S]+/,inside:Prism.languages[t]};var s={};s[e]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,function(){return e}),"i"),lookbehind:!0,greedy:!0,inside:o},Prism.languages.insertBefore("markup","cdata",s)}});Object.defineProperty(Prism.languages.markup.tag,"addAttribute",{value:function(n,e){Prism.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+n+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[e,"language-"+e],inside:Prism.languages[e]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}});Prism.languages.html=Prism.languages.markup;Prism.languages.mathml=Prism.languages.markup;Prism.languages.svg=Prism.languages.markup;Prism.languages.xml=Prism.languages.extend("markup",{});Prism.languages.ssml=Prism.languages.xml;Prism.languages.atom=Prism.languages.xml;Prism.languages.rss=Prism.languages.xml;(function(n){function e(t,r){return"___"+t.toUpperCase()+r+"___"}Object.defineProperties(n.languages["markup-templating"]={},{buildPlaceholders:{value:function(t,r,o,s){if(t.language===r){var i=t.tokenStack=[];t.code=t.code.replace(o,function(a){if(typeof s=="function"&&!s(a))return a;for(var l=i.length,c;t.code.indexOf(c=e(r,l))!==-1;)++l;return i[l]=a,c}),t.grammar=n.languages.markup}}},tokenizePlaceholders:{value:function(t,r){if(t.language!==r||!t.tokenStack)return;t.grammar=n.languages[r];var o=0,s=Object.keys(t.tokenStack);function i(a){for(var l=0;l=s.length);l++){var c=a[l];if(typeof c=="string"||c.content&&typeof c.content=="string"){var u=s[o],d=t.tokenStack[u],h=typeof c=="string"?c:c.content,g=e(r,u),f=h.indexOf(g);if(f>-1){++o;var p=h.substring(0,f),m=new n.Token(r,n.tokenize(d,t.grammar),"language-"+r,d),_=h.substring(f+g.length),C=[];p&&C.push.apply(C,i([p])),C.push(m),_&&C.push.apply(C,i([_])),typeof c=="string"?a.splice.apply(a,[l,1].concat(C)):c.content=C}}else c.content&&i(c.content)}return a}i(t.tokens)}}})})(Prism);(function(n){n.languages.ruby=n.languages.extend("clike",{comment:{pattern:/#.*|^=begin\s[\s\S]*?^=end/m,greedy:!0},"class-name":{pattern:/(\b(?:class|module)\s+|\bcatch\s+\()[\w.\\]+|\b[A-Z_]\w*(?=\s*\.\s*new\b)/,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:BEGIN|END|alias|and|begin|break|case|class|def|define_method|defined|do|each|else|elsif|end|ensure|extend|for|if|in|include|module|new|next|nil|not|or|prepend|private|protected|public|raise|redo|require|rescue|retry|return|self|super|then|throw|undef|unless|until|when|while|yield)\b/,operator:/\.{2,3}|&\.|===||[!=]?~|(?:&&|\|\||<<|>>|\*\*|[+\-*/%<>!^&|=])=?|[?:]/,punctuation:/[(){}[\].,;]/}),n.languages.insertBefore("ruby","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}});var e={pattern:/((?:^|[^\\])(?:\\{2})*)#\{(?:[^{}]|\{[^{}]*\})*\}/,lookbehind:!0,inside:{content:{pattern:/^(#\{)[\s\S]+(?=\}$)/,lookbehind:!0,inside:n.languages.ruby},delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"}}};delete n.languages.ruby.function;var t="(?:"+[/([^a-zA-Z0-9\s{(\[<=])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/\((?:[^()\\]|\\[\s\S]|\((?:[^()\\]|\\[\s\S])*\))*\)/.source,/\{(?:[^{}\\]|\\[\s\S]|\{(?:[^{}\\]|\\[\s\S])*\})*\}/.source,/\[(?:[^\[\]\\]|\\[\s\S]|\[(?:[^\[\]\\]|\\[\s\S])*\])*\]/.source,/<(?:[^<>\\]|\\[\s\S]|<(?:[^<>\\]|\\[\s\S])*>)*>/.source].join("|")+")",r=/(?:"(?:\\.|[^"\\\r\n])*"|(?:\b[a-zA-Z_]\w*|[^\s\0-\x7F]+)[?!]?|\$.)/.source;n.languages.insertBefore("ruby","keyword",{"regex-literal":[{pattern:RegExp(/%r/.source+t+/[egimnosux]{0,6}/.source),greedy:!0,inside:{interpolation:e,regex:/[\s\S]+/}},{pattern:/(^|[^/])\/(?!\/)(?:\[[^\r\n\]]+\]|\\.|[^[/\\\r\n])+\/[egimnosux]{0,6}(?=\s*(?:$|[\r\n,.;})#]))/,lookbehind:!0,greedy:!0,inside:{interpolation:e,regex:/[\s\S]+/}}],variable:/[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,symbol:[{pattern:RegExp(/(^|[^:]):/.source+r),lookbehind:!0,greedy:!0},{pattern:RegExp(/([\r\n{(,][ \t]*)/.source+r+/(?=:(?!:))/.source),lookbehind:!0,greedy:!0}],"method-definition":{pattern:/(\bdef\s+)\w+(?:\s*\.\s*\w+)?/,lookbehind:!0,inside:{function:/\b\w+$/,keyword:/^self\b/,"class-name":/^\w+/,punctuation:/\./}}}),n.languages.insertBefore("ruby","string",{"string-literal":[{pattern:RegExp(/%[qQiIwWs]?/.source+t),greedy:!0,inside:{interpolation:e,string:/[\s\S]+/}},{pattern:/("|')(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|(?!\1)[^\\#\r\n])*\1/,greedy:!0,inside:{interpolation:e,string:/[\s\S]+/}},{pattern:/<<[-~]?([a-z_]\w*)[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?[a-z_]\w*|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?/}},interpolation:e,string:/[\s\S]+/}},{pattern:/<<[-~]?'([a-z_]\w*)'[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?'[a-z_]\w*'|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?'|'$/}},string:/[\s\S]+/}}],"command-literal":[{pattern:RegExp(/%x/.source+t),greedy:!0,inside:{interpolation:e,command:{pattern:/[\s\S]+/,alias:"string"}}},{pattern:/`(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|[^\\`#\r\n])*`/,greedy:!0,inside:{interpolation:e,command:{pattern:/[\s\S]+/,alias:"string"}}}]}),delete n.languages.ruby.string,n.languages.insertBefore("ruby","number",{builtin:/\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Fixnum|Float|Hash|IO|Integer|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|Stat|String|Struct|Symbol|TMS|Thread|ThreadGroup|Time|TrueClass)\b/,constant:/\b[A-Z][A-Z0-9_]*(?:[?!]|\b)/}),n.languages.rb=n.languages.ruby})(Prism);(function(n){var e=/\/\*[\s\S]*?\*\/|\/\/.*|#(?!\[).*/,t=[{pattern:/\b(?:false|true)\b/i,alias:"boolean"},{pattern:/(::\s*)\b[a-z_]\w*\b(?!\s*\()/i,greedy:!0,lookbehind:!0},{pattern:/(\b(?:case|const)\s+)\b[a-z_]\w*(?=\s*[;=])/i,greedy:!0,lookbehind:!0},/\b(?:null)\b/i,/\b[A-Z_][A-Z0-9_]*\b(?!\s*\()/],r=/\b0b[01]+(?:_[01]+)*\b|\b0o[0-7]+(?:_[0-7]+)*\b|\b0x[\da-f]+(?:_[\da-f]+)*\b|(?:\b\d+(?:_\d+)*\.?(?:\d+(?:_\d+)*)?|\B\.\d+)(?:e[+-]?\d+)?/i,o=/|\?\?=?|\.{3}|\??->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||<<|>>|[?~]|[/^|%*&<>.+-]=?/,s=/[{}\[\](),:;]/;n.languages.php={delimiter:{pattern:/\?>$|^<\?(?:php(?=\s)|=)?/i,alias:"important"},comment:e,variable:/\$+(?:\w+\b|(?=\{))/,package:{pattern:/(namespace\s+|use\s+(?:function\s+)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,lookbehind:!0,inside:{punctuation:/\\/}},"class-name-definition":{pattern:/(\b(?:class|enum|interface|trait)\s+)\b[a-z_]\w*(?!\\)\b/i,lookbehind:!0,alias:"class-name"},"function-definition":{pattern:/(\bfunction\s+)[a-z_]\w*(?=\s*\()/i,lookbehind:!0,alias:"function"},keyword:[{pattern:/(\(\s*)\b(?:array|bool|boolean|float|int|integer|object|string)\b(?=\s*\))/i,alias:"type-casting",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|object|self|static|string)\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|never|object|self|static|string|void)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/\b(?:array(?!\s*\()|bool|float|int|iterable|mixed|object|string|void)\b/i,alias:"type-declaration",greedy:!0},{pattern:/(\|\s*)(?:false|null)\b|\b(?:false|null)(?=\s*\|)/i,alias:"type-declaration",greedy:!0,lookbehind:!0},{pattern:/\b(?:parent|self|static)(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(\byield\s+)from\b/i,lookbehind:!0},/\bclass\b/i,{pattern:/((?:^|[^\s>:]|(?:^|[^-])>|(?:^|[^:]):)\s*)\b(?:abstract|and|array|as|break|callable|case|catch|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|enum|eval|exit|extends|final|finally|fn|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|match|namespace|never|new|or|parent|print|private|protected|public|readonly|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield|__halt_compiler)\b/i,lookbehind:!0}],"argument-name":{pattern:/([(,]\s*)\b[a-z_]\w*(?=\s*:(?!:))/i,lookbehind:!0},"class-name":[{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self|\s+static))\s+|\bcatch\s*\()\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/(\|\s*)\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/\b[a-z_]\w*(?!\\)\b(?=\s*\|)/i,greedy:!0},{pattern:/(\|\s*)(?:\\?\b[a-z_]\w*)+\b/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(?:\\?\b[a-z_]\w*)+\b(?=\s*\|)/i,alias:"class-name-fully-qualified",greedy:!0,inside:{punctuation:/\\/}},{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self\b|\s+static\b))\s+|\bcatch\s*\()(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*\$)/i,alias:"type-declaration",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-declaration"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*::)/i,alias:["class-name-fully-qualified","static-context"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/([(,?]\s*)[a-z_]\w*(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-hint"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b[a-z_]\w*(?!\\)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:["class-name-fully-qualified","return-type"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:t,function:{pattern:/(^|[^\\\w])\\?[a-z_](?:[\w\\]*\w)?(?=\s*\()/i,lookbehind:!0,inside:{punctuation:/\\/}},property:{pattern:/(->\s*)\w+/,lookbehind:!0},number:r,operator:o,punctuation:s};var i={pattern:/\{\$(?:\{(?:\{[^{}]+\}|[^{}]+)\}|[^{}])+\}|(^|[^\\{])\$+(?:\w+(?:\[[^\r\n\[\]]+\]|->\w+)?)/,lookbehind:!0,inside:n.languages.php},a=[{pattern:/<<<'([^']+)'[\r\n](?:.*[\r\n])*?\1;/,alias:"nowdoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},{pattern:/<<<(?:"([^"]+)"[\r\n](?:.*[\r\n])*?\1;|([a-z_]\w*)[\r\n](?:.*[\r\n])*?\2;)/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:i}},{pattern:/`(?:\\[\s\S]|[^\\`])*`/,alias:"backtick-quoted-string",greedy:!0},{pattern:/'(?:\\[\s\S]|[^\\'])*'/,alias:"single-quoted-string",greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,alias:"double-quoted-string",greedy:!0,inside:{interpolation:i}}];n.languages.insertBefore("php","variable",{string:a,attribute:{pattern:/#\[(?:[^"'\/#]|\/(?![*/])|\/\/.*$|#(?!\[).*$|\/\*(?:[^*]|\*(?!\/))*\*\/|"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*')+\](?=\s*[a-z$#])/im,greedy:!0,inside:{"attribute-content":{pattern:/^(#\[)[\s\S]+(?=\]$)/,lookbehind:!0,inside:{comment:e,string:a,"attribute-class-name":[{pattern:/([^:]|^)\b[a-z_]\w*(?!\\)\b/i,alias:"class-name",greedy:!0,lookbehind:!0},{pattern:/([^:]|^)(?:\\?\b[a-z_]\w*)+/i,alias:["class-name","class-name-fully-qualified"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:t,number:r,operator:o,punctuation:s}},delimiter:{pattern:/^#\[|\]$/,alias:"punctuation"}}}}),n.hooks.add("before-tokenize",function(l){if(!!/<\?/.test(l.code)){var c=/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/g;n.languages["markup-templating"].buildPlaceholders(l,"php",c)}}),n.hooks.add("after-tokenize",function(l){n.languages["markup-templating"].tokenizePlaceholders(l,"php")})})(Prism);Prism.languages.go=Prism.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/});Prism.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}});delete Prism.languages.go["class-name"];(function(n){var e="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",t={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},r={bash:t,environment:{pattern:RegExp("\\$"+e),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+e),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};n.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+e),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},parameter:{pattern:/(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:r},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:t}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:r},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:r.entity}}],environment:{pattern:RegExp("\\$?"+e),alias:"constant"},variable:r.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},t.inside=n.languages.bash;for(var o=["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],s=r.variable[1].inside,i=0;i",unchanged:" ",diff:"!"};Object.keys(e).forEach(function(t){var r=e[t],o=[];/^\w+$/.test(t)||o.push(/\w+/.exec(t)[0]),t==="diff"&&o.push("bold"),n.languages.diff[t]={pattern:RegExp("^(?:["+r+`].*(?:\r +?| +|(?![\\s\\S])))+`,"m"),alias:o,inside:{line:{pattern:/(.)(?=[\s\S]).*(?:\r\n?|\n)?/,lookbehind:!0},prefix:{pattern:/[\s\S]/,alias:/\w+/.exec(t)[0]}}}}),Object.defineProperty(n.languages.diff,"PREFIXES",{value:e})})(Prism);var{entries:bC,setPrototypeOf:gC,isFrozen:IA,getPrototypeOf:$A,getOwnPropertyDescriptor:PA}=Object,{freeze:Mt,seal:pn,create:kg}=Object,{apply:Lg,construct:Rg}=typeof Reflect<"u"&&Reflect;Mt||(Mt=function(e){return e});pn||(pn=function(e){return e});Lg||(Lg=function(e,t){for(var r=arguments.length,o=new Array(r>2?r-2:0),s=2;s1?t-1:0),o=1;o1?t-1:0),o=1;o2&&arguments[2]!==void 0?arguments[2]:gc;gC&&gC(n,null);let r=e.length;for(;r--;){let o=e[r];if(typeof o=="string"){let s=t(o);s!==o&&(IA(e)||(e[r]=s),o=s)}n[o]=!0}return n}function UA(n){for(let e=0;e/gm),jA=pn(/\$\{[\w\W]*/gm),qA=pn(/^data-[\-\w.\u00B7-\uFFFF]+$/),ZA=pn(/^aria-[\-\w]+$/),SC=pn(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),JA=pn(/^(?:\w+script|data):/i),XA=pn(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),TC=pn(/^html$/i),QA=pn(/^[a-z][.\w]*(-[.\w]+)+$/i),xC=Object.freeze({__proto__:null,ARIA_ATTR:ZA,ATTR_WHITESPACE:XA,CUSTOM_ELEMENT:QA,DATA_ATTR:qA,DOCTYPE_NAME:TC,ERB_EXPR:YA,IS_ALLOWED_URI:SC,IS_SCRIPT_OR_DATA:JA,MUSTACHE_EXPR:VA,TMPLIT_EXPR:jA}),ca={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},ew=function(){return typeof window>"u"?null:window},tw=function(e,t){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let r=null,o="data-tt-policy-suffix";t&&t.hasAttribute(o)&&(r=t.getAttribute(o));let s="dompurify"+(r?"#"+r:"");try{return e.createPolicy(s,{createHTML(i){return i},createScriptURL(i){return i}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}},yC=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function NC(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ew(),e=J=>NC(J);if(e.version="3.3.1",e.removed=[],!n||!n.document||n.document.nodeType!==ca.document||!n.Element)return e.isSupported=!1,e;let{document:t}=n,r=t,o=r.currentScript,{DocumentFragment:s,HTMLTemplateElement:i,Node:a,Element:l,NodeFilter:c,NamedNodeMap:u=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:d,DOMParser:h,trustedTypes:g}=n,f=l.prototype,p=la(f,"cloneNode"),m=la(f,"remove"),_=la(f,"nextSibling"),C=la(f,"childNodes"),x=la(f,"parentNode");if(typeof i=="function"){let J=t.createElement("template");J.content&&J.content.ownerDocument&&(t=J.content.ownerDocument)}let y,S="",{implementation:b,createNodeIterator:N,createDocumentFragment:A,getElementsByTagName:O}=t,{importNode:P}=r,I=yC();e.isSupported=typeof bC=="function"&&typeof x=="function"&&b&&b.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:z,ERB_EXPR:G,TMPLIT_EXPR:q,DATA_ATTR:K,ARIA_ATTR:le,IS_SCRIPT_OR_DATA:ie,ATTR_WHITESPACE:pe,CUSTOM_ELEMENT:xe}=xC,{IS_ALLOWED_URI:ht}=xC,fe=null,Wt=ce({},[...pC,...Ag,...wg,...vg,...mC]),ke=null,kt=ce({},[..._C,...Og,...CC,...hc]),ge=Object.seal(kg(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Qe=null,en=null,ne=Object.seal(kg(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),Ue=!0,Ve=!0,Qi=!1,Vs=!0,fn=!1,Qr=!0,Cr=!1,tn=!1,ea=!1,eo=!1,to=!1,no=!1,rc=!0,J_=!1,CA="user-content-",pg=!0,ta=!1,Ys={},Un=null,mg=ce({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),X_=null,Q_=ce({},["audio","video","img","source","image","track"]),_g=null,eC=ce({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),oc="http://www.w3.org/1998/Math/MathML",sc="http://www.w3.org/2000/svg",xr="http://www.w3.org/1999/xhtml",js=xr,Cg=!1,xg=null,xA=ce({},[oc,sc,xr],Ng),ic=ce({},["mi","mo","mn","ms","mtext"]),ac=ce({},["annotation-xml"]),yA=ce({},["title","style","font","a","script"]),na=null,bA=["application/xhtml+xml","text/html"],SA="text/html",et=null,qs=null,TA=t.createElement("form"),tC=function(E){return E instanceof RegExp||E instanceof Function},yg=function(){let E=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(qs&&qs===E)){if((!E||typeof E!="object")&&(E={}),E=Gn(E),na=bA.indexOf(E.PARSER_MEDIA_TYPE)===-1?SA:E.PARSER_MEDIA_TYPE,et=na==="application/xhtml+xml"?Ng:gc,fe=Tn(E,"ALLOWED_TAGS")?ce({},E.ALLOWED_TAGS,et):Wt,ke=Tn(E,"ALLOWED_ATTR")?ce({},E.ALLOWED_ATTR,et):kt,xg=Tn(E,"ALLOWED_NAMESPACES")?ce({},E.ALLOWED_NAMESPACES,Ng):xA,_g=Tn(E,"ADD_URI_SAFE_ATTR")?ce(Gn(eC),E.ADD_URI_SAFE_ATTR,et):eC,X_=Tn(E,"ADD_DATA_URI_TAGS")?ce(Gn(Q_),E.ADD_DATA_URI_TAGS,et):Q_,Un=Tn(E,"FORBID_CONTENTS")?ce({},E.FORBID_CONTENTS,et):mg,Qe=Tn(E,"FORBID_TAGS")?ce({},E.FORBID_TAGS,et):Gn({}),en=Tn(E,"FORBID_ATTR")?ce({},E.FORBID_ATTR,et):Gn({}),Ys=Tn(E,"USE_PROFILES")?E.USE_PROFILES:!1,Ue=E.ALLOW_ARIA_ATTR!==!1,Ve=E.ALLOW_DATA_ATTR!==!1,Qi=E.ALLOW_UNKNOWN_PROTOCOLS||!1,Vs=E.ALLOW_SELF_CLOSE_IN_ATTR!==!1,fn=E.SAFE_FOR_TEMPLATES||!1,Qr=E.SAFE_FOR_XML!==!1,Cr=E.WHOLE_DOCUMENT||!1,eo=E.RETURN_DOM||!1,to=E.RETURN_DOM_FRAGMENT||!1,no=E.RETURN_TRUSTED_TYPE||!1,ea=E.FORCE_BODY||!1,rc=E.SANITIZE_DOM!==!1,J_=E.SANITIZE_NAMED_PROPS||!1,pg=E.KEEP_CONTENT!==!1,ta=E.IN_PLACE||!1,ht=E.ALLOWED_URI_REGEXP||SC,js=E.NAMESPACE||xr,ic=E.MATHML_TEXT_INTEGRATION_POINTS||ic,ac=E.HTML_INTEGRATION_POINTS||ac,ge=E.CUSTOM_ELEMENT_HANDLING||{},E.CUSTOM_ELEMENT_HANDLING&&tC(E.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(ge.tagNameCheck=E.CUSTOM_ELEMENT_HANDLING.tagNameCheck),E.CUSTOM_ELEMENT_HANDLING&&tC(E.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(ge.attributeNameCheck=E.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),E.CUSTOM_ELEMENT_HANDLING&&typeof E.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(ge.allowCustomizedBuiltInElements=E.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),fn&&(Ve=!1),to&&(eo=!0),Ys&&(fe=ce({},mC),ke=[],Ys.html===!0&&(ce(fe,pC),ce(ke,_C)),Ys.svg===!0&&(ce(fe,Ag),ce(ke,Og),ce(ke,hc)),Ys.svgFilters===!0&&(ce(fe,wg),ce(ke,Og),ce(ke,hc)),Ys.mathMl===!0&&(ce(fe,vg),ce(ke,CC),ce(ke,hc))),E.ADD_TAGS&&(typeof E.ADD_TAGS=="function"?ne.tagCheck=E.ADD_TAGS:(fe===Wt&&(fe=Gn(fe)),ce(fe,E.ADD_TAGS,et))),E.ADD_ATTR&&(typeof E.ADD_ATTR=="function"?ne.attributeCheck=E.ADD_ATTR:(ke===kt&&(ke=Gn(ke)),ce(ke,E.ADD_ATTR,et))),E.ADD_URI_SAFE_ATTR&&ce(_g,E.ADD_URI_SAFE_ATTR,et),E.FORBID_CONTENTS&&(Un===mg&&(Un=Gn(Un)),ce(Un,E.FORBID_CONTENTS,et)),E.ADD_FORBID_CONTENTS&&(Un===mg&&(Un=Gn(Un)),ce(Un,E.ADD_FORBID_CONTENTS,et)),pg&&(fe["#text"]=!0),Cr&&ce(fe,["html","head","body"]),fe.table&&(ce(fe,["tbody"]),delete Qe.tbody),E.TRUSTED_TYPES_POLICY){if(typeof E.TRUSTED_TYPES_POLICY.createHTML!="function")throw aa('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof E.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw aa('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');y=E.TRUSTED_TYPES_POLICY,S=y.createHTML("")}else y===void 0&&(y=tw(g,o)),y!==null&&typeof S=="string"&&(S=y.createHTML(""));Mt&&Mt(E),qs=E}},nC=ce({},[...Ag,...wg,...WA]),rC=ce({},[...vg,...GA]),NA=function(E){let $=x(E);(!$||!$.tagName)&&($={namespaceURI:js,tagName:"template"});let V=gc(E.tagName),$e=gc($.tagName);return xg[E.namespaceURI]?E.namespaceURI===sc?$.namespaceURI===xr?V==="svg":$.namespaceURI===oc?V==="svg"&&($e==="annotation-xml"||ic[$e]):Boolean(nC[V]):E.namespaceURI===oc?$.namespaceURI===xr?V==="math":$.namespaceURI===sc?V==="math"&&ac[$e]:Boolean(rC[V]):E.namespaceURI===xr?$.namespaceURI===sc&&!ac[$e]||$.namespaceURI===oc&&!ic[$e]?!1:!rC[V]&&(yA[V]||!nC[V]):!!(na==="application/xhtml+xml"&&xg[E.namespaceURI]):!1},Wn=function(E){sa(e.removed,{element:E});try{x(E).removeChild(E)}catch{m(E)}},Jo=function(E,$){try{sa(e.removed,{attribute:$.getAttributeNode(E),from:$})}catch{sa(e.removed,{attribute:null,from:$})}if($.removeAttribute(E),E==="is")if(eo||to)try{Wn($)}catch{}else try{$.setAttribute(E,"")}catch{}},oC=function(E){let $=null,V=null;if(ea)E=""+E;else{let qe=Eg(E,/^[\r\n\t ]+/);V=qe&&qe[0]}na==="application/xhtml+xml"&&js===xr&&(E=''+E+"");let $e=y?y.createHTML(E):E;if(js===xr)try{$=new h().parseFromString($e,na)}catch{}if(!$||!$.documentElement){$=b.createDocument(js,"template",null);try{$.documentElement.innerHTML=Cg?S:$e}catch{}}let St=$.body||$.documentElement;return E&&V&&St.insertBefore(t.createTextNode(V),St.childNodes[0]||null),js===xr?O.call($,Cr?"html":"body")[0]:Cr?$.documentElement:St},sC=function(E){return N.call(E.ownerDocument||E,E,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},bg=function(E){return E instanceof d&&(typeof E.nodeName!="string"||typeof E.textContent!="string"||typeof E.removeChild!="function"||!(E.attributes instanceof u)||typeof E.removeAttribute!="function"||typeof E.setAttribute!="function"||typeof E.namespaceURI!="string"||typeof E.insertBefore!="function"||typeof E.hasChildNodes!="function")},iC=function(E){return typeof a=="function"&&E instanceof a};function yr(J,E,$){dc(J,V=>{V.call(e,E,$,qs)})}let aC=function(E){let $=null;if(yr(I.beforeSanitizeElements,E,null),bg(E))return Wn(E),!0;let V=et(E.nodeName);if(yr(I.uponSanitizeElement,E,{tagName:V,allowedTags:fe}),Qr&&E.hasChildNodes()&&!iC(E.firstElementChild)&&Rt(/<[/\w!]/g,E.innerHTML)&&Rt(/<[/\w!]/g,E.textContent)||E.nodeType===ca.progressingInstruction||Qr&&E.nodeType===ca.comment&&Rt(/<[/\w]/g,E.data))return Wn(E),!0;if(!(ne.tagCheck instanceof Function&&ne.tagCheck(V))&&(!fe[V]||Qe[V])){if(!Qe[V]&&cC(V)&&(ge.tagNameCheck instanceof RegExp&&Rt(ge.tagNameCheck,V)||ge.tagNameCheck instanceof Function&&ge.tagNameCheck(V)))return!1;if(pg&&!Un[V]){let $e=x(E)||E.parentNode,St=C(E)||E.childNodes;if(St&&$e){let qe=St.length;for(let Gt=qe-1;Gt>=0;--Gt){let br=p(St[Gt],!0);br.__removalCount=(E.__removalCount||0)+1,$e.insertBefore(br,_(E))}}}return Wn(E),!0}return E instanceof l&&!NA(E)||(V==="noscript"||V==="noembed"||V==="noframes")&&Rt(/<\/no(script|embed|frames)/i,E.innerHTML)?(Wn(E),!0):(fn&&E.nodeType===ca.text&&($=E.textContent,dc([z,G,q],$e=>{$=ia($,$e," ")}),E.textContent!==$&&(sa(e.removed,{element:E.cloneNode()}),E.textContent=$)),yr(I.afterSanitizeElements,E,null),!1)},lC=function(E,$,V){if(rc&&($==="id"||$==="name")&&(V in t||V in TA))return!1;if(!(Ve&&!en[$]&&Rt(K,$))){if(!(Ue&&Rt(le,$))){if(!(ne.attributeCheck instanceof Function&&ne.attributeCheck($,E))){if(!ke[$]||en[$]){if(!(cC(E)&&(ge.tagNameCheck instanceof RegExp&&Rt(ge.tagNameCheck,E)||ge.tagNameCheck instanceof Function&&ge.tagNameCheck(E))&&(ge.attributeNameCheck instanceof RegExp&&Rt(ge.attributeNameCheck,$)||ge.attributeNameCheck instanceof Function&&ge.attributeNameCheck($,E))||$==="is"&&ge.allowCustomizedBuiltInElements&&(ge.tagNameCheck instanceof RegExp&&Rt(ge.tagNameCheck,V)||ge.tagNameCheck instanceof Function&&ge.tagNameCheck(V))))return!1}else if(!_g[$]){if(!Rt(ht,ia(V,pe,""))){if(!(($==="src"||$==="xlink:href"||$==="href")&&E!=="script"&&HA(V,"data:")===0&&X_[E])){if(!(Qi&&!Rt(ie,ia(V,pe,"")))){if(V)return!1}}}}}}}return!0},cC=function(E){return E!=="annotation-xml"&&Eg(E,xe)},uC=function(E){yr(I.beforeSanitizeAttributes,E,null);let{attributes:$}=E;if(!$||bg(E))return;let V={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ke,forceKeepAttr:void 0},$e=$.length;for(;$e--;){let St=$[$e],{name:qe,namespaceURI:Gt,value:br}=St,Zs=et(qe),Sg=br,gt=qe==="value"?Sg:zA(Sg);if(V.attrName=Zs,V.attrValue=gt,V.keepAttr=!0,V.forceKeepAttr=void 0,yr(I.uponSanitizeAttribute,E,V),gt=V.attrValue,J_&&(Zs==="id"||Zs==="name")&&(Jo(qe,E),gt=CA+gt),Qr&&Rt(/((--!?|])>)|<\/(style|title|textarea)/i,gt)){Jo(qe,E);continue}if(Zs==="attributename"&&Eg(gt,"href")){Jo(qe,E);continue}if(V.forceKeepAttr)continue;if(!V.keepAttr){Jo(qe,E);continue}if(!Vs&&Rt(/\/>/i,gt)){Jo(qe,E);continue}fn&&dc([z,G,q],hC=>{gt=ia(gt,hC," ")});let dC=et(E.nodeName);if(!lC(dC,Zs,gt)){Jo(qe,E);continue}if(y&&typeof g=="object"&&typeof g.getAttributeType=="function"&&!Gt)switch(g.getAttributeType(dC,Zs)){case"TrustedHTML":{gt=y.createHTML(gt);break}case"TrustedScriptURL":{gt=y.createScriptURL(gt);break}}if(gt!==Sg)try{Gt?E.setAttributeNS(Gt,qe,gt):E.setAttribute(qe,gt),bg(E)?Wn(E):fC(e.removed)}catch{Jo(qe,E)}}yr(I.afterSanitizeAttributes,E,null)},EA=function J(E){let $=null,V=sC(E);for(yr(I.beforeSanitizeShadowDOM,E,null);$=V.nextNode();)yr(I.uponSanitizeShadowNode,$,null),aC($),uC($),$.content instanceof s&&J($.content);yr(I.afterSanitizeShadowDOM,E,null)};return e.sanitize=function(J){let E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},$=null,V=null,$e=null,St=null;if(Cg=!J,Cg&&(J=""),typeof J!="string"&&!iC(J))if(typeof J.toString=="function"){if(J=J.toString(),typeof J!="string")throw aa("dirty is not a string, aborting")}else throw aa("toString is not a function");if(!e.isSupported)return J;if(tn||yg(E),e.removed=[],typeof J=="string"&&(ta=!1),ta){if(J.nodeName){let br=et(J.nodeName);if(!fe[br]||Qe[br])throw aa("root node is forbidden and cannot be sanitized in-place")}}else if(J instanceof a)$=oC(""),V=$.ownerDocument.importNode(J,!0),V.nodeType===ca.element&&V.nodeName==="BODY"||V.nodeName==="HTML"?$=V:$.appendChild(V);else{if(!eo&&!fn&&!Cr&&J.indexOf("<")===-1)return y&&no?y.createHTML(J):J;if($=oC(J),!$)return eo?null:no?S:""}$&&ea&&Wn($.firstChild);let qe=sC(ta?J:$);for(;$e=qe.nextNode();)aC($e),uC($e),$e.content instanceof s&&EA($e.content);if(ta)return J;if(eo){if(to)for(St=A.call($.ownerDocument);$.firstChild;)St.appendChild($.firstChild);else St=$;return(ke.shadowroot||ke.shadowrootmode)&&(St=P.call(r,St,!0)),St}let Gt=Cr?$.outerHTML:$.innerHTML;return Cr&&fe["!doctype"]&&$.ownerDocument&&$.ownerDocument.doctype&&$.ownerDocument.doctype.name&&Rt(TC,$.ownerDocument.doctype.name)&&(Gt=" +`+Gt),fn&&dc([z,G,q],br=>{Gt=ia(Gt,br," ")}),y&&no?y.createHTML(Gt):Gt},e.setConfig=function(){let J=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};yg(J),tn=!0},e.clearConfig=function(){qs=null,tn=!1},e.isValidAttribute=function(J,E,$){qs||yg({});let V=et(J),$e=et(E);return lC(V,$e,$)},e.addHook=function(J,E){typeof E=="function"&&sa(I[J],E)},e.removeHook=function(J,E){if(E!==void 0){let $=FA(I[J],E);return $===-1?void 0:BA(I[J],$,1)[0]}return fC(I[J])},e.removeHooks=function(J){I[J]=[]},e.removeAllHooks=function(){I=yC()},e}var fc=NC();var Xf={};Lt(Xf,{$addUpdateTag:()=>Py,$applyNodeReplacement:()=>Ma,$caretFromPoint:()=>mo,$caretRangeFromSelection:()=>mf,$cloneWithProperties:()=>Gf,$cloneWithPropertiesEphemeral:()=>Iv,$comparePointCaretNext:()=>qf,$copyNode:()=>Uf,$create:()=>Pv,$createLineBreakNode:()=>oi,$createNodeSelection:()=>vf,$createParagraphNode:()=>Or,$createPoint:()=>On,$createRangeSelection:()=>my,$createRangeSelectionFromDom:()=>cv,$createTabNode:()=>Kc,$createTextNode:()=>st,$extendCaretToRange:()=>Yf,$findMatchingParent:()=>_a,$getAdjacentChildCaret:()=>ai,$getAdjacentNode:()=>Iy,$getAdjacentSiblingOrParentSiblingCaret:()=>Gv,$getCaretInDirection:()=>_o,$getCaretRange:()=>po,$getCaretRangeInDirection:()=>Jf,$getCharacterOffsets:()=>uf,$getChildCaret:()=>$r,$getChildCaretAtIndex:()=>Jy,$getChildCaretOrSelf:()=>Vy,$getCollapsedCaretRange:()=>Yy,$getCommonAncestor:()=>Ca,$getCommonAncestorResultBranchOrder:()=>Zf,$getEditor:()=>Wf,$getNearestNodeFromDOMNode:()=>jc,$getNearestRootOrShadowRoot:()=>By,$getNodeByKey:()=>nt,$getNodeByKeyOrThrow:()=>Hy,$getNodeFromDOMNode:()=>$f,$getPreviousSelection:()=>us,$getRoot:()=>sn,$getSelection:()=>me,$getSiblingCaret:()=>dt,$getState:()=>Nc,$getStateChange:()=>Dw,$getTextContent:()=>hv,$getTextNodeOffset:()=>vn,$getTextPointCaret:()=>fo,$getTextPointCaretSlice:()=>pf,$getWritableNodeState:()=>xf,$hasAncestor:()=>Fc,$hasUpdateTag:()=>kv,$insertNodes:()=>dv,$isBlockElementNode:()=>lv,$isChildCaret:()=>wn,$isDecoratorNode:()=>Me,$isEditorState:()=>mv,$isElementNode:()=>M,$isExtendableTextPointCaret:()=>Zy,$isInlineElementOrDecoratorNode:()=>Lv,$isLeafNode:()=>wv,$isLineBreakNode:()=>es,$isNodeCaret:()=>Hv,$isNodeSelection:()=>Uc,$isParagraphNode:()=>Ty,$isRangeSelection:()=>Q,$isRootNode:()=>ut,$isRootOrShadowRoot:()=>kn,$isSiblingCaret:()=>cs,$isTabNode:()=>wf,$isTextNode:()=>Y,$isTextPointCaret:()=>Lr,$isTextPointCaretSlice:()=>Wv,$isTokenOrSegmented:()=>Er,$isTokenOrTab:()=>so,$nodesOfType:()=>Ov,$normalizeCaret:()=>En,$normalizeSelection__EXPERIMENTAL:()=>Ec,$onUpdate:()=>Fy,$parseSerializedNode:()=>pv,$removeTextFromCaretRange:()=>qy,$rewindSiblingCaret:()=>di,$selectAll:()=>vv,$setCompositionKey:()=>at,$setPointFromCaret:()=>li,$setSelection:()=>Yt,$setSelectionFromCaretRange:()=>jy,$setState:()=>Iw,$splitAtPointCaretNext:()=>jv,$splitNode:()=>Rv,$updateRangeSelectionFromCaretRange:()=>xa,ArtificialNode__DO_NOT_USE:()=>Ic,BLUR_COMMAND:()=>Zx,CAN_REDO_COMMAND:()=>Yw,CAN_UNDO_COMMAND:()=>jw,CLEAR_EDITOR_COMMAND:()=>Gw,CLEAR_HISTORY_COMMAND:()=>Vw,CLICK_COMMAND:()=>Rx,COLLABORATION_TAG:()=>ay,COMMAND_PRIORITY_CRITICAL:()=>Sv,COMMAND_PRIORITY_EDITOR:()=>Cv,COMMAND_PRIORITY_HIGH:()=>bv,COMMAND_PRIORITY_LOW:()=>xv,COMMAND_PRIORITY_NORMAL:()=>yv,CONTROLLED_TEXT_INSERTION_COMMAND:()=>ei,COPY_COMMAND:()=>Nf,CUT_COMMAND:()=>Ef,DELETE_CHARACTER_COMMAND:()=>Ea,DELETE_LINE_COMMAND:()=>wa,DELETE_WORD_COMMAND:()=>Aa,DRAGEND_COMMAND:()=>jx,DRAGOVER_COMMAND:()=>Yx,DRAGSTART_COMMAND:()=>Vx,DROP_COMMAND:()=>Gx,DecoratorNode:()=>va,ElementNode:()=>uo,FOCUS_COMMAND:()=>qx,FORMAT_ELEMENT_COMMAND:()=>Ww,FORMAT_TEXT_COMMAND:()=>ro,HISTORIC_TAG:()=>Jw,HISTORY_MERGE_TAG:()=>bc,HISTORY_PUSH_TAG:()=>Xw,INDENT_CONTENT_COMMAND:()=>Kw,INSERT_LINE_BREAK_COMMAND:()=>ga,INSERT_PARAGRAPH_COMMAND:()=>ef,INSERT_TAB_COMMAND:()=>zw,INTERNAL_$isBlock:()=>vr,IS_ALL_FORMATTING:()=>fw,IS_BOLD:()=>aw,IS_CODE:()=>dw,IS_HIGHLIGHT:()=>_f,IS_ITALIC:()=>lw,IS_STRIKETHROUGH:()=>cw,IS_SUBSCRIPT:()=>hw,IS_SUPERSCRIPT:()=>gw,IS_UNDERLINE:()=>uw,KEY_ARROW_DOWN_COMMAND:()=>Bx,KEY_ARROW_LEFT_COMMAND:()=>$x,KEY_ARROW_RIGHT_COMMAND:()=>Dx,KEY_ARROW_UP_COMMAND:()=>Fx,KEY_BACKSPACE_COMMAND:()=>zx,KEY_DELETE_COMMAND:()=>Ux,KEY_DOWN_COMMAND:()=>Mx,KEY_ENTER_COMMAND:()=>kc,KEY_ESCAPE_COMMAND:()=>Kx,KEY_MODIFIER_COMMAND:()=>Jx,KEY_SPACE_COMMAND:()=>Hx,KEY_TAB_COMMAND:()=>Wx,LineBreakNode:()=>lo,MOVE_TO_END:()=>Ix,MOVE_TO_START:()=>Px,NODE_STATE_KEY:()=>vw,OUTDENT_CONTENT_COMMAND:()=>Uw,PASTE_COMMAND:()=>bf,PASTE_TAG:()=>Qw,ParagraphNode:()=>go,REDO_COMMAND:()=>Tf,REMOVE_TEXT_COMMAND:()=>tf,RootNode:()=>ho,SELECTION_CHANGE_COMMAND:()=>yf,SELECTION_INSERT_CLIPBOARD_NODES_COMMAND:()=>Hw,SELECT_ALL_COMMAND:()=>nf,SKIP_COLLAB_TAG:()=>ev,SKIP_DOM_SELECTION_TAG:()=>cy,SKIP_SCROLL_INTO_VIEW_TAG:()=>ly,SKIP_SELECTION_FOCUS_TAG:()=>uy,TEXT_TYPE_TO_FORMAT:()=>Tt,TabNode:()=>co,TextNode:()=>Rr,UNDO_COMMAND:()=>Sf,buildImportMap:()=>Zw,configExtension:()=>Zv,createCommand:()=>re,createEditor:()=>Tv,createSharedNodeState:()=>Ax,createState:()=>Mw,declarePeerDependency:()=>Jv,defineExtension:()=>qv,flipDirection:()=>Co,getDOMOwnerDocument:()=>zf,getDOMSelection:()=>jn,getDOMSelectionFromTarget:()=>zy,getDOMTextNode:()=>is,getEditorPropertyFromDOMNode:()=>La,getNearestEditorFromDOMNode:()=>If,getRegisteredNode:()=>Mf,getRegisteredNodeOrThrow:()=>Rf,getStaticNodeConfig:()=>Da,getTextDirection:()=>Av,getTransformSetFromKlass:()=>Ey,isBlockDomNode:()=>gf,isCurrentlyReadOnlyMode:()=>ci,isDOMDocumentNode:()=>wy,isDOMNode:()=>ui,isDOMTextNode:()=>qn,isDOMUnmanaged:()=>Gy,isDocumentFragment:()=>Ky,isExactShortcutMatch:()=>Ne,isHTMLAnchorElement:()=>Mv,isHTMLElement:()=>It,isInlineDomNode:()=>Uy,isLexicalEditor:()=>Vc,isModifierMatch:()=>Dy,isSelectionCapturedInDecoratorInput:()=>Df,isSelectionWithinEditor:()=>ka,makeStepwiseIterator:()=>jf,removeFromParent:()=>io,resetRandomKey:()=>Nv,safeCast:()=>Xv,setDOMUnmanaged:()=>$v,setNodeIndentFromDOM:()=>Wy,shallowMergeConfig:()=>Qv});function D(n,...e){let t=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",n);for(let o of e)r.append("v",o);throw t.search=r.toString(),Error(`Minified Lexical error #${n}; visit ${t.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function _x(n,...e){let t=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",n);for(let o of e)r.append("v",o);t.search=r.toString(),console.warn(`Minified Lexical warning #${n}; visit ${t.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}var Ln=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,nw=Ln&&"documentMode"in document?document.documentMode:null,Nn=Ln&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),ns=Ln&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),Tc=!(!Ln||!("InputEvent"in window)||nw)&&"getTargetRanges"in new window.InputEvent("input"),ya=Ln&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),ri=Ln&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,rw=Ln&&/Android/.test(navigator.userAgent),Cx=Ln&&/^(?=.*Chrome).*/i.test(navigator.userAgent),EC=Ln&&rw&&Cx,ba=Ln&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&Nn&&!Cx;function xx(...n){let e=[];for(let t of n)if(t&&typeof t=="string")for(let[r]of t.matchAll(/\S+/g))e.push(r);return e}var ow=0,sw=1,iw=2,aw=1,lw=2,cw=4,uw=8,dw=16,hw=32,gw=64,_f=128,fw=2047,pw=1,mw=2,_w=3,Cw=4,xw=5,yw=6,Hc=ya||ri||ba?"\xA0":"\u200B",ao=` + +`,bw=ns?"\xA0":Hc,yx="\u0591-\u07FF\uFB1D-\uFDFD\uFE70-\uFEFC",bx="A-Za-z\xC0-\xD6\xD8-\xF6\xF8-\u02B8\u0300-\u0590\u0800-\u1FFF\u200E\u2C00-\uFB1C\uFE00-\uFE6F\uFEFD-\uFFFF",Sw=new RegExp("^[^"+bx+"]*["+yx+"]"),Tw=new RegExp("^[^"+yx+"]*["+bx+"]"),Tt={bold:1,capitalize:1024,code:16,highlight:_f,italic:2,lowercase:256,strikethrough:4,subscript:32,superscript:64,underline:8,uppercase:512},Nw={directionless:1,unmergeable:2},AC={center:2,end:6,justify:4,left:1,right:3,start:5},Ew={[mw]:"center",[yw]:"end",[Cw]:"justify",[pw]:"left",[_w]:"right",[xw]:"start"},Aw={normal:0,segmented:2,token:1},ww={[ow]:"normal",[iw]:"segmented",[sw]:"token"},vw="$",wC="$config";function Sx(n,e,t,r,o,s){let i=n.getFirstChild();for(;i!==null;){let a=i.__key;i.__parent===e&&(M(i)&&Sx(i,a,t,r,o,s),t.has(a)||s.delete(a),o.push(a)),i=i.getNextSibling()}}var Gg=!1,Cf=0;function Ow(n){Cf=n.timeStamp}function Mg(n,e,t){let r=n.nodeName==="BR",o=e.__lexicalLineBreak;return o&&(n===o||r&&n.previousSibling===o)||r&&Yc(n,t)!==void 0}function kw(n,e,t){let r=jn(mn(t)),o=null,s=null;r!==null&&r.anchorNode===n&&(o=r.anchorOffset,s=r.focusOffset);let i=n.nodeValue;i!==null&&Bf(e,i,o,s,!1)}function Lw(n,e,t){if(Q(n)){let r=n.anchor.getNode();if(r.is(t)&&n.format!==r.getFormat())return!1}return qn(e)&&t.isAttached()}function Rw(n,e,t,r){for(let o=n;o&&!Gy(o);o=Ra(o)){let s=Yc(o,e);if(s!==void 0){let i=nt(s,t);if(i)return Me(i)||!It(o)?void 0:[o,i]}else if(o===r)return[r,ky(t)]}}function Tx(n,e,t){Gg=!0;let r=performance.now()-Cf>100;try{rn(n,()=>{let o=me()||function(h){return h.getEditorState().read(()=>{let g=me();return g!==null?g.clone():null})}(n),s=new Map,i=n.getRootElement(),a=n._editorState,l=n._blockCursorElement,c=!1,u="";for(let h=0;h0){let b=0;for(let N=0;N0)for(let[h,g]of s)g.reconcileObservedMutation(h,n);let d=t.takeRecords();if(d.length>0){for(let h=0;h{Tx(n,e,t)})}var Vg=class{key;parse;unparse;isEqual;defaultValue;constructor(e,t){this.key=e,this.parse=t.parse.bind(t),this.unparse=(t.unparse||$w).bind(t),this.isEqual=(t.isEqual||Object.is).bind(t),this.defaultValue=this.parse(void 0)}};function Mw(n,e){return new Vg(n,e)}function Nc(n,e,t="latest"){let r=(t==="latest"?n.getLatest():n).__state;return r?r.getValue(e):e.defaultValue}function Dw(n,e,t){let r=Nc(n,t,"direct"),o=Nc(e,t,"direct");return t.isEqual(r,o)?null:[r,o]}function Iw(n,e,t){let r;if(it(),typeof t=="function"){let s=n.getLatest(),i=Nc(s,e);if(r=t(i),e.isEqual(i,r))return s}else r=t;let o=n.getWritable();return xf(o).updateFromKnown(e,r),o}function Ax(n){let e=new Map,t=new Set;for(let r=typeof n=="function"?n:n.replace;r.prototype&&r.prototype.getType!==void 0;r=Object.getPrototypeOf(r)){let{ownNodeConfig:o}=Da(r);if(o&&o.stateConfigs)for(let s of o.stateConfigs){let i;"stateConfig"in s?(i=s.stateConfig,s.flat&&t.add(i.key)):i=s,e.set(i.key,i)}}return{flatKeys:t,sharedConfigMap:e}}var Sa=class{node;knownState;unknownState;sharedNodeState;size;constructor(e,t,r=void 0,o=new Map,s=void 0){this.node=e,this.sharedNodeState=t,this.unknownState=r,this.knownState=o;let{sharedConfigMap:i}=this.sharedNodeState,a=s!==void 0?s:function(l,c,u){let d=u.size;if(c)for(let h in c){let g=l.get(h);g&&u.has(g)||d++}return d}(i,r,o);this.size=a}getValue(e){let t=this.knownState.get(e);if(t!==void 0)return t;this.sharedNodeState.sharedConfigMap.set(e.key,e);let r=e.defaultValue;if(this.unknownState&&e.key in this.unknownState){let o=this.unknownState[e.key];o!==void 0&&(r=e.parse(o)),this.updateFromKnown(e,r)}return r}getInternalState(){return[this.unknownState,this.knownState]}toJSON(){let e={...this.unknownState},t={};for(let[r,o]of this.knownState)r.isEqual(o,r.defaultValue)?delete e[r.key]:e[r.key]=r.unparse(o);for(let r of this.sharedNodeState.flatKeys)r in e&&(t[r]=e[r],delete e[r]);return vC(e)&&(t.$=e),t}getWritable(e){if(this.node===e)return this;let{sharedNodeState:t,unknownState:r}=this,o=new Map(this.knownState);return new Sa(e,t,function(s,i,a){let l;if(a)for(let[c,u]of Object.entries(a)){let d=s.get(c);d?i.has(d)||i.set(d,d.parse(u)):(l=l||{},l[c]=u)}return l}(t.sharedConfigMap,o,r),o,this.size)}updateFromKnown(e,t){let r=e.key;this.sharedNodeState.sharedConfigMap.set(r,e);let{knownState:o,unknownState:s}=this;o.has(e)||s&&r in s||(s&&(delete s[r],this.unknownState=vC(s)),this.size++),o.set(e,t)}updateFromUnknown(e,t){let r=this.sharedNodeState.sharedConfigMap.get(e);r?this.updateFromKnown(r,r.parse(t)):(this.unknownState=this.unknownState||{},e in this.unknownState||this.size++,this.unknownState[e]=t)}updateFromJSON(e){let{knownState:t}=this;for(let r of t.keys())t.set(r,r.defaultValue);if(this.size=t.size,this.unknownState=void 0,e)for(let[r,o]of Object.entries(e))this.updateFromUnknown(r,o)}};function xf(n){let e=n.getWritable(),t=e.__state?e.__state.getWritable(e):new Sa(e,wx(e));return e.__state=t,t}function wx(n){return n.__state?n.__state.sharedNodeState:Rf(Wf(),n.getType()).sharedNodeState}function vC(n){if(n)for(let e in n)return n}function $w(n){return n}function OC(n,e,t){for(let[r,o]of e.knownState){if(n.has(r.key))continue;n.add(r.key);let s=t?t.getValue(r):r.defaultValue;if(s!==o&&!r.isEqual(s,o))return!0}return!1}function kC(n,e,t){let{unknownState:r}=e,o=t?t.unknownState:void 0;if(r){for(let[s,i]of Object.entries(r))if(!n.has(s)&&(n.add(s),i!==(o?o[s]:void 0)))return!0}return!1}function LC(n,e){let t=n.__state;return t&&t.node===n?t.getWritable(e):t}function RC(n,e){let t=n.__mode,r=n.__format,o=n.__style,s=e.__mode,i=e.__format,a=e.__style,l=n.__state,c=e.__state;return(t===null||t===s)&&(r===null||r===i)&&(o===null||o===a)&&(n.__state===null||l===c||function(u,d){if(u===d)return!0;if(u&&d&&u.size!==d.size)return!1;let h=new Set;return!(u&&OC(h,u,d)||d&&OC(h,d,u)||u&&kC(h,u,d)||d&&kC(h,d,u))}(l,c))}function MC(n,e){let t=n.mergeWithSibling(e),r=Pe()._normalizedNodes;return r.add(n.__key),r.add(e.__key),t}function DC(n){let e,t,r=n;if(r.__text!==""||!r.isSimpleText()||r.isUnmergeable()){for(;(e=r.getPreviousSibling())!==null&&Y(e)&&e.isSimpleText()&&!e.isUnmergeable();){if(e.__text!==""){if(RC(e,r)){r=MC(e,r);break}break}e.remove()}for(;(t=r.getNextSibling())!==null&&Y(t)&&t.isSimpleText()&&!t.isUnmergeable();){if(t.__text!==""){if(RC(r,t)){r=MC(r,t);break}break}t.remove()}}else r.remove()}function Ec(n){return IC(n.anchor),IC(n.focus),n}function IC(n){for(;n.type==="element";){let e=n.getNode(),t=n.offset,r,o;if(t===e.getChildrenSize()?(r=e.getChildAtIndex(t-1),o=!0):(r=e.getChildAtIndex(t),o=!1),Y(r)){n.set(r.__key,o?r.getTextContentSize():0,"text",!0);break}if(!M(r))break;n.set(r.__key,o?r.getChildrenSize():0,"element",!0)}}var rs,Nt,Ta,zc,Yg,jg,os,An,qg,Na,tt="",Vn=null,Yn="",Ar="",Js=!1,Ac=!1;function wc(n,e){let t=os.get(n);if(e!==null){let r=Qg(n);r.parentNode===e&&e.removeChild(r)}if(An.has(n)||Nt._keyToDOMMap.delete(n),M(t)){let r=Oc(t,os);Zg(r,0,r.length-1,null)}t!==void 0&&Hf(Na,Ta,zc,t,"destroyed")}function Zg(n,e,t,r){let o=e;for(;o<=t;++o){let s=n[o];s!==void 0&&wc(s,r)}}function Xo(n,e){n.setProperty("text-align",e)}var Pw="40px";function vx(n,e){let t=rs.theme.indent;if(typeof t=="string"){let o=n.classList.contains(t);e>0&&!o?n.classList.add(t):e<1&&o&&n.classList.remove(t)}let r=getComputedStyle(n).getPropertyValue("--lexical-indent-base-value")||Pw;n.style.setProperty("padding-inline-start",e===0?"":`calc(${e} * ${r})`)}function Ox(n,e){let t=n.style;e===0?Xo(t,""):e===1?Xo(t,"left"):e===2?Xo(t,"center"):e===3?Xo(t,"right"):e===4?Xo(t,"justify"):e===5?Xo(t,"start"):e===6&&Xo(t,"end")}function Jg(n,e){let t=function(r){let o=r.__dir;if(o!==null)return o;if(ut(r))return null;let s=r.getParentOrThrow();return ut(s)&&s.__dir===null?"auto":null}(e);t!==null?n.dir=t:n.removeAttribute("dir")}function vc(n,e){let t=An.get(n);t===void 0&&D(60);let r=t.createDOM(rs,Nt);if(function(o,s,i){let a=i._keyToDOMMap;(function(l,c,u){let d=`__lexicalKey_${c._key}`;l[d]=u})(s,i,o),a.set(o,s)}(n,r,Nt),Y(t)?r.setAttribute("data-lexical-text","true"):Me(t)&&r.setAttribute("data-lexical-decorator","true"),M(t)){let o=t.__indent,s=t.__size;if(Jg(r,t),o!==0&&vx(r,o),s!==0){let a=s-1;Xg(Oc(t,An),t,0,a,t.getDOMSlot(r))}let i=t.__format;i!==0&&Ox(r,i),t.isInline()||kx(null,t,r),qc(t)&&(tt+=ao,Ar+=ao)}else{let o=t.getTextContent();if(Me(t)){let s=t.decorate(Nt,rs);s!==null&&Lx(n,s),r.contentEditable="false"}tt+=o,Ar+=o}return e!==null&&e.insertChild(r),Hf(Na,Ta,zc,t,"created"),r}function Xg(n,e,t,r,o){let s=tt;tt="";let i=t;for(;i<=r;++i){vc(n[i],o);let a=An.get(n[i]);a!==null&&Y(a)&&(Vn===null&&(Vn=a.getFormat()),Yn===""&&(Yn=a.getStyle()))}qc(e)&&(tt+=ao),o.element.__lexicalTextContent=tt,tt=s+tt}function $C(n,e){if(n){let t=n.__last;if(t){let r=e.get(t);if(r)return es(r)?"line-break":Me(r)&&r.isInline()?"decorator":null}return"empty"}return null}function kx(n,e,t){let r=$C(n,os),o=$C(e,An);r!==o&&e.getDOMSlot(t).setManagedLineBreak(o)}function Fw(n,e,t){var r;Vn=null,Yn="",function(o,s,i){let a=tt,l=o.__size,c=s.__size;tt="";let u=i.element;if(l===1&&c===1){let d=o.__first,h=s.__first;if(d===h)ha(d,u);else{let f=Qg(d),p=vc(h,null);try{u.replaceChild(p,f)}catch(m){if(typeof m=="object"&&m!=null){let _=`${m.toString()} Parent: ${u.tagName}, new child: {tag: ${p.tagName} key: ${h}}, old child: {tag: ${f.tagName}, key: ${d}}.`;throw new Error(_)}throw m}wc(d,null)}let g=An.get(h);Y(g)&&(Vn===null&&(Vn=g.getFormat()),Yn===""&&(Yn=g.getStyle()))}else{let d=Oc(o,os),h=Oc(s,An);if(d.length!==l&&D(227),h.length!==c&&D(228),l===0)c!==0&&Xg(h,s,0,c-1,i);else if(c===0){if(l!==0){let g=i.after==null&&i.before==null&&i.element.__lexicalLineBreak==null;Zg(d,0,l-1,g?null:u),g&&(u.textContent="")}}else(function(g,f,p,m,_,C){let x=m-1,y=_-1,S,b,N=C.getFirstChild(),A=0,O=0;for(;A<=x&&O<=y;){let z=f[A],G=p[O];if(z===G)N=Dg(ha(G,C.element)),A++,O++;else{S===void 0&&(S=new Set(f)),b===void 0&&(b=new Set(p));let K=b.has(z),le=S.has(G);if(K)if(le){let ie=as(Nt,G);ie===N?N=Dg(ha(G,C.element)):(C.withBefore(N).insertChild(ie),ha(G,C.element)),A++,O++}else vc(G,C.withBefore(N)),O++;else N=Dg(Qg(z)),wc(z,C.element),A++}let q=An.get(G);q!==null&&Y(q)&&(Vn===null&&(Vn=q.getFormat()),Yn===""&&(Yn=q.getStyle()))}let P=A>x,I=O>y;if(P&&!I){let z=p[y+1],G=z===void 0?null:Nt.getElementByKey(z);Xg(p,g,O,y,C.withBefore(G))}else I&&!P&&Zg(f,A,x,C.element)})(s,d,h,l,c,i)}qc(s)&&(tt+=ao),u.__lexicalTextContent=tt,tt=a+tt}(n,e,e.getDOMSlot(t)),r=e,Vn==null||Vn===r.__textFormat||Ac||r.setTextFormat(Vn),function(o){Yn===""||Yn===o.__textStyle||Ac||o.setTextStyle(Yn)}(e)}function Oc(n,e){let t=[],r=n.__first;for(;r!==null;){let o=e.get(r);o===void 0&&D(101),t.push(r),r=o.__next}return t}function ha(n,e){let t=os.get(n),r=An.get(n);t!==void 0&&r!==void 0||D(61);let o=Js||jg.has(n)||Yg.has(n),s=as(Nt,n);if(t===r&&!o){if(M(t)){let i=s.__lexicalTextContent;i!==void 0&&(tt+=i,Ar+=i)}else{let i=t.getTextContent();Ar+=i,tt+=i}return s}if(t!==r&&o&&Hf(Na,Ta,zc,r,"updated"),r.updateDOM(t,s,rs)){let i=vc(n,null);return e===null&&D(62),e.replaceChild(i,s),wc(n,null),i}if(M(t)&&M(r)){let i=r.__indent;(Js||i!==t.__indent)&&vx(s,i);let a=r.__format;if((Js||a!==t.__format)&&Ox(s,a),o&&(Fw(t,r,s),ut(r)||r.isInline()||kx(t,r,s)),qc(r)&&(tt+=ao,Ar+=ao),(Js||r.__dir!==t.__dir)&&(Jg(s,r),ut(r)&&!Js))for(let l of r.getChildren())M(l)&&Jg(as(Nt,l.getKey()),l)}else{let i=r.getTextContent();if(Me(r)){let a=r.decorate(Nt,rs);a!==null&&Lx(n,a)}tt+=i,Ar+=i}if(!Ac&&ut(r)&&r.__cachedText!==Ar){let i=r.getWritable();i.__cachedText=Ar,r=i}return s}function Lx(n,e){let t=Nt._pendingDecorators,r=Nt._decorators;if(t===null){if(r[n]===e)return;t=Oy(Nt)}t[n]=e}function Dg(n){let e=n.nextSibling;return e!==null&&e===Nt._blockCursorElement&&(e=e.nextSibling),e}function Bw(n,e,t,r,o,s){tt="",Ar="",Js=r===2,Nt=t,rs=t._config,Ta=t._nodes,zc=Nt._listeners.mutation,Yg=o,jg=s,os=n._nodeMap,An=e._nodeMap,Ac=e._readOnly,qg=new Map(t._keyToDOMMap);let i=new Map;return Na=i,ha("root",null),Nt=void 0,Ta=void 0,Yg=void 0,jg=void 0,os=void 0,An=void 0,rs=void 0,qg=void 0,Na=void 0,i}function Qg(n){let e=qg.get(n);return e===void 0&&D(75,n),e}function re(n){return{type:n}}var yf=re("SELECTION_CHANGE_COMMAND"),Hw=re("SELECTION_INSERT_CLIPBOARD_NODES_COMMAND"),Rx=re("CLICK_COMMAND"),Ea=re("DELETE_CHARACTER_COMMAND"),ga=re("INSERT_LINE_BREAK_COMMAND"),ef=re("INSERT_PARAGRAPH_COMMAND"),ei=re("CONTROLLED_TEXT_INSERTION_COMMAND"),bf=re("PASTE_COMMAND"),tf=re("REMOVE_TEXT_COMMAND"),Aa=re("DELETE_WORD_COMMAND"),wa=re("DELETE_LINE_COMMAND"),ro=re("FORMAT_TEXT_COMMAND"),Sf=re("UNDO_COMMAND"),Tf=re("REDO_COMMAND"),Mx=re("KEYDOWN_COMMAND"),Dx=re("KEY_ARROW_RIGHT_COMMAND"),Ix=re("MOVE_TO_END"),$x=re("KEY_ARROW_LEFT_COMMAND"),Px=re("MOVE_TO_START"),Fx=re("KEY_ARROW_UP_COMMAND"),Bx=re("KEY_ARROW_DOWN_COMMAND"),kc=re("KEY_ENTER_COMMAND"),Hx=re("KEY_SPACE_COMMAND"),zx=re("KEY_BACKSPACE_COMMAND"),Kx=re("KEY_ESCAPE_COMMAND"),Ux=re("KEY_DELETE_COMMAND"),Wx=re("KEY_TAB_COMMAND"),zw=re("INSERT_TAB_COMMAND"),Kw=re("INDENT_CONTENT_COMMAND"),Uw=re("OUTDENT_CONTENT_COMMAND"),Gx=re("DROP_COMMAND"),Ww=re("FORMAT_ELEMENT_COMMAND"),Vx=re("DRAGSTART_COMMAND"),Yx=re("DRAGOVER_COMMAND"),jx=re("DRAGEND_COMMAND"),Nf=re("COPY_COMMAND"),Ef=re("CUT_COMMAND"),nf=re("SELECT_ALL_COMMAND"),Gw=re("CLEAR_EDITOR_COMMAND"),Vw=re("CLEAR_HISTORY_COMMAND"),Yw=re("CAN_REDO_COMMAND"),jw=re("CAN_UNDO_COMMAND"),qx=re("FOCUS_COMMAND"),Zx=re("BLUR_COMMAND"),Jx=re("KEY_MODIFIER_COMMAND"),Sr=Object.freeze({}),rf=[["keydown",function(n,e){if(fa=n.timeStamp,Xx=n.key,!e.isComposing()&&!H(e,Mx,n)&&n.key!=null){if(Ig&&dx(n))return rn(e,()=>{pc(e,$g)}),Ig=!1,void($g="");if(function(t){return Ne(t,"ArrowRight",{shiftKey:"any"})}(n))H(e,Dx,n);else if(function(t){return Ne(t,"ArrowRight",Nr)}(n))H(e,Ix,n);else if(function(t){return Ne(t,"ArrowLeft",{shiftKey:"any"})}(n))H(e,$x,n);else if(function(t){return Ne(t,"ArrowLeft",Nr)}(n))H(e,Px,n);else if(function(t){return Ne(t,"ArrowUp",{altKey:"any",shiftKey:"any"})}(n))H(e,Fx,n);else if(function(t){return Ne(t,"ArrowDown",{altKey:"any",shiftKey:"any"})}(n))H(e,Bx,n);else if(function(t){return Ne(t,"Enter",{altKey:"any",ctrlKey:"any",metaKey:"any",shiftKey:!0})}(n))pa=!0,H(e,kc,n);else if(function(t){return t.key===" "}(n))H(e,Hx,n);else if(function(t){return Nn&&Ne(t,"o",{ctrlKey:!0})}(n))n.preventDefault(),pa=!0,H(e,ga,!0);else if(function(t){return Ne(t,"Enter",{altKey:"any",ctrlKey:"any",metaKey:"any"})}(n))pa=!1,H(e,kc,n);else if(function(t){return Ne(t,"Backspace",{shiftKey:"any"})||Nn&&Ne(t,"h",{ctrlKey:!0})}(n))dx(n)?H(e,zx,n):(n.preventDefault(),H(e,Ea,!0));else if(function(t){return t.key==="Escape"}(n))H(e,Kx,n);else if(function(t){return Ne(t,"Delete",{})||Nn&&Ne(t,"d",{ctrlKey:!0})}(n))(function(t){return t.key==="Delete"})(n)?H(e,Ux,n):(n.preventDefault(),H(e,Ea,!1));else if(function(t){return Ne(t,"Backspace",ux)}(n))n.preventDefault(),H(e,Aa,!0);else if(function(t){return Ne(t,"Delete",ux)}(n))n.preventDefault(),H(e,Aa,!1);else if(function(t){return Nn&&Ne(t,"Backspace",{metaKey:!0})}(n))n.preventDefault(),H(e,wa,!0);else if(function(t){return Nn&&(Ne(t,"Delete",{metaKey:!0})||Ne(t,"k",{ctrlKey:!0}))}(n))n.preventDefault(),H(e,wa,!1);else if(function(t){return Ne(t,"b",Nr)}(n))n.preventDefault(),H(e,ro,"bold");else if(function(t){return Ne(t,"u",Nr)}(n))n.preventDefault(),H(e,ro,"underline");else if(function(t){return Ne(t,"i",Nr)}(n))n.preventDefault(),H(e,ro,"italic");else if(function(t){return Ne(t,"Tab",{shiftKey:"any"})}(n))H(e,Wx,n);else if(function(t){return Ne(t,"z",Nr)}(n))n.preventDefault(),H(e,Sf,void 0);else if(function(t){return Nn?Ne(t,"z",{metaKey:!0,shiftKey:!0}):Ne(t,"y",{ctrlKey:!0})||Ne(t,"z",{ctrlKey:!0,shiftKey:!0})}(n))n.preventDefault(),H(e,Tf,void 0);else{let t=e._editorState._selection;t===null||Q(t)?hx(n)&&(n.preventDefault(),H(e,nf,n)):function(r){return Ne(r,"c",Nr)}(n)?(n.preventDefault(),H(e,Nf,n)):function(r){return Ne(r,"x",Nr)}(n)?(n.preventDefault(),H(e,Ef,n)):hx(n)&&(n.preventDefault(),H(e,nf,n))}(function(t){return t.ctrlKey||t.shiftKey||t.altKey||t.metaKey})(n)&&H(e,Jx,n)}}],["pointerdown",function(n,e){let t=n.target,r=n.pointerType;ui(t)&&r!=="touch"&&r!=="pen"&&n.button===0&&rn(e,()=>{ax(t)||(af=!0)})}],["compositionstart",function(n,e){rn(e,()=>{let t=me();if(Q(t)&&!e.isComposing()){let r=t.anchor,o=t.anchor.getNode();at(r.key),(n.timeStamp{pc(e,n.data)}):(Ig=!0,$g=n.data)}],["input",function(n,e){n.stopPropagation(),rn(e,()=>{if(It(n.target)&&ax(n.target))return;let t=me(),r=n.data,o=ry(n);if(r!=null&&Q(t)&&ty(t,o,r,n.timeStamp,!1)){ua&&(pc(e,r),ua=!1);let s=t.anchor.getNode(),i=jn(mn(e));if(i===null)return;let a=t.isBackward(),l=a?t.anchor.offset:t.focus.offset,c=a?t.focus.offset:t.anchor.offset;Tc&&!t.isCollapsed()&&Y(s)&&i.anchorNode!==null&&s.getTextContent().slice(0,l)+r+s.getTextContent().slice(l+c)===My(i.anchorNode)||H(e,ei,r);let u=r.length;ns&&u>1&&n.inputType==="insertCompositionText"&&!e.isComposing()&&(t.anchor.offset-=u),ya||ri||ba||!e.isComposing()||(fa=0,at(null))}else Ff(!1,e,r!==null?r:void 0),ua&&(pc(e,r||void 0),ua=!1);(function(){it();let s=Pe();Nx(s)})()},{event:n}),Xs=null}],["click",function(n,e){rn(e,()=>{let t=me(),r=jn(mn(e)),o=us();if(r){if(Q(t)){let s=t.anchor,i=s.getNode();if(s.type==="element"&&s.offset===0&&t.isCollapsed()&&!ut(i)&&sn().getChildrenSize()===1&&i.getTopLevelElementOrThrow().isEmpty()&&o!==null&&t.is(o))r.removeAllRanges(),t.dirty=!0;else if(n.detail===3&&!t.isCollapsed()&&i!==t.focus.getNode()){let a=_a(i,l=>M(l)&&!l.isInline());M(a)&&a.select(0)}}else if(n.pointerType==="touch"||n.pointerType==="pen"){let s=r.anchorNode;(It(s)||qn(s))&&Yt(Wc(o,r,e,n))}}H(e,Rx,n)})}],["cut",Sr],["copy",Sr],["dragstart",Sr],["dragover",Sr],["dragend",Sr],["paste",Sr],["focus",Sr],["blur",Sr],["drop",Sr]];Tc&&rf.push(["beforeinput",(n,e)=>function(t,r){let o=t.inputType,s=ry(t);o==="deleteCompositionText"||ns&&$y(r)||o!=="insertCompositionText"&&rn(r,()=>{let i=me();if(o==="deleteContentBackward"){if(i===null){let g=us();if(!Q(g))return;Yt(g.clone())}if(Q(i)){let g=i.anchor.key===i.focus.key;if(a=t.timeStamp,Xx==="MediaLast"&&a{rn(r,()=>{at(null)})},30),Q(i)){let f=i.anchor.getNode();f.markDirty(),Y(f)||D(142),ny(i,f)}}else{at(null),t.preventDefault();let f=i.anchor.getNode(),p=f.getTextContent(),m=f.canInsertTextAfter(),_=i.anchor.offset===0&&i.focus.offset===p.length,C=EC&&g&&!_&&m;if(C&&i.isCollapsed()&&(C=!Me(Iy(i.anchor,!0))),!C){H(r,Ea,!0);let x=me();EC&&Q(x)&&x.isCollapsed()&&(Qo=x,setTimeout(()=>Qo=null))}}return}}var a;if(!Q(i))return;let l=t.data;Xs!==null&&Ff(!1,r,Xs),i.dirty&&Xs===null||!i.isCollapsed()||ut(i.anchor.getNode())||s===null||i.applyDOMRange(s),Xs=null;let c=i.anchor,u=i.focus,d=c.getNode(),h=u.getNode();if(o!=="insertText"&&o!=="insertTranspose")switch(t.preventDefault(),o){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":H(r,ei,t);break;case"insertFromComposition":at(null),H(r,ei,t);break;case"insertLineBreak":at(null),H(r,ga,!1);break;case"insertParagraph":at(null),pa&&!ri?(pa=!1,H(r,ga,!1)):H(r,ef,void 0);break;case"insertFromPaste":case"insertFromPasteAsQuotation":H(r,bf,t);break;case"deleteByComposition":(function(g,f){return g!==f||M(g)||M(f)||!so(g)||!so(f)})(d,h)&&H(r,tf,t);break;case"deleteByDrag":case"deleteByCut":H(r,tf,t);break;case"deleteContent":H(r,Ea,!1);break;case"deleteWordBackward":H(r,Aa,!0);break;case"deleteWordForward":H(r,Aa,!1);break;case"deleteHardLineBackward":case"deleteSoftLineBackward":H(r,wa,!0);break;case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":H(r,wa,!1);break;case"formatStrikeThrough":H(r,ro,"strikethrough");break;case"formatBold":H(r,ro,"bold");break;case"formatItalic":H(r,ro,"italic");break;case"formatUnderline":H(r,ro,"underline");break;case"historyUndo":H(r,Sf,void 0);break;case"historyRedo":H(r,Tf,void 0)}else{if(l===` +`)t.preventDefault(),H(r,ga,!1);else if(l===ao)t.preventDefault(),H(r,ef,void 0);else if(l==null&&t.dataTransfer){let g=t.dataTransfer.getData("text/plain");t.preventDefault(),i.insertRawText(g)}else l!=null&&ty(i,s,l,t.timeStamp,!0)?(t.preventDefault(),H(r,ei,l)):Xs=l;Qx=t.timeStamp}})}(n,e)]);var fa=0,Xx=null,Qx=0,Xs=null,of=new WeakMap,Lc=new WeakMap,sf=!1,af=!1,pa=!1,ua=!1,Ig=!1,$g="",Qo=null,ey=[0,"",0,"root",0];function ty(n,e,t,r,o){let s=n.anchor,i=n.focus,a=s.getNode(),l=Pe(),c=jn(mn(l)),u=c!==null?c.anchorNode:null,d=s.key,h=l.getElementByKey(d),g=t.length;return d!==i.key||!Y(a)||(!o&&(!Tc||Qx1||(o||!Tc)&&h!==null&&!a.isComposing()&&u!==is(h)||c!==null&&e!==null&&(!e.collapsed||e.startContainer!==c.anchorNode||e.startOffset!==c.anchorOffset)||a.getFormat()!==n.format||a.getStyle()!==n.style||function(f,p){if(p.isSegmented())return!0;if(!f.isCollapsed())return!1;let m=f.anchor.offset,_=p.getParentOrThrow(),C=so(p);return m===0?!p.canInsertTextBefore()||!_.canInsertTextBefore()&&!p.isComposing()||C||function(x){let y=x.getPreviousSibling();return(Y(y)||M(y)&&y.isInline())&&!y.canInsertTextAfter()}(p):m===p.getTextContentSize()&&(!p.canInsertTextAfter()||!_.canInsertTextAfter()&&!p.isComposing()||C)}(n,a)}function PC(n,e){return qn(n)&&n.nodeValue!==null&&e!==0&&e!==n.nodeValue.length}function FC(n,e,t){let{anchorNode:r,anchorOffset:o,focusNode:s,focusOffset:i}=n;sf&&(sf=!1,PC(r,o)&&PC(s,i)&&!Qo)||rn(e,()=>{if(!t)return void Yt(null);if(!ka(e,r,s))return;let a=me();if(Qo&&Q(a)&&a.isCollapsed()){let l=a.anchor,c=Qo.anchor;(l.key===c.key&&l.offset===c.offset+1||l.offset===1&&c.getNode().is(l.getNode().getPreviousSibling()))&&(a=Qo.clone(),Yt(a))}if(Qo=null,Q(a)){let l=a.anchor,c=l.getNode();if(a.isCollapsed()){n.type==="Range"&&n.anchorNode===n.focusNode&&(a.dirty=!0);let u=mn(e).event,d=u?u.timeStamp:performance.now(),[h,g,f,p,m]=ey,_=sn(),C=e.isComposing()===!1&&_.getTextContent()==="";if(d{let l=us(),c=e.anchorNode;(It(c)||qn(c))&&Yt(Wc(l,e,t,n))}));let r=Pf(t),o=r[r.length-1],s=o._key,i=ti.get(s),a=i||o;a!==t&&FC(e,a,!1),FC(e,t,!0),t!==o?ti.set(s,t):i&&ti.delete(s)}function BC(n){n._lexicalHandled=!0}function HC(n){return n._lexicalHandled===!0}var zC=()=>{};function qw(n){let e=of.get(n);if(e===void 0)return void zC();let t=Lc.get(e);if(t===void 0)return void zC();let r=t-1;r>=0||D(164),of.delete(n),Lc.set(e,r),r===0&&e.removeEventListener("selectionchange",sy);let o=La(n);Vc(o)?(function(i){if(i._parentEditor!==null){let a=Pf(i),l=a[a.length-1]._key;ti.get(l)===i&&ti.delete(l)}else ti.delete(i._key)}(o),n.__lexicalEditor=null):o&&D(198);let s=oy(n);for(let i=0;io.__key===this.__key);if(Y(this))return r;if(Q(t)&&t.anchor.type==="element"&&t.focus.type==="element"){if(t.isCollapsed())return!1;let o=this.getParent();if(Me(this)&&this.isInline()&&o){let s=t.isBackward()?t.focus:t.anchor;if(o.is(s.getNode())&&s.offset===o.getChildrenSize()&&this.is(o.getLastChild()))return!1}}return r}getKey(){return this.__key}getIndexWithinParent(){let e=this.getParent();if(e===null)return-1;let t=e.getFirstChild(),r=0;for(;t!==null;){if(this.is(t))return r;r++,t=t.getNextSibling()}return-1}getParent(){let e=this.getLatest().__parent;return e===null?null:nt(e)}getParentOrThrow(){let e=this.getParent();return e===null&&D(66,this.__key),e}getTopLevelElement(){let e=this;for(;e!==null;){let t=e.getParent();if(kn(t))return M(e)||e===this&&Me(e)||D(194),e;e=t}return null}getTopLevelElementOrThrow(){let e=this.getTopLevelElement();return e===null&&D(67,this.__key),e}getParents(){let e=[],t=this.getParent();for(;t!==null;)e.push(t),t=t.getParent();return e}getParentKeys(){let e=[],t=this.getParent();for(;t!==null;)e.push(t.__key),t=t.getParent();return e}getPreviousSibling(){let e=this.getLatest().__prev;return e===null?null:nt(e)}getPreviousSiblings(){let e=[],t=this.getParent();if(t===null)return e;let r=t.getFirstChild();for(;r!==null&&!r.is(this);)e.push(r),r=r.getNextSibling();return e}getNextSibling(){let e=this.getLatest().__next;return e===null?null:nt(e)}getNextSiblings(){let e=[],t=this.getNextSibling();for(;t!==null;)e.push(t),t=t.getNextSibling();return e}getCommonAncestor(e){let t=M(this)?this:this.getParent(),r=M(e)?e:e.getParent(),o=t&&r?Ca(t,r):null;return o?o.commonAncestor:null}is(e){return e!=null&&this.__key===e.__key}isBefore(e){let t=Ca(this,e);return t!==null&&(t.type==="descendant"||(t.type==="branch"?Zf(t)===-1:(t.type!=="same"&&t.type!=="ancestor"&&D(279),!1)))}isParentOf(e){let t=Ca(this,e);return t!==null&&t.type==="ancestor"}getNodesBetween(e){let t=this.isBefore(e),r=[],o=new Set,s=this;for(;s!==null;){let i=s.__key;if(o.has(i)||(o.add(i),r.push(s)),s===e)break;let a=M(s)?t?s.getFirstChild():s.getLastChild():null;if(a!==null){s=a;continue}let l=t?s.getNextSibling():s.getPreviousSibling();if(l!==null){s=l;continue}let c=s.getParentOrThrow();if(o.has(c.__key)||r.push(c),c===e)break;let u=null,d=c;do{if(d===null&&D(68),u=t?d.getNextSibling():d.getPreviousSibling(),d=d.getParent(),d===null)break;u!==null||o.has(d.__key)||r.push(d)}while(u===null);s=u}return t||r.reverse(),r}isDirty(){let e=Pe()._dirtyLeaves;return e!==null&&e.has(this.__key)}getLatest(){if(Rc(this))return this;let e=nt(this.__key);return e===null&&D(113),e}getWritable(){if(Rc(this))return this;it();let e=Pr(),t=Pe(),r=e._nodeMap,o=this.__key,s=this.getLatest(),i=t._cloneNotNeeded,a=me();if(a!==null&&a.setCachedNodes(null),i.has(o))return Pc(s),s;let l=Gf(s);return i.add(o),Pc(l),r.set(o,l),l}getTextContent(){return""}getTextContentSize(){return this.getTextContent().length}createDOM(e,t){D(70)}updateDOM(e,t,r){D(71)}exportDOM(e){return{element:this.createDOM(e._config,e)}}exportJSON(){let e=this.__state?this.__state.toJSON():void 0;return{type:this.__type,version:1,...e}}static importJSON(e){D(18,this.name)}updateFromJSON(e){return function(t,r){let o=t.getWritable(),s=r.$,i=s;for(let a of wx(o).flatKeys)a in r&&(i!==void 0&&i!==s||(i={...s}),i[a]=r[a]);return(o.__state||i)&&xf(t).updateFromJSON(i),o}(this,e)}static transform(){return null}remove(e){lf(this,!0,e)}replace(e,t){it();let r=me();r!==null&&(r=r.clone()),Kg(this,e);let o=this.getLatest(),s=this.__key,i=e.__key,a=e.getWritable(),l=this.getParentOrThrow().getWritable(),c=l.__size;io(a);let u=o.getPreviousSibling(),d=o.getNextSibling(),h=o.__prev,g=o.__next,f=o.__parent;if(lf(o,!1,!0),u===null?l.__first=i:u.getWritable().__next=i,a.__prev=h,d===null?l.__last=i:d.getWritable().__prev=i,a.__next=g,a.__parent=f,l.__size=c,t&&(M(this)&&M(a)||D(139),this.getChildren().forEach(p=>{a.append(p)})),Q(r)){Yt(r);let p=r.anchor,m=r.focus;p.key===s&&GC(p,a),m.key===s&&GC(m,a)}return oo()===s&&at(i),a}insertAfter(e,t=!0){it(),Kg(this,e);let r=this.getWritable(),o=e.getWritable(),s=o.getParent(),i=me(),a=!1,l=!1;if(s!==null){let g=e.getIndexWithinParent();if(io(o),Q(i)){let f=s.__key,p=i.anchor,m=i.focus;a=p.type==="element"&&p.key===f&&p.offset===g+1,l=m.type==="element"&&m.key===f&&m.offset===g+1}}let c=this.getNextSibling(),u=this.getParentOrThrow().getWritable(),d=o.__key,h=r.__next;if(c===null?u.__last=d:c.getWritable().__prev=d,u.__size++,r.__next=d,o.__next=h,o.__prev=r.__key,o.__parent=r.__parent,t&&Q(i)){let g=this.getIndexWithinParent();Mc(i,u,g+1);let f=u.__key;a&&i.anchor.set(f,g+2,"element"),l&&i.focus.set(f,g+2,"element")}return e}insertBefore(e,t=!0){it(),Kg(this,e);let r=this.getWritable(),o=e.getWritable(),s=o.__key;io(o);let i=this.getPreviousSibling(),a=this.getParentOrThrow().getWritable(),l=r.__prev,c=this.getIndexWithinParent();i===null?a.__first=s:i.getWritable().__next=s,a.__size++,r.__prev=s,o.__prev=l,o.__next=r.__key,o.__parent=r.__parent;let u=me();return t&&Q(u)&&Mc(u,this.getParentOrThrow(),c),e}isParentRequired(){return!1}createParentElementNode(){return Or()}selectStart(){return this.selectPrevious()}selectEnd(){return this.selectNext(0,0)}selectPrevious(e,t){it();let r=this.getPreviousSibling(),o=this.getParentOrThrow();if(r===null)return o.select(0,0);if(M(r))return r.select();if(!Y(r)){let s=r.getIndexWithinParent()+1;return o.select(s,s)}return r.select(e,t)}selectNext(e,t){it();let r=this.getNextSibling(),o=this.getParentOrThrow();if(r===null)return o.select();if(M(r))return r.select(0,0);if(!Y(r)){let s=r.getIndexWithinParent();return o.select(s,s)}return r.select(e,t)}markDirty(){this.getWritable()}reconcileObservedMutation(e,t){this.markDirty()}};nn(on,"importDOM");var Jw="historic",Xw="history-push",bc="history-merge",Qw="paste",ay="collaboration",ev="skip-collab",ly="skip-scroll-into-view",cy="skip-dom-selection",uy="skip-selection-focus",lo=class extends on{static getType(){return"linebreak"}static clone(e){return new lo(e.__key)}constructor(e){super(e)}getTextContent(){return` +`}createDOM(){return document.createElement("br")}updateDOM(){return!1}isInline(){return!0}static importDOM(){return{br:e=>function(t){let r=t.parentElement;if(r!==null&&gf(r)){let o=r.firstChild;if(o===t||o.nextSibling===t&&mc(o)){let s=r.lastChild;if(s===t||s.previousSibling===t&&mc(s))return!0}}return!1}(e)||function(t){let r=t.parentElement;if(r!==null&&gf(r)){let o=r.firstChild;if(o===t||o.nextSibling===t&&mc(o))return!1;let s=r.lastChild;if(s===t||s.previousSibling===t&&mc(s))return!0}return!1}(e)?null:{conversion:tv,priority:0}}}static importJSON(e){return oi().updateFromJSON(e)}};function tv(n){return{node:oi()}}function oi(){return Ma(new lo)}function es(n){return n instanceof lo}function mc(n){return qn(n)&&/^( |\t|\r?\n)+$/.test(n.textContent||"")}function Pg(n,e){return 16&e?"code":e&_f?"mark":32&e?"sub":64&e?"sup":null}function Fg(n,e){return 1&e?"strong":2&e?"em":"span"}function dy(n,e,t,r,o){let s=r.classList,i=ni(o,"base");i!==void 0&&s.add(...i),i=ni(o,"underlineStrikethrough");let a=!1,l=8&e&&4&e;i!==void 0&&(8&t&&4&t?(a=!0,l||s.add(...i)):l&&s.remove(...i));for(let c in Tt){let u=Tt[c];if(i=ni(o,c),i!==void 0)if(t&u){if(a&&(c==="underline"||c==="strikethrough")){e&u&&s.remove(...i);continue}((e&u)===0||l&&c==="underline"||c==="strikethrough")&&s.add(...i)}else e&u&&s.remove(...i)}}function hy(n,e,t){let r=e.firstChild,o=t.isComposing(),s=n+(o?Hc:"");if(r==null)e.textContent=s;else{let i=r.nodeValue;if(i!==s)if(o||ns){let[a,l,c]=function(u,d){let h=u.length,g=d.length,f=0,p=0;for(;f({conversion:sv,priority:0}),b:()=>({conversion:rv,priority:0}),code:()=>({conversion:Tr,priority:0}),em:()=>({conversion:Tr,priority:0}),i:()=>({conversion:Tr,priority:0}),mark:()=>({conversion:Tr,priority:0}),s:()=>({conversion:Tr,priority:0}),span:()=>({conversion:nv,priority:0}),strong:()=>({conversion:Tr,priority:0}),sub:()=>({conversion:Tr,priority:0}),sup:()=>({conversion:Tr,priority:0}),u:()=>({conversion:Tr,priority:0})}}static importJSON(e){return st().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setTextContent(e.text).setFormat(e.format).setDetail(e.detail).setMode(e.mode).setStyle(e.style)}exportDOM(e){let{element:t}=super.exportDOM(e);return It(t)||D(132),t.style.whiteSpace="pre-wrap",this.hasFormat("lowercase")?t.style.textTransform="lowercase":this.hasFormat("uppercase")?t.style.textTransform="uppercase":this.hasFormat("capitalize")&&(t.style.textTransform="capitalize"),this.hasFormat("bold")&&(t=_c(t,"b")),this.hasFormat("italic")&&(t=_c(t,"i")),this.hasFormat("strikethrough")&&(t=_c(t,"s")),this.hasFormat("underline")&&(t=_c(t,"u")),{element:t}}exportJSON(){return{detail:this.getDetail(),format:this.getFormat(),mode:this.getMode(),style:this.getStyle(),text:this.getTextContent(),...super.exportJSON()}}selectionTransform(e,t){}setFormat(e){let t=this.getWritable();return t.__format=typeof e=="string"?Tt[e]:e,t}setDetail(e){let t=this.getWritable();return t.__detail=typeof e=="string"?Nw[e]:e,t}setStyle(e){let t=this.getWritable();return t.__style=e,t}toggleFormat(e){let t=$c(this.getFormat(),e,null);return this.setFormat(t)}toggleDirectionless(){let e=this.getWritable();return e.__detail^=1,e}toggleUnmergeable(){let e=this.getWritable();return e.__detail^=2,e}setMode(e){let t=Aw[e];if(this.__mode===t)return this;let r=this.getWritable();return r.__mode=t,r}setTextContent(e){if(this.__text===e)return this;let t=this.getWritable();return t.__text=e,t}select(e,t){it();let r=e,o=t,s=me(),i=this.getTextContent(),a=this.__key;if(typeof i=="string"){let l=i.length;r===void 0&&(r=l),o===void 0&&(o=l)}else r=0,o=0;if(!Q(s))return py(a,r,a,o,"text","text");{let l=oo();l!==s.anchor.key&&l!==s.focus.key||at(a),s.setTextNodeRange(this,r,this,o)}return s}selectStart(){return this.select(0,0)}selectEnd(){let e=this.getTextContentSize();return this.select(e,e)}spliceText(e,t,r,o){let s=this.getWritable(),i=s.__text,a=r.length,l=e;l<0&&(l=a+l,l<0&&(l=0));let c=me();if(o&&Q(c)){let d=e+a;c.setTextNodeRange(s,d,s,d)}let u=i.slice(0,l)+r+i.slice(l+t);return s.__text=u,s}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}splitText(...e){it();let t=this.getLatest(),r=t.getTextContent();if(r==="")return[];let o=t.__key,s=oo(),i=r.length;e.sort((A,O)=>A-O),e.push(i);let a=[],l=e.length;for(let A=0,O=0;AA&&(a.push(r.slice(A,P)),A=P)}let c=a.length;if(c===1)return[t];let u=a[0],d=t.getParent(),h,g=t.getFormat(),f=t.getStyle(),p=t.__detail,m=!1,_=null,C=null,x=me();if(Q(x)){let[A,O]=x.isBackward()?[x.focus,x.anchor]:[x.anchor,x.focus];A.type==="text"&&A.key===o&&(_=A),O.type==="text"&&O.key===o&&(C=O)}t.isSegmented()?(h=st(u),h.__format=g,h.__style=f,h.__detail=p,h.__state=LC(t,h),m=!0):h=t.setTextContent(u);let y=[h];for(let A=1;A=N&&(_.set(A.getKey(),S-N,"text"),S=N){C.set(A.getKey(),b-N,"text");break}N=O}if(d!==null){(function(P){let I=P.getPreviousSibling(),z=P.getNextSibling();I!==null&&Pc(I),z!==null&&Pc(z)})(this);let A=d.getWritable(),O=this.getIndexWithinParent();m?(A.splice(O,0,y),this.remove()):A.splice(O,1,y),Q(x)&&Mc(x,d,O,c-1)}return y}mergeWithSibling(e){let t=e===this.getPreviousSibling();t||e===this.getNextSibling()||D(50);let r=this.__key,o=e.__key,s=this.__text,i=s.length;oo()===o&&at(r);let a=me();if(Q(a)){let d=a.anchor,h=a.focus;d!==null&&d.key===o&&XC(d,t,r,e,i),h!==null&&h.key===o&&XC(h,t,r,e,i)}let l=e.__text,c=t?l+s:s+l;this.setTextContent(c);let u=this.getWritable();return e.remove(),u}isTextEntity(){return!1}};function nv(n){return{forChild:Af(n.style),node:null}}function rv(n){let e=n,t=e.style.fontWeight==="normal";return{forChild:Af(e.style,t?void 0:"bold"),node:null}}var UC=new WeakMap;function ov(n){if(!It(n))return!1;if(n.nodeName==="PRE")return!0;let e=n.style.whiteSpace;return typeof e=="string"&&e.startsWith("pre")}function sv(n){let e=n;n.parentElement===null&&D(129);let t=e.textContent||"";if(function(r){let o,s=r.parentNode,i=[r];for(;s!==null&&(o=UC.get(s))===void 0&&!ov(s);)i.push(s),s=s.parentNode;let a=o===void 0?s:o;for(let l=0;l0){/[ \t\n]$/.test(s)&&(t=t.slice(1)),o=!1;break}}o&&(t=t.slice(1))}if(t[t.length-1]===" "){let r=e,o=!0;for(;r!==null&&(r=WC(r,!0))!==null;)if((r.textContent||"").replace(/^( |\t|\r?\n)+/,"").length>0){o=!1;break}o&&(t=t.slice(0,t.length-1))}return t===""?{node:null}:{node:st(t)}}function WC(n,e){let t=n;for(;;){let r;for(;(r=e?t.nextSibling:t.previousSibling)===null;){let s=t.parentElement;if(s===null)return null;t=s}if(t=r,It(t)){let s=t.style.display;if(s===""&&!Uy(t)||s!==""&&!s.startsWith("inline"))return null}let o=t;for(;(o=e?t.firstChild:t.lastChild)!==null;)t=o;if(qn(t))return t;if(t.nodeName==="BR")return null}}var iv={code:"code",em:"italic",i:"italic",mark:"highlight",s:"strikethrough",strong:"bold",sub:"subscript",sup:"superscript",u:"underline"};function Tr(n){let e=iv[n.nodeName.toLowerCase()];return e===void 0?{node:null}:{forChild:Af(n.style,e),node:null}}function st(n=""){return Ma(new Rr(n))}function Y(n){return n instanceof Rr}function Af(n,e){let t=n.fontWeight,r=n.textDecoration.split(" "),o=t==="700"||t==="bold",s=r.includes("line-through"),i=n.fontStyle==="italic",a=r.includes("underline"),l=n.verticalAlign;return c=>(Y(c)&&(o&&!c.hasFormat("bold")&&c.toggleFormat("bold"),s&&!c.hasFormat("strikethrough")&&c.toggleFormat("strikethrough"),i&&!c.hasFormat("italic")&&c.toggleFormat("italic"),a&&!c.hasFormat("underline")&&c.toggleFormat("underline"),l!=="sub"||c.hasFormat("subscript")||c.toggleFormat("subscript"),l!=="super"||c.hasFormat("superscript")||c.toggleFormat("superscript"),e&&!c.hasFormat(e)&&c.toggleFormat(e)),c)}var co=class extends Rr{static getType(){return"tab"}static clone(e){return new co(e.__key)}constructor(e){super(" ",e),this.__detail=2}static importDOM(){return null}createDOM(e){let t=super.createDOM(e),r=ni(e.theme,"tab");return r!==void 0&&t.classList.add(...r),t}static importJSON(e){return Kc().updateFromJSON(e)}setTextContent(e){return e!==" "&&e!==""&&_x(126),super.setTextContent(" ")}spliceText(e,t,r,o){return r===""&&t===0||r===" "&&t===1||D(286),this}setDetail(e){return e!==2&&D(127),this}setMode(e){return e!=="normal"&&D(128),this}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}};function Kc(){return Ma(new co)}function wf(n){return n instanceof co}var cf=class{key;offset;type;_selection;constructor(e,t,r){this._selection=null,this.key=e,this.offset=t,this.type=r}is(e){return this.key===e.key&&this.offset===e.offset&&this.type===e.type}isBefore(e){return this.key===e.key?this.offsets&&(r=s)}else if(!M(e)){let s=e.getNextSibling();if(Y(s))t=s.__key,r=0,o="text";else{let i=e.getParent();i&&(t=i.__key,r=e.getIndexWithinParent()+1)}}n.set(t,r,o)}function GC(n,e){if(M(e)){let t=e.getLastDescendant();M(t)||Y(t)?Bg(n,t):Bg(n,e)}else Bg(n,e)}var si=class{_nodes;_cachedNodes;dirty;constructor(e){this._cachedNodes=null,this._nodes=e,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(e){this._cachedNodes=e}is(e){if(!Uc(e))return!1;let t=this._nodes,r=e._nodes;return t.size===r.size&&Array.from(t).every(o=>r.has(o))}isCollapsed(){return!1}isBackward(){return!1}getStartEndPoints(){return null}add(e){this.dirty=!0,this._nodes.add(e),this._cachedNodes=null}delete(e){this.dirty=!0,this._nodes.delete(e),this._cachedNodes=null}clear(){this.dirty=!0,this._nodes.clear(),this._cachedNodes=null}has(e){return this._nodes.has(e)}clone(){return new si(new Set(this._nodes))}extract(){return this.getNodes()}insertRawText(e){}insertText(){}insertNodes(e){let t=this.getNodes(),r=t.length,o=t[r-1],s;if(Y(o))s=o.select();else{let i=o.getIndexWithinParent()+1;s=o.getParentOrThrow().select(i,i)}s.insertNodes(e);for(let i=0;i1;){let c=o[o.length-1];if(!M(c)||l.has(c)||c.isEmpty()||a.has(c))break;o.pop()}if(o.length===0&&r.isCollapsed()){let c=En(r.anchor),u=En(r.anchor.getFlipped()),d=g=>Lr(g)?g.origin:g.getNodeAtCaret(),h=d(c)||d(u)||(r.anchor.getNodeAtCaret()?c.origin:u.origin);o.push(h)}return o}(Jf(mf(this),"next"));return ci()||(this._cachedNodes=t),t}setTextNodeRange(e,t,r,o){this.anchor.set(e.__key,t,"text"),this.focus.set(r.__key,o,"text")}getTextContent(){let e=this.getNodes();if(e.length===0)return"";let t=e[0],r=e[e.length-1],o=this.anchor,s=this.focus,i=o.isBefore(s),[a,l]=uf(this),c="",u=!0;for(let d=0;d=0;A--){let O=y[A];if(O.is(h)||M(O)&&O.isParentOf(h))break;O.isAttached()&&(!S.has(O)||O.is(x)?b||N.insertAfter(O,!1):O.remove())}if(!b){let A=C,O=null;for(;A!==null;){let P=A.getChildren(),I=P.length;(I===0||P[I-1].is(O))&&(m.delete(A.__key),O=A),A=A.getParent()}}if(so(h))if(l===g)h.select();else{let A=st(e);A.select(),h.replace(A)}else h=h.spliceText(l,g-l,e,!0),h.getTextContent()===""?h.remove():h.isComposing()&&this.anchor.type==="text"&&(this.anchor.offset-=e.length);for(let A=1;A{r.forEach(S=>{if(M(S)){let b=S.getFormatFlags(e,y);S.setTextFormat(b)}})},i=o.length;if(i===0)return this.toggleFormat(e),at(null),void s(t);let a=this.anchor,l=this.focus,c=this.isBackward(),u=c?l:a,d=c?a:l,h=0,g=o[0],f=u.type==="element"?0:u.offset;if(u.type==="text"&&f===g.getTextContentSize()&&(h=1,g=o[1],f=0),g==null)return;let p=g.getFormatFlags(e,t);s(p);let m=i-1,_=o[m],C=d.type==="text"?d.offset:_.getTextContentSize();if(g.is(_)){if(f===C)return;if(Er(g)||f===0&&C===g.getTextContentSize())g.setFormat(p);else{let y=g.splitText(f,C),S=f===0?y[0]:y[1];S.setFormat(p),u.type==="text"&&u.set(S.__key,0,"text"),d.type==="text"&&d.set(S.__key,C-f,"text")}return void(this.format=p)}f===0||Er(g)||([,g]=g.splitText(f),f=0),g.setFormat(p);let x=_.getFormatFlags(e,p);C>0&&(C===_.getTextContentSize()||Er(_)||([_]=_.splitText(C)),_.setFormat(x));for(let y=h+1;y(M(f)||Me(f))&&!f.isInline())){M(r)||D(211,t.constructor.name,t.getType());let f=Hg(this);return r.splice(f,0,e),void o.selectEnd()}let s=function(f){let p=Or(),m=null;for(let _=0;_0){let u=i.getRangeAt(0),d=this.anchor.getNode(),h=ut(d)?d:By(d);if(this.applyDOMRange(u),this.dirty=!0,!o){let g=this.getNodes(),f=[],p=!1;for(let m=0;m0)if(t){let m=f[0];M(m)?m.selectStart():m.getParentOrThrow().selectStart()}else{let m=f[f.length-1];M(m)?m.selectEnd():m.getParentOrThrow().selectEnd()}i.anchorNode===u.startContainer&&i.anchorOffset===u.startOffset||function(m){let _=m.focus,C=m.anchor,x=C.key,y=C.offset,S=C.type;C.set(_.key,_.offset,_.type,!0),_.set(x,y,S,!0)}(this)}}r==="lineboundary"&&QC(this,e,t,r,"decorators")}forwardDeletion(e,t,r){if(!r&&(e.type==="element"&&M(t)&&e.offset===t.getChildrenSize()||e.type==="text"&&e.offset===t.getTextContentSize())){let o=t.getParent(),s=t.getNextSibling()||(o===null?null:o.getNextSibling());if(M(s)&&s.isShadowRoot())return!0}return!1}deleteCharacter(e){let t=this.isCollapsed();if(this.isCollapsed()){let r=this.anchor,o=r.getNode();if(this.forwardDeletion(r,o,e))return;let s=Yf(mo(r,e?"previous":"next"));if(s.getTextSlices().every(a=>a===null||a.distance===0)){let a={type:"initial"};for(let l of s.iterNodeCarets("shadowRoot"))if(wn(l)){if(!l.origin.isInline()){if(l.origin.isShadowRoot()){if(a.type==="merge-block")break;if(M(s.anchor.origin)&&s.anchor.origin.isEmpty()){let c=En(l);xa(this,po(c,c)),s.anchor.origin.remove()}return}a.type!=="merge-next-block"&&a.type!=="merge-block"||(a={block:a.block,caret:l,type:"merge-block"})}}else{if(a.type==="merge-block")break;if(cs(l)){if(M(l.origin)){if(l.origin.isInline()){if(!l.origin.isParentOf(s.anchor.origin))break}else a={block:l.origin,type:"merge-next-block"};continue}if(Me(l.origin)){if(!l.origin.isIsolated())if(a.type==="merge-next-block"&&(l.origin.isKeyboardSelectable()||!l.origin.isInline())&&M(s.anchor.origin)&&s.anchor.origin.isEmpty()){s.anchor.origin.remove();let c=vf();c.add(l.origin.getKey()),Yt(c)}else l.origin.remove();return}break}}if(a.type==="merge-block"){let{caret:l,block:c}=a;return xa(this,po(!l.origin.isEmpty()&&c.isEmpty()?di(dt(c,l.direction)):s.anchor,l)),this.removeText()}}let i=this.focus;if(this.modify("extend",e,"character"),this.isCollapsed()){if(e&&r.offset===0&&YC(this,r.getNode()))return}else{let a=i.type==="text"?i.getNode():null;if(o=r.type==="text"?r.getNode():null,a!==null&&a.isSegmented()){let l=i.offset,c=a.getTextContentSize();if(a.is(o)||e&&l!==c||!e&&l!==0)return void jC(a,e,l)}else if(o!==null&&o.isSegmented()){let l=r.offset,c=o.getTextContentSize();if(o.is(a)||e&&l!==0||!e&&l!==c)return void jC(o,e,l)}(function(l,c){let u=l.anchor,d=l.focus,h=u.getNode(),g=d.getNode();if(h===g&&u.type==="text"&&d.type==="text"){let f=u.offset,p=d.offset,m=f{try{let n=new RegExp("\\p{Emoji}","u"),e=n.test.bind(n);if(e("\u2764\uFE0F")&&e("#\uFE0F\u20E3")&&e("\u{1F44D}"))return e}catch{}return()=>!1})();function jC(n,e,t){let r=n,o=r.getTextContent().split(/(?=\s)/g),s=o.length,i=0,a=0;for(let c=0;ct||u){o.splice(c,1),u&&(a=void 0);break}}let l=o.join("").trim();l===""?r.remove():(r.setTextContent(l),r.select(a,a))}function qC(n,e,t,r){let o,s=e;if(It(n)){let i=!1,a=n.childNodes,l=a.length,c=r._blockCursorElement;s===l&&(i=!0,s=l-1);let u=a[s],d=!1;if(u===c)u=a[s+1],d=!0;else if(c!==null){let h=c.parentNode;n===h&&e>Array.prototype.indexOf.call(h.children,c)&&s--}if(o=Qs(u),Y(o))s=vn(o,i?"next":"previous");else{let h=Qs(n);if(h===null)return null;if(M(h)){let g=r.getElementByKey(h.getKey());g===null&&D(214),[h,s]=h.getDOMSlot(g).resolveChildIndex(h,g,n,e),M(h)||D(215),i&&s>=h.getChildrenSize()&&(s=Math.max(0,h.getChildrenSize()-1));let p=h.getChildAtIndex(s);if(M(p)&&function(m,_,C){let x=m.getParent();return C===null||x===null||!x.canBeEmpty()||x!==C.getNode()}(p,0,t)){let m=i?p.getLastDescendant():p.getFirstDescendant();m===null?h=p:(p=m,h=M(p)?p:p.getParentOrThrow()),s=0}Y(p)?(o=p,h=null,s=vn(p,i?"next":"previous")):p!==h&&i&&!d&&(M(h)||D(216),s=Math.min(h.getChildrenSize(),s+1))}else{let g=h.getIndexWithinParent();s=e===0&&Me(h)&&Qs(n)===h?g:g+1,h=h.getParentOrThrow()}if(M(h))return On(h.__key,s,"element")}}else o=Qs(n);return Y(o)?On(o.__key,vn(o,s,"clamp"),"text"):null}function ZC(n,e,t){let r=n.offset,o=n.getNode();if(r===0){let s=o.getPreviousSibling(),i=o.getParent();if(e){if((t||!e)&&s===null&&M(i)&&i.isInline()){let a=i.getPreviousSibling();Y(a)&&n.set(a.__key,a.getTextContent().length,"text")}}else M(s)&&!t&&s.isInline()?n.set(s.__key,s.getChildrenSize(),"element"):Y(s)&&n.set(s.__key,s.getTextContent().length,"text")}else if(r===o.getTextContent().length){let s=o.getNextSibling(),i=o.getParent();if(e&&M(s)&&s.isInline())n.set(s.__key,0,"element");else if((t||e)&&s===null&&M(i)&&i.isInline()&&!i.canInsertTextAfter()){let a=i.getNextSibling();Y(a)&&n.set(a.__key,0,"text")}}}function gy(n,e,t){if(n.type==="text"&&e.type==="text"){let r=n.isBefore(e),o=n.is(e);ZC(n,r,o),ZC(e,!r,o),o&&e.set(n.key,n.offset,n.type);let s=Pe();if(s.isComposing()&&s._compositionKey!==n.key&&Q(t)){let i=t.anchor,a=t.focus;n.set(i.key,i.offset,i.type,!0),e.set(a.key,a.offset,a.type,!0)}}}function fy(n,e,t,r,o,s){if(n===null||t===null||!ka(o,n,t))return null;let i=qC(n,e,Q(s)?s.anchor:null,o);if(i===null)return null;let a=qC(t,r,Q(s)?s.focus:null,o);if(a===null)return null;if(i.type==="element"&&a.type==="element"){let l=Qs(n),c=Qs(t);if(Me(l)&&Me(c))return null}return gy(i,a,s),[i,a]}function lv(n){return M(n)&&!n.isInline()}function py(n,e,t,r,o,s){let i=Pr(),a=new Mr(On(n,e,o),On(t,r,s),0,"");return a.dirty=!0,i._selection=a,a}function my(){let n=On("root",0,"element"),e=On("root",0,"element");return new Mr(n,e,0,"")}function vf(){return new si(new Set)}function cv(n,e){return Wc(null,n,e,null)}function Wc(n,e,t,r){let o=t._window;if(o===null)return null;let s=r||o.event,i=s?s.type:void 0,a=i==="selectionchange",l=!Gg&&(a||i==="beforeinput"||i==="compositionstart"||i==="compositionend"||i==="click"&&s&&s.detail===3||i==="drop"||i===void 0),c,u,d,h;if(Q(n)&&!l)return n.clone();if(e===null)return null;if(c=e.anchorNode,u=e.focusNode,d=e.anchorOffset,h=e.focusOffset,(a||i===void 0)&&Q(n)&&!ka(t,c,u))return n.clone();let g=fy(c,d,u,h,t,n);if(g===null)return null;let[f,p]=g;return new Mr(f,p,Q(n)?n.format:0,Q(n)?n.style:"")}function me(){return Pr()._selection}function us(){return Pe()._editorState._selection}function Mc(n,e,t,r=1){let o=n.anchor,s=n.focus,i=o.getNode(),a=s.getNode();if(!e.is(i)&&!e.is(a))return;let l=e.__key;if(n.isCollapsed()){let c=o.offset;if(t<=c&&r>0||t0||t0||t=a,c=l?s.getChildAtIndex(a-1):s.getChildAtIndex(t);if(Y(c)){let u=0;l&&(u=c.getTextContentSize()),e.set(c.__key,u,"text"),r.set(c.__key,u,"text")}return}if(M(s)){let a=s.getChildrenSize(),l=t>=a,c=l?s.getChildAtIndex(a-1):s.getChildAtIndex(t);if(Y(c)){let u=0;l&&(u=c.getTextContentSize()),e.set(c.__key,u,"text")}}if(M(i)){let a=i.getChildrenSize(),l=o>=a,c=l?i.getChildAtIndex(a-1):i.getChildAtIndex(o);if(Y(c)){let u=0;l&&(u=c.getTextContentSize()),r.set(c.__key,u,"text")}}}function Dc(n,e,t,r,o){let s=null,i=0,a=null;r!==null?(s=r.__key,Y(r)?(i=r.getTextContentSize(),a="text"):M(r)&&(i=r.getChildrenSize(),a="element")):o!==null&&(s=o.__key,Y(o)?a="text":M(o)&&(a="element")),s!==null&&a!==null?n.set(s,i,a):(i=e.getIndexWithinParent(),i===-1&&(i=t.getChildrenSize()),n.set(t.__key,i,"element"))}function XC(n,e,t,r,o){n.type==="text"?n.set(t,n.offset+(e?0:o),"text"):n.offset>r.getIndexWithinParent()&&n.set(n.key,n.offset-1,"element")}function _y(n,e,t,r,o){try{n.setBaseAndExtent(e,t,r,o)}catch{}}function uv(n,e,t,r,o,s,i){let a=r.anchorNode,l=r.focusNode,c=r.anchorOffset,u=r.focusOffset,d=document.activeElement;if(o.has(ay)&&d!==s||d!==null&&Df(d))return;if(!Q(e))return void(n!==null&&ka(t,a,l)&&r.removeAllRanges());let h=e.anchor,g=e.focus,f=h.key,p=g.key,m=as(t,f),_=as(t,p),C=h.offset,x=g.offset,y=e.format,S=e.style,b=e.isCollapsed(),N=m,A=_,O=!1;if(h.type==="text"){N=is(m);let K=h.getNode();O=K.getFormat()!==y||K.getStyle()!==S}else Q(n)&&n.anchor.type==="text"&&(O=!0);var P,I,z,G,q;if(g.type==="text"&&(A=is(_)),N!==null&&A!==null&&(b&&(n===null||O||Q(n)&&(n.format!==y||n.style!==S))&&(P=y,I=S,z=C,G=f,q=performance.now(),ey=[P,I,z,G,q]),c!==C||u!==x||a!==N||l!==A||r.type==="Range"&&b||(d!==null&&s.contains(d)||o.has(uy)||s.focus({preventScroll:!0}),h.type==="element"))){if(_y(r,N,C,A,x),!o.has(ly)&&e.isCollapsed()&&s!==null&&s===document.activeElement){let K=Q(e)&&e.anchor.type==="element"?N.childNodes[C]||null:r.rangeCount>0?r.getRangeAt(0):null;if(K!==null){let le;if(K instanceof Text){let ie=document.createRange();ie.selectNode(K),le=ie.getBoundingClientRect()}else le=K.getBoundingClientRect();(function(ie,pe,xe){let ht=zf(xe),fe=Kf(ht);if(ht===null||fe===null)return;let{top:Wt,bottom:ke}=pe,kt=0,ge=0,Qe=xe;for(;Qe!==null;){let en=Qe===ht.body;if(en)kt=0,ge=mn(ie).innerHeight;else{let Ue=Qe.getBoundingClientRect();kt=Ue.top,ge=Ue.bottom}let ne=0;if(Wtge&&(ne=ke-ge),ne!==0)if(en)fe.scrollBy(0,ne);else{let Ue=Qe.scrollTop;Qe.scrollTop+=ne;let Ve=Qe.scrollTop-Ue;Wt-=Ve,ke-=Ve}if(en)break;Qe=Ra(Qe)}})(t,le,s)}}sf=!0}}function dv(n){let e=me()||us();e===null&&(e=sn().selectEnd()),e.insertNodes(n)}function hv(){let n=me();return n===null?"":n.getTextContent()}function Hg(n){let e=n;n.isCollapsed()||e.removeText();let t=me();Q(t)&&(e=t),Q(e)||D(161);let r=e.anchor,o=r.getNode(),s=r.offset;for(;!vr(o);){let i=o;if([o,s]=gv(o,s),i.is(o))break}return s}function gv(n,e){let t=n.getParent();if(!t){let o=Or();return sn().append(o),o.select(),[sn(),0]}if(Y(n)){let o=n.splitText(e);if(o.length===0)return[t,n.getIndexWithinParent()];let s=e===0?0:1;return[t,o[0].getIndexWithinParent()+s]}if(!M(n)||e===0)return[t,n.getIndexWithinParent()];let r=n.getChildAtIndex(e);if(r){let o=new Mr(On(n.__key,e,"element"),On(n.__key,e,"element"),0,""),s=n.insertNewAfter(o);s&&s.append(r,...r.getNextSiblings())}return[t,n.getIndexWithinParent()+1]}function QC(n,e,t,r,o="decorators-and-blocks"){if(e==="move"&&r==="character"&&!n.isCollapsed()){let[u,d]=t===n.isBackward()?[n.focus,n.anchor]:[n.anchor,n.focus];return d.set(u.key,u.offset,u.type),!0}let s=mo(n.focus,t?"previous":"next"),i=r==="lineboundary",a=e==="move",l=s,c=o==="decorators-and-blocks";if(!Zy(l)){for(let u of l){c=!1;let{origin:d}=u;if(!Me(d)||d.isIsolated()||(l=u,!i||!d.isInline()))break}if(c)for(let u of Yf(s).iterNodeCarets(e==="extend"?"shadowRoot":"root")){if(wn(u))u.origin.isInline()||(l=u);else{if(M(u.origin))continue;Me(u.origin)&&!u.origin.isInline()&&(l=u)}break}}if(l===s)return!1;if(a&&!i&&Me(l.origin)&&l.origin.isKeyboardSelectable()){let u=vf();return u.add(l.origin.getKey()),Yt(u),!0}return l=En(l),a&&li(n.anchor,l),li(n.focus,l),c||!i}var lt=null,ct=null,Vt=!1,zg=!1,Sc=0,ex={characterData:!0,childList:!0,subtree:!0};function ci(){return Vt||lt!==null&<._readOnly}function it(){Vt&&D(13)}function Cy(){Sc>99&&D(14)}function Pr(){return lt===null&&D(195,xy()),lt}function Pe(){return ct===null&&D(196,xy()),ct}function xy(){let n=0,e=new Set,t=kr.version;if(typeof window<"u")for(let o of document.querySelectorAll("[contenteditable]")){let s=La(o);if(Vc(s))n++;else if(s){let i=String(s.constructor.version||"<0.17.1");i===t&&(i+=" (separately built, likely a bundler configuration issue)"),e.add(i)}}let r=` Detected on the page: ${n} compatible editor(s) with version ${t}`;return e.size&&(r+=` and incompatible editors with versions ${Array.from(e).join(", ")}`),r}function fv(){return ct}function tx(n,e,t){let r=e.__type,o=Rf(n,r),s=t.get(r);s===void 0&&(s=Array.from(o.transforms),t.set(r,s));let i=s.length;for(let a=0;a0||z>0;){if(P>0){x._dirtyLeaves=new Set;for(let G of O){let q=b.get(G);Y(q)&&q.isAttached()&&q.isSimpleText()&&!q.isUnmergeable()&&DC(q),q!==void 0&&nx(q,N)&&tx(x,q,A),y.add(G)}if(O=x._dirtyLeaves,P=O.size,P>0){Sc++;continue}}x._dirtyLeaves=new Set,x._dirtyElements=new Map,I.delete("root")&&I.set("root",!0);for(let G of I){let q=G[0],K=G[1];if(S.set(q,K),!K)continue;let le=b.get(q);le!==void 0&&nx(le,N)&&tx(x,le,A)}O=x._dirtyLeaves,P=O.size,I=x._dirtyElements,z=I.size,Sc++}x._dirtyLeaves=y,x._dirtyElements=S}(l,n),ox(n),function(C,x,y,S){let b=C._nodeMap,N=x._nodeMap,A=[];for(let[O]of S){let P=N.get(O);P!==void 0&&(P.isAttached()||(M(P)&&Sx(P,O,b,N,A,S),b.has(O)||S.delete(O),A.push(O)))}for(let O of A)N.delete(O);for(let O of y){let P=N.get(O);P===void 0||P.isAttached()||(b.has(O)||y.delete(O),N.delete(O))}}(a,l,n._dirtyLeaves,n._dirtyElements)),m!==n._compositionKey&&(l._flushSync=!0);let _=l._selection;if(Q(_)){let C=l._nodeMap,x=_.anchor.key,y=_.focus.key;C.get(x)!==void 0&&C.get(y)!==void 0||D(19)}else Uc(_)&&_._nodes.size===0&&(l._selection=null)}catch(m){return m instanceof Error&&n._onError(m),n._pendingEditorState=a,n._dirtyType=2,n._cloneNotNeeded.clear(),n._dirtyLeaves=new Set,n._dirtyElements.clear(),void wr(n)}finally{lt=u,Vt=d,ct=h,n._updating=g,Sc=0}n._dirtyType!==0||n._deferred.length>0||function(m,_){let C=_.getEditorState()._selection,x=m._selection;if(x!==null){if(x.dirty||!x.is(C))return!0}else if(C!==null)return!0;return!1}(l,n)?l._flushSync?(l._flushSync=!1,wr(n)):c&&Ev(()=>{wr(n)}):(l._flushSync=!1,c&&(r.clear(),n._deferred=[],n._pendingEditorState=null))}function rn(n,e,t){ct===n&&t===void 0?e():Gc(n,e,t)}var ts=class{element;before;after;constructor(e,t,r){this.element=e,this.before=t||null,this.after=r||null}withBefore(e){return new ts(this.element,e,this.after)}withAfter(e){return new ts(this.element,this.before,e)}withElement(e){return this.element===e?this:new ts(e,this.before,this.after)}insertChild(e){let t=this.before||this.getManagedLineBreak();return t!==null&&t.parentElement!==this.element&&D(222),this.element.insertBefore(e,t),this}removeChild(e){return e.parentElement!==this.element&&D(223),this.element.removeChild(e),this}replaceChild(e,t){return t.parentElement!==this.element&&D(224),this.element.replaceChild(e,t),this}getFirstChild(){let e=this.after?this.after.nextSibling:this.element.firstChild;return e===this.before||e===this.getManagedLineBreak()?null:e}getManagedLineBreak(){return this.element.__lexicalLineBreak||null}setManagedLineBreak(e){if(e===null)this.removeManagedLineBreak();else{let t=e==="decorator"&&(ba||ri||ya);this.insertManagedLineBreak(t)}}removeManagedLineBreak(){let e=this.getManagedLineBreak();if(e){let t=this.element,r=e.nodeName==="IMG"?e.nextSibling:null;r&&t.removeChild(r),t.removeChild(e),t.__lexicalLineBreak=void 0}}insertManagedLineBreak(e){let t=this.getManagedLineBreak();if(t){if(e===(t.nodeName==="IMG"))return;this.removeManagedLineBreak()}let r=this.element,o=this.before,s=document.createElement("br");if(r.insertBefore(s,o),e){let i=document.createElement("img");i.setAttribute("data-lexical-linebreak","true"),i.style.cssText="display: inline !important; border: 0px !important; margin: 0px !important;",i.alt="",r.insertBefore(i,s),r.__lexicalLineBreak=i}else r.__lexicalLineBreak=s}getFirstChildOffset(){let e=0;for(let t=this.after;t!==null;t=t.previousSibling)e++;return e}resolveChildIndex(e,t,r,o){if(r===this.element){let l=this.getFirstChildOffset();return[e,Math.min(l+e.getChildrenSize(),Math.max(l,o))]}let s=sx(t,r);s.push(o);let i=sx(t,this.element),a=e.getIndexWithinParent();for(let l=0;lu){a+=1;break}}return[e.getParentOrThrow(),a]}};function sx(n,e){let t=[],r=e;for(;r!==n&&r!==null;r=r.parentNode){let o=0;for(let s=r.previousSibling;s!==null;s=s.previousSibling)o++;t.push(o)}return r!==n&&D(225),t.reverse()}var uo=class extends on{__first;__last;__size;__format;__style;__indent;__dir;__textFormat;__textStyle;constructor(e){super(e),this.__first=null,this.__last=null,this.__size=0,this.__format=0,this.__style="",this.__indent=0,this.__dir=null,this.__textFormat=0,this.__textStyle=""}afterCloneFrom(e){super.afterCloneFrom(e),this.__key===e.__key&&(this.__first=e.__first,this.__last=e.__last,this.__size=e.__size),this.__indent=e.__indent,this.__format=e.__format,this.__style=e.__style,this.__dir=e.__dir,this.__textFormat=e.__textFormat,this.__textStyle=e.__textStyle}getFormat(){return this.getLatest().__format}getFormatType(){let e=this.getFormat();return Ew[e]||""}getStyle(){return this.getLatest().__style}getIndent(){return this.getLatest().__indent}getChildren(){let e=[],t=this.getFirstChild();for(;t!==null;)e.push(t),t=t.getNextSibling();return e}getChildrenKeys(){let e=[],t=this.getFirstChild();for(;t!==null;)e.push(t.__key),t=t.getNextSibling();return e}getChildrenSize(){return this.getLatest().__size}isEmpty(){return this.getChildrenSize()===0}isDirty(){let e=Pe()._dirtyElements;return e!==null&&e.has(this.__key)}isLastChild(){let e=this.getLatest(),t=this.getParentOrThrow().getLastChild();return t!==null&&t.is(e)}getAllTextNodes(){let e=[],t=this.getFirstChild();for(;t!==null;){if(Y(t)&&e.push(t),M(t)){let r=t.getAllTextNodes();e.push(...r)}t=t.getNextSibling()}return e}getFirstDescendant(){let e=this.getFirstChild();for(;M(e);){let t=e.getFirstChild();if(t===null)break;e=t}return e}getLastDescendant(){let e=this.getLastChild();for(;M(e);){let t=e.getLastChild();if(t===null)break;e=t}return e}getDescendantByIndex(e){let t=this.getChildren(),r=t.length;if(e>=r){let s=t[r-1];return M(s)&&s.getLastDescendant()||s||null}let o=t[e];return M(o)&&o.getFirstDescendant()||o||null}getFirstChild(){let e=this.getLatest().__first;return e===null?null:nt(e)}getFirstChildOrThrow(){let e=this.getFirstChild();return e===null&&D(45,this.__key),e}getLastChild(){let e=this.getLatest().__last;return e===null?null:nt(e)}getLastChildOrThrow(){let e=this.getLastChild();return e===null&&D(96,this.__key),e}getChildAtIndex(e){let t=this.getChildrenSize(),r,o;if(e=e;){if(o===e)return r;r=r.getPreviousSibling(),o--}return null}getTextContent(){let e="",t=this.getChildren(),r=t.length;for(let o=0;ot.remove()),e}append(...e){return this.splice(this.getChildrenSize(),0,e)}setDirection(e){let t=this.getWritable();return t.__dir=e,t}setFormat(e){return this.getWritable().__format=e!==""?AC[e]:0,this}setStyle(e){return this.getWritable().__style=e||"",this}setTextFormat(e){let t=this.getWritable();return t.__textFormat=e,t}setTextStyle(e){let t=this.getWritable();return t.__textStyle=e,t}setIndent(e){return this.getWritable().__indent=e,this}splice(e,t,r){Rc(this)&&D(324,this.__key,this.__type);let o=this.getChildrenSize(),s=this.getWritable();e+t<=o||D(226,String(e),String(t),String(o));let i=s.__key,a=[],l=[],c=this.getChildAtIndex(e+t),u=null,d=o-t+r.length;if(e!==0)if(e===o)u=this.getLastChild();else{let g=this.getChildAtIndex(e);g!==null&&(u=g.getPreviousSibling())}if(t>0){let g=u===null?this.getFirstChild():u.getNextSibling();for(let f=0;f0&&(t.style.paddingInlineStart=40*r+"px");let o=this.getDirection();o&&(t.dir=o)}return{element:t}}exportJSON(){let e={children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),...super.exportJSON()},t=this.getTextFormat(),r=this.getTextStyle();return t!==0&&(e.textFormat=t),r!==""&&(e.textStyle=r),e}updateFromJSON(e){return super.updateFromJSON(e).setFormat(e.format).setIndent(e.indent).setDirection(e.direction).setTextFormat(e.textFormat||0).setTextStyle(e.textStyle||"")}insertNewAfter(e,t){return null}canIndent(){return!0}collapseAtStart(e){return!1}excludeFromCopy(e){return!1}canReplaceWith(e){return!0}canInsertAfter(e){return!0}canBeEmpty(){return!0}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}isInline(){return!1}isShadowRoot(){return!1}canMergeWith(e){return!1}extractWithChild(e,t,r){return!1}canMergeWhenEmpty(){return!1}reconcileObservedMutation(e,t){let r=this.getDOMSlot(e),o=r.getFirstChild();for(let s=this.getFirstChild();s;s=s.getNextSibling()){let i=t.getElementByKey(s.getKey());i!==null&&(o==null?(r.insertChild(i),o=i):o!==i&&r.replaceChild(i,o),o=o.nextSibling)}}};function M(n){return n instanceof uo}function ix(n,e,t){let r=n.getNode();for(;r;){let o=r.__key;if(e.has(o)&&!t.has(o))return!0;r=r.getParent()}return!1}var va=class extends on{decorate(e,t){return null}isIsolated(){return!1}isInline(){return!0}isKeyboardSelectable(){return!0}};function Me(n){return n instanceof va}var ho=class extends uo{__cachedText;static getType(){return"root"}static clone(){return new ho}constructor(){super("root"),this.__cachedText=null}getTopLevelElementOrThrow(){D(51)}getTextContent(){let e=this.__cachedText;return!ci()&&Pe()._dirtyType!==0||e===null?super.getTextContent():e}remove(){D(52)}replace(e){D(53)}insertBefore(e){D(54)}insertAfter(e){D(55)}updateDOM(e,t){return!1}splice(e,t,r){for(let o of r)M(o)||Me(o)||D(282);return super.splice(e,t,r)}static importJSON(e){return sn().updateFromJSON(e)}collapseAtStart(){return!0}};function ut(n){return n instanceof ho}function by(n){return new ss(new Map(n._nodeMap))}function kf(){return new ss(new Map([["root",new ho]]))}function Sy(n){let e=n.exportJSON(),t=n.constructor;if(e.type!==t.getType()&&D(130,t.name),M(n)){let r=e.children;Array.isArray(r)||D(59,t.name);let o=n.getChildren();for(let s=0;s({root:Sy(sn())}))}},Ic=class extends uo{static getType(){return"artificial"}createDOM(e){return document.createElement("div")}},go=class extends uo{static getType(){return"paragraph"}static clone(e){return new go(e.__key)}createDOM(e){let t=document.createElement("p"),r=ni(e.theme,"paragraph");return r!==void 0&&t.classList.add(...r),t}updateDOM(e,t,r){return!1}static importDOM(){return{p:e=>({conversion:_v,priority:0})}}exportDOM(e){let{element:t}=super.exportDOM(e);if(It(t)){this.isEmpty()&&t.append(document.createElement("br"));let r=this.getFormatType();r&&(t.style.textAlign=r)}return{element:t}}static importJSON(e){return Or().updateFromJSON(e)}exportJSON(){return{...super.exportJSON(),textFormat:this.getTextFormat(),textStyle:this.getTextStyle()}}insertNewAfter(e,t){let r=Or();r.setTextFormat(e.format),r.setTextStyle(e.style);let o=this.getDirection();return r.setDirection(o),r.setFormat(this.getFormatType()),r.setStyle(this.getStyle()),this.insertAfter(r,t),r}collapseAtStart(){let e=this.getChildren();if(e.length===0||Y(e[0])&&e[0].getTextContent().trim()===""){if(this.getNextSibling()!==null)return this.selectNext(),this.remove(),!0;if(this.getPreviousSibling()!==null)return this.selectPrevious(),this.remove(),!0}return!1}};function _v(n){let e=Or();return n.style&&(e.setFormat(n.style.textAlign),Wy(n,e)),{node:e}}function Or(){return Ma(new go)}function Ty(n){return n instanceof go}var Cv=0,xv=1,yv=2,bv=3,Sv=4;function Ny(n,e,t,r){let o=n._keyToDOMMap;o.clear(),n._editorState=kf(),n._pendingEditorState=r,n._compositionKey=null,n._dirtyType=0,n._cloneNotNeeded.clear(),n._dirtyLeaves=new Set,n._dirtyElements.clear(),n._normalizedNodes=new Set,n._updateTags=new Set,n._updates=[],n._blockCursorElement=null;let s=n._observer;s!==null&&(s.disconnect(),n._observer=null),e!==null&&(e.textContent=""),t!==null&&(t.textContent="",o.set("root",t))}function Ey(n){let e=new Set,t=new Set,r=n;for(;r;){let{ownNodeConfig:o}=Da(r),s=r.transform;if(!t.has(s)){t.add(s);let i=r.transform();i&&e.add(i)}if(o){let i=o.$transform;i&&e.add(i),r=o.extends}else{let i=Object.getPrototypeOf(r);r=i.prototype instanceof on&&i!==on?i:void 0}}return e}function Tv(n){let e=n||{},t=fv(),r=e.theme||{},o=n===void 0?t:e.parentEditor||null,s=e.disableEvents||!1,i=kf(),a=e.namespace||(o!==null?o._config.namespace:Ry()),l=e.editorState,c=[ho,Rr,lo,co,go,Ic,...e.nodes||[]],{onError:u,html:d}=e,h=e.editable===void 0||e.editable,g;if(n===void 0&&t!==null)g=t._nodes;else{g=new Map;for(let p=0;p{Object.keys(y).forEach(S=>{let b=_.get(S);b===void 0&&(b=[],_.set(S,b)),b.push(y[S])})};return p.forEach(y=>{let S=y.klass.importDOM;if(S==null||C.has(S))return;C.add(S);let b=S.call(y.klass);b!==null&&x(b)}),m&&x(m),_}(g,d?d.import:void 0),h,n);return l!==void 0&&(f._pendingEditorState=l,f._dirtyType=2),f}var kr=class{_headless;_parentEditor;_rootElement;_editorState;_pendingEditorState;_compositionKey;_deferred;_keyToDOMMap;_updates;_updating;_listeners;_commands;_nodes;_decorators;_pendingDecorators;_config;_dirtyType;_cloneNotNeeded;_dirtyLeaves;_dirtyElements;_normalizedNodes;_updateTags;_observer;_key;_onError;_htmlConversions;_window;_editable;_blockCursorElement;_createEditorArgs;constructor(e,t,r,o,s,i,a,l){this._createEditorArgs=l,this._parentEditor=t,this._rootElement=null,this._editorState=e,this._pendingEditorState=null,this._compositionKey=null,this._deferred=[],this._keyToDOMMap=new Map,this._updates=[],this._updating=!1,this._listeners={decorator:new Set,editable:new Set,mutation:new Map,root:new Set,textcontent:new Set,update:new Set},this._commands=new Map,this._config=o,this._nodes=r,this._decorators={},this._pendingDecorators=null,this._dirtyType=0,this._cloneNotNeeded=new Set,this._dirtyLeaves=new Set,this._dirtyElements=new Map,this._normalizedNodes=new Set,this._updateTags=new Set,this._observer=null,this._key=Ry(),this._onError=s,this._htmlConversions=i,this._editable=a,this._headless=t!==null&&t._headless,this._window=null,this._blockCursorElement=null}isComposing(){return this._compositionKey!=null}registerUpdateListener(e){let t=this._listeners.update;return t.add(e),()=>{t.delete(e)}}registerEditableListener(e){let t=this._listeners.editable;return t.add(e),()=>{t.delete(e)}}registerDecoratorListener(e){let t=this._listeners.decorator;return t.add(e),()=>{t.delete(e)}}registerTextContentListener(e){let t=this._listeners.textcontent;return t.add(e),()=>{t.delete(e)}}registerRootListener(e){let t=this._listeners.root;return e(this._rootElement,null),t.add(e),()=>{e(null,this._rootElement),t.delete(e)}}registerCommand(e,t,r){r===void 0&&D(35);let o=this._commands;o.has(e)||o.set(e,[new Set,new Set,new Set,new Set,new Set]);let s=o.get(e);s===void 0&&D(36,String(e));let i=s[r];return i.add(t),()=>{i.delete(t),s.every(a=>a.size===0)&&o.delete(e)}}registerMutationListener(e,t,r){let o=this.resolveRegisteredNodeAfterReplacements(this.getRegisteredNode(e)).klass,s=this._listeners.mutation,i=s.get(t);i===void 0&&(i=new Set,s.set(t,i)),i.add(o);let a=r&&r.skipInitialization;return a!==void 0&&a||this.initializeMutationListener(t,o),()=>{i.delete(o),i.size===0&&s.delete(t)}}getRegisteredNode(e){let t=this._nodes.get(e.getType());return t===void 0&&D(37,e.name),t}resolveRegisteredNodeAfterReplacements(e){for(;e.replaceWithKlass;)e=this.getRegisteredNode(e.replaceWithKlass);return e}initializeMutationListener(e,t){let r=this._editorState,o=ff(r).get(t.getType());if(!o)return;let s=new Map;for(let i of o.keys())s.set(i,"created");s.size>0&&e(s,{dirtyLeaves:new Set,prevEditorState:r,updateTags:new Set(["registerMutationListener"])})}registerNodeTransformToKlass(e,t){let r=this.getRegisteredNode(e);return r.transforms.add(t),r}registerNodeTransform(e,t){let r=this.registerNodeTransformToKlass(e,t),o=[r],s=r.replaceWithKlass;if(s!=null){let i=this.registerNodeTransformToKlass(s,t);o.push(i)}return function(i,a){let l=ff(i.getEditorState()),c=[];for(let u of a){let d=l.get(u);d&&c.push(d)}c.length!==0&&i.update(()=>{for(let u of c)for(let d of u.keys()){let h=nt(d);h&&h.markDirty()}},i._pendingEditorState===null?{tag:bc}:void 0)}(this,o.map(i=>i.klass.getType())),()=>{o.forEach(i=>i.transforms.delete(t))}}hasNode(e){return this._nodes.has(e.getType())}hasNodes(e){return e.every(this.hasNode.bind(this))}dispatchCommand(e,t){return H(this,e,t)}getDecorators(){return this._decorators}getRootElement(){return this._rootElement}getKey(){return this._key}setRootElement(e){let t=this._rootElement;if(e!==t){let r=ni(this._config.theme,"root"),o=this._pendingEditorState||this._editorState;if(this._rootElement=e,Ny(this,t,e,o),t!==null&&(this._config.disableEvents||qw(t),r!=null&&t.classList.remove(...r)),e!==null){let s=Kf(e),i=e.style;i.userSelect="text",i.whiteSpace="pre-wrap",i.wordBreak="break-word",e.setAttribute("data-lexical-editor","true"),this._window=s,this._dirtyType=2,Ex(this),this._updateTags.add(bc),wr(this),this._config.disableEvents||function(a,l){let c=a.ownerDocument;of.set(a,c);let u=Lc.get(c)??0;u<1&&c.addEventListener("selectionchange",sy),Lc.set(c,u+1),a.__lexicalEditor=l;let d=oy(a);for(let h=0;h{HC(m)||(BC(m),(l.isEditable()||g==="click")&&f(m,l))}:m=>{if(HC(m))return;BC(m);let _=l.isEditable();switch(g){case"cut":return _&&H(l,Ef,m);case"copy":return H(l,Nf,m);case"paste":return _&&H(l,bf,m);case"dragstart":return _&&H(l,Vx,m);case"dragover":return _&&H(l,Yx,m);case"dragend":return _&&H(l,jx,m);case"focus":return _&&H(l,qx,m);case"blur":return _&&H(l,Zx,m);case"drop":return _&&H(l,Gx,m)}};a.addEventListener(g,p),d.push(()=>{a.removeEventListener(g,p)})}}(e,this),r!=null&&e.classList.add(...r)}else this._window=null,this._updateTags.add(bc),wr(this);ma("root",this,!1,e,t)}}getElementByKey(e){return this._keyToDOMMap.get(e)||null}getEditorState(){return this._editorState}setEditorState(e,t){e.isEmpty()&&D(38);let r=e;r._readOnly&&(r=by(e),r._selection=e._selection?e._selection.clone():null),Nx(this);let o=this._pendingEditorState,s=this._updateTags,i=t!==void 0?t.tag:null;o===null||o.isEmpty()||(i!=null&&s.add(i),wr(this)),this._pendingEditorState=r,this._dirtyType=2,this._dirtyElements.set("root",!1),this._compositionKey=null,i!=null&&s.add(i),this._updating||wr(this)}parseEditorState(e,t){return function(r,o,s){let i=kf(),a=lt,l=Vt,c=ct,u=o._dirtyElements,d=o._dirtyLeaves,h=o._cloneNotNeeded,g=o._dirtyType;o._dirtyElements=new Map,o._dirtyLeaves=new Set,o._cloneNotNeeded=new Set,o._dirtyType=0,lt=i,Vt=!1,ct=o,Lf(null);try{let f=o._nodes;Of(r.root,f),s&&s(),i._readOnly=!0}catch(f){f instanceof Error&&o._onError(f)}finally{o._dirtyElements=u,o._dirtyLeaves=d,o._cloneNotNeeded=h,o._dirtyType=g,lt=a,Vt=l,ct=c}return i}(typeof e=="string"?JSON.parse(e):e,this,t)}read(e){return wr(this),this.getEditorState().read(e,{editor:this})}update(e,t){(function(r,o,s){r._updating?r._updates.push([o,s]):Gc(r,o,s)})(this,e,t)}focus(e,t={}){let r=this._rootElement;r!==null&&(r.setAttribute("autocapitalize","off"),rn(this,()=>{let o=me(),s=sn();o!==null?o.dirty||Yt(o.clone()):s.getChildrenSize()!==0&&(t.defaultSelection==="rootStart"?s.selectStart():s.selectEnd()),Py("focus"),Fy(()=>{r.removeAttribute("autocapitalize"),e&&e()})}),this._pendingEditorState===null&&r.removeAttribute("autocapitalize"))}blur(){let e=this._rootElement;e!==null&&e.blur();let t=jn(this._window);t!==null&&t.removeAllRanges()}isEditable(){return this._editable}setEditable(e){this._editable!==e&&(this._editable=e,ma("editable",this,!0,e))}toJSON(){return{editorState:this._editorState.toJSON()}}};nn(kr,"version");kr.version="0.38.2+prod.esm";var df=null;function Lf(n){df=n}var Ay=1;function Nv(){Ay=1}function Rf(n,e){let t=Mf(n,e);return t===void 0&&D(30,e),t}function Mf(n,e){return n._nodes.get(e)}var Ev=typeof queueMicrotask=="function"?queueMicrotask:n=>{Promise.resolve().then(n)};function ax(n){return Me(jc(n))}function Df(n){let e=document.activeElement;if(!It(e))return!1;let t=e.nodeName;return Me(jc(n))&&(t==="INPUT"||t==="TEXTAREA"||e.contentEditable==="true"&&La(e)==null)}function ka(n,e,t){let r=n.getRootElement();try{return r!==null&&r.contains(e)&&r.contains(t)&&e!==null&&!Df(e)&&If(e)===n}catch{return!1}}function Vc(n){return n instanceof kr}function If(n){let e=n;for(;e!=null;){let t=La(e);if(Vc(t))return t;e=Ra(e)}return null}function La(n){return n?n.__lexicalEditor:null}function Av(n){return Sw.test(n)?"rtl":Tw.test(n)?"ltr":null}function so(n){return wf(n)||n.isToken()}function Er(n){return so(n)||n.isSegmented()}function qn(n){return ui(n)&&n.nodeType===3}function wy(n){return ui(n)&&n.nodeType===9}function is(n){let e=n;for(;e!=null;){if(qn(e))return e;e=e.firstChild}return null}function $c(n,e,t){let r=Tt[e];if(t!==null&&(n&r)===(t&r))return n;let o=n^r;return e==="subscript"?o&=~Tt.superscript:e==="superscript"?o&=~Tt.subscript:e==="lowercase"?(o&=~Tt.uppercase,o&=~Tt.capitalize):e==="uppercase"?(o&=~Tt.lowercase,o&=~Tt.capitalize):e==="capitalize"&&(o&=~Tt.lowercase,o&=~Tt.uppercase),o}function wv(n){return Y(n)||es(n)||Me(n)}function vy(n,e){let t=function(){let i=df;return df=null,i}();if((e=e||t&&t.__key)!=null)return void(n.__key=e);it(),Cy();let r=Pe(),o=Pr(),s=""+Ay++;o._nodeMap.set(s,n),M(n)?r._dirtyElements.set(s,!0):r._dirtyLeaves.add(s),r._cloneNotNeeded.add(s),r._dirtyType=1,n.__key=s}function io(n){let e=n.getParent();if(e!==null){let t=n.getWritable(),r=e.getWritable(),o=n.getPreviousSibling(),s=n.getNextSibling(),i=s!==null?s.__key:null,a=o!==null?o.__key:null,l=o!==null?o.getWritable():null,c=s!==null?s.getWritable():null;o===null&&(r.__first=i),s===null&&(r.__last=a),l!==null&&(l.__next=i),c!==null&&(c.__prev=a),t.__prev=null,t.__next=null,t.__parent=null,r.__size--}}function Pc(n){Cy(),Rc(n)&&D(323,n.__key,n.__type);let e=n.getLatest(),t=e.__parent,r=Pr(),o=Pe(),s=r._nodeMap,i=o._dirtyElements;t!==null&&function(l,c,u){let d=l;for(;d!==null;){if(u.has(d))return;let h=c.get(d);if(h===void 0)break;u.set(d,!1),d=h.__parent}}(t,s,i);let a=e.__key;o._dirtyType=1,M(n)?i.set(a,!0):o._dirtyLeaves.add(a)}function at(n){it();let e=Pe(),t=e._compositionKey;if(n!==t){if(e._compositionKey=n,t!==null){let r=nt(t);r!==null&&r.getWritable()}if(n!==null){let r=nt(n);r!==null&&r.getWritable()}}}function oo(){return ci()?null:Pe()._compositionKey}function nt(n,e){let t=(e||Pr())._nodeMap.get(n);return t===void 0?null:t}function $f(n,e){let t=Yc(n,Pe());return t!==void 0?nt(t,e):null}function Yc(n,e){return n[`__lexicalKey_${e._key}`]}function jc(n,e){let t=n;for(;t!=null;){let r=$f(t,e);if(r!==null)return r;t=Ra(t)}return null}function Oy(n){let e=n._decorators,t=Object.assign({},e);return n._pendingDecorators=t,t}function lx(n){return n.read(()=>sn().getTextContent())}function sn(){return ky(Pr())}function ky(n){return n._nodeMap.get("root")}function Yt(n){it();let e=Pr();n!==null&&(n.dirty=!0,n.setCachedNodes(null)),e._selection=n}function Qs(n){let e=Pe(),t=function(r,o){let s=r;for(;s!=null;){let i=Yc(s,o);if(i!==void 0)return i;s=Ra(s)}return null}(n,e);return t===null?n===e.getRootElement()?nt("root"):null:nt(t)}function Ly(n){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(n)}function Pf(n){let e=[],t=n;for(;t!==null;)e.push(t),t=t._parentEditor;return e}function Ry(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substring(0,5)}function My(n){return qn(n)?n.nodeValue:null}function Ff(n,e,t){let r=jn(mn(e));if(r===null)return;let o=r.anchorNode,{anchorOffset:s,focusOffset:i}=r;if(o!==null){let a=My(o),l=jc(o);if(a!==null&&Y(l)){if(a===Hc&&t){let c=t.length;a=t,s=c,i=c}a!==null&&Bf(l,a,s,i,n)}}}function Bf(n,e,t,r,o){let s=n;if(s.isAttached()&&(o||!s.isDirty())){let i=s.isComposing(),a=e;(i||o)&&e[e.length-1]===Hc&&(a=e.slice(0,-1));let l=s.getTextContent();if(o||a!==l){if(a===""){if(at(null),ya||ri||ba)s.remove();else{let p=Pe();setTimeout(()=>{p.update(()=>{s.isAttached()&&s.remove()})},20)}return}let c=s.getParent(),u=us(),d=s.getTextContentSize(),h=oo(),g=s.getKey();if(s.isToken()||h!==null&&g===h&&!i||Q(u)&&(c!==null&&!c.canInsertTextBefore()&&u.anchor.offset===0||u.anchor.key===n.__key&&u.anchor.offset===0&&!s.canInsertTextBefore()&&!i||u.focus.key===n.__key&&u.focus.offset===d&&!s.canInsertTextAfter()&&!i))return void s.markDirty();let f=me();if(!Q(f)||t===null||r===null)return void cx(s,a,f);if(f.setTextNodeRange(s,t,s,r),s.isSegmented()){let p=st(s.getTextContent());s.replace(p),s=p}cx(s,a,f)}}}function cx(n,e,t){if(n.setTextContent(e),Q(t)){let r=n.getKey();for(let o of["anchor","focus"]){let s=t[o];s.type==="text"&&s.key===r&&(s.offset=vn(n,s.offset,"clamp"))}}}function Cc(n,e,t){let r=e[t]||!1;return r==="any"||r===n[t]}function Dy(n,e){return Cc(n,e,"altKey")&&Cc(n,e,"ctrlKey")&&Cc(n,e,"shiftKey")&&Cc(n,e,"metaKey")}function Ne(n,e,t){return Dy(n,t)&&n.key.toLowerCase()===e.toLowerCase()}var Nr={ctrlKey:!Nn,metaKey:Nn},ux={altKey:Nn,ctrlKey:!Nn};function dx(n){return n.key==="Backspace"}function hx(n){return Ne(n,"a",Nr)}function vv(n){let e=sn();if(Q(n)){let t=n.anchor,r=n.focus,o=t.getNode().getTopLevelElementOrThrow().getParentOrThrow();return t.set(o.getKey(),0,"element"),r.set(o.getKey(),o.getChildrenSize(),"element"),Ec(n),n}{let t=e.select(0,e.getChildrenSize());return Yt(Ec(t)),t}}function ni(n,e){n.__lexicalClassNameCache===void 0&&(n.__lexicalClassNameCache={});let t=n.__lexicalClassNameCache,r=t[e];if(r!==void 0)return r;let o=n[e];if(typeof o=="string"){let s=xx(o);return t[e]=s,s}return o}function Hf(n,e,t,r,o){if(t.size===0)return;let s=r.__type,i=r.__key,a=e.get(s);a===void 0&&D(33,s);let l=a.klass,c=n.get(l);c===void 0&&(c=new Map,n.set(l,c));let u=c.get(i),d=u==="destroyed"&&o==="created";(u===void 0||d)&&c.set(i,d?"updated":o)}function Ov(n){let e=n.getType(),t=Pr();if(t._readOnly){let s=ff(t).get(e);return s?Array.from(s.values()):[]}let r=t._nodeMap,o=[];for(let[,s]of r)s instanceof n&&s.__type===e&&s.isAttached()&&o.push(s);return o}function gx(n,e,t){let r=n.getParent(),o=t,s=n;return r!==null&&(e&&t===0?(o=s.getIndexWithinParent(),s=r):e||t!==s.getChildrenSize()||(o=s.getIndexWithinParent()+1,s=r)),s.getChildAtIndex(e?o-1:o)}function Iy(n,e){let t=n.offset;if(n.type==="element")return gx(n.getNode(),e,t);{let r=n.getNode();if(e&&t===0||!e&&t===r.getTextContentSize()){let o=e?r.getPreviousSibling():r.getNextSibling();return o===null?gx(r.getParentOrThrow(),e,r.getIndexWithinParent()+(e?0:1)):o}}return null}function $y(n){let e=mn(n).event,t=e&&e.inputType;return t==="insertFromPaste"||t==="insertFromPasteAsQuotation"}function H(n,e,t){return function(r,o,s){let i=Pf(r);for(let a=4;a>=0;a--)for(let l=0;l{for(let p=0;p{let a=i.getParentOrThrow(),l=kn(a),c=i!==t||l?Uf(i):i;if(l)return M(i)&&M(c)||D(133),i.insertAfter(c),[i,c,c];{let[u,d,h]=r(a),g=i.getNextSiblings();return h.append(c,...g),[u,d,c]}},[o,s]=r(t);return[o,s]}function Mv(n){return It(n)&&n.tagName==="A"}function It(n){return ui(n)&&n.nodeType===1}function ui(n){return typeof n=="object"&&n!==null&&"nodeType"in n&&typeof n.nodeType=="number"}function Ky(n){return ui(n)&&n.nodeType===11}function Uy(n){let e=new RegExp(/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|mark|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var|#text)$/,"i");return n.nodeName.match(e)!==null}function gf(n){let e=new RegExp(/^(address|article|aside|blockquote|canvas|dd|div|dl|dt|fieldset|figcaption|figure|footer|form|h1|h2|h3|h4|h5|h6|header|hr|li|main|nav|noscript|ol|p|pre|section|table|td|tfoot|ul|video)$/,"i");return n.nodeName.match(e)!==null}function vr(n){if(Me(n)&&!n.isInline())return!0;if(!M(n)||kn(n))return!1;let e=n.getFirstChild(),t=e===null||es(e)||Y(e)||e.isInline();return!n.isInline()&&n.canBeEmpty()!==!1&&t}function Wf(){return Pe()}var fx=new WeakMap,Dv=new Map;function ff(n){if(!n._readOnly&&n.isEmpty())return Dv;n._readOnly||D(192);let e=fx.get(n);return e||(e=function(t){let r=new Map;for(let[o,s]of t._nodeMap){let i=s.__type,a=r.get(i);a||(a=new Map,r.set(i,a)),a.set(o,s)}return r}(n),fx.set(n,e)),e}function Gf(n){let e=n.constructor.clone(n);return e.afterCloneFrom(n),e}function Iv(n){return(e=Gf(n))[iy]=!0,e;var e}function Wy(n,e){let t=parseInt(n.style.paddingInlineStart,10)||0,r=Math.round(t/40);e.setIndent(r)}function $v(n){n.__lexicalUnmanaged=!0}function Gy(n){return n.__lexicalUnmanaged===!0}function da(n,e){return function(t,r){return Object.prototype.hasOwnProperty.call(t,r)}(n,e)&&n[e]!==on[e]}function Da(n){let e=wC in n.prototype?n.prototype[wC]():void 0,t=function(i){if(!(i===on||i.prototype instanceof on)){let a="",l="";try{a=i.getType()}catch{}try{kr.version&&(l=JSON.parse(kr.version))}catch{}D(290,i.name,a,l)}return i===va||i===uo||i===on}(n),r=!t&&da(n,"getType")?n.getType():void 0,o,s=r;if(e)if(r)o=e[r];else for(let[i,a]of Object.entries(e))s=i,o=a;if(!t&&s&&(da(n,"getType")||(n.getType=()=>s),da(n,"clone")||(n.clone=i=>(Lf(i),new n)),da(n,"importJSON")||(n.importJSON=o&&o.$importJSON||(i=>new n().updateFromJSON(i))),!da(n,"importDOM")&&o)){let{importDOM:i}=o;i&&(n.importDOM=()=>i)}return{ownNodeConfig:o,ownNodeType:s}}function Pv(n){let e=Wf();return it(),new(e.resolveRegisteredNodeAfterReplacements(e.getRegisteredNode(n))).klass}var _a=(n,e)=>{let t=n;for(;t!=null&&!ut(t);){if(e(t))return t;t=t.getParent()}return null},Fv={next:"previous",previous:"next"},ii=class{origin;constructor(e){this.origin=e}[Symbol.iterator](){return jf({hasNext:cs,initial:this.getAdjacentCaret(),map:e=>e,step:e=>e.getAdjacentCaret()})}getAdjacentCaret(){return dt(this.getNodeAtCaret(),this.direction)}getSiblingCaret(){return dt(this.origin,this.direction)}remove(){let e=this.getNodeAtCaret();return e&&e.remove(),this}replaceOrInsert(e,t){let r=this.getNodeAtCaret();return e.is(this.origin)||e.is(r)||(r===null?this.insert(e):r.replace(e,t)),this}splice(e,t,r="next"){let o=r===this.direction?t:Array.from(t).reverse(),s=this,i=this.getParentAtCaret(),a=new Map;for(let l=s.getAdjacentCaret();l!==null&&a.size0){let c=s.getNodeAtCaret();if(c){if(a.delete(c.getKey()),a.delete(l.getKey()),!(c.is(l)||s.origin.is(l))){let u=l.getParent();u&&u.is(i)&&l.remove(),c.replace(l)}}else c===null&&D(263,Array.from(a).join(" "))}else s.insert(l);s=dt(l,this.direction)}for(let l of a.values())l.remove();return this}},ls=class extends ii{type="child";getLatest(){let e=this.origin.getLatest();return e===this.origin?this:$r(e,this.direction)}getParentCaret(e="root"){return dt(Vf(this.getParentAtCaret(),e),this.direction)}getFlipped(){let e=Co(this.direction);return dt(this.getNodeAtCaret(),e)||$r(this.origin,e)}getParentAtCaret(){return this.origin}getChildCaret(){return this}isSameNodeCaret(e){return e instanceof ls&&this.direction===e.direction&&this.origin.is(e.origin)}isSamePointCaret(e){return this.isSameNodeCaret(e)}},Bv={root:ut,shadowRoot:kn};function Co(n){return Fv[n]}function Vf(n,e="root"){return Bv[e](n)?null:n}var Dr=class extends ii{type="sibling";getLatest(){let e=this.origin.getLatest();return e===this.origin?this:dt(e,this.direction)}getSiblingCaret(){return this}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return M(this.origin)?$r(this.origin,this.direction):null}getParentCaret(e="root"){return dt(Vf(this.getParentAtCaret(),e),this.direction)}getFlipped(){let e=Co(this.direction);return dt(this.getNodeAtCaret(),e)||$r(this.origin.getParentOrThrow(),e)}isSamePointCaret(e){return e instanceof Dr&&this.direction===e.direction&&this.origin.is(e.origin)}isSameNodeCaret(e){return(e instanceof Dr||e instanceof Ir)&&this.direction===e.direction&&this.origin.is(e.origin)}},Ir=class extends ii{type="text";offset;constructor(e,t){super(e),this.offset=t}getLatest(){let e=this.origin.getLatest();return e===this.origin?this:fo(e,this.direction,this.offset)}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return null}getParentCaret(e="root"){return dt(Vf(this.getParentAtCaret(),e),this.direction)}getFlipped(){return fo(this.origin,Co(this.direction),this.offset)}isSamePointCaret(e){return e instanceof Ir&&this.direction===e.direction&&this.origin.is(e.origin)&&this.offset===e.offset}isSameNodeCaret(e){return(e instanceof Dr||e instanceof Ir)&&this.direction===e.direction&&this.origin.is(e.origin)}getSiblingCaret(){return dt(this.origin,this.direction)}};function Lr(n){return n instanceof Ir}function Hv(n){return n instanceof ii}function cs(n){return n instanceof Dr}function wn(n){return n instanceof ls}var zv={next:class extends Ir{direction="next";getNodeAtCaret(){return this.origin.getNextSibling()}insert(n){return this.origin.insertAfter(n),this}},previous:class extends Ir{direction="previous";getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(n){return this.origin.insertBefore(n),this}}},Kv={next:class extends Dr{direction="next";getNodeAtCaret(){return this.origin.getNextSibling()}insert(n){return this.origin.insertAfter(n),this}},previous:class extends Dr{direction="previous";getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(n){return this.origin.insertBefore(n),this}}},Uv={next:class extends ls{direction="next";getNodeAtCaret(){return this.origin.getFirstChild()}insert(n){return this.origin.splice(0,0,[n]),this}},previous:class extends ls{direction="previous";getNodeAtCaret(){return this.origin.getLastChild()}insert(n){return this.origin.splice(this.origin.getChildrenSize(),0,[n]),this}}};function dt(n,e){return n?new Kv[e](n):null}function fo(n,e,t){return n?new zv[e](n,vn(n,t)):null}function vn(n,e,t="error"){let r=n.getTextContentSize(),o=e==="next"?r:e==="previous"?0:e;return(o<0||o>r)&&(t!=="clamp"&&_x(284,String(e),String(r),n.getKey()),o=o<0?0:r),o}function pf(n,e){return new Bc(n,e)}function $r(n,e){return M(n)?new Uv[e](n):null}function Vy(n){return n&&n.getChildCaret()||n}function ai(n){return n&&Vy(n.getAdjacentCaret())}var Oa=class{type="node-caret-range";direction;anchor;focus;constructor(e,t,r){this.anchor=e,this.focus=t,this.direction=r}getLatest(){let e=this.anchor.getLatest(),t=this.focus.getLatest();return e===this.anchor&&t===this.focus?this:new Oa(e,t,this.direction)}isCollapsed(){return this.anchor.isSamePointCaret(this.focus)}getTextSlices(){let e=o=>{let s=this[o].getLatest();return Lr(s)?function(i,a){let{direction:l,origin:c}=i,u=vn(c,a==="focus"?Co(l):l);return pf(i,u-i.offset)}(s,o):null},t=e("anchor"),r=e("focus");if(t&&r){let{caret:o}=t,{caret:s}=r;if(o.isSameNodeCaret(s))return[pf(o,s.offset-o.offset),null]}return[t,r]}iterNodeCarets(e="root"){let t=Lr(this.anchor)?this.anchor.getSiblingCaret():this.anchor.getLatest(),r=this.focus.getLatest(),o=Lr(r),s=i=>i.isSameNodeCaret(r)?null:ai(i)||i.getParentCaret(e);return jf({hasNext:i=>i!==null&&!(o&&r.isSameNodeCaret(i)),initial:t.isSameNodeCaret(r)?null:s(t),map:i=>i,step:s})}[Symbol.iterator](){return this.iterNodeCarets("root")}},Bc=class{type="slice";caret;distance;constructor(e,t){this.caret=e,this.distance=t}getSliceIndices(){let{distance:e,caret:{offset:t}}=this,r=t+e;return r{let z;for(let G=b;Gm.has(P.getKey())&&vr(P));return A&&O?[A,O]:null}(u,d,l);if(h){let[f,p]=h;$r(f,"previous").splice(0,p.getChildren()),p.remove()}let g=[u,d,...i,...a].find(Wg);if(g)return Yy(_o(En(g),n.direction));D(269,JSON.stringify(i.map(f=>f.origin.__key)))}function En(n){let e=function(o){let s=o;for(;wn(s);){let i=ai(s);if(!wn(i))break;s=i}return s}(n.getLatest()),{direction:t}=e;if(Y(e.origin))return Lr(e)?e:fo(e.origin,t,t);let r=e.getAdjacentCaret();return cs(r)&&Y(r.origin)?fo(r.origin,t,Co(t)):e}function Zy(n){return Lr(n)&&n.offset!==vn(n.origin,n.direction)}function _o(n,e){return n.direction===e?n:n.getFlipped()}function Jf(n,e){return n.direction===e?n:po(_o(n.focus,e),_o(n.anchor,e))}function Jy(n,e,t){let r=$r(n,"next");for(let o=0;o0||i.canBeEmpty()&&o(i,"last"))&&s.insert(e(i).splice(0,0,a))}return s}function qv(n){return n}function Zv(...n){return n}function Jv(n,e){return[n,e]}function Xv(n){return n}function Qv(n,e){if(!e||n===e)return n;for(let t in e)if(n[t]!==e[t])return{...n,...e};return n}var T=Xf,Xy=T.$addUpdateTag,ft=T.$applyNodeReplacement,xo=T.$caretFromPoint,Qy=T.$caretRangeFromSelection,Zc=T.$cloneWithProperties,e1=T.$cloneWithPropertiesEphemeral,oD=T.$comparePointCaretNext,sD=T.$copyNode,hi=T.$create,pt=T.$createLineBreakNode,Jc=T.$createNodeSelection,U=T.$createParagraphNode,Rn=T.$createPoint,Zn=T.$createRangeSelection,t1=T.$createRangeSelectionFromDom,an=T.$createTabNode,ye=T.$createTextNode,Ia=T.$extendCaretToRange,yo=T.$findMatchingParent,$a=T.$getAdjacentChildCaret,Qf=T.$getAdjacentNode,ds=T.$getAdjacentSiblingOrParentSiblingCaret,ep=T.$getCaretInDirection,Pa=T.$getCaretRange,tp=T.$getCaretRangeInDirection,n1=T.$getCharacterOffsets,ln=T.$getChildCaret,iD=T.$getChildCaretAtIndex,np=T.$getChildCaretOrSelf,r1=T.$getCollapsedCaretRange,aD=T.$getCommonAncestor,lD=T.$getCommonAncestorResultBranchOrder,Fr=T.$getEditor,We=T.$getNearestNodeFromDOMNode,o1=T.$getNearestRootOrShadowRoot,Fe=T.$getNodeByKey,cD=T.$getNodeByKeyOrThrow,s1=T.$getNodeFromDOMNode,Br=T.$getPreviousSelection,Be=T.$getRoot,w=T.$getSelection,mt=T.$getSiblingCaret,gi=T.$getState,uD=T.$getStateChange,dD=T.$getTextContent,hD=T.$getTextNodeOffset,rp=T.$getTextPointCaret,gD=T.$getTextPointCaretSlice,fD=T.$getWritableNodeState,i1=T.$hasAncestor,a1=T.$hasUpdateTag,Fa=T.$insertNodes,fi=T.$isBlockElementNode,bo=T.$isChildCaret,Et=T.$isDecoratorNode,l1=T.$isEditorState,F=T.$isElementNode,Xc=T.$isExtendableTextPointCaret,c1=T.$isInlineElementOrDecoratorNode,Ba=T.$isLeafNode,be=T.$isLineBreakNode,pD=T.$isNodeCaret,Ke=T.$isNodeSelection,rt=T.$isParagraphNode,v=T.$isRangeSelection,Hr=T.$isRootNode,Ze=T.$isRootOrShadowRoot,Qc=T.$isSiblingCaret,_t=T.$isTabNode,B=T.$isTextNode,eu=T.$isTextPointCaret,mD=T.$isTextPointCaretSlice,op=T.$isTokenOrSegmented,_D=T.$isTokenOrTab,CD=T.$nodesOfType,Mn=T.$normalizeCaret,zr=T.$normalizeSelection__EXPERIMENTAL,xD=T.$onUpdate,u1=T.$parseSerializedNode,yD=T.$removeTextFromCaretRange,d1=T.$rewindSiblingCaret,pi=T.$selectAll,bD=T.$setCompositionKey,So=T.$setPointFromCaret,De=T.$setSelection,Ha=T.$setSelectionFromCaretRange,To=T.$setState,h1=T.$splitAtPointCaretNext,tu=T.$splitNode,SD=T.$updateRangeSelectionFromCaretRange,sp=T.ArtificialNode__DO_NOT_USE,TD=T.BLUR_COMMAND,za=T.CAN_REDO_COMMAND,Ka=T.CAN_UNDO_COMMAND,nu=T.CLEAR_EDITOR_COMMAND,ru=T.CLEAR_HISTORY_COMMAND,No=T.CLICK_COMMAND,g1=T.COLLABORATION_TAG,Jn=T.COMMAND_PRIORITY_CRITICAL,W=T.COMMAND_PRIORITY_EDITOR,Je=T.COMMAND_PRIORITY_HIGH,de=T.COMMAND_PRIORITY_LOW,cn=T.COMMAND_PRIORITY_NORMAL,mi=T.CONTROLLED_TEXT_INSERTION_COMMAND,_i=T.COPY_COMMAND,Ci=T.CUT_COMMAND,un=T.DELETE_CHARACTER_COMMAND,hs=T.DELETE_LINE_COMMAND,xi=T.DELETE_WORD_COMMAND,ND=T.DRAGEND_COMMAND,f1=T.DRAGOVER_COMMAND,ou=T.DRAGSTART_COMMAND,su=T.DROP_COMMAND,Eo=T.DecoratorNode,Ye=T.ElementNode,p1=T.FOCUS_COMMAND,iu=T.FORMAT_ELEMENT_COMMAND,Kr=T.FORMAT_TEXT_COMMAND,yi=T.HISTORIC_TAG,gs=T.HISTORY_MERGE_TAG,m1=T.HISTORY_PUSH_TAG,$t=T.INDENT_CONTENT_COMMAND,bi=T.INSERT_LINE_BREAK_COMMAND,Xn=T.INSERT_PARAGRAPH_COMMAND,Ao=T.INSERT_TAB_COMMAND,Ua=T.INTERNAL_$isBlock,ED=T.IS_ALL_FORMATTING,AD=T.IS_BOLD,wD=T.IS_CODE,vD=T.IS_HIGHLIGHT,OD=T.IS_ITALIC,kD=T.IS_STRIKETHROUGH,LD=T.IS_SUBSCRIPT,RD=T.IS_SUPERSCRIPT,MD=T.IS_UNDERLINE,dn=T.KEY_ARROW_DOWN_COMMAND,Qn=T.KEY_ARROW_LEFT_COMMAND,wo=T.KEY_ARROW_RIGHT_COMMAND,Pt=T.KEY_ARROW_UP_COMMAND,vo=T.KEY_BACKSPACE_COMMAND,Si=T.KEY_DELETE_COMMAND,_1=T.KEY_DOWN_COMMAND,Ur=T.KEY_ENTER_COMMAND,Ti=T.KEY_ESCAPE_COMMAND,DD=T.KEY_MODIFIER_COMMAND,Ni=T.KEY_SPACE_COMMAND,_n=T.KEY_TAB_COMMAND,C1=T.LineBreakNode,au=T.MOVE_TO_END,Wa=T.MOVE_TO_START,ID=T.NODE_STATE_KEY,hn=T.OUTDENT_CONTENT_COMMAND,Oo=T.PASTE_COMMAND,Wr=T.PASTE_TAG,Ga=T.ParagraphNode,lu=T.REDO_COMMAND,cu=T.REMOVE_TEXT_COMMAND,Va=T.RootNode,er=T.SELECTION_CHANGE_COMMAND,Ya=T.SELECTION_INSERT_CLIPBOARD_NODES_COMMAND,uu=T.SELECT_ALL_COMMAND,$D=T.SKIP_COLLAB_TAG,ip=T.SKIP_DOM_SELECTION_TAG,x1=T.SKIP_SCROLL_INTO_VIEW_TAG,PD=T.SKIP_SELECTION_FOCUS_TAG,y1=T.TEXT_TYPE_TO_FORMAT,b1=T.TabNode,Ft=T.TextNode,du=T.UNDO_COMMAND,ap=T.buildImportMap,hu=T.configExtension,Ct=T.createCommand,S1=T.createEditor,FD=T.createSharedNodeState,gu=T.createState,T1=T.declarePeerDependency,ue=T.defineExtension,BD=T.flipDirection,HD=T.getDOMOwnerDocument,ko=T.getDOMSelection,zD=T.getDOMSelectionFromTarget,N1=T.getDOMTextNode,KD=T.getEditorPropertyFromDOMNode,fu=T.getNearestEditorFromDOMNode,E1=T.getRegisteredNode,UD=T.getRegisteredNodeOrThrow,WD=T.getStaticNodeConfig,lp=T.getTextDirection,GD=T.getTransformSetFromKlass,A1=T.isBlockDomNode,w1=T.isCurrentlyReadOnlyMode,v1=T.isDOMDocumentNode,jt=T.isDOMNode,VD=T.isDOMTextNode,YD=T.isDOMUnmanaged,cp=T.isDocumentFragment,jD=T.isExactShortcutMatch,O1=T.isHTMLAnchorElement,fs=T.isHTMLElement,ja=T.isInlineDomNode,qD=T.isLexicalEditor,ZD=T.isModifierMatch,k1=T.isSelectionCapturedInDecoratorInput,L1=T.isSelectionWithinEditor,up=T.makeStepwiseIterator,JD=T.removeFromParent,XD=T.resetRandomKey,xt=T.safeCast,R1=T.setDOMUnmanaged,dp=T.setNodeIndentFromDOM,Lo=T.shallowMergeConfig;var Cp={};Lt(Cp,{$addNodeStyle:()=>sO,$cloneWithProperties:()=>Zc,$copyBlockFormatIndent:()=>z1,$ensureForwardRangeSelection:()=>H1,$forEachSelectedTextNode:()=>B1,$getComputedStyleForElement:()=>pp,$getComputedStyleForParent:()=>mp,$getSelectionStyleValueForProperty:()=>gO,$isAtNodeEnd:()=>oO,$isParentElementRTL:()=>_p,$isParentRTL:()=>nO,$moveCaretSelection:()=>W1,$moveCharacter:()=>dO,$patchStyleText:()=>iO,$selectAll:()=>pi,$setBlocksType:()=>aO,$shouldOverrideDefaultCharacterSelection:()=>uO,$sliceSelectedTextNodeContent:()=>rO,$trimTextContentFromAnchor:()=>F1,$wrapNodes:()=>cO,createDOMRange:()=>eO,createRectsFromDOMRange:()=>tO,getCSSFromStyleObject:()=>P1,getStyleObjectFromCSS:()=>mu,trimTextContentFromAnchor:()=>fO});function fp(n,...e){let t=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",n);for(let o of e)r.append("v",o);throw t.search=r.toString(),Error(`Minified Lexical error #${n}; visit ${t.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}var pu=new Map;function M1(n){let e=n;for(;e!=null;){if(e.nodeType===Node.TEXT_NODE)return e;e=e.firstChild}return null}function D1(n){let e=n.parentNode;if(e==null)throw new Error("Should never happen");return[e,Array.from(e.childNodes).indexOf(n)]}function eO(n,e,t,r,o){let s=e.getKey(),i=r.getKey(),a=document.createRange(),l=n.getElementByKey(s),c=n.getElementByKey(i),u=t,d=o;if(B(e)&&(l=M1(l)),B(r)&&(c=M1(c)),e===void 0||r===void 0||l===null||c===null)return null;l.nodeName==="BR"&&([l,u]=D1(l)),c.nodeName==="BR"&&([c,d]=D1(c));let h=l.firstChild;l===c&&h!=null&&h.nodeName==="BR"&&u===0&&d===0&&(d=1);try{a.setStart(l,u),a.setEnd(c,d)}catch{return null}return!a.collapsed||u===d&&s===i||(a.setStart(c,d),a.setEnd(l,u)),a}function tO(n,e){let t=n.getRootElement();if(t===null)return[];let r=t.getBoundingClientRect(),o=getComputedStyle(t),s=parseFloat(o.paddingLeft)+parseFloat(o.paddingRight),i=Array.from(e.getClientRects()),a,l=i.length;i.sort((c,u)=>{let d=c.top-u.top;return Math.abs(d)<=3?c.left-u.left:d});for(let c=0;cu.top&&a.left+a.width>u.left,h=u.width+s===r.width;d||h?(i.splice(c--,1),l--):a=u}return i}function $1(n){let e={};if(!n)return e;let t=n.split(";");for(let r of t)if(r!==""){let[o,s]=r.split(/:([^]+)/);o&&s&&(e[o.trim()]=s.trim())}return e}function mu(n){let e=pu.get(n);return e===void 0&&(e=$1(n),pu.set(n,e)),e}function P1(n){let e="";for(let t in n)t&&(e+=`${t}: ${n[t]};`);return e}function pp(n){let e=Fr().getElementByKey(n.getKey());if(e===null)return null;let t=e.ownerDocument.defaultView;return t===null?null:t.getComputedStyle(e)}function mp(n){return pp(Hr(n)?n:n.getParentOrThrow())}function nO(n){let e=mp(n);return e!==null&&e.direction==="rtl"}function rO(n,e,t="self"){let r=n.getStartEndPoints();if(e.isSelected(n)&&!op(e)&&r!==null){let[o,s]=r,i=n.isBackward(),a=o.getNode(),l=s.getNode(),c=e.is(a),u=e.is(l);if(c||u){let[d,h]=n1(n),g=a.is(l),f=e.is(i?l:a),p=e.is(i?a:l),m,_=0;g?(_=d>h?h:d,m=d>h?d:h):f?(_=i?h:d,m=void 0):p&&(_=0,m=i?d:h);let C=e.__text.slice(_,m);C!==e.__text&&(t==="clone"&&(e=e1(e)),e.__text=C)}}return e}function oO(n){if(n.type==="text")return n.offset===n.getNode().getTextContentSize();let e=n.getNode();return F(e)||fp(177),n.offset===e.getChildrenSize()}function F1(n,e,t){let r=e.getNode(),o=t;if(F(r)){let s=r.getDescendantByIndex(e.offset);s!==null&&(r=s)}for(;o>0&&r!==null;){if(F(r)){let c=r.getLastDescendant();c!==null&&(r=c)}let s=r.getPreviousSibling(),i=0;if(s===null){let c=r.getParentOrThrow(),u=c.getPreviousSibling();for(;u===null;){if(c=c.getParent(),c===null){s=null;break}u=c.getPreviousSibling()}c!==null&&(i=c.isInline()?0:2,s=u)}let a=r.getTextContent();a===""&&F(r)&&!r.isInline()&&(a=` + +`);let l=a.length;if(!B(r)||o>=l){let c=r.getParent();r.remove(),c==null||c.getChildrenSize()!==0||Hr(c)||c.remove(),o-=l+i,r=s}else{let c=r.getKey(),u=n.getEditorState().read(()=>{let g=Fe(c);return B(g)&&g.isSimpleText()?g.getTextContent():null}),d=l-o,h=a.slice(0,d);if(u!==null&&u!==a){let g=Br(),f=r;if(r.isSimpleText())r.setTextContent(u);else{let p=ye(u);r.replace(p),f=p}if(v(g)&&g.isCollapsed()){let p=g.anchor.offset;f.select(p,p)}}else if(r.isSimpleText()){let g=e.key===c,f=e.offset;f(typeof a=="function"?s[i]=a(t[i],n):a===null?delete s[i]:s[i]=a,s),{...t}),o=P1(r);v(n)||B(n)?n.setStyle(o):n.setTextStyle(o),pu.set(o,r)}function iO(n,e){if(v(n)&&n.isCollapsed()){hp(n,e);let t=n.anchor.getNode();F(t)&&t.isEmpty()&&hp(t,e)}B1(t=>{hp(t,e)})}function B1(n){let e=w();if(!e)return;let t=new Map,r=s=>t.get(s.getKey())||[0,s.getTextContentSize()];if(v(e))for(let s of Qy(e).getTextSlices())s&&t.set(s.caret.origin.getKey(),s.getSliceIndices());let o=e.getNodes();for(let s of o){if(!B(s)||!s.canHaveFormat())continue;let[i,a]=r(s);a!==i&&(op(s)||i===0&&a===s.getTextContentSize()?n(s):n(s.splitText(i,a)[i===0?0:1]))}v(e)&&e.anchor.type==="text"&&e.focus.type==="text"&&e.anchor.key===e.focus.key&&H1(e)}function H1(n){if(n.isBackward()){let{anchor:e,focus:t}=n,{key:r,offset:o,type:s}=e;e.set(t.key,t.offset,t.type),t.set(r,o,s)}}function z1(n,e){let t=n.getFormatType(),r=n.getIndent();t!==e.getFormatType()&&e.setFormat(t),r!==e.getIndent()&&e.setIndent(r)}function aO(n,e,t=z1){if(n===null)return;let r=n.getStartEndPoints(),o=new Map,s=null;if(r){let[i,a]=r;s=Zn(),s.anchor.set(i.key,i.offset,i.type),s.focus.set(a.key,a.offset,a.type);let l=yo(i.getNode(),Ua),c=yo(a.getNode(),Ua);F(l)&&o.set(l.getKey(),l),F(c)&&o.set(c.getKey(),c)}for(let i of n.getNodes())if(F(i)&&Ua(i))o.set(i.getKey(),i);else if(r===null){let a=yo(i,Ua);F(a)&&o.set(a.getKey(),a)}for(let[i,a]of o){let l=e();t(a,l),a.replace(l,!0),s&&(i===s.anchor.key&&s.anchor.set(l.getKey(),s.anchor.offset,s.anchor.type),i===s.focus.key&&s.focus.set(l.getKey(),s.focus.offset,s.focus.type))}s&&n.is(w())&&De(s)}function I1(n){return n.getNode().isAttached()}function lO(n){let e=n;for(;e!==null&&!Ze(e);){let t=e.getLatest(),r=e.getParent();t.getChildrenSize()===0&&e.remove(!0),e=r}}function cO(n,e,t=null){let r=n.getStartEndPoints(),o=r?r[0]:null,s=n.getNodes(),i=s.length;if(o!==null&&(i===0||i===1&&o.type==="element"&&o.getNode().getChildrenSize()===0)){let c=o.type==="text"?o.getNode().getParentOrThrow():o.getNode(),u=c.getChildren(),d=e();return d.setFormat(c.getFormatType()),d.setIndent(c.getIndent()),u.forEach(h=>d.append(h)),t&&(d=t.append(d)),void c.replace(d)}let a=null,l=[];for(let c=0;c{C.append(x),d.add(x.getKey()),F(x)&&x.getChildrenKeys().forEach(y=>d.add(y))}),lO(m)}}else if(u.has(p.getKey())){F(p)||fp(179);let _=r();_.setFormat(p.getFormatType()),_.setIndent(p.getIndent()),a.push(_),p.remove(!0)}}if(o!==null)for(let f=0;f=0;f--){let p=a[f];l.insertAfter(p)}else{let f=l.getFirstChild();if(F(f)&&(l=f),f===null)if(o)l.append(o);else for(let p=0;p=0;f--){let p=a[f];l.insertAfter(p),h=p}let g=Br();v(g)&&I1(g.anchor)&&I1(g.focus)?De(g.clone()):h!==null?h.selectEnd():n.dirty=!0}function K1(n){let e=U1(n);return e!==null&&e.writingMode==="vertical-rl"}function U1(n){let e=n.anchor.getNode();return F(e)?pp(e):mp(e)}function uO(n,e){let t=K1(n)?!e:e;_p(n)&&(t=!t);let r=xo(n.focus,t?"previous":"next");if(Xc(r))return!1;for(let o of Ia(r)){if(bo(o))return!o.origin.isInline();if(!F(o.origin)){if(Et(o.origin))return!0;break}}return!1}function W1(n,e,t,r){n.modify(e?"extend":"move",t,r)}function _p(n){let e=U1(n);return e!==null&&e.direction==="rtl"}function dO(n,e,t){let r=_p(n),o;o=K1(n)||r?!t:t,W1(n,e,o,"character")}function hO(n,e,t){let r=mu(n.getStyle());return r!==null&&r[e]||t}function gO(n,e,t=""){let r=null,o=n.getNodes(),s=n.anchor,i=n.focus,a=n.isBackward(),l=a?i.offset:s.offset,c=a?i.getNode():s.getNode();if(v(n)&&n.isCollapsed()&&n.style!==""){let u=mu(n.style);if(u!==null&&e in u)return u[e]}for(let u=0;uXO,$dfs:()=>IO,$dfsIterator:()=>sb,$filter:()=>YO,$findMatchingParent:()=>yo,$firstToLastIterator:()=>QO,$getAdjacentCaret:()=>$O,$getAdjacentSiblingOrParentSiblingCaret:()=>ds,$getDepth:()=>ab,$getNearestBlockElementAncestorOrThrow:()=>zO,$getNearestNodeOfType:()=>HO,$getNextRightPreorderNode:()=>BO,$getNextSiblingOrParentSibling:()=>FO,$insertFirst:()=>jO,$insertNodeToNearestRoot:()=>WO,$insertNodeToNearestRootAtCaret:()=>cb,$isEditorIsNestedEditor:()=>ZO,$lastToFirstIterator:()=>Sp,$restoreEditorState:()=>UO,$reverseDfs:()=>PO,$reverseDfsIterator:()=>lb,$splitNode:()=>tu,$unwrapAndFilterDescendants:()=>JO,$unwrapNode:()=>ek,$wrapNodeInElement:()=>GO,CAN_USE_BEFORE_INPUT:()=>NO,CAN_USE_DOM:()=>nb,IS_ANDROID:()=>EO,IS_ANDROID_CHROME:()=>AO,IS_APPLE:()=>wO,IS_APPLE_WEBKIT:()=>vO,IS_CHROME:()=>OO,IS_FIREFOX:()=>rb,IS_IOS:()=>kO,IS_SAFARI:()=>LO,addClassNamesToElement:()=>RO,calculateZoomLevel:()=>qO,isBlockDomNode:()=>A1,isHTMLAnchorElement:()=>O1,isHTMLElement:()=>fs,isInlineDomNode:()=>ja,isMimeType:()=>ob,makeStateWrapper:()=>tk,markSelection:()=>tb,mediaFileReader:()=>DO,mergeRegister:()=>Q1,objectKlassEquals:()=>VO,positionNodeOnRange:()=>eb,registerNestedElementResolver:()=>KO,removeClassNamesFromElement:()=>MO,selectionAlwaysOnDisplay:()=>TO});function yu(n,...e){let t=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",n);for(let o of e)r.append("v",o);throw t.search=r.toString(),Error(`Minified Lexical error #${n}; visit ${t.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}var Dn=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,pO=Dn&&"documentMode"in document?document.documentMode:null,Z1=Dn&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),mO=Dn&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),_O=!(!Dn||!("InputEvent"in window)||pO)&&"getTargetRanges"in new window.InputEvent("input"),CO=Dn&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),xO=Dn&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,J1=Dn&&/Android/.test(navigator.userAgent),bp=Dn&&/^(?=.*Chrome).*/i.test(navigator.userAgent),yO=Dn&&J1&&bp,bO=Dn&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&Z1&&!bp;function X1(...n){let e=[];for(let t of n)if(t&&typeof t=="string")for(let[r]of t.matchAll(/\S+/g))e.push(r);return e}function Q1(...n){return()=>{for(let e=n.length-1;e>=0;e--)n[e]();n.length=0}}function tr(n){return`${n}px`}var SO={attributes:!0,characterData:!0,childList:!0,subtree:!0};function eb(n,e,t){let r=null,o=null,s=null,i=[],a=document.createElement("div");function l(){r===null&&yu(182),o===null&&yu(183);let{left:d,top:h}=o.getBoundingClientRect(),g=j1(n,e);var f,p;a.isConnected||(p=a,(f=o).insertBefore(p,f.firstChild));let m=!1;for(let _=0;_g.length;)i.pop();m&&t(i)}function c(){o=null,r=null,s!==null&&s.disconnect(),s=null,a.remove();for(let d of i)d.remove();i=[]}a.style.position="relative";let u=n.registerRootListener(function d(){let h=n.getRootElement();if(h===null)return c();let g=h.parentElement;if(!fs(g))return c();c(),r=h,o=g,s=new MutationObserver(f=>{let p=n.getRootElement(),m=p&&p.parentElement;if(p!==r||m!==o)return d();for(let _ of f)if(!a.contains(_.target))return l()}),s.observe(g,SO),l()});return()=>{u(),c()}}function q1(n,e,t){if(n.type!=="text"&&F(e)){let r=e.getDOMSlot(t);return[r.element,r.getFirstChildOffset()+n.offset]}return[N1(t)||t,n.offset]}function tb(n,e){let t=null,r=null,o=null,s=null,i=null,a=null,l=()=>{};function c(u){u.read(()=>{let d=w();if(!v(d))return t=null,o=null,s=null,a=null,l(),void(l=()=>{});let[h,g]=function(A){let O=A.getStartEndPoints();return A.isBackward()?[O[1],O[0]]:O}(d),f=h.getNode(),p=f.getKey(),m=h.offset,_=g.getNode(),C=_.getKey(),x=g.offset,y=n.getElementByKey(p),S=n.getElementByKey(C),b=t===null||y!==r||m!==o||p!==t.getKey(),N=s===null||S!==i||x!==a||C!==s.getKey();if((b||N)&&y!==null&&S!==null){let A=function(O,P,I,z,G,q,K){let le=(O._window?O._window.document:document).createRange();return le.setStart(...q1(P,I,z)),le.setEnd(...q1(G,q,K)),le}(n,h,f,y,g,_,S);l(),l=eb(n,A,O=>{if(e===void 0)for(let P of O){let I=P.style;I.background!=="Highlight"&&(I.background="Highlight"),I.color!=="HighlightText"&&(I.color="HighlightText"),I.marginTop!==tr(-1.5)&&(I.marginTop=tr(-1.5)),I.paddingTop!==tr(4)&&(I.paddingTop=tr(4)),I.paddingBottom!==tr(0)&&(I.paddingBottom=tr(0))}else e(O)})}t=f,r=y,o=m,s=_,i=S,a=x})}return c(n.getEditorState()),Q1(n.registerUpdateListener(({editorState:u})=>c(u)),()=>{l()})}function TO(n){let e=null,t=()=>{let r=getSelection(),o=r&&r.anchorNode,s=n.getRootElement();o!==null&&s!==null&&s.contains(o)?e!==null&&(e(),e=null):e===null&&(e=tb(n))};return document.addEventListener("selectionchange",t),()=>{e!==null&&e(),document.removeEventListener("selectionchange",t)}}var NO=_O,nb=Dn,EO=J1,AO=yO,wO=Z1,vO=bO,OO=bp,rb=mO,kO=xO,LO=CO;function RO(n,...e){let t=X1(...e);t.length>0&&n.classList.add(...t)}function MO(n,...e){let t=X1(...e);t.length>0&&n.classList.remove(...t)}function ob(n,e){for(let t of e)if(n.type.startsWith(t))return!0;return!1}function DO(n,e){let t=n[Symbol.iterator]();return new Promise((r,o)=>{let s=[],i=()=>{let{done:a,value:l}=t.next();if(a)return r(s);let c=new FileReader;c.addEventListener("error",o),c.addEventListener("load",()=>{let u=c.result;typeof u=="string"&&s.push({file:l,result:u}),i()}),ob(l,e)?c.readAsDataURL(l):i()};i()})}function IO(n,e){return Array.from(sb(n,e))}function $O(n){return n?n.getAdjacentCaret():null}function PO(n,e){return Array.from(lb(n,e))}function sb(n,e){return ib("next",n,e)}function ib(n,e,t){let r=Be(),o=e||r,s=F(o)?ln(o,n):mt(o,n),i=ab(o),a=t?$a(np(mt(t,n))):function(c,u){let d=ds(mt(c,u));return d&&d[0]}(o,n),l=i;return up({hasNext:c=>c!==null,initial:s,map:c=>({depth:l,node:c.origin}),step:c=>{if(c.isSameNodeCaret(a))return null;bo(c)&&l++;let u=ds(c);return!u||u[0].isSameNodeCaret(a)?null:(l+=u[1],u[0])}})}function FO(n){let e=ds(mt(n,"next"));return e&&[e[0].origin,e[1]]}function ab(n){let e=-1;for(let t=n;t!==null;t=t.getParent())e++;return e}function BO(n){let e=np(mt(n,"previous")),t=ds(e,"root");return t&&t[0].origin}function lb(n,e){return ib("previous",n,e)}function HO(n,e){let t=n;for(;t!=null;){if(t instanceof e)return t;t=t.getParent()}return null}function zO(n){let e=yo(n,t=>F(t)&&!t.isInline());return F(e)||yu(4,n.__key),e}function KO(n,e,t,r){let o=s=>s instanceof e;return n.registerNodeTransform(e,s=>{let i=(a=>{let l=a.getChildren();for(let d=0;do.insertAfter(s))),o.remove());return r}function XO(n,e){let t=[],r=Array.from(n).reverse();for(let o=r.pop();o!==void 0;o=r.pop())if(e(o))t.push(o);else if(F(o))for(let s of Sp(o))r.push(s);return t}function QO(n){return db(ln(n,"next"))}function Sp(n){return db(ln(n,"previous"))}function db(n){return up({hasNext:Qc,initial:n.getAdjacentCaret(),map:e=>e.origin.getLatest(),step:e=>e.getAdjacentCaret()})}function ek(n){d1(mt(n,"next")).splice(1,n.getChildren())}function tk(n){let e=r=>gi(r,n),t=(r,o)=>To(r,n,o);return{$get:e,$set:t,accessors:[e,t],makeGetterMethod:()=>function(){return e(this)},makeSetterMethod:()=>function(r){return t(this,r)},stateConfig:n}}var te=Tp,wi=te.$descendantsMatching,yI=te.$dfs,bI=te.$dfsIterator,hb=te.$filter,oe=te.$findMatchingParent,Np=te.$firstToLastIterator,bu=te.$getAdjacentCaret,SI=te.$getAdjacentSiblingOrParentSiblingCaret,TI=te.$getDepth,qa=te.$getNearestBlockElementAncestorOrThrow,nr=te.$getNearestNodeOfType,NI=te.$getNextRightPreorderNode,EI=te.$getNextSiblingOrParentSibling,Za=te.$insertFirst,gb=te.$insertNodeToNearestRoot,AI=te.$insertNodeToNearestRootAtCaret,wI=te.$isEditorIsNestedEditor,vI=te.$lastToFirstIterator,OI=te.$restoreEditorState,kI=te.$reverseDfs,LI=te.$reverseDfsIterator,RI=te.$splitNode,Ja=te.$unwrapAndFilterDescendants,MI=te.$unwrapNode,Su=te.$wrapNodeInElement,DI=te.CAN_USE_BEFORE_INPUT,II=te.CAN_USE_DOM,$I=te.IS_ANDROID,PI=te.IS_ANDROID_CHROME,FI=te.IS_APPLE,BI=te.IS_APPLE_WEBKIT,HI=te.IS_CHROME,zI=te.IS_FIREFOX,KI=te.IS_IOS,UI=te.IS_SAFARI,_e=te.addClassNamesToElement,fb=te.calculateZoomLevel,Ep=te.isBlockDomNode,Tu=te.isHTMLAnchorElement,Xe=te.isHTMLElement,WI=te.isInlineDomNode,GI=te.isMimeType,VI=te.makeStateWrapper,YI=te.markSelection,jI=te.mediaFileReader,Ee=te.mergeRegister,At=te.objectKlassEquals,qI=te.positionNodeOnRange,ZI=te.registerNestedElementResolver,wt=te.removeClassNamesFromElement,JI=te.selectionAlwaysOnDisplay;var Bp={};Lt(Bp,{$createHorizontalRuleNode:()=>Fp,$isHorizontalRuleNode:()=>Mb,AutoFocusExtension:()=>ok,ClearEditorExtension:()=>sk,EditorStateExtension:()=>wu,HorizontalRuleExtension:()=>_k,HorizontalRuleNode:()=>Gr,INSERT_HORIZONTAL_RULE_COMMAND:()=>pk,InitialStateExtension:()=>Lb,LexicalBuilder:()=>rr,NodeSelectionExtension:()=>Dp,TabIndentationExtension:()=>Ck,batch:()=>yb,buildEditorFromExtensions:()=>uk,computed:()=>Tb,configExtension:()=>hu,declarePeerDependency:()=>T1,defineExtension:()=>ue,effect:()=>Mo,getExtensionDependencyFromEditor:()=>hk,getKnownTypesAndNodes:()=>ik,getPeerDependencyFromEditor:()=>Rb,getPeerDependencyFromEditorOrThrow:()=>gk,namedSignals:()=>Ou,registerClearEditor:()=>Ab,registerTabIndentation:()=>Db,safeCast:()=>xt,shallowMergeConfig:()=>Lo,signal:()=>ki,untracked:()=>kp,watchedSignal:()=>$p});var nk=Symbol.for("preact-signals");function vu(){if(Ro>1)return void Ro--;let n,e=!1;for(;Qa!==void 0;){let t=Qa;for(Qa=void 0,Lp++;t!==void 0;){let r=t.o;if(t.o=void 0,t.f&=-3,!(8&t.f)&&bb(t))try{t.c()}catch(o){e||(n=o,e=!0)}t=r}}if(Lp=0,Ro--,e)throw n}function yb(n){if(Ro>0)return n();Ro++;try{return n()}finally{vu()}}var Ae,Qa;function kp(n){let e=Ae;Ae=void 0;try{return n()}finally{Ae=e}}var Ro=0,Lp=0,Au=0;function pb(n){if(Ae===void 0)return;let e=n.n;return e===void 0||e.t!==Ae?(e={i:0,S:n,p:Ae.s,n:void 0,t:Ae,e:void 0,x:void 0,r:e},Ae.s!==void 0&&(Ae.s.n=e),Ae.s=e,n.n=e,32&Ae.f&&n.S(e),e):e.i===-1?(e.i=0,e.n!==void 0&&(e.n.p=e.p,e.p!==void 0&&(e.p.n=e.n),e.p=Ae.s,e.n=void 0,Ae.s.n=e,Ae.s=e),e):void 0}function Bt(n,e){this.v=n,this.i=0,this.n=void 0,this.t=void 0,this.W=e?.watched,this.Z=e?.unwatched,this.name=e?.name}function ki(n,e){return new Bt(n,e)}function bb(n){for(let e=n.s;e!==void 0;e=e.n)if(e.S.i!==e.i||!e.S.h()||e.S.i!==e.i)return!0;return!1}function mb(n){for(let e=n.s;e!==void 0;e=e.n){let t=e.S.n;if(t!==void 0&&(e.r=t),e.S.n=e,e.i=-1,e.n===void 0){n.s=e;break}}}function Sb(n){let e,t=n.s;for(;t!==void 0;){let r=t.p;t.i===-1?(t.S.U(t),r!==void 0&&(r.n=t.n),t.n!==void 0&&(t.n.p=r)):e=t,t.S.n=t.r,t.r!==void 0&&(t.r=void 0),t=r}n.s=e}function ms(n,e){Bt.call(this,void 0),this.x=n,this.s=void 0,this.g=Au-1,this.f=4,this.W=e?.watched,this.Z=e?.unwatched,this.name=e?.name}function Tb(n,e){return new ms(n,e)}function Nb(n){let e=n.u;if(n.u=void 0,typeof e=="function"){Ro++;let t=Ae;Ae=void 0;try{e()}catch(r){throw n.f&=-2,n.f|=8,Ip(n),r}finally{Ae=t,vu()}}}function Ip(n){for(let e=n.s;e!==void 0;e=e.n)e.S.U(e);n.x=void 0,n.s=void 0,Nb(n)}function rk(n){if(Ae!==this)throw new Error("Out-of-order effect");Sb(this),Ae=n,this.f&=-2,8&this.f&&Ip(this),vu()}function Oi(n,e){this.x=n,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32,this.name=e?.name}function Mo(n,e){let t=new Oi(n,e);try{t.c()}catch(o){throw t.d(),o}let r=t.d.bind(t);return r[Symbol.dispose]=r,r}function Ou(n,e={}){let t={};for(let r in n){let o=e[r],s=ki(o===void 0?n[r]:o);t[r]=s}return t}Bt.prototype.brand=nk,Bt.prototype.h=function(){return!0},Bt.prototype.S=function(n){let e=this.t;e!==n&&n.e===void 0&&(n.x=e,this.t=n,e!==void 0?e.e=n:kp(()=>{var t;(t=this.W)==null||t.call(this)}))},Bt.prototype.U=function(n){if(this.t!==void 0){let e=n.e,t=n.x;e!==void 0&&(e.x=t,n.e=void 0),t!==void 0&&(t.e=e,n.x=void 0),n===this.t&&(this.t=t,t===void 0&&kp(()=>{var r;(r=this.Z)==null||r.call(this)}))}},Bt.prototype.subscribe=function(n){return Mo(()=>{let e=this.value,t=Ae;Ae=void 0;try{n(e)}finally{Ae=t}},{name:"sub"})},Bt.prototype.valueOf=function(){return this.value},Bt.prototype.toString=function(){return this.value+""},Bt.prototype.toJSON=function(){return this.value},Bt.prototype.peek=function(){let n=Ae;Ae=void 0;try{return this.value}finally{Ae=n}},Object.defineProperty(Bt.prototype,"value",{get(){let n=pb(this);return n!==void 0&&(n.i=this.i),this.v},set(n){if(n!==this.v){if(Lp>100)throw new Error("Cycle detected");this.v=n,this.i++,Au++,Ro++;try{for(let e=this.t;e!==void 0;e=e.x)e.t.N()}finally{vu()}}}}),ms.prototype=new Bt,ms.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===Au))return!0;if(this.g=Au,this.f|=1,this.i>0&&!bb(this))return this.f&=-2,!0;let n=Ae;try{mb(this),Ae=this;let e=this.x();(16&this.f||this.v!==e||this.i===0)&&(this.v=e,this.f&=-17,this.i++)}catch(e){this.v=e,this.f|=16,this.i++}return Ae=n,Sb(this),this.f&=-2,!0},ms.prototype.S=function(n){if(this.t===void 0){this.f|=36;for(let e=this.s;e!==void 0;e=e.n)e.S.S(e)}Bt.prototype.S.call(this,n)},ms.prototype.U=function(n){if(this.t!==void 0&&(Bt.prototype.U.call(this,n),this.t===void 0)){this.f&=-33;for(let e=this.s;e!==void 0;e=e.n)e.S.U(e)}},ms.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(let n=this.t;n!==void 0;n=n.x)n.t.N()}},Object.defineProperty(ms.prototype,"value",{get(){if(1&this.f)throw new Error("Cycle detected");let n=pb(this);if(this.h(),n!==void 0&&(n.i=this.i),16&this.f)throw this.v;return this.v}}),Oi.prototype.c=function(){let n=this.S();try{if(8&this.f||this.x===void 0)return;let e=this.x();typeof e=="function"&&(this.u=e)}finally{n()}},Oi.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,Nb(this),mb(this),Ro++;let n=Ae;return Ae=this,rk.bind(this,n)},Oi.prototype.N=function(){2&this.f||(this.f|=2,this.o=Qa,Qa=this)},Oi.prototype.d=function(){this.f|=8,1&this.f||Ip(this)},Oi.prototype.dispose=function(){this.d()};var ok=ue({build:(n,e,t)=>Ou(e),config:xt({defaultSelection:"rootEnd",disabled:!1}),name:"@lexical/extension/AutoFocus",register(n,e,t){let r=t.getOutput();return Mo(()=>r.disabled.value?void 0:n.registerRootListener(o=>{n.focus(()=>{let s=document.activeElement;o===null||s!==null&&o.contains(s)||o.focus({preventScroll:!0})},{defaultSelection:r.defaultSelection.peek()})}))}});function Eb(){let n=Be(),e=w(),t=U();n.clear(),n.append(t),e!==null&&t.select(),v(e)&&(e.format=0)}function Ab(n,e=Eb){return n.registerCommand(nu,t=>(n.update(e),!0),W)}var sk=ue({build:(n,e,t)=>Ou(e),config:xt({$onClear:Eb}),name:"@lexical/extension/ClearEditor",register(n,e,t){let{$onClear:r}=t.getOutput();return Mo(()=>Ab(n,r.value))}});function ik(n){let e=new Set,t=new Set;for(let r of wb(n)){let o=typeof r=="function"?r:r.replace;e.add(o.getType()),t.add(o)}return{nodes:t,types:e}}function wb(n){return(typeof n.nodes=="function"?n.nodes():n.nodes)||[]}function $p(n,e){let t;return ki(n(),{unwatched(){t&&(t(),t=void 0)},watched(){this.value=n(),t=e(this)}})}var wu=ue({build:n=>$p(()=>n.getEditorState(),e=>n.registerUpdateListener(t=>{e.value=t.editorState})),name:"@lexical/extension/EditorState"});function ve(n,...e){let t=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",n);for(let o of e)r.append("v",o);throw t.search=r.toString(),Error(`Minified Lexical error #${n}; visit ${t.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function vb(n,e){if(n&&e&&!Array.isArray(e)&&typeof n=="object"&&typeof e=="object"){let t=n,r=e;for(let o in r)t[o]=vb(t[o],r[o]);return n}return e}var Pp=0,Rp=1,Ob=2,Ap=3,Nu=4,vi=5,wp=6,Xa=7;function vp(n){return n.id===Pp}function kb(n){return n.id===Ob}function ak(n){return function(e){return e.id===Rp}(n)||ve(305,String(n.id),String(Rp)),Object.assign(n,{id:Ob})}var lk=new Set,Mp=class{builder;configs;_dependency;_peerNameSet;extension;state;_signal;constructor(e,t){this.builder=e,this.extension=t,this.configs=new Set,this.state={id:Pp}}mergeConfigs(){let e=this.extension.config||{},t=this.extension.mergeConfig?this.extension.mergeConfig.bind(this.extension):Lo;for(let r of this.configs)e=t(e,r);return e}init(e){let t=this.state;kb(t)||ve(306,String(t.id));let r={getDependency:this.getInitDependency.bind(this),getDirectDependentNames:this.getDirectDependentNames.bind(this),getPeer:this.getInitPeer.bind(this),getPeerNameSet:this.getPeerNameSet.bind(this)},o={...r,getDependency:this.getDependency.bind(this),getInitResult:this.getInitResult.bind(this),getPeer:this.getPeer.bind(this)},s=function(a,l,c){return Object.assign(a,{config:l,id:Ap,registerState:c})}(t,this.mergeConfigs(),r),i;this.state=s,this.extension.init&&(i=this.extension.init(e,s.config,r)),this.state=function(a,l,c){return Object.assign(a,{id:Nu,initResult:l,registerState:c})}(s,i,o)}build(e){let t=this.state,r;t.id!==Nu&&ve(307,String(t.id),String(vi)),this.extension.build&&(r=this.extension.build(e,t.config,t.registerState));let o={...t.registerState,getOutput:()=>r,getSignal:this.getSignal.bind(this)};this.state=function(s,i,a){return Object.assign(s,{id:vi,output:i,registerState:a})}(t,r,o)}register(e,t){this._signal=t;let r=this.state;r.id!==vi&&ve(308,String(r.id),String(vi));let o=this.extension.register&&this.extension.register(e,r.config,r.registerState);return this.state=function(s){return Object.assign(s,{id:wp})}(r),()=>{let s=this.state;s.id!==Xa&&ve(309,String(r.id),String(Xa)),this.state=function(i){return Object.assign(i,{id:vi})}(s),o&&o()}}afterRegistration(e){let t=this.state,r;return t.id!==wp&&ve(310,String(t.id),String(wp)),this.extension.afterRegistration&&(r=this.extension.afterRegistration(e,t.config,t.registerState)),this.state=function(o){return Object.assign(o,{id:Xa})}(t),r}getSignal(){return this._signal===void 0&&ve(311),this._signal}getInitResult(){this.extension.init===void 0&&ve(312,this.extension.name);let e=this.state;return function(t){return t.id>=Nu}(e)||ve(313,String(e.id),String(Nu)),e.initResult}getInitPeer(e){let t=this.builder.extensionNameMap.get(e);return t?t.getExtensionInitDependency():void 0}getExtensionInitDependency(){let e=this.state;return function(t){return t.id>=Ap}(e)||ve(314,String(e.id),String(Ap)),{config:e.config}}getPeer(e){let t=this.builder.extensionNameMap.get(e);return t?t.getExtensionDependency():void 0}getInitDependency(e){let t=this.builder.getExtensionRep(e);return t===void 0&&ve(315,this.extension.name,e.name),t.getExtensionInitDependency()}getDependency(e){let t=this.builder.getExtensionRep(e);return t===void 0&&ve(315,this.extension.name,e.name),t.getExtensionDependency()}getState(){let e=this.state;return function(t){return t.id>=Xa}(e)||ve(316,String(e.id),String(Xa)),e}getDirectDependentNames(){return this.builder.incomingEdges.get(this.extension.name)||lk}getPeerNameSet(){let e=this._peerNameSet;return e||(e=new Set((this.extension.peerDependencies||[]).map(([t])=>t)),this._peerNameSet=e),e}getExtensionDependency(){if(!this._dependency){let e=this.state;(function(t){return t.id>=vi})(e)||ve(317,this.extension.name),this._dependency={config:e.config,init:e.initResult,output:e.output}}return this._dependency}},_b={tag:gs};function ck(){let n=Be();n.isEmpty()&&n.append(U())}var Lb=ue({config:xt({setOptions:_b,updateOptions:_b}),init:({$initialEditorState:n=ck})=>({$initialEditorState:n,initialized:!1}),afterRegistration(n,{updateOptions:e,setOptions:t},r){let o=r.getInitResult();if(!o.initialized){o.initialized=!0;let{$initialEditorState:s}=o;if(l1(s))n.setEditorState(s,t);else if(typeof s=="function")n.update(()=>{s(n)},e);else if(s&&(typeof s=="string"||typeof s=="object")){let i=n.parseEditorState(s);n.setEditorState(i,t)}}return()=>{}},name:"@lexical/extension/InitialState",nodes:[Va,Ft,C1,b1,Ga]}),Cb=Symbol.for("@lexical/extension/LexicalBuilder");function uk(...n){return rr.fromExtensions(n).buildEditor()}function xb(){}function dk(n){throw n}function Eu(n){return Array.isArray(n)?n:[n]}var Op="0.38.2+prod.esm",rr=class{roots;extensionNameMap;outgoingConfigEdges;incomingEdges;conflicts;_sortedExtensionReps;PACKAGE_VERSION;constructor(e){this.outgoingConfigEdges=new Map,this.incomingEdges=new Map,this.extensionNameMap=new Map,this.conflicts=new Map,this.PACKAGE_VERSION=Op,this.roots=e;for(let t of e)this.addExtension(t)}static fromExtensions(e){let t=[Eu(Lb)];for(let r of e)t.push(Eu(r));return new rr(t)}static maybeFromEditor(e){let t=e[Cb];return t&&(t.PACKAGE_VERSION!==Op&&ve(292,t.PACKAGE_VERSION,Op),t instanceof rr||ve(293)),t}static fromEditor(e){let t=rr.maybeFromEditor(e);return t===void 0&&ve(294),t}constructEditor(){let{$initialEditorState:e,onError:t,...r}=this.buildCreateEditorArgs(),o=Object.assign(S1({...r,...t?{onError:s=>{t(s,o)}}:{}}),{[Cb]:this});for(let s of this.sortedExtensionReps())s.build(o);return o}buildEditor(){let e=xb;function t(){try{e()}finally{e=xb}}let r=Object.assign(this.constructEditor(),{dispose:t,[Symbol.dispose]:t});return e=Ee(this.registerEditor(r),()=>r.setRootElement(null)),r}hasExtensionByName(e){return this.extensionNameMap.has(e)}getExtensionRep(e){let t=this.extensionNameMap.get(e.name);if(t)return t.extension!==e&&ve(295,e.name),t}addEdge(e,t,r){let o=this.outgoingConfigEdges.get(e);o?o.set(t,r):this.outgoingConfigEdges.set(e,new Map([[t,r]]));let s=this.incomingEdges.get(t);s?s.add(e):this.incomingEdges.set(t,new Set([e]))}addExtension(e){this._sortedExtensionReps!==void 0&&ve(296);let t=Eu(e),[r]=t;typeof r.name!="string"&&ve(297,typeof r.name);let o=this.extensionNameMap.get(r.name);if(o!==void 0&&o.extension!==r&&ve(298,r.name),!o){o=new Mp(this,r),this.extensionNameMap.set(r.name,o);let s=this.conflicts.get(r.name);typeof s=="string"&&ve(299,r.name,s);for(let i of r.conflictsWith||[])this.extensionNameMap.has(i)&&ve(299,r.name,i),this.conflicts.set(i,r.name);for(let i of r.dependencies||[]){let a=Eu(i);this.addEdge(r.name,a[0].name,a.slice(1)),this.addExtension(a)}for(let[i,a]of r.peerDependencies||[])this.addEdge(r.name,i,a?[a]:[])}}sortedExtensionReps(){if(this._sortedExtensionReps)return this._sortedExtensionReps;let e=[],t=(r,o)=>{let s=r.state;if(kb(s))return;let i=r.extension.name;var a;vp(s)||ve(300,i,o||"[unknown]"),vp(a=s)||ve(304,String(a.id),String(Pp)),s=Object.assign(a,{id:Rp}),r.state=s;let l=this.outgoingConfigEdges.get(i);if(l)for(let c of l.keys()){let u=this.extensionNameMap.get(c);u&&t(u,i)}s=ak(s),r.state=s,e.push(r)};for(let r of this.extensionNameMap.values())vp(r.state)&&t(r);for(let r of e)for(let[o,s]of this.outgoingConfigEdges.get(r.extension.name)||[])if(s.length>0){let i=this.extensionNameMap.get(o);if(i)for(let a of s)i.configs.add(a)}for(let[r,...o]of this.roots)if(o.length>0){let s=this.extensionNameMap.get(r.name);s===void 0&&ve(301,r.name);for(let i of o)s.configs.add(i)}return this._sortedExtensionReps=e,this._sortedExtensionReps}registerEditor(e){let t=this.sortedExtensionReps(),r=new AbortController,o=[()=>r.abort()],s=r.signal;for(let i of t){let a=i.register(e,s);a&&o.push(a)}for(let i of t){let a=i.afterRegistration(e);a&&o.push(a)}return Ee(...o)}buildCreateEditorArgs(){let e={},t=new Set,r=new Map,o=new Map,s={},i={},a=this.sortedExtensionReps();for(let u of a){let{extension:d}=u;if(d.onError!==void 0&&(e.onError=d.onError),d.disableEvents!==void 0&&(e.disableEvents=d.disableEvents),d.parentEditor!==void 0&&(e.parentEditor=d.parentEditor),d.editable!==void 0&&(e.editable=d.editable),d.namespace!==void 0&&(e.namespace=d.namespace),d.$initialEditorState!==void 0&&(e.$initialEditorState=d.$initialEditorState),d.nodes)for(let h of wb(d)){if(typeof h!="function"){let g=r.get(h.replace);g&&ve(302,d.name,h.replace.name,g.extension.name),r.set(h.replace,u)}t.add(h)}if(d.html){if(d.html.export)for(let[h,g]of d.html.export.entries())o.set(h,g);d.html.import&&Object.assign(s,d.html.import)}d.theme&&vb(i,d.theme)}Object.keys(i).length>0&&(e.theme=i),t.size&&(e.nodes=[...t]);let l=Object.keys(s).length>0,c=o.size>0;(l||c)&&(e.html={},l&&(e.html.import=s),c&&(e.html.export=o));for(let u of a)u.init(e);return e.onError||(e.onError=dk),e}};function hk(n,e){let t=rr.fromEditor(n).getExtensionRep(e);return t===void 0&&ve(303,e.name),t.getExtensionDependency()}function Rb(n,e){let t=rr.fromEditor(n).extensionNameMap.get(e);return t?t.getExtensionDependency():void 0}function gk(n,e){let t=Rb(n,e);return t===void 0&&ve(291,e),t}var fk=new Set,Dp=ue({build(n,e,t){let r=t.getDependency(wu).output,o=ki({watchedNodeKeys:new Map}),s=$p(()=>{},()=>Mo(()=>{let i=s.peek(),{watchedNodeKeys:a}=o.value,l,c=!1;r.value.read(()=>{if(w())for(let[u,d]of a.entries()){if(d.size===0){a.delete(u);continue}let h=Fe(u),g=h&&h.isSelected()||!1;c=c||g!==(!!i&&i.has(u)),g&&(l=l||new Set,l.add(u))}}),!c&&l&&i&&l.size===i.size||(s.value=l)}));return{watchNodeKey:function(i){let a=Tb(()=>(s.value||fk).has(i)),{watchedNodeKeys:l}=o.peek(),c=l.get(i),u=c!==void 0;return c=c||new Set,c.add(a),u||(l.set(i,c),o.value={watchedNodeKeys:l}),a}}},dependencies:[wu],name:"@lexical/extension/NodeSelection"}),pk=Ct("INSERT_HORIZONTAL_RULE_COMMAND"),Gr=class extends Eo{static getType(){return"horizontalrule"}static clone(e){return new Gr(e.__key)}static importJSON(e){return Fp().updateFromJSON(e)}static importDOM(){return{hr:()=>({conversion:mk,priority:0})}}exportDOM(){return{element:document.createElement("hr")}}createDOM(e){let t=document.createElement("hr");return _e(t,e.theme.hr),t}getTextContent(){return` +`}isInline(){return!1}updateDOM(){return!1}};function mk(){return{node:Fp()}}function Fp(){return hi(Gr)}function Mb(n){return n instanceof Gr}var _k=ue({dependencies:[wu,Dp],name:"@lexical/extension/HorizontalRule",nodes:[Gr],register(n,e,t){let{watchNodeKey:r}=t.getDependency(Dp).output,o=ki({nodeSelections:new Map}),s=n._config.theme.hrSelected??"selected";return Ee(n.registerCommand(No,i=>{if(jt(i.target)){let a=s1(i.target);if(Mb(a))return function(l,c=!1){let u=w(),d=l.isSelected(),h=l.getKey(),g;c&&Ke(u)?g=u:(g=Jc(),De(g)),d?g.delete(h):g.add(h)}(a,i.shiftKey),!0}return!1},de),n.registerMutationListener(Gr,(i,a)=>{yb(()=>{let l=!1,{nodeSelections:c}=o.peek();for(let[u,d]of i.entries())if(d==="destroyed")c.delete(u),l=!0;else{let h=c.get(u),g=n.getElementByKey(u);h?h.domNode.value=g:(l=!0,c.set(u,{domNode:ki(g),selectedSignal:r(u)}))}l&&(o.value={nodeSelections:c})})}),Mo(()=>{let i=[];for(let{domNode:a,selectedSignal:l}of o.value.nodeSelections.values())i.push(Mo(()=>{let c=a.value;c&&(l.value?_e(c,s):wt(c,s))}));return Ee(...i)}))}});function Db(n,e){return Ee(n.registerCommand(_n,t=>{let r=w();if(!v(r))return!1;t.preventDefault();let o=function(s){let i=s.getNodes();if(hb(i,h=>fi(h)&&h.canIndent()?h:null).length>0)return!0;let a=s.anchor,l=s.focus,c=l.isBefore(a)?l:a,u=c.getNode(),d=qa(u);if(d.canIndent()){let h=d.getKey(),g=Zn();if(g.anchor.set(h,0,"element"),g.focus.set(h,0,"element"),g=zr(g),g.anchor.is(c))return!0}return!1}(r)?t.shiftKey?hn:$t:Ao;return n.dispatchCommand(o,void 0)},W),n.registerCommand($t,()=>{let t=typeof e=="number"?e:e?e.peek():null;if(t==null)return!1;let r=w();if(!v(r))return!1;let o=r.getNodes().map(s=>qa(s).getIndent());return Math.max(...o)+1>=t},Jn))}var Ck=ue({build:(n,e,t)=>Ou(e),config:xt({disabled:!1,maxIndent:null}),name:"@lexical/extension/TabIndentation",register(n,e,t){let{disabled:r,maxIndent:o}=t.getOutput();return Mo(()=>{if(!r.value)return Db(n,o)})}});var Se=Bp,n$=Se.$createHorizontalRuleNode,r$=Se.$isHorizontalRuleNode,o$=Se.AutoFocusExtension,s$=Se.ClearEditorExtension,i$=Se.EditorStateExtension,a$=Se.HorizontalRuleExtension,l$=Se.HorizontalRuleNode,c$=Se.INSERT_HORIZONTAL_RULE_COMMAND,u$=Se.InitialStateExtension,d$=Se.LexicalBuilder,h$=Se.NodeSelectionExtension,g$=Se.TabIndentationExtension,Ib=Se.batch,$b=Se.buildEditorFromExtensions,f$=Se.computed,p$=Se.configExtension,m$=Se.declarePeerDependency,_$=Se.defineExtension,Ht=Se.effect,C$=Se.getExtensionDependencyFromEditor,x$=Se.getKnownTypesAndNodes,Pb=Se.getPeerDependencyFromEditor,y$=Se.getPeerDependencyFromEditorOrThrow,In=Se.namedSignals,b$=Se.registerClearEditor,S$=Se.registerTabIndentation,T$=Se.safeCast,N$=Se.shallowMergeConfig,E$=Se.signal,A$=Se.untracked,w$=Se.watchedSignal;var Wp={};Lt(Wp,{$createListItemNode:()=>gn,$createListNode:()=>qt,$getListDepth:()=>ku,$handleListInsertParagraph:()=>qb,$insertList:()=>el,$isListItemNode:()=>he,$isListNode:()=>ae,$removeList:()=>Up,CheckListExtension:()=>Ak,INSERT_CHECK_LIST_COMMAND:()=>Zb,INSERT_ORDERED_LIST_COMMAND:()=>tS,INSERT_UNORDERED_LIST_COMMAND:()=>eS,ListExtension:()=>sS,ListItemNode:()=>Io,ListNode:()=>Cs,REMOVE_LIST_COMMAND:()=>nS,UPDATE_LIST_START_COMMAND:()=>Qb,insertList:()=>Nk,registerCheckList:()=>Jb,registerList:()=>rS,registerListStrictIndentTransform:()=>oS,removeList:()=>Ek});function Do(n,...e){let t=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",n);for(let o of e)r.append("v",o);throw t.search=r.toString(),Error(`Minified Lexical error #${n}; visit ${t.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function ku(n){let e=1,t=n.getParent();for(;t!=null;){if(he(t)){let r=t.getParent();if(ae(r)){e++,t=r.getParent();continue}Do(40)}return e}return e}function Hp(n){let e=n.getParent();ae(e)||Do(40);let t=e;for(;t!==null;)t=t.getParent(),ae(t)&&(e=t);return e}function Vb(n){let e=[],t=n.getChildren().filter(he);for(let r=0;r0&&n.append(...o),e.remove()}function Up(){let n=w();if(v(n)){let e=new Set,t=n.getNodes(),r=n.anchor.getNode();if(Yb(r,t))e.add(Hp(r));else for(let o=0;oa.append(u));let l=gn(),c=qt(s);l.append(c),_s(c,n.getNextSiblings()),t.insertBefore(i),t.insertAfter(l),t.replace(n)}}}function qb(){let n=w();if(!v(n)||!n.isCollapsed())return!1;let e=n.anchor.getNode();if(!he(e)||e.getChildrenSize()!==0)return!1;let t=Hp(e),r=e.getParent();ae(r)||Do(40);let o=r.getParent(),s;if(Ze(o))s=U(),t.insertAfter(s);else{if(!he(o))return!1;s=gn(),o.insertAfter(s)}s.setTextStyle(n.style).setTextFormat(n.format).select();let i=e.getNextSiblings();if(i.length>0){let a=qt(r.getListType());if(he(s)){let l=gn();l.append(a),s.insertAfter(l)}else s.insertAfter(a);a.append(...i)}return function(a){let l=a;for(;l.getNextSibling()==null&&l.getPreviousSibling()==null;){let c=l.getParent();if(c==null||!he(c)&&!ae(c))break;l=c}l.remove()}(e),!0}function Lu(...n){let e=[];for(let t of n)if(t&&typeof t=="string")for(let[r]of t.matchAll(/\S+/g))e.push(r);return e}var Io=class extends Ye{__value;__checked;$config(){return this.config("listitem",{$transform:e=>{if(e.__checked==null)return;let t=e.getParent();ae(t)&&t.getListType()!=="check"&&e.getChecked()!=null&&e.setChecked(void 0)},extends:Ye,importDOM:ap({li:()=>({conversion:bk,priority:0})})})}constructor(e=1,t=void 0,r){super(r),this.__value=e===void 0?1:e,this.__checked=t}afterCloneFrom(e){super.afterCloneFrom(e),this.__value=e.__value,this.__checked=e.__checked}createDOM(e){let t=document.createElement("li");return this.updateListItemDOM(null,t,e),t}updateListItemDOM(e,t,r){(function(i,a,l){let c=a.getParent();!ae(c)||c.getListType()!=="check"||ae(a.getFirstChild())?(i.removeAttribute("role"),i.removeAttribute("tabIndex"),i.removeAttribute("aria-checked")):(i.setAttribute("role","checkbox"),i.setAttribute("tabIndex","-1"),l&&a.__checked===l.__checked||i.setAttribute("aria-checked",a.getChecked()?"true":"false"))})(t,this,e),t.value=this.__value,function(i,a,l){let c=[],u=[],d=a.list,h=d?d.listitem:void 0,g;if(d&&d.nested&&(g=d.nested.listitem),h!==void 0&&c.push(...Lu(h)),d){let f=l.getParent(),p=ae(f)&&f.getListType()==="check",m=l.getChecked();p&&!m||u.push(d.listitemUnchecked),p&&m||u.push(d.listitemChecked),p&&c.push(m?d.listitemChecked:d.listitemUnchecked)}if(g!==void 0){let f=Lu(g);l.getChildren().some(p=>ae(p))?c.push(...f):u.push(...f)}u.length>0&&wt(i,...u),c.length>0&&_e(i,...c)}(t,r.theme,this);let o=e?e.__style:"",s=this.__style;o!==s&&(s===""?t.removeAttribute("style"):t.style.cssText=s),function(i,a,l){let c=ps(a.__textStyle);for(let u in c)i.style.setProperty(`--listitem-marker-${u}`,c[u]);if(l)for(let u in ps(l.__textStyle))u in c||i.style.removeProperty(`--listitem-marker-${u}`)}(t,this,e)}updateDOM(e,t,r){let o=t;return this.updateListItemDOM(e,o,r),!1}updateFromJSON(e){return super.updateFromJSON(e).setValue(e.value).setChecked(e.checked)}exportDOM(e){let t=this.createDOM(e._config),r=this.getFormatType();r&&(t.style.textAlign=r);let o=this.getDirection();return o&&(t.dir=o),{element:t}}exportJSON(){return{...super.exportJSON(),checked:this.getChecked(),value:this.getValue()}}append(...e){for(let t=0;t{e.append(o)})),this.remove(),r.getChildrenSize()===0&&r.remove(),e}insertAfter(e,t=!0){let r=this.getParentOrThrow();if(ae(r)||Do(39),he(e))return super.insertAfter(e,t);let o=this.getNextSiblings();if(r.insertAfter(e,t),o.length!==0){let s=qt(r.getListType());o.forEach(i=>s.append(i)),e.insertAfter(s,t)}return e}remove(e){let t=this.getPreviousSibling(),r=this.getNextSibling();super.remove(e),t&&r&&or(t)&&or(r)&&(Kp(t.getFirstChild(),r.getFirstChild()),r.remove())}insertNewAfter(e,t=!0){let r=gn().updateFromJSON(this.exportJSON()).setChecked(!this.getChecked()&&void 0);return this.insertAfter(r,t),r}collapseAtStart(e){let t=U();this.getChildren().forEach(i=>t.append(i));let r=this.getParentOrThrow(),o=r.getParentOrThrow(),s=he(o);if(r.getChildrenSize()===1)if(s)r.remove(),o.select();else{r.insertBefore(t),r.remove();let i=e.anchor,a=e.focus,l=t.getKey();i.type==="element"&&i.getNode().is(this)&&i.set(l,i.offset,"element"),a.type==="element"&&a.getNode().is(this)&&a.set(l,a.offset,"element")}else r.insertBefore(t),this.remove();return!0}getValue(){return this.getLatest().__value}setValue(e){let t=this.getWritable();return t.__value=e,t}getChecked(){let e=this.getLatest(),t,r=this.getParent();return ae(r)&&(t=r.getListType()),t==="check"?Boolean(e.__checked):void 0}setChecked(e){let t=this.getWritable();return t.__checked=e,t}toggleChecked(){let e=this.getWritable();return e.setChecked(!e.__checked)}getIndent(){let e=this.getParent();if(e===null||!this.isAttached())return this.getLatest().__indent;let t=e.getParentOrThrow(),r=0;for(;he(t);)t=t.getParentOrThrow().getParentOrThrow(),r++;return r}setIndent(e){typeof e!="number"&&Do(117),(e=Math.floor(e))>=0||Do(199);let t=this.getIndent();for(;t!==e;)t0&&t.children[0].tagName==="INPUT")return Hb(t.children[0])}let e=n.getAttribute("aria-checked");return{node:gn(e==="true"||e!=="false"&&void 0)}}function Hb(n){return n.getAttribute("type")!=="checkbox"?{node:null}:{node:gn(n.hasAttribute("checked"))}}function gn(n){return ft(new Io(void 0,n))}function he(n){return n instanceof Io}var Cs=class extends Ye{__tag;__start;__listType;$config(){return this.config("list",{$transform:e=>{(function(t){let r=t.getNextSibling();ae(r)&&t.getListType()===r.getListType()&&Kp(t,r)})(e),jb(e)},extends:Ye,importDOM:ap({ol:()=>({conversion:Kb,priority:0}),ul:()=>({conversion:Kb,priority:0})})})}constructor(e="number",t=1,r){super(r);let o=Tk[e]||e;this.__listType=o,this.__tag=o==="number"?"ol":"ul",this.__start=t}afterCloneFrom(e){super.afterCloneFrom(e),this.__listType=e.__listType,this.__tag=e.__tag,this.__start=e.__start}getTag(){return this.getLatest().__tag}setListType(e){let t=this.getWritable();return t.__listType=e,t.__tag=e==="number"?"ol":"ul",t}getListType(){return this.getLatest().__listType}getStart(){return this.getLatest().__start}setStart(e){let t=this.getWritable();return t.__start=e,t}createDOM(e,t){let r=this.__tag,o=document.createElement(r);return this.__start!==1&&o.setAttribute("start",String(this.__start)),o.__lexicalListType=this.__listType,zb(o,e.theme,this),o}updateDOM(e,t,r){return e.__tag!==this.__tag||e.__listType!==this.__listType||(zb(t,r.theme,this),!1)}updateFromJSON(e){return super.updateFromJSON(e).setListType(e.listType).setStart(e.start)}exportDOM(e){let t=this.createDOM(e._config,e);return Xe(t)&&(this.__start!==1&&t.setAttribute("start",String(this.__start)),this.__listType==="check"&&t.setAttribute("__lexicalListType","check")),{element:t}}exportJSON(){return{...super.exportJSON(),listType:this.getListType(),start:this.getStart(),tag:this.getTag()}}canBeEmpty(){return!1}canIndent(){return!1}splice(e,t,r){let o=r;for(let s=0;s1?r.push(...f):o.push(...f)}}o.length>0&&wt(n,...o),r.length>0&&_e(n,...r)}function Sk(n){let e=[];for(let t=0;t1&&o.forEach(s=>{ae(s)&&e.push(Fb(s))})}else e.push(Fb(r))}return e}function Kb(n){let e=n.nodeName.toLowerCase(),t=null;return e==="ol"?t=qt("number",n.start):e==="ul"&&(t=function(r){if(r.getAttribute("__lexicallisttype")==="check"||r.classList.contains("contains-task-list")||r.getAttribute("data-is-checklist")==="1")return!0;for(let o of r.childNodes)if(Xe(o)&&o.hasAttribute("aria-checked"))return!0;return!1}(n)?qt("check"):qt("bullet")),{after:Sk,node:t}}var Tk={ol:"number",ul:"bullet"};function qt(n="number",e=1){return ft(new Cs(n,e))}function ae(n){return n instanceof Cs}var Zb=Ct("INSERT_CHECK_LIST_COMMAND");function Jb(n){return Ee(n.registerCommand(Zb,()=>(el("check"),!0),de),n.registerCommand(dn,e=>Gb(e,n,!1),de),n.registerCommand(Pt,e=>Gb(e,n,!0),de),n.registerCommand(Ti,()=>{if(zp()!=null){let e=n.getRootElement();return e?.focus(),!0}return!1},de),n.registerCommand(Ni,e=>{let t=zp();return!(t==null||!n.isEditable())&&(n.update(()=>{let r=We(t);he(r)&&(e.preventDefault(),r.toggleChecked())}),!0)},de),n.registerCommand(Qn,e=>n.getEditorState().read(()=>{let t=w();if(v(t)&&t.isCollapsed()){let{anchor:r}=t,o=r.type==="element";if(o||r.offset===0){let s=r.getNode(),i=oe(s,a=>F(a)&&!a.isInline());if(he(i)){let a=i.getParent();if(ae(a)&&a.getListType()==="check"&&(o||i.getFirstDescendant()===s)){let l=n.getElementByKey(i.__key);if(l!=null&&document.activeElement!==l)return l.focus(),e.preventDefault(),!0}}}}return!1}),de),n.registerRootListener((e,t)=>{e!==null&&(e.addEventListener("click",Ub),e.addEventListener("pointerdown",Wb)),t!==null&&(t.removeEventListener("click",Ub),t.removeEventListener("pointerdown",Wb))}))}function Xb(n,e){let t=n.target;if(!Xe(t))return;let r=t.firstChild;if(Xe(r)&&(r.tagName==="UL"||r.tagName==="OL"))return;let o=t.parentNode;if(!o||o.__lexicalListType!=="check")return;let s=t.getBoundingClientRect(),i=fb(t),a=n.clientX/i,l=window.getComputedStyle?window.getComputedStyle(t,"::before"):{width:"0px"},c=parseFloat(l.width),u=n.pointerType==="touch"?32:0;(t.dir==="rtl"?as.right-c-u:a>s.left-u&&a{if(Xe(n.target)){let e=n.target,t=fu(e);t!=null&&t.isEditable()&&t.update(()=>{let r=We(e);he(r)&&(e.focus(),r.toggleChecked())})}})}function Wb(n){Xb(n,()=>{n.preventDefault()})}function zp(){let n=document.activeElement;return Xe(n)&&n.tagName==="LI"&&n.parentNode!=null&&n.parentNode.__lexicalListType==="check"?n:null}function Gb(n,e,t){let r=zp();return r!=null&&e.update(()=>{let o=We(r);if(!he(o))return;let s=function(i,a){let l=a?i.getPreviousSibling():i.getNextSibling(),c=i;for(;l==null&&he(c);)c=c.getParentOrThrow().getParent(),c!=null&&(l=a?c.getPreviousSibling():c.getNextSibling());for(;he(l);){let u=a?l.getLastChild():l.getFirstChild();if(!ae(u))return l;l=a?u.getLastChild():u.getFirstChild()}return null}(o,t);if(s!=null){s.selectStart();let i=e.getElementByKey(s.__key);i!=null&&(n.preventDefault(),setTimeout(()=>{i.focus()},0))}}),!1}var Qb=Ct("UPDATE_LIST_START_COMMAND"),eS=Ct("INSERT_UNORDERED_LIST_COMMAND"),tS=Ct("INSERT_ORDERED_LIST_COMMAND"),nS=Ct("REMOVE_LIST_COMMAND");function rS(n){return Ee(n.registerCommand(tS,()=>(el("number"),!0),de),n.registerCommand(Qb,e=>{let{listNodeKey:t,newStart:r}=e,o=Fe(t);return!!ae(o)&&(o.getListType()==="number"&&(o.setStart(r),jb(o)),!0)},de),n.registerCommand(eS,()=>(el("bullet"),!0),de),n.registerCommand(nS,()=>(Up(),!0),de),n.registerCommand(Xn,()=>qb(),de),n.registerNodeTransform(Io,e=>{let t=e.getFirstChild();if(t){if(B(t)){let r=t.getStyle(),o=t.getFormat();e.getTextStyle()!==r&&e.setTextStyle(r),e.getTextFormat()!==o&&e.setTextFormat(o)}}else{let r=w();v(r)&&(r.style!==e.getTextStyle()||r.format!==e.getTextFormat())&&r.isCollapsed()&&e.is(r.anchor.getNode())&&e.setTextStyle(r.style).setTextFormat(r.format)}}),n.registerNodeTransform(Ft,e=>{let t=e.getParent();if(he(t)&&e.is(t.getFirstChild())){let r=e.getStyle(),o=e.getFormat();r===t.getTextStyle()&&o===t.getTextFormat()||t.setTextStyle(r).setTextFormat(o)}}))}function oS(n){let e=t=>{let r=t.getParent();if(ae(t.getFirstChild())||!ae(r))return;let o=oe(t,s=>he(s)&&ae(s.getParent())&&he(s.getPreviousSibling()));if(o===null&&t.getIndent()>0)t.setIndent(0);else if(he(o)){let s=o.getPreviousSibling();if(he(s)){let i=function(l){let c=l,u=c.getFirstChild();for(;ae(u);){let d=u.getLastChild();if(!he(d))break;c=d,u=c.getFirstChild()}return c}(s),a=i.getParent();if(ae(a)){let l=ku(a);l+1{let r=[t];for(;r.length>0;){let o=r.shift();if(ae(o)){for(let s of o.getChildren())if(he(s)){e(s);let i=s.getFirstChild();ae(i)&&r.push(i)}}}})}function Nk(n,e){n.update(()=>el(e))}function Ek(n){n.update(()=>Up())}var sS=ue({build:(n,e,t)=>In(e),config:xt({hasStrictIndent:!1}),name:"@lexical/list/List",nodes:[Cs,Io],register(n,e,t){let r=t.getOutput();return Ee(rS(n),Ht(()=>r.hasStrictIndent.value?oS(n):void 0))}}),Ak=ue({dependencies:[sS],name:"@lexical/list/CheckList",register:Jb});var Ge=Wp,iS=Ge.$createListItemNode,Ru=Ge.$createListNode,aS=Ge.$getListDepth,M$=Ge.$handleListInsertParagraph,D$=Ge.$insertList,$o=Ge.$isListItemNode,zt=Ge.$isListNode,I$=Ge.$removeList,$$=Ge.CheckListExtension,P$=Ge.INSERT_CHECK_LIST_COMMAND,lS=Ge.INSERT_ORDERED_LIST_COMMAND,cS=Ge.INSERT_UNORDERED_LIST_COMMAND,F$=Ge.ListExtension,Po=Ge.ListItemNode,Fo=Ge.ListNode,B$=Ge.REMOVE_LIST_COMMAND,H$=Ge.UPDATE_LIST_START_COMMAND,z$=Ge.insertList,K$=Ge.registerCheckList,uS=Ge.registerList,U$=Ge.registerListStrictIndentTransform,W$=Ge.removeList;var qp={};Lt(qp,{$createAutoLinkNode:()=>Du,$createLinkNode:()=>xs,$isAutoLinkNode:()=>ir,$isLinkNode:()=>sr,$toggleLink:()=>tl,AutoLinkExtension:()=>$k,AutoLinkNode:()=>ys,ClickableLinkExtension:()=>kk,LinkExtension:()=>jp,LinkNode:()=>Vr,TOGGLE_LINK_COMMAND:()=>Iu,createLinkMatcherWithRegExp:()=>Lk,formatUrl:()=>Vp,registerAutoLink:()=>xS,registerClickableLink:()=>gS,registerLink:()=>hS,toggleLink:()=>Pk});var wk=new Set(["http:","https:","mailto:","sms:","tel:"]),Vr=class extends Ye{__url;__target;__rel;__title;static getType(){return"link"}static clone(e){return new Vr(e.__url,{rel:e.__rel,target:e.__target,title:e.__title},e.__key)}constructor(e="",t={},r){super(r);let{target:o=null,rel:s=null,title:i=null}=t;this.__url=e,this.__target=o,this.__rel=s,this.__title=i}createDOM(e){let t=document.createElement("a");return this.updateLinkDOM(null,t,e),_e(t,e.theme.link),t}updateLinkDOM(e,t,r){if(Tu(t)){e&&e.__url===this.__url||(t.href=this.sanitizeUrl(this.__url));for(let o of["target","rel","title"]){let s=`__${o}`,i=this[s];e&&e[s]===i||(i?t[o]=i:t.removeAttribute(o))}}}updateDOM(e,t,r){return this.updateLinkDOM(e,t,r),!1}static importDOM(){return{a:e=>({conversion:vk,priority:1})}}static importJSON(e){return xs().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setURL(e.url).setRel(e.rel||null).setTarget(e.target||null).setTitle(e.title||null)}sanitizeUrl(e){e=Vp(e);try{let t=new URL(Vp(e));if(!wk.has(t.protocol))return"about:blank"}catch{return e}return e}exportJSON(){return{...super.exportJSON(),rel:this.getRel(),target:this.getTarget(),title:this.getTitle(),url:this.getURL()}}getURL(){return this.getLatest().__url}setURL(e){let t=this.getWritable();return t.__url=e,t}getTarget(){return this.getLatest().__target}setTarget(e){let t=this.getWritable();return t.__target=e,t}getRel(){return this.getLatest().__rel}setRel(e){let t=this.getWritable();return t.__rel=e,t}getTitle(){return this.getLatest().__title}setTitle(e){let t=this.getWritable();return t.__title=e,t}insertNewAfter(e,t=!0){let r=xs(this.__url,{rel:this.__rel,target:this.__target,title:this.__title});return this.insertAfter(r,t),r}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}canBeEmpty(){return!1}isInline(){return!0}extractWithChild(e,t,r){if(!v(t))return!1;let o=t.anchor.getNode(),s=t.focus.getNode();return this.isParentOf(o)&&this.isParentOf(s)&&t.getTextContent().length>0}isEmailURI(){return this.__url.startsWith("mailto:")}isWebSiteURI(){return this.__url.startsWith("https://")||this.__url.startsWith("http://")}};function vk(n){let e=null;if(Tu(n)){let t=n.textContent;(t!==null&&t!==""||n.children.length>0)&&(e=xs(n.getAttribute("href")||"",{rel:n.getAttribute("rel"),target:n.getAttribute("target"),title:n.getAttribute("title")}))}return{node:e}}function xs(n="",e){return ft(new Vr(n,e))}function sr(n){return n instanceof Vr}var ys=class extends Vr{__isUnlinked;constructor(e="",t={},r){super(e,t,r),this.__isUnlinked=t.isUnlinked!==void 0&&t.isUnlinked!==null&&t.isUnlinked}static getType(){return"autolink"}static clone(e){return new ys(e.__url,{isUnlinked:e.__isUnlinked,rel:e.__rel,target:e.__target,title:e.__title},e.__key)}getIsUnlinked(){return this.__isUnlinked}setIsUnlinked(e){let t=this.getWritable();return t.__isUnlinked=e,t}createDOM(e){return this.__isUnlinked?document.createElement("span"):super.createDOM(e)}updateDOM(e,t,r){return super.updateDOM(e,t,r)||e.__isUnlinked!==this.__isUnlinked}static importJSON(e){return Du().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setIsUnlinked(e.isUnlinked||!1)}static importDOM(){return null}exportJSON(){return{...super.exportJSON(),isUnlinked:this.__isUnlinked}}insertNewAfter(e,t=!0){let r=this.getParentOrThrow().insertNewAfter(e,t);if(F(r)){let o=Du(this.__url,{isUnlinked:this.__isUnlinked,rel:this.__rel,target:this.__target,title:this.__title});return r.append(o),o}return null}};function Du(n="",e){return ft(new ys(n,e))}function ir(n){return n instanceof ys}var Iu=Ct("TOGGLE_LINK_COMMAND");function dS(n,e){if(n.type==="element"){let t=n.getNode();return F(t)||function(r,...o){let s=new URL("https://lexical.dev/docs/error"),i=new URLSearchParams;i.append("code",r);for(let a of o)i.append("v",a);throw s.search=i.toString(),Error(`Minified Lexical error #${r}; visit ${s.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}(252),t.getChildren()[n.offset+e]||null}return null}function tl(n,e={}){let t;if(n&&typeof n=="object"){let{url:u,...d}=n;t=u,e={...d,...e}}else t=n;let{target:r,title:o}=e,s=e.rel===void 0?"noreferrer":e.rel,i=w();if(i===null||!v(i)&&!Ke(i))return;if(Ke(i)){let u=i.getNodes();return u.length===0?void 0:void u.forEach(d=>{if(t===null){let h=oe(d,g=>!ir(g)&&sr(g));h&&(h.insertBefore(d),h.getChildren().length===0&&h.remove())}else{let h=oe(d,g=>!ir(g)&&sr(g));if(h)h.setURL(t),r!==void 0&&h.setTarget(r),s!==void 0&&h.setRel(s);else{let g=xs(t,{rel:s,target:r});d.insertBefore(g),g.append(d)}}})}let a=i.extract();if(t===null){let u=new Set;return void a.forEach(d=>{let h=d.getParent();if(sr(h)&&!ir(h)){let g=h.getKey();if(u.has(g))return;(function(f,p){let m=new Set(p.filter(N=>f.isParentOf(N)).map(N=>N.getKey())),_=f.getChildren(),C=_.filter(N=>m.has(N.getKey()));if(C.length===_.length)return _.forEach(N=>f.insertBefore(N)),void f.remove();let x=_.findIndex(N=>m.has(N.getKey())),y=_.findLastIndex(N=>m.has(N.getKey())),S=x===0,b=y===_.length-1;if(S)C.forEach(N=>f.insertBefore(N));else if(b)for(let N=C.length-1;N>=0;N--)f.insertAfter(C[N]);else{for(let A=C.length-1;A>=0;A--)f.insertAfter(C[A]);let N=_.slice(y+1);if(N.length>0){let A=xs(f.getURL(),{rel:f.getRel(),target:f.getTarget(),title:f.getTitle()});C[C.length-1].insertAfter(A),N.forEach(O=>A.append(O))}}})(h,a),u.add(g)}})}let l=new Set,c=u=>{l.has(u.getKey())||(l.add(u.getKey()),u.setURL(t),r!==void 0&&u.setTarget(r),s!==void 0&&u.setRel(s),o!==void 0&&u.setTitle(o))};if(a.length===1){let u=a[0],d=oe(u,sr);if(d!==null)return c(d)}(function(u){let d=w();if(!v(d))return u();let h=zr(d),g=h.isBackward(),f=dS(h.anchor,g?-1:0),p=dS(h.focus,g?0:-1),m=u();if(f||p){let _=w();if(v(_)){let C=_.clone();if(f){let x=f.getParent();x&&C.anchor.set(x.getKey(),f.getIndexWithinParent()+(g?1:0),"element")}if(p){let x=p.getParent();x&&C.focus.set(x.getKey(),p.getIndexWithinParent()+(g?0:1),"element")}De(zr(C))}}})(()=>{let u=null;for(let d of a){if(!d.isAttached())continue;let h=oe(d,sr);if(h){c(h);continue}if(F(d)){if(!d.isInline())continue;if(sr(d)){if(!(ir(d)||u!==null&&u.getParentOrThrow().isParentOf(d))){c(d),u=d;continue}for(let f of d.getChildren())d.insertBefore(f);d.remove();continue}}let g=d.getPreviousSibling();sr(g)&&g.is(u)?g.append(d):(u=xs(t,{rel:s,target:r,title:o}),d.insertAfter(u),u.append(d))}})}var Ok=/^\+?[0-9\s()-]{5,}$/;function Vp(n){return n.match(/^[a-z][a-z0-9+.-]*:/i)||n.match(/^[/#.]/)?n:n.includes("@")?`mailto:${n}`:Ok.test(n)?`tel:${n}`:`https://${n}`}function hS(n,e){return Ee(Ht(()=>n.registerCommand(Iu,t=>{let r=e.validateUrl.peek(),o=e.attributes.peek();if(t===null)return tl(null),!0;if(typeof t=="string")return!(r!==void 0&&!r(t))&&(tl(t,o),!0);{let{url:s,target:i,rel:a,title:l}=t;return tl(s,{...o,rel:a,target:i,title:l}),!0}},de)),Ht(()=>{let t=e.validateUrl.value;if(!t)return;let r=e.attributes.value;return n.registerCommand(Oo,o=>{let s=w();if(!v(s)||s.isCollapsed()||!At(o,ClipboardEvent)||o.clipboardData===null)return!1;let i=o.clipboardData.getData("text");return!!t(i)&&!s.getNodes().some(a=>F(a))&&(n.dispatchCommand(Iu,{...r,url:i}),o.preventDefault(),!0)},de)}))}var jp=ue({build:(n,e,t)=>In(e),config:{attributes:void 0,validateUrl:void 0},mergeConfig(n,e){let t=Lo(n,e);return n.attributes&&(t.attributes=Lo(n.attributes,t.attributes)),t},name:"@lexical/link/Link",nodes:[Vr],register:(n,e,t)=>hS(n,t.getOutput())});function gS(n,e,t={}){let r=s=>{let i=s.target;if(!jt(i))return;let a=fu(i);if(a===null)return;let l=null,c=null;if(a.update(()=>{let h=We(i);if(h!==null){let g=oe(h,F);if(!e.disabled.peek())if(sr(g))l=g.sanitizeUrl(g.getURL()),c=g.getTarget();else{let f=function(p,m){let _=p;for(;_!=null;){if(m(_))return _;_=_.parentNode}return null}(i,Tu);f!==null&&(l=f.href,c=f.target)}}}),l===null||l==="")return;let u=n.getEditorState().read(w);if(v(u)&&!u.isCollapsed())return void s.preventDefault();let d=s.type==="auxclick"&&s.button===1;window.open(l,e.newTab.peek()||d||s.metaKey||s.ctrlKey||c==="_blank"?"_blank":"_self"),s.preventDefault()},o=s=>{s.button===1&&r(s)};return n.registerRootListener((s,i)=>{i!==null&&(i.removeEventListener("click",r),i.removeEventListener("mouseup",o)),s!==null&&(s.addEventListener("click",r,t),s.addEventListener("mouseup",o,t))})}var kk=ue({build:(n,e,t)=>In(e),config:xt({disabled:!1,newTab:!1}),dependencies:[jp],name:"@lexical/link/ClickableLink",register:(n,e,t)=>gS(n,t.getOutput())});function Lk(n,e=t=>t){return t=>{let r=n.exec(t);return r===null?null:{index:r.index,length:r[0].length,text:r[0],url:e(r[0])}}}function fS(n,e){for(let t=0;t0?$u(t[n-1]):mS(r[0]))?e0;){let c=l[0],u=c.getTextContent().length,d=a;a+u<=e?(r.push(c),i+=u):d>=t?s.push(c):o.push(c),a+=u,l.shift()}return[i,r,o,s]}function Ik(n,e,t,r){let o=Du(r.url,r.attributes);if(n.length===1){let s,i=n[0];e===0?[s,i]=i.splitText(t):[,s,i]=i.splitText(e,t);let a=ye(r.text);return a.setFormat(s.getFormat()),a.setDetail(s.getDetail()),a.setStyle(s.getStyle()),o.append(a),s.replace(o),i}if(n.length>1){let s=n[0],i,a=s.getTextContent().length;e===0?i=s:[,i]=s.splitText(e);let l=[],c;for(let g=1;g=0;t--)n.insertAfter(e[t]);return n.remove(),e.map(t=>t.getLatest())}var CS={changeHandlers:[],matchers:[]};function xS(n,e=CS){let{matchers:t,changeHandlers:r}=e,o=(s,i)=>{for(let a of r)a(s,i)};return Ee(n.registerNodeTransform(Ft,s=>{let i=s.getParentOrThrow(),a=s.getPreviousSibling();if(ir(i)&&!i.getIsUnlinked())Gp(i,t,o);else if(!sr(i)){if(s.isSimpleText()&&(Yp(s.getTextContent())||!ir(a))){let l=function(c){let u=[c],d=c.getNextSibling();for(;d!==null&&B(d)&&d.isSimpleText()&&(u.push(d),!/[\s]/.test(d.getTextContent()));)d=d.getNextSibling();return u}(s);(function(c,u,d){let h=[...c],g=h.map(_=>_.getTextContent()).join(""),f,p=g,m=0;for(;(f=fS(p,u))&&f!==null;){let _=f.index,C=_+f.length;if(Mk(m+_,m+C,g,h)){let[x,,y,S]=Dk(h,m+_,m+C),b=Ik(y,m+_-x,m+C-x,f);h=b?[b,...S]:S,d(f.url,null),m=0}else m+=C;p=p.substring(C)}})(l,t,o)}(function(l,c,u){let d=l.getPreviousSibling(),h=l.getNextSibling(),g=l.getTextContent();var f;!ir(d)||d.getIsUnlinked()||Yp(g)&&(f=g,!(d.isEmailURI()?/^\.[a-zA-Z]{2,}/.test(f):/^\.[a-zA-Z0-9]{1,}/.test(f)))||(d.append(l),Gp(d,c,u),u(null,d.getURL())),!ir(h)||h.getIsUnlinked()||pS(g)||(Mu(h),Gp(h,c,u),u(null,h.getURL()))})(s,t,o)}}),n.registerCommand(Iu,s=>{let i=w();return s!==null||!v(i)||i.extract().forEach(a=>{let l=a.getParent();ir(l)&&(l.setIsUnlinked(!l.getIsUnlinked()),l.markDirty())}),!1},de))}var $k=ue({config:CS,dependencies:[jp],mergeConfig(n,e){let t=Lo(n,e);for(let r of["matchers","changeHandlers"]){let o=e[r];Array.isArray(o)&&(t[r]=[...n[r],...o])}return t},name:"@lexical/link/AutoLink",register:xS}),Pk=tl;var yt=qp,yS=yt.$createAutoLinkNode,Pu=yt.$createLinkNode,bS=yt.$isAutoLinkNode,Fu=yt.$isLinkNode,Li=yt.$toggleLink,q$=yt.AutoLinkExtension,SS=yt.AutoLinkNode,Z$=yt.ClickableLinkExtension,J$=yt.LinkExtension,nl=yt.LinkNode,X$=yt.TOGGLE_LINK_COMMAND,Q$=yt.createLinkMatcherWithRegExp,e5=yt.formatUrl,t5=yt.registerAutoLink,n5=yt.registerClickableLink,r5=yt.registerLink,o5=yt.toggleLink;var Zp={};Lt(Zp,{$generateHtmlFromNodes:()=>Bk,$generateNodesFromDOM:()=>Fk});function Fk(n,e){let t=v1(e)?e.body.childNodes:e.childNodes,r=[],o=[];for(let s of t)if(!NS.has(s.nodeName)){let i=ES(s,n,o,!1);i!==null&&(r=r.concat(i))}return function(s){for(let i of s)i.getNextSibling()instanceof sp&&i.insertAfter(pt());for(let i of s){let a=i.getChildren();for(let l of a)i.insertBefore(l);i.remove()}}(o),r}function Bk(n,e){if(typeof document>"u"||typeof window>"u"&&global.window===void 0)throw new Error("To use $generateHtmlFromNodes in headless mode please initialize a headless browser implementation such as JSDom before calling this function.");let t=document.createElement("div"),r=Be().getChildren();for(let o=0;o{let f=new sp;return t.push(f),f}:U)),a==null?h.length>0?i=i.concat(h):Ep(n)&&function(f){return f.nextSibling==null||f.previousSibling==null?!1:ja(f.nextSibling)&&ja(f.previousSibling)}(n)&&(i=i.concat(pt())):F(a)&&a.append(...h),i}function Hk(n,e,t){let r=n.style.textAlign,o=[],s=[];for(let i=0;iLS,$generateNodesFromSerializedNodes:()=>RS,$getClipboardDataFromSelection:()=>DS,$getHtmlContent:()=>vS,$getLexicalContent:()=>OS,$insertDataTransferForPlainText:()=>zk,$insertDataTransferForRichText:()=>Kk,$insertGeneratedNodes:()=>Jp,copyToClipboard:()=>Uk,setLexicalClipboardDataTransfer:()=>IS});function Hu(n,...e){let t=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",n);for(let o of e)r.append("v",o);throw t.search=r.toString(),Error(`Minified Lexical error #${n}; visit ${t.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function vS(n,e=w()){return e==null&&Hu(166),v(e)&&e.isCollapsed()||e.getNodes().length===0?"":Bu(n,e)}function OS(n,e=w()){return e==null&&Hu(166),v(e)&&e.isCollapsed()||e.getNodes().length===0?null:JSON.stringify(LS(n,e))}function zk(n,e){let t=n.getData("text/plain")||n.getData("text/uri-list");t!=null&&e.insertRawText(t)}function Kk(n,e,t){let r=n.getData("application/x-lexical-editor");if(r)try{let a=JSON.parse(r);if(a.namespace===t._config.namespace&&Array.isArray(a.nodes))return Jp(t,RS(a.nodes),e)}catch(a){console.error(a)}let o=n.getData("text/html"),s=n.getData("text/plain");if(o&&s!==o)try{let a=new DOMParser().parseFromString(function(l){return window.trustedTypes&&window.trustedTypes.createPolicy?window.trustedTypes.createPolicy("lexical",{createHTML:c=>c}).createHTML(l):l}(o),"text/html");return Jp(t,bs(t,a),e)}catch(a){console.error(a)}let i=s||n.getData("text/uri-list");if(i!=null)if(v(e)){let a=i.split(/(\r?\n|\t)/);a[a.length-1]===""&&a.pop();for(let l=0;l{n.update(()=>{c(wS(n,e,t))})});let r=n.getRootElement(),o=n._window||window,s=o.document,i=ko(o);if(r===null||i===null)return!1;let a=s.createElement("span");a.style.cssText="position: fixed; top: -1000px;",a.append(s.createTextNode("#")),r.append(a);let l=new Range;return l.setStart(a,0),l.setEnd(a,1),i.removeAllRanges(),i.addRange(l),new Promise((c,u)=>{let d=n.registerCommand(_i,h=>(At(h,ClipboardEvent)&&(d(),Ri!==null&&(o.clearTimeout(Ri),Ri=null),c(wS(n,h,t))),!0),Jn);Ri=o.setTimeout(()=>{d(),Ri=null,c(!1)},50),s.execCommand("copy"),a.remove()})}function wS(n,e,t){if(t===void 0){let o=ko(n._window),s=w();if(!s||s.isCollapsed()||!o)return!1;let i=o.anchorNode,a=o.focusNode;if(i!==null&&a!==null&&!L1(n,i,a))return!1;t=DS(s)}e.preventDefault();let r=e.clipboardData;return r!==null&&(IS(r,t),!0)}var MS=[["text/html",vS],["application/x-lexical-editor",OS]];function DS(n=w()){let e={"text/plain":n?n.getTextContent():""};if(n){let t=Fr();for(let[r,o]of MS){let s=o(t,n);s!==null&&(e[r]=s)}}return e}function IS(n,e){for(let[t]of MS)e[t]===void 0&&n.setData(t,"");for(let t in e){let r=e[t];r!==void 0&&n.setData(t,r)}}var ar=Xp,f5=ar.$generateJSONFromSelectedNodes,p5=ar.$generateNodesFromSerializedNodes,$S=ar.$getClipboardDataFromSelection,PS=ar.$getHtmlContent,m5=ar.$getLexicalContent,Qp=ar.$insertDataTransferForPlainText,rl=ar.$insertDataTransferForRichText,_5=ar.$insertGeneratedNodes,ol=ar.copyToClipboard,C5=ar.setLexicalClipboardDataTransfer;var em={};Lt(em,{DragonExtension:()=>Wk,registerDragonSupport:()=>FS});function FS(n){let e=window.location.origin,t=r=>{if(r.origin!==e)return;let o=n.getRootElement();if(document.activeElement!==o)return;let s=r.data;if(typeof s=="string"){let i;try{i=JSON.parse(s)}catch{return}if(i&&i.protocol==="nuanria_messaging"&&i.type==="request"){let a=i.payload;if(a&&a.functionId==="makeChanges"){let l=a.args;if(l){let[c,u,d,h,g]=l;n.update(()=>{let f=w();if(v(f)){let p=f.anchor,m=p.getNode(),_=0,C=0;if(B(m)&&c>=0&&u>=0&&(_=c,C=c+u,f.setTextNodeRange(m,_,m,C)),_===C&&d===""||(f.insertRawText(d),m=p.getNode()),B(m)){_=h,C=h+g;let x=m.getTextContentSize();_=_>x?x:_,C=C>x?x:C,f.setTextNodeRange(m,_,m,C)}r.stopImmediatePropagation()}})}}}}};return window.addEventListener("message",t,!0),()=>{window.removeEventListener("message",t,!0)}}var Wk=ue({build:(n,e,t)=>In(e),config:xt({disabled:typeof window>"u"}),name:"@lexical/dragon",register:(n,e,t)=>Ht(()=>t.getOutput().disabled.value?void 0:FS(n))});var BS=em,zu=BS.DragonExtension,S5=BS.registerDragonSupport;var tm={};Lt(tm,{PlainTextExtension:()=>Jk,registerPlainText:()=>KS});var Ss=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,Gk=Ss&&"documentMode"in document?document.documentMode:null,Vk=Ss&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),Yk=!(!Ss||!("InputEvent"in window)||Gk)&&"getTargetRanges"in new window.InputEvent("input"),jk=Ss&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),HS=Ss&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,qk=Ss&&/^(?=.*Chrome).*/i.test(navigator.userAgent),Zk=Ss&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&Vk&&!qk;function zS(n,e){e.update(()=>{if(n!==null){let t=At(n,KeyboardEvent)?null:n.clipboardData,r=w();if(r!==null&&!r.isCollapsed()&&t!=null){n.preventDefault();let o=PS(e);o!==null&&t.setData("text/html",o),t.setData("text/plain",r.getTextContent())}}})}function KS(n){return Ee(n.registerCommand(un,e=>{let t=w();return!!v(t)&&(t.deleteCharacter(e),!0)},W),n.registerCommand(xi,e=>{let t=w();return!!v(t)&&(t.deleteWord(e),!0)},W),n.registerCommand(hs,e=>{let t=w();return!!v(t)&&(t.deleteLine(e),!0)},W),n.registerCommand(mi,e=>{let t=w();if(!v(t))return!1;if(typeof e=="string")t.insertText(e);else{let r=e.dataTransfer;if(r!=null)Qp(r,t);else{let o=e.data;o&&t.insertText(o)}}return!0},W),n.registerCommand(cu,()=>{let e=w();return!!v(e)&&(e.removeText(),!0)},W),n.registerCommand(bi,e=>{let t=w();return!!v(t)&&(t.insertLineBreak(e),!0)},W),n.registerCommand(Xn,()=>{let e=w();return!!v(e)&&(e.insertLineBreak(),!0)},W),n.registerCommand(Qn,e=>{let t=w();if(!v(t))return!1;let r=e,o=r.shiftKey;return!!Ai(t,!0)&&(r.preventDefault(),Ei(t,o,!0),!0)},W),n.registerCommand(wo,e=>{let t=w();if(!v(t))return!1;let r=e,o=r.shiftKey;return!!Ai(t,!1)&&(r.preventDefault(),Ei(t,o,!1),!0)},W),n.registerCommand(vo,e=>{let t=w();return!!v(t)&&(!HS||navigator.language!=="ko-KR")&&(e.preventDefault(),n.dispatchCommand(un,!0))},W),n.registerCommand(Si,e=>{let t=w();return!!v(t)&&(e.preventDefault(),n.dispatchCommand(un,!1))},W),n.registerCommand(Ur,e=>{let t=w();if(!v(t))return!1;if(e!==null){if((HS||jk||Zk)&&Yk)return!1;e.preventDefault()}return n.dispatchCommand(bi,!1)},W),n.registerCommand(uu,()=>(pi(),!0),W),n.registerCommand(_i,e=>{let t=w();return!!v(t)&&(zS(e,n),!0)},W),n.registerCommand(Ci,e=>{let t=w();return!!v(t)&&(function(r,o){zS(r,o),o.update(()=>{let s=w();v(s)&&s.removeText()})}(e,n),!0)},W),n.registerCommand(Oo,e=>{let t=w();return!!v(t)&&(function(r,o){r.preventDefault(),o.update(()=>{let s=w(),i=At(r,ClipboardEvent)?r.clipboardData:null;i!=null&&v(s)&&Qp(i,s)},{tag:Wr})}(e,n),!0)},W),n.registerCommand(su,e=>{let t=w();return!!v(t)&&(e.preventDefault(),!0)},W),n.registerCommand(ou,e=>{let t=w();return!!v(t)&&(e.preventDefault(),!0)},W))}var Jk=ue({conflictsWith:["@lexical/rich-text"],dependencies:[zu],name:"@lexical/plain-text",register:KS});var US=tm,O5=US.PlainTextExtension,WS=US.registerPlainText;var sm={};Lt(sm,{$createHeadingNode:()=>Di,$createQuoteNode:()=>om,$isHeadingNode:()=>iL,$isQuoteNode:()=>oL,DRAG_DROP_PASTE:()=>rm,HeadingNode:()=>Ho,QuoteNode:()=>Bo,RichTextExtension:()=>aL,eventFiles:()=>sl,registerRichText:()=>ZS});function GS(n,e){if(document.caretRangeFromPoint!==void 0){let t=document.caretRangeFromPoint(n,e);return t===null?null:{node:t.startContainer,offset:t.startOffset}}if(document.caretPositionFromPoint!=="undefined"){let t=document.caretPositionFromPoint(n,e);return t===null?null:{node:t.offsetNode,offset:t.offset}}return null}var Ts=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,Xk=Ts&&"documentMode"in document?document.documentMode:null,Qk=Ts&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),eL=!(!Ts||!("InputEvent"in window)||Xk)&&"getTargetRanges"in new window.InputEvent("input"),tL=Ts&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),VS=Ts&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,nL=Ts&&/^(?=.*Chrome).*/i.test(navigator.userAgent),rL=Ts&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&Qk&&!nL,rm=Ct("DRAG_DROP_PASTE_FILE"),Bo=class extends Ye{static getType(){return"quote"}static clone(e){return new Bo(e.__key)}createDOM(e){let t=document.createElement("blockquote");return _e(t,e.theme.quote),t}updateDOM(e,t){return!1}static importDOM(){return{blockquote:e=>({conversion:sL,priority:0})}}exportDOM(e){let{element:t}=super.exportDOM(e);if(Xe(t)){this.isEmpty()&&t.append(document.createElement("br"));let r=this.getFormatType();r&&(t.style.textAlign=r);let o=this.getDirection();o&&(t.dir=o)}return{element:t}}static importJSON(e){return om().updateFromJSON(e)}insertNewAfter(e,t){let r=U(),o=this.getDirection();return r.setDirection(o),this.insertAfter(r,t),r}collapseAtStart(){let e=U();return this.getChildren().forEach(t=>e.append(t)),this.replace(e),!0}canMergeWhenEmpty(){return!0}};function om(){return ft(new Bo)}function oL(n){return n instanceof Bo}var Ho=class extends Ye{__tag;static getType(){return"heading"}static clone(e){return new Ho(e.__tag,e.__key)}constructor(e,t){super(t),this.__tag=e}getTag(){return this.__tag}setTag(e){let t=this.getWritable();return this.__tag=e,t}createDOM(e){let t=this.__tag,r=document.createElement(t),o=e.theme.heading;if(o!==void 0){let s=o[t];_e(r,s)}return r}updateDOM(e,t,r){return e.__tag!==this.__tag}static importDOM(){return{h1:e=>({conversion:Mi,priority:0}),h2:e=>({conversion:Mi,priority:0}),h3:e=>({conversion:Mi,priority:0}),h4:e=>({conversion:Mi,priority:0}),h5:e=>({conversion:Mi,priority:0}),h6:e=>({conversion:Mi,priority:0}),p:e=>{let t=e.firstChild;return t!==null&&YS(t)?{conversion:()=>({node:null}),priority:3}:null},span:e=>YS(e)?{conversion:t=>({node:Di("h1")}),priority:3}:null}}exportDOM(e){let{element:t}=super.exportDOM(e);if(Xe(t)){this.isEmpty()&&t.append(document.createElement("br"));let r=this.getFormatType();r&&(t.style.textAlign=r);let o=this.getDirection();o&&(t.dir=o)}return{element:t}}static importJSON(e){return Di(e.tag).updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setTag(e.tag)}exportJSON(){return{...super.exportJSON(),tag:this.getTag()}}insertNewAfter(e,t=!0){let r=e?e.anchor.offset:0,o=this.getLastDescendant(),s=!o||e&&e.anchor.key===o.getKey()&&r===o.getTextContentSize()||!e?U():Di(this.getTag()),i=this.getDirection();if(s.setDirection(i),this.insertAfter(s,t),r===0&&!this.isEmpty()&&e){let a=U();a.select(),this.replace(a,!0)}return s}collapseAtStart(){let e=this.isEmpty()?U():Di(this.getTag());return this.getChildren().forEach(t=>e.append(t)),this.replace(e),!0}extractWithChild(){return!0}};function YS(n){return n.nodeName.toLowerCase()==="span"&&n.style.fontSize==="26pt"}function Mi(n){let e=n.nodeName.toLowerCase(),t=null;return e!=="h1"&&e!=="h2"&&e!=="h3"&&e!=="h4"&&e!=="h5"&&e!=="h6"||(t=Di(e),n.style!==null&&(dp(n,t),t.setFormat(n.style.textAlign))),{node:t}}function sL(n){let e=om();return n.style!==null&&(e.setFormat(n.style.textAlign),dp(n,e)),{node:e}}function Di(n="h1"){return ft(new Ho(n))}function iL(n){return n instanceof Ho}function sl(n){let e=null;if(At(n,DragEvent)?e=n.dataTransfer:At(n,ClipboardEvent)&&(e=n.clipboardData),e===null)return[!1,[],!1];let t=e.types,r=t.includes("Files"),o=t.includes("text/html")||t.includes("text/plain");return[r,Array.from(e.files),o]}function jS(n){let e=w();if(!v(e))return!1;let t=new Set,r=e.getNodes();for(let o=0;oF(c)&&!c.isInline());if(a===null)continue;let l=a.getKey();a.canIndent()&&!t.has(l)&&(t.add(l),n(a))}return t.size>0}function qS(n){let e=We(n);return Et(e)}function nm(n){for(let e of["lowercase","uppercase","capitalize"])n.hasFormat(e)&&n.toggleFormat(e)}function ZS(n){return Ee(n.registerCommand(No,e=>{let t=w();return!!Ke(t)&&(t.clear(),!0)},W),n.registerCommand(un,e=>{let t=w();return v(t)?(t.deleteCharacter(e),!0):!!Ke(t)&&(t.deleteNodes(),!0)},W),n.registerCommand(xi,e=>{let t=w();return!!v(t)&&(t.deleteWord(e),!0)},W),n.registerCommand(hs,e=>{let t=w();return!!v(t)&&(t.deleteLine(e),!0)},W),n.registerCommand(mi,e=>{let t=w();if(typeof e=="string")t!==null&&t.insertText(e);else{if(t===null)return!1;let r=e.dataTransfer;if(r!=null)rl(r,t,n);else if(v(t)){let o=e.data;return o&&t.insertText(o),!0}}return!0},W),n.registerCommand(cu,()=>{let e=w();return!!v(e)&&(e.removeText(),!0)},W),n.registerCommand(Kr,e=>{let t=w();return!!v(t)&&(t.formatText(e),!0)},W),n.registerCommand(iu,e=>{let t=w();if(!v(t)&&!Ke(t))return!1;let r=t.getNodes();for(let o of r){let s=oe(o,i=>F(i)&&!i.isInline());s!==null&&s.setFormat(e)}return!0},W),n.registerCommand(bi,e=>{let t=w();return!!v(t)&&(t.insertLineBreak(e),!0)},W),n.registerCommand(Xn,()=>{let e=w();return!!v(e)&&(e.insertParagraph(),!0)},W),n.registerCommand(Ao,()=>(Fa([an()]),!0),W),n.registerCommand($t,()=>jS(e=>{let t=e.getIndent();e.setIndent(t+1)}),W),n.registerCommand(hn,()=>jS(e=>{let t=e.getIndent();t>0&&e.setIndent(Math.max(0,t-1))}),W),n.registerCommand(Pt,e=>{let t=w();if(Ke(t)){let r=t.getNodes();if(r.length>0)return e.preventDefault(),r[0].selectPrevious(),!0}else if(v(t)){let r=Qf(t.focus,!0);if(!e.shiftKey&&Et(r)&&!r.isIsolated()&&!r.isInline())return r.selectPrevious(),e.preventDefault(),!0}return!1},W),n.registerCommand(dn,e=>{let t=w();if(Ke(t)){let r=t.getNodes();if(r.length>0)return e.preventDefault(),r[0].selectNext(0,0),!0}else if(v(t)){if(function(o){let s=o.focus;return s.key==="root"&&s.offset===Be().getChildrenSize()}(t))return e.preventDefault(),!0;let r=Qf(t.focus,!1);if(!e.shiftKey&&Et(r)&&!r.isIsolated()&&!r.isInline())return r.selectNext(),e.preventDefault(),!0}return!1},W),n.registerCommand(Qn,e=>{let t=w();if(Ke(t)){let r=t.getNodes();if(r.length>0)return e.preventDefault(),xp(r[0])?r[0].selectNext(0,0):r[0].selectPrevious(),!0}if(!v(t))return!1;if(Ai(t,!0)){let r=e.shiftKey;return e.preventDefault(),Ei(t,r,!0),!0}return!1},W),n.registerCommand(wo,e=>{let t=w();if(Ke(t)){let o=t.getNodes();if(o.length>0)return e.preventDefault(),xp(o[0])?o[0].selectPrevious():o[0].selectNext(0,0),!0}if(!v(t))return!1;let r=e.shiftKey;return!!Ai(t,!1)&&(e.preventDefault(),Ei(t,r,!1),!0)},W),n.registerCommand(vo,e=>{if(qS(e.target))return!1;let t=w();if(v(t)){if(function(r){if(!r.isCollapsed())return!1;let{anchor:o}=r;if(o.offset!==0)return!1;let s=o.getNode();if(Hr(s))return!1;let i=qa(s);return i.getIndent()>0&&(i.is(s)||s.is(i.getFirstDescendant()))}(t))return e.preventDefault(),n.dispatchCommand(hn,void 0);if(VS&&navigator.language==="ko-KR")return!1}else if(!Ke(t))return!1;return e.preventDefault(),n.dispatchCommand(un,!0)},W),n.registerCommand(Si,e=>{if(qS(e.target))return!1;let t=w();return!(!v(t)&&!Ke(t))&&(e.preventDefault(),n.dispatchCommand(un,!1))},W),n.registerCommand(Ur,e=>{let t=w();if(!v(t))return!1;if(nm(t),e!==null){if((VS||tL||rL)&&eL)return!1;if(e.preventDefault(),e.shiftKey)return n.dispatchCommand(bi,!1)}return n.dispatchCommand(Xn,void 0)},W),n.registerCommand(Ti,()=>{let e=w();return!!v(e)&&(n.blur(),!0)},W),n.registerCommand(su,e=>{let[,t]=sl(e);if(t.length>0){let o=GS(e.clientX,e.clientY);if(o!==null){let{offset:s,node:i}=o,a=We(i);if(a!==null){let l=Zn();if(B(a))l.anchor.set(a.getKey(),s,"text"),l.focus.set(a.getKey(),s,"text");else{let u=a.getParentOrThrow().getKey(),d=a.getIndexWithinParent()+1;l.anchor.set(u,d,"element"),l.focus.set(u,d,"element")}let c=zr(l);De(c)}n.dispatchCommand(rm,t)}return e.preventDefault(),!0}let r=w();return!!v(r)},W),n.registerCommand(ou,e=>{let[t]=sl(e),r=w();return!(t&&!v(r))},W),n.registerCommand(f1,e=>{let[t]=sl(e),r=w();if(t&&!v(r))return!1;let o=GS(e.clientX,e.clientY);if(o!==null){let s=We(o.node);Et(s)&&e.preventDefault()}return!0},W),n.registerCommand(uu,()=>(pi(),!0),W),n.registerCommand(_i,e=>(ol(n,At(e,ClipboardEvent)?e:null),!0),W),n.registerCommand(Ci,e=>(async function(t,r){await ol(r,At(t,ClipboardEvent)?t:null),r.update(()=>{let o=w();v(o)?o.removeText():Ke(o)&&o.getNodes().forEach(s=>s.remove())})}(e,n),!0),W),n.registerCommand(Oo,e=>{let[,t,r]=sl(e);return t.length>0&&!r?(n.dispatchCommand(rm,t),!0):jt(e.target)&&k1(e.target)?!1:w()!==null&&(function(o,s){o.preventDefault(),s.update(()=>{let i=w(),a=At(o,InputEvent)||At(o,KeyboardEvent)?null:o.clipboardData;a!=null&&i!==null&&rl(a,i,s)},{tag:Wr})}(e,n),!0)},W),n.registerCommand(Ni,e=>{let t=w();return v(t)&&nm(t),!1},W),n.registerCommand(_n,e=>{let t=w();return v(t)&&nm(t),!1},W))}var aL=ue({conflictsWith:["@lexical/plain-text"],dependencies:[zu],name:"@lexical/rich-text",nodes:[Ho,Bo],register:ZS});var lr=sm,il=lr.$createHeadingNode,Ii=lr.$createQuoteNode,al=lr.$isHeadingNode,$n=lr.$isQuoteNode,$5=lr.DRAG_DROP_PASTE,Ku=lr.HeadingNode,Uu=lr.QuoteNode,JS=lr.RichTextExtension,P5=lr.eventFiles,XS=lr.registerRichText;var z5=cc(oa(),1);Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/});Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/;Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/});Prism.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}});Prism.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}});Prism.languages.markup&&(Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript"));Prism.languages.js=Prism.languages.javascript;(function(n){var e=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function t(u){return u=u.replace(//g,function(){return e}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+u+")")}var r=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,o=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return r}),s=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;n.languages.markdown=n.languages.extend("markup",{}),n.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:n.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+o+s+"(?:"+o+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+o+s+")(?:"+o+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:n.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+o+")"+s+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+o+"$"),inside:{"table-header":{pattern:RegExp(r),alias:"important",inside:n.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:t(/\b__(?:(?!_)|_(?:(?!_))+_)+__\b|\*\*(?:(?!\*)|\*(?:(?!\*))+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:t(/\b_(?:(?!_)|__(?:(?!_))+__)+_\b|\*(?:(?!\*)|\*\*(?:(?!\*))+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:t(/(~~?)(?:(?!~))+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:t(/!?\[(?:(?!\]))+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\]))+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(u){["url","bold","italic","strike","code-snippet"].forEach(function(d){u!==d&&(n.languages.markdown[u].inside.content.inside[d]=n.languages.markdown[d])})}),n.hooks.add("after-tokenize",function(u){if(u.language!=="markdown"&&u.language!=="md")return;function d(h){if(!(!h||typeof h=="string"))for(var g=0,f=h.length;g",quot:'"'},l=String.fromCodePoint||String.fromCharCode;function c(u){var d=u.replace(i,"");return d=d.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,function(h,g){if(g=g.toLowerCase(),g[0]==="#"){var f;return g[1]==="x"?f=parseInt(g.slice(2),16):f=Number(g.slice(1)),l(f)}else{var p=a[g];return p||h}}),d}n.languages.md=n.languages.markdown})(Prism);Prism.languages.c=Prism.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/});Prism.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}});Prism.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},Prism.languages.c.string],char:Prism.languages.c.char,comment:Prism.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:Prism.languages.c}}}});Prism.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/});delete Prism.languages.c.boolean;(function(n){var e=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;n.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+e.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+e.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+e.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+e.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:e,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},n.languages.css.atrule.inside.rest=n.languages.css;var t=n.languages.markup;t&&(t.tag.addInlined("style","css"),t.tag.addAttribute("style","css"))})(Prism);Prism.languages.objectivec=Prism.languages.extend("c",{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<>?=?|==?|&&?|\|\|?|[~^%?*\/@]/});delete Prism.languages.objectivec["class-name"];Prism.languages.objc=Prism.languages.objectivec;Prism.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/};(function(n){var e=n.languages.powershell={comment:[{pattern:/(^|[^`])<#[\s\S]*?#>/,lookbehind:!0},{pattern:/(^|[^`])#.*/,lookbehind:!0}],string:[{pattern:/"(?:`[\s\S]|[^`"])*"/,greedy:!0,inside:null},{pattern:/'(?:[^']|'')*'/,greedy:!0}],namespace:/\[[a-z](?:\[(?:\[[^\]]*\]|[^\[\]])*\]|[^\[\]])*\]/i,boolean:/\$(?:false|true)\b/i,variable:/\$\w+\b/,function:[/\b(?:Add|Approve|Assert|Backup|Block|Checkpoint|Clear|Close|Compare|Complete|Compress|Confirm|Connect|Convert|ConvertFrom|ConvertTo|Copy|Debug|Deny|Disable|Disconnect|Dismount|Edit|Enable|Enter|Exit|Expand|Export|Find|ForEach|Format|Get|Grant|Group|Hide|Import|Initialize|Install|Invoke|Join|Limit|Lock|Measure|Merge|Move|New|Open|Optimize|Out|Ping|Pop|Protect|Publish|Push|Read|Receive|Redo|Register|Remove|Rename|Repair|Request|Reset|Resize|Resolve|Restart|Restore|Resume|Revoke|Save|Search|Select|Send|Set|Show|Skip|Sort|Split|Start|Step|Stop|Submit|Suspend|Switch|Sync|Tee|Test|Trace|Unblock|Undo|Uninstall|Unlock|Unprotect|Unpublish|Unregister|Update|Use|Wait|Watch|Where|Write)-[a-z]+\b/i,/\b(?:ac|cat|chdir|clc|cli|clp|clv|compare|copy|cp|cpi|cpp|cvpa|dbp|del|diff|dir|ebp|echo|epal|epcsv|epsn|erase|fc|fl|ft|fw|gal|gbp|gc|gci|gcs|gdr|gi|gl|gm|gp|gps|group|gsv|gu|gv|gwmi|iex|ii|ipal|ipcsv|ipsn|irm|iwmi|iwr|kill|lp|ls|measure|mi|mount|move|mp|mv|nal|ndr|ni|nv|ogv|popd|ps|pushd|pwd|rbp|rd|rdr|ren|ri|rm|rmdir|rni|rnp|rp|rv|rvpa|rwmi|sal|saps|sasv|sbp|sc|select|set|shcm|si|sl|sleep|sls|sort|sp|spps|spsv|start|sv|swmi|tee|trcm|type|write)\b/i],keyword:/\b(?:Begin|Break|Catch|Class|Continue|Data|Define|Do|DynamicParam|Else|ElseIf|End|Exit|Filter|Finally|For|ForEach|From|Function|If|InlineScript|Parallel|Param|Process|Return|Sequence|Switch|Throw|Trap|Try|Until|Using|Var|While|Workflow)\b/i,operator:{pattern:/(^|\W)(?:!|-(?:b?(?:and|x?or)|as|(?:Not)?(?:Contains|In|Like|Match)|eq|ge|gt|is(?:Not)?|Join|le|lt|ne|not|Replace|sh[lr])\b|-[-=]?|\+[+=]?|[*\/%]=?)/i,lookbehind:!0},punctuation:/[|{}[\];(),.]/};e.string[0].inside={function:{pattern:/(^|[^`])\$\((?:\$\([^\r\n()]*\)|(?!\$\()[^\r\n)])*\)/,lookbehind:!0,inside:e},boolean:e.boolean,variable:e.variable}})(Prism);Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/};Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python;Prism.languages.py=Prism.languages.python;(function(n){for(var e=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|)*\*\//.source,t=0;t<2;t++)e=e.replace(//g,function(){return e});e=e.replace(//g,function(){return/[^\s\S]/.source}),n.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+e),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<>?=?|[@?]/},n.languages.rust["closure-params"].inside.rest=n.languages.rust,n.languages.rust.attribute.inside.string=n.languages.rust.string})(Prism);Prism.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+(/(?:elseif|if)\b/.source+"(?:[ ]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+")+"|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/};Prism.languages.swift["string-literal"].forEach(function(n){n.inside.interpolation.inside=Prism.languages.swift});(function(n){n.languages.typescript=n.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),n.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete n.languages.typescript.parameter,delete n.languages.typescript["literal-property"];var e=n.languages.extend("typescript",{});delete e["class-name"],n.languages.typescript["class-name"].inside=e,n.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e}}}}),n.languages.ts=n.languages.typescript})(Prism);(function(n){var e=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,t=/(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,r={pattern:RegExp(/(^|[^\w.])/.source+t+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};n.languages.java=n.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[r,{pattern:RegExp(/(^|[^\w.])/.source+t+/[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),lookbehind:!0,inside:r.inside},{pattern:RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source+t+/[A-Z]\w*\b/.source),lookbehind:!0,inside:r.inside}],keyword:e,function:[n.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0},constant:/\b[A-Z][A-Z_\d]+\b/}),n.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),n.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":r,keyword:e,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp(/(\bimport\s+)/.source+t+/(?:[A-Z]\w*|\*)(?=\s*;)/.source),lookbehind:!0,inside:{namespace:r.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(/(\bimport\s+static\s+)/.source+t+/(?:\w+|\*)(?=\s*;)/.source),lookbehind:!0,alias:"static",inside:{namespace:r.inside.namespace,static:/\b\w+$/,punctuation:/\./,operator:/\*/,"class-name":/\w+/}}],namespace:{pattern:RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(//g,function(){return e.source})),lookbehind:!0,inside:{punctuation:/\./}}})})(Prism);(function(n){var e=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,t=/\b(?!)\w+(?:\s*\.\s*\w+)*\b/.source.replace(//g,function(){return e.source});n.languages.cpp=n.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!)\w+/.source.replace(//g,function(){return e.source})),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:e,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),n.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/(?:\s*:\s*)?|:\s*/.source.replace(//g,function(){return t})+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),n.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:n.languages.cpp}}}}),n.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),n.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:n.languages.extend("cpp",{})}}),n.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},n.languages.cpp["base-clause"])})(Prism);function t0(n,e){for(let t of n.childNodes){if(Xe(t)&&t.tagName===e)return!0;t0(t,e)}return!1}var cl="data-language",ll="data-highlight-language",Wu="data-theme",Ns=class extends Ye{__language;__theme;__isSyntaxHighlightSupported;static getType(){return"code"}static clone(e){return new Ns(e.__language,e.__key)}constructor(e,t){super(t),this.__language=e||void 0,this.__isSyntaxHighlightSupported=!1,this.__theme=void 0}afterCloneFrom(e){super.afterCloneFrom(e),this.__language=e.__language,this.__theme=e.__theme,this.__isSyntaxHighlightSupported=e.__isSyntaxHighlightSupported}createDOM(e){let t=document.createElement("code");_e(t,e.theme.code),t.setAttribute("spellcheck","false");let r=this.getLanguage();r&&(t.setAttribute(cl,r),this.getIsSyntaxHighlightSupported()&&t.setAttribute(ll,r));let o=this.getTheme();o&&t.setAttribute(Wu,o);let s=this.getStyle();return s&&t.setAttribute("style",s),t}updateDOM(e,t,r){let o=this.__language,s=e.__language;o?o!==s&&t.setAttribute(cl,o):s&&t.removeAttribute(cl);let i=this.__isSyntaxHighlightSupported;e.__isSyntaxHighlightSupported&&s?i&&o?o!==s&&t.setAttribute(ll,o):t.removeAttribute(ll):i&&o&&t.setAttribute(ll,o);let l=this.__theme,c=e.__theme;l?l!==c&&t.setAttribute(Wu,l):c&&t.removeAttribute(Wu);let u=this.__style,d=e.__style;return u?u!==d&&t.setAttribute("style",u):d&&t.removeAttribute("style"),!1}exportDOM(e){let t=document.createElement("pre");_e(t,e._config.theme.code),t.setAttribute("spellcheck","false");let r=this.getLanguage();r&&(t.setAttribute(cl,r),this.getIsSyntaxHighlightSupported()&&t.setAttribute(ll,r));let o=this.getTheme();o&&t.setAttribute(Wu,o);let s=this.getStyle();return s&&t.setAttribute("style",s),{element:t}}static importDOM(){return{code:e=>e.textContent!=null&&(/\r?\n/.test(e.textContent)||t0(e,"BR"))?{conversion:QS,priority:1}:null,div:()=>({conversion:cL,priority:1}),pre:()=>({conversion:QS,priority:0}),table:e=>im(e)?{conversion:uL,priority:3}:null,td:e=>{let t=e,r=t.closest("table");return hL(t)||r&&im(r)?{conversion:e0,priority:3}:null},tr:e=>{let r=e.closest("table");return r&&im(r)?{conversion:e0,priority:3}:null}}}static importJSON(e){return ul().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setLanguage(e.language).setTheme(e.theme)}exportJSON(){return{...super.exportJSON(),language:this.getLanguage(),theme:this.getTheme()}}insertNewAfter(e,t=!0){let r=this.getChildren(),o=r.length;if(o>=2&&r[o-1].getTextContent()===` +`&&r[o-2].getTextContent()===` +`&&e.isCollapsed()&&e.anchor.key===this.__key&&e.anchor.offset===o){r[o-1].remove(),r[o-2].remove();let c=U();return this.insertAfter(c,t),c}let{anchor:s,focus:i}=e,l=(s.isBefore(i)?s:i).getNode();if(B(l)){let c=fL(l),u=[];for(;;)if(_t(c))u.push(an()),c=c.getNextSibling();else if(o0(c)){let _=0,C=c.getTextContent(),x=c.getTextContentSize();for(;_e.append(r)),this.replace(e),!0}setLanguage(e){let t=this.getWritable();return t.__language=e||void 0,t}getLanguage(){return this.getLatest().__language}setIsSyntaxHighlightSupported(e){let t=this.getWritable();return t.__isSyntaxHighlightSupported=e,t}getIsSyntaxHighlightSupported(){return this.getLatest().__isSyntaxHighlightSupported}setTheme(e){let t=this.getWritable();return t.__theme=e||void 0,t}getTheme(){return this.getLatest().__theme}};function ul(n,e){return hi(Ns).setLanguage(n).setTheme(e)}function lL(n){return n instanceof Ns}function QS(n){let e=n.getAttribute(cl);return{node:ul(e)}}function cL(n){let e=n,t=n0(e);return!t&&!dL(e)?{node:null}:{node:t?ul():null}}function uL(){return{node:ul()}}function e0(){return{node:null}}function n0(n){return n.style.fontFamily.match("monospace")!==null}function dL(n){let e=n.parentElement;for(;e!==null;){if(n0(e))return!0;e=e.parentElement}return!1}function hL(n){return n.classList.contains("js-file-line")}function im(n){return n.classList.contains("js-file-line-container")}var Es=class extends Ft{__highlightType;constructor(e="",t,r){super(e,r),this.__highlightType=t}static getType(){return"code-highlight"}static clone(e){return new Es(e.__text,e.__highlightType||void 0,e.__key)}getHighlightType(){return this.getLatest().__highlightType}setHighlightType(e){let t=this.getWritable();return t.__highlightType=e||void 0,t}canHaveFormat(){return!1}createDOM(e){let t=super.createDOM(e),r=am(e.theme,this.__highlightType);return _e(t,r),t}updateDOM(e,t,r){let o=super.updateDOM(e,t,r),s=am(r.theme,e.__highlightType),i=am(r.theme,this.__highlightType);return s!==i&&(s&&wt(t,s),i&&_e(t,i)),o}static importJSON(e){return r0().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setHighlightType(e.highlightType)}exportJSON(){return{...super.exportJSON(),highlightType:this.getHighlightType()}}setFormat(e){return this}isParentRequired(){return!0}createParentElementNode(){return ul()}};function am(n,e){return e&&n&&n.codeHighlight&&n.codeHighlight[e]}function r0(n="",e){return ft(new Es(n,e))}function o0(n){return n instanceof Es}function gL(n,e){let t=n;for(let r=mt(n,e);r&&(o0(r.origin)||_t(r.origin));r=bu(r))t=r.origin;return t}function fL(n){return gL(n,"previous")}var r2=ue({name:"@lexical/code",nodes:[Ns,Es]});(function(n){n.languages.diff={coord:[/^(?:\*{3}|-{3}|\+{3}).*$/m,/^@@.*@@$/m,/^\d.*$/m]};var e={"deleted-sign":"-","deleted-arrow":"<","inserted-sign":"+","inserted-arrow":">",unchanged:" ",diff:"!"};Object.keys(e).forEach(function(t){var r=e[t],o=[];/^\w+$/.test(t)||o.push(/\w+/.exec(t)[0]),t==="diff"&&o.push("bold"),n.languages.diff[t]={pattern:RegExp("^(?:["+r+`].*(?:\r +?| +|(?![\\s\\S])))+`,"m"),alias:o,inside:{line:{pattern:/(.)(?=[\s\S]).*(?:\r\n?|\n)?/,lookbehind:!0},prefix:{pattern:/[\s\S]/,alias:/\w+/.exec(t)[0]}}}}),Object.defineProperty(n.languages.diff,"PREFIXES",{value:e})})(Prism);var o2=globalThis.Prism||window.Prism;var _m={};Lt(_m,{$createCodeHighlightNode:()=>Yu,$createCodeNode:()=>$i,$getCodeLineDirection:()=>p0,$getEndOfCodeInLine:()=>pm,$getFirstCodeNodeOfLine:()=>Yr,$getLastCodeNodeOfLine:()=>zo,$getStartOfCodeInLine:()=>fm,$isCodeHighlightNode:()=>je,$isCodeNode:()=>Fn,CODE_LANGUAGE_FRIENDLY_NAME_MAP:()=>mm,CODE_LANGUAGE_MAP:()=>m0,CodeExtension:()=>CL,CodeHighlightNode:()=>cr,CodeNode:()=>Pn,DEFAULT_CODE_LANGUAGE:()=>gm,PrismTokenizer:()=>C0,getCodeLanguageOptions:()=>bL,getCodeLanguages:()=>yL,getCodeThemeOptions:()=>SL,getDefaultCodeLanguage:()=>pL,getEndOfCodeInLine:()=>vL,getFirstCodeNodeOfLine:()=>AL,getLanguageFriendlyName:()=>xL,getLastCodeNodeOfLine:()=>wL,getStartOfCodeInLine:()=>OL,normalizeCodeLang:()=>_0,normalizeCodeLanguage:()=>_0,registerCodeHighlighting:()=>EL});var l2=cc(oa(),1);function Vu(n,...e){let t=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",n);for(let o of e)r.append("v",o);throw t.search=r.toString(),Error(`Minified Lexical error #${n}; visit ${t.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}var gm="javascript",pL=()=>gm;function g0(n,e){for(let t of n.childNodes){if(Xe(t)&&t.tagName===e)return!0;g0(t,e)}return!1}var hl="data-language",dl="data-highlight-language",Gu="data-theme",Pn=class extends Ye{__language;__theme;__isSyntaxHighlightSupported;static getType(){return"code"}static clone(e){return new Pn(e.__language,e.__key)}constructor(e,t){super(t),this.__language=e||void 0,this.__isSyntaxHighlightSupported=!1,this.__theme=void 0}afterCloneFrom(e){super.afterCloneFrom(e),this.__language=e.__language,this.__theme=e.__theme,this.__isSyntaxHighlightSupported=e.__isSyntaxHighlightSupported}createDOM(e){let t=document.createElement("code");_e(t,e.theme.code),t.setAttribute("spellcheck","false");let r=this.getLanguage();r&&(t.setAttribute(hl,r),this.getIsSyntaxHighlightSupported()&&t.setAttribute(dl,r));let o=this.getTheme();o&&t.setAttribute(Gu,o);let s=this.getStyle();return s&&t.setAttribute("style",s),t}updateDOM(e,t,r){let o=this.__language,s=e.__language;o?o!==s&&t.setAttribute(hl,o):s&&t.removeAttribute(hl);let i=this.__isSyntaxHighlightSupported;e.__isSyntaxHighlightSupported&&s?i&&o?o!==s&&t.setAttribute(dl,o):t.removeAttribute(dl):i&&o&&t.setAttribute(dl,o);let a=this.__theme,l=e.__theme;a?a!==l&&t.setAttribute(Gu,a):l&&t.removeAttribute(Gu);let c=this.__style,u=e.__style;return c?c!==u&&t.setAttribute("style",c):u&&t.removeAttribute("style"),!1}exportDOM(e){let t=document.createElement("pre");_e(t,e._config.theme.code),t.setAttribute("spellcheck","false");let r=this.getLanguage();r&&(t.setAttribute(hl,r),this.getIsSyntaxHighlightSupported()&&t.setAttribute(dl,r));let o=this.getTheme();o&&t.setAttribute(Gu,o);let s=this.getStyle();return s&&t.setAttribute("style",s),{element:t}}static importDOM(){return{code:e=>e.textContent!=null&&(/\r?\n/.test(e.textContent)||g0(e,"BR"))?{conversion:s0,priority:1}:null,div:()=>({conversion:mL,priority:1}),pre:()=>({conversion:s0,priority:0}),table:e=>lm(e)?{conversion:_L,priority:3}:null,td:e=>{let t=e,r=t.closest("table");return t.classList.contains("js-file-line")||r&&lm(r)?{conversion:i0,priority:3}:null},tr:e=>{let t=e.closest("table");return t&&lm(t)?{conversion:i0,priority:3}:null}}}static importJSON(e){return $i().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setLanguage(e.language).setTheme(e.theme)}exportJSON(){return{...super.exportJSON(),language:this.getLanguage(),theme:this.getTheme()}}insertNewAfter(e,t=!0){let r=this.getChildren(),o=r.length;if(o>=2&&r[o-1].getTextContent()===` +`&&r[o-2].getTextContent()===` +`&&e.isCollapsed()&&e.anchor.key===this.__key&&e.anchor.offset===o){r[o-1].remove(),r[o-2].remove();let l=U();return this.insertAfter(l,t),l}let{anchor:s,focus:i}=e,a=(s.isBefore(i)?s:i).getNode();if(B(a)){let l=Yr(a),c=[];for(;;)if(_t(l))c.push(an()),l=l.getNextSibling();else{if(!je(l))break;{let m=0,_=l.getTextContent(),C=l.getTextContentSize();for(;me.append(t)),this.replace(e),!0}setLanguage(e){let t=this.getWritable();return t.__language=e||void 0,t}getLanguage(){return this.getLatest().__language}setIsSyntaxHighlightSupported(e){let t=this.getWritable();return t.__isSyntaxHighlightSupported=e,t}getIsSyntaxHighlightSupported(){return this.getLatest().__isSyntaxHighlightSupported}setTheme(e){let t=this.getWritable();return t.__theme=e||void 0,t}getTheme(){return this.getLatest().__theme}};function $i(n,e){return hi(Pn).setLanguage(n).setTheme(e)}function Fn(n){return n instanceof Pn}function s0(n){return{node:$i(n.getAttribute(hl))}}function mL(n){let e=n,t=a0(e);return t||function(r){let o=r.parentElement;for(;o!==null;){if(a0(o))return!0;o=o.parentElement}return!1}(e)?{node:t?$i():null}:{node:null}}function _L(){return{node:$i()}}function i0(){return{node:null}}function a0(n){return n.style.fontFamily.match("monospace")!==null}function lm(n){return n.classList.contains("js-file-line-container")}var cr=class extends Ft{__highlightType;constructor(e="",t,r){super(e,r),this.__highlightType=t}static getType(){return"code-highlight"}static clone(e){return new cr(e.__text,e.__highlightType||void 0,e.__key)}getHighlightType(){return this.getLatest().__highlightType}setHighlightType(e){let t=this.getWritable();return t.__highlightType=e||void 0,t}canHaveFormat(){return!1}createDOM(e){let t=super.createDOM(e),r=cm(e.theme,this.__highlightType);return _e(t,r),t}updateDOM(e,t,r){let o=super.updateDOM(e,t,r),s=cm(r.theme,e.__highlightType),i=cm(r.theme,this.__highlightType);return s!==i&&(s&&wt(t,s),i&&_e(t,i)),o}static importJSON(e){return Yu().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setHighlightType(e.highlightType)}exportJSON(){return{...super.exportJSON(),highlightType:this.getHighlightType()}}setFormat(e){return this}isParentRequired(){return!0}createParentElementNode(){return $i()}};function cm(n,e){return e&&n&&n.codeHighlight&&n.codeHighlight[e]}function Yu(n="",e){return ft(new cr(n,e))}function je(n){return n instanceof cr}function f0(n,e){let t=n;for(let r=mt(n,e);r&&(je(r.origin)||_t(r.origin));r=bu(r))t=r.origin;return t}function Yr(n){return f0(n,"previous")}function zo(n){return f0(n,"next")}function p0(n){let e=Yr(n),t=zo(n),r=e;for(;r!==null;){if(je(r)){let s=lp(r.getTextContent());if(s!==null)return s}if(r===t)break;r=r.getNextSibling()}let o=e.getParent();if(F(o)){let s=o.getDirection();if(s==="ltr"||s==="rtl")return s}return null}function fm(n,e){let t=null,r=null,o=n,s=e,i=n.getTextContent();for(;;){if(s===0){if(o=o.getPreviousSibling(),o===null)break;if(je(o)||_t(o)||be(o)||Vu(167),be(o)){t={node:o,offset:1};break}s=Math.max(0,o.getTextContentSize()-1),i=o.getTextContent()}else s--;let l=i[s];je(o)&&l!==" "&&(r={node:o,offset:s})}if(r!==null)return r;let a=null;if(e",unchanged:" ",diff:"!"};Object.keys(e).forEach(function(t){var r=e[t],o=[];/^\w+$/.test(t)||o.push(/\w+/.exec(t)[0]),t==="diff"&&o.push("bold"),n.languages.diff[t]={pattern:RegExp("^(?:["+r+`].*(?:\r +?| +|(?![\\s\\S])))+`,"m"),alias:o,inside:{line:{pattern:/(.)(?=[\s\S]).*(?:\r\n?|\n)?/,lookbehind:!0},prefix:{pattern:/[\s\S]/,alias:/\w+/.exec(t)[0]}}}}),Object.defineProperty(n.languages.diff,"PREFIXES",{value:e})})(Prism);var Cn=globalThis.Prism||window.Prism,mm={c:"C",clike:"C-like",cpp:"C++",css:"CSS",html:"HTML",java:"Java",js:"JavaScript",markdown:"Markdown",objc:"Objective-C",plain:"Plain Text",powershell:"PowerShell",py:"Python",rust:"Rust",sql:"SQL",swift:"Swift",typescript:"TypeScript",xml:"XML"},m0={cpp:"cpp",java:"java",javascript:"js",md:"markdown",plaintext:"plain",python:"py",text:"plain",ts:"typescript"};function _0(n){return m0[n]||n}function xL(n){let e=_0(n);return mm[e]||e}var yL=()=>Object.keys(Cn.languages).filter(n=>typeof Cn.languages[n]!="function").sort();function bL(){let n=[];for(let[e,t]of Object.entries(mm))n.push([e,t]);return n}function SL(){return[]}function dm(n){return typeof n=="string"?n:Array.isArray(n)?n.map(dm).join(""):dm(n.content)}function TL(n,e){let t=/^diff-([\w-]+)/i.exec(e),r=n.getTextContent(),o=Cn.tokenize(r,Cn.languages[t?"diff":e]);return t&&(o=function(s,i){let a=i,l=Cn.languages[a],c={tokens:s},u=Cn.languages.diff.PREFIXES;for(let d of c.tokens){if(typeof d=="string"||!(d.type in u)||!Array.isArray(d.content))continue;let h=d.type,g=0,f=()=>(g++,new Cn.Token("prefix",u[h],h.replace(/^(\w+).*/,"$1"))),p=d.content.filter(S=>typeof S=="string"||S.type!=="prefix"),m=d.content.length-p.length,_=Cn.tokenize(dm(p),l);_.unshift(f());let C=/\r\n|\n/g,x=S=>{let b=[];C.lastIndex=0;let N,A=0;for(;g{for(let b=0;b0&&t.push(Yu(a,e))}}else{let{content:o,alias:s}=r;typeof o=="string"?t.push(...hm([o],r.type==="prefix"&&typeof s=="string"?s:r.type)):Array.isArray(o)&&t.push(...hm(o,r.type==="unchanged"?void 0:r.type))}return t}var C0={$tokenize(n,e){return TL(n,e||this.defaultLanguage)},defaultLanguage:gm,tokenize(n,e){return Cn.tokenize(n,Cn.languages[e||""]||Cn.languages[this.defaultLanguage])}};function l0(n,e,t){let r=n.getParent();Fn(r)?x0(r,e,t):je(n)&&n.replace(ye(n.__text))}function NL(n,e){let t=e.getElementByKey(n.getKey());if(t===null)return;let r=n.getChildren(),o=r.length;if(o===t.__cachedChildrenLength)return;t.__cachedChildrenLength=o;let s="1",i=1;for(let a=0;a{(function(s,i){let a=Fe(s);if(!Fn(a)||!a.isAttached())return;let l=w();if(!v(l))return void i();let c=l.anchor,u=c.offset,d=c.type==="element"&&be(a.getChildAtIndex(c.offset-1)),h=0;if(!d){let g=c.getNode();h=u+g.getPreviousSiblings().reduce((f,p)=>f+p.getTextContentSize(),0)}if(!!i()){if(d)return void c.getNode().select(u,u);a.getChildren().some(g=>{let f=B(g);if(f||be(g)){let p=g.getTextContentSize();if(f&&p>=h)return g.select(h,h),!0;h-=p}return!1})}})(r,()=>{let s=Fe(r);if(!Fn(s)||!s.isAttached())return!1;let i=s.getLanguage()||t.defaultLanguage,a=t.$tokenize(s,i),l=function(h,g){let f=0;for(;f{um.delete(r)},skipTransforms:!0}))}function c0(n,e){return je(n)&&je(e)&&n.__text===e.__text&&n.__highlightType===e.__highlightType||_t(n)&&_t(e)||be(n)&&be(e)}function As(n){if(!v(n))return!1;let e=n.anchor.getNode(),t=Fn(e)?e:e.getParent(),r=n.focus.getNode(),o=Fn(r)?r:r.getParent();return Fn(t)&&t.is(o)}function y0(n){let e=n.getNodes(),t=[];if(e.length===1&&Fn(e[0]))return t;let r=[];for(let o=0;o0&&(t.push(r),r=[]):r.push(s)}if(r.length>0){let o=n.isBackward()?n.anchor:n.focus,s=Rn(r[0].getKey(),0,"text");o.is(s)||t.push(r)}return t}function u0(n){let e=w();if(!v(e)||!As(e))return!1;let t=y0(e),r=t.length;if(r===0&&e.isCollapsed())return n===$t&&e.insertNodes([an()]),!0;if(r===0&&n===$t&&e.getTextContent()===` +`){let o=an(),s=pt(),i=e.isBackward()?"previous":"next";return e.insertNodes([o,s]),Ha(tp(Pa(rp(o,"next",0),Mn(mt(s,"next"))),i)),!0}for(let o=0;o0){let i=s[0];if(o===0&&(i=Yr(i)),n===$t){let a=an();if(i.insertBefore(a),o===0){let l=e.isBackward()?"focus":"anchor",c=Rn(i.getKey(),0,"text");e[l].is(c)&&e[l].set(a.getKey(),0,"text")}}else _t(i)&&i.remove()}}return!0}function d0(n,e){let t=w();if(!v(t))return!1;let{anchor:r,focus:o}=t,s=r.offset,i=o.offset,a=r.getNode(),l=o.getNode(),c=n===Pt;if(!As(t)||!je(a)&&!_t(a)||!je(l)&&!_t(l))return!1;if(!e.altKey){if(t.isCollapsed()){let _=a.getParentOrThrow();if(c&&s===0&&a.getPreviousSibling()===null){if(_.getPreviousSibling()===null)return _.selectPrevious(),e.preventDefault(),!0}else if(!c&&s===a.getTextContentSize()&&a.getNextSibling()===null&&_.getNextSibling()===null)return _.selectNext(),e.preventDefault(),!0}return!1}let u,d;if(a.isBefore(l)?(u=Yr(a),d=zo(l)):(u=Yr(l),d=zo(a)),u==null||d==null)return!1;let h=u.getNodesBetween(d);for(let _=0;__.remove()),n===Pt?(h.forEach(_=>m.insertBefore(_)),m.insertBefore(g)):(m.insertAfter(g),m=g,h.forEach(_=>{m.insertAfter(_),m=_})),t.setTextNodeRange(a,s,l,i),!0}function h0(n,e){let t=w();if(!v(t))return!1;let{anchor:r,focus:o}=t,s=r.getNode(),i=o.getNode(),a=n===Wa;if(!As(t)||!je(s)&&!_t(s)||!je(i)&&!_t(i))return!1;let l=i;if(p0(l)==="rtl"?!a:a){let c=fm(l,o.offset);if(c!==null){let{node:u,offset:d}=c;be(u)?u.selectNext(0,0):t.setTextNodeRange(u,d,u,d)}else l.getParentOrThrow().selectStart()}else pm(l).select();return e.preventDefault(),e.stopPropagation(),!0}function EL(n,e){if(!n.hasNodes([Pn,cr]))throw new Error("CodeHighlightPlugin: CodeNode or CodeHighlightNode not registered on editor");e==null&&(e=C0);let t=[];return n._headless!==!0&&t.push(n.registerMutationListener(Pn,r=>{n.getEditorState().read(()=>{for(let[o,s]of r)if(s!=="destroyed"){let i=Fe(o);i!==null&&NL(i,n)}})},{skipInitialization:!1})),t.push(n.registerNodeTransform(Pn,r=>x0(r,n,e)),n.registerNodeTransform(Ft,r=>l0(r,n,e)),n.registerNodeTransform(cr,r=>l0(r,n,e)),n.registerCommand(_n,r=>{let o=function(s){let i=w();if(!v(i)||!As(i))return null;let a=s?hn:$t,l=s?hn:Ao,c=i.anchor,u=i.focus;if(c.is(u))return l;let d=y0(i);if(d.length!==1)return a;let h=d[0],g,f;h.length===0&&Vu(285),i.isBackward()?(g=u,f=c):(g=c,f=u);let p=Yr(h[0]),m=zo(h[0]),_=Rn(p.getKey(),0,"text"),C=Rn(m.getKey(),m.getTextContentSize(),"text");return g.isBefore(_)||C.isBefore(f)?a:_.isBefore(g)||f.isBefore(C)?l:a}(r.shiftKey);return o!==null&&(r.preventDefault(),n.dispatchCommand(o,void 0),!0)},de),n.registerCommand(Ao,()=>!!As(w())&&(Fa([an()]),!0),de),n.registerCommand($t,r=>u0($t),de),n.registerCommand(hn,r=>u0(hn),de),n.registerCommand(Pt,r=>{let o=w();if(!v(o))return!1;let{anchor:s}=o,i=s.getNode();return!!As(o)&&(o.isCollapsed()&&s.offset===0&&i.getPreviousSibling()===null&&Fn(i.getParentOrThrow())?(r.preventDefault(),!0):d0(Pt,r))},de),n.registerCommand(dn,r=>{let o=w();if(!v(o))return!1;let{anchor:s}=o,i=s.getNode();return!!As(o)&&(o.isCollapsed()&&s.offset===i.getTextContentSize()&&i.getNextSibling()===null&&Fn(i.getParentOrThrow())?(r.preventDefault(),!0):d0(dn,r))},de),n.registerCommand(Wa,r=>h0(Wa,r),de),n.registerCommand(au,r=>h0(au,r),de)),Ee(...t)}var AL=Yr,wL=zo,vL=pm,OL=fm;var Le=_m,E2=Le.$createCodeHighlightNode,gl=Le.$createCodeNode,A2=Le.$getCodeLineDirection,w2=Le.$getEndOfCodeInLine,v2=Le.$getFirstCodeNodeOfLine,O2=Le.$getLastCodeNodeOfLine,k2=Le.$getStartOfCodeInLine,L2=Le.$isCodeHighlightNode,Ko=Le.$isCodeNode,b0=Le.CODE_LANGUAGE_FRIENDLY_NAME_MAP,R2=Le.CODE_LANGUAGE_MAP,M2=Le.CodeExtension,S0=Le.CodeHighlightNode,Uo=Le.CodeNode,D2=Le.DEFAULT_CODE_LANGUAGE,I2=Le.PrismTokenizer,$2=Le.getCodeLanguageOptions,P2=Le.getCodeLanguages,F2=Le.getCodeThemeOptions,B2=Le.getDefaultCodeLanguage,H2=Le.getEndOfCodeInLine,z2=Le.getFirstCodeNodeOfLine,K2=Le.getLanguageFriendlyName,U2=Le.getLastCodeNodeOfLine,W2=Le.getStartOfCodeInLine,Cm=Le.normalizeCodeLang,G2=Le.normalizeCodeLanguage,T0=Le.registerCodeHighlighting;var Em={};Lt(Em,{$convertFromMarkdownString:()=>KL,$convertToMarkdownString:()=>UL,BOLD_ITALIC_STAR:()=>U0,BOLD_ITALIC_UNDERSCORE:()=>W0,BOLD_STAR:()=>G0,BOLD_UNDERSCORE:()=>V0,CHECK_LIST:()=>HL,CODE:()=>F0,ELEMENT_TRANSFORMERS:()=>J0,HEADING:()=>$0,HIGHLIGHT:()=>K0,INLINE_CODE:()=>z0,ITALIC_STAR:()=>j0,ITALIC_UNDERSCORE:()=>q0,LINK:()=>Z0,MULTILINE_ELEMENT_TRANSFORMERS:()=>X0,ORDERED_LIST:()=>H0,QUOTE:()=>P0,STRIKETHROUGH:()=>Y0,TEXT_FORMAT_TRANSFORMERS:()=>Q0,TEXT_MATCH_TRANSFORMERS:()=>eT,TRANSFORMERS:()=>Xu,UNORDERED_LIST:()=>B0,registerMarkdownShortcuts:()=>zL});function xm(n,e){let t={};for(let r of n){let o=e(r);o&&(t[o]?t[o].push(r):t[o]=[r])}return t}function Tm(n){let e=xm(n,t=>t.type);return{element:e.element||[],multilineElement:e["multiline-element"]||[],textFormat:e["text-format"]||[],textMatch:e["text-match"]||[]}}var qu=/[!-/:-@[-`{-~\s]/,kL=/^\s{0,3}$/;function ym(n){if(!rt(n))return!1;let e=n.getFirstChild();return e==null||n.getChildrenSize()===1&&B(e)&&kL.test(e.getTextContent())}function LL(n,e,t,r){for(let o of e){if(!o.export)continue;let s=o.export(n,i=>Zu(i,t,r));if(s!=null)return s}return F(n)?Zu(n,t,r):Et(n)?n.getTextContent():null}function Zu(n,e,t,r,o){let s=[],i=n.getChildren();r||(r=[]),o||(o=[]);e:for(let a of i){for(let l of t){if(!l.export)continue;let c=l.export(a,u=>Zu(u,e,t,r,[...o,...r]),(u,d)=>N0(u,d,e,r,o));if(c!=null){s.push(c);continue e}}be(a)?s.push(` +`):B(a)?s.push(N0(a,a.getTextContent(),e,r,o)):F(a)?s.push(Zu(a,e,t,r,o)):Et(a)&&s.push(a.getTextContent())}return s.join("")}function N0(n,e,t,r,o){let s=n.getFormat()===0?e:function(h){return h.replace(/^\s+|\s+$/g,g=>[...g].map(f=>"&#"+f.codePointAt(0)+";").join(""))}(e);n.hasFormat("code")||(s=s.replace(/([*_`~\\])/g,"\\$1"));let i="",a="",l="",c=E0(n,!0),u=E0(n,!1),d=new Set;for(let h of t){let g=h.format[0],f=h.tag;ju(n,g)&&!d.has(g)&&(d.add(g),ju(c,g)&&r.find(p=>p.tag===f)||(r.push({format:g,tag:f}),i+=f))}for(let h=0;hh;){let m=p.pop();o&&m&&o.find(_=>_.tag===m.tag)||(m&&typeof m.tag=="string"&&(g?f||(l+=m.tag):a+=m.tag),r.pop())}break}return s=i+s+l,a+s}function E0(n,e){let t=e?n.getPreviousSibling():n.getNextSibling();if(!t){let r=n.getParentOrThrow();r.isInline()&&(t=e?r.getPreviousSibling():r.getNextSibling())}for(;t;){if(F(t)){if(!t.isInline())break;let r=e?t.getLastDescendant():t.getFirstDescendant();if(B(r))return r;t=e?t.getPreviousSibling():t.getNextSibling()}if(B(t))return t;if(!F(t))return null}return null}function ju(n,e){return B(n)&&n.hasFormat(e)}function RL(n,e){let t=function(o,s){let i=o.match(s.openTagsRegExp);if(i==null)return null;for(let a of i){let l=a.replace(/^\s/,""),c=s.fullMatchRegExpByTag[l];if(c==null)continue;let u=o.match(c),d=s.transformersByTag[l];if(u!=null&&d!=null){if(d.intraword!==!1)return u;let{index:h=0}=u,g=o[h-1],f=o[h+u[0].length];if((!g||qu.test(g))&&(!f||qu.test(f)))return u}}return null}(n.getTextContent(),e);if(!t)return null;let r=t.index||0;return{endIndex:r+t[0].length,match:t,startIndex:r,transformer:e.transformersByTag[t[1]]}}function ws(n){return B(n)&&!n.hasFormat("code")}function vs(n,e,t){let r=RL(n,e),o=function(i,a){let l=i,c,u,d,h;for(let g of a){if(!g.replace||!g.importRegExp)continue;let f=l.getTextContent().match(g.importRegExp);if(!f)continue;let p=f.index||0,m=g.getEndIndex?g.getEndIndex(l,f):p+f[0].length;m!==!1&&(c===void 0||u===void 0||pu||m<=c))&&(c=p,u=m,d=g,h=f)}return c===void 0||u===void 0||d===void 0||h===void 0?null:{endIndex:u,match:h,startIndex:c,transformer:d}}(n,t);if(r&&o&&(r.startIndex<=o.startIndex&&r.endIndex>=o.endIndex||o.startIndex>r.endIndex?o=null:r=null),r){let i=function(a,l,c,u,d){let h=a.getTextContent(),g,f,p;if(d[0]===h?g=a:l===0?[g,f]=a.splitText(c):[p,g,f]=a.splitText(l,c),g.setTextContent(d[2]),u)for(let m of u.format)g.hasFormat(m)||g.toggleFormat(m);return{nodeAfter:f,nodeBefore:p,transformedNode:g}}(n,r.startIndex,r.endIndex,r.transformer,r.match);ws(i.nodeAfter)&&vs(i.nodeAfter,e,t),ws(i.nodeBefore)&&vs(i.nodeBefore,e,t),ws(i.transformedNode)&&vs(i.transformedNode,e,t)}else if(o){let i=function(a,l,c,u,d){let h,g,f;return l===0?[h,g]=a.splitText(c):[f,h,g]=a.splitText(l,c),u.replace?{nodeAfter:g,nodeBefore:f,transformedNode:u.replace(h,d)||void 0}:null}(n,o.startIndex,o.endIndex,o.transformer,o.match);if(!i)return;ws(i.nodeAfter)&&vs(i.nodeAfter,e,t),ws(i.nodeBefore)&&vs(i.nodeBefore,e,t),ws(i.transformedNode)&&vs(i.transformedNode,e,t)}let s=n.getTextContent().replace(/\\([*_`~\\])/g,"$1").replace(/&#(\d+);/g,(i,a)=>String.fromCodePoint(a));n.setTextContent(s)}function ML(n,e=!1){let t=Tm(n),r=function(o){let s={},i={},a=[],l="(?{let i=o.split(` +`),a=i.length,l=s||Be();l.clear();for(let u=0;u1&&u.remove();w()!==null&&l.selectStart()}}function DL(n,e,t,r){for(let o of t){let{handleImportAfterStartMatch:s,regExpEnd:i,regExpStart:a,replace:l}=o,c=n[e].match(a);if(!c)continue;if(s){let f=s({lines:n,rootNode:r,startLineIndex:e,startMatch:c,transformer:o});if(f===null)continue;if(f)return f}let u=typeof i=="object"&&"regExp"in i?i.regExp:i,d=i&&typeof i=="object"&&"optional"in i?i.optional:!i,h=e,g=n.length;for(;h0){let l=a.getPreviousSibling();if(!s&&(rt(l)||$n(l)||zt(l))){let c=l;if(zt(l)){let u=l.getLastDescendant();c=u==null?null:oe(u,$o)}c!=null&&c.getTextContentSize()>0&&(c.splice(c.getChildrenSize(),0,[pt(),...a.getChildren()]),a.remove())}}}function $L(n,...e){let t=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",n);for(let o of e)r.append("v",o);throw t.search=r.toString(),Error(`Minified Lexical error #${n}; visit ${t.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}var k0=/^(\s*)(\d{1,})\.\s/,L0=/^(\s*)[-*+]\s/,R0=/^(\s*)(?:[-*+]\s)?\s?(\[(\s|x)?\])\s/i,bm=/^(#{1,6})\s/,M0=/^>\s/,D0=/^[ \t]*```([\w-]+)?/,Sm=/[ \t]*```$/,PL=/^[ \t]*```[^`]+(?:(?:`{1,2}|`{4,})[^`]+)*```(?:[^`]|$)/,FL=/^(?:\|)(.+)(?:\|)\s?$/,BL=/^(\| ?:?-*:? ?)+\|\s?$/,A0=/^<[a-z_][\w-]*(?:\s[^<>]*)?\/?>/i,w0=/^<\/[a-z_][\w-]*\s*>/i,v0=n=>new RegExp(`(?:${n.source})$`,n.flags),fl=gu("mdListMarker",{parse:n=>typeof n=="string"&&/^[-*+]$/.test(n)?n:"-"}),I0=n=>(e,t,r,o)=>{let s=n(r);s.append(...t),e.replace(s),o||s.select(0,0)},Nm=n=>(e,t,r,o)=>{let s=e.getPreviousSibling(),i=e.getNextSibling(),a=iS(n==="check"?r[3]==="x":void 0),l=r[0].trim()[0],c=n!=="bullet"&&n!=="check"||l!==fl.parse(l)?void 0:l;if(zt(i)&&i.getListType()===n){c&&To(i,fl,c);let d=i.getFirstChild();d!==null?d.insertBefore(a):i.append(a),e.remove()}else if(zt(s)&&s.getListType()===n)c&&To(s,fl,c),s.append(a),e.remove();else{let d=Ru(n,n==="number"?Number(r[2]):void 0);c&&To(d,fl,c),d.append(a),e.replace(d)}a.append(...t),o||a.select(0,0);let u=function(d){let h=d.match(/\t/g),g=d.match(/ /g),f=0;return h&&(f+=h.length),g&&(f+=Math.floor(g.length/4)),f}(r[1]);u&&a.setIndent(u)},Ju=(n,e,t)=>{let r=[],o=n.getChildren(),s=0;for(let i of o)if($o(i)){if(i.getChildrenSize()===1){let d=i.getFirstChild();if(zt(d)){r.push(Ju(d,e,t+1));continue}}let a=" ".repeat(4*t),l=n.getListType(),c=gi(n,fl),u=l==="number"?`${n.getStart()+s}. `:l==="check"?`${c} [${i.getChecked()?"x":" "}] `:c+" ";r.push(a+u+e(i)),s++}return r.join(` +`)},$0={dependencies:[Ku],export:(n,e)=>{if(!al(n))return null;let t=Number(n.getTag().slice(1));return"#".repeat(t)+" "+e(n)},regExp:bm,replace:I0(n=>{let e="h"+n[1].length;return il(e)}),type:"element"},P0={dependencies:[Uu],export:(n,e)=>{if(!$n(n))return null;let t=e(n).split(` +`),r=[];for(let o of t)r.push("> "+o);return r.join(` +`)},regExp:M0,replace:(n,e,t,r)=>{if(r){let s=n.getPreviousSibling();if($n(s))return s.splice(s.getChildrenSize(),0,[pt(),...e]),void n.remove()}let o=Ii();o.append(...e),n.replace(o),r||o.select(0,0)},type:"element"},F0={dependencies:[Uo],export:n=>{if(!Ko(n))return null;let e=n.getTextContent();return"```"+(n.getLanguage()||"")+(e?` +`+e:"")+"\n```"},regExpEnd:{optional:!0,regExp:Sm},regExpStart:D0,replace:(n,e,t,r,o,s)=>{let i,a;if(!e&&o){if(o.length===1)r?(i=gl(),a=t[1]+o[0]):(i=gl(t[1]),a=o[0].startsWith(" ")?o[0].slice(1):o[0]);else{if(i=gl(t[1]),o[0].trim().length===0)for(;o.length>0&&!o[0].length;)o.shift();else o[0]=o[0].startsWith(" ")?o[0].slice(1):o[0];for(;o.length>0&&!o[o.length-1].length;)o.pop();a=o.join(` +`)}let l=ye(a);i.append(l),n.append(i)}else e&&I0(l=>gl(l?l[1]:void 0))(n,e,t,s)},type:"multiline-element"},B0={dependencies:[Fo,Po],export:(n,e)=>zt(n)?Ju(n,e,0):null,regExp:L0,replace:Nm("bullet"),type:"element"},HL={dependencies:[Fo,Po],export:(n,e)=>zt(n)?Ju(n,e,0):null,regExp:R0,replace:Nm("check"),type:"element"},H0={dependencies:[Fo,Po],export:(n,e)=>zt(n)?Ju(n,e,0):null,regExp:k0,replace:Nm("number"),type:"element"},z0={format:["code"],tag:"`",type:"text-format"},K0={format:["highlight"],tag:"==",type:"text-format"},U0={format:["bold","italic"],tag:"***",type:"text-format"},W0={format:["bold","italic"],intraword:!1,tag:"___",type:"text-format"},G0={format:["bold"],tag:"**",type:"text-format"},V0={format:["bold"],intraword:!1,tag:"__",type:"text-format"},Y0={format:["strikethrough"],tag:"~~",type:"text-format"},j0={format:["italic"],tag:"*",type:"text-format"},q0={format:["italic"],intraword:!1,tag:"_",type:"text-format"},Z0={dependencies:[nl],export:(n,e,t)=>{if(!Fu(n)||bS(n))return null;let r=n.getTitle(),o=e(n);return r?`[${o}](${n.getURL()} "${r}")`:`[${o}](${n.getURL()})`},importRegExp:/(?:\[(.+?)\])(?:\((?:([^()\s]+)(?:\s"((?:[^"]*\\")*[^"]*)"\s*)?)\))/,regExp:/(?:\[(.+?)\])(?:\((?:([^()\s]+)(?:\s"((?:[^"]*\\")*[^"]*)"\s*)?)\))$/,replace:(n,e)=>{let[,t,r,o]=e,s=Pu(r,{title:o}),i=t.split("[").length-1,a=t.split("]").length-1,l=t,c="";if(ia){let d=t.split("[");c="["+d[0],l=d.slice(1).join("[")}let u=ye(l);return u.setFormat(n.getFormat()),s.append(u),n.replace(s),c&&s.insertBefore(ye(c)),u},trigger:")",type:"text-match"},J0=[$0,P0,B0,H0],X0=[F0],Q0=[z0,U0,W0,G0,V0,K0,j0,q0,Y0],eT=[Z0],Xu=[...J0,...X0,...Q0,...eT];function O0(n,e,t){let r=t.length;for(let o=e;o>=r;o--){let s=o-r;if(tT(n,s,t,0,r)&&n[s+r]!==" ")return s}return-1}function tT(n,e,t,r,o){for(let s=0;si[i.length-1]),o=xm(t.textMatch,({trigger:i})=>i);for(let i of e){let a=i.type;if(a==="element"||a==="text-match"||a==="multiline-element"){let l=i.dependencies;for(let c of l)n.hasNode(c)||$L(173,c.getType())}}let s=(i,a,l)=>{(function(c,u,d,h){let g=c.getParent();if(!Ze(g)||c.getFirstChild()!==u)return!1;let f=u.getTextContent();if(f[d-1]!==" ")return!1;for(let{regExp:p,replace:m}of h){let _=f.match(p);if(_&&_[0].length===(_[0].endsWith(" ")?d:d-1)){let C=u.getNextSiblings(),[x,y]=u.splitText(d);if(m(c,y?[y,...C]:C,_,!1)!==!1)return x.remove(),!0}}return!1})(i,a,l,t.element)||function(c,u,d,h){let g=c.getParent();if(!Ze(g)||c.getFirstChild()!==u)return!1;let f=u.getTextContent();if(f[d-1]!==" ")return!1;for(let{regExpStart:p,replace:m,regExpEnd:_}of h){if(_&&!("optional"in _)||_&&"optional"in _&&!_.optional)continue;let C=f.match(p);if(C&&C[0].length===(C[0].endsWith(" ")?d:d-1)){let x=u.getNextSiblings(),[y,S]=u.splitText(d);if(m(c,S?[S,...x]:x,C,null,null,!1)!==!1)return y.remove(),!0}}return!1}(i,a,l,t.multilineElement)||function(c,u,d){let h=c.getTextContent(),g=d[h[u-1]];if(g==null)return!1;u1&&!tT(h,x,_,0,C)||h[x-1]===" ")continue;let y=h[g+1];if(m.intraword===!1&&y&&!qu.test(y))continue;let S=c,b=S,N=O0(h,x,_),A=b;for(;N<0&&(A=A.getPreviousSibling())&&!be(A);)if(B(A)){if(A.hasFormat("code"))continue;let ie=A.getTextContent();b=A,N=O0(ie,ie.length,_)}if(N<0||b===S&&N+C===x)continue;let O=b.getTextContent();if(N>0&&O[N-1]===f)continue;let P=O[N-1];if(m.intraword===!1&&P&&!qu.test(P))continue;let I=S.getTextContent(),z=I.slice(0,x)+I.slice(g+1);S.setTextContent(z);let G=b===S?z:O;b.setTextContent(G.slice(0,N)+G.slice(N+C));let q=w(),K=Zn();De(K);let le=g-C*(b===S?2:1)+1;K.anchor.set(b.__key,N,"text"),K.focus.set(S.__key,le,"text");for(let ie of m.format)K.hasFormat(ie)||K.formatText(ie);K.anchor.set(K.focus.key,K.focus.offset,K.focus.type);for(let ie of m.format)K.hasFormat(ie)&&K.toggleFormat(ie);return v(q)&&(K.format=q.format),!0}}(a,l,r)};return n.registerUpdateListener(({tags:i,dirtyLeaves:a,editorState:l,prevEditorState:c})=>{if(i.has(g1)||i.has(yi)||n.isComposing())return;let u=l.read(w),d=c.read(w);if(!v(d)||!v(u)||!u.isCollapsed()||u.is(d))return;let h=u.anchor.key,g=u.anchor.offset,f=l._nodeMap.get(h);!B(f)||!a.has(h)||g!==1&&g>d.anchor.offset+1||n.update(()=>{if(!ws(f))return;let p=f.getParent();p===null||Ko(p)||s(p,f,u.anchor.offset)})})}function KL(n,e=Xu,t,r=!1,o=!1){let s=r?n:function(i,a=!1){let l=i.split(` +`),c=!1,u=[];for(let d=0;du.format.length===1).sort((u,d)=>Number(u.format.includes("code"))-Number(d.format.includes("code")));return u=>{let d=[],h=(u||Be()).getChildren();for(let g=0;g0&&!ym(f)&&!ym(h[g-1])?` +`.concat(p):p)}return d.join(` +`)}}(n,t)(e)}var He=Em,Q2=He.$convertFromMarkdownString,e3=He.$convertToMarkdownString,t3=He.BOLD_ITALIC_STAR,n3=He.BOLD_ITALIC_UNDERSCORE,r3=He.BOLD_STAR,o3=He.BOLD_UNDERSCORE,s3=He.CHECK_LIST,i3=He.CODE,a3=He.ELEMENT_TRANSFORMERS,l3=He.HEADING,c3=He.HIGHLIGHT,u3=He.INLINE_CODE,d3=He.ITALIC_STAR,h3=He.ITALIC_UNDERSCORE,g3=He.LINK,f3=He.MULTILINE_ELEMENT_TRANSFORMERS,p3=He.ORDERED_LIST,m3=He.QUOTE,_3=He.STRIKETHROUGH,C3=He.TEXT_FORMAT_TRANSFORMERS,x3=He.TEXT_MATCH_TRANSFORMERS,nT=He.TRANSFORMERS,y3=He.UNORDERED_LIST,rT=He.registerMarkdownShortcuts;var Am={};Lt(Am,{HistoryExtension:()=>Qu,SharedHistoryExtension:()=>VL,createEmptyHistoryState:()=>iT,registerHistory:()=>sT});function WL(n,e,t,r,o){if(n===null||t.size===0&&r.size===0&&!o)return 0;let s=e._selection,i=n._selection;if(o)return 1;if(!(v(s)&&v(i)&&i.isCollapsed()&&s.isCollapsed()))return 0;let a=function(_,C,x){let y=_._nodeMap,S=[];for(let b of C){let N=y.get(b);N!==void 0&&S.push(N)}for(let[b,N]of x){if(!N)continue;let A=y.get(b);A===void 0||Hr(A)||S.push(A)}return S}(e,t,r);if(a.length===0)return 0;if(a.length>1){let _=e._nodeMap,C=_.get(s.anchor.key),x=_.get(i.anchor.key);return C&&x&&!n._nodeMap.has(C.__key)&&B(C)&&C.__text.length===1&&s.anchor.offset===1?2:0}let l=a[0],c=n._nodeMap.get(l.__key);if(!B(c)||!B(l)||c.__mode!==l.__mode)return 0;let u=c.__text,d=l.__text;if(u===d)return 0;let h=s.anchor,g=i.anchor;if(h.key!==g.key||h.type!=="text")return 0;let f=h.offset,p=g.offset,m=d.length-u.length;return m===1&&p===f-1?2:m===-1&&p===f+1?3:m===-1&&p===f?4:0}function GL(n,e){let t=Date.now(),r=0;return(o,s,i,a,l,c)=>{let u=Date.now();if(c.has(yi))return r=0,t=u,2;let d=WL(o,s,a,l,n.isComposing()),h=(()=>{let g=i===null||i.editor===n,f=c.has(m1);if(!f&&g&&c.has(gs))return 0;if(o===null)return 1;let p=s._selection;if(!(a.size>0||l.size>0))return p!==null?0:2;let m=typeof e=="number"?e:e.peek();return f===!1&&d!==0&&d===r&&uy.exportJSON()))===JSON.stringify(x.read(()=>S.exportJSON()))}(Array.from(a)[0],o,s)?0:1})();return t=u,r=d,h}}function oT(n){n.undoStack=[],n.redoStack=[],n.current=null}function sT(n,e,t){let r=GL(n,t);return Ee(n.registerCommand(du,()=>(function(s,i){let a=i.redoStack,l=i.undoStack;if(l.length!==0){let c=i.current,u=l.pop();c!==null&&(a.push(c),s.dispatchCommand(za,!0)),l.length===0&&s.dispatchCommand(Ka,!1),i.current=u||null,u&&u.editor.setEditorState(u.editorState,{tag:yi})}}(n,e),!0),W),n.registerCommand(lu,()=>(function(s,i){let a=i.redoStack,l=i.undoStack;if(a.length!==0){let c=i.current;c!==null&&(l.push(c),s.dispatchCommand(Ka,!0));let u=a.pop();a.length===0&&s.dispatchCommand(za,!1),i.current=u||null,u&&u.editor.setEditorState(u.editorState,{tag:yi})}}(n,e),!0),W),n.registerCommand(nu,()=>(oT(e),!1),W),n.registerCommand(ru,()=>(oT(e),n.dispatchCommand(za,!1),n.dispatchCommand(Ka,!1),!0),W),n.registerUpdateListener(({editorState:s,prevEditorState:i,dirtyLeaves:a,dirtyElements:l,tags:c})=>{let u=e.current,d=e.redoStack,h=e.undoStack,g=u===null?null:u.editorState;if(u!==null&&s===g)return;let f=r(i,s,u,a,l,c);if(f===1)d.length!==0&&(e.redoStack=[],n.dispatchCommand(za,!1)),u!==null&&(h.push({...u}),n.dispatchCommand(Ka,!0));else if(f===2)return;e.current={editor:n,editorState:s}}))}function iT(){return{current:null,redoStack:[],undoStack:[]}}var Qu=ue({build:(n,{delay:e,createInitialHistoryState:t,disabled:r})=>In({delay:e,disabled:r,historyState:t(n)}),config:xt({createInitialHistoryState:iT,delay:300,disabled:typeof window>"u"}),name:"@lexical/history/History",register:(n,e,t)=>{let r=t.getOutput();return Ht(()=>r.disabled.value?void 0:sT(n,r.historyState.value,r.delay))}}),VL=ue({dependencies:[hu(Qu,{createInitialHistoryState:()=>{throw new Error("SharedHistory did not inherit parent history")},disabled:!0})],name:"@lexical/history/SharedHistory",register(n,e,t){let{output:r}=t.getDependency(Qu),o=function(i){return i?Pb(i,Qu.name):null}(n._parentEditor);if(!o)return()=>{};let s=o.output;return Ht(()=>Ib(()=>{r.delay.value=s.delay.value,r.historyState.value=s.historyState.value,r.disabled.value=s.disabled.value}))}});var ed=Am,E3=ed.HistoryExtension,A3=ed.SharedHistoryExtension,aT=ed.createEmptyHistoryState,lT=ed.registerHistory;var wm=cc(oa(),1);function se(n,e,t=""){let r=document.createElement(n);for(let[o,s]of Object.entries(e||{}))o in r?r[o]=s:s!=null&&r.setAttribute(o,s);return t&&(r.innerHTML=t),r}function Os(n){return new DOMParser().parseFromString(n,"text/html")}function cT(n,e,t){let r=t?t.split(".").pop().toLowerCase():"unknown";return se("figure",{className:`attachment attachment--${e?"preview":"file"} attachment--${r}`,"data-content-type":n})}function vm(n){return n.startsWith("image/")&&!n.includes("svg")}function jr(n,e,t=null,r=!1){return n.dispatchEvent(new CustomEvent(e,{bubbles:!0,detail:t,cancelable:r}))}function uT(n){let e=n.querySelectorAll("body > :not(h1, h2, h3, h4, h5, h6) + *");for(let t of e){let r=n.createElement("p");r.appendChild(n.createElement("br")),t.before(r)}}function td(n){let e=Math.random().toString(36).slice(2,10);return`${n}-${e}`}function dT(){document.querySelectorAll("pre[data-language]").forEach(e=>{YL(e)})}function YL(n){let e=n.getAttribute("data-language"),t=n.innerHTML.replace(//gi,` +`),r=wm.default.languages?.[e];if(!r)return;t=new DOMParser().parseFromString(t,"text/html").body.textContent||"";let o=wm.default.highlight(t,r,e),s=se("code",{"data-language":e,innerHTML:o});n.replaceWith(s)}var Ym={};Lt(Ym,{$computeTableMap:()=>bt,$computeTableMapSkipCellCheck:()=>Zr,$createTableCellNode:()=>Zt,$createTableNode:()=>ld,$createTableNodeWithDimensions:()=>bT,$createTableRowNode:()=>Rs,$createTableSelection:()=>Um,$createTableSelectionFrom:()=>OT,$deleteTableColumn:()=>oR,$deleteTableColumnAtSelection:()=>AT,$deleteTableColumn__EXPERIMENTAL:()=>iR,$deleteTableRowAtSelection:()=>ET,$deleteTableRow__EXPERIMENTAL:()=>sR,$findCellNode:()=>Bi,$findTableNode:()=>Ls,$getElementForTableNode:()=>IT,$getNodeTriplet:()=>ot,$getTableAndElementByKey:()=>Wm,$getTableCellNodeFromLexicalNode:()=>ZL,$getTableCellNodeRect:()=>Dm,$getTableColumnIndexFromTableCellNode:()=>XL,$getTableNodeFromLexicalNodeOrThrow:()=>ad,$getTableRowIndexFromTableCellNode:()=>JL,$getTableRowNodeFromTableCellNodeOrThrow:()=>zm,$insertTableColumn:()=>nR,$insertTableColumnAtSelection:()=>NT,$insertTableColumn__EXPERIMENTAL:()=>rR,$insertTableRow:()=>eR,$insertTableRowAtSelection:()=>TT,$insertTableRow__EXPERIMENTAL:()=>tR,$isScrollableTablesActive:()=>Cl,$isTableCellNode:()=>X,$isTableNode:()=>ze,$isTableRowNode:()=>Oe,$isTableSelection:()=>Te,$mergeCells:()=>wT,$removeTableRowAtIndex:()=>QL,$unmergeCell:()=>lR,INSERT_TABLE_COMMAND:()=>yT,TableCellHeaderStates:()=>Re,TableCellNode:()=>xn,TableExtension:()=>SR,TableNode:()=>yn,TableObserver:()=>id,TableRowNode:()=>Jr,applyTableHandlers:()=>kT,getDOMCellFromTarget:()=>_l,getTableElement:()=>Wo,getTableObserverFromTableElement:()=>$m,registerTableCellUnmergeTransform:()=>$T,registerTablePlugin:()=>FT,registerTableSelectionObserver:()=>PT,setScrollableTablesActive:()=>DT});var Bm=/^(\d+(?:\.\d+)?)px$/,Re={BOTH:3,COLUMN:2,NO_STATUS:0,ROW:1},xn=class extends Ye{__colSpan;__rowSpan;__headerState;__width;__backgroundColor;__verticalAlign;static getType(){return"tablecell"}static clone(e){return new xn(e.__headerState,e.__colSpan,e.__width,e.__key)}afterCloneFrom(e){super.afterCloneFrom(e),this.__rowSpan=e.__rowSpan,this.__backgroundColor=e.__backgroundColor,this.__verticalAlign=e.__verticalAlign}static importDOM(){return{td:e=>({conversion:hT,priority:0}),th:e=>({conversion:hT,priority:0})}}static importJSON(e){return Zt().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setHeaderStyles(e.headerState).setColSpan(e.colSpan||1).setRowSpan(e.rowSpan||1).setWidth(e.width||void 0).setBackgroundColor(e.backgroundColor||null).setVerticalAlign(e.verticalAlign||void 0)}constructor(e=Re.NO_STATUS,t=1,r,o){super(o),this.__colSpan=t,this.__rowSpan=1,this.__headerState=e,this.__width=r,this.__backgroundColor=null,this.__verticalAlign=void 0}createDOM(e){let t=document.createElement(this.getTag());return this.__width&&(t.style.width=`${this.__width}px`),this.__colSpan>1&&(t.colSpan=this.__colSpan),this.__rowSpan>1&&(t.rowSpan=this.__rowSpan),this.__backgroundColor!==null&&(t.style.backgroundColor=this.__backgroundColor),km(this.__verticalAlign)&&(t.style.verticalAlign=this.__verticalAlign),_e(t,e.theme.tableCell,this.hasHeader()&&e.theme.tableCellHeader),t}exportDOM(e){let t=super.exportDOM(e);if(fs(t.element)){let r=t.element;r.setAttribute("data-temporary-table-cell-lexical-key",this.getKey()),r.style.border="1px solid black",this.__colSpan>1&&(r.colSpan=this.__colSpan),this.__rowSpan>1&&(r.rowSpan=this.__rowSpan),r.style.width=`${this.getWidth()||75}px`,r.style.verticalAlign=this.getVerticalAlign()||"top",r.style.textAlign="start",this.__backgroundColor===null&&this.hasHeader()&&(r.style.backgroundColor="#f2f3f5")}return t}exportJSON(){return{...super.exportJSON(),...km(this.__verticalAlign)&&{verticalAlign:this.__verticalAlign},backgroundColor:this.getBackgroundColor(),colSpan:this.__colSpan,headerState:this.__headerState,rowSpan:this.__rowSpan,width:this.getWidth()}}getColSpan(){return this.getLatest().__colSpan}setColSpan(e){let t=this.getWritable();return t.__colSpan=e,t}getRowSpan(){return this.getLatest().__rowSpan}setRowSpan(e){let t=this.getWritable();return t.__rowSpan=e,t}getTag(){return this.hasHeader()?"th":"td"}setHeaderStyles(e,t=Re.BOTH){let r=this.getWritable();return r.__headerState=e&t|r.__headerState&~t,r}getHeaderStyles(){return this.getLatest().__headerState}setWidth(e){let t=this.getWritable();return t.__width=e,t}getWidth(){return this.getLatest().__width}getBackgroundColor(){return this.getLatest().__backgroundColor}setBackgroundColor(e){let t=this.getWritable();return t.__backgroundColor=e,t}getVerticalAlign(){return this.getLatest().__verticalAlign}setVerticalAlign(e){let t=this.getWritable();return t.__verticalAlign=e||void 0,t}toggleHeaderStyle(e){let t=this.getWritable();return(t.__headerState&e)===e?t.__headerState-=e:t.__headerState+=e,t}hasHeaderState(e){return(this.getHeaderStyles()&e)===e}hasHeader(){return this.getLatest().__headerState!==Re.NO_STATUS}updateDOM(e){return e.__headerState!==this.__headerState||e.__width!==this.__width||e.__colSpan!==this.__colSpan||e.__rowSpan!==this.__rowSpan||e.__backgroundColor!==this.__backgroundColor||e.__verticalAlign!==this.__verticalAlign}isShadowRoot(){return!0}collapseAtStart(){return!0}canBeEmpty(){return!1}canIndent(){return!1}};function km(n){return n==="middle"||n==="bottom"}function hT(n){let e=n,t=n.nodeName.toLowerCase(),r;Bm.test(e.style.width)&&(r=parseFloat(e.style.width));let o=Zt(t==="th"?Re.ROW:Re.NO_STATUS,e.colSpan,r);o.__rowSpan=e.rowSpan;let s=e.style.backgroundColor;s!==""&&(o.__backgroundColor=s);let i=e.style.verticalAlign;km(i)&&(o.__verticalAlign=i);let a=e.style,l=(a&&a.textDecoration||"").split(" "),c=a.fontWeight==="700"||a.fontWeight==="bold",u=l.includes("line-through"),d=a.fontStyle==="italic",h=l.includes("underline");return{after:g=>{let f=[],p=null,m=()=>{if(p){let _=p.getFirstChild();be(_)&&p.getChildrenSize()===1&&_.remove()}};for(let _ of g)c1(_)||B(_)||be(_)?(B(_)&&(c&&_.toggleFormat("bold"),u&&_.toggleFormat("strikethrough"),d&&_.toggleFormat("italic"),h&&_.toggleFormat("underline")),p?p.append(_):(p=U().append(_),f.push(p))):(f.push(_),m(),p=null);return m(),f.length===0&&f.push(U()),f},node:o}}function Zt(n=Re.NO_STATUS,e=1,t){return ft(new xn(n,e,t))}function X(n){return n instanceof xn}var yT=Ct("INSERT_TABLE_COMMAND");function Z(n,...e){let t=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",n);for(let o of e)r.append("v",o);throw t.search=r.toString(),Error(`Minified Lexical error #${n}; visit ${t.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}var Jr=class extends Ye{__height;static getType(){return"tablerow"}static clone(e){return new Jr(e.__height,e.__key)}static importDOM(){return{tr:e=>({conversion:jL,priority:0})}}static importJSON(e){return Rs().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setHeight(e.height)}constructor(e,t){super(t),this.__height=e}exportJSON(){let e=this.getHeight();return{...super.exportJSON(),...e===void 0?void 0:{height:e}}}createDOM(e){let t=document.createElement("tr");return this.__height&&(t.style.height=`${this.__height}px`),_e(t,e.theme.tableRow),t}extractWithChild(e,t,r){return r==="html"}isShadowRoot(){return!0}setHeight(e){let t=this.getWritable();return t.__height=e,t}getHeight(){return this.getLatest().__height}updateDOM(e){return e.__height!==this.__height}canBeEmpty(){return!1}canIndent(){return!1}};function jL(n){let e=n,t;return Bm.test(e.style.height)&&(t=parseFloat(e.style.height)),{after:r=>wi(r,X),node:Rs(t)}}function Rs(n){return ft(new Jr(n))}function Oe(n){return n instanceof Jr}var Hm=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,qL=Hm&&"documentMode"in document?document.documentMode:null,gT=Hm&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent);function bT(n,e,t=!0){let r=ld();for(let o=0;oX(t));return X(e)?e:null}function zm(n){let e=oe(n,t=>Oe(t));if(Oe(e))return e;throw new Error("Expected table cell to be inside of table row.")}function ad(n){let e=oe(n,t=>ze(t));if(ze(e))return e;throw new Error("Expected table cell to be inside of table.")}function JL(n){let e=zm(n);return ad(e).getChildren().findIndex(t=>t.is(e))}function XL(n){return zm(n).getChildren().findIndex(e=>e.is(n))}function ST(n,e){let t=ad(n),{x:r,y:o}=t.getCordsFromCellNode(n,e);return{above:t.getCellNodeFromCords(r,o-1,e),below:t.getCellNodeFromCords(r,o+1,e),left:t.getCellNodeFromCords(r-1,o,e),right:t.getCellNodeFromCords(r+1,o,e)}}function QL(n,e){let t=n.getChildren();if(e>=t.length||e<0)throw new Error("Expected table cell to be inside of table row.");return t[e].remove(),n}function eR(n,e,t=!0,r,o){let s=n.getChildren();if(e>=s.length||e<0)throw new Error("Table row target index out of range");let i=s[e];if(!Oe(i))throw new Error("Row before insertion index does not exist.");for(let a=0;an===Re.BOTH||n===e?e:Re.NO_STATUS;function TT(n=!0){let e=w();v(e)||Te(e)||Z(188);let t=e.anchor.getNode(),r=e.focus.getNode(),[o]=ot(t),[s,,i]=ot(r),[,a,l]=bt(i,s,o),{startRow:c}=l,{startRow:u}=a;return n?Rm(c+o.__rowSpan>u+s.__rowSpan?o:s,!0):Rm(u=u.length||e<0)throw new Error("Table column target index out of range");let d=u[e];X(d)||Z(12);let{left:h,right:g}=ST(d,o),f=Re.NO_STATUS;(h&&h.hasHeaderState(Re.ROW)||g&&g.hasHeaderState(Re.ROW))&&(f|=Re.ROW);let p=Zt(f);p.append(U()),i.push({newTableCell:p,targetCell:d})}}return i.forEach(({newTableCell:a,targetCell:l})=>{t?l.insertAfter(a):l.insertBefore(a)}),n}function NT(n=!0){let e=w();v(e)||Te(e)||Z(188);let t=e.anchor.getNode(),r=e.focus.getNode(),[o]=ot(t),[s,,i]=ot(r),[,a,l]=bt(i,s,o),{startColumn:c}=l,{startColumn:u}=a;return n?Mm(c+o.__colSpan>u+s.__colSpan?o:s,!0):Mm(u1;){if(N-=C.__colSpan,!(N>=0)){h.append(d(_));continue e}{let{cell:A,startRow:O}=p[N];S=A,b=O}}S.insertAfter(d(_))}else C.setColSpan(C.__colSpan+1)}u!==null&&t&&ml(u);let g=r.getColWidths();if(g){let f=[...g],p=l<0?0:l,m=f[p];f.splice(p,0,m),r.setColWidths(f)}return u}function oR(n,e){let t=n.getChildren();for(let r=0;r=s.length||e<0)throw new Error("Table column target index out of range");s[e].remove()}}return n}function ET(){let n=w();v(n)||Te(n)||Z(188);let[e,t]=n.isBackward()?[n.focus.getNode(),n.anchor.getNode()]:[n.anchor.getNode(),n.focus.getNode()],[r,,o]=ot(e),[s]=ot(t),[i,a,l]=bt(o,r,s),{startRow:c}=a,{startRow:u}=l,d=u+s.__rowSpan-1;if(i.length===d-c+1)return void o.remove();let h=i[0].length,g=i[d+1],f=o.getChildAtIndex(d+1);for(let p=d;p>=c;p--){for(let _=h-1;_>=0;_--){let{cell:C,startRow:x,startColumn:y}=i[p][_];if(y===_){if(xd){let S=Math.max(x,c),b=Math.min(C.__rowSpan+x-1,d),N=S<=b?b-S+1:0;C.setRowSpan(C.__rowSpan-N)}if(x>=c&&x+C.__rowSpan-1>d&&p===d){f===null&&Z(122);let S=null;for(let b=0;b<_;b++){let N=g[b],A=N.cell;N.startRow===p+1&&(S=A),A.__colSpan>1&&(b+=A.__colSpan-1)}S===null?Km(f,C):S.insertAfter(C)}}}let m=o.getChildAtIndex(p);Oe(m)||Z(206,String(p)),m.remove()}if(g!==void 0){let{cell:p}=g[0];ml(p)}else{let p=i[c-1],{cell:m}=p[0];ml(m)}}var sR=ET;function AT(){let n=w();v(n)||Te(n)||Z(188);let e=n.anchor.getNode(),t=n.focus.getNode(),[r,,o]=ot(e),[s]=ot(t),[i,a,l]=bt(o,r,s),{startColumn:c}=a,{startRow:u,startColumn:d}=l,h=Math.min(c,d),g=Math.max(c+r.__colSpan-1,d+s.__colSpan-1),f=g-h+1;if(i[0].length===g-h+1)return o.selectPrevious(),void o.remove();let p=i.length;for(let x=0;xg){if(y===g){let N=g-b+1;S.setColSpan(S.__colSpan-N)}}else S.remove()}let m=i[u],_=c>d?m[c+r.__colSpan]:m[d+s.__colSpan];if(_!==void 0){let{cell:x}=_;ml(x)}else{let x=dm.is(f.cell))){a.add(p);let m=f.startRow,_=f.startColumn,C=f.cell.__rowSpan||1,x=f.cell.__colSpan||1;r=Math.min(r,m),o=Math.max(o,m+C-1),s=Math.min(s,_),i=Math.max(i,_+x-1)}}if(r===1/0||s===1/0)return null;let l=o-r+1,c=i-s+1,u=t[r][s];if(!u.cell)return null;let d=u.cell;d.setColSpan(c),d.setRowSpan(l);let h=new Set([d.getKey()]);for(let g=r;g<=o;g++)for(let f=s;f<=i;f++){let p=t[g][f];if(!p.cell)continue;let m=p.cell,_=m.getKey();h.has(_)||(h.add(_),aR(m)||d.append(...m.getChildren()),m.remove())}return d.getChildrenSize()===0&&d.append(U()),d}function aR(n){if(n.getChildrenSize()!==1)return!1;let e=n.getFirstChildOrThrow();return!(!rt(e)||!e.isEmpty())}function lR(){let n=w();v(n)||Te(n)||Z(188);let e=n.anchor.getNode(),t=oe(e,X);return X(t)||Z(148),vT(t)}function vT(n){let[e,t,r]=ot(n),o=e.__colSpan,s=e.__rowSpan;if(o===1&&s===1)return;let[i,a]=bt(r,e,e),{startColumn:l,startRow:c}=a,u=e.__headerState&Re.COLUMN,d=Array.from({length:o},(f,p)=>{let m=u;for(let _=0;m!==0&&_{let m=h;for(let _=0;m!==0&&_1){for(let f=1;f1){let f;for(let p=1;p1&&(x+=S.__colSpan-1)}if(C===null)for(let x=o-1;x>=0;x--)Km(f,Zt(d[x]|g[p]).append(U()));else for(let x=o-1;x>=0;x--)C.insertAfter(Zt(d[x]|g[p]).append(U()))}e.setRowSpan(1)}}function bt(n,e,t){let[r,o,s]=Zr(n,e,t);return o===null&&Z(207),s===null&&Z(208),[r,o,s]}function Zr(n,e,t){let r=[],o=null,s=null;function i(l){let c=r[l];return c===void 0&&(r[l]=c=[]),c}let a=n.getChildren();for(let l=0;l=a.length);m++){let _=i(l+m);for(let C=0;C=o,f=u.startRow<=a&&h>=s;if(g&&f){let p=Math.min(o,u.startColumn),m=Math.max(i,d),_=Math.min(s,u.startRow),C=Math.max(a,h);p===o&&m===i&&_===s&&C===a||(o=p,i=m,s=_,a=C,r=!0)}}}while(r);return{maxColumn:i,maxRow:a,minColumn:o,minRow:s}}function Dm(n){let[e,,t]=ot(n),r=t.getChildren(),o=r.length,s=r[0].getChildren().length,i=new Array(o);for(let a=0;a{let u=n[c].getNode(),d=oe(u,X);X(d)||Z(238,c,u.getKey(),u.getType());let h=d.getParent();Oe(h)||Z(239,c);let g=h.getParent();return ze(g)||Z(240,c),[u,d,h,g]});return o.is(l)||Z(241),{anchorCell:t,anchorNode:e,anchorRow:r,anchorTable:o,focusCell:i,focusNode:s,focusRow:a,focusTable:l}}var zi=class{tableKey;anchor;focus;_cachedNodes;dirty;constructor(e,t,r){this.anchor=t,this.focus=r,t._selection=this,r._selection=this,this._cachedNodes=null,this.dirty=!1,this.tableKey=e}getStartEndPoints(){return[this.anchor,this.focus]}isValid(){if(this.tableKey==="root"||this.anchor.key==="root"||this.anchor.type!=="element"||this.focus.key==="root"||this.focus.type!=="element")return!1;let e=Fe(this.tableKey),t=Fe(this.anchor.key),r=Fe(this.focus.key);return e!==null&&t!==null&&r!==null}isBackward(){return this.focus.isBefore(this.anchor)}getCachedNodes(){return this._cachedNodes}setCachedNodes(e){this._cachedNodes=e}is(e){return Te(e)&&this.tableKey===e.tableKey&&this.anchor.is(e.anchor)&&this.focus.is(e.focus)}set(e,t,r){this.dirty=this.dirty||e!==this.tableKey||t!==this.anchor.key||r!==this.focus.key,this.tableKey=e,this.anchor.key=t,this.focus.key=r,this._cachedNodes=null}clone(){return new zi(this.tableKey,Rn(this.anchor.key,this.anchor.offset,this.anchor.type),Rn(this.focus.key,this.focus.offset,this.focus.type))}isCollapsed(){return!1}extract(){return this.getNodes()}insertRawText(e){}insertText(){}hasFormat(e){let t=0;this.getNodes().filter(X).forEach(o=>{let s=o.getFirstChild();rt(s)&&(t|=s.getTextFormat())});let r=y1[e];return(t&r)!==0}insertNodes(e){let t=this.focus.getNode();F(t)||Z(151),zr(t.select(0,t.getChildrenSize())).insertNodes(e)}getShape(){let{anchorCell:e,focusCell:t}=fT(this),r=Dm(e);r===null&&Z(153);let o=Dm(t);o===null&&Z(155);let s=Math.min(r.columnIndex,o.columnIndex),i=Math.max(r.columnIndex+r.colSpan-1,o.columnIndex+o.colSpan-1),a=Math.min(r.rowIndex,o.rowIndex),l=Math.max(r.rowIndex+r.rowSpan-1,o.rowIndex+o.rowSpan-1);return{fromX:Math.min(s,i),fromY:Math.min(a,l),toX:Math.max(s,i),toY:Math.max(a,l)}}getNodes(){if(!this.isValid())return[];let e=this._cachedNodes;if(e!==null)return e;let{anchorTable:t,anchorCell:r,focusCell:o}=fT(this),s=o.getParents()[1];if(s!==t){if(t.isParentOf(o)){let m=s.getParent();m==null&&Z(159),this.set(this.tableKey,o.getKey(),m.getKey())}else{let m=t.getParent();m==null&&Z(158),this.set(this.tableKey,m.getKey(),o.getKey())}return this.getNodes()}let[i,a,l]=bt(t,r,o),{minColumn:c,maxColumn:u,minRow:d,maxRow:h}=sd(i,a,l),g=new Map([[t.getKey(),t]]),f=null;for(let m=d;m<=h;m++)for(let _=c;_<=u;_++){let{cell:C}=i[m][_],x=C.getParent();Oe(x)||Z(160),x!==f&&(g.set(x.getKey(),x),f=x),g.has(C.getKey())||cR(C,y=>{g.set(y.getKey(),y)})}let p=Array.from(g.values());return w1()||(this._cachedNodes=p),p}getTextContent(){let e=this.getNodes().filter(r=>X(r)),t="";for(let r=0;r0;r=t.at(-1)){let o=r.pop();o===void 0?t.pop():e(o)!==!1&&F(o)&&t.push(o.getChildren())}}function Wm(n,e=Fr()){let t=Fe(n);ze(t)||Z(231,n);let r=Wo(t,e.getElementByKey(n));return r===null&&Z(232,n),{tableElement:r,tableNode:t}}var id=class{focusX;focusY;listenersToRemove;table;isHighlightingCells;anchorX;anchorY;tableNodeKey;anchorCell;focusCell;anchorCellNodeKey;focusCellNodeKey;editor;tableSelection;hasHijackedSelectionStyles;isSelecting;pointerType;shouldCheckSelection;abortController;listenerOptions;nextFocus;constructor(e,t){this.isHighlightingCells=!1,this.anchorX=-1,this.anchorY=-1,this.focusX=-1,this.focusY=-1,this.listenersToRemove=new Set,this.tableNodeKey=t,this.editor=e,this.table={columns:0,domRows:[],rows:0},this.tableSelection=null,this.anchorCellNodeKey=null,this.focusCellNodeKey=null,this.anchorCell=null,this.focusCell=null,this.hasHijackedSelectionStyles=!1,this.isSelecting=!1,this.pointerType=null,this.shouldCheckSelection=!1,this.abortController=new AbortController,this.listenerOptions={signal:this.abortController.signal},this.nextFocus=null,this.trackTable()}getTable(){return this.table}removeListeners(){this.abortController.abort("removeListeners"),Array.from(this.listenersToRemove).forEach(e=>e()),this.listenersToRemove.clear()}$lookup(){return Wm(this.tableNodeKey,this.editor)}trackTable(){let e=new MutationObserver(t=>{this.editor.getEditorState().read(()=>{let r=!1;for(let i=0;i{let{tableNode:t,tableElement:r}=this.$lookup();this.table=Hi(t,r),e.observe(r,{attributes:!0,childList:!0,subtree:!0})},{editor:this.editor})}$clearHighlight(){let e=this.editor;this.isHighlightingCells=!1,this.anchorX=-1,this.anchorY=-1,this.focusX=-1,this.focusY=-1,this.tableSelection=null,this.anchorCellNodeKey=null,this.focusCellNodeKey=null,this.anchorCell=null,this.focusCell=null,this.hasHijackedSelectionStyles=!1,this.$enableHighlightStyle();let{tableNode:t,tableElement:r}=this.$lookup();nd(e,Hi(t,r),null),w()!==null&&(De(null),e.dispatchCommand(er,void 0))}$enableHighlightStyle(){let e=this.editor,{tableElement:t}=this.$lookup();wt(t,e._config.theme.tableSelection),t.classList.remove("disable-selection"),this.hasHijackedSelectionStyles=!1}$disableHighlightStyle(){let{tableElement:e}=this.$lookup();_e(e,this.editor._config.theme.tableSelection),this.hasHijackedSelectionStyles=!0}$updateTableTableSelection(e){if(e!==null){e.tableKey!==this.tableNodeKey&&Z(233,e.tableKey,this.tableNodeKey);let t=this.editor;this.tableSelection=e,this.isHighlightingCells=!0,this.$disableHighlightStyle(),this.updateDOMSelection(),nd(t,this.table,this.tableSelection)}else this.$clearHighlight()}setShouldCheckSelection(){this.shouldCheckSelection=!0}getAndClearShouldCheckSelection(){return!!this.shouldCheckSelection&&(this.shouldCheckSelection=!1,!0)}setNextFocus(e){this.nextFocus=e}getAndClearNextFocus(){let{nextFocus:e}=this;return e!==null&&(this.nextFocus=null),e}updateDOMSelection(){if(this.anchorCell!==null&&this.focusCell!==null){let e=ko(this.editor._window);e&&e.rangeCount>0&&e.removeAllRanges()}}$setFocusCellForSelection(e,t=!1){let r=this.editor,{tableNode:o}=this.$lookup(),s=e.x,i=e.y;if(this.focusCell=e,this.isHighlightingCells||this.anchorX===s&&this.anchorY===i&&!t){if(s===this.focusX&&i===this.focusY)return!1}else this.isHighlightingCells=!0,this.$disableHighlightStyle();if(this.focusX=s,this.focusY=i,this.isHighlightingCells){let a=Pm(o,e.elem);if(this.tableSelection!=null&&this.anchorCellNodeKey!=null&&a!==null)return this.focusCellNodeKey=a.getKey(),this.tableSelection=OT(o,this.$getAnchorTableCellOrThrow(),a),De(this.tableSelection),r.dispatchCommand(er,void 0),nd(r,this.table,this.tableSelection),!0}return!1}$getAnchorTableCell(){return this.anchorCellNodeKey?Fe(this.anchorCellNodeKey):null}$getAnchorTableCellOrThrow(){let e=this.$getAnchorTableCell();return e===null&&Z(234),e}$getFocusTableCell(){return this.focusCellNodeKey?Fe(this.focusCellNodeKey):null}$getFocusTableCellOrThrow(){let e=this.$getFocusTableCell();return e===null&&Z(235),e}$setAnchorCellForSelection(e){this.isHighlightingCells=!1,this.anchorCell=e,this.anchorX=e.x,this.anchorY=e.y;let{tableNode:t}=this.$lookup(),r=Pm(t,e.elem);if(r!==null){let o=r.getKey();this.tableSelection=this.tableSelection!=null?this.tableSelection.clone():Um(),this.anchorCellNodeKey=o}}$formatCells(e){let t=w();Te(t)||Z(236);let r=Zn(),o=r.anchor,s=r.focus,i=t.getNodes().filter(X);i.length>0||Z(237);let a=i[0].getFirstChild(),l=rt(a)?a.getFormatFlags(e,null):null;i.forEach(c=>{o.set(c.getKey(),0,"element"),s.set(c.getKey(),c.getChildrenSize(),"element"),r.formatText(e,l)}),De(t),this.editor.dispatchCommand(er,void 0)}$clearText(){let{editor:e}=this,t=Fe(this.tableNodeKey);if(!ze(t))throw new Error("Expected TableNode.");let r=w();Te(r)||Z(253);let o=r.getNodes().filter(X),s=t.getFirstChild(),i=t.getLastChild();if(o.length>0&&s!==null&&i!==null&&Oe(s)&&Oe(i)&&o[0]===s.getFirstChild()&&o[o.length-1]===i.getLastChild()){t.selectPrevious();let a=t.getParent();return t.remove(),void(Hr(a)&&a.isEmpty()&&e.dispatchCommand(Xn,void 0))}o.forEach(a=>{if(F(a)){let l=U(),c=ye();l.append(c),a.append(l),a.getChildren().forEach(u=>{u!==l&&u.remove()})}}),nd(e,this.table,null),De(null),e.dispatchCommand(er,void 0)}},Im="__lexicalTableSelection";function Fi(n){return fs(n)&&n.nodeName==="TABLE"}function Wo(n,e){if(!e)return e;let t=Fi(e)?e:n.getDOMSlot(e).element;return t.nodeName!=="TABLE"&&Z(245,e.nodeName),t}function Gm(n){return n._window}function pl(n,e){for(let t=e,r=null;t!==null;t=t.getParent()){if(n.is(t))return r;X(t)&&(r=t)}return null}var uR=[[dn,"down"],[Pt,"up"],[Qn,"backward"],[wo,"forward"]],dR=[xi,hs,un],hR=[vo,Si];function kT(n,e,t,r){let o=t.getRootElement(),s=Gm(t);o!==null&&s!==null||Z(246);let i=new id(t,n.getKey()),a=Wo(n,e);(function(g,f){$m(g)!==null&&Z(205),g[Im]=f})(a,i),i.listenersToRemove.add(()=>function(g,f){$m(g)===f&&delete g[Im]}(a,i));let l=g=>{if(i.pointerType=g.pointerType,g.button!==0||!jt(g.target)||!s)return;let f=_l(g.target);f!==null&&t.update(()=>{let p=Br();if(gT&&g.shiftKey&&ur(p,n)&&(v(p)||Te(p))){let m=p.anchor.getNode(),_=pl(n,p.anchor.getNode());_?(i.$setAnchorCellForSelection(ks(i,_)),i.$setFocusCellForSelection(f),qr(g)):(n.isBefore(m)?n.selectStart():n.selectEnd()).anchor.set(p.anchor.key,p.anchor.offset,p.anchor.type)}else g.pointerType!=="touch"&&i.$setAnchorCellForSelection(f)}),(()=>{if(i.isSelecting)return;let p=()=>{i.isSelecting=!1,s.removeEventListener("pointerup",p),s.removeEventListener("pointermove",m)},m=_=>{if(1&~_.buttons&&i.isSelecting)return i.isSelecting=!1,s.removeEventListener("pointerup",p),void s.removeEventListener("pointermove",m);if(!jt(_.target))return;let C=null,x=!(gT||a.contains(_.target));if(x)C=pT(a,_.target);else for(let y of document.elementsFromPoint(_.clientX,_.clientY))if(C=pT(a,y),C)break;!C||i.focusCell!==null&&C.elem===i.focusCell.elem||(i.setNextFocus({focusCell:C,override:x}),t.dispatchCommand(er,void 0))};i.isSelecting=!0,s.addEventListener("pointerup",p,i.listenerOptions),s.addEventListener("pointermove",m,i.listenerOptions)})()};a.addEventListener("pointerdown",l,i.listenerOptions),i.listenersToRemove.add(()=>{a.removeEventListener("pointerdown",l)});let c=g=>{g.detail>=3&&jt(g.target)&&_l(g.target)!==null&&g.preventDefault()};a.addEventListener("mousedown",c,i.listenerOptions),i.listenersToRemove.add(()=>{a.removeEventListener("mousedown",c)});let u=g=>{let f=g.target;g.button===0&&jt(f)&&t.update(()=>{let p=w();Te(p)&&p.tableKey===i.tableNodeKey&&o.contains(f)&&i.$clearHighlight()})};s.addEventListener("pointerdown",u,i.listenerOptions),i.listenersToRemove.add(()=>{s.removeEventListener("pointerdown",u)});for(let[g,f]of uR)i.listenersToRemove.add(t.registerCommand(g,p=>MT(t,p,f,n,i),Je));i.listenersToRemove.add(t.registerCommand(Ti,g=>{let f=w();if(Te(f)){let p=pl(n,f.focus.getNode());if(p!==null)return qr(g),p.selectEnd(),!0}return!1},Je));let d=g=>()=>{let f=w();if(!ur(f,n))return!1;if(Te(f))return i.$clearText(),!0;if(v(f)){if(!X(pl(n,f.anchor.getNode())))return!1;let p=f.anchor.getNode(),m=f.focus.getNode(),_=n.isParentOf(p),C=n.isParentOf(m);if(_&&!C||C&&!_)return i.$clearText(),!0;let x=oe(f.anchor.getNode(),S=>F(S)),y=x&&oe(x,S=>F(S)&&X(S.getParent()));if(!F(y)||!F(x))return!1;if(g===hs&&y.getPreviousSibling()===null)return!0}return!1};for(let g of dR)i.listenersToRemove.add(t.registerCommand(g,d(g),Je));let h=g=>{let f=w();if(!Te(f)&&!v(f))return!1;let p=n.isParentOf(f.anchor.getNode());if(p!==n.isParentOf(f.focus.getNode())){let m=p?"anchor":"focus",_=p?"focus":"anchor",{key:C,offset:x,type:y}=f[_];return n[f[m].isBefore(f[_])?"selectPrevious":"selectNext"]()[_].set(C,x,y),!1}return!!ur(f,n)&&!!Te(f)&&(g&&(g.preventDefault(),g.stopPropagation()),i.$clearText(),!0)};for(let g of hR)i.listenersToRemove.add(t.registerCommand(g,h,Je));return i.listenersToRemove.add(t.registerCommand(Ci,g=>{let f=w();if(f){if(!Te(f)&&!v(f))return!1;ol(t,At(g,ClipboardEvent)?g:null,$S(f));let p=h(g);return v(f)?(f.removeText(),!0):p}return!1},Je)),i.listenersToRemove.add(t.registerCommand(Kr,g=>{let f=w();if(!ur(f,n))return!1;if(Te(f))return i.$formatCells(g),!0;if(v(f)){let p=oe(f.anchor.getNode(),m=>X(m));if(!X(p))return!1}return!1},Je)),i.listenersToRemove.add(t.registerCommand(iu,g=>{let f=w();if(!Te(f)||!ur(f,n))return!1;let p=f.anchor.getNode(),m=f.focus.getNode();if(!X(p)||!X(m))return!1;if(function(O,P){if(Te(O)){let I=O.anchor.getNode(),z=O.focus.getNode();if(P&&I&&z){let[G]=bt(P,I,z);return I.getKey()===G[0][0].cell.getKey()&&z.getKey()===G[G.length-1].at(-1).cell.getKey()}}return!1}(f,n))return n.setFormat(g),!0;let[_,C,x]=bt(n,p,m),y=Math.max(C.startRow+C.cell.__rowSpan-1,x.startRow+x.cell.__rowSpan-1),S=Math.max(C.startColumn+C.cell.__colSpan-1,x.startColumn+x.cell.__colSpan-1),b=Math.min(C.startRow,x.startRow),N=Math.min(C.startColumn,x.startColumn),A=new Set;for(let O=b;O<=y;O++)for(let P=N;P<=S;P++){let I=_[O][P].cell;if(A.has(I))continue;A.add(I),I.setFormat(g);let z=I.getChildren();for(let G=0;G{let f=w();if(!ur(f,n))return!1;if(Te(f))return i.$clearHighlight(),!1;if(v(f)){let p=oe(f.anchor.getNode(),m=>X(m));if(!X(p))return!1;if(typeof g=="string"){let m=CT(t,f,n);if(m)return _T(m,n,[ye(g)]),!0}}return!1},Je)),r&&i.listenersToRemove.add(t.registerCommand(_n,g=>{let f=w();if(!v(f)||!f.isCollapsed()||!ur(f,n))return!1;let p=Bi(f.anchor.getNode());return!(p===null||!n.is(Ls(p)))&&(qr(g),function(m,_){let C=_==="next"?"getNextSibling":"getPreviousSibling",x=_==="next"?"getFirstChild":"getLastChild",y=m[C]();if(F(y))return y.selectEnd();let S=oe(m,Oe);S===null&&Z(247);for(let N=S[C]();Oe(N);N=N[C]()){let A=N[x]();if(F(A))return A.selectEnd()}let b=oe(S,ze);b===null&&Z(248),_==="next"?b.selectNext():b.selectPrevious()}(p,g.shiftKey?"previous":"next"),!0)},Je)),i.listenersToRemove.add(t.registerCommand(p1,g=>n.isSelected(),Je)),i.listenersToRemove.add(t.registerCommand(Ya,(g,f)=>{if(t!==f)return!1;let{nodes:p,selection:m}=g,_=m.getStartEndPoints(),C=Te(m),x=v(m)&&oe(m.anchor.getNode(),ne=>X(ne))!==null&&oe(m.focus.getNode(),ne=>X(ne))!==null||C;if(p.length!==1||!ze(p[0])||!x||_===null)return!1;let[y,S]=_,[b,N,A]=ot(y),O=oe(S.getNode(),ne=>X(ne));if(!(X(b)&&X(O)&&Oe(N)&&ze(A)))return!1;let P=p[0],[I,z,G]=bt(A,b,O),[q]=Zr(P,null,null),K=I.length,le=K>0?I[0].length:0,ie=z.startRow,pe=z.startColumn,xe=q.length,ht=xe>0?q[0].length:0;if(C){let ne=sd(I,z,G),Ue=ne.maxRow-ne.minRow+1,Ve=ne.maxColumn-ne.minColumn+1;ie=ne.minRow,pe=ne.minColumn,xe=Math.min(xe,Ue),ht=Math.min(ht,Ve)}let fe=!1,Wt=Math.min(K,ie+xe)-1,ke=Math.min(le,pe+ht)-1,kt=new Set;for(let ne=ie;ne<=Wt;ne++)for(let Ue=pe;Ue<=ke;Ue++){let Ve=I[ne][Ue];kt.has(Ve.cell.getKey())||Ve.cell.__rowSpan===1&&Ve.cell.__colSpan===1||(vT(Ve.cell),kt.add(Ve.cell.getKey()),fe=!0)}let[ge]=Zr(A.getWritable(),null,null),Qe=xe-K+ie;for(let ne=0;ne{B(tn)&&U().append(tn),Qr.append(tn)}),Cr.forEach(tn=>tn.remove())}if(C&&fe){let[ne]=Zr(A.getWritable(),null,null);ne[z.startRow][z.startColumn].cell.selectEnd()}return!0},Je)),i.listenersToRemove.add(t.registerCommand(er,()=>{let g=w(),f=Br(),p=i.getAndClearNextFocus();if(p!==null){let{focusCell:m}=p;if(Te(g)&&g.tableKey===i.tableNodeKey)return(m.x!==i.focusX||m.y!==i.focusY)&&(i.$setFocusCellForSelection(m),!0);if(m!==i.anchorCell&&ur(g,n))return i.$setFocusCellForSelection(m),!0}if(i.getAndClearShouldCheckSelection()&&v(f)&&v(g)&&g.isCollapsed()){let m=g.anchor.getNode(),_=n.getFirstChild(),C=Bi(m);if(C!==null&&Oe(_)){let x=_.getFirstChild();if(X(x)&&n.is(oe(C,y=>y.is(n)||y.is(x))))return x.selectStart(),!0}}if(v(g)){let{anchor:m,focus:_}=g,C=m.getNode(),x=_.getNode(),y=Bi(C),S=Bi(x),b=!(!y||!n.is(Ls(y))),N=!(!S||!n.is(Ls(S))),A=b!==N,O=b&&N,P=g.isBackward();if(A){let I=g.clone();if(N){let[z]=bt(n,S,S),G=z[0][0].cell,q=z[z.length-1].at(-1).cell;I.focus.set(P?G.getKey():q.getKey(),P?G.getChildrenSize():q.getChildrenSize(),"element")}else if(b){let[z]=bt(n,y,y),G=z[0][0].cell,q=z[z.length-1].at(-1).cell;I.anchor.set(P?q.getKey():G.getKey(),P?q.getChildrenSize():0,"element")}De(I),mT(t,i)}else if(O&&(y.is(S)||(i.$setAnchorCellForSelection(ks(i,y)),i.$setFocusCellForSelection(ks(i,S),!0)),i.pointerType==="touch"&&i.isSelecting&&g.isCollapsed()&&v(f)&&f.isCollapsed())){let I=Bi(f.anchor.getNode());I&&!I.is(S)&&(i.$setAnchorCellForSelection(ks(i,I)),i.$setFocusCellForSelection(ks(i,S),!0),i.pointerType=null)}}else if(g&&Te(g)&&g.is(f)&&g.tableKey===n.getKey()){let m=ko(s);if(m&&m.anchorNode&&m.focusNode){let _=We(m.focusNode),C=_&&!n.isParentOf(_),x=We(m.anchorNode),y=x&&n.isParentOf(x);if(C&&y&&m.rangeCount>0){let S=t1(m,t);S&&(S.anchor.set(n.getKey(),g.isBackward()?n.getChildrenSize():0,"element"),m.removeAllRanges(),De(S))}}}return g&&!g.is(f)&&(Te(g)||Te(f))&&i.tableSelection&&!i.tableSelection.is(f)?(Te(g)&&g.tableKey===i.tableNodeKey?i.$updateTableTableSelection(g):!Te(g)&&Te(f)&&f.tableKey===i.tableNodeKey&&i.$updateTableTableSelection(null),!1):(i.hasHijackedSelectionStyles&&!n.isSelected()?function(m,_){_.$enableHighlightStyle(),Vm(_.table,C=>{let x=C.elem;C.highlighted=!1,RT(m,C),x.getAttribute("style")||x.removeAttribute("style")})}(t,i):!i.hasHijackedSelectionStyles&&n.isSelected()&&mT(t,i),!1)},Je)),i.listenersToRemove.add(t.registerCommand(Xn,()=>{let g=w();if(!v(g)||!g.isCollapsed()||!ur(g,n))return!1;let f=CT(t,g,n);return!!f&&(_T(f,n),!0)},Je)),i}function $m(n){return n[Im]||null}function _l(n){let e=n;for(;e!=null;){let t=e.nodeName;if(t==="TD"||t==="TH"){let r=e._cell;return r===void 0?null:r}e=e.parentNode}return null}function pT(n,e){if(!n.contains(e))return null;let t=null;for(let r=e;r!=null;r=r.parentNode){if(r===n)return t;let o=r.nodeName;o!=="TD"&&o!=="TH"||(t=r._cell||null)}return null}function Hi(n,e){let t=[],r={columns:0,domRows:t,rows:0},o=Wo(n,e).querySelector("tr"),s=0,i=0;for(t.length=0;o!=null;){let a=o.nodeName;if(a==="TD"||a==="TH"){let u={elem:o,hasBackgroundColor:o.style.backgroundColor!=="",highlighted:!1,x:s,y:i};o._cell=u;let d=t[i];d===void 0&&(d=t[i]=[]),d[s]=u}else{let u=o.firstChild;if(u!=null){o=u;continue}}let l=o.nextSibling;if(l!=null){s++,o=l;continue}let c=o.parentNode;if(c!=null){let u=c.nextSibling;if(u==null)break;i++,s=0,o=u}}return r.columns=s+1,r.rows=i+1,r}function nd(n,e,t){let r=new Set(t?t.getNodes():[]);Vm(e,(o,s)=>{let i=o.elem;r.has(s)?(o.highlighted=!0,LT(n,o)):(o.highlighted=!1,RT(n,o),i.getAttribute("style")||i.removeAttribute("style"))})}function Vm(n,e){let{domRows:t}=n;for(let r=0;r{t.highlighted=!0,LT(n,t)})}var gR=(n,e,t,r,o)=>{let s=o==="forward";switch(o){case"backward":case"forward":return t!==(s?n.table.columns-1:0)?od(e.getCellNodeFromCordsOrThrow(t+(s?1:-1),r,n.table),s):r!==(s?n.table.rows-1:0)?od(e.getCellNodeFromCordsOrThrow(s?0:n.table.columns-1,r+(s?1:-1),n.table),s):s?e.selectNext():e.selectPrevious(),!0;case"up":return r!==0?od(e.getCellNodeFromCordsOrThrow(t,r-1,n.table),!1):e.selectPrevious(),!0;case"down":return r!==n.table.rows-1?od(e.getCellNodeFromCordsOrThrow(t,r+1,n.table),!0):e.selectNext(),!0;default:return!1}};function Om(n,e){let t,r;if(e.startColumn===n.minColumn)t="minColumn";else{if(e.startColumn+e.cell.__colSpan-1!==n.maxColumn)return null;t="maxColumn"}if(e.startRow===n.minRow)r="minRow";else{if(e.startRow+e.cell.__rowSpan-1!==n.maxRow)return null;r="maxRow"}return[t,r]}function rd([n,e]){return[n==="minColumn"?"maxColumn":"minColumn",e==="minRow"?"maxRow":"minRow"]}function Pi(n,e,[t,r]){let o=e[r],s=n[o];s===void 0&&Z(250,r,String(o));let i=e[t],a=s[i];return a===void 0&&Z(250,t,String(i)),a}function fR(n,e,t,r,o){let s=sd(e,t,r),i=function(b,N){let{minColumn:A,maxColumn:O,minRow:P,maxRow:I}=N,z=1,G=1,q=1,K=1,le=b[P],ie=b[I];for(let pe=A;pe<=O;pe++)z=Math.max(z,le[pe].cell.__rowSpan),K=Math.max(K,ie[pe].cell.__rowSpan);for(let pe=P;pe<=I;pe++)G=Math.max(G,b[pe][A].cell.__colSpan),q=Math.max(q,b[pe][O].cell.__colSpan);return{bottomSpan:K,leftSpan:G,rightSpan:q,topSpan:z}}(e,s),{topSpan:a,leftSpan:l,bottomSpan:c,rightSpan:u}=i,d=function(b,N){let A=Om(b,N);return A===null&&Z(249,N.cell.getKey()),A}(s,t),[h,g]=rd(d),f=s[h],p=s[g];o==="forward"?f+=h==="maxColumn"?1:l:o==="backward"?f-=h==="minColumn"?1:u:o==="down"?p+=g==="maxRow"?1:a:o==="up"&&(p-=g==="minRow"?1:c);let m=e[p];if(m===void 0)return!1;let _=m[f];if(_===void 0)return!1;let[C,x]=function(b,N,A){let O=sd(b,N,A),P=Om(O,N);if(P)return[Pi(b,O,P),Pi(b,O,rd(P))];let I=Om(O,A);if(I)return[Pi(b,O,rd(I)),Pi(b,O,I)];let z=["minColumn","minRow"];return[Pi(b,O,z),Pi(b,O,rd(z))]}(e,t,_),y=ks(n,C.cell),S=ks(n,x.cell);return n.$setAnchorCellForSelection(y),n.$setFocusCellForSelection(S,!0),!0}function ur(n,e){if(v(n)||Te(n)){let t=e.isParentOf(n.anchor.getNode()),r=e.isParentOf(n.focus.getNode());return t&&r}return!1}function od(n,e){e?n.selectStart():n.selectEnd()}function LT(n,e){let t=e.elem,r=n._config.theme;X(We(t))||Z(131),_e(t,r.tableCellSelected)}function RT(n,e){let t=e.elem;X(We(t))||Z(131);let r=n._config.theme;wt(t,r.tableCellSelected)}function Bi(n){let e=oe(n,X);return X(e)?e:null}function Ls(n){let e=oe(n,ze);return ze(e)?e:null}function pR(n,e,t,r,o,s,i){let a=xo(t.focus,o?"previous":"next");if(Xc(a))return!1;let l=a;for(let m of Ia(a).iterNodeCarets("shadowRoot")){if(!Qc(m)||!F(m.origin))return!1;l=m}let c=l.getParentAtCaret();if(!X(c))return!1;let u=c,d=function(m){for(let _ of Ia(m).iterNodeCarets("root")){let{origin:C}=_;if(X(C)){if(bo(_))return ln(C,m.direction)}else if(!Oe(C))break}return null}(mt(u,l.direction)),h=oe(u,ze);if(!h||!h.is(s))return!1;let g=n.getElementByKey(u.getKey()),f=_l(g);if(!g||!f)return!1;let p=IT(n,h);if(i.table=p,d)if(r==="extend"){let m=_l(n.getElementByKey(d.origin.getKey()));if(!m)return!1;i.$setAnchorCellForSelection(f),i.$setFocusCellForSelection(m,!0)}else{let m=Mn(d);So(t.anchor,m),So(t.focus,m)}else if(r==="extend")i.$setAnchorCellForSelection(f),i.$setFocusCellForSelection(f,!0);else{let m=function(_){let C=$a(_);return bo(C)?Mn(C):_}(mt(h,a.direction));So(t.anchor,m),So(t.focus,m)}return qr(e),!0}function MT(n,e,t,r,o){if((t==="up"||t==="down")&&function(i){let a=i.getRootElement();return a?a.hasAttribute("aria-controls")&&a.getAttribute("aria-controls")==="typeahead-menu":!1}(n))return!1;let s=w();if(!ur(s,r)){if(v(s)){if(t==="backward"){if(s.focus.offset>0)return!1;let i=function(l){for(let c=l,u=l;u!==null;c=u,u=u.getParent())if(F(u)){if(u!==c&&u.getFirstChild()!==c)return null;if(!u.isInline())return u}return null}(s.focus.getNode());if(!i)return!1;let a=i.getPreviousSibling();return!!ze(a)&&(qr(e),e.shiftKey?s.focus.set(a.getParentOrThrow().getKey(),a.getIndexWithinParent(),"element"):a.selectEnd(),!0)}if(e.shiftKey&&(t==="up"||t==="down")){let i=s.focus.getNode();if(!s.isCollapsed()&&(t==="up"&&!s.isBackward()||t==="down"&&s.isBackward())){let a=oe(i,h=>ze(h));if(X(a)&&(a=oe(a,ze)),a!==r||!a)return!1;let l=t==="down"?a.getNextSibling():a.getPreviousSibling();if(!l)return!1;let c=0;t==="up"&&F(l)&&(c=l.getChildrenSize());let u=l;t==="up"&&F(l)&&(u=l.getLastChild()||l,c=B(u)?u.getTextContentSize():0);let d=s.clone();return d.focus.set(u.getKey(),c,B(u)?"text":"element"),De(d),qr(e),!0}if(Ze(i)){let a=t==="up"?s.getNodes()[s.getNodes().length-1]:s.getNodes()[0];if(a&&pl(r,a)!==null){let l=r.getFirstDescendant(),c=r.getLastDescendant();if(!l||!c)return!1;let[u]=ot(l),[d]=ot(c),h=r.getCordsFromCellNode(u,o.table),g=r.getCordsFromCellNode(d,o.table),f=r.getDOMCellFromCordsOrThrow(h.x,h.y,o.table),p=r.getDOMCellFromCordsOrThrow(g.x,g.y,o.table);return o.$setAnchorCellForSelection(f),o.$setFocusCellForSelection(p,!0),!0}return!1}{let a=oe(i,c=>F(c)&&!c.isInline());if(X(a)&&(a=oe(a,ze)),!a)return!1;let l=t==="down"?a.getNextSibling():a.getPreviousSibling();if(ze(l)&&o.tableNodeKey===l.getKey()){let c=l.getFirstDescendant(),u=l.getLastDescendant();if(!c||!u)return!1;let[d]=ot(c),[h]=ot(u),g=s.clone();return g.focus.set((t==="up"?d:h).getKey(),t==="up"?0:h.getChildrenSize(),"element"),qr(e),De(g),!0}}}}return t==="down"&&Cl(n)&&o.setShouldCheckSelection(),!1}if(v(s)){if(t==="backward"||t==="forward")return pR(n,e,s,e.shiftKey?"extend":"move",t==="backward",r,o);if(s.isCollapsed()){let{anchor:i,focus:a}=s,l=oe(i.getNode(),X),c=oe(a.getNode(),X);if(!X(l)||!l.is(c))return!1;let u=Ls(l);if(u!==r&&u!=null){let _=Wo(u,n.getElementByKey(u.getKey()));if(_!=null)return o.table=Hi(u,_),MT(n,e,t,u,o)}let d=n.getElementByKey(l.__key),h=n.getElementByKey(i.key);if(h==null||d==null)return!1;let g;if(i.type==="element")g=h.getBoundingClientRect();else{let _=ko(Gm(n));if(_===null||_.rangeCount===0)return!1;g=_.getRangeAt(0).getBoundingClientRect()}let f=t==="up"?l.getFirstChild():l.getLastChild();if(f==null)return!1;let p=n.getElementByKey(f.__key);if(p==null)return!1;let m=p.getBoundingClientRect();if(t==="up"?m.top>g.top-g.height:g.bottom+g.height>m.bottom){qr(e);let _=r.getCordsFromCellNode(l,o.table);if(!e.shiftKey)return gR(o,r,_.x,_.y,t);{let C=r.getDOMCellFromCordsOrThrow(_.x,_.y,o.table);o.$setAnchorCellForSelection(C),o.$setFocusCellForSelection(C,!0)}return!0}}}else if(Te(s)){let{anchor:i,focus:a}=s,l=oe(i.getNode(),X),c=oe(a.getNode(),X),[u]=s.getNodes();ze(u)||Z(251);let d=Wo(u,n.getElementByKey(u.getKey()));if(!X(l)||!X(c)||!ze(u)||d==null)return!1;o.$updateTableTableSelection(s);let h=Hi(u,d),g=r.getCordsFromCellNode(l,h),f=r.getDOMCellFromCordsOrThrow(g.x,g.y,h);if(o.$setAnchorCellForSelection(f),qr(e),e.shiftKey){let[p,m,_]=bt(r,l,c);return fR(o,p,m,_,t)}return c.selectEnd(),!0}return!1}function qr(n){n.preventDefault(),n.stopImmediatePropagation(),n.stopPropagation()}function _T(n,e,t){let r=U();n==="first"?e.insertBefore(r):e.insertAfter(r),r.append(...t||[]),r.selectEnd()}function CT(n,e,t){let r=t.getParent();if(!r)return;let o=ko(Gm(n));if(!o)return;let s=o.anchorNode,i=n.getElementByKey(r.getKey()),a=Wo(t,n.getElementByKey(t.getKey()));if(!s||!i||!a||!i.contains(s)||a.contains(s))return;let l=oe(e.anchor.getNode(),C=>X(C));if(!l)return;let c=oe(l,C=>ze(C));if(!ze(c)||!c.is(t))return;let[u,d]=bt(t,l,l),h=u[0][0],g=u[u.length-1][u[0].length-1],{startRow:f,startColumn:p}=d,m=f===h.startRow&&p===h.startColumn,_=f===g.startRow&&p===g.startColumn;return m?"first":_?"last":void 0}function ks(n,e){let{tableNode:t}=n.$lookup(),r=t.getCordsFromCellNode(e,n.table);return t.getDOMCellFromCordsOrThrow(r.x,r.y,n.table)}function Pm(n,e,t){return pl(n,We(e,t))}function xT(n,e,t){if(!e.theme.tableAlignment)return;let r=[],o=[];for(let s of["center","right"]){let i=e.theme.tableAlignment[s];i&&(s===t?o:r).push(i)}wt(n,...r),_e(n,...o)}var Fm=new WeakSet;function Cl(n=Fr()){return Fm.has(n)}function DT(n,e){e?Fm.add(n):Fm.delete(n)}var yn=class extends Ye{__rowStriping;__frozenColumnCount;__frozenRowCount;__colWidths;static getType(){return"table"}getColWidths(){return this.getLatest().__colWidths}setColWidths(e){let t=this.getWritable();return t.__colWidths=e,t}static clone(e){return new yn(e.__key)}afterCloneFrom(e){super.afterCloneFrom(e),this.__colWidths=e.__colWidths,this.__rowStriping=e.__rowStriping,this.__frozenColumnCount=e.__frozenColumnCount,this.__frozenRowCount=e.__frozenRowCount}static importDOM(){return{table:e=>({conversion:mR,priority:1})}}static importJSON(e){return ld().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setRowStriping(e.rowStriping||!1).setFrozenColumns(e.frozenColumnCount||0).setFrozenRows(e.frozenRowCount||0).setColWidths(e.colWidths)}constructor(e){super(e),this.__rowStriping=!1,this.__frozenColumnCount=0,this.__frozenRowCount=0,this.__colWidths=void 0}exportJSON(){return{...super.exportJSON(),colWidths:this.getColWidths(),frozenColumnCount:this.__frozenColumnCount?this.__frozenColumnCount:void 0,frozenRowCount:this.__frozenRowCount?this.__frozenRowCount:void 0,rowStriping:this.__rowStriping?this.__rowStriping:void 0}}extractWithChild(e,t,r){return r==="html"}getDOMSlot(e){let t=Fi(e)?e:e.querySelector("table");return Fi(t)||Z(229),super.getDOMSlot(e).withElement(t).withAfter(t.querySelector("colgroup"))}createDOM(e,t){let r=document.createElement("table");this.__style&&(r.style.cssText=this.__style);let o=document.createElement("colgroup");if(r.appendChild(o),R1(o),_e(r,e.theme.table),this.updateTableElement(null,r,e),Cl(t)){let s=document.createElement("div"),i=e.theme.tableScrollableWrapper;return i?_e(s,i):s.style.cssText="overflow-x: auto;",s.appendChild(r),this.updateTableWrapper(null,s,r,e),s}return r}updateTableWrapper(e,t,r,o){this.__frozenColumnCount!==(e?e.__frozenColumnCount:0)&&function(s,i,a,l){l>0?(_e(s,a.theme.tableFrozenColumn),i.setAttribute("data-lexical-frozen-column","true")):(wt(s,a.theme.tableFrozenColumn),i.removeAttribute("data-lexical-frozen-column"))}(t,r,o,this.__frozenColumnCount),this.__frozenRowCount!==(e?e.__frozenRowCount:0)&&function(s,i,a,l){l>0?(_e(s,a.theme.tableFrozenRow),i.setAttribute("data-lexical-frozen-row","true")):(wt(s,a.theme.tableFrozenRow),i.removeAttribute("data-lexical-frozen-row"))}(t,r,o,this.__frozenRowCount)}updateTableElement(e,t,r){this.__style!==(e?e.__style:"")&&(t.style.cssText=this.__style),this.__rowStriping!==(!!e&&e.__rowStriping)&&function(o,s,i){i?(_e(o,s.theme.tableRowStriping),o.setAttribute("data-lexical-row-striping","true")):(wt(o,s.theme.tableRowStriping),o.removeAttribute("data-lexical-row-striping"))}(t,r,this.__rowStriping),function(o,s,i,a){let l=o.querySelector("colgroup");if(!l)return;let c=[];for(let u=0;u{if(t.after&&(o=t.after(o)),!Fi(o)&&Xe(o)&&(o=o.querySelector("table")),!Fi(o))return null;xT(o,e._config,this.getFormatType());let[s]=Zr(this,null,null),i=new Map;for(let u of s)for(let d of u){let h=d.cell.getKey();i.has(h)||i.set(h,{colSpan:d.cell.getColSpan(),startColumn:d.startColumn})}let a=new Set;for(let u of o.querySelectorAll(":scope > tr > [data-temporary-table-cell-lexical-key]")){let d=u.getAttribute("data-temporary-table-cell-lexical-key");if(d){let h=i.get(d);if(u.removeAttribute("data-temporary-table-cell-lexical-key"),h){i.delete(d);for(let g=0;g colgroup");if(l){let u=Array.from(o.querySelectorAll(":scope > colgroup > col")).filter((d,h)=>a.has(h));l.replaceChildren(...u)}let c=o.querySelectorAll(":scope > tr");if(c.length>0){let u=document.createElement("tbody");for(let d of c)u.appendChild(d);o.append(u)}return o},element:!Fi(r)&&Xe(r)?r.querySelector("table"):r}}canBeEmpty(){return!1}isShadowRoot(){return!0}getCordsFromCellNode(e,t){let{rows:r,domRows:o}=t;for(let s=0;s{X(r)&&(t+=r.getColSpan())}),t}};function IT(n,e){let t=n.getElementByKey(e.getKey());return t===null&&Z(230),Hi(e,t)}function mR(n){let e=ld();n.hasAttribute("data-lexical-row-striping")&&e.setRowStriping(!0),n.hasAttribute("data-lexical-frozen-column")&&e.setFrozenColumns(1),n.hasAttribute("data-lexical-frozen-row")&&e.setFrozenRows(1);let t=n.querySelector(":scope > colgroup");if(t){let r=[];for(let o of t.querySelectorAll(":scope > col")){let s=o.style.width||"";if(!Bm.test(s)&&(s=o.getAttribute("width")||"",!/^\d+$/.test(s))){r=void 0;break}r.push(parseFloat(s))}r&&e.setColWidths(r)}return{after:r=>wi(r,Oe),node:e}}function ld(){return ft(new yn)}function ze(n){return n instanceof yn}function _R({rows:n,columns:e,includeHeaders:t}){let r=w()||Br();if(!r||!v(r)||Ls(r.anchor.getNode()))return!1;let o=bT(Number(n),Number(e),t);gb(o);let s=o.getFirstDescendant();return B(s)&&s.select(),!0}function CR(n){Oe(n.getParent())?n.isEmpty()&&n.append(U()):n.remove()}function xR(n){ze(n.getParent())?Ja(n,X):n.remove()}function yR(n){Ja(n,Oe);let[e]=Zr(n,null,null),t=e.reduce((o,s)=>Math.max(o,s.length),0),r=n.getChildren();for(let o=0;ol?1+a:a,0);if(i!==t)for(let a=i;aF(r)&&!r.isInline());return t===null?!1:!!X(t.getParent())&&(t.select(0),!0)}function $T(n){return n.registerNodeTransform(xn,e=>{if(e.getColSpan()>1||e.getRowSpan()>1){let[,,t]=ot(e),[r]=bt(t,e,e),o=r.length,s=r[0].length,i=t.getFirstChild();Oe(i)||Z(175);let a=[];for(let l=0;l1||h.getRowSpan()>1){X(h)||Z(176);let g=Zt(h.__headerState);c!==null?c.insertAfter(g):Za(i,g)}}}for(let l of a)l.setColSpan(1),l.setRowSpan(1)}})}function PT(n,e=!0){let t=new Map,r=(s,i,a)=>{let l=Wo(s,a),c=kT(s,l,n,e);t.set(i,[c,l])},o=n.registerMutationListener(yn,s=>{n.getEditorState().read(()=>{for(let[i,a]of s){let l=t.get(i);if(a==="created"||a==="updated"){let{tableNode:c,tableElement:u}=Wm(i);l===void 0?r(c,i,u):u!==l[1]&&(l[0].removeListeners(),t.delete(i),r(c,i,u))}else a==="destroyed"&&l!==void 0&&(l[0].removeListeners(),t.delete(i))}},{editor:n})},{skipInitialization:!1});return()=>{o();for(let[,[s]]of t)s.removeListeners()}}function FT(n){return n.hasNodes([yn])||Z(255),Ee(n.registerCommand(yT,_R,W),n.registerCommand(Ya,({nodes:e,selection:t},r)=>n!==r||!v(t)?!1:Ls(t.anchor.getNode())!==null&&e.some(ze),W),n.registerCommand(No,bR,W),n.registerNodeTransform(yn,yR),n.registerNodeTransform(Jr,xR),n.registerNodeTransform(xn,CR))}var SR=ue({build:(n,e,t)=>In(e),config:xt({hasCellBackgroundColor:!0,hasCellMerge:!0,hasHorizontalScroll:!0,hasTabHandler:!0}),name:"@lexical/table/Table",nodes:[yn,Jr,xn],register(n,e,t){let r=t.getOutput();return Ee(Ht(()=>{let o=r.hasHorizontalScroll.value;Cl(n)!==o&&(DT(n,o),n.registerNodeTransform(yn,()=>{})())}),FT(n),Ht(()=>PT(n,r.hasTabHandler.value)),Ht(()=>r.hasCellMerge.value?void 0:$T(n)),Ht(()=>r.hasCellBackgroundColor.value?void 0:n.registerNodeTransform(xn,o=>{o.getBackgroundColor()!==null&&o.setBackgroundColor(null)})))}});var ee=Ym,M3=ee.$computeTableMap,D3=ee.$computeTableMapSkipCellCheck,I3=ee.$createTableCellNode,$3=ee.$createTableNode,P3=ee.$createTableNodeWithDimensions,F3=ee.$createTableRowNode,B3=ee.$createTableSelection,H3=ee.$createTableSelectionFrom,z3=ee.$deleteTableColumn,BT=ee.$deleteTableColumnAtSelection,K3=ee.$deleteTableColumn__EXPERIMENTAL,HT=ee.$deleteTableRowAtSelection,U3=ee.$deleteTableRow__EXPERIMENTAL,jm=ee.$findCellNode,qm=ee.$findTableNode,zT=ee.$getElementForTableNode,W3=ee.$getNodeTriplet,G3=ee.$getTableAndElementByKey,xl=ee.$getTableCellNodeFromLexicalNode,V3=ee.$getTableCellNodeRect,KT=ee.$getTableColumnIndexFromTableCellNode,Y3=ee.$getTableNodeFromLexicalNodeOrThrow,UT=ee.$getTableRowIndexFromTableCellNode,j3=ee.$getTableRowNodeFromTableCellNodeOrThrow,q3=ee.$insertTableColumn,Zm=ee.$insertTableColumnAtSelection,Z3=ee.$insertTableColumn__EXPERIMENTAL,J3=ee.$insertTableRow,Jm=ee.$insertTableRowAtSelection,X3=ee.$insertTableRow__EXPERIMENTAL,Q3=ee.$isScrollableTablesActive,eP=ee.$isTableCellNode,tP=ee.$isTableNode,nP=ee.$isTableRowNode,rP=ee.$isTableSelection,oP=ee.$mergeCells,sP=ee.$removeTableRowAtIndex,iP=ee.$unmergeCell,WT=ee.INSERT_TABLE_COMMAND,dr=ee.TableCellHeaderStates,Ki=ee.TableCellNode,aP=ee.TableExtension,yl=ee.TableNode,lP=ee.TableObserver,GT=ee.TableRowNode,cP=ee.applyTableHandlers,uP=ee.getDOMCellFromTarget,dP=ee.getTableElement,hP=ee.getTableObserverFromTableElement,gP=ee.registerTableCellUnmergeTransform,VT=ee.registerTablePlugin,YT=ee.registerTableSelectionObserver,jT=ee.setScrollableTablesActive;function t_(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Ds=t_();function tN(n){Ds=n}var Nl={exec:()=>null};function Ce(n,e=""){let t=typeof n=="string"?n:n.source,r={replace:(o,s)=>{let i=typeof s=="string"?s:s.source;return i=i.replace(Kt.caret,"$1"),t=t.replace(o,i),r},getRegex:()=>new RegExp(t,e)};return r}var TR=(()=>{try{return!!new RegExp("(?<=1)(?/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:n=>new RegExp(`^( {0,3}${n})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}#`),htmlBeginRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}<(?:[a-z].*>|!--)`,"i")},NR=/^(?:[ \t]*(?:\n|$))+/,ER=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,AR=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,El=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,wR=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,n_=/(?:[*+-]|\d{1,9}[.)])/,nN=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,rN=Ce(nN).replace(/bull/g,n_).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),vR=Ce(nN).replace(/bull/g,n_).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),r_=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,OR=/^[^\n]+/,o_=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,kR=Ce(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",o_).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),LR=Ce(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,n_).getRegex(),fd="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",s_=/|$))/,RR=Ce("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",s_).replace("tag",fd).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),oN=Ce(r_).replace("hr",El).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",fd).getRegex(),MR=Ce(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",oN).getRegex(),i_={blockquote:MR,code:ER,def:kR,fences:AR,heading:wR,hr:El,html:RR,lheading:rN,list:LR,newline:NR,paragraph:oN,table:Nl,text:OR},qT=Ce("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",El).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",fd).getRegex(),DR={...i_,lheading:vR,table:qT,paragraph:Ce(r_).replace("hr",El).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",qT).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",fd).getRegex()},IR={...i_,html:Ce(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",s_).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Nl,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Ce(r_).replace("hr",El).replace("heading",` *#{1,6} *[^ +]`).replace("lheading",rN).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},$R=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,PR=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,sN=/^( {2,}|\\)\n(?!\s*$)/,FR=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\`+)[^`]+\k(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",TR?"(?`+)[^`]+\k(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),lN=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,UR=Ce(lN,"u").replace(/punct/g,pd).getRegex(),WR=Ce(lN,"u").replace(/punct/g,aN).getRegex(),cN="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",GR=Ce(cN,"gu").replace(/notPunctSpace/g,iN).replace(/punctSpace/g,a_).replace(/punct/g,pd).getRegex(),VR=Ce(cN,"gu").replace(/notPunctSpace/g,zR).replace(/punctSpace/g,HR).replace(/punct/g,aN).getRegex(),YR=Ce("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,iN).replace(/punctSpace/g,a_).replace(/punct/g,pd).getRegex(),jR=Ce(/\\(punct)/,"gu").replace(/punct/g,pd).getRegex(),qR=Ce(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),ZR=Ce(s_).replace("(?:-->|$)","-->").getRegex(),JR=Ce("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",ZR).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),dd=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,XR=Ce(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",dd).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),uN=Ce(/^!?\[(label)\]\[(ref)\]/).replace("label",dd).replace("ref",o_).getRegex(),dN=Ce(/^!?\[(ref)\](?:\[\])?/).replace("ref",o_).getRegex(),QR=Ce("reflink|nolink(?!\\()","g").replace("reflink",uN).replace("nolink",dN).getRegex(),ZT=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,l_={_backpedal:Nl,anyPunctuation:jR,autolink:qR,blockSkip:KR,br:sN,code:PR,del:Nl,emStrongLDelim:UR,emStrongRDelimAst:GR,emStrongRDelimUnd:YR,escape:$R,link:XR,nolink:dN,punctuation:BR,reflink:uN,reflinkSearch:QR,tag:JR,text:FR,url:Nl},eM={...l_,link:Ce(/^!?\[(label)\]\((.*?)\)/).replace("label",dd).getRegex(),reflink:Ce(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",dd).getRegex()},Xm={...l_,emStrongRDelimAst:VR,emStrongLDelim:WR,url:Ce(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",ZT).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:Ce(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\":">",'"':""","'":"'"},JT=n=>nM[n];function hr(n,e){if(e){if(Kt.escapeTest.test(n))return n.replace(Kt.escapeReplace,JT)}else if(Kt.escapeTestNoEncode.test(n))return n.replace(Kt.escapeReplaceNoEncode,JT);return n}function XT(n){try{n=encodeURI(n).replace(Kt.percentDecode,"%")}catch{return null}return n}function QT(n,e){let t=n.replace(Kt.findPipe,(s,i,a)=>{let l=!1,c=i;for(;--c>=0&&a[c]==="\\";)l=!l;return l?"|":" |"}),r=t.split(Kt.splitPipe),o=0;if(r[0].trim()||r.shift(),r.length>0&&!r.at(-1)?.trim()&&r.pop(),e)if(r.length>e)r.splice(e);else for(;r.length0?-2:-1}function eN(n,e,t,r,o){let s=e.href,i=e.title||null,a=n[1].replace(o.other.outputLinkReplace,"$1");r.state.inLink=!0;let l={type:n[0].charAt(0)==="!"?"image":"link",raw:t,href:s,title:i,text:a,tokens:r.inlineTokens(a)};return r.state.inLink=!1,l}function oM(n,e,t){let r=n.match(t.other.indentCodeCompensation);if(r===null)return e;let o=r[1];return e.split(` +`).map(s=>{let i=s.match(t.other.beginningSpace);if(i===null)return s;let[a]=i;return a.length>=o.length?s.slice(o.length):s}).join(` +`)}var hd=class{options;rules;lexer;constructor(n){this.options=n||Ds}space(n){let e=this.rules.block.newline.exec(n);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(n){let e=this.rules.block.code.exec(n);if(e){let t=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?t:Sl(t,` +`)}}}fences(n){let e=this.rules.block.fences.exec(n);if(e){let t=e[0],r=oM(t,e[3]||"",this.rules);return{type:"code",raw:t,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:r}}}heading(n){let e=this.rules.block.heading.exec(n);if(e){let t=e[2].trim();if(this.rules.other.endingHash.test(t)){let r=Sl(t,"#");(this.options.pedantic||!r||this.rules.other.endingSpaceChar.test(r))&&(t=r.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:t,tokens:this.lexer.inline(t)}}}hr(n){let e=this.rules.block.hr.exec(n);if(e)return{type:"hr",raw:Sl(e[0],` +`)}}blockquote(n){let e=this.rules.block.blockquote.exec(n);if(e){let t=Sl(e[0],` +`).split(` +`),r="",o="",s=[];for(;t.length>0;){let i=!1,a=[],l;for(l=0;l1,o={type:"list",raw:"",ordered:r,start:r?+t.slice(0,-1):"",loose:!1,items:[]};t=r?`\\d{1,9}\\${t.slice(-1)}`:`\\${t}`,this.options.pedantic&&(t=r?t:"[*+-]");let s=this.rules.other.listItemRegex(t),i=!1;for(;n;){let l=!1,c="",u="";if(!(e=s.exec(n))||this.rules.block.hr.test(n))break;c=e[0],n=n.substring(c.length);let d=e[2].split(` +`,1)[0].replace(this.rules.other.listReplaceTabs,_=>" ".repeat(3*_.length)),h=n.split(` +`,1)[0],g=!d.trim(),f=0;if(this.options.pedantic?(f=2,u=d.trimStart()):g?f=e[1].length+1:(f=e[2].search(this.rules.other.nonSpaceChar),f=f>4?1:f,u=d.slice(f),f+=e[1].length),g&&this.rules.other.blankLine.test(h)&&(c+=h+` +`,n=n.substring(h.length+1),l=!0),!l){let _=this.rules.other.nextBulletRegex(f),C=this.rules.other.hrRegex(f),x=this.rules.other.fencesBeginRegex(f),y=this.rules.other.headingBeginRegex(f),S=this.rules.other.htmlBeginRegex(f);for(;n;){let b=n.split(` +`,1)[0],N;if(h=b,this.options.pedantic?(h=h.replace(this.rules.other.listReplaceNesting," "),N=h):N=h.replace(this.rules.other.tabCharGlobal," "),x.test(h)||y.test(h)||S.test(h)||_.test(h)||C.test(h))break;if(N.search(this.rules.other.nonSpaceChar)>=f||!h.trim())u+=` +`+N.slice(f);else{if(g||d.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||x.test(d)||y.test(d)||C.test(d))break;u+=` +`+h}!g&&!h.trim()&&(g=!0),c+=b+` +`,n=n.substring(b.length+1),d=N.slice(f)}}o.loose||(i?o.loose=!0:this.rules.other.doubleBlankLine.test(c)&&(i=!0));let p=null,m;this.options.gfm&&(p=this.rules.other.listIsTask.exec(u),p&&(m=p[0]!=="[ ] ",u=u.replace(this.rules.other.listReplaceTask,""))),o.items.push({type:"list_item",raw:c,task:!!p,checked:m,loose:!1,text:u,tokens:[]}),o.raw+=c}let a=o.items.at(-1);if(a)a.raw=a.raw.trimEnd(),a.text=a.text.trimEnd();else return;o.raw=o.raw.trimEnd();for(let l=0;ld.type==="space"),u=c.length>0&&c.some(d=>this.rules.other.anyLine.test(d.raw));o.loose=u}if(o.loose)for(let l=0;l({text:a,tokens:this.lexer.inline(a),header:!1,align:s.align[l]})));return s}}lheading(n){let e=this.rules.block.lheading.exec(n);if(e)return{type:"heading",raw:e[0],depth:e[2].charAt(0)==="="?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(n){let e=this.rules.block.paragraph.exec(n);if(e){let t=e[1].charAt(e[1].length-1)===` +`?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:t,tokens:this.lexer.inline(t)}}}text(n){let e=this.rules.block.text.exec(n);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(n){let e=this.rules.inline.escape.exec(n);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(n){let e=this.rules.inline.tag.exec(n);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(n){let e=this.rules.inline.link.exec(n);if(e){let t=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(t)){if(!this.rules.other.endAngleBracket.test(t))return;let s=Sl(t.slice(0,-1),"\\");if((t.length-s.length)%2===0)return}else{let s=rM(e[2],"()");if(s===-2)return;if(s>-1){let i=(e[0].indexOf("!")===0?5:4)+e[1].length+s;e[2]=e[2].substring(0,s),e[0]=e[0].substring(0,i).trim(),e[3]=""}}let r=e[2],o="";if(this.options.pedantic){let s=this.rules.other.pedanticHrefTitle.exec(r);s&&(r=s[1],o=s[3])}else o=e[3]?e[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(t)?r=r.slice(1):r=r.slice(1,-1)),eN(e,{href:r&&r.replace(this.rules.inline.anyPunctuation,"$1"),title:o&&o.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(n,e){let t;if((t=this.rules.inline.reflink.exec(n))||(t=this.rules.inline.nolink.exec(n))){let r=(t[2]||t[1]).replace(this.rules.other.multipleSpaceGlobal," "),o=e[r.toLowerCase()];if(!o){let s=t[0].charAt(0);return{type:"text",raw:s,text:s}}return eN(t,o,t[0],this.lexer,this.rules)}}emStrong(n,e,t=""){let r=this.rules.inline.emStrongLDelim.exec(n);if(!(!r||r[3]&&t.match(this.rules.other.unicodeAlphaNumeric))&&(!(r[1]||r[2])||!t||this.rules.inline.punctuation.exec(t))){let o=[...r[0]].length-1,s,i,a=o,l=0,c=r[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,e=e.slice(-1*n.length+o);(r=c.exec(e))!=null;){if(s=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!s)continue;if(i=[...s].length,r[3]||r[4]){a+=i;continue}else if((r[5]||r[6])&&o%3&&!((o+i)%3)){l+=i;continue}if(a-=i,a>0)continue;i=Math.min(i,i+a+l);let u=[...r[0]][0].length,d=n.slice(0,o+r.index+u+i);if(Math.min(o,i)%2){let g=d.slice(1,-1);return{type:"em",raw:d,text:g,tokens:this.lexer.inlineTokens(g)}}let h=d.slice(2,-2);return{type:"strong",raw:d,text:h,tokens:this.lexer.inlineTokens(h)}}}}codespan(n){let e=this.rules.inline.code.exec(n);if(e){let t=e[2].replace(this.rules.other.newLineCharGlobal," "),r=this.rules.other.nonSpaceChar.test(t),o=this.rules.other.startingSpaceChar.test(t)&&this.rules.other.endingSpaceChar.test(t);return r&&o&&(t=t.substring(1,t.length-1)),{type:"codespan",raw:e[0],text:t}}}br(n){let e=this.rules.inline.br.exec(n);if(e)return{type:"br",raw:e[0]}}del(n){let e=this.rules.inline.del.exec(n);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(n){let e=this.rules.inline.autolink.exec(n);if(e){let t,r;return e[2]==="@"?(t=e[1],r="mailto:"+t):(t=e[1],r=t),{type:"link",raw:e[0],text:t,href:r,tokens:[{type:"text",raw:t,text:t}]}}}url(n){let e;if(e=this.rules.inline.url.exec(n)){let t,r;if(e[2]==="@")t=e[0],r="mailto:"+t;else{let o;do o=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??"";while(o!==e[0]);t=e[0],e[1]==="www."?r="http://"+e[0]:r=e[0]}return{type:"link",raw:e[0],text:t,href:r,tokens:[{type:"text",raw:t,text:t}]}}}inlineText(n){let e=this.rules.inline.text.exec(n);if(e){let t=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:t}}}},Bn=class Qm{tokens;options;state;tokenizer;inlineQueue;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Ds,this.options.tokenizer=this.options.tokenizer||new hd,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let t={other:Kt,block:cd.normal,inline:bl.normal};this.options.pedantic?(t.block=cd.pedantic,t.inline=bl.pedantic):this.options.gfm&&(t.block=cd.gfm,this.options.breaks?t.inline=bl.breaks:t.inline=bl.gfm),this.tokenizer.rules=t}static get rules(){return{block:cd,inline:bl}}static lex(e,t){return new Qm(t).lex(e)}static lexInline(e,t){return new Qm(t).inlineTokens(e)}lex(e){e=e.replace(Kt.carriageReturn,` +`),this.blockTokens(e,this.tokens);for(let t=0;t(o=i.call({lexer:this},e,t))?(e=e.substring(o.raw.length),t.push(o),!0):!1))continue;if(o=this.tokenizer.space(e)){e=e.substring(o.raw.length);let i=t.at(-1);o.raw.length===1&&i!==void 0?i.raw+=` +`:t.push(o);continue}if(o=this.tokenizer.code(e)){e=e.substring(o.raw.length);let i=t.at(-1);i?.type==="paragraph"||i?.type==="text"?(i.raw+=(i.raw.endsWith(` +`)?"":` +`)+o.raw,i.text+=` +`+o.text,this.inlineQueue.at(-1).src=i.text):t.push(o);continue}if(o=this.tokenizer.fences(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.heading(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.hr(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.blockquote(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.list(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.html(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.def(e)){e=e.substring(o.raw.length);let i=t.at(-1);i?.type==="paragraph"||i?.type==="text"?(i.raw+=(i.raw.endsWith(` +`)?"":` +`)+o.raw,i.text+=` +`+o.raw,this.inlineQueue.at(-1).src=i.text):this.tokens.links[o.tag]||(this.tokens.links[o.tag]={href:o.href,title:o.title},t.push(o));continue}if(o=this.tokenizer.table(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.lheading(e)){e=e.substring(o.raw.length),t.push(o);continue}let s=e;if(this.options.extensions?.startBlock){let i=1/0,a=e.slice(1),l;this.options.extensions.startBlock.forEach(c=>{l=c.call({lexer:this},a),typeof l=="number"&&l>=0&&(i=Math.min(i,l))}),i<1/0&&i>=0&&(s=e.substring(0,i+1))}if(this.state.top&&(o=this.tokenizer.paragraph(s))){let i=t.at(-1);r&&i?.type==="paragraph"?(i.raw+=(i.raw.endsWith(` +`)?"":` +`)+o.raw,i.text+=` +`+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=i.text):t.push(o),r=s.length!==e.length,e=e.substring(o.raw.length);continue}if(o=this.tokenizer.text(e)){e=e.substring(o.raw.length);let i=t.at(-1);i?.type==="text"?(i.raw+=(i.raw.endsWith(` +`)?"":` +`)+o.raw,i.text+=` +`+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=i.text):t.push(o);continue}if(e){let i="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(i);break}else throw new Error(i)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let r=e,o=null;if(this.tokens.links){let l=Object.keys(this.tokens.links);if(l.length>0)for(;(o=this.tokenizer.rules.inline.reflinkSearch.exec(r))!=null;)l.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(r=r.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(o=this.tokenizer.rules.inline.anyPunctuation.exec(r))!=null;)r=r.slice(0,o.index)+"++"+r.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let s;for(;(o=this.tokenizer.rules.inline.blockSkip.exec(r))!=null;)s=o[2]?o[2].length:0,r=r.slice(0,o.index+s)+"["+"a".repeat(o[0].length-s-2)+"]"+r.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);r=this.options.hooks?.emStrongMask?.call({lexer:this},r)??r;let i=!1,a="";for(;e;){i||(a=""),i=!1;let l;if(this.options.extensions?.inline?.some(u=>(l=u.call({lexer:this},e,t))?(e=e.substring(l.raw.length),t.push(l),!0):!1))continue;if(l=this.tokenizer.escape(e)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.tag(e)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.link(e)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(l.raw.length);let u=t.at(-1);l.type==="text"&&u?.type==="text"?(u.raw+=l.raw,u.text+=l.text):t.push(l);continue}if(l=this.tokenizer.emStrong(e,r,a)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.codespan(e)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.br(e)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.del(e)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.autolink(e)){e=e.substring(l.raw.length),t.push(l);continue}if(!this.state.inLink&&(l=this.tokenizer.url(e))){e=e.substring(l.raw.length),t.push(l);continue}let c=e;if(this.options.extensions?.startInline){let u=1/0,d=e.slice(1),h;this.options.extensions.startInline.forEach(g=>{h=g.call({lexer:this},d),typeof h=="number"&&h>=0&&(u=Math.min(u,h))}),u<1/0&&u>=0&&(c=e.substring(0,u+1))}if(l=this.tokenizer.inlineText(c)){e=e.substring(l.raw.length),l.raw.slice(-1)!=="_"&&(a=l.raw.slice(-1)),i=!0;let u=t.at(-1);u?.type==="text"?(u.raw+=l.raw,u.text+=l.text):t.push(l);continue}if(e){let u="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(u);break}else throw new Error(u)}}return t}},gd=class{options;parser;constructor(n){this.options=n||Ds}space(n){return""}code({text:n,lang:e,escaped:t}){let r=(e||"").match(Kt.notSpaceStart)?.[0],o=n.replace(Kt.endingNewline,"")+` +`;return r?'
'+(t?o:hr(o,!0))+`
+`:"
"+(t?o:hr(o,!0))+`
+`}blockquote({tokens:n}){return`
+${this.parser.parse(n)}
+`}html({text:n}){return n}def(n){return""}heading({tokens:n,depth:e}){return`${this.parser.parseInline(n)} +`}hr(n){return`
+`}list(n){let e=n.ordered,t=n.start,r="";for(let i=0;i +`+r+" +`}listitem(n){let e="";if(n.task){let t=this.checkbox({checked:!!n.checked});n.loose?n.tokens[0]?.type==="paragraph"?(n.tokens[0].text=t+" "+n.tokens[0].text,n.tokens[0].tokens&&n.tokens[0].tokens.length>0&&n.tokens[0].tokens[0].type==="text"&&(n.tokens[0].tokens[0].text=t+" "+hr(n.tokens[0].tokens[0].text),n.tokens[0].tokens[0].escaped=!0)):n.tokens.unshift({type:"text",raw:t+" ",text:t+" ",escaped:!0}):e+=t+" "}return e+=this.parser.parse(n.tokens,!!n.loose),`
  • ${e}
  • +`}checkbox({checked:n}){return"'}paragraph({tokens:n}){return`

    ${this.parser.parseInline(n)}

    +`}table(n){let e="",t="";for(let o=0;o${r}`),` + +`+e+` +`+r+`
    +`}tablerow({text:n}){return` +${n} +`}tablecell(n){let e=this.parser.parseInline(n.tokens),t=n.header?"th":"td";return(n.align?`<${t} align="${n.align}">`:`<${t}>`)+e+` +`}strong({tokens:n}){return`${this.parser.parseInline(n)}`}em({tokens:n}){return`${this.parser.parseInline(n)}`}codespan({text:n}){return`${hr(n,!0)}`}br(n){return"
    "}del({tokens:n}){return`${this.parser.parseInline(n)}`}link({href:n,title:e,tokens:t}){let r=this.parser.parseInline(t),o=XT(n);if(o===null)return r;n=o;let s='
    ",s}image({href:n,title:e,text:t,tokens:r}){r&&(t=this.parser.parseInline(r,this.parser.textRenderer));let o=XT(n);if(o===null)return hr(t);n=o;let s=`${t}{let i=o[s].flat(1/0);t=t.concat(this.walkTokens(i,e))}):o.tokens&&(t=t.concat(this.walkTokens(o.tokens,e)))}}return t}use(...n){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return n.forEach(t=>{let r={...t};if(r.async=this.defaults.async||r.async||!1,t.extensions&&(t.extensions.forEach(o=>{if(!o.name)throw new Error("extension name required");if("renderer"in o){let s=e.renderers[o.name];s?e.renderers[o.name]=function(...i){let a=o.renderer.apply(this,i);return a===!1&&(a=s.apply(this,i)),a}:e.renderers[o.name]=o.renderer}if("tokenizer"in o){if(!o.level||o.level!=="block"&&o.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let s=e[o.level];s?s.unshift(o.tokenizer):e[o.level]=[o.tokenizer],o.start&&(o.level==="block"?e.startBlock?e.startBlock.push(o.start):e.startBlock=[o.start]:o.level==="inline"&&(e.startInline?e.startInline.push(o.start):e.startInline=[o.start]))}"childTokens"in o&&o.childTokens&&(e.childTokens[o.name]=o.childTokens)}),r.extensions=e),t.renderer){let o=this.defaults.renderer||new gd(this.defaults);for(let s in t.renderer){if(!(s in o))throw new Error(`renderer '${s}' does not exist`);if(["options","parser"].includes(s))continue;let i=s,a=t.renderer[i],l=o[i];o[i]=(...c)=>{let u=a.apply(o,c);return u===!1&&(u=l.apply(o,c)),u||""}}r.renderer=o}if(t.tokenizer){let o=this.defaults.tokenizer||new hd(this.defaults);for(let s in t.tokenizer){if(!(s in o))throw new Error(`tokenizer '${s}' does not exist`);if(["options","rules","lexer"].includes(s))continue;let i=s,a=t.tokenizer[i],l=o[i];o[i]=(...c)=>{let u=a.apply(o,c);return u===!1&&(u=l.apply(o,c)),u}}r.tokenizer=o}if(t.hooks){let o=this.defaults.hooks||new Tl;for(let s in t.hooks){if(!(s in o))throw new Error(`hook '${s}' does not exist`);if(["options","block"].includes(s))continue;let i=s,a=t.hooks[i],l=o[i];Tl.passThroughHooks.has(s)?o[i]=c=>{if(this.defaults.async&&Tl.passThroughHooksRespectAsync.has(s))return(async()=>{let d=await a.call(o,c);return l.call(o,d)})();let u=a.call(o,c);return l.call(o,u)}:o[i]=(...c)=>{if(this.defaults.async)return(async()=>{let d=await a.apply(o,c);return d===!1&&(d=await l.apply(o,c)),d})();let u=a.apply(o,c);return u===!1&&(u=l.apply(o,c)),u}}r.hooks=o}if(t.walkTokens){let o=this.defaults.walkTokens,s=t.walkTokens;r.walkTokens=function(i){let a=[];return a.push(s.call(this,i)),o&&(a=a.concat(o.call(this,i))),a}}this.defaults={...this.defaults,...r}}),this}setOptions(n){return this.defaults={...this.defaults,...n},this}lexer(n,e){return Bn.lex(n,e??this.defaults)}parser(n,e){return Hn.parse(n,e??this.defaults)}parseMarkdown(n){return(e,t)=>{let r={...t},o={...this.defaults,...r},s=this.onError(!!o.silent,!!o.async);if(this.defaults.async===!0&&r.async===!1)return s(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof e>"u"||e===null)return s(new Error("marked(): input parameter is undefined or null"));if(typeof e!="string")return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));if(o.hooks&&(o.hooks.options=o,o.hooks.block=n),o.async)return(async()=>{let i=o.hooks?await o.hooks.preprocess(e):e,a=await(o.hooks?await o.hooks.provideLexer():n?Bn.lex:Bn.lexInline)(i,o),l=o.hooks?await o.hooks.processAllTokens(a):a;o.walkTokens&&await Promise.all(this.walkTokens(l,o.walkTokens));let c=await(o.hooks?await o.hooks.provideParser():n?Hn.parse:Hn.parseInline)(l,o);return o.hooks?await o.hooks.postprocess(c):c})().catch(s);try{o.hooks&&(e=o.hooks.preprocess(e));let i=(o.hooks?o.hooks.provideLexer():n?Bn.lex:Bn.lexInline)(e,o);o.hooks&&(i=o.hooks.processAllTokens(i)),o.walkTokens&&this.walkTokens(i,o.walkTokens);let a=(o.hooks?o.hooks.provideParser():n?Hn.parse:Hn.parseInline)(i,o);return o.hooks&&(a=o.hooks.postprocess(a)),a}catch(i){return s(i)}}}onError(n,e){return t=>{if(t.message+=` +Please report this to https://github.com/markedjs/marked.`,n){let r="

    An error occurred:

    "+hr(t.message+"",!0)+"
    ";return e?Promise.resolve(r):r}if(e)return Promise.reject(t);throw t}}},Ms=new sM;function we(n,e){return Ms.parse(n,e)}we.options=we.setOptions=function(n){return Ms.setOptions(n),we.defaults=Ms.defaults,tN(we.defaults),we};we.getDefaults=t_;we.defaults=Ds;we.use=function(...n){return Ms.use(...n),we.defaults=Ms.defaults,tN(we.defaults),we};we.walkTokens=function(n,e){return Ms.walkTokens(n,e)};we.parseInline=Ms.parseInline;we.Parser=Hn;we.parser=Hn.parse;we.Renderer=gd;we.TextRenderer=c_;we.Lexer=Bn;we.lexer=Bn.lex;we.Tokenizer=hd;we.Hooks=Tl;we.parse=we;var pP=we.options,mP=we.setOptions,_P=we.use,CP=we.walkTokens,xP=we.parseInline;var yP=Hn.parse,bP=Bn.lex;window.Prism=window.Prism||{};window.Prism.manual=!0;function TN(n,e){let t={...n,...e};for(let[r,o]of Object.entries(e))iM(n[r],o)&&(t[r]=TN(n[r],o));return t}function iM(...n){return n.every(e=>e&&e.constructor==Object)}var Dl=class{#e={};constructor(...e){this.merge(...e)}merge(...e){return this.#e=e.reduce(TN,this.#e)}get(e){return e.split(".").reduce((r,o)=>r[o],this.#e)}};function hN(n,e){return[...Array(1+e-n).keys()].map(t=>t+n)}var gN=new Dl({attachmentTagName:"action-text-attachment",attachmentContentTypeNamespace:"actiontext",authenticatedUploads:!1,extensions:[]}),fN=new Dl({default:{attachments:!0,markdown:!0,multiLine:!0,richText:!0,toolbar:!0,highlight:{buttons:{color:hN(1,9).map(n=>`var(--highlight-${n})`),"background-color":hN(1,9).map(n=>`var(--highlight-bg-${n})`)},permit:{color:[],"background-color":[]}}}}),zn={global:gN,presets:fN,configure({global:n,...e}){n&&gN.merge(n),fN.merge(e)}},aM=["a","b","blockquote","br","code","div","em","figcaption","figure","h1","h2","h3","h4","h5","h6","hr","i","img","li","mark","ol","p","pre","q","s","strong","ul","table","tbody","tr","th","td"],lM=["alt","caption","class","content","content-type","contenteditable","data-direct-upload-id","data-sgid","filename","filesize","height","href","presentation","previewable","sgid","src","style","title","url","width"],cM=["color","background-color"];function uM(n,e){if(e.attrName==="style"&&e.attrValue){let t={...ps(e.attrValue)},r={};for(let o in t)cM.includes(o)&&(r[o]=t[o]);Object.keys(r).length?e.attrValue=xu(r):e.keepAttr=!1}}fc.addHook("uponSanitizeAttribute",uM);fc.addHook("uponSanitizeElement",(n,e)=>{(e.tagName==="strong"||e.tagName==="em")&&n.removeAttribute("class")});function dM(){return{ALLOWED_TAGS:aM.concat(zn.global.get("attachmentTagName")),ALLOWED_ATTR:lM,ADD_URI_SAFE_ATTR:["caption","filename"],SAFE_FOR_XML:!1}}function fg(){return document.head.querySelector("meta[name=csp-nonce]")?.content}function NN(n,e){let t=document.activeElement;n.includes(t)&&new h_(n,e.key).selectNext(t)&&e.preventDefault()}var h_=class{constructor(e,t){this.elements=e,this.key=t}selectNext(e){let t=this.#e(e);if(t){let r=this.elements.filter(o=>o!==t);return this.#a(r),this.#o(t),!0}return!1}#e(e){switch(this.key){case"ArrowRight":case"ArrowDown":return this.#r(e);case"ArrowLeft":case"ArrowUp":return this.#s(e);case"Home":return this.#t();case"End":return this.#n()}}#t(e=this.elements){return e.find(u_)}#n(e=this.elements){return e.findLast(u_)}#r(e){let t=this.elements.slice(this.#i(e)+1);return this.#t(t)}#s(e){let t=this.elements.slice(0,this.#i(e));return this.#n(t)}#i(e){return this.elements.indexOf(e)}#o(e){u_(e)&&(e.tabIndex=0,e.focus())}#a(e){e.forEach(t=>t.tabIndex=-1)}};function u_(n){return n&&!n.disabled&&n.checkVisibility()}var vt={bold:` + + `,italic:` + + `,strikethrough:` + + + `,heading:` + + `,highlight:` + + `,link:` + + + `,quote:` + + `,code:` + + + `,ul:` + + `,ol:` + + + + + `,attachment:` + + `,table:` + + `,hr:` + + `,undo:` + + `,redo:` + + `,overflow:` + + `},Ld,EN,Rd,AN,Md,wN,Dd,vN,Id,ON,$d,kN,Pd,LN,Fd,RN,Bd,MN,Hd,DN,$l,zd,IN,Kd,$N,Ud,PN,Pl,Fl,Bl,Hl,g_,Wd,FN,Gd,BN,zl,f_,Vd,HN,Xt,bn,Kl,p_,Yd,zN,Vi,jd,KN,qd,UN,Yi,Cd,Zd,WN,Ul,m_,Jd,GN,Fs,Al,Xr,Is,Xd,VN,ji,xd,Qd,YN,Ll=class extends HTMLElement{constructor(){super();k(this,Ld);k(this,Rd);k(this,Md);k(this,Dd);k(this,Id);k(this,$d);k(this,Pd);k(this,Fd);k(this,Bd);k(this,Hd);k(this,zd);k(this,Kd);k(this,Ud);k(this,Hl);k(this,Wd);k(this,Gd);k(this,zl);k(this,Vd);k(this,Xt);k(this,Kl);k(this,Yd);k(this,jd);k(this,qd);k(this,Yi);k(this,Zd);k(this,Ul);k(this,Jd);k(this,Fs);k(this,Xr);k(this,Xd);k(this,ji);k(this,Qd);k(this,$l,t=>{this.querySelectorAll("[data-hotkey]").forEach(o=>{o.dataset.hotkey.toLowerCase().split(/\s+/).includes(L(this,zd,IN).call(this,t))&&(t.preventDefault(),t.stopPropagation(),o.click())})});k(this,Pl,()=>{R(this,ji,xd)[0].tabIndex=0});k(this,Fl,()=>{L(this,Hl,g_).call(this),L(this,Ul,m_).call(this)});k(this,Bl,t=>{NN(R(this,ji,xd),t)});k(this,Vi,()=>{L(this,qd,UN).call(this),L(this,jd,KN).call(this),R(this,Fs,Al).style.display=R(this,Xr,Is).children.length?"block":"none",R(this,Fs,Al).setAttribute("nonce",fg());let t=R(this,Xr,Is).children.length>0;this.toggleAttribute("overflowing",t),R(this,Xr,Is).toggleAttribute("disabled",!t)});this.internals=this.attachInternals(),this.internals.role="toolbar",L(this,Rd,AN).call(this)}connectedCallback(){requestAnimationFrame(()=>R(this,Vi).call(this)),this.setAttribute("role","toolbar"),L(this,Md,wN).call(this)}disconnectedCallback(){L(this,Dd,vN).call(this),L(this,Hd,DN).call(this),L(this,Ud,PN).call(this)}attributeChangedCallback(t,r,o){t==="connected"&&this.isConnected&&r!=null&&r!==o&&requestAnimationFrame(()=>L(this,Ld,EN).call(this))}setEditor(t){this.editorElement=t,this.editor=t.editor,this.selection=t.selection,L(this,Id,ON).call(this),L(this,Bd,MN).call(this),L(this,Hl,g_).call(this),L(this,Zd,WN).call(this),L(this,Wd,FN).call(this),L(this,Gd,BN).call(this),R(this,Vi).call(this),L(this,Kd,$N).call(this),this.resolveEditorPromise(t),this.toggleAttribute("connected",!0)}async getEditorElement(){return this.editorElement||await this.editorPromise}static get defaultTemplate(){return` + + + + + + + + +
    + + ${vt.highlight} + + +
    + +
    +
    + +
    + + ${vt.link} + + +
    + +
    + + +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + +
    + ${vt.overflow} +
    +
    + `}};Ld=new WeakSet,EN=function(){this.disconnectedCallback(),this.connectedCallback()},Rd=new WeakSet,AN=function(){this.editorPromise=new Promise(t=>{this.resolveEditorPromise=t})},Md=new WeakSet,wN=function(){this.resizeObserver=new ResizeObserver(()=>R(this,Vi).call(this)),this.resizeObserver.observe(this)},Dd=new WeakSet,vN=function(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)},Id=new WeakSet,ON=function(){this.addEventListener("click",L(this,$d,kN).bind(this))},$d=new WeakSet,kN=function(t){L(this,Pd,LN).call(this,t,"[data-command]",L(this,Fd,RN).bind(this))},Pd=new WeakSet,LN=function(t,r,o){let s=t.target.closest(r);s&&o(t,s)},Fd=new WeakSet,RN=function(t,{dataset:{command:r,payload:o}}){let s=t instanceof PointerEvent&&t.pointerId===-1;this.editor.update(()=>{this.editor.dispatchCommand(r,o)},{tag:s?ip:void 0})},Bd=new WeakSet,MN=function(){this.editorElement.addEventListener("keydown",R(this,$l))},Hd=new WeakSet,DN=function(){this.editorElement?.removeEventListener("keydown",R(this,$l))},$l=new WeakMap,zd=new WeakSet,IN=function(t){let r=t.key.toLowerCase();return[...[t.ctrlKey?"ctrl":null,t.metaKey?"cmd":null,t.altKey?"alt":null,t.shiftKey?"shift":null].filter(Boolean),r].join("+")},Kd=new WeakSet,$N=function(){this.editorElement.addEventListener("lexxy:focus",R(this,Pl)),this.editorElement.addEventListener("lexxy:blur",R(this,Fl)),this.addEventListener("keydown",R(this,Bl))},Ud=new WeakSet,PN=function(){this.editorElement.removeEventListener("lexxy:focus",R(this,Pl)),this.editorElement.removeEventListener("lexxy:blur",R(this,Fl)),this.removeEventListener("keydown",R(this,Bl))},Pl=new WeakMap,Fl=new WeakMap,Bl=new WeakMap,Hl=new WeakSet,g_=function(){R(this,ji,xd).forEach(t=>{t.tabIndex=-1})},Wd=new WeakSet,FN=function(){this.editor.registerUpdateListener(()=>{this.editor.getEditorState().read(()=>{L(this,Vd,HN).call(this),L(this,Ul,m_).call(this)})})},Gd=new WeakSet,BN=function(){this.editor.registerUpdateListener(()=>{L(this,zl,f_).call(this)})},zl=new WeakSet,f_=function(){this.editor.getEditorState().read(()=>{let t=this.editorElement.historyState;t&&(L(this,Kl,p_).call(this,"undo",t.undoStack.length===0),L(this,Kl,p_).call(this,"redo",t.redoStack.length===0))})},Vd=new WeakSet,HN=function(){let t=w();if(!v(t)||!t.anchor.getNode().getParent())return;let{isBold:o,isItalic:s,isStrikethrough:i,isHighlight:a,isInLink:l,isInQuote:c,isInHeading:u,isInCode:d,isInList:h,listType:g,isInTable:f}=this.selection.getFormat();L(this,Xt,bn).call(this,"bold",o),L(this,Xt,bn).call(this,"italic",s),L(this,Xt,bn).call(this,"strikethrough",i),L(this,Xt,bn).call(this,"highlight",a),L(this,Xt,bn).call(this,"link",l),L(this,Xt,bn).call(this,"quote",c),L(this,Xt,bn).call(this,"heading",u),L(this,Xt,bn).call(this,"code",d),L(this,Xt,bn).call(this,"unordered-list",h&&g==="bullet"),L(this,Xt,bn).call(this,"ordered-list",h&&g==="number"),L(this,Xt,bn).call(this,"table",f),L(this,zl,f_).call(this)},Xt=new WeakSet,bn=function(t,r){let o=this.querySelector(`[name="${t}"]`);o&&o.setAttribute("aria-pressed",r.toString())},Kl=new WeakSet,p_=function(t,r){let o=this.querySelector(`[name="${t}"]`);o&&(o.disabled=r,o.setAttribute("aria-disabled",r.toString()))},Yd=new WeakSet,zN=function(){return this.scrollWidth-R(this,Fs,Al).clientWidth>this.clientWidth+1},Vi=new WeakMap,jd=new WeakSet,KN=function(){let t=R(this,Xd,VN).reverse(),r=!1;for(let o of t)if(L(this,Yd,zN).call(this))R(this,Xr,Is).prepend(o),r=!0;else{r&&R(this,Xr,Is).prepend(o);break}},qd=new WeakSet,UN=function(){let t=Array.from(R(this,Xr,Is).children);t.sort((r,o)=>L(this,Yi,Cd).call(this,o)-L(this,Yi,Cd).call(this,r)),t.forEach(r=>{let o=this.querySelector(`[data-position="${L(this,Yi,Cd).call(this,r)+1}"]`)??R(this,Fs,Al);this.insertBefore(r,o)})},Yi=new WeakSet,Cd=function(t){return parseInt(t.dataset.position??"999")},Zd=new WeakSet,WN=function(){R(this,Qd,YN).forEach((t,r)=>{t.dataset.position===void 0&&(t.dataset.position=r)})},Ul=new WeakSet,m_=function(){R(this,Jd,GN).forEach(t=>{t.open=!1})},Jd=new WeakSet,GN=function(){return this.querySelectorAll("details")},Fs=new WeakSet,Al=function(){return this.querySelector(".lexxy-editor__toolbar-overflow")},Xr=new WeakSet,Is=function(){return this.querySelector(".lexxy-editor__toolbar-overflow-menu")},Xd=new WeakSet,VN=function(){return Array.from(this.querySelectorAll(":scope > button"))},ji=new WeakSet,xd=function(){return Array.from(this.querySelectorAll(":scope button, :scope > details > summary"))},Qd=new WeakSet,YN=function(){return Array.from(this.querySelectorAll(":scope > *:not(.lexxy-editor__toolbar-overflow)"))},nn(Ll,"observedAttributes",["connected"]);var $s={text:{bold:"lexxy-content__bold",italic:"lexxy-content__italic",strikethrough:"lexxy-content__strikethrough",underline:"lexxy-content__underline",highlight:"lexxy-content__highlight"},tableCellHeader:"lexxy-content__table-cell--header",tableCellSelected:"lexxy-content__table-cell--selected",tableSelection:"lexxy-content__table--selection",tableScrollableWrapper:"lexxy-content__table-wrapper",tableCellHighlight:"lexxy-content__table-cell--highlight",tableCellFocus:"lexxy-content__table-cell--focus",list:{nested:{listitem:"lexxy-nested-listitem"}},codeHighlight:{addition:"code-token__selector",atrule:"code-token__attr",attr:"code-token__attr","attr-name":"code-token__attr","attr-value":"code-token__selector",boolean:"code-token__property",bold:"code-token__variable",builtin:"code-token__selector",cdata:"code-token__comment",char:"code-token__selector",class:"code-token__function","class-name":"code-token__function",color:"code-token__property",comment:"code-token__comment",constant:"code-token__property",coord:"code-token__comment",decorator:"code-token__function",deleted:"code-token__operator",deletion:"code-token__operator",directive:"code-token__attr","directive-hash":"code-token__property",doctype:"code-token__comment",entity:"code-token__operator",function:"code-token__function",hexcode:"code-token__property",important:"code-token__function",inserted:"code-token__selector",italic:"code-token__comment",keyword:"code-token__attr",line:"code-token__selector",namespace:"code-token__variable",number:"code-token__property",macro:"code-token__function",operator:"code-token__operator",parameter:"code-token__variable",prolog:"code-token__comment",property:"code-token__property",punctuation:"code-token__punctuation","raw-string":"code-token__operator",regex:"code-token__variable",script:"code-token__function",selector:"code-token__selector",string:"code-token__selector",style:"code-token__function",symbol:"code-token__property",tag:"code-token__property",title:"code-token__function","type-definition":"code-token__function",url:"code-token__operator",variable:"code-token__variable"}},Zo=class extends Eo{static getType(){return"horizontal_divider"}static clone(e){return new Zo(e.__key)}static importJSON(e){return new Zo}static importDOM(){return{hr:e=>({conversion:()=>({node:new Zo}),priority:1})}}constructor(e){super(e)}createDOM(){let e=se("figure",{className:"horizontal-divider"}),t=se("hr");e.appendChild(t);let r=se("lexxy-node-delete-button");return e.appendChild(r),e}updateDOM(){return!0}getTextContent(){return`\u2504 + +`}isInline(){return!1}exportDOM(){return{element:se("hr")}}exportJSON(){return{type:"horizontal_divider",version:1}}decorate(){return null}},md=[gs,x1];function hM(...n){let e=Jc();return n.forEach(t=>e.add(t.getKey())),e}function gM(n){if(B(n))return Su(n,U);if(n.isParentRequired()){let e=n.createRequiredParent();return Su(n,e)}else return n}function __(n){return nr(n,Fo)?.getListType()??null}function Nd(n,e=null){return e===null?Nd(n,!0)||Nd(n,!1):e?fM(n):V1(n)}function fM(n){return n.offset===0}function wl(n,...e){return jN(Ft,n,(t,r)=>({...t,forChild:(o,s)=>{let a=(t?.forChild??(l=>l))(o,s);if(B(a))return a=e.reduce((l,c)=>c(l,r)??l,a),a}}))}function jN(n,e,t=r=>r){return r=>{let o=n.importDOM()?.[e]?.(r);if(!o)return null;let s=o.conversion(r);return s&&(t(s,r)??s)}}function pM(n){return v(n)?n.isCollapsed()?qN(n.style):n.hasFormat("highlight"):!1}function qN(n){let e=typeof n=="string"?ps(n):n;return!!(e.color||e["background-color"])}function mM(n,e=[]){return e.reduce((t,r)=>r.applyCanonicalization(t),n)}var Ed=class{constructor(e,t=[]){this._property=e,this._allowedValues=t,this._canonicalValues=this.#e}applyCanonicalization(e){let t={...ps(e)};return t[this._property]=this.getCanonicalAllowedValue(t[this._property]),t[this._property]||delete t[this._property],xu(t)}getCanonicalAllowedValue(e){return this._canonicalValues[e]||=this.#t(e)}get#e(){return this._allowedValues.reduce((e,t)=>({...e,[t]:t}),{})}#t(e){let t=this.#n.indexOf(e);return t||=this.#n.indexOf(pN(this._property,e)),t===-1?null:this._allowedValues[t]}get#n(){return this._computedAllowedValues||=this._allowedValues.map(e=>pN(this._property,e))}};function pN(n,e){let t=`${n}: ${e};`,r=document.body.appendChild(se("span",{style:"display: none;"+t})),o=window.getComputedStyle(r).getPropertyValue(n);return r.remove(),o}var Ks=class{#e;constructor(e){this.#e=e}get editorElement(){return this.#e}get editorConfig(){return this.#e.config}get enabled(){return!0}get lexicalExtension(){return null}initializeToolbar(e){}},ZN=Ct(),JN=Ct(),_M={color:null,"background-color":null},XN=gu("hasPastedStyles",{parse:n=>n||!1}),C_=class extends Ks{get enabled(){return this.editorElement.supportsRichText}get lexicalExtension(){return[ue({dependencies:[JS],name:"lexxy/highlight",config:{color:{buttons:[],permit:[]},"background-color":{buttons:[],permit:[]}},html:{import:{mark:CM}},register(t,r){let o=xM(r);return Ee(t.registerCommand(ZN,mN,cn),t.registerCommand(JN,()=>mN(_M),cn),t.registerNodeTransform(Ft,bM),t.registerNodeTransform(Ft,s=>SM(s,o)))}}),this.editorConfig.get("highlight")]}};function vl(n,e){let t={color:e.style?.color,"background-color":e.style?.backgroundColor};a1(Wr)&&QN(n);let r=xu(t);if(r.length)return n.setStyle(n.getStyle()+r)}function CM(){return{conversion:wl("mark",vl),priority:1}}function xM(n){return[new Ed("color",[...n.buttons.color,...n.permit.color]),new Ed("background-color",[...n.buttons["background-color"],...n.permit["background-color"]])]}function mN(n){let e=w();if(!v(e))return;let t={};for(let r in n){let o=_u(e,r);t[r]=yM(o,n[r])}Y1(e,t)}function yM(n,e){return n===e?null:e}function bM(n){qN(n.getStyle())!==n.hasFormat("highlight")&&n.toggleFormat("highlight")}function SM(n,e=[]){if(TM(n)){QN(n,!1);let t=mM(n.getStyle(),e);n.setStyle(t);let r=w();n.isSelected(r)&&(r.setStyle(n.getStyle()),r.setFormat(n.getFormat()))}}function QN(n,e=!0){To(n,XN,e)}function TM(n){return gi(n,XN)}var NM=["bold","italic","strikethrough","link","unlink","toggleHighlight","removeHighlight","rotateHeadingFormat","insertUnorderedList","insertOrderedList","insertQuoteBlock","insertCodeBlock","insertHorizontalDivider","uploadAttachments","insertTable","undo","redo"],Il=class{static configureFor(e){new Il(e)}constructor(e){this.editorElement=e,this.editor=e.editor,this.selection=e.selection,this.contents=e.contents,this.clipboard=e.clipboard,this.#e(),this.#n(),this.#r()}dispatchPaste(e){return this.clipboard.paste(e)}dispatchBold(){this.editor.dispatchCommand(Kr,"bold")}dispatchItalic(){this.editor.dispatchCommand(Kr,"italic")}dispatchStrikethrough(){this.editor.dispatchCommand(Kr,"strikethrough")}dispatchToggleHighlight(e){this.editor.dispatchCommand(ZN,e)}dispatchRemoveHighlight(){this.editor.dispatchCommand(JN)}dispatchLink(e){this.editor.update(()=>{let t=w();if(!!v(t))if(t.isCollapsed()){let r=yS(e),o=ye(e);r.append(o),t.insertNodes([r])}else Li(e)})}dispatchUnlink(){this.#d(null)}dispatchInsertUnorderedList(){let e=w();if(!e)return;let t=e.anchor.getNode();this.selection.isInsideList&&t&&__(t)==="bullet"?this.contents.unwrapSelectedListItems():this.editor.dispatchCommand(cS,void 0)}dispatchInsertOrderedList(){let e=w();if(!e)return;let t=e.anchor.getNode();this.selection.isInsideList&&t&&__(t)==="number"?this.contents.unwrapSelectedListItems():this.editor.dispatchCommand(lS,void 0)}dispatchInsertQuoteBlock(){this.contents.toggleNodeWrappingAllSelectedNodes(e=>$n(e),()=>Ii())}dispatchInsertCodeBlock(){this.editor.update(()=>{this.selection.hasSelectedWordsInSingleLine?this.editor.dispatchCommand(Kr,"code"):this.contents.toggleNodeWrappingAllSelectedLines(e=>Ko(e),()=>new Uo("plain"))})}dispatchInsertHorizontalDivider(){this.contents.insertAtCursorEnsuringLineBelow(new Zo),this.editor.focus()}dispatchRotateHeadingFormat(){let e=w();if(!v(e))return;if(Ze(e.anchor.getNode())){e.insertNodes([il("h2")]);return}let t=e.anchor.getNode().getTopLevelElementOrThrow(),r="h2";if(al(t)){let o=t.getTag();o==="h2"?r="h3":o==="h3"?r="h4":o==="h4"?r=null:r="h2"}r?this.contents.insertNodeWrappingEachSelectedLine(()=>il(r)):this.contents.removeFormattingFromSelectedLines()}dispatchUploadAttachments(){let e=se("input",{type:"file",multiple:!0,style:"display: none;",onchange:({target:{files:t}})=>{this.contents.uploadFiles(t,{selectLast:!0})}});this.editorElement.appendChild(e),e.click(),setTimeout(()=>e.remove(),1e3)}dispatchInsertTable(){this.editor.dispatchCommand(WT,{rows:3,columns:3,includeHeaders:!0})}dispatchUndo(){this.editor.dispatchCommand(du,void 0)}dispatchRedo(){this.editor.dispatchCommand(lu,void 0)}#e(){for(let e of NM){let t=`dispatch${EM(e)}`;this.#t(e,0,this[t].bind(this))}this.#t(Oo,de,this.dispatchPaste.bind(this))}#t(e,t,r){this.editor.registerCommand(e,r,t)}#n(){this.editor.registerCommand(_n,this.#u.bind(this),cn)}#r(){this.editorElement.supportsAttachments&&(this.dragCounter=0,this.editor.getRootElement().addEventListener("dragover",this.#o.bind(this)),this.editor.getRootElement().addEventListener("drop",this.#a.bind(this)),this.editor.getRootElement().addEventListener("dragenter",this.#s.bind(this)),this.editor.getRootElement().addEventListener("dragleave",this.#i.bind(this)))}#s(e){this.dragCounter++,this.dragCounter===1&&this.editor.getRootElement().classList.add("lexxy-editor--drag-over")}#i(e){this.dragCounter--,this.dragCounter===0&&this.editor.getRootElement().classList.remove("lexxy-editor--drag-over")}#o(e){e.preventDefault()}#a(e){e.preventDefault(),this.dragCounter=0,this.editor.getRootElement().classList.remove("lexxy-editor--drag-over");let t=e.dataTransfer;if(!t)return;let r=Array.from(t.files);!r.length||(this.contents.uploadFiles(r,{selectLast:!0}),this.editor.focus())}#u(e){return this.selection.isInsideList?this.#l(e):this.selection.isInsideCodeBlock?this.#c():!1}#l(e){if(e.shiftKey&&!this.selection.isIndentedList)return!1;e.preventDefault();let t=e.shiftKey?hn:$t;return this.editor.dispatchCommand(t)}#c(){let e=w();return v(e)&&e.isCollapsed()}#d(e){this.editor.update(()=>{e===null?Li(null):Li(e)})}};function EM(n){return n.charAt(0).toUpperCase()+n.slice(1)}function AM(n,e){let t;return(...r)=>(clearTimeout(t),new Promise((o,s)=>{t=setTimeout(async()=>{try{let i=await n(...r);o(i)}catch(i){s(i)}},e)}))}function Us(){return new Promise(requestAnimationFrame)}function eE(n){if(n===0)return"0 B";let e=["B","KB","MB","GB","TB","PB"],t=Math.floor(Math.log(n)/Math.log(1024));return`${(n/Math.pow(1024,t)).toFixed(2)} ${e[t]}`}function wM(n){return n.split("/").pop()}var Ut=class extends Eo{static getType(){return"action_text_attachment"}static clone(e){return new Ut({...e},e.__key)}static importJSON(e){return new Ut({...e})}static importDOM(){return{[this.TAG_NAME]:()=>({conversion:e=>({node:new Ut({sgid:e.getAttribute("sgid"),src:e.getAttribute("url"),previewable:e.getAttribute("previewable"),altText:e.getAttribute("alt"),caption:e.getAttribute("caption"),contentType:e.getAttribute("content-type"),fileName:e.getAttribute("filename"),fileSize:e.getAttribute("filesize"),width:e.getAttribute("width"),height:e.getAttribute("height")})}),priority:1}),img:()=>({conversion:e=>{let t=wM(e.getAttribute("src")??"");return{node:new Ut({src:e.getAttribute("src"),fileName:t,caption:e.getAttribute("alt")||"",contentType:"image/*",width:e.getAttribute("width"),height:e.getAttribute("height")})}},priority:1}),video:()=>({conversion:e=>{let t=e.getAttribute("src")||e.querySelector("source")?.src,r=t?.split("/")?.pop(),o=e.querySelector("source")?.getAttribute("content-type")||"video/*";return{node:new Ut({src:t,fileName:r,contentType:o})}},priority:1})}}static get TAG_NAME(){return zn.global.get("attachmentTagName")}constructor({tagName:e,sgid:t,src:r,previewable:o,altText:s,caption:i,contentType:a,fileName:l,fileSize:c,width:u,height:d},h){super(h),this.tagName=e||Ut.TAG_NAME,this.sgid=t,this.src=r,this.previewable=o,this.altText=s||"",this.caption=i||"",this.contentType=a||"",this.fileName=l||"",this.fileSize=c,this.width=u,this.height=d,this.editor=Fr()}createDOM(){let e=this.createAttachmentFigure();return this.isPreviewableAttachment?(e.appendChild(this.#e()),e.appendChild(this.#s())):(e.appendChild(this.#n()),e.appendChild(this.#r())),e}updateDOM(e,t){let r=t.querySelector("figcaption textarea");return r&&this.caption&&(r.value=this.caption),!1}getTextContent(){return`[${this.caption||this.fileName}] + +`}isInline(){return this.isAttached()&&!this.getParent().is(o1(this))}exportDOM(){return{element:se(this.tagName,{sgid:this.sgid,previewable:this.previewable||null,url:this.src,alt:this.altText,caption:this.caption,"content-type":this.contentType,filename:this.fileName,filesize:this.fileSize,width:this.width,height:this.height,presentation:"gallery"})}}exportJSON(){return{type:"action_text_attachment",version:1,tagName:this.tagName,sgid:this.sgid,src:this.src,previewable:this.previewable,altText:this.altText,caption:this.caption,contentType:this.contentType,fileName:this.fileName,fileSize:this.fileSize,width:this.width,height:this.height}}decorate(){return null}createAttachmentFigure(){let e=cT(this.contentType,this.isPreviewableAttachment,this.fileName),t=se("lexxy-node-delete-button");return e.appendChild(t),e}get isPreviewableAttachment(){return this.isPreviewableImage||this.previewable}get isPreviewableImage(){return vm(this.contentType)}#e(e={}){let t=se("img",{src:this.src,draggable:!1,alt:this.altText,...this.#t,...e}),r=se("div",{className:"attachment__container"});return r.appendChild(t),r}get#t(){return this.width&&this.height?{width:this.width,height:this.height}:{}}#n(){let e=this.fileName?this.fileName.split(".").pop().toLowerCase():"unknown";return se("span",{className:"attachment__icon",textContent:`${e}`})}#r(){let e=se("figcaption",{className:"attachment__caption"}),t=se("strong",{className:"attachment__name",textContent:this.caption||this.fileName});if(e.appendChild(t),this.fileSize){let r=se("span",{className:"attachment__size",textContent:eE(this.fileSize)});e.appendChild(r)}return e}#s(){let e=se("figcaption",{className:"attachment__caption"}),t=se("textarea",{value:this.caption,placeholder:this.fileName,rows:"1"});return t.addEventListener("focusin",()=>t.placeholder="Add caption..."),t.addEventListener("blur",r=>this.#i(r)),t.addEventListener("keydown",r=>this.#a(r)),e.appendChild(t),e}#i(e){this.#o(e.target)}#o(e){e.placeholder=this.fileName,this.editor.update(()=>{this.getWritable().caption=e.value})}#a(e){e.key==="Enter"&&(e.preventDefault(),e.stopPropagation(),e.target.blur(),this.editor.update(()=>{this.selectNext(0,0)},{tag:gs}))}};function tF(...n){return new Ut(...n)}function Ad(n){return n instanceof Ut}var x_=class{constructor(e){this.editorElement=e,this.editorContentElement=e.editorContentElement,this.editor=this.editorElement.editor,this.previouslySelectedKeys=new Set,this.#n(),this.#t(),this.#r()}set current(e){this.editor.update(()=>{this.#s()})}get hasNodeSelection(){return this.editor.getEditorState().read(()=>{let e=w();return e!==null&&Ke(e)})}get cursorPosition(){let e={x:0,y:0};return this.editor.getEditorState().read(()=>{let t=this.#T();if(!t)return;let r=this.#N(t);!r||(e=this.#O(r,t))}),e}placeCursorAtTheEnd(){this.editor.update(()=>{let e=Be(),t=e.getLastDescendant();t&&B(t)?t.selectEnd():e.selectEnd()})}selectedNodeWithOffset(){let e=w();if(!e)return{node:null,offset:0};if(v(e))return{node:e.anchor.getNode(),offset:e.anchor.offset};if(Ke(e)){let[t]=e.getNodes();return{node:t,offset:0}}return{node:null,offset:0}}preservingSelection(e){let t=null;this.editor.getEditorState().read(()=>{let r=w();r&&v(r)&&(t={anchor:{key:r.anchor.key,offset:r.anchor.offset},focus:{key:r.focus.key,offset:r.focus.offset}})}),e(),t&&this.editor.update(()=>{let r=w();r&&v(r)&&(r.anchor.set(t.anchor.key,t.anchor.offset,"text"),r.focus.set(t.focus.key,t.focus.offset,"text"))})}getFormat(){let e=w();if(!v(e))return{};let t=e.anchor.getNode();if(!t.getParent())return{};let r=t.getTopLevelElementOrThrow(),o=__(t);return{isBold:e.hasFormat("bold"),isItalic:e.hasFormat("italic"),isStrikethrough:e.hasFormat("strikethrough"),isHighlight:pM(e),isInLink:nr(t,nl)!==null,isInQuote:$n(r),isInHeading:al(r),isInCode:e.hasFormat("code")||nr(t,Uo)!==null,isInList:o!==null,listType:o,isInTable:xl(t)!==null}}nearestNodeOfType(e){let t=w()?.anchor?.getNode();return nr(t,e)}get hasSelectedWordsInSingleLine(){let e=w();if(!v(e)||e.isCollapsed())return!1;let t=e.anchor.getNode(),r=e.focus.getNode();if(t.getTopLevelElement()!==r.getTopLevelElement()||!t.getTopLevelElement())return!1;let s=e.getNodes();for(let i of s)if(be(i))return!1;return!0}get isInsideList(){return this.nearestNodeOfType(Po)}get isIndentedList(){let e=this.nearestNodeOfType(Fo);return e&&aS(e)>1}get isInsideCodeBlock(){return this.nearestNodeOfType(Uo)!==null}get isTableCellSelected(){return this.nearestNodeOfType(Ki)!==null}get isOnPreviewableImage(){let t=w()?.getNodes().at(0);return Ad(t)&&t.isPreviewableImage}get nodeAfterCursor(){let{anchorNode:e,offset:t}=this.#b();return e?B(e)?this.#L(e,t):F(e)?this.#I(e,t):this.#R(e):null}get topLevelNodeAfterCursor(){let{anchorNode:e,offset:t}=this.#b();return e?B(e)?this.#D(e):F(e)?this.#I(e,t):this.#R(e):null}get nodeBeforeCursor(){let{anchorNode:e,offset:t}=this.#b();return e?B(e)?this.#F(e,t):F(e)?this.#P(e,t):this.#M(e):null}get topLevelNodeBeforeCursor(){let{anchorNode:e,offset:t}=this.#b();return e?B(e)?this.#$(e):F(e)?this.#P(e,t):this.#M(e):null}get#e(){if(this.currentlySelectedKeys)return this.currentlySelectedKeys;this.currentlySelectedKeys=new Set;let e=w();if(e&&Ke(e))for(let t of e.getNodes())this.currentlySelectedKeys.add(t.getKey());return this.currentlySelectedKeys}#t(){this.editor.registerCommand(Qn,this.#a.bind(this),de),this.editor.registerCommand(wo,this.#u.bind(this),de),this.editor.registerCommand(Pt,this.#l.bind(this),de),this.editor.registerCommand(dn,this.#c.bind(this),de),this.editor.registerCommand(un,this.#y.bind(this),de),this.editor.registerCommand(er,()=>{this.current=w()},de)}#n(){this.editor.registerCommand(No,({target:e})=>{if(!jt(e))return!1;let t=We(e);return Et(t)&&this.#C(t)},de),this.editor.getRootElement().addEventListener("lexxy:internal:move-to-next-line",e=>{this.#m()})}#r(){this.editorContentElement.addEventListener("keydown",e=>{if(e.key==="ArrowUp"){let t=this.editor.getRootElement().querySelector("[data-lexical-cursor]");if(t){let r=t.previousElementSibling;for(;r&&r.hasAttribute("data-lexical-cursor");)r=r.previousElementSibling;r||e.preventDefault()}}if(e.key==="ArrowDown"){let t=this.editor.getRootElement().querySelector("[data-lexical-cursor]");if(t){let r=t.nextElementSibling;for(;r&&r.hasAttribute("data-lexical-cursor");)r=r.nextElementSibling;r||e.preventDefault()}}},!0)}#s(){this.#i(),this.#o(),this.previouslySelectedKeys=this.#e,this.currentlySelectedKeys=null}#i(){for(let e of this.previouslySelectedKeys)if(!this.#e.has(e)){let t=this.editor.getElementByKey(e);t&&t.classList.remove("node--selected")}}#o(){for(let e of this.#e)if(!this.previouslySelectedKeys.has(e)){let t=this.editor.getElementByKey(e);t&&t.classList.add("node--selected")}}async#a(){return this.hasNodeSelection?await this.#d(e=>e.selectPrevious()):this.#C(this.nodeBeforeCursor)}async#u(){return this.hasNodeSelection?await this.#d(e=>e.selectNext(0,0)):this.#C(this.nodeAfterCursor)}async#l(){return this.hasNodeSelection?await this.#d(e=>e.getTopLevelElement().selectPrevious()):this.#C(this.topLevelNodeBeforeCursor)}async#c(){return this.hasNodeSelection?await this.#d(e=>e.getTopLevelElement().selectNext(0,0)):this.#C(this.topLevelNodeAfterCursor)}async#d(e){await Us(),this.hasNodeSelection&&this.editor.update(()=>{e(w().getNodes()[0]),this.editor.focus()})}async#m(){this.editor.update(()=>{let e=this.#p();!e||this.#g(e)})}#p(){let e=w();return e?Ke(e)?this.#_(e):v(e)?this.#h(e):null:null}#_(e){let t=e.getNodes();return t.length>0?t[0].getTopLevelElement():null}#h(e){return e.anchor.getNode().getTopLevelElement()}#g(e){let t=e.getNextSibling();t?t.selectStart():this.#f()}#f(){let e=Be(),t=U();e.append(t),t.selectStart()}#C(e){if(Et(e)){let t=hM(e);return De(t),t}else return!1}#y(e){let t=e?this.nodeBeforeCursor:this.nodeAfterCursor;if(!Et(t))return!1;this.#x();let r=this.#C(t);return Boolean(r)}#x(e=w()?.anchor){let t=e?.getNode();F(t)&&t?.isEmpty()&&t.remove()}#T(){let e=w();if(!e||!e.isCollapsed())return null;let t=window.getSelection();return!t||t.rangeCount===0?null:t.getRangeAt(0)}#N(e){let t=e.getBoundingClientRect();if(this.#E(t)){let r=this.#A(e);t=r.getBoundingClientRect(),this.#w(r),r.remove()}return t}#E(e){return e.width===0&&e.height===0||e.top===0&&e.left===0}#A(e){let t=this.#S();return e.insertNode(t),t}#S(){let e=document.createElement("span");return e.textContent="\u200B",e.style.display="inline-block",e.style.width="1px",e.style.height="1em",e.style.lineHeight="normal",e.setAttribute("nonce",fg()),e}#w(e){let t=window.getSelection();t.removeAllRanges();let r=document.createRange();r.setStartAfter(e),r.collapse(!0),t.addRange(r)}#O(e,t){let r=this.editor.getRootElement().getBoundingClientRect(),o=e.left-r.left,s=e.top-r.top,i=this.#k(t);return isNaN(i)||(s+=i),{x:o,y:s,fontSize:i}}#k(e){let r=window.getSelection().anchorNode,o=this.#v(r);if(o instanceof HTMLElement){let s=window.getComputedStyle(o);return parseFloat(s.fontSize)}return 0}#v(e){return e?.nodeType===Node.TEXT_NODE?e.parentElement:e}#b(){let e=w();if(!v(e)||!e.isCollapsed())return{anchorNode:null,offset:0};let{anchor:t}=e;return{anchorNode:t.getNode(),offset:t.offset}}#L(e,t){return t===e.getTextContentSize()?this.#D(e):null}#D(e){if(e.getNextSibling()instanceof Eo)return e.getNextSibling();let t=e.getParent();return t?t.getNextSibling():null}#I(e,t){return t0?e.getChildAtIndex(t-1):this.#M(e)}#R(e){let t=e;for(;t&&t.getNextSibling()==null;)t=t.getParent();return t?t.getNextSibling():null}#M(e){let t=e;for(;t&&t.getPreviousSibling()==null;)t=t.getParent();return t?t.getPreviousSibling():null}};function vM(n){return fc.sanitize(n,dM())}function OM(n){return n.replace(/([A-Z])/g,(e,t)=>`-${t.toLowerCase()}`)}function _N(n){try{return new URL(n),!0}catch{return!1}}function CN(n){return n.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"")}function kM(n,e){return CN(n).includes(CN(e))}function xN(n){return n.charAt(0).toUpperCase()+n.slice(1)}var y_=class{#e;#t;constructor(e){this.#e=e,this.#t=new Dl(zn.presets.get("default"),zn.presets.get(e.preset),this.#n)}get(e){return this.#t.get(e)}get#n(){let e={};for(let t of this.#r){let r=OM(t);this.#e.hasAttribute(r)&&(e[t]=this.#s(r))}return e}get#r(){return Object.keys(zn.presets.get("default"))}#s(e){let t=this.#e.getAttribute(e);try{return JSON.parse(t)}catch{return t}}},mr=class extends Eo{static getType(){return"custom_action_text_attachment"}static clone(e){return new mr({...e},e.__key)}static importJSON(e){return new mr({...e})}static importDOM(){return{[this.TAG_NAME]:e=>e.getAttribute("content")?{conversion:t=>{let r=[],o=t.previousSibling;return o&&o.nodeType===Node.TEXT_NODE&&/\s$/.test(o.textContent)&&r.push(ye(" ")),r.push(new mr({sgid:t.getAttribute("sgid"),innerHtml:JSON.parse(t.getAttribute("content")),contentType:t.getAttribute("content-type")})),r.push(ye(" ")),{node:r}},priority:2}:null}}static get TAG_NAME(){return zn.global.get("attachmentTagName")}constructor({tagName:e,sgid:t,contentType:r,innerHtml:o},s){super(s);let i=zn.global.get("attachmentContentTypeNamespace");this.tagName=e||mr.TAG_NAME,this.sgid=t,this.contentType=r||`application/vnd.${i}.unknown`,this.innerHtml=o}createDOM(){let e=se(this.tagName,{"content-type":this.contentType,"data-lexxy-decorator":!0});e.insertAdjacentHTML("beforeend",this.innerHtml);let t=se("lexxy-node-delete-button");return e.appendChild(t),e}updateDOM(){return!1}getTextContent(){return this.createDOM().textContent.trim()||`[${this.contentType}]`}isInline(){return!0}exportDOM(){return{element:se(this.tagName,{sgid:this.sgid,content:JSON.stringify(this.innerHtml),"content-type":this.contentType})}}exportJSON(){return{type:"custom_action_text_attachment",version:1,tagName:this.tagName,sgid:this.sgid,contentType:this.contentType,innerHtml:this.innerHtml}}decorate(){return null}},b_=class{constructor(e){this.editorElement=e,this.editor=e.editor}monitor(){this.editor.registerCommand(Ur,e=>this.#e(e),Je)}#e(e){let t=w();if(!v(t))return!1;let r=t.anchor.getNode();return this.#r(r)?this.#t(e,r)||this.#n(e,r):!1}#t(e,t){return this.#s(t)||this.#i(t)?(e.preventDefault(),this.#u(t),!0):!1}#n(e,t){return this.#l(t)?(e.preventDefault(),this.#d(t),!0):!1}#r(e){let t=e;for(;t;){if($n(t))return!0;t=t.getParent()}return!1}#s(e){let t=this.#a(e);return t?this.#o(t):!1}#i(e){let t=this.#c(e);if(!t||!this.#o(t))return!1;let r=t.getParent();return r&&$o(r)}#o(e){if(e.getTextContent().trim()!=="")return!1;let t=e.getChildren();return t.length===0?!0:t.every(r=>be(r)?!0:this.#o(r))}#a(e){let t=e;for(;t;){if($o(t))return t;t=t.getParent()}return null}#u(e){let t=this.#a(e);if(!t)return;let r=t.getParent();if(!r||!zt(r))return;let o=r.getParent();if(o&&$n(o)){let l=this.#p(t).filter(c=>!this.#o(c));if(l.length>0){this.#_(o,r,t,l);return}}let i=U();r.insertAfter(i),t.remove(),i.selectStart()}#l(e){let t=this.#c(e);if(!t||!this.#o(t))return!1;let r=t.getParent();return r&&$n(r)}#c(e){let t=e;for(;t;){if(rt(t))return t;t=t.getParent()}return null}#d(e){let t=this.#c(e);if(!t)return;let r=t.getParent();if(!r||!$n(r))return;let s=this.#m(t).filter(i=>!this.#o(i));if(s.length>0)this.#f(r,t,s);else{let i=U();r.insertAfter(i),t.remove(),i.selectStart()}}#m(e){let t=[],r=e.getNextSibling();for(;r;)t.push(r),r=r.getNextSibling();return t}#p(e){let t=[],r=e.getNextSibling();for(;r;)$o(r)&&t.push(r),r=r.getNextSibling();return t}#_(e,t,r,o){let i=this.#m(t).filter(u=>!this.#o(u)),a=U();e.insertAfter(a);let l=Ru(t.getListType()),c=Ii();a.insertAfter(c),c.append(l),o.forEach(u=>{l.append(u)}),i.forEach(u=>{c.append(u)}),r.remove(),this.#h(t),this.#g(c),t.getChildrenSize()===0?(t.remove(),e.getChildrenSize()===0&&e.remove()):this.#g(e),a.selectStart()}#h(e){let t=e.getChildren();for(let r=t.length-1;r>=0;r--){let o=t[r];if($o(o)&&this.#o(o))o.remove();else break}}#g(e){let t=e.getChildren();for(let r=t.length-1;r>=0;r--){let o=t[r];if(this.#o(o))o.remove();else break}}#f(e,t,r){let o=U();e.insertAfter(o);let s=Ii();o.insertAfter(s),r.forEach(i=>{s.append(i)}),t.remove(),this.#g(e),this.#g(s),o.selectStart()}};async function LM(n,e){return new Promise(t=>{let r=new FileReader;e.addEventListener("load",()=>{t(e)}),r.onload=o=>{e.src=o.target.result||null},r.readAsDataURL(n)})}var Ws=class extends Ut{static getType(){return"action_text_attachment_upload"}static clone(e){return new Ws({...e},e.__key)}static importJSON(e){return new Ws({...e})}static importDOM(){return null}constructor(e,t){let{file:r,uploadUrl:o,blobUrlTemplate:s,progress:i,width:a,height:l,uploadError:c}=e;super({...e,contentType:r.type},t),this.file=r,this.uploadUrl=o,this.blobUrlTemplate=s,this.progress=i??null,this.width=a,this.height=l,this.uploadError=c}createDOM(){if(this.uploadError)return this.#t();this.#l();let e=this.createAttachmentFigure();if(this.isPreviewableAttachment){let t=e.appendChild(this.#n());LM(this.file,t).then(r=>this.#a(r))}else e.appendChild(this.#r());return e.appendChild(this.#i()),e.appendChild(this.#o()),e}updateDOM(e,t){if(this.uploadError!==e.uploadError)return!0;if(e.progress!==this.progress){let r=t.querySelector("progress");r.value=this.progress??0}return!1}exportDOM(){return{element:null}}exportJSON(){return{...super.exportJSON(),type:"action_text_attachment_upload",version:1,uploadUrl:this.uploadUrl,blobUrlTemplate:this.blobUrlTemplate,progress:this.progress,width:this.width,height:this.height,uploadError:this.uploadError}}get#e(){return this.progress!==null}#t(){let e=this.createAttachmentFigure();return e.classList.add("attachment--error"),e.appendChild(se("div",{innerText:`Error uploading ${this.file?.name??"file"}`})),e}#n(){return se("img")}#r(){let e=this.#s();return se("span",{className:"attachment__icon",textContent:e})}#s(){return this.file.name.split(".").pop().toLowerCase()}#i(){let e=se("figcaption",{className:"attachment__caption"}),t=se("span",{className:"attachment__name",textContent:this.file.name||""}),r=se("span",{className:"attachment__size",textContent:eE(this.file.size)});return e.appendChild(t),e.appendChild(r),e}#o(){return se("progress",{value:this.progress??0,max:100})}#a({width:e,height:t}){this.#u||this.editor.update(()=>{let r=this.getWritable();r.width=e,r.height=t},{tag:md})}get#u(){return Boolean(this.width&&this.height)}async#l(){if(this.#e)return;this.#d();let{DirectUpload:e}=await import("@rails/activestorage"),t=new e(this.file,this.uploadUrl,this);t.delegate=this.#c(),this.#f("lexxy:upload-start",{file:this.file}),t.create((r,o)=>{r?(this.#f("lexxy:upload-end",{file:this.file,error:r}),this.#_(r)):(this.#f("lexxy:upload-end",{file:this.file,error:null}),this.#h(o))})}#c(){let e=zn.global.get("authenticatedUploads");return{directUploadWillCreateBlobWithXHR:t=>{e&&(t.withCredentials=!0)},directUploadWillStoreFileWithXHR:t=>{e&&(t.withCredentials=!0);let r=o=>this.#m(o);t.upload.addEventListener("progress",r)}}}#d(){this.#p(1)}#m(e){let t=Math.round(e.loaded/e.total*100);this.#p(t),this.#f("lexxy:upload-progress",{file:this.file,progress:t})}#p(e){this.editor.update(()=>{this.getWritable().progress=e},{tag:md})}#_(e){console.warn(`Upload error for ${this.file?.name??"file"}: ${e}`),this.editor.update(()=>{this.getWritable().uploadError=!0},{tag:md})}#h(e){this.editor.update(()=>{this.replace(this.#g(e))},{tag:md})}#g(e){return new S_(this,e).toAttachmentNode()}#f(e,t){let r=this.editor.getElementByKey(this.getKey());r&&jr(r,e,t)}},S_=class{constructor(e,t){this.uploadNode=e,this.blob=t}toAttachmentNode(){return new Ut({...this.uploadNode,...this.#e,src:this.#t})}get#e(){let{blob:e}=this;return{sgid:e.attachable_sgid,altText:e.filename,contentType:e.content_type,fileName:e.filename,fileSize:e.byte_size,previewable:e.previewable}}get#t(){return this.blob.previewable?this.blob.url:this.#n}get#n(){return this.uploadNode.blobUrlTemplate.replace(":signed_id",this.blob.signed_id).replace(":filename",encodeURIComponent(this.blob.filename))}};function RM(...n){return new Ws(...n)}var eh,tE,th,nE,qi,yd,Ml=class extends Ye{constructor(){super(...arguments);k(this,th);k(this,qi)}$config(){return this.config("image_gallery",{extends:Ye})}static transform(){return t=>{t.unwrapEmptyNode()||t.replaceWithSingularChild()||t.splitAroundInvalidChild()}}static importDOM(){return{div:t=>t.querySelector(`:scope > :is(${R(this,eh,tE).join()})`)?{conversion:()=>({node:wd(),after:o=>wi(o,this.isValidChild)}),priority:2}:null}}static canCollapseWith(t){return Z_(t)||this.isValidChild(t)}static isValidChild(t){return Ad(t)&&t.isPreviewableImage}createDOM(){let t=document.createElement("div");return t.className=R(this,qi,yd),t}updateDOM(t,r){return r.className=R(this,qi,yd),!1}canBeEmpty(){return!0}collapseAtStart(t){return!0}insertNewAfter(t,r){if(t.anchor.getNode().is(this)&&t.anchor.offset==this.getChildrenSize()-1){let i=U();return this.insertAfter(i,!1),i.insertAfter(this.getLastChild(),!1),i.selectEnd(),null}let s=wd();return this.insertAfter(s,r),s}getImageAttachments(){return this.getChildren().filter(Ad)}exportDOM(){let t=document.createElement("div");return t.className=R(this,qi,yd),{element:t}}collapseWith(t,r){return Ml.canCollapseWith(t)?(r?Za(this,t):this.append(t),Ja(this,Ml.isValidChild),!0):!1}unwrapEmptyNode(){if(this.isEmpty()){let t=U();return this.replace(t)}}replaceWithSingularChild(){if(R(this,th,nE)){let t=this.getFirstChild();return this.replace(t)}}splitAroundInvalidChild(){for(let t of Np(this)){if(Ml.isValidChild(t))continue;let r=gM(t),[o,s]=this.splitAtIndex(r.getIndexWithinParent());o.insertAfter(r),r.selectEnd(),s.isEmpty()&&s.remove();break}}splitAtIndex(t){return tu(this,t)}},Kn=Ml;eh=new WeakSet,tE=function(){return Object.keys(Ut.importDOM())},th=new WeakSet,nE=function(){return this.getChildrenSize()===1},qi=new WeakSet,yd=function(){return`attachment-gallery attachment-gallery--${this.getChildrenSize()}`},k(Kn,eh);function wd(){return new Kn}function Z_(n){return n instanceof Kn}function rE(n){return Kn.canCollapseWith(n)?nr(n,Kn)??Su(n,wd):null}var Gs=class{#e;static for(e,t){let r=Gi.handle(e,t)?Gi:Gs;return new r(e,t)}constructor(e,t){this.#e=t,this.editorElement=e,this.contents=e.contents,this.selection=e.selection}get files(){return Array.from(this.#e)}$uploadFiles(){this.$createUploadNodes(),this.$insertUploadNodes()}$createUploadNodes(){this.nodes=this.files.map(e=>RM({...this.#t,file:e,contentType:e.type}))}$insertUploadNodes(){this.nodes.forEach(this.contents.insertAtCursor)}get#t(){return{uploadUrl:this.editorElement.directUploadUrl,blobUrlTemplate:this.editorElement.blobUrlTemplate}}},gr,nh,oE,rh,sE,oh,iE,Wl,T_,sh,aE,ih,lE,ah,cE,lh,uE,ch,dE,Gi=class extends Gs{constructor(){super(...arguments);k(this,oh);k(this,Wl);k(this,sh);k(this,ih);k(this,ah);k(this,lh);k(this,ch);k(this,gr,void 0)}static handle(t,r){return L(this,nh,oE).call(this,r)||L(this,rh,sE).call(this,t.selection)}$insertUploadNodes(){L(this,oh,iE).call(this),L(this,lh,uE).call(this),L(this,ch,dE).call(this)}};gr=new WeakMap,nh=new WeakSet,oE=function(t){let r=0;for(let o of t)if(vm(o.type)&&r++,r>1)return!0;return!1},rh=new WeakSet,sE=function(t){if(t.isOnPreviewableImage)return!0;let{node:r}=t.selectedNodeWithOffset();return nr(r,Kn)!==null},oh=new WeakSet,iE=function(){this.selection.isOnPreviewableImage?ra(this,gr,rE(R(this,Wl,T_))):(ra(this,gr,wd()),this.contents.insertAtCursor(R(this,gr)))},Wl=new WeakSet,T_=function(){let{node:t}=this.selection.selectedNodeWithOffset();return t},sh=new WeakSet,aE=function(){let t=w()?.anchor;if(t?.getNode().is(R(this,gr)))return t.offset;let o=R(this,Wl,T_),s=R(this,gr).isParentOf(o)&&o.getIndexWithinParent();return s!==!1?s+1:0},ih=new WeakSet,lE=function(){return this.nodes.filter(t=>Kn.isValidChild(t))},ah=new WeakSet,cE=function(){return this.nodes.filter(t=>!Kn.isValidChild(t))},lh=new WeakSet,uE=function(){R(this,gr).splice(R(this,sh,aE),0,R(this,ih,lE))},ch=new WeakSet,dE=function(){let t=R(this,gr);for(let r of R(this,ah,cE))t.insertAfter(r),t=r},k(Gi,nh),k(Gi,rh);var N_=class{constructor(e){this.editorElement=e,this.editor=e.editor,new b_(e).monitor()}insertHtml(e,{tag:t}={}){this.insertDOM(Os(e),{tag:t})}insertDOM(e,{tag:t}={}){this.editor.update(()=>{let r=w();if(!v(r))return;let o=bs(this.editor,e);this.#e(o)||r.insertNodes(o)},{tag:t})}insertAtCursor(e){let t=w()??Be().selectEnd(),r=t?.getNodes();v(t)?t.insertNodes([e]):Ke(t)&&r.length>0&&r.at(-1).insertAfter(e)}insertAtCursorEnsuringLineBelow(e){this.insertAtCursor(e),this.#t(e)}insertNodeWrappingEachSelectedLine(e){this.editor.update(()=>{let t=w();if(!v(t))return;t.extract().forEach(o=>{if(!o.getParent())return;let i=o.getTopLevelElementOrThrow(),a=e();a.append(...i.getChildren()),i.replace(a)})})}toggleNodeWrappingAllSelectedLines(e,t){this.editor.update(()=>{let r=w();if(!v(r))return;let o=r.anchor.getNode().getTopLevelElementOrThrow();e(o)?this.removeFormattingFromSelectedLines():this.#a(t)})}toggleNodeWrappingAllSelectedNodes(e,t){this.editor.update(()=>{let r=w();if(!v(r))return;let o=r.anchor.getNode().getTopLevelElement();o&&e(o)?this.#n(o):this.#r(t)})}removeFormattingFromSelectedLines(){this.editor.update(()=>{let e=w();if(!v(e))return;let t=e.anchor.getNode().getTopLevelElementOrThrow(),r=U();r.append(...t.getChildren()),t.replace(r)})}hasSelectedText(){let e=!1;return this.editor.read(()=>{let t=w();e=v(t)&&!t.isCollapsed()}),e}unwrapSelectedListItems(){this.editor.update(()=>{let e=w();if(!v(e))return;let{listItems:t,parentLists:r}=this.#g(e);if(t.size>0){let o=this.#f(t);this.#T(r),this.#N(o)}})}createLink(e){let t=null;return this.editor.update(()=>{let r=ye(e),o=Pu(e);o.append(r);let s=w();v(s)&&(s.insertNodes([o]),t=o.getKey())}),t}createLinkWithSelectedText(e){!this.hasSelectedText()||this.editor.update(()=>{Li(null),Li(e)})}textBackUntil(e){let t="";return this.editor.getEditorState().read(()=>{let r=w();if(!r||!r.isCollapsed())return;let o=r.anchor,s=o.getNode();if(!B(s))return;let i=s.getTextContent(),a=o.offset,l=i.slice(0,a),c=l.lastIndexOf(e);c!==-1&&(t=l.slice(c+e.length))}),t}containsTextBackUntil(e){let t=!1;return this.editor.getEditorState().read(()=>{let r=w();if(!r||!r.isCollapsed())return;let o=r.anchor,s=o.getNode();if(!B(s))return;let i=s.getTextContent(),a=o.offset;t=i.slice(0,a).includes(e)}),t}replaceTextBackUntil(e,t){t=Array.isArray(t)?t:[t],this.editor.update(()=>{let{anchorNode:r,offset:o}=this.#A();if(!r)return;let s=this.#S(r,o,e);s!==-1&&this.#w(r,o,s,t)})}createParagraphAfterNode(e,t){let r=U();e.insertAfter(r),r.selectStart(),t&&(r.append(ye(t)),r.select(1,1))}createParagraphBeforeNode(e,t){let r=U();e.insertBefore(r),r.selectStart(),t&&(r.append(ye(t)),r.select(1,1))}uploadFiles(e,{selectLast:t}={}){if(!this.editorElement.supportsAttachments){console.warn("This editor does not supports attachments (it's configured with [attachments=false])");return}let r=Array.from(e).filter(this.#L.bind(this));this.editor.update(()=>{let o=Gs.for(this.editorElement,r);o.$uploadFiles(),t&&o.nodes?.length&&o.nodes.at(-1).selectEnd()})}replaceNodeWithHTML(e,t,r={}){this.editor.update(()=>{let o=Fe(e);if(!o)return;let s=w(),i=!1;if(v(s)){let l=s.getNodes();i=l.includes(o)||l.some(c=>c.getParent()===o),i&&De(null)}let a=r.attachment?this.#v(t,r.attachment):this.#b(t);o.replace(a),i&&a.selectEnd()})}insertHTMLBelowNode(e,t,r={}){this.editor.update(()=>{let o=Fe(e);if(!o)return;let s=o.getTopLevelElement()||o,i=r.attachment?this.#v(t,r.attachment):this.#b(t);s.insertAfter(i)})}#e(e){if(e.every(Ad)){let t=Gs.for(this.editorElement,[]);return t.nodes=e,t.$insertUploadNodes(),!0}}#t(e){this.editor.update(()=>{if(!e.getNextSibling()){let r=U();e.insertAfter(r),r.selectStart()}})}#n(e){let t=e.getChildren();t.length==0?e.insertBefore(U()):t.forEach(r=>{if(B(r)&&r.getTextContent().trim()!==""){let o=U();o.append(r),e.insertBefore(o)}else be(r)||e.insertBefore(r)}),e.remove()}#r(e){this.editor.update(()=>{let t=w();if(!v(t))return;let r=t.extract();if(r.length===0)return;let o=new Set;r.forEach(a=>{let l=a.getTopLevelElementOrThrow();o.add(l)});let s=this.#s(Array.from(o));if(s.length===0){this.#o(),this.insertAtCursor(e());return}let i=e();s[0].insertBefore(i),s.forEach(a=>{i.append(a)})})}#s(e){let t=e.length-1;for(;t>=0;){let r=e[t];if(!rt(r)||!this.#i(r))break;t--}return e.slice(0,t+1)}#i(e){if(e.getTextContent().trim()!=="")return!1;let t=e.getChildren();return t.length===0||t.every(r=>be(r))}#o(){let e=Be();if(e.getChildrenSize()===1){let t=e.getFirstChild();t&&rt(t)&&this.#i(t)&&t.remove()}}#a(e){this.editor.update(()=>{let t=w();!v(t)||(t.isCollapsed()?this.#u(t,e):this.#l(t,e))})}#u(e,t){let o=e.anchor.getNode().getTopLevelElementOrThrow();if(o.getTextContent()){let s=t();s.append(...o.getChildren()),o.replace(s)}else e.insertNodes([t()])}#l(e,t){let r=this.#c(e);if(r.length===0)return;let{lineSet:o,nodesToDelete:s}=this.#m(r);if(o.size===0)return;let i=this.#p(t,o);this.#_(e,i),this.#h(s)}#c(e){let r=e.extract().map(o=>this.#d(o)).filter(Boolean);return De(null),r}#d(e){return rt(e)?e:B(e)&&e.getParent()&&rt(e.getParent())?e.getParent():null}#m(e){let t=new Set,r=new Set;return e.forEach(o=>{let s=o.getTextContent();s&&s.split(` +`).forEach(i=>{i.trim()&&t.add(i)}),r.add(o)}),{lineSet:t,nodesToDelete:r}}#p(e,t){let r=e(),o=Array.from(t);return o.forEach((s,i)=>{r.append(ye(s)),it.remove())}#g(e){let t=e.getNodes(),r=new Set,o=new Set;for(let s of t){let i=nr(s,Po);if(i){r.add(i);let a=i.getParent();a&&zt(a)&&o.add(a)}}return{listItems:r,parentLists:o}}#f(e){let t=[];for(let r of e){let o=this.#C(r);o&&t.push(o)}return t}#C(e){let t=e.getParent();if(!t||!zt(t))return null;let r=U(),o=this.#y(e,r);return e.insertAfter(r),this.#x(r,o),e.remove(),r}#y(e,t){let r=[];return e.getChildren().forEach(o=>{zt(o)?r.push(o):t.append(o)}),r}#x(e,t){t.forEach(r=>{e.insertAfter(r)})}#T(e){for(let t of e)zt(t)&&t.getChildrenSize()===0&&t.remove()}#N(e){if(e.length===0)return;let t=e[0],r=e[e.length-1];e.length===1?t.selectEnd():this.#E(t,r)}#E(e,t){e.selectStart();let r=w();r&&v(r)&&(r.anchor.set(e.getKey(),0,"element"),r.focus.set(t.getKey(),t.getChildrenSize(),"element"))}#A(){let e=w();if(!e||!e.isCollapsed())return{anchorNode:null,offset:0};let t=e.anchor,r=t.getNode();return B(r)?{anchorNode:r,offset:t.offset}:{anchorNode:null,offset:0}}#S(e,t,r){return e.getTextContent().slice(0,t).lastIndexOf(r)}#w(e,t,r,o){let s=e.getTextContent(),i=s.slice(0,r),a=s.slice(t),l=ye(i),c=ye(a||" ");e.replace(l),this.#O(l,o).insertAfter(c),this.#k(c.getParentOrThrow());let d=a?0:1;c.select(d,d)}#O(e,t){let r=e;for(let o of t)r.insertAfter(o),r=o;return r}#k(e){if(rt(e)&&this.editorElement.supportsMultiLine){let t=e.getChildren(),r=t[t.length-1],o=t[t.length-2];B(r)&&r.getTextContent()===""&&o&&!B(o)&&e.append(pt())}}#v(e,t={}){let r=typeof t=="object"?t:{};return new mr({sgid:r.sgid||null,contentType:"text/html",innerHtml:e})}#b(e){return bs(this.editor,Os(e))[0]||U()}#L(e){return jr(this.editorElement,"lexxy:file-accept",{file:e},!0)}},E_=class{constructor(e){this.editorElement=e,this.editor=e.editor,this.contents=e.contents}paste(e){let t=e.clipboardData;return!t||this.#r()?!1:this.#e(t)?(this.#s(t),e.preventDefault(),!0):this.#u(t)}#e(e){return this.#t(e)||this.#n(e)}#t(e){let t=Array.from(e.types);return t.length===1&&t[0]==="text/plain"}#n(e){let t=Array.from(e.types);return t.length===2&&t.includes("text/uri-list")&&t.includes("text/plain")}#r(){let e=!1;return this.editor.getEditorState().read(()=>{let t=w();if(!v(t))return;let r=t.anchor.getNode();for(;r;){if(Ko(r)){e=!0;return}r=r.getParent()}}),e}#s(e){e.items[0].getAsString(r=>{if(_N(r)&&this.contents.hasSelectedText())this.contents.createLinkWithSelectedText(r);else if(_N(r)){let o=this.contents.createLink(r);this.#i(o,{url:r})}else this.editorElement.supportsMarkdown?this.#o(r):this.#a(e)})}#i(e,t){let r={replaceLinkWith:(o,s)=>this.contents.replaceNodeWithHTML(e,o,s),insertBelowLink:(o,s)=>this.contents.insertHTMLBelowNode(e,o,s)};jr(this.editorElement,"lexxy:insert-link",{...t,...r})}#o(e){let t=we(e),r=Os(t),o=Object.freeze({markdown:e,document:r,addBlockSpacing:()=>uT(r)});jr(this.editorElement,"lexxy:insert-markdown",o),this.contents.insertDOM(r,{tag:Wr})}#a(e){this.editor.update(()=>{let t=w();rl(e,t,this.editor)},{tag:Wr})}#u(e){if(!this.editorElement.supportsAttachments)return!1;let t=e.getData("text/html");return t?(this.contents.insertHtml(t,{tag:Wr}),!0):(this.#l(()=>{let r=e.files;r.length&&this.contents.uploadFiles(r,{selectLast:!0})}),!0)}async#l(e){let t=window.scrollY,r=window.scrollX;e(),await Us(),window.scrollTo(r,t),this.editor.focus()}},A_=class{constructor(e){this.lexxyElement=e,this.enabledExtensions=this.#r()}get lexicalExtensions(){return this.enabledExtensions.map(e=>e.lexicalExtension).filter(Boolean)}initializeToolbars(){this.#e&&this.enabledExtensions.forEach(e=>e.initializeToolbar(this.#e))}get#e(){return this.lexxyElement.toolbar}get#t(){return this.lexxyElement.baseExtensions}get#n(){return zn.global.get("extensions")}#r(){return this.#t.concat(this.#n).map(t=>new t(this.lexxyElement)).filter(t=>t.enabled)}},_r=class extends Ga{$config(){return this.config("provisonal_paragraph",{extends:Ga,importDOM:()=>null,$transform:e=>{e.concretizeIfEdited(e),e.removeUnlessRequired(e)}})}static neededBetween(e,t){return!yN(e,"next")&&!yN(t,"previous")}createDOM(e){let t=super.createDOM(e),r=this.isSelected(w());return t.classList.add("provisional-paragraph"),t.classList.toggle("hidden",!r),t}updateDOM(e,t){let r=this.isSelected(w());return t.classList.toggle("hidden",!r),!1}getTextContent(){return""}exportDOM(){return{element:null}}isSelected(e=null){return(e||w())?.getNodes().some(r=>r.is(this)||this.isParentOf(r))}removeUnlessRequired(e=this.getLatest()){e.required||e.remove()}concretizeIfEdited(e=this.getLatest()){e.getTextContentSize()>0&&e.replace(U(),!0)}get required(){return this.isDirectRootChild&&_r.neededBetween(...this.immediateSiblings)}get isDirectRootChild(){let e=this.getParent();return Ze(e)}get immediateSiblings(){return[this.getPreviousSibling(),this.getNextSibling()]}};function MM(n){return n instanceof _r}function yN(n,e){return F(n)&&(e==="next"?n.canInsertTextBefore():n.canInsertTextAfter())}var w_=class extends Ks{get lexicalExtension(){return ue({name:"lexxy/provisional-paragraph",nodes:[_r],register(e){return Ee(e.registerNodeTransform(Va,DM),e.registerNodeTransform(Va,IM),e.registerCommand(er,$M,Je))}})}};function DM(n){let e=n.getFirstChild();_r.neededBetween(null,e)&&Za(n,new _r);for(let t of Np(n)){let r=t.getNextSibling();_r.neededBetween(t,r)&&t.insertAfter(new _r)}}function IM(n){for(let e of hE(n))e.removeUnlessRequired()}function $M(){for(let n of hE())n.markDirty()}function hE(n=Be()){return wi(n.getChildren(),MM)}var gE="language",v_=class extends Ks{get enabled(){return this.editorElement.supportsRichText}get lexicalExtension(){return ue({name:"lexxy/trix-content",html:{import:{em:e=>d_(e,{conversion:wl("i",vl),priority:1}),span:e=>d_(e,{conversion:wl("mark",vl),priority:1}),strong:e=>d_(e,{conversion:wl("b",vl),priority:1}),del:()=>({conversion:wl("s",PM,vl),priority:1}),pre:e=>FM(e,{conversion:jN(Uo,"pre",BM),priority:1})}}})}};function d_(n,e){return n.style.color!==""||n.style.backgroundColor!==""?e:null}function PM(n){return n.hasFormat("strikethrough")||n.toggleFormat("strikethrough"),n}function FM(n,e){return n.hasAttribute(gE)?e:null}function BM(n,e){let t=Cm(e.getAttribute(gE));n.node.setLanguage(t)}var Rl=class extends yl{$config(){return this.config("wrapped_table_node",{extends:yl})}static importDOM(){return super.importDOM()}exportDOM(e){let t=super.exportDOM(e);return{...t,after:r=>{if(t.after){r=t.after(r);let o=r.cloneNode(!0);return se("figure",{className:"lexxy-content__table-wrapper"},o.outerHTML)}return r}}}},O_=class extends Ks{get enabled(){return this.editorElement.supportsRichText}get lexicalExtension(){return ue({name:"lexxy/tables",nodes:[Rl,{replace:yl,with:()=>new Rl,withKlass:Rl},Ki,GT],register(e){return Ee(VT(e),YT(e,!0),jT(e,!0),e.registerNodeTransform(Ki,t=>{t.getBackgroundColor()===null&&t.setBackgroundColor("")}),e.registerNodeTransform(Ki,t=>{let r=t.getHeaderStyles();if(r!==dr.ROW)return;let o=t.getParent(),s=o?.getParent();if(!s)return;let i=s.getChildren(),a=o.getChildren().indexOf(t),c=o.getChildren().every(h=>h.getHeaderStyles()!==dr.NO_STATUS),u=i.every(h=>{let g=h.getChildren()[a];return g&&g.getHeaderStyles()!==dr.NO_STATUS}),d=dr.NO_STATUS;c&&(d|=dr.ROW),u&&(d|=dr.COLUMN),d!==r&&t.setHeaderStyles(d,dr.BOTH)}),e.registerCommand("insertTableRowAfter",()=>{Jm(!0)},cn),e.registerCommand("insertTableRowBefore",()=>{Jm(!1)},cn),e.registerCommand("insertTableColumnAfter",()=>{Zm(!0)},cn),e.registerCommand("insertTableColumnBefore",()=>{Zm(!1)},cn),e.registerCommand("deleteTableRow",()=>{HT()},cn),e.registerCommand("deleteTableColumn",()=>{BT()},cn),e.registerCommand("deleteTable",()=>{let t=w();if(!v(t))return!1;qm(t.anchor.getNode())?.remove()},cn))}})}},k_=class extends Ks{get enabled(){return this.editorElement.supportsAttachments}get lexicalExtension(){return ue({name:"lexxy/action-text-attachments",nodes:[Ut,Ws,Kn],register(e){return Ee(e.registerCommand(un,HM,cn))}})}};function HM(n){let e=w()?.anchor;return e?KM(e,n)?!0:n?zM(e)||UM(e):!1:!1}function zM(n){let e=n.getNode();if(!e)return!1;let t=rt(e)&&e.isEmpty(),r=e.getPreviousSibling(),o=rE(r),s=o?.getChildrenSize();return t&&o?.collapseWith(e.getNextSibling())?(o.select(s,s),e.remove(),!0):!1}function KM(n,e){let t=n.getNode();if(!Z_(t))return!1;let r=Nd(n,e),o=e?t.getPreviousSibling():t.getNextSibling();if(r&&t.collapseWith(o,e)){let s=e?1:t.getChildrenSize()-1;return t.select(s,s),!0}else return!1}function UM(n){let e=n.getNode().getPreviousSibling();return!Z_(n.getNode())||!Nd(n,!0)||!e||Et(e)?!1:(e.isEmpty()?e.remove():e.selectEnd(),!0)}var Gl,Yo,uh,fE,dh,pE,hh,mE,gh,_E,fh,CE,ph,xE,mh,yE,_h,bE,Ch,SE,zs,TE,L_,xh,NE,yh,EE,Vl,bh,AE,Sh,wE,Th,vE,Nh,OE,Eh,kE,Ah,LE,wh,RE,vh,ME,Oh,DE,kh,IE,Lh,$E,Yl,R_,Rh,PE,Mh,FE,Dh,BE,Ih,HE,$h,zE,jl,M_,Ph,KE,ql,D_,Zl,I_,Jl,$_,Fh,UE,Ps=class extends HTMLElement{constructor(){super();k(this,uh);k(this,dh);k(this,hh);k(this,gh);k(this,fh);k(this,ph);k(this,mh);k(this,_h);k(this,Ch);k(this,zs);k(this,xh);k(this,yh);k(this,bh);k(this,Sh);k(this,Th);k(this,Nh);k(this,Eh);k(this,Ah);k(this,wh);k(this,vh);k(this,Oh);k(this,kh);k(this,Lh);k(this,Yl);k(this,Rh);k(this,Mh);k(this,Dh);k(this,Ih);k(this,$h);k(this,jl);k(this,Ph);k(this,ql);k(this,Zl);k(this,Jl);k(this,Fh);k(this,Gl,"");k(this,Yo,document.createElement("textarea"));k(this,Vl,t=>{L(this,Jl,$_).call(this)});this.internals=this.attachInternals(),this.internals.role="presentation"}connectedCallback(){this.id??=td("lexxy-editor"),this.config=new y_(this),this.extensions=new A_(this),this.editor=L(this,fh,CE).call(this),this.contents=new N_(this),this.selection=new x_(this),this.clipboard=new E_(this),Il.configureFor(this),L(this,gh,_E).call(this),requestAnimationFrame(()=>jr(this,"lexxy:initialize")),this.toggleAttribute("connected",!0),L(this,Mh,FE).call(this),this.valueBeforeDisconnect=null}disconnectedCallback(){this.valueBeforeDisconnect=this.value,L(this,Jl,$_).call(this)}attributeChangedCallback(t,r,o){t==="connected"&&this.isConnected&&r!=null&&r!==o&&requestAnimationFrame(()=>L(this,Fh,UE).call(this)),t==="required"&&this.isConnected&&(R(this,Yo).required=this.hasAttribute("required"),L(this,Zl,I_).call(this))}formResetCallback(){this.value=R(this,Gl),this.editor.dispatchCommand(ru,void 0)}toString(){return this.cachedStringValue||this.editor?.getEditorState().read(()=>{this.cachedStringValue=Be().getTextContent()}),this.cachedStringValue}get form(){return this.internals.form}get name(){return this.getAttribute("name")}get toolbarElement(){return R(this,jl,M_)?(this.toolbar=this.toolbar||L(this,$h,zE).call(this),this.toolbar):null}get baseExtensions(){return[w_,C_,v_,O_,k_]}get directUploadUrl(){return this.dataset.directUploadUrl}get blobUrlTemplate(){return this.dataset.blobUrlTemplate}get isEmpty(){return["


    ","

    ",""].includes(this.value.trim())}get isBlank(){return this.isEmpty||this.toString().match(/^\s*$/g)!==null}get hasOpenPrompt(){return this.querySelector(".lexxy-prompt-menu.lexxy-prompt-menu--visible")!==null}get preset(){return this.getAttribute("preset")||"default"}get supportsAttachments(){return this.config.get("attachments")}get supportsMarkdown(){return this.supportsRichText&&this.config.get("markdown")}get supportsMultiLine(){return this.config.get("multiLine")&&!this.isSingleLineMode}get supportsRichText(){return this.config.get("richText")}get isSingleLineMode(){return this.hasAttribute("single-line")}get contentTabIndex(){return parseInt(this.editorContentElement?.getAttribute("tabindex")??"0")}focus(){this.editor.focus(()=>L(this,Rh,PE).call(this))}get value(){return this.cachedValue||this.editor?.getEditorState().read(()=>{this.cachedValue=vM(Bu(this.editor,null))}),this.cachedValue}set value(t){this.editor.update(()=>{Xy(ip);let r=Be();r.clear(),r.append(...L(this,uh,fE).call(this,t)),r.selectEnd(),L(this,ql,D_).call(this),requestAnimationFrame(()=>this.editor?.update(()=>{}))})}};Gl=new WeakMap,Yo=new WeakMap,uh=new WeakSet,fE=function(t){return t||(t="

    "),bs(this.editor,Os(`${t}`)).map(L(this,dh,pE)).map(L(this,hh,mE))},dh=new WeakSet,pE=function(t){if(!B(t))return t;let r=U();return r.append(t),r},hh=new WeakSet,mE=function(t){if(rt(t)&&t.getChildrenSize()===1){let r=t.getFirstChild();if(Et(r)&&!r.isInline())return r}return t},gh=new WeakSet,_E=function(){L(this,bh,AE).call(this),L(this,Eh,kE).call(this),L(this,vh,ME).call(this),L(this,Oh,DE).call(this),L(this,Dh,BE).call(this),L(this,Ih,HE).call(this),L(this,xh,NE).call(this),L(this,yh,EE).call(this)},fh=new WeakSet,CE=function(){this.editorContentElement||=L(this,mh,yE).call(this);let t=$b({name:"lexxy/core",namespace:"Lexxy",theme:$s,nodes:R(this,ph,xE)},...this.extensions.lexicalExtensions);return t.setRootElement(this.editorContentElement),t},ph=new WeakSet,xE=function(){let t=[mr];return this.supportsRichText&&t.push(Uu,Ku,Fo,Po,Uo,S0,nl,SS,Zo),t},mh=new WeakSet,yE=function(){let t=se("div",{classList:"lexxy-editor__content",contenteditable:!0,role:"textbox","aria-multiline":!0,"aria-label":R(this,_h,bE),placeholder:this.getAttribute("placeholder")});return t.id=`${this.id}-content`,R(this,Ch,SE).forEach(r=>t.setAttribute(r.name,r.value)),this.appendChild(t),this.getAttribute("tabindex")?(t.setAttribute("tabindex",this.getAttribute("tabindex")),this.removeAttribute("tabindex")):t.setAttribute("tabindex",0),t},_h=new WeakSet,bE=function(){return Array.from(this.internals.labels).map(t=>t.textContent).join(" ")},Ch=new WeakSet,SE=function(){return Array.from(this.attributes).filter(t=>t.name.startsWith("aria-"))},zs=new WeakSet,TE=function(t){let r=R(this,zs,L_)!==void 0&&R(this,zs,L_)!==this.value;this.internals.setFormValue(t),this._internalFormValue=t,R(this,Yo).value=this.isEmpty?"":t,r&&jr(this,"lexxy:change")},L_=function(){return this._internalFormValue},xh=new WeakSet,NE=function(){let t=this.valueBeforeDisconnect||this.getAttribute("value")||"

    ";this.value=ra(this,Gl,t)},yh=new WeakSet,EE=function(){document.addEventListener("turbo:before-cache",R(this,Vl))},Vl=new WeakMap,bh=new WeakSet,AE=function(){L(this,Th,vE).call(this,this.editor.registerUpdateListener(({editorState:t})=>{L(this,Sh,wE).call(this),ra(this,zs,this.value,TE),L(this,ql,D_).call(this),L(this,Zl,I_).call(this)}))},Sh=new WeakSet,wE=function(){this.cachedValue=null,this.cachedStringValue=null},Th=new WeakSet,vE=function(t){this.unregisterHandlers=this.unregisterHandlers||[],this.unregisterHandlers.push(t)},Nh=new WeakSet,OE=function(){this.unregisterHandlers?.forEach(t=>{t()}),this.unregisterHandlers=null},Eh=new WeakSet,kE=function(){this.supportsRichText?(XS(this.editor),uS(this.editor),L(this,Ah,LE).call(this),L(this,wh,RE).call(this),this.supportsMarkdown&&rT(this.editor,nT)):WS(this.editor),this.historyState=aT(),lT(this.editor,this.historyState,20)},Ah=new WeakSet,LE=function(){this.tableTools=se("lexxy-table-tools"),this.append(this.tableTools)},wh=new WeakSet,RE=function(){T0(this.editor),this.codeLanguagePicker=se("lexxy-code-language-picker"),this.append(this.codeLanguagePicker)},vh=new WeakSet,ME=function(){this.editor.registerCommand(Ur,t=>t.ctrlKey||t.metaKey||!this.supportsMultiLine?(t.preventDefault(),!0):!1,cn)},Oh=new WeakSet,DE=function(){this.addEventListener("focusin",L(this,kh,IE)),this.addEventListener("focusout",L(this,Lh,$E))},kh=new WeakSet,IE=function(t){L(this,Yl,R_).call(this,t.target)&&!this.currentlyFocused&&(jr(this,"lexxy:focus"),this.currentlyFocused=!0)},Lh=new WeakSet,$E=function(t){L(this,Yl,R_).call(this,t.relatedTarget)||(jr(this,"lexxy:blur"),this.currentlyFocused=!1)},Yl=new WeakSet,R_=function(t){return this.contains(t)||this.toolbarElement?.contains(t)},Rh=new WeakSet,PE=function(){this.isEmpty&&this.selection.placeCursorAtTheEnd()},Mh=new WeakSet,FE=function(){document.querySelector(":focus")||this.hasAttribute("autofocus")&&document.querySelector("[autofocus]")===this&&this.focus()},Dh=new WeakSet,BE=function(){},Ih=new WeakSet,HE=function(){R(this,jl,M_)&&(this.toolbarElement.setEditor(this),this.extensions.initializeToolbars())},$h=new WeakSet,zE=function(){let t=this.config.get("toolbar");return t&&t!==!0?document.getElementById(t):L(this,Ph,KE).call(this)},jl=new WeakSet,M_=function(){return this.supportsRichText&&this.config.get("toolbar")},Ph=new WeakSet,KE=function(){let t=se("lexxy-toolbar");return t.innerHTML=Ll.defaultTemplate,t.setAttribute("data-attachments",this.supportsAttachments),this.prepend(t),t},ql=new WeakSet,D_=function(){this.classList.toggle("lexxy-editor--empty",this.isEmpty)},Zl=new WeakSet,I_=function(){R(this,Yo).validity.valid?this.internals.setValidity({}):this.internals.setValidity(R(this,Yo).validity,R(this,Yo).validationMessage,this.editorContentElement)},Jl=new WeakSet,$_=function(){L(this,Nh,OE).call(this),this.editorContentElement&&(this.editorContentElement.remove(),this.editorContentElement=null),this.contents=null,this.editor=null,this.toolbar&&(this.getAttribute("toolbar")||this.toolbar.remove(),this.toolbar=null),this.codeLanguagePicker&&(this.codeLanguagePicker.remove(),this.codeLanguagePicker=null),this.tableHandler&&(this.tableHandler.remove(),this.tableHandler=null),this.selection=null,document.removeEventListener("turbo:before-cache",R(this,Vl))},Fh=new WeakSet,UE=function(){this.disconnectedCallback(),this.valueBeforeDisconnect=null,this.connectedCallback()},nn(Ps,"formAssociated",!0),nn(Ps,"debug",!1),nn(Ps,"commands",["bold","italic","strikethrough"]),nn(Ps,"observedAttributes",["connected","required"]);var vd=class extends HTMLElement{connectedCallback(){this.container=this.closest("details"),this.container.addEventListener("toggle",this.#t.bind(this)),this.container.addEventListener("keydown",this.#r.bind(this)),this.#e(this.initialize.bind(this))}disconnectedCallback(){this.container.removeEventListener("keydown",this.#r.bind(this))}get toolbar(){return this.closest("lexxy-toolbar")}get editorElement(){return this.toolbar.editorElement}get editor(){return this.toolbar.editor}initialize(){}close(){this.editor.focus(),this.container.open=!1}async#e(e){await this.toolbar.editorConnected,e()}#t(){this.container.open&&this.#n()}async#n(){this.#i[0].focus(),this.#s()}#r(e){e.key==="Escape"&&(e.stopPropagation(),this.close())}async#s(){await Us(),this.#o.forEach((e,t)=>{e.setAttribute("tabindex",t===0?0:"-1")})}get#i(){return Array.from(this.querySelectorAll("button, input"))}get#o(){return Array.from(this.querySelectorAll("button"))}},P_=class extends vd{connectedCallback(){super.connectedCallback(),this.input=this.querySelector("input"),this.#e()}#e(){this.container.addEventListener("toggle",this.#t.bind(this)),this.addEventListener("submit",this.#n.bind(this)),this.querySelector("[value='unlink']").addEventListener("click",this.#r.bind(this))}#t({newState:e}){this.input.value=this.#s,this.input.required=e==="open"}#n(e){let t=e.submitter?.value;this.editor.dispatchCommand(t,this.input.value),this.close()}#r(){this.editor.dispatchCommand("unlink"),this.close()}get#s(){let e="";return this.editor.getEditorState().read(()=>{let t=w();if(!v(t))return;let r=t.getNodes()[0];for(;r&&r.getParent();){if(Fu(r)){e=r.getURL();break}r=r.getParent()}}),e}},bN="button.lexxy-highlight-button",SN="[data-command='removeHighlight']",_d=Symbol("no_style"),F_=class extends vd{connectedCallback(){super.connectedCallback(),this.#e()}initialize(){this.#n(),this.#t()}#e(){this.container.addEventListener("toggle",this.#i.bind(this))}#t(){this.#c.forEach(e=>e.addEventListener("click",this.#o.bind(this))),this.querySelector(SN).addEventListener("click",this.#a.bind(this))}#n(){let e=this.editorElement.config.get("highlight.buttons");this.#r("color",e.color),this.#r("background-color",e["background-color"]);let t=Math.max(e.color.length,e["background-color"].length);this.style.setProperty("--max-colors",t)}#r(e,t){t.forEach((r,o)=>{this.#l.appendChild(this.#s(e,r,o))})}#s(e,t,r){let o=document.createElement("button");return o.dataset.style=e,o.style.setProperty(e,t),o.dataset.value=t,o.classList.add("lexxy-editor__toolbar-button","lexxy-highlight-button"),o.name=e+"-"+r,o}#i({newState:e}){e==="open"&&this.editor.getEditorState().read(()=>{this.#u(w())})}#o(e){e.preventDefault();let t=e.target.closest(bN);if(!t)return;let r=t.dataset.style,o=t.dataset.value;this.editor.dispatchCommand("toggleHighlight",{[r]:o}),this.close()}#a(e){e.preventDefault(),this.editor.dispatchCommand("removeHighlight"),this.close()}#u(e){if(!v(e))return;let t=_u(e,"color",_d),r=_u(e,"background-color",_d);this.#c.forEach(s=>{let i=s.dataset.value===t||s.dataset.value===r;s.setAttribute("aria-pressed",i)});let o=t!==_d||r!==_d;this.querySelector(SN).disabled=!o}get#l(){return this.querySelector(".lexxy-highlight-colors")}get#c(){return Array.from(this.querySelectorAll(bN))}},Od=class{async buildListItems(e=""){return Promise.resolve([])}promptItemFor(e){return null}buildListItemElementFor(e){let r=e.querySelector("template[type='menu']").content.cloneNode(!0),o=se("li",{role:"option",id:td("prompt-item"),tabindex:"0"});return o.classList.add("lexxy-prompt-menu__item"),o.appendChild(r),o}async loadPromptItemsFromUrl(e){try{let r=await(await fetch(e)).text(),o=Os(r).querySelectorAll("lexxy-prompt-item");return Promise.resolve(Array.from(o))}catch(t){return Promise.reject(t)}}},kd=class extends Od{async buildListItems(e=""){let t=await this.fetchPromptItems();return this.#e(t,e)}async fetchPromptItems(e){return Promise.resolve([])}promptItemFor(e){return this.promptItemByListItem.get(e)}#e(e,t){let r=[];return this.promptItemByListItem=new WeakMap,e.forEach(o=>{let s=o.getAttribute("search");if(!t||kM(s,t)){let i=this.buildListItemElementFor(o);this.promptItemByListItem.set(i,o),r.push(i)}}),r}},B_=class extends kd{constructor(e){super(),this.inlinePromptItemElements=Array.from(e)}async fetchPromptItems(){return Promise.resolve(this.inlinePromptItemElements)}},H_=class extends kd{constructor(e){super(),this.url=e,this.fetchPromptItems()}async fetchPromptItems(){return this.promptItems??=await this.loadPromptItemsFromUrl(this.url),Promise.resolve(this.promptItems)}},WM=200,z_=class extends Od{constructor(e){super(),this.baseURL=e,this.loadAndFilterListItems=AM(this.fetchFilteredListItems.bind(this),WM)}async buildListItems(e=""){return await this.loadAndFilterListItems(e)}promptItemFor(e){return this.promptItemByListItem.get(e)}async fetchFilteredListItems(e){let t=await this.loadPromptItemsFromUrl(this.#e(e));return this.#t(t)}#e(e){let t=new URL(this.baseURL,window.location.origin);return t.searchParams.append("filter",e),t.toString()}#t(e){let t=[];this.promptItemByListItem=new WeakMap;for(let r of e){let o=this.buildListItemElementFor(r);this.promptItemByListItem.set(o,r),t.push(o)}return t}},GM="Nothing found",Bh,WE,Hh,GE,Xl,K_,zh,VE,Kh,YE,Qt,Sn,Ot,Jt,Bs,Ol,Uh,jE,Wh,qE,Gh,ZE,Vh,JE,Ql,U_,fr,Go,Hs,kl,ec,W_,Yh,XE,jh,QE,jo,Ui,qh,eA,Zi,Zh,tA,Jh,nA,Xh,rA,Qh,oA,tc,eg,sA,tg,iA,Ji,Sd,ng,aA,Xi,Td,nc,G_,rg,lA,og,cA,sg,uA,ig,dA,ag,hA,lg,gA,cg,fA,ug,pA,qo,Wi,pr,Vo,dg,mA,hg,gg,_A,bd=class extends HTMLElement{constructor(){super();k(this,Bh);k(this,Hh);k(this,Xl);k(this,zh);k(this,Kh);k(this,Qt);k(this,Ot);k(this,Bs);k(this,Uh);k(this,Wh);k(this,Gh);k(this,Vh);k(this,Ql);k(this,fr);k(this,Hs);k(this,ec);k(this,Yh);k(this,jh);k(this,jo);k(this,qh);k(this,Zh);k(this,Jh);k(this,Xh);k(this,Qh);k(this,eg);k(this,tg);k(this,Ji);k(this,ng);k(this,Xi);k(this,nc);k(this,rg);k(this,og);k(this,sg);k(this,ig);k(this,ag);k(this,lg);k(this,cg);k(this,ug);k(this,qo);k(this,pr);k(this,dg);k(this,gg);k(this,Zi,async()=>{if(this.initialPrompt){this.initialPrompt=!1;return}R(this,qo,Wi).containsTextBackUntil(this.trigger)?(await L(this,Zh,tA).call(this),await Us(),L(this,Yh,XE).call(this)):L(this,jo,Ui).call(this)});k(this,tc,t=>{t.key==="Escape"&&(L(this,jo,Ui).call(this),R(this,Ot,Jt).focus(),t.stopPropagation())});k(this,hg,t=>{let r=t.target.closest(".lexxy-prompt-menu__item");r&&(L(this,Hs,kl).call(this,r),L(this,nc,G_).call(this))});this.keyListeners=[]}connectedCallback(){this.source=L(this,Hh,GE).call(this),L(this,Xl,K_).call(this),this.toggleAttribute("connected",!0)}disconnectedCallback(){this.source=null,this.popoverElement=null}attributeChangedCallback(t,r,o){t==="connected"&&this.isConnected&&r!=null&&r!==o&&requestAnimationFrame(()=>L(this,gg,_A).call(this))}get name(){return this.getAttribute("name")}get trigger(){return this.getAttribute("trigger")}get supportsSpaceInSearches(){return this.hasAttribute("supports-space-in-searches")}get open(){return this.popoverElement?.classList?.contains("lexxy-prompt-menu--visible")}get closed(){return!this.open}};Bh=new WeakSet,WE=function(){return!this.supportsSpaceInSearches},Hh=new WeakSet,GE=function(){let t=this.getAttribute("src");return t?this.hasAttribute("remote-filtering")?new z_(t):new H_(t):new B_(this.querySelectorAll("lexxy-prompt-item"))},Xl=new WeakSet,K_=function(){let t=R(this,Qt,Sn).registerUpdateListener(({editorState:r})=>{r.read(()=>{let{node:o,offset:s}=R(this,Bs,Ol).selectedNodeWithOffset();if(!!o&&B(o)){let i=o.getTextContent(),a=this.trigger.length;if(s>=a&&i.slice(s-a,s)===this.trigger){let c=s===a,u=s>a?i[s-a-1]:null;(c||(u===" "||u===` +`))&&(t(),L(this,Uh,jE).call(this))}}})})},zh=new WeakSet,VE=function(){this.cursorPositionListener=R(this,Qt,Sn).registerUpdateListener(()=>{this.closed||R(this,Qt,Sn).read(()=>{let{node:t,offset:r}=R(this,Bs,Ol).selectedNodeWithOffset();if(!!t)if(B(t)&&r>0){let i=t.getTextContent().slice(0,r).lastIndexOf(this.trigger),a=i+this.trigger.length-1;(i===-1||r<=a)&&L(this,jo,Ui).call(this)}else L(this,jo,Ui).call(this)})})},Kh=new WeakSet,YE=function(){this.cursorPositionListener&&(this.cursorPositionListener(),this.cursorPositionListener=null)},Qt=new WeakSet,Sn=function(){return R(this,Ot,Jt).editor},Ot=new WeakSet,Jt=function(){return this.closest("lexxy-editor")},Bs=new WeakSet,Ol=function(){return R(this,Ot,Jt).selection},Uh=new WeakSet,jE=async function(){this.popoverElement??=await L(this,dg,mA).call(this),L(this,jh,QE).call(this),await R(this,Zi).call(this),this.popoverElement.classList.toggle("lexxy-prompt-menu--visible",!0),L(this,Ql,U_).call(this),R(this,Ot,Jt).addEventListener("keydown",R(this,tc)),R(this,Ot,Jt).addEventListener("lexxy:change",R(this,Zi)),L(this,Wh,qE).call(this),L(this,zh,VE).call(this)},Wh=new WeakSet,qE=function(){this.keyListeners.push(R(this,Qt,Sn).registerCommand(Ur,L(this,Xi,Td).bind(this),Jn)),this.keyListeners.push(R(this,Qt,Sn).registerCommand(_n,L(this,Xi,Td).bind(this),Jn)),R(this,Bh,WE)&&this.keyListeners.push(R(this,Qt,Sn).registerCommand(Ni,L(this,Xi,Td).bind(this),Jn)),this.keyListeners.push(R(this,Qt,Sn).registerCommand(Pt,L(this,Gh,ZE).bind(this),Jn)),this.keyListeners.push(R(this,Qt,Sn).registerCommand(dn,L(this,Vh,JE).bind(this),Jn))},Gh=new WeakSet,ZE=function(t){return L(this,tg,iA).call(this),t.preventDefault(),!0},Vh=new WeakSet,JE=function(t){return L(this,eg,sA).call(this),t.preventDefault(),!0},Ql=new WeakSet,U_=function(){let t=R(this,fr,Go)[0];t&&L(this,Hs,kl).call(this,t)},fr=new WeakSet,Go=function(){return Array.from(this.popoverElement.querySelectorAll(".lexxy-prompt-menu__item"))},Hs=new WeakSet,kl=function(t){L(this,ec,W_).call(this),t.toggleAttribute("aria-selected",!0),t.scrollIntoView({block:"nearest",behavior:"smooth"}),t.focus(),R(this,Bs,Ol).preservingSelection(()=>{R(this,Ot,Jt).focus()}),R(this,pr,Vo).setAttribute("aria-controls",this.popoverElement.id),R(this,pr,Vo).setAttribute("aria-activedescendant",t.id),R(this,pr,Vo).setAttribute("aria-haspopup","listbox")},ec=new WeakSet,W_=function(){R(this,fr,Go).forEach(t=>{t.toggleAttribute("aria-selected",!1)}),R(this,pr,Vo).removeAttribute("aria-controls"),R(this,pr,Vo).removeAttribute("aria-activedescendant"),R(this,pr,Vo).removeAttribute("aria-haspopup")},Yh=new WeakSet,XE=function(){let{x:t,y:r,fontSize:o}=R(this,Bs,Ol).cursorPosition,s=R(this,Ot,Jt).getBoundingClientRect(),a=R(this,pr,Vo).getBoundingClientRect().top-s.top;this.popoverElement.hasAttribute("data-anchored")||(this.popoverElement.style.left=`${t}px`,this.popoverElement.toggleAttribute("data-anchored",!0)),this.popoverElement.style.top=`${r+a}px`,this.popoverElement.style.bottom="auto";let l=this.popoverElement.getBoundingClientRect();(l.bottom>window.innerHeight||this.popoverElement.hasAttribute("data-clipped-at-bottom"))&&(this.popoverElement.style.top=`${r+a-l.height-o}px`,this.popoverElement.style.bottom="auto",this.popoverElement.toggleAttribute("data-clipped-at-bottom",!0))},jh=new WeakSet,QE=function(){this.popoverElement.removeAttribute("data-clipped-at-bottom"),this.popoverElement.removeAttribute("data-anchored")},jo=new WeakSet,Ui=async function(){L(this,ec,W_).call(this),this.popoverElement.classList.toggle("lexxy-prompt-menu--visible",!1),R(this,Ot,Jt).removeEventListener("lexxy:change",R(this,Zi)),R(this,Ot,Jt).removeEventListener("keydown",R(this,tc)),L(this,qh,eA).call(this),L(this,Kh,YE).call(this),await Us(),L(this,Xl,K_).call(this)},qh=new WeakSet,eA=function(){this.keyListeners.forEach(t=>t()),this.keyListeners=[]},Zi=new WeakMap,Zh=new WeakSet,tA=async function(){let t=R(this,qo,Wi).textBackUntil(this.trigger),r=await this.source.buildListItems(t);this.popoverElement.innerHTML="",r.length>0?L(this,Jh,nA).call(this,r):L(this,Xh,rA).call(this),L(this,Ql,U_).call(this)},Jh=new WeakSet,nA=function(t){this.popoverElement.classList.remove("lexxy-prompt-menu--empty"),this.popoverElement.append(...t)},Xh=new WeakSet,rA=function(){this.popoverElement.classList.add("lexxy-prompt-menu--empty");let t=se("li",{innerHTML:R(this,Qh,oA)});t.classList.add("lexxy-prompt-menu__item--empty"),this.popoverElement.append(t)},Qh=new WeakSet,oA=function(){return this.getAttribute("empty-results")||GM},tc=new WeakMap,eg=new WeakSet,sA=function(){let t=R(this,Ji,Sd)+1;t=0&&L(this,Hs,kl).call(this,R(this,fr,Go)[t])},Ji=new WeakSet,Sd=function(){return R(this,fr,Go).findIndex(t=>t.hasAttribute("aria-selected"))},ng=new WeakSet,aA=function(){return R(this,fr,Go)[R(this,Ji,Sd)]},Xi=new WeakSet,Td=function(t){return t.preventDefault(),t.stopPropagation(),L(this,nc,G_).call(this),!0},nc=new WeakSet,G_=function(){L(this,rg,lA).call(this),L(this,jo,Ui).call(this),R(this,Ot,Jt).focus()},rg=new WeakSet,lA=function(){let t=this.source.promptItemFor(R(this,ng,aA));if(!t)return;let r=Array.from(t.querySelectorAll("template[type='editor']")),o=`${this.trigger}${R(this,qo,Wi).textBackUntil(this.trigger)}`;this.hasAttribute("insert-editable-text")?L(this,og,cA).call(this,r,o):L(this,ig,dA).call(this,r,o,t.getAttribute("sgid"))},og=new WeakSet,cA=function(t,r){R(this,Qt,Sn).update(()=>{let o=t.flatMap(s=>L(this,sg,uA).call(this,s));R(this,qo,Wi).replaceTextBackUntil(r,o)})},sg=new WeakSet,uA=function(t){return bs(R(this,Qt,Sn),Os(`${t.innerHTML}`))},ig=new WeakSet,dA=function(t,r,o=null){R(this,Qt,Sn).update(()=>{let i=L(this,ag,hA).call(this,t,o).flatMap(a=>[a,L(this,lg,gA).call(this)]).slice(0,-1);R(this,qo,Wi).replaceTextBackUntil(r,i)})},ag=new WeakSet,hA=function(t,r=null){return t.map(o=>L(this,ug,pA).call(this,o.innerHTML,o.getAttribute("content-type")||R(this,cg,fA),o.getAttribute("sgid")||r))},lg=new WeakSet,gA=function(){return ye(" ")},cg=new WeakSet,fA=function(){return`application/vnd.${zn.global.get("attachmentContentTypeNamespace")}.${this.name}`},ug=new WeakSet,pA=function(t,r,o){return new mr({sgid:o,contentType:r,innerHtml:t})},qo=new WeakSet,Wi=function(){return R(this,Ot,Jt).contents},pr=new WeakSet,Vo=function(){return R(this,Ot,Jt).editorContentElement},dg=new WeakSet,mA=async function(){let t=se("ul",{role:"listbox",id:td("prompt-popover")});return t.classList.add("lexxy-prompt-menu"),t.style.position="absolute",t.setAttribute("nonce",fg()),t.append(...await this.source.buildListItems()),t.addEventListener("click",R(this,hg)),R(this,Ot,Jt).appendChild(t),t},hg=new WeakMap,gg=new WeakSet,_A=function(){this.disconnectedCallback(),this.connectedCallback()},nn(bd,"observedAttributes",["connected"]);var V_=class extends HTMLElement{connectedCallback(){this.editorElement=this.closest("lexxy-editor"),this.editor=this.editorElement.editor,this.classList.add("lexxy-floating-controls"),this.#e(),this.#c(),this.#s()}disconnectedCallback(){this.unregisterUpdateListener?.(),this.unregisterUpdateListener=null}#e(){this.languagePickerElement=this.#t(),this.languagePickerElement.addEventListener("change",()=>{this.#r(this.languagePickerElement.value)}),this.languagePickerElement.setAttribute("nonce",fg()),this.appendChild(this.languagePickerElement)}#t(){let e=se("select",{className:"lexxy-code-language-picker","aria-label":"Pick a language\u2026",name:"lexxy-code-language"});for(let[t,r]of Object.entries(this.#n)){let o=document.createElement("option");o.value=t,o.textContent=r,e.appendChild(o)}return e}get#n(){let e={...b0};e.ruby||(e.ruby="Ruby"),e.php||(e.php="PHP"),e.go||(e.go="Go"),e.bash||(e.bash="Bash"),e.json||(e.json="JSON"),e.diff||(e.diff="Diff");let t=Object.entries(e).sort(([,s],[,i])=>s.localeCompare(i)),r=t.findIndex(([s])=>s==="plain"),o=t.splice(r,1)[0];return Object.fromEntries([o,...t])}#r(e){this.editor.update(()=>{let t=this.#i();t&&t.setLanguage(e)})}#s(){this.unregisterUpdateListener=this.editor.registerUpdateListener(()=>{this.editor.getEditorState().read(()=>{let e=this.#i();e?this.#o(e):this.#c()})})}#i(){let e=w();if(!v(e))return null;let t=e.anchor.getNode(),r=t.getParent();return Ko(t)?t:Ko(r)?r:null}#o(e){let t=e.getLanguage();this.#a(t),this.#l(),this.#u(e)}#a(e){if(this.languagePickerElement&&e){let t=Cm(e);this.languagePickerElement.value=t}}#u(e){let t=this.editor.getElementByKey(e.getKey());if(!t)return;let r=t.getBoundingClientRect(),o=this.editorElement.getBoundingClientRect(),s=r.top-o.top,i=o.right-r.right;this.style.top=`${s}px`,this.style.right=`${i}px`}#l(){this.hidden=!1}#c(){this.hidden=!0}},VM=` + +`,Y_=class extends HTMLElement{connectedCallback(){this.editorElement=this.closest("lexxy-editor"),this.editor=this.editorElement.editor,this.classList.add("lexxy-floating-controls"),this.deleteButton||this.#e()}disconnectedCallback(){this.deleteButton&&this.handleDeleteClick&&this.deleteButton.removeEventListener("click",this.handleDeleteClick),this.handleDeleteClick=null,this.deleteButton=null,this.editor=null,this.editorElement=null}#e(){let e=se("div",{className:"lexxy-floating-controls__group"});this.deleteButton=se("button",{className:"lexxy-node-delete",type:"button","aria-label":"Remove"}),this.deleteButton.tabIndex=-1,this.deleteButton.innerHTML=VM,this.handleDeleteClick=()=>this.#t(),this.deleteButton.addEventListener("click",this.handleDeleteClick),e.appendChild(this.deleteButton),this.appendChild(e)}#t(){this.editor.update(()=>{We(this)?.remove()})}},j_=class{constructor(e){this.editor=e.editor,this.contents=e.contents,this.selection=e.selection,this.currentTableNodeKey=null,this.currentCellKey=null,this.#f()}destroy(){this.currentTableNodeKey=null,this.currentCellKey=null,this.#C()}get currentCell(){return this.currentCellKey?this.editor.getEditorState().read(()=>{let e=Fe(this.currentCellKey);return e instanceof Ki?e:null}):null}get currentTableNode(){return this.currentTableNodeKey?this.editor.getEditorState().read(()=>{let e=Fe(this.currentTableNodeKey);return e instanceof yl?e:null}):null}get currentRowCells(){let e=this.currentRowIndex,t=this.tableRows;return t?this.editor.getEditorState().read(()=>t[e]?.getChildren()??null)??null:null}get currentRowIndex(){let e=this.currentCell;return e?this.editor.getEditorState().read(()=>UT(e))??0:0}get currentColumnCells(){let e=this.currentColumnIndex,t=this.tableRows;return t?this.editor.getEditorState().read(()=>t.map(r=>r.getChildAtIndex(e)))??null:null}get currentColumnIndex(){let e=this.currentCell;return e?this.editor.getEditorState().read(()=>KT(e))??0:0}get tableRows(){return this.editor.getEditorState().read(()=>this.currentTableNode?.getChildren())??null}updateSelectedTable(){let e=null,t=null;this.editor.getEditorState().read(()=>{let r=w();if(!r||!this.selection.isTableCellSelected)return;let o=r.getNodes()[0];e=jm(o),t=qm(o)}),this.currentCellKey=e?.getKey()??null,this.currentTableNodeKey=t?.getKey()??null}executeTableCommand(e,t=null){if(e.action==="delete"&&e.childType==="table"){this.#n();return}if(e.action==="toggle"){this.#t(e);return}this.#e(e,t)}#e(e,t=null){this.#r(),this.editor.dispatchCommand(this.#s(e)),this.#a(e,t)}#t(e){let t=e.childType,r=null,o=null;t==="row"?(r=this.currentRowCells,o=dr.ROW):t==="column"&&(r=this.currentColumnCells,o=dr.COLUMN),!(!r||r.length===0)&&this.editor.update(()=>{let s=xl(r[0]);if(!s)return;let a=s.getHeaderStyles()^o;r.forEach(l=>{this.#i(l,a,o)})})}#n(){this.#r(),this.editor.dispatchCommand("deleteTable")}#r(){this.editor.update(()=>{let e=w();if(!e)return;let t=e.getNodes()[0];jm(t)?.selectEnd()})}#s(e){let{action:t,childType:r,direction:o}=e,s=xN(r),i=t=="insert"?xN(o):"";return`${t}Table${s}${i}`}#i(e,t,r){xl(e)?.setHeaderStyles(t,r)}async#o(e,t){if(await Us(),!this.currentTableNode)return;let r=this.tableRows;if(!r)return;let o=r[e];!o||this.editor.update(()=>{xl(o.getChildAtIndex(t))?.selectEnd()})}#a(e,t=null){let{childType:r,direction:o}=e,s=this.currentRowIndex,i=t!==null?t:this.currentColumnIndex,a=e.action==="delete"?-1:0,l=o==="after"?1:a;r==="row"?s+=l:r==="column"&&(i+=l),this.#o(s,i)}#u(){let e=this.tableRows;if(!e)return;let t=e.at(this.currentRowIndex+1);!t||this.editor.update(()=>{t.getChildAtIndex(this.currentColumnIndex)?.selectEnd()})}#l(){let e=this.currentCell;!e||this.editor.update(()=>{e.selectPrevious()})}#c(){this.executeTableCommand({action:"insert",childType:"row",direction:"after"},0)}#d(){this.executeTableCommand({action:"delete",childType:"row"},-1)}#m(){let e=this.currentTableNode;this.executeTableCommand({action:"delete",childType:"row"}),this.editor.update(()=>{let t=e?.getNextSibling();if(rt(t))t.selectStart();else{let r=U();this.currentTableNode.insertAfter(r),r.selectStart()}})}#p(){if(!this.currentTableNode)return!1;let e=this.currentCell;return e?e.getTextContent().trim()==="":!1}#_(){if(!this.currentTableNode)return!1;let e=this.tableRows;return e?e.length===this.currentRowIndex+1:!1}#h(){if(!this.currentTableNode)return!1;let e=this.currentRowCells;return e?e.every(t=>t.getTextContent().trim()===""):!1}#g(){if(!this.currentTableNode)return!1;let e=this.currentRowCells;return e?e.indexOf(this.currentCell)===0:!1}#f(){this.unregisterBackspaceKeyHandler=this.editor.registerCommand(vo,e=>this.#y(e),Je),this.unregisterEnterKeyHandler=this.editor.registerCommand(Ur,e=>this.#x(e),Je)}#C(){this.unregisterBackspaceKeyHandler?.(),this.unregisterEnterKeyHandler?.(),this.unregisterBackspaceKeyHandler=null,this.unregisterEnterKeyHandler=null}#y(e){return this.currentTableNode?this.#h()&&this.#g()?(e.preventDefault(),this.#d(),!0):this.#p()&&!this.#g()?(e.preventDefault(),this.#l(),!0):!1:!1}#x(e){return e.ctrlKey||e.metaKey||e.shiftKey||!this.currentTableNode||this.selection.isInsideList||this.selection.isInsideCodeBlock?!1:(e.preventDefault(),this.#_()&&this.#h()?this.#m():this.#_()?this.#c():this.#u(),!0)}},YM={"insert-row-before":` + + + `,"insert-row-after":` + + + `,"delete-row":` + + + `,"toggle-row":` + + `,"insert-column-before":` + + + `,"insert-column-after":` + + + `,"delete-column":` + + + `,"toggle-column":` + + `,"delete-table":` + + `},q_=class extends HTMLElement{connectedCallback(){this.tableController=new j_(this.#t),this.classList.add("lexxy-floating-controls"),this.#r(),this.#y(),this.#g(),this.#c()}disconnectedCallback(){this.#d(),this.unregisterUpdateListener?.(),this.unregisterUpdateListener=null,this.removeEventListener("keydown",this.#p),this.tableController?.destroy(),this.tableController=null}get#e(){return this.#t.editor}get#t(){return this.closest("lexxy-editor")}get#n(){return Array.from(this.querySelectorAll("button, details > summary"))}#r(){this.appendChild(this.#i()),this.appendChild(this.#o()),this.appendChild(this.#u()),this.addEventListener("keydown",this.#p)}#s(e,t,r){let o=se("div",{className:`lexxy-floating-controls__group lexxy-table-control lexxy-table-control--${e}`}),s=this.#l(`Add ${e}`,{action:"insert",childType:e,direction:"after"},"+"),i=this.#l(`Remove ${e}`,{action:"delete",childType:e},"\u2212"),a=se("details",{className:"lexxy-table-control__more-menu"});a.setAttribute("name","lexxy-dropdown"),a.tabIndex=-1;let l=se("summary",{},`_ ${e}s`);return t(l),a.appendChild(l),a.appendChild(r),o.appendChild(i),o.appendChild(a),o.appendChild(s),o}#i(){return this.#s("row",e=>{this.rowCount=e},this.#a("row"))}#o(){return this.#s("column",e=>{this.columnCount=e},this.#a("column"))}#a(e){let t=se("div",{className:"lexxy-floating-controls__group lexxy-table-control__more-menu-details"}),r=this.#l(`Add ${e} before`,{action:"insert",childType:e,direction:"before"}),o=this.#l(`Add ${e} after`,{action:"insert",childType:e,direction:"after"}),s=this.#l(`Toggle ${e} style`,{action:"toggle",childType:e}),i=this.#l(`Remove ${e}`,{action:"delete",childType:e});return t.appendChild(r),t.appendChild(o),t.appendChild(s),t.appendChild(i),t}#u(){let e=se("div",{className:"lexxy-table-control lexxy-floating-controls__group"}),t=this.#l("Delete this table?",{action:"delete",childType:"table"});return t.classList.add("lexxy-table-control__button--delete-table"),e.appendChild(t),this.deleteContainer=e,e}#l(e,t={},r=this.#w(t)){let o=se("button",{className:"lexxy-table-control__button","aria-label":e,type:"button"});return o.tabIndex=-1,o.innerHTML=`${r} ${e}`,o.dataset.action=t.action,o.dataset.childType=t.childType,o.dataset.direction=t.direction,o.addEventListener("click",()=>this.#f(t)),o.addEventListener("mouseover",()=>this.#h()),o.addEventListener("focus",()=>this.#h()),o.addEventListener("mouseout",()=>this.#h()),o}#c(){this.unregisterKeyboardShortcuts=this.#e.registerCommand(_1,this.#m,Je)}#d(){this.unregisterKeyboardShortcuts?.(),this.unregisterKeyboardShortcuts=null}#m=e=>{(e.ctrlKey||e.metaKey)&&e.shiftKey&&e.key==="F10"&&this.querySelector("button, [tabindex]:not([tabindex='-1'])")?.focus()};#p=e=>{e.key==="Escape"?this.#_():NN(this.#n,e)};#_(){let e=this.tableController.currentCell;!e||(this.#e.update(()=>{e.select(),this.#e.focus()}),this.#x())}async#h(){await Us(),this.#S();let e=this.querySelector("button:hover, button:focus");if(!e)return;let t={action:e.dataset.action,childType:e.dataset.childType,direction:e.dataset.direction},r=null;switch(t.childType){case"row":r=this.tableController.currentRowCells;break;case"column":r=this.tableController.currentColumnCells;break;case"table":r=this.tableController.tableRows;break}!r||r.forEach(o=>{let s=this.#e.getElementByKey(o.getKey());!s||(s.classList.toggle($s.tableCellHighlight,!0),Object.assign(s.dataset,t))})}#g(){this.unregisterUpdateListener=this.#e.registerUpdateListener(()=>{this.tableController.updateSelectedTable(),this.tableController.currentTableNode?this.#C():this.#y()})}#f(e){this.tableController.executeTableCommand(e),this.#x()}#C(){this.style.display="flex",this.#x()}#y(){this.style.display="none",this.#S()}#x(){this.#N(),this.#E(),this.#T(),this.#h()}#T(){this.querySelector("details[open]")?.removeAttribute("open")}#N(){let e=this.tableController.currentTableNode;if(!e)return;let t=this.#e.getElementByKey(e.getKey());if(!t)return;let r=t.getBoundingClientRect(),o=this.#t.getBoundingClientRect(),s=r.top-o.top,i=(r.left+r.right)/2-o.left;this.style.top=`${s}px`,this.style.left=`${i}px`}#E(){let e=this.tableController.currentTableNode;if(!e)return;let t=zT(this.#e,e);if(!t)return;let r=t.rows,o=t.columns;this.rowCount.textContent=`${r} row${r===1?"":"s"}`,this.columnCount.textContent=`${o} column${o===1?"":"s"}`}#A(){let e=this.tableController.currentCell;if(!e)return;let t=this.#e.getElementByKey(e.getKey());!t||t.classList.add($s.tableCellFocus)}#S(){this.#t.querySelectorAll(`.${$s.tableCellFocus}`)?.forEach(e=>{e.classList.remove($s.tableCellFocus)}),this.#t.querySelectorAll(`.${$s.tableCellHighlight}`)?.forEach(e=>{e.classList.remove($s.tableCellHighlight),e.removeAttribute("data-action"),e.removeAttribute("data-child-type"),e.removeAttribute("data-direction")}),this.#A()}#w(e){let{action:t,childType:r}=e,o=t=="insert"?e.direction:null,s=[t,r,o].filter(Boolean).join("-");return YM[s]}};function jM(){Object.entries({"lexxy-toolbar":Ll,"lexxy-editor":Ps,"lexxy-link-dropdown":P_,"lexxy-highlight-dropdown":F_,"lexxy-prompt":bd,"lexxy-code-language-picker":V_,"lexxy-node-delete-button":Y_,"lexxy-table-tools":q_}).forEach(([e,t])=>{customElements.define(e,t)})}var nF=zn.configure;setTimeout(jM,0);export{tF as $createActionTextAttachmentNode,RM as $createActionTextAttachmentUploadNode,Ad as $isActionTextAttachmentNode,Ut as ActionTextAttachmentNode,Ws as ActionTextAttachmentUploadNode,mr as CustomActionTextAttachmentNode,Ks as Extension,Zo as HorizontalDividerNode,nF as configure,dT as highlightAll,dT as highlightCode}; +/*! @license DOMPurify 3.3.1 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.1/LICENSE */ +/** + * Prism: Lightweight, robust, elegant syntax highlighting + * + * @license MIT + * @author Lea Verou + * @namespace + * @public + */ diff --git a/public/vendor/rich-text-laravel/manifest.json b/public/vendor/rich-text-laravel/manifest.json new file mode 100644 index 00000000..4c50d7b9 --- /dev/null +++ b/public/vendor/rich-text-laravel/manifest.json @@ -0,0 +1,13 @@ +{ + "/lexxy.css": "/vendor/rich-text-laravel/lexxy-64053482.css", + "/trix.css": "/vendor/rich-text-laravel/trix-4dba4d46.css", + "/lexxy-rich-text-laravel-attachments.css": "/vendor/rich-text-laravel/lexxy-rich-text-laravel-attachments-4974baec.css", + "/lexxy-rich-text-laravel-daisyui.css": "/vendor/rich-text-laravel/lexxy-rich-text-laravel-daisyui-9dcf6ff2.css", + "/lexxy-rich-text-laravel-flux.css": "/vendor/rich-text-laravel/lexxy-rich-text-laravel-flux-4459f325.css", + "/trix-rich-text-laravel.css": "/vendor/rich-text-laravel/trix-rich-text-laravel-d74ec4d1.css", + "/trix-rich-text-laravel-attachments.css": "/vendor/rich-text-laravel/trix-rich-text-laravel-attachments-5258f25c.css", + "/trix-rich-text-laravel-daisyui.css": "/vendor/rich-text-laravel/trix-rich-text-laravel-daisyui-33127e56.css", + "/trix-rich-text-laravel-flux.css": "/vendor/rich-text-laravel/trix-rich-text-laravel-flux-cad7da99.css", + "/lexxy.esm.js": "/vendor/rich-text-laravel/lexxy.esm.js", + "/trix.esm.js": "/vendor/rich-text-laravel/trix.esm.js" +} diff --git a/public/vendor/rich-text-laravel/trix-4dba4d46.css b/public/vendor/rich-text-laravel/trix-4dba4d46.css new file mode 100644 index 00000000..7bce5312 --- /dev/null +++ b/public/vendor/rich-text-laravel/trix-4dba4d46.css @@ -0,0 +1 @@ +@charset "UTF-8";trix-editor{border:1px solid #bbb;border-radius:3px;margin:0;padding:.4em .6em;min-height:5em;outline:none}trix-toolbar *{box-sizing:border-box}trix-toolbar .trix-button-row{display:flex;flex-wrap:nowrap;justify-content:space-between;overflow-x:auto}trix-toolbar .trix-button-group{display:flex;margin-bottom:10px;border:1px solid #bbb;border-top-color:#ccc;border-bottom-color:#888;border-radius:3px}trix-toolbar .trix-button-group:not(:first-child){margin-left:1.5vw}@media (max-width: 768px){trix-toolbar .trix-button-group:not(:first-child){margin-left:0}}trix-toolbar .trix-button-group-spacer{flex-grow:1}@media (max-width: 768px){trix-toolbar .trix-button-group-spacer{display:none}}trix-toolbar .trix-button{position:relative;float:left;color:#0009;font-size:.75em;font-weight:600;white-space:nowrap;padding:0 .5em;margin:0;outline:none;border:none;border-bottom:1px solid #ddd;border-radius:0;background:transparent}trix-toolbar .trix-button:not(:first-child){border-left:1px solid #ccc}trix-toolbar .trix-button.trix-active{background:#cbeefa;color:#000}trix-toolbar .trix-button:not(:disabled){cursor:pointer}trix-toolbar .trix-button:disabled{color:#00000020}@media (max-width: 768px){trix-toolbar .trix-button{letter-spacing:-.01em;padding:0 .3em}}trix-toolbar .trix-button--icon{font-size:inherit;width:2.6em;height:1.6em;max-width:calc(.8em + 4vw);text-indent:-9999px}@media (max-width: 768px){trix-toolbar .trix-button--icon{height:2em;max-width:calc(.8em + 3.5vw)}}trix-toolbar .trix-button--icon:before{display:inline-block;position:absolute;inset:0;opacity:.6;content:"";background-position:center;background-repeat:no-repeat;background-size:contain}@media (max-width: 768px){trix-toolbar .trix-button--icon:before{right:6%;left:6%}}trix-toolbar .trix-button--icon.trix-active:before{opacity:1}trix-toolbar .trix-button--icon:disabled:before{opacity:.125}trix-toolbar .trix-button--icon-attach:before{background-image:url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M10.5%2018V7.5c0-2.25%203-2.25%203%200V18c0%204.125-6%204.125-6%200V7.5c0-6.375%209-6.375%209%200V18%22%20stroke%3D%22%23000%22%20stroke-width%3D%222%22%20stroke-miterlimit%3D%2210%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E);top:8%;bottom:4%}trix-toolbar .trix-button--icon-bold:before{background-image:url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M6.522%2019.242a.5.5%200%200%201-.5-.5V5.35a.5.5%200%200%201%20.5-.5h5.783c1.347%200%202.46.345%203.24.982.783.64%201.216%201.562%201.216%202.683%200%201.13-.587%202.129-1.476%202.71a.35.35%200%200%200%20.049.613c1.259.56%202.101%201.742%202.101%203.22%200%201.282-.483%202.334-1.363%203.063-.876.726-2.132%201.12-3.66%201.12h-5.89ZM9.27%207.347v3.362h1.97c.766%200%201.347-.17%201.733-.464.38-.291.587-.716.587-1.27%200-.53-.183-.928-.513-1.198-.334-.273-.838-.43-1.505-.43H9.27Zm0%205.606v3.791h2.389c.832%200%201.448-.177%201.853-.497.399-.315.614-.786.614-1.423%200-.62-.22-1.077-.63-1.385-.418-.313-1.053-.486-1.905-.486H9.27Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E)}trix-toolbar .trix-button--icon-italic:before{background-image:url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M9%205h6.5v2h-2.23l-2.31%2010H13v2H6v-2h2.461l2.306-10H9V5Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E)}trix-toolbar .trix-button--icon-link:before{background-image:url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M18.948%205.258a4.337%204.337%200%200%200-6.108%200L11.217%206.87a.993.993%200%200%200%200%201.41c.392.39%201.027.39%201.418%200l1.623-1.613a2.323%202.323%200%200%201%203.271%200%202.29%202.29%200%200%201%200%203.251l-2.393%202.38a3.021%203.021%200%200%201-4.255%200l-.05-.049a1.007%201.007%200%200%200-1.418%200%20.993.993%200%200%200%200%201.41l.05.049a5.036%205.036%200%200%200%207.091%200l2.394-2.38a4.275%204.275%200%200%200%200-6.072Zm-13.683%2013.6a4.337%204.337%200%200%200%206.108%200l1.262-1.255a.993.993%200%200%200%200-1.41%201.007%201.007%200%200%200-1.418%200L9.954%2017.45a2.323%202.323%200%200%201-3.27%200%202.29%202.29%200%200%201%200-3.251l2.344-2.331a2.579%202.579%200%200%201%203.631%200c.392.39%201.027.39%201.419%200a.993.993%200%200%200%200-1.41%204.593%204.593%200%200%200-6.468%200l-2.345%202.33a4.275%204.275%200%200%200%200%206.072Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E)}trix-toolbar .trix-button--icon-strike:before{background-image:url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M6%2014.986c.088%202.647%202.246%204.258%205.635%204.258%203.496%200%205.713-1.728%205.713-4.463%200-.275-.02-.536-.062-.781h-3.461c.398.293.573.654.573%201.123%200%201.035-1.074%201.787-2.646%201.787-1.563%200-2.773-.762-2.91-1.924H6ZM6.432%2010h3.763c-.632-.314-.914-.715-.914-1.273%200-1.045.977-1.739%202.432-1.739%201.475%200%202.52.723%202.617%201.914h2.764c-.05-2.548-2.11-4.238-5.39-4.238-3.145%200-5.392%201.719-5.392%204.316%200%20.363.04.703.12%201.02ZM4%2011a1%201%200%201%200%200%202h15a1%201%200%201%200%200-2H4Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E)}trix-toolbar .trix-button--icon-quote:before{background-image:url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M4.581%208.471c.44-.5%201.056-.834%201.758-.995C8.074%207.17%209.201%207.822%2010%208.752c1.354%201.578%201.33%203.555.394%205.277-.941%201.731-2.788%203.163-4.988%203.56a.622.622%200%200%201-.653-.317c-.113-.205-.121-.49.16-.764.294-.286.567-.566.791-.835.222-.266.413-.54.524-.815.113-.28.156-.597.026-.908-.128-.303-.39-.524-.72-.69a3.02%203.02%200%200%201-1.674-2.7c0-.905.283-1.59.72-2.088Zm9.419%200c.44-.5%201.055-.834%201.758-.995%201.734-.306%202.862.346%203.66%201.276%201.355%201.578%201.33%203.555.395%205.277-.941%201.731-2.789%203.163-4.988%203.56a.622.622%200%200%201-.653-.317c-.113-.205-.122-.49.16-.764.294-.286.567-.566.791-.835.222-.266.412-.54.523-.815.114-.28.157-.597.026-.908-.127-.303-.39-.524-.72-.69a3.02%203.02%200%200%201-1.672-2.701c0-.905.283-1.59.72-2.088Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E)}trix-toolbar .trix-button--icon-heading-1:before{background-image:url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M21.5%207.5v-3h-12v3H14v13h3v-13h4.5ZM9%2013.5h3.5v-3h-10v3H6v7h3v-7Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E)}trix-toolbar .trix-button--icon-code:before{background-image:url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M3.293%2011.293a1%201%200%200%200%200%201.414l4%204a1%201%200%201%200%201.414-1.414L5.414%2012l3.293-3.293a1%201%200%200%200-1.414-1.414l-4%204Zm13.414%205.414%204-4a1%201%200%200%200%200-1.414l-4-4a1%201%200%201%200-1.414%201.414L18.586%2012l-3.293%203.293a1%201%200%200%200%201.414%201.414Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E)}trix-toolbar .trix-button--icon-bullet-list:before{background-image:url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M5%207.5a1.5%201.5%200%201%200%200-3%201.5%201.5%200%200%200%200%203ZM8%206a1%201%200%200%201%201-1h11a1%201%200%201%201%200%202H9a1%201%200%200%201-1-1Zm1%205a1%201%200%201%200%200%202h11a1%201%200%201%200%200-2H9Zm0%206a1%201%200%201%200%200%202h11a1%201%200%201%200%200-2H9Zm-2.5-5a1.5%201.5%200%201%201-3%200%201.5%201.5%200%200%201%203%200ZM5%2019.5a1.5%201.5%200%201%200%200-3%201.5%201.5%200%200%200%200%203Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E)}trix-toolbar .trix-button--icon-number-list:before{background-image:url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M3%204h2v4H4V5H3V4Zm5%202a1%201%200%200%201%201-1h11a1%201%200%201%201%200%202H9a1%201%200%200%201-1-1Zm1%205a1%201%200%201%200%200%202h11a1%201%200%201%200%200-2H9Zm0%206a1%201%200%201%200%200%202h11a1%201%200%201%200%200-2H9Zm-3.5-7H6v1l-1.5%202H6v1H3v-1l1.667-2H3v-1h2.5ZM3%2017v-1h3v4H3v-1h2v-.5H4v-1h1V17H3Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E)}trix-toolbar .trix-button--icon-undo:before{background-image:url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M3%2014a1%201%200%200%200%201%201h6a1%201%200%201%200%200-2H6.257c2.247-2.764%205.151-3.668%207.579-3.264%202.589.432%204.739%202.356%205.174%205.405a1%201%200%200%200%201.98-.283c-.564-3.95-3.415-6.526-6.825-7.095C11.084%207.25%207.63%208.377%205%2011.39V8a1%201%200%200%200-2%200v6Zm2-1Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E)}trix-toolbar .trix-button--icon-redo:before{background-image:url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M21%2014a1%201%200%200%201-1%201h-6a1%201%200%201%201%200-2h3.743c-2.247-2.764-5.151-3.668-7.579-3.264-2.589.432-4.739%202.356-5.174%205.405a1%201%200%200%201-1.98-.283c.564-3.95%203.415-6.526%206.826-7.095%203.08-.513%206.534.614%209.164%203.626V8a1%201%200%201%201%202%200v6Zm-2-1Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E)}trix-toolbar .trix-button--icon-decrease-nesting-level:before{background-image:url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M5%206a1%201%200%200%201%201-1h12a1%201%200%201%201%200%202H6a1%201%200%200%201-1-1Zm4%205a1%201%200%201%200%200%202h9a1%201%200%201%200%200-2H9Zm-3%206a1%201%200%201%200%200%202h12a1%201%200%201%200%200-2H6Zm-3.707-5.707a1%201%200%200%200%200%201.414l2%202a1%201%200%201%200%201.414-1.414L4.414%2012l1.293-1.293a1%201%200%200%200-1.414-1.414l-2%202Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E)}trix-toolbar .trix-button--icon-increase-nesting-level:before{background-image:url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M5%206a1%201%200%200%201%201-1h12a1%201%200%201%201%200%202H6a1%201%200%200%201-1-1Zm4%205a1%201%200%201%200%200%202h9a1%201%200%201%200%200-2H9Zm-3%206a1%201%200%201%200%200%202h12a1%201%200%201%200%200-2H6Zm-2.293-2.293%202-2a1%201%200%200%200%200-1.414l-2-2a1%201%200%201%200-1.414%201.414L3.586%2012l-1.293%201.293a1%201%200%201%200%201.414%201.414Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E)}trix-toolbar .trix-dialogs{position:relative}trix-toolbar .trix-dialog{position:absolute;top:0;left:0;right:0;font-size:.75em;padding:15px 10px;background:#fff;box-shadow:0 .3em 1em #ccc;border-top:2px solid #888;border-radius:5px;z-index:5}trix-toolbar .trix-input--dialog{font-size:inherit;font-weight:400;padding:.5em .8em;margin:0 10px 0 0;border-radius:3px;border:1px solid #bbb;background-color:#fff;box-shadow:none;outline:none;-webkit-appearance:none;-moz-appearance:none}trix-toolbar .trix-input--dialog.validate:invalid{box-shadow:red 0 0 1.5px 1px}trix-toolbar .trix-button--dialog{font-size:inherit;padding:.5em;border-bottom:none}trix-toolbar .trix-dialog--link{max-width:600px}trix-toolbar .trix-dialog__link-fields{display:flex;align-items:baseline}trix-toolbar .trix-dialog__link-fields .trix-input{flex:1}trix-toolbar .trix-dialog__link-fields .trix-button-group{flex:0 0 content;margin:0}trix-editor [data-trix-mutable]:not(.attachment__caption-editor){-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}trix-editor [data-trix-mutable] ::-moz-selection,trix-editor [data-trix-mutable]::-moz-selection,trix-editor [data-trix-cursor-target]::-moz-selection{background:none}trix-editor [data-trix-mutable] ::selection,trix-editor [data-trix-mutable]::selection,trix-editor [data-trix-cursor-target]::selection{background:none}trix-editor [data-trix-mutable].attachment__caption-editor:focus::-moz-selection{background:highlight}trix-editor [data-trix-mutable].attachment__caption-editor:focus::selection{background:highlight}trix-editor [data-trix-mutable].attachment.attachment--file{box-shadow:0 0 0 2px highlight;border-color:transparent}trix-editor [data-trix-mutable].attachment img{box-shadow:0 0 0 2px highlight}trix-editor .attachment{position:relative}trix-editor .attachment:hover{cursor:default}trix-editor .attachment--preview .attachment__caption:hover{cursor:text}trix-editor .attachment__progress{position:absolute;z-index:1;height:20px;top:calc(50% - 10px);left:5%;width:90%;opacity:.9;transition:opacity .2s ease-in}trix-editor .attachment__progress[value="100"]{opacity:0}trix-editor .attachment__caption-editor{display:inline-block;width:100%;margin:0;padding:0;font-size:inherit;font-family:inherit;line-height:inherit;color:inherit;text-align:center;vertical-align:top;border:none;outline:none;-webkit-appearance:none;-moz-appearance:none}trix-editor .attachment__toolbar{position:absolute;z-index:1;top:-.9em;left:0;width:100%;text-align:center}trix-editor .trix-button-group{display:inline-flex}trix-editor .trix-button{position:relative;float:left;color:#666;white-space:nowrap;font-size:80%;padding:0 .8em;margin:0;outline:none;border:none;border-radius:0;background:transparent}trix-editor .trix-button:not(:first-child){border-left:1px solid #ccc}trix-editor .trix-button.trix-active{background:#cbeefa}trix-editor .trix-button:not(:disabled){cursor:pointer}trix-editor .trix-button--remove{text-indent:-9999px;display:inline-block;padding:0;outline:none;width:1.8em;height:1.8em;line-height:1.8em;border-radius:50%;background-color:#fff;border:2px solid highlight;box-shadow:1px 1px 6px #00000040}trix-editor .trix-button--remove:before{display:inline-block;position:absolute;inset:0;opacity:.7;content:"";background-image:url(data:image/svg+xml,%3Csvg%20height%3D%2224%22%20width%3D%2224%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M19%206.41%2017.59%205%2012%2010.59%206.41%205%205%206.41%2010.59%2012%205%2017.59%206.41%2019%2012%2013.41%2017.59%2019%2019%2017.59%2013.41%2012z%22%2F%3E%3Cpath%20d%3D%22M0%200h24v24H0z%22%20fill%3D%22none%22%2F%3E%3C%2Fsvg%3E);background-position:center;background-repeat:no-repeat;background-size:90%}trix-editor .trix-button--remove:hover{border-color:#333}trix-editor .trix-button--remove:hover:before{opacity:1}trix-editor .attachment__metadata-container{position:relative}trix-editor .attachment__metadata{position:absolute;left:50%;top:2em;transform:translate(-50%);max-width:90%;padding:.1em .6em;font-size:.8em;color:#fff;background-color:#000000b3;border-radius:3px}trix-editor .attachment__metadata .attachment__name{display:inline-block;max-width:100%;vertical-align:bottom;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}trix-editor .attachment__metadata .attachment__size{margin-left:.2em;white-space:nowrap}.trix-content{line-height:1.5;overflow-wrap:break-word;word-break:break-word}.trix-content *{box-sizing:border-box;margin:0;padding:0}.trix-content h1{font-size:1.2em;line-height:1.2}.trix-content blockquote{border:0 solid #ccc;border-left-width:.3em;margin-left:.3em;padding-left:.6em}.trix-content [dir=rtl] blockquote,.trix-content blockquote[dir=rtl]{border-width:0;border-right-width:.3em;margin-right:.3em;padding-right:.6em}.trix-content li{margin-left:1em}.trix-content [dir=rtl] li{margin-right:1em}.trix-content pre{display:inline-block;width:100%;vertical-align:top;font-family:monospace;font-size:.9em;padding:.5em;white-space:pre;background-color:#eee;overflow-x:auto}.trix-content img{max-width:100%;height:auto}.trix-content .attachment{display:inline-block;position:relative;max-width:100%}.trix-content .attachment a{color:inherit;text-decoration:none}.trix-content .attachment a:hover,.trix-content .attachment a:visited:hover{color:inherit}.trix-content .attachment__caption{text-align:center}.trix-content .attachment__caption .attachment__name+.attachment__size:before{content:" \2022"}.trix-content .attachment--preview{width:100%;text-align:center}.trix-content .attachment--preview .attachment__caption{color:#666;font-size:.9em;line-height:1.2}.trix-content .attachment--file{color:#333;line-height:1;margin:0 2px 2px;padding:.4em 1em;border:1px solid #bbb;border-radius:5px}.trix-content .attachment-gallery{display:flex;flex-wrap:wrap;position:relative}.trix-content .attachment-gallery .attachment{flex:1 0 33%;padding:0 .5em;max-width:33%}.trix-content .attachment-gallery.attachment-gallery--2 .attachment,.trix-content .attachment-gallery.attachment-gallery--4 .attachment{flex-basis:50%;max-width:50%} diff --git a/public/vendor/rich-text-laravel/trix-rich-text-laravel-attachments-5258f25c.css b/public/vendor/rich-text-laravel/trix-rich-text-laravel-attachments-5258f25c.css new file mode 100644 index 00000000..b53ad43b --- /dev/null +++ b/public/vendor/rich-text-laravel/trix-rich-text-laravel-attachments-5258f25c.css @@ -0,0 +1 @@ +.trix-content .attachment-gallery>rich-text-attachment,.trix-content .attachment-gallery>.attachment{flex:1 0 33%;padding:0 .5em;max-width:33%}.trix-content .attachment-gallery.attachment-gallery--2>rich-text-attachment,.trix-content .attachment-gallery.attachment-gallery--2>.attachment,.trix-content .attachment-gallery.attachment-gallery--4>rich-text-attachment,.trix-content .attachment-gallery.attachment-gallery--4>.attachment{flex-basis:50%;max-width:50%}.trix-content rich-text-attachment .attachment{padding:0!important;max-width:100%!important} diff --git a/public/vendor/rich-text-laravel/trix-rich-text-laravel-d74ec4d1.css b/public/vendor/rich-text-laravel/trix-rich-text-laravel-d74ec4d1.css new file mode 100644 index 00000000..498b602b --- /dev/null +++ b/public/vendor/rich-text-laravel/trix-rich-text-laravel-d74ec4d1.css @@ -0,0 +1 @@ +trix-editor{border:1px solid #bbb;border-radius:3px;margin:0;padding:.4em .6em;min-height:5em;outline:none}trix-toolbar *{box-sizing:border-box}trix-toolbar .trix-button-row{display:flex;flex-wrap:nowrap;justify-content:space-between;overflow-x:auto}trix-toolbar .trix-button-group{display:flex;margin-bottom:10px;border:1px solid #bbb;border-top-color:#ccc;border-bottom-color:#888;border-radius:3px}trix-toolbar .trix-button-group:not(:first-child){margin-left:1.5vw}@media (max-width: 768px){trix-toolbar .trix-button-group:not(:first-child){margin-left:0}}trix-toolbar .trix-button-group-spacer{flex-grow:1}@media (max-width: 768px){trix-toolbar .trix-button-group-spacer{display:none}}trix-toolbar .trix-button{position:relative;float:left;color:#0009;font-size:.75em;font-weight:600;white-space:nowrap;padding:0 .5em;margin:0;outline:none;border:none;border-bottom:1px solid #ddd;border-radius:0;background:transparent}trix-toolbar .trix-button:not(:first-child){border-left:1px solid #ccc}trix-toolbar .trix-button.trix-active{background:#cbeefa;color:#000}trix-toolbar .trix-button:not(:disabled){cursor:pointer}trix-toolbar .trix-button:disabled{color:#00000020}@media (max-width: 768px){trix-toolbar .trix-button{letter-spacing:-.01em;padding:0 .3em}}trix-toolbar .trix-button--icon{font-size:inherit;width:2.6em;height:1.6em;max-width:calc(.8em + 4vw);text-indent:-9999px}@media (max-width: 768px){trix-toolbar .trix-button--icon{height:2em;max-width:calc(.8em + 3.5vw)}}trix-toolbar .trix-button--icon:before{display:inline-block;position:absolute;inset:0;opacity:.6;content:"";background-position:center;background-repeat:no-repeat;background-size:contain}@media (max-width: 768px){trix-toolbar .trix-button--icon:before{right:6%;left:6%}}trix-toolbar .trix-button--icon.trix-active:before{opacity:1}trix-toolbar .trix-button--icon:disabled:before{opacity:.125}trix-toolbar .trix-button--icon-attach:before{background-image:url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M10.5%2018V7.5c0-2.25%203-2.25%203%200V18c0%204.125-6%204.125-6%200V7.5c0-6.375%209-6.375%209%200V18%22%20stroke%3D%22%23000%22%20stroke-width%3D%222%22%20stroke-miterlimit%3D%2210%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E);top:8%;bottom:4%}trix-toolbar .trix-button--icon-bold:before{background-image:url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M6.522%2019.242a.5.5%200%200%201-.5-.5V5.35a.5.5%200%200%201%20.5-.5h5.783c1.347%200%202.46.345%203.24.982.783.64%201.216%201.562%201.216%202.683%200%201.13-.587%202.129-1.476%202.71a.35.35%200%200%200%20.049.613c1.259.56%202.101%201.742%202.101%203.22%200%201.282-.483%202.334-1.363%203.063-.876.726-2.132%201.12-3.66%201.12h-5.89ZM9.27%207.347v3.362h1.97c.766%200%201.347-.17%201.733-.464.38-.291.587-.716.587-1.27%200-.53-.183-.928-.513-1.198-.334-.273-.838-.43-1.505-.43H9.27Zm0%205.606v3.791h2.389c.832%200%201.448-.177%201.853-.497.399-.315.614-.786.614-1.423%200-.62-.22-1.077-.63-1.385-.418-.313-1.053-.486-1.905-.486H9.27Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E)}trix-toolbar .trix-button--icon-italic:before{background-image:url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M9%205h6.5v2h-2.23l-2.31%2010H13v2H6v-2h2.461l2.306-10H9V5Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E)}trix-toolbar .trix-button--icon-link:before{background-image:url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M18.948%205.258a4.337%204.337%200%200%200-6.108%200L11.217%206.87a.993.993%200%200%200%200%201.41c.392.39%201.027.39%201.418%200l1.623-1.613a2.323%202.323%200%200%201%203.271%200%202.29%202.29%200%200%201%200%203.251l-2.393%202.38a3.021%203.021%200%200%201-4.255%200l-.05-.049a1.007%201.007%200%200%200-1.418%200%20.993.993%200%200%200%200%201.41l.05.049a5.036%205.036%200%200%200%207.091%200l2.394-2.38a4.275%204.275%200%200%200%200-6.072Zm-13.683%2013.6a4.337%204.337%200%200%200%206.108%200l1.262-1.255a.993.993%200%200%200%200-1.41%201.007%201.007%200%200%200-1.418%200L9.954%2017.45a2.323%202.323%200%200%201-3.27%200%202.29%202.29%200%200%201%200-3.251l2.344-2.331a2.579%202.579%200%200%201%203.631%200c.392.39%201.027.39%201.419%200a.993.993%200%200%200%200-1.41%204.593%204.593%200%200%200-6.468%200l-2.345%202.33a4.275%204.275%200%200%200%200%206.072Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E)}trix-toolbar .trix-button--icon-strike:before{background-image:url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M6%2014.986c.088%202.647%202.246%204.258%205.635%204.258%203.496%200%205.713-1.728%205.713-4.463%200-.275-.02-.536-.062-.781h-3.461c.398.293.573.654.573%201.123%200%201.035-1.074%201.787-2.646%201.787-1.563%200-2.773-.762-2.91-1.924H6ZM6.432%2010h3.763c-.632-.314-.914-.715-.914-1.273%200-1.045.977-1.739%202.432-1.739%201.475%200%202.52.723%202.617%201.914h2.764c-.05-2.548-2.11-4.238-5.39-4.238-3.145%200-5.392%201.719-5.392%204.316%200%20.363.04.703.12%201.02ZM4%2011a1%201%200%201%200%200%202h15a1%201%200%201%200%200-2H4Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E)}trix-toolbar .trix-button--icon-quote:before{background-image:url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M4.581%208.471c.44-.5%201.056-.834%201.758-.995C8.074%207.17%209.201%207.822%2010%208.752c1.354%201.578%201.33%203.555.394%205.277-.941%201.731-2.788%203.163-4.988%203.56a.622.622%200%200%201-.653-.317c-.113-.205-.121-.49.16-.764.294-.286.567-.566.791-.835.222-.266.413-.54.524-.815.113-.28.156-.597.026-.908-.128-.303-.39-.524-.72-.69a3.02%203.02%200%200%201-1.674-2.7c0-.905.283-1.59.72-2.088Zm9.419%200c.44-.5%201.055-.834%201.758-.995%201.734-.306%202.862.346%203.66%201.276%201.355%201.578%201.33%203.555.395%205.277-.941%201.731-2.789%203.163-4.988%203.56a.622.622%200%200%201-.653-.317c-.113-.205-.122-.49.16-.764.294-.286.567-.566.791-.835.222-.266.412-.54.523-.815.114-.28.157-.597.026-.908-.127-.303-.39-.524-.72-.69a3.02%203.02%200%200%201-1.672-2.701c0-.905.283-1.59.72-2.088Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E)}trix-toolbar .trix-button--icon-heading-1:before{background-image:url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M21.5%207.5v-3h-12v3H14v13h3v-13h4.5ZM9%2013.5h3.5v-3h-10v3H6v7h3v-7Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E)}trix-toolbar .trix-button--icon-code:before{background-image:url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M3.293%2011.293a1%201%200%200%200%200%201.414l4%204a1%201%200%201%200%201.414-1.414L5.414%2012l3.293-3.293a1%201%200%200%200-1.414-1.414l-4%204Zm13.414%205.414%204-4a1%201%200%200%200%200-1.414l-4-4a1%201%200%201%200-1.414%201.414L18.586%2012l-3.293%203.293a1%201%200%200%200%201.414%201.414Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E)}trix-toolbar .trix-button--icon-bullet-list:before{background-image:url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M5%207.5a1.5%201.5%200%201%200%200-3%201.5%201.5%200%200%200%200%203ZM8%206a1%201%200%200%201%201-1h11a1%201%200%201%201%200%202H9a1%201%200%200%201-1-1Zm1%205a1%201%200%201%200%200%202h11a1%201%200%201%200%200-2H9Zm0%206a1%201%200%201%200%200%202h11a1%201%200%201%200%200-2H9Zm-2.5-5a1.5%201.5%200%201%201-3%200%201.5%201.5%200%200%201%203%200ZM5%2019.5a1.5%201.5%200%201%200%200-3%201.5%201.5%200%200%200%200%203Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E)}trix-toolbar .trix-button--icon-number-list:before{background-image:url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M3%204h2v4H4V5H3V4Zm5%202a1%201%200%200%201%201-1h11a1%201%200%201%201%200%202H9a1%201%200%200%201-1-1Zm1%205a1%201%200%201%200%200%202h11a1%201%200%201%200%200-2H9Zm0%206a1%201%200%201%200%200%202h11a1%201%200%201%200%200-2H9Zm-3.5-7H6v1l-1.5%202H6v1H3v-1l1.667-2H3v-1h2.5ZM3%2017v-1h3v4H3v-1h2v-.5H4v-1h1V17H3Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E)}trix-toolbar .trix-button--icon-undo:before{background-image:url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M3%2014a1%201%200%200%200%201%201h6a1%201%200%201%200%200-2H6.257c2.247-2.764%205.151-3.668%207.579-3.264%202.589.432%204.739%202.356%205.174%205.405a1%201%200%200%200%201.98-.283c-.564-3.95-3.415-6.526-6.825-7.095C11.084%207.25%207.63%208.377%205%2011.39V8a1%201%200%200%200-2%200v6Zm2-1Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E)}trix-toolbar .trix-button--icon-redo:before{background-image:url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M21%2014a1%201%200%200%201-1%201h-6a1%201%200%201%201%200-2h3.743c-2.247-2.764-5.151-3.668-7.579-3.264-2.589.432-4.739%202.356-5.174%205.405a1%201%200%200%201-1.98-.283c.564-3.95%203.415-6.526%206.826-7.095%203.08-.513%206.534.614%209.164%203.626V8a1%201%200%201%201%202%200v6Zm-2-1Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E)}trix-toolbar .trix-button--icon-decrease-nesting-level:before{background-image:url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M5%206a1%201%200%200%201%201-1h12a1%201%200%201%201%200%202H6a1%201%200%200%201-1-1Zm4%205a1%201%200%201%200%200%202h9a1%201%200%201%200%200-2H9Zm-3%206a1%201%200%201%200%200%202h12a1%201%200%201%200%200-2H6Zm-3.707-5.707a1%201%200%200%200%200%201.414l2%202a1%201%200%201%200%201.414-1.414L4.414%2012l1.293-1.293a1%201%200%200%200-1.414-1.414l-2%202Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E)}trix-toolbar .trix-button--icon-increase-nesting-level:before{background-image:url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M5%206a1%201%200%200%201%201-1h12a1%201%200%201%201%200%202H6a1%201%200%200%201-1-1Zm4%205a1%201%200%201%200%200%202h9a1%201%200%201%200%200-2H9Zm-3%206a1%201%200%201%200%200%202h12a1%201%200%201%200%200-2H6Zm-2.293-2.293%202-2a1%201%200%200%200%200-1.414l-2-2a1%201%200%201%200-1.414%201.414L3.586%2012l-1.293%201.293a1%201%200%201%200%201.414%201.414Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E)}trix-toolbar .trix-dialogs{position:relative}trix-toolbar .trix-dialog{position:absolute;top:0;left:0;right:0;font-size:.75em;padding:15px 10px;background:#fff;box-shadow:0 .3em 1em #ccc;border-top:2px solid #888;border-radius:5px;z-index:5}trix-toolbar .trix-input--dialog{font-size:inherit;font-weight:400;padding:.5em .8em;margin:0 10px 0 0;border-radius:3px;border:1px solid #bbb;background-color:#fff;box-shadow:none;outline:none;-webkit-appearance:none;-moz-appearance:none}trix-toolbar .trix-input--dialog.validate:invalid{box-shadow:red 0 0 1.5px 1px}trix-toolbar .trix-button--dialog{font-size:inherit;padding:.5em;border-bottom:none}trix-toolbar .trix-dialog--link{max-width:600px}trix-toolbar .trix-dialog__link-fields{display:flex;align-items:baseline}trix-toolbar .trix-dialog__link-fields .trix-input{flex:1}trix-toolbar .trix-dialog__link-fields .trix-button-group{flex:0 0 content;margin:0}trix-editor [data-trix-mutable]:not(.attachment__caption-editor){-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}trix-editor [data-trix-mutable]::-moz-selection,trix-editor [data-trix-cursor-target]::-moz-selection,trix-editor [data-trix-mutable] ::-moz-selection{background:none}trix-editor [data-trix-mutable]::selection,trix-editor [data-trix-cursor-target]::selection,trix-editor [data-trix-mutable] ::selection{background:none}trix-editor .attachment__caption-editor:focus[data-trix-mutable]::-moz-selection{background:highlight}trix-editor .attachment__caption-editor:focus[data-trix-mutable]::selection{background:highlight}trix-editor [data-trix-mutable].attachment.attachment--file{box-shadow:0 0 0 2px highlight;border-color:transparent}trix-editor [data-trix-mutable].attachment img{box-shadow:0 0 0 2px highlight}trix-editor .attachment{position:relative}trix-editor .attachment:hover{cursor:default}trix-editor .attachment--preview .attachment__caption:hover{cursor:text}trix-editor .attachment__progress{position:absolute;z-index:1;height:20px;top:calc(50% - 10px);left:5%;width:90%;opacity:.9;transition:opacity .2s ease-in}trix-editor .attachment__progress[value="100"]{opacity:0}trix-editor .attachment__caption-editor{display:inline-block;width:100%;margin:0;padding:0;font-size:inherit;font-family:inherit;line-height:inherit;color:inherit;text-align:center;vertical-align:top;border:none;outline:none;-webkit-appearance:none;-moz-appearance:none}trix-editor .attachment__toolbar{position:absolute;z-index:1;top:-.9em;left:0;width:100%;text-align:center}trix-editor .trix-button-group{display:inline-flex}trix-editor .trix-button{position:relative;float:left;color:#666;white-space:nowrap;font-size:80%;padding:0 .8em;margin:0;outline:none;border:none;border-radius:0;background:transparent}trix-editor .trix-button:not(:first-child){border-left:1px solid #ccc}trix-editor .trix-button.trix-active{background:#cbeefa}trix-editor .trix-button:not(:disabled){cursor:pointer}trix-editor .trix-button--remove{text-indent:-9999px;display:inline-block;padding:0;outline:none;width:1.8em;height:1.8em;line-height:1.8em;border-radius:50%;background-color:#fff;border:2px solid highlight;box-shadow:1px 1px 6px #00000040}trix-editor .trix-button--remove:before{display:inline-block;position:absolute;inset:0;opacity:.7;content:"";background-image:url(data:image/svg+xml,%3Csvg%20height%3D%2224%22%20width%3D%2224%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M19%206.41%2017.59%205%2012%2010.59%206.41%205%205%206.41%2010.59%2012%205%2017.59%206.41%2019%2012%2013.41%2017.59%2019%2019%2017.59%2013.41%2012z%22%2F%3E%3Cpath%20d%3D%22M0%200h24v24H0z%22%20fill%3D%22none%22%2F%3E%3C%2Fsvg%3E);background-position:center;background-repeat:no-repeat;background-size:90%}trix-editor .trix-button--remove:hover{border-color:#333}trix-editor .trix-button--remove:hover:before{opacity:1}trix-editor .attachment__metadata-container{position:relative}trix-editor .attachment__metadata{position:absolute;left:50%;top:2em;transform:translate(-50%);max-width:90%;padding:.1em .6em;font-size:.8em;color:#fff;background-color:#000000b3;border-radius:3px}trix-editor .attachment__metadata .attachment__name{display:inline-block;max-width:100%;vertical-align:bottom;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}trix-editor .attachment__metadata .attachment__size{margin-left:.2em;white-space:nowrap}.trix-content{line-height:1.5}.trix-content *{box-sizing:border-box;margin:0;padding:0}.trix-content h1{font-size:1.4em;line-height:1.2;font-weight:700;margin:.5em 0}.trix-content blockquote{border:0 solid #ccc;border-left-width:.3em;margin-left:.3em;padding-left:.6em}.trix-content [dir=rtl] blockquote,.trix-content blockquote[dir=rtl]{border-width:0;border-right-width:.3em;margin-right:.3em;padding-right:.6em}.trix-content ul,.trix-content ol{margin-left:1em}.trix-content [dir=rtl] ul,.trix-content [dir=rtl] ol,.trix-content ul[dir=rtl],.trix-content ol[dir=rtl]{margin-left:0;margin-right:1em}.trix-content ul li{list-style-type:disc}.trix-content ol li{list-style-type:numeral}.trix-content li{margin-left:1em}.trix-content [dir=rtl] li{margin-right:1em}.trix-content pre{display:inline-block;width:100%;vertical-align:top;font-family:monospace;font-size:.9em;padding:1em;margin:1em 0;white-space:pre;background-color:#eee;overflow-x:auto}.trix-content img{max-width:100%;height:auto}.trix-content a{color:inherit;text-decoration:underline;text-underline-offset:2px}.trix-content .attachment{display:inline-block;position:relative;max-width:100%}.trix-content .attachment a{color:inherit;text-decoration:none}.trix-content .attachment a:hover,.trix-content .attachment a:visited:hover{color:inherit}.trix-content .attachment__caption{text-align:center}.trix-content .attachment__caption .attachment__name+.attachment__size:before,.trix-content .attachment__caption .attachment__size+.attachment__download:before{content:" \2022"}.trix-content .attachment--preview{width:100%;text-align:center}.trix-content .attachment--preview .attachment__caption{color:#666;font-size:.9em;line-height:1.2}.trix-content .attachment--file{color:#333;line-height:1;margin:0 2px 2px;padding:.4em 1em;border:1px solid #bbb;border-radius:5px}.trix-content .attachment-gallery{display:flex;flex-wrap:wrap;position:relative;margin:1em -.5em}.trix-content .attachment-gallery .attachment{flex:1 0 33%;padding:0 .5em;max-width:33%}.trix-content .attachment-gallery.attachment-gallery--2 .attachment,.trix-content .attachment-gallery.attachment-gallery--4 .attachment{flex-basis:50%;max-width:50%} diff --git a/public/vendor/rich-text-laravel/trix-rich-text-laravel-daisyui-33127e56.css b/public/vendor/rich-text-laravel/trix-rich-text-laravel-daisyui-33127e56.css new file mode 100644 index 00000000..7806ccc6 --- /dev/null +++ b/public/vendor/rich-text-laravel/trix-rich-text-laravel-daisyui-33127e56.css @@ -0,0 +1 @@ +trix-editor{background-color:var(--color-base-100);color:var(--color-base-content);border:var(--border) solid var(--input-color);border-radius:var(--radius-field);box-shadow:0 1px color-mix(in oklab,var(--input-color) calc(var(--depth) * 10%),#0000) inset,0 -1px oklch(100% 0 0 / calc(var(--depth) * .1)) inset;--input-color: color-mix(in oklab, var(--color-base-content) 20%, #0000);font-size:.875rem;margin:0;padding:.4em .6em;min-height:5em;outline:none}trix-editor:focus{--input-color: var(--color-base-content);box-shadow:0 1px color-mix(in oklab,var(--input-color) calc(var(--depth) * 10%),#0000);outline:2px solid var(--input-color);outline-offset:2px;isolation:isolate}trix-toolbar .trix-button-group{border:var(--border) solid color-mix(in oklab,var(--color-base-content) 20%,transparent);border-radius:var(--radius-field)}trix-toolbar .trix-button{color:var(--color-base-content);border-bottom:none;background:transparent}trix-toolbar .trix-button:not(:first-child){border-left:var(--border) solid color-mix(in oklab,var(--color-base-content) 15%,transparent)}trix-toolbar .trix-button:first-child{border-start-start-radius:calc(var(--radius-field) - var(--border));border-end-start-radius:calc(var(--radius-field) - var(--border))}trix-toolbar .trix-button:last-child{border-start-end-radius:calc(var(--radius-field) - var(--border));border-end-end-radius:calc(var(--radius-field) - var(--border))}trix-toolbar .trix-button.trix-active{background:color-mix(in oklab,var(--color-primary) 20%,transparent);color:var(--color-primary)}trix-toolbar .trix-button:disabled{color:color-mix(in oklab,var(--color-base-content) 40%,transparent)}trix-toolbar .trix-button--icon:before{background:currentColor;background-image:none;-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:contain;mask-size:contain}trix-toolbar .trix-button--icon-attach:before{-webkit-mask-image:url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M10.5%2018V7.5c0-2.25%203-2.25%203%200V18c0%204.125-6%204.125-6%200V7.5c0-6.375%209-6.375%209%200V18%22%20stroke%3D%22%23000%22%20stroke-width%3D%222%22%20stroke-miterlimit%3D%2210%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E);mask-image:url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M10.5%2018V7.5c0-2.25%203-2.25%203%200V18c0%204.125-6%204.125-6%200V7.5c0-6.375%209-6.375%209%200V18%22%20stroke%3D%22%23000%22%20stroke-width%3D%222%22%20stroke-miterlimit%3D%2210%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E)}trix-toolbar .trix-button--icon-bold:before{-webkit-mask-image:url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M6.522%2019.242a.5.5%200%200%201-.5-.5V5.35a.5.5%200%200%201%20.5-.5h5.783c1.347%200%202.46.345%203.24.982.783.64%201.216%201.562%201.216%202.683%200%201.13-.587%202.129-1.476%202.71a.35.35%200%200%200%20.049.613c1.259.56%202.101%201.742%202.101%203.22%200%201.282-.483%202.334-1.363%203.063-.876.726-2.132%201.12-3.66%201.12h-5.89ZM9.27%207.347v3.362h1.97c.766%200%201.347-.17%201.733-.464.38-.291.587-.716.587-1.27%200-.53-.183-.928-.513-1.198-.334-.273-.838-.43-1.505-.43H9.27Zm0%205.606v3.791h2.389c.832%200%201.448-.177%201.853-.497.399-.315.614-.786.614-1.423%200-.62-.22-1.077-.63-1.385-.418-.313-1.053-.486-1.905-.486H9.27Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E);mask-image:url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M6.522%2019.242a.5.5%200%200%201-.5-.5V5.35a.5.5%200%200%201%20.5-.5h5.783c1.347%200%202.46.345%203.24.982.783.64%201.216%201.562%201.216%202.683%200%201.13-.587%202.129-1.476%202.71a.35.35%200%200%200%20.049.613c1.259.56%202.101%201.742%202.101%203.22%200%201.282-.483%202.334-1.363%203.063-.876.726-2.132%201.12-3.66%201.12h-5.89ZM9.27%207.347v3.362h1.97c.766%200%201.347-.17%201.733-.464.38-.291.587-.716.587-1.27%200-.53-.183-.928-.513-1.198-.334-.273-.838-.43-1.505-.43H9.27Zm0%205.606v3.791h2.389c.832%200%201.448-.177%201.853-.497.399-.315.614-.786.614-1.423%200-.62-.22-1.077-.63-1.385-.418-.313-1.053-.486-1.905-.486H9.27Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E)}trix-toolbar .trix-button--icon-italic:before{-webkit-mask-image:url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M9%205h6.5v2h-2.23l-2.31%2010H13v2H6v-2h2.461l2.306-10H9V5Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E);mask-image:url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M9%205h6.5v2h-2.23l-2.31%2010H13v2H6v-2h2.461l2.306-10H9V5Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E)}trix-toolbar .trix-button--icon-link:before{-webkit-mask-image:url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M18.948%205.258a4.337%204.337%200%200%200-6.108%200L11.217%206.87a.993.993%200%200%200%200%201.41c.392.39%201.027.39%201.418%200l1.623-1.613a2.323%202.323%200%200%201%203.271%200%202.29%202.29%200%200%201%200%203.251l-2.393%202.38a3.021%203.021%200%200%201-4.255%200l-.05-.049a1.007%201.007%200%200%200-1.418%200%20.993.993%200%200%200%200%201.41l.05.049a5.036%205.036%200%200%200%207.091%200l2.394-2.38a4.275%204.275%200%200%200%200-6.072Zm-13.683%2013.6a4.337%204.337%200%200%200%206.108%200l1.262-1.255a.993.993%200%200%200%200-1.41%201.007%201.007%200%200%200-1.418%200L9.954%2017.45a2.323%202.323%200%200%201-3.27%200%202.29%202.29%200%200%201%200-3.251l2.344-2.331a2.579%202.579%200%200%201%203.631%200c.392.39%201.027.39%201.419%200a.993.993%200%200%200%200-1.41%204.593%204.593%200%200%200-6.468%200l-2.345%202.33a4.275%204.275%200%200%200%200%206.072Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E);mask-image:url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M18.948%205.258a4.337%204.337%200%200%200-6.108%200L11.217%206.87a.993.993%200%200%200%200%201.41c.392.39%201.027.39%201.418%200l1.623-1.613a2.323%202.323%200%200%201%203.271%200%202.29%202.29%200%200%201%200%203.251l-2.393%202.38a3.021%203.021%200%200%201-4.255%200l-.05-.049a1.007%201.007%200%200%200-1.418%200%20.993.993%200%200%200%200%201.41l.05.049a5.036%205.036%200%200%200%207.091%200l2.394-2.38a4.275%204.275%200%200%200%200-6.072Zm-13.683%2013.6a4.337%204.337%200%200%200%206.108%200l1.262-1.255a.993.993%200%200%200%200-1.41%201.007%201.007%200%200%200-1.418%200L9.954%2017.45a2.323%202.323%200%200%201-3.27%200%202.29%202.29%200%200%201%200-3.251l2.344-2.331a2.579%202.579%200%200%201%203.631%200c.392.39%201.027.39%201.419%200a.993.993%200%200%200%200-1.41%204.593%204.593%200%200%200-6.468%200l-2.345%202.33a4.275%204.275%200%200%200%200%206.072Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E)}trix-toolbar .trix-button--icon-strike:before{-webkit-mask-image:url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M6%2014.986c.088%202.647%202.246%204.258%205.635%204.258%203.496%200%205.713-1.728%205.713-4.463%200-.275-.02-.536-.062-.781h-3.461c.398.293.573.654.573%201.123%200%201.035-1.074%201.787-2.646%201.787-1.563%200-2.773-.762-2.91-1.924H6ZM6.432%2010h3.763c-.632-.314-.914-.715-.914-1.273%200-1.045.977-1.739%202.432-1.739%201.475%200%202.52.723%202.617%201.914h2.764c-.05-2.548-2.11-4.238-5.39-4.238-3.145%200-5.392%201.719-5.392%204.316%200%20.363.04.703.12%201.02ZM4%2011a1%201%200%201%200%200%202h15a1%201%200%201%200%200-2H4Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E);mask-image:url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M6%2014.986c.088%202.647%202.246%204.258%205.635%204.258%203.496%200%205.713-1.728%205.713-4.463%200-.275-.02-.536-.062-.781h-3.461c.398.293.573.654.573%201.123%200%201.035-1.074%201.787-2.646%201.787-1.563%200-2.773-.762-2.91-1.924H6ZM6.432%2010h3.763c-.632-.314-.914-.715-.914-1.273%200-1.045.977-1.739%202.432-1.739%201.475%200%202.52.723%202.617%201.914h2.764c-.05-2.548-2.11-4.238-5.39-4.238-3.145%200-5.392%201.719-5.392%204.316%200%20.363.04.703.12%201.02ZM4%2011a1%201%200%201%200%200%202h15a1%201%200%201%200%200-2H4Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E)}trix-toolbar .trix-button--icon-quote:before{-webkit-mask-image:url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M4.581%208.471c.44-.5%201.056-.834%201.758-.995C8.074%207.17%209.201%207.822%2010%208.752c1.354%201.578%201.33%203.555.394%205.277-.941%201.731-2.788%203.163-4.988%203.56a.622.622%200%200%201-.653-.317c-.113-.205-.121-.49.16-.764.294-.286.567-.566.791-.835.222-.266.413-.54.524-.815.113-.28.156-.597.026-.908-.128-.303-.39-.524-.72-.69a3.02%203.02%200%200%201-1.674-2.7c0-.905.283-1.59.72-2.088Zm9.419%200c.44-.5%201.055-.834%201.758-.995%201.734-.306%202.862.346%203.66%201.276%201.355%201.578%201.33%203.555.395%205.277-.941%201.731-2.789%203.163-4.988%203.56a.622.622%200%200%201-.653-.317c-.113-.205-.122-.49.16-.764.294-.286.567-.566.791-.835.222-.266.412-.54.523-.815.114-.28.157-.597.026-.908-.127-.303-.39-.524-.72-.69a3.02%203.02%200%200%201-1.672-2.701c0-.905.283-1.59.72-2.088Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E);mask-image:url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M4.581%208.471c.44-.5%201.056-.834%201.758-.995C8.074%207.17%209.201%207.822%2010%208.752c1.354%201.578%201.33%203.555.394%205.277-.941%201.731-2.788%203.163-4.988%203.56a.622.622%200%200%201-.653-.317c-.113-.205-.121-.49.16-.764.294-.286.567-.566.791-.835.222-.266.413-.54.524-.815.113-.28.156-.597.026-.908-.128-.303-.39-.524-.72-.69a3.02%203.02%200%200%201-1.674-2.7c0-.905.283-1.59.72-2.088Zm9.419%200c.44-.5%201.055-.834%201.758-.995%201.734-.306%202.862.346%203.66%201.276%201.355%201.578%201.33%203.555.395%205.277-.941%201.731-2.789%203.163-4.988%203.56a.622.622%200%200%201-.653-.317c-.113-.205-.122-.49.16-.764.294-.286.567-.566.791-.835.222-.266.412-.54.523-.815.114-.28.157-.597.026-.908-.127-.303-.39-.524-.72-.69a3.02%203.02%200%200%201-1.672-2.701c0-.905.283-1.59.72-2.088Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E)}trix-toolbar .trix-button--icon-heading-1:before{-webkit-mask-image:url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M21.5%207.5v-3h-12v3H14v13h3v-13h4.5ZM9%2013.5h3.5v-3h-10v3H6v7h3v-7Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E);mask-image:url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M21.5%207.5v-3h-12v3H14v13h3v-13h4.5ZM9%2013.5h3.5v-3h-10v3H6v7h3v-7Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E)}trix-toolbar .trix-button--icon-code:before{-webkit-mask-image:url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M3.293%2011.293a1%201%200%200%200%200%201.414l4%204a1%201%200%201%200%201.414-1.414L5.414%2012l3.293-3.293a1%201%200%200%200-1.414-1.414l-4%204Zm13.414%205.414%204-4a1%201%200%200%200%200-1.414l-4-4a1%201%200%201%200-1.414%201.414L18.586%2012l-3.293%203.293a1%201%200%200%200%201.414%201.414Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E);mask-image:url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M3.293%2011.293a1%201%200%200%200%200%201.414l4%204a1%201%200%201%200%201.414-1.414L5.414%2012l3.293-3.293a1%201%200%200%200-1.414-1.414l-4%204Zm13.414%205.414%204-4a1%201%200%200%200%200-1.414l-4-4a1%201%200%201%200-1.414%201.414L18.586%2012l-3.293%203.293a1%201%200%200%200%201.414%201.414Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E)}trix-toolbar .trix-button--icon-bullet-list:before{-webkit-mask-image:url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M5%207.5a1.5%201.5%200%201%200%200-3%201.5%201.5%200%200%200%200%203ZM8%206a1%201%200%200%201%201-1h11a1%201%200%201%201%200%202H9a1%201%200%200%201-1-1Zm1%205a1%201%200%201%200%200%202h11a1%201%200%201%200%200-2H9Zm0%206a1%201%200%201%200%200%202h11a1%201%200%201%200%200-2H9Zm-2.5-5a1.5%201.5%200%201%201-3%200%201.5%201.5%200%200%201%203%200ZM5%2019.5a1.5%201.5%200%201%200%200-3%201.5%201.5%200%200%200%200%203Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E);mask-image:url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M5%207.5a1.5%201.5%200%201%200%200-3%201.5%201.5%200%200%200%200%203ZM8%206a1%201%200%200%201%201-1h11a1%201%200%201%201%200%202H9a1%201%200%200%201-1-1Zm1%205a1%201%200%201%200%200%202h11a1%201%200%201%200%200-2H9Zm0%206a1%201%200%201%200%200%202h11a1%201%200%201%200%200-2H9Zm-2.5-5a1.5%201.5%200%201%201-3%200%201.5%201.5%200%200%201%203%200ZM5%2019.5a1.5%201.5%200%201%200%200-3%201.5%201.5%200%200%200%200%203Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E)}trix-toolbar .trix-button--icon-number-list:before{-webkit-mask-image:url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M3%204h2v4H4V5H3V4Zm5%202a1%201%200%200%201%201-1h11a1%201%200%201%201%200%202H9a1%201%200%200%201-1-1Zm1%205a1%201%200%201%200%200%202h11a1%201%200%201%200%200-2H9Zm0%206a1%201%200%201%200%200%202h11a1%201%200%201%200%200-2H9Zm-3.5-7H6v1l-1.5%202H6v1H3v-1l1.667-2H3v-1h2.5ZM3%2017v-1h3v4H3v-1h2v-.5H4v-1h1V17H3Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E);mask-image:url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M3%204h2v4H4V5H3V4Zm5%202a1%201%200%200%201%201-1h11a1%201%200%201%201%200%202H9a1%201%200%200%201-1-1Zm1%205a1%201%200%201%200%200%202h11a1%201%200%201%200%200-2H9Zm0%206a1%201%200%201%200%200%202h11a1%201%200%201%200%200-2H9Zm-3.5-7H6v1l-1.5%202H6v1H3v-1l1.667-2H3v-1h2.5ZM3%2017v-1h3v4H3v-1h2v-.5H4v-1h1V17H3Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E)}trix-toolbar .trix-button--icon-undo:before{-webkit-mask-image:url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M3%2014a1%201%200%200%200%201%201h6a1%201%200%201%200%200-2H6.257c2.247-2.764%205.151-3.668%207.579-3.264%202.589.432%204.739%202.356%205.174%205.405a1%201%200%200%200%201.98-.283c-.564-3.95-3.415-6.526-6.825-7.095C11.084%207.25%207.63%208.377%205%2011.39V8a1%201%200%200%200-2%200v6Zm2-1Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E);mask-image:url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M3%2014a1%201%200%200%200%201%201h6a1%201%200%201%200%200-2H6.257c2.247-2.764%205.151-3.668%207.579-3.264%202.589.432%204.739%202.356%205.174%205.405a1%201%200%200%200%201.98-.283c-.564-3.95-3.415-6.526-6.825-7.095C11.084%207.25%207.63%208.377%205%2011.39V8a1%201%200%200%200-2%200v6Zm2-1Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E)}trix-toolbar .trix-button--icon-redo:before{-webkit-mask-image:url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M21%2014a1%201%200%200%201-1%201h-6a1%201%200%201%201%200-2h3.743c-2.247-2.764-5.151-3.668-7.579-3.264-2.589.432-4.739%202.356-5.174%205.405a1%201%200%200%201-1.98-.283c.564-3.95%203.415-6.526%206.826-7.095%203.08-.513%206.534.614%209.164%203.626V8a1%201%200%201%201%202%200v6Zm-2-1Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E);mask-image:url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M21%2014a1%201%200%200%201-1%201h-6a1%201%200%201%201%200-2h3.743c-2.247-2.764-5.151-3.668-7.579-3.264-2.589.432-4.739%202.356-5.174%205.405a1%201%200%200%201-1.98-.283c.564-3.95%203.415-6.526%206.826-7.095%203.08-.513%206.534.614%209.164%203.626V8a1%201%200%201%201%202%200v6Zm-2-1Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E)}trix-toolbar .trix-button--icon-decrease-nesting-level:before{-webkit-mask-image:url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M5%206a1%201%200%200%201%201-1h12a1%201%200%201%201%200%202H6a1%201%200%200%201-1-1Zm4%205a1%201%200%201%200%200%202h9a1%201%200%201%200%200-2H9Zm-3%206a1%201%200%201%200%200%202h12a1%201%200%201%200%200-2H6Zm-3.707-5.707a1%201%200%200%200%200%201.414l2%202a1%201%200%201%200%201.414-1.414L4.414%2012l1.293-1.293a1%201%200%200%200-1.414-1.414l-2%202Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E);mask-image:url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M5%206a1%201%200%200%201%201-1h12a1%201%200%201%201%200%202H6a1%201%200%200%201-1-1Zm4%205a1%201%200%201%200%200%202h9a1%201%200%201%200%200-2H9Zm-3%206a1%201%200%201%200%200%202h12a1%201%200%201%200%200-2H6Zm-3.707-5.707a1%201%200%200%200%200%201.414l2%202a1%201%200%201%200%201.414-1.414L4.414%2012l1.293-1.293a1%201%200%200%200-1.414-1.414l-2%202Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E)}trix-toolbar .trix-button--icon-increase-nesting-level:before{-webkit-mask-image:url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M5%206a1%201%200%200%201%201-1h12a1%201%200%201%201%200%202H6a1%201%200%200%201-1-1Zm4%205a1%201%200%201%200%200%202h9a1%201%200%201%200%200-2H9Zm-3%206a1%201%200%201%200%200%202h12a1%201%200%201%200%200-2H6Zm-2.293-2.293%202-2a1%201%200%200%200%200-1.414l-2-2a1%201%200%201%200-1.414%201.414L3.586%2012l-1.293%201.293a1%201%200%201%200%201.414%201.414Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E);mask-image:url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M5%206a1%201%200%200%201%201-1h12a1%201%200%201%201%200%202H6a1%201%200%200%201-1-1Zm4%205a1%201%200%201%200%200%202h9a1%201%200%201%200%200-2H9Zm-3%206a1%201%200%201%200%200%202h12a1%201%200%201%200%200-2H6Zm-2.293-2.293%202-2a1%201%200%200%200%200-1.414l-2-2a1%201%200%201%200-1.414%201.414L3.586%2012l-1.293%201.293a1%201%200%201%200%201.414%201.414Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E)}trix-toolbar .trix-dialog{background:var(--color-base-100);border-top:2px solid color-mix(in oklab,var(--color-base-content) 30%,transparent);box-shadow:0 .3em 1em color-mix(in oklab,var(--color-base-content) 15%,transparent);border-radius:var(--radius-field);color:var(--color-base-content)}trix-toolbar .trix-input--dialog{background-color:var(--color-base-100);color:var(--color-base-content);border:var(--border) solid color-mix(in oklab,var(--color-base-content) 20%,transparent);border-radius:var(--radius-field)}trix-toolbar .trix-input--dialog:focus{outline:2px solid var(--color-base-content);outline-offset:2px}.trix-content{color:var(--color-base-content)}.trix-content>*+*{margin-top:.75em}.trix-content a{color:var(--color-primary);text-decoration:underline}.trix-content ul{list-style-type:disc}.trix-content ol{list-style-type:decimal}.trix-content blockquote{border-color:color-mix(in oklab,var(--color-base-content) 20%,transparent);margin-left:0;padding-block:.4em;font-style:italic}.trix-content pre{background-color:var(--color-base-200);color:var(--color-base-content)}.trix-content .attachment--preview .attachment__caption{color:color-mix(in oklab,var(--color-base-content) 60%,transparent)}.trix-content .attachment--file{color:var(--color-base-content);border-color:color-mix(in oklab,var(--color-base-content) 20%,transparent)}trix-editor .trix-button--remove{background-color:var(--color-base-100);border-color:var(--color-primary)}trix-editor .trix-button--remove:hover{border-color:var(--color-base-content)}trix-editor .trix-button--remove:before{background:currentColor;background-image:none;-webkit-mask:url(data:image/svg+xml,%3Csvg%20height%3D%2224%22%20width%3D%2224%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M19%206.41%2017.59%205%2012%2010.59%206.41%205%205%206.41%2010.59%2012%205%2017.59%206.41%2019%2012%2013.41%2017.59%2019%2019%2017.59%2013.41%2012z%22%2F%3E%3Cpath%20d%3D%22M0%200h24v24H0z%22%20fill%3D%22none%22%2F%3E%3C%2Fsvg%3E) center / 90% no-repeat;mask:url(data:image/svg+xml,%3Csvg%20height%3D%2224%22%20width%3D%2224%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M19%206.41%2017.59%205%2012%2010.59%206.41%205%205%206.41%2010.59%2012%205%2017.59%206.41%2019%2012%2013.41%2017.59%2019%2019%2017.59%2013.41%2012z%22%2F%3E%3Cpath%20d%3D%22M0%200h24v24H0z%22%20fill%3D%22none%22%2F%3E%3C%2Fsvg%3E) center / 90% no-repeat}trix-editor .attachment__metadata{background-color:color-mix(in oklab,var(--color-base-content) 70%,transparent);color:var(--color-base-100)}trix-editor [data-trix-mutable].attachment.attachment--file{box-shadow:0 0 0 2px var(--color-primary)}trix-editor [data-trix-mutable].attachment img{box-shadow:0 0 0 2px var(--color-primary)} diff --git a/public/vendor/rich-text-laravel/trix-rich-text-laravel-flux-cad7da99.css b/public/vendor/rich-text-laravel/trix-rich-text-laravel-flux-cad7da99.css new file mode 100644 index 00000000..a37584a8 --- /dev/null +++ b/public/vendor/rich-text-laravel/trix-rich-text-laravel-flux-cad7da99.css @@ -0,0 +1 @@ +trix-editor{display:block;width:100%;border-radius:var(--radius-lg);border:1px solid var(--color-zinc-200);border-bottom-color:color-mix(in srgb,var(--color-zinc-300) 80%,transparent);background-color:var(--color-white);padding:.75rem;font-size:1rem;line-height:1.5rem;color:var(--color-zinc-700);box-shadow:0 1px 2px 0 color-mix(in srgb,var(--color-black) 5%,transparent);min-height:8em;outline:none}@media (min-width: 640px){trix-editor{font-size:.875rem;line-height:1.25rem}}trix-editor:focus{outline:none;box-shadow:0 0 0 2px var(--color-accent-foreground),0 0 0 4px var(--color-accent)}.dark trix-editor{border-color:color-mix(in srgb,var(--color-white) 10%,transparent);background-color:color-mix(in srgb,var(--color-white) 10%,transparent);color:var(--color-zinc-300);box-shadow:none}.dark trix-editor:focus{box-shadow:0 0 0 2px var(--color-accent-foreground),0 0 0 4px var(--color-accent)}trix-toolbar{margin-bottom:2px}trix-toolbar .trix-button-row{display:flex;flex-wrap:nowrap;gap:.25rem;overflow-x:auto}trix-toolbar .trix-button-group.trix-button-group{display:flex;flex-shrink:0;border-radius:var(--radius-lg);border-width:1px;border-style:solid;border-color:var(--color-zinc-200);border-bottom-color:color-mix(in srgb,var(--color-zinc-300) 80%,transparent);box-shadow:0 1px 2px 0 color-mix(in srgb,var(--color-black) 5%,transparent);overflow:hidden}.dark trix-toolbar .trix-button-group.trix-button-group{border-color:color-mix(in srgb,var(--color-white) 20%,transparent);box-shadow:none}trix-toolbar .trix-button-group:not(:first-child){margin-left:0}trix-toolbar .trix-button-group-spacer{flex-grow:1}trix-toolbar .trix-button{position:relative;float:left;background-color:var(--color-white);color:var(--color-zinc-600);font-size:.75rem;font-weight:600;white-space:nowrap;padding:0 .5em;margin:0;border:none;outline:none}.dark trix-toolbar .trix-button{background-color:color-mix(in srgb,var(--color-white) 10%,transparent);color:var(--color-zinc-300)}trix-toolbar .trix-button:not(:first-child){border-left:1px solid var(--color-zinc-200)}.dark trix-toolbar .trix-button:not(:first-child){border-left-color:color-mix(in srgb,var(--color-white) 10%,transparent)}trix-toolbar .trix-button.trix-active{background-color:var(--color-zinc-100);color:var(--color-zinc-900)}.dark trix-toolbar .trix-button.trix-active{background-color:color-mix(in srgb,var(--color-white) 20%,transparent);color:var(--color-white)}trix-toolbar .trix-button:not(:disabled){cursor:pointer}trix-toolbar .trix-button:disabled{color:var(--color-zinc-300)}.dark trix-toolbar .trix-button:disabled{color:var(--color-zinc-600)}trix-toolbar .trix-button:hover:not(:disabled):not(.trix-active){background-color:var(--color-zinc-50)}.dark trix-toolbar .trix-button:hover:not(:disabled):not(.trix-active){background-color:color-mix(in srgb,var(--color-white) 15%,transparent)}trix-toolbar .trix-button--icon{font-size:inherit;width:2.6em;height:1.6em;max-width:calc(.8em + 4vw);text-indent:-9999px}trix-toolbar .trix-button--icon:before{display:inline-block;position:absolute;inset:0;opacity:.6;content:"";background-position:center;background-repeat:no-repeat;background-size:contain}.dark trix-toolbar .trix-button--icon:before{filter:invert(1)}trix-toolbar .trix-button--icon.trix-active:before{opacity:1}trix-toolbar .trix-button--icon:disabled:before{opacity:.125}trix-toolbar .trix-dialogs{position:relative}trix-toolbar .trix-dialog{position:absolute;top:0;left:0;right:0;font-size:.75rem;border-radius:var(--radius-lg);border:1px solid var(--color-zinc-200);background-color:var(--color-white);padding:.75rem;box-shadow:0 4px 6px -1px color-mix(in srgb,var(--color-black) 10%,transparent),0 2px 4px -2px color-mix(in srgb,var(--color-black) 10%,transparent);z-index:50}.dark trix-toolbar .trix-dialog{border-color:color-mix(in srgb,var(--color-white) 10%,transparent);background-color:var(--color-zinc-800);color:var(--color-zinc-300)}trix-toolbar .trix-input--dialog{border-radius:var(--radius-lg);border:1px solid var(--color-zinc-200);background-color:var(--color-white);padding:.375rem .75rem;font-size:.875rem;box-shadow:0 1px 2px 0 color-mix(in srgb,var(--color-black) 5%,transparent);outline:none;-webkit-appearance:none;-moz-appearance:none}.dark trix-toolbar .trix-input--dialog{border-color:color-mix(in srgb,var(--color-white) 10%,transparent);background-color:color-mix(in srgb,var(--color-white) 10%,transparent);color:var(--color-zinc-300)}trix-toolbar .trix-input--dialog:focus{outline:none;box-shadow:0 0 0 2px var(--color-accent-foreground),0 0 0 4px var(--color-accent)}trix-toolbar .trix-button--dialog{border-radius:var(--radius-lg);background-color:var(--color-zinc-100);padding:.375rem .75rem;font-size:.875rem;font-weight:500;color:var(--color-zinc-700);border:none}.dark trix-toolbar .trix-button--dialog{background-color:color-mix(in srgb,var(--color-white) 10%,transparent);color:var(--color-zinc-300)}trix-toolbar .trix-dialog--link{max-width:600px}trix-toolbar .trix-dialog__link-fields{display:flex;align-items:baseline;gap:.5rem}trix-toolbar .trix-dialog__link-fields .trix-input{flex:1}trix-toolbar .trix-dialog__link-fields .trix-button-group{flex:none;margin:0;border:none;box-shadow:none}.trix-content{line-height:1.625;overflow-wrap:break-word;word-break:break-word}.trix-content>*+*{margin-top:.75em}.trix-content h1{font-size:1.25rem;font-weight:700;margin-bottom:.5rem;margin-top:1.25rem}.trix-content a{color:var(--color-blue-600);text-decoration:underline}.dark .trix-content a{color:var(--color-blue-400)}.trix-content blockquote{border-left:4px solid var(--color-zinc-300);padding-left:1rem;margin-left:.5rem;font-style:italic;color:var(--color-zinc-600)}.dark .trix-content blockquote{border-left-color:var(--color-zinc-600);color:var(--color-zinc-400)}.trix-content ul{list-style-type:disc;padding-left:1.5rem}.trix-content ol{list-style-type:decimal;padding-left:1.5rem}.trix-content li{margin-bottom:.25rem}.trix-content pre{display:inline-block;width:100%;border-radius:var(--radius-lg);background-color:var(--color-zinc-100);padding:.75rem;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:.875rem;overflow-x:auto;white-space:pre}.dark .trix-content pre{background-color:var(--color-zinc-800);color:var(--color-zinc-200)}.trix-content img{max-width:100%;height:auto}.trix-content .attachment{display:inline-block;position:relative;max-width:100%}.trix-content .attachment--file{border-radius:var(--radius-lg);border:1px solid var(--color-zinc-200);padding:.5rem 1rem;color:var(--color-zinc-700);margin:.25rem 0}.dark .trix-content .attachment--file{border-color:color-mix(in srgb,var(--color-white) 10%,transparent);color:var(--color-zinc-300)}.trix-content .attachment__caption{text-align:center}.trix-content .attachment--preview .attachment__caption{color:var(--color-zinc-500);font-size:.875rem} diff --git a/public/vendor/rich-text-laravel/trix.esm.js b/public/vendor/rich-text-laravel/trix.esm.js new file mode 100644 index 00000000..912b4083 --- /dev/null +++ b/public/vendor/rich-text-laravel/trix.esm.js @@ -0,0 +1,146 @@ +var ko="2.1.16";var Rt="[data-trix-attachment]",yi={preview:{presentation:"gallery",caption:{name:!0,size:!0}},file:{caption:{size:!0}}},z={default:{tagName:"div",parse:!1},quote:{tagName:"blockquote",nestable:!0},heading1:{tagName:"h1",terminal:!0,breakOnReturn:!0,group:!1},code:{tagName:"pre",terminal:!0,htmlAttributes:["language"],text:{plaintext:!0}},bulletList:{tagName:"ul",parse:!1},bullet:{tagName:"li",listAttribute:"bulletList",group:!1,nestable:!0,test(i){return $i(i.parentNode)===z[this.listAttribute].tagName}},numberList:{tagName:"ol",parse:!1},number:{tagName:"li",listAttribute:"numberList",group:!1,nestable:!0,test(i){return $i(i.parentNode)===z[this.listAttribute].tagName}},attachmentGallery:{tagName:"div",exclusive:!0,terminal:!0,parse:!1,group:!1}},$i=i=>{var t;return i==null||(t=i.tagName)===null||t===void 0?void 0:t.toLowerCase()},tr=navigator.userAgent.match(/android\s([0-9]+.*Chrome)/i),Ln=tr&&parseInt(tr[1]),Se={composesExistingText:/Android.*Chrome/.test(navigator.userAgent),recentAndroid:Ln&&Ln>12,samsungAndroid:Ln&&navigator.userAgent.match(/Android.*SM-/),forcesObjectResizing:/Trident.*rv:11/.test(navigator.userAgent),supportsInputEvents:typeof InputEvent<"u"&&["data","getTargetRanges","inputType"].every(i=>i in InputEvent.prototype)},Ro={attachment:"attachment",attachmentCaption:"attachment__caption",attachmentCaptionEditor:"attachment__caption-editor",attachmentMetadata:"attachment__metadata",attachmentMetadataContainer:"attachment__metadata-container",attachmentName:"attachment__name",attachmentProgress:"attachment__progress",attachmentSize:"attachment__size",attachmentToolbar:"attachment__toolbar",attachmentGallery:"attachment-gallery"},Nr={ADD_ATTR:["language"],SAFE_FOR_XML:!1,RETURN_DOM:!0},m={attachFiles:"Attach Files",bold:"Bold",bullets:"Bullets",byte:"Byte",bytes:"Bytes",captionPlaceholder:"Add a caption\u2026",code:"Code",heading1:"Heading",indent:"Increase Level",italic:"Italic",link:"Link",numbers:"Numbers",outdent:"Decrease Level",quote:"Quote",redo:"Redo",remove:"Remove",strike:"Strikethrough",undo:"Undo",unlink:"Unlink",url:"URL",urlPlaceholder:"Enter a URL\u2026",GB:"GB",KB:"KB",MB:"MB",PB:"PB",TB:"TB"},Do=[m.bytes,m.KB,m.MB,m.GB,m.TB,m.PB],Br={prefix:"IEC",precision:2,formatter(i){switch(i){case 0:return"0 ".concat(m.bytes);case 1:return"1 ".concat(m.byte);default:let t;this.prefix==="SI"?t=1e3:this.prefix==="IEC"&&(t=1024);let e=Math.floor(Math.log(i)/Math.log(t)),o=(i/Math.pow(t,e)).toFixed(this.precision).replace(/0*$/,"").replace(/\.$/,"");return"".concat(o," ").concat(Do[e])}}},fn="\uFEFF",bt="\xA0",Ai="\uFFFC",_r=function(i){for(let t in i){let e=i[t];this[t]=e}return this},xi=document.documentElement,Lo=xi.matches,C=function(i){let{onElement:t,matchingSelector:e,withCallback:n,inPhase:r,preventDefault:o,times:s}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l=t||xi,c=e,d=r==="capturing",g=function(x){s!=null&&--s===0&&g.destroy();let T=vt(x.target,{matchingSelector:c});T!=null&&(n?.call(T,x,T),o&&x.preventDefault())};return g.destroy=()=>l.removeEventListener(i,g,d),l.addEventListener(i,g,d),g},Oo=function(i){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t.times=1,C(i,t)},jr=function(i){let{bubbles:t,cancelable:e,attributes:n}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};t=t!==!1,e=e!==!1;let r=document.createEvent("Events");return r.initEvent(i,t,e),n!=null&&_r.call(r,n),r},me=function(i){let{onElement:t,bubbles:e,cancelable:n,attributes:r}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=t??xi,s=jr(i,{bubbles:e,cancelable:n,attributes:r});return o.dispatchEvent(s)},Wr=function(i,t){if(i?.nodeType===1)return Lo.call(i,t)},vt=function(i){let{matchingSelector:t,untilNode:e}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};for(;i&&i.nodeType!==Node.ELEMENT_NODE;)i=i.parentNode;if(i!=null)if(t!=null){if(i.closest&&e==null)return i.closest(t);for(;i&&i!==e;){if(Wr(i,t))return i;i=i.parentNode}}else return i},Po=function(i){for(;(t=i)!==null&&t!==void 0&&t.firstElementChild;){var t;i=i.firstElementChild}return i},Ei=i=>document.activeElement!==i&&kt(i,document.activeElement),kt=function(i,t){if(!(!i||!t))for(;t;){if(t===i)return!0;t=t.parentNode}};var On=function(i){var t;if(!((t=i)!==null&&t!==void 0&&t.parentNode))return;let e=0;for(i=i.previousSibling;i;)e++,i=i.previousSibling;return e},yt=i=>{var t;return i==null||(t=i.parentNode)===null||t===void 0?void 0:t.removeChild(i)},He=function(i){let{onlyNodesOfType:t,usingFilter:e,expandEntityReferences:n}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=(()=>{switch(t){case"element":return NodeFilter.SHOW_ELEMENT;case"text":return NodeFilter.SHOW_TEXT;case"comment":return NodeFilter.SHOW_COMMENT;default:return NodeFilter.SHOW_ALL}})();return document.createTreeWalker(i,r,e??null,n===!0)},W=i=>{var t;return i==null||(t=i.tagName)===null||t===void 0?void 0:t.toLowerCase()},p=function(i){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},e,n;typeof i=="object"?(t=i,i=t.tagName):t={attributes:t};let r=document.createElement(i);if(t.editable!=null&&(t.attributes==null&&(t.attributes={}),t.attributes.contenteditable=t.editable),t.attributes)for(e in t.attributes)n=t.attributes[e],r.setAttribute(e,n);if(t.style)for(e in t.style)n=t.style[e],r.style[e]=n;if(t.data)for(e in t.data)n=t.data[e],r.dataset[e]=n;return t.className&&t.className.split(" ").forEach(o=>{r.classList.add(o)}),t.textContent&&(r.textContent=t.textContent),t.childNodes&&[].concat(t.childNodes).forEach(o=>{r.appendChild(o)}),r},se,pe=function(){if(se!=null)return se;se=[];for(let i in z){let t=z[i];t.tagName&&se.push(t.tagName)}return se},Pn=i=>Gt(i?.firstChild),Io=function(i){return pe().includes(W(i))&&!pe().includes(W(i.firstChild))},er=function(i){let{strict:t}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{strict:!0};return t?Gt(i):Gt(i)||!Gt(i.firstChild)&&Io(i)},Gt=i=>Mo(i)&&i?.data==="block",Mo=i=>i?.nodeType===Node.COMMENT_NODE,Kt=function(i){let{name:t}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!!i)if(be(i)){if(i.data===fn)return t?i.parentNode.dataset.trixCursorTarget===t:!0}else return Kt(i.firstChild)},Dt=i=>Wr(i,Rt),zr=i=>be(i)&&i?.data==="",be=i=>i?.nodeType===Node.TEXT_NODE,wi={level2Enabled:!0,getLevel(){return this.level2Enabled&&Se.supportsInputEvents?2:0},pickFiles(i){let t=p("input",{type:"file",multiple:!0,hidden:!0,id:this.fileInputId});t.addEventListener("change",()=>{i(t.files),yt(t)}),yt(document.getElementById(this.fileInputId)),document.body.appendChild(t),t.click()}},Fo={8:"backspace",9:"tab",13:"return",27:"escape",37:"left",39:"right",46:"delete",68:"d",72:"h",79:"o"},ze={removeBlankTableCells:!1,tableCellSeparator:" | ",tableRowSeparator:` +`},Lt={bold:{tagName:"strong",inheritable:!0,parser(i){let t=window.getComputedStyle(i);return t.fontWeight==="bold"||t.fontWeight>=600}},italic:{tagName:"em",inheritable:!0,parser(i){return window.getComputedStyle(i).fontStyle==="italic"}},href:{groupTagName:"a",parser(i){let t="a:not(".concat(Rt,")"),e=i.closest(t);if(e)return e.getAttribute("href")}},strike:{tagName:"del",inheritable:!0},frozen:{style:{backgroundColor:"highlight"}}},Ur={getDefaultHTML(){return`
    + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    + +
    `)}},ii={interval:5e3},Te=Object.freeze({__proto__:null,attachments:yi,blockAttributes:z,browser:Se,css:Ro,dompurify:Nr,fileSize:Br,input:wi,keyNames:Fo,lang:m,parser:ze,textAttributes:Lt,toolbar:Ur,undo:ii}),S=class{static proxyMethod(t){let{name:e,toMethod:n,toProperty:r,optional:o}=No(t);this.prototype[e]=function(){let s,l;if(n)if(o){var c;l=(c=this[n])===null||c===void 0?void 0:c.call(this)}else l=this[n]();else r&&(l=this[r]);if(o){var d;if(s=(d=l)===null||d===void 0?void 0:d[e],s)return nr.call(s,l,arguments)}else return s=l[e],nr.call(s,l,arguments)}}},No=function(i){let t=i.match(Bo);if(!t)throw new Error("can't parse @proxyMethod expression: ".concat(i));let e={name:t[4]};return t[2]!=null?e.toMethod=t[1]:e.toProperty=t[1],t[3]!=null&&(e.optional=!0),e},{apply:nr}=Function.prototype,Bo=new RegExp("^(.+?)(\\(\\))?(\\?)?\\.(.+?)$"),In,Mn,ir,Fn,Ot=class extends S{static box(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return t instanceof this?t:this.fromUCS2String(t?.toString())}static fromUCS2String(t){return new this(t,qe(t))}static fromCodepoints(t){return new this(Ge(t),t)}constructor(t,e){super(...arguments),this.ucs2String=t,this.codepoints=e,this.length=this.codepoints.length,this.ucs2Length=this.ucs2String.length}offsetToUCS2Offset(t){return Ge(this.codepoints.slice(0,Math.max(0,t))).length}offsetFromUCS2Offset(t){return qe(this.ucs2String.slice(0,Math.max(0,t))).length}slice(){return this.constructor.fromCodepoints(this.codepoints.slice(...arguments))}charAt(t){return this.slice(t,t+1)}isEqualTo(t){return this.constructor.box(t).ucs2String===this.ucs2String}toJSON(){return this.ucs2String}getCacheKey(){return this.ucs2String}toString(){return this.ucs2String}},_o=((In=Array.from)===null||In===void 0?void 0:In.call(Array,"\u{1F47C}").length)===1,jo=((Mn=(ir=" ").codePointAt)===null||Mn===void 0?void 0:Mn.call(ir,0))!=null,Wo=((Fn=String.fromCodePoint)===null||Fn===void 0?void 0:Fn.call(String,32,128124))===" \u{1F47C}",qe,Ge;_o&&jo?qe=i=>Array.from(i).map(t=>t.codePointAt(0)):qe=function(i){let t=[],e=0,{length:n}=i;for(;eString.fromCodePoint(...Array.from(i||[])):Ge=function(i){return(()=>{let e=[];return Array.from(i).forEach(n=>{let r="";n>65535&&(n-=65536,r+=String.fromCharCode(n>>>10&1023|55296),n=56320|n&1023),e.push(r+String.fromCharCode(n))}),e})().join("")};var zo=0,dt=class extends S{static fromJSONString(t){return this.fromJSON(JSON.parse(t))}constructor(){super(...arguments),this.id=++zo}hasSameConstructorAs(t){return this.constructor===t?.constructor}isEqualTo(t){return this===t}inspect(){let t=[],e=this.contentsForInspection()||{};for(let n in e){let r=e[n];t.push("".concat(n,"=").concat(r))}return"#<".concat(this.constructor.name,":").concat(this.id).concat(t.length?" ".concat(t.join(", ")):"",">")}contentsForInspection(){}toJSONString(){return JSON.stringify(this)}toUTF16String(){return Ot.box(this)}getCacheKey(){return this.id.toString()}},Pt=function(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];if(i.length!==t.length)return!1;for(let e=0;e0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return Pt(i.slice(0,t.length),t)},Ci=function(i){let t=i.slice(0);for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],e=[],n=[],r=new Set;i.forEach(s=>{r.add(s)});let o=new Set;return t.forEach(s=>{o.add(s),r.has(s)||e.push(s)}),i.forEach(s=>{o.has(s)||n.push(s)}),{added:e,removed:n}},Ho=/[\u05BE\u05C0\u05C3\u05D0-\u05EA\u05F0-\u05F4\u061B\u061F\u0621-\u063A\u0640-\u064A\u066D\u0671-\u06B7\u06BA-\u06BE\u06C0-\u06CE\u06D0-\u06D5\u06E5\u06E6\u200F\u202B\u202E\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE72\uFE74\uFE76-\uFEFC]/,qo=function(){let i=p("input",{dir:"auto",name:"x",dirName:"x.dir"}),t=p("textarea",{dir:"auto",name:"y",dirName:"y.dir"}),e=p("form");e.appendChild(i),e.appendChild(t);let n=function(){try{return new FormData(e).has(t.dirName)}catch{return!1}}(),r=function(){try{return i.matches(":dir(ltr),:dir(rtl)")}catch{return!1}}();return n?function(o){return t.value=o,new FormData(e).get(t.dirName)}:r?function(o){return i.value=o,i.matches(":dir(rtl)")?"rtl":"ltr"}:function(o){let s=o.trim().charAt(0);return Ho.test(s)?"rtl":"ltr"}}(),Nn=null,Bn=null,_n=null,Me=null,ri=()=>(Nn||(Nn=Ko().concat(Go())),Nn),D=i=>z[i],Go=()=>(Bn||(Bn=Object.keys(z)),Bn),oi=i=>Lt[i],Ko=()=>(_n||(_n=Object.keys(Lt)),_n),Jo=()=>{if(!Me){Me=[];for(let i in z){let{listAttribute:t}=z[i];t!=null&&Me.push(t)}}return Me},Vr=function(i,t){let e=Yo(i);e.textContent=t.replace(/%t/g,i)},Yo=function(i){let t=document.createElement("style");t.setAttribute("type","text/css"),t.setAttribute("data-tag-name",i.toLowerCase());let e=Xo();return e&&t.setAttribute("nonce",e),document.head.insertBefore(t,document.head.firstChild),t},Xo=function(){let i=rr("trix-csp-nonce")||rr("csp-nonce");if(i){let{nonce:t,content:e}=i;return t==""?e:t}},rr=i=>document.head.querySelector("meta[name=".concat(i,"]")),or={"application/x-trix-feature-detection":"test"},Hr=function(i){let t=i.getData("text/plain"),e=i.getData("text/html");if(t&&e){let{body:n}=new DOMParser().parseFromString(e,"text/html");if(n.textContent===t)return!n.querySelector("*")}else return t?.length},Zo=i=>{let{dataTransfer:t}=i;return t.types.includes("Files")&&t.types.includes("text/html")&&t.getData("text/html").includes("urn:schemas-microsoft-com:office:office")},Qo=function(i){if(!(i!=null&&i.setData))return!1;for(let t in or){let e=or[t];try{if(i.setData(t,e),!i.getData(t)===e)return!1}catch{return!1}}return!0},qr=function(){return/Mac|^iP/.test(navigator.platform)?i=>i.metaKey:i=>i.ctrlKey}();function $o(i){return/iPhone|iPad/.test(navigator.userAgent)?!i.inputType||i.inputType==="insertParagraph":!1}var Si=i=>setTimeout(i,1),Gr=function(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t={};for(let e in i){let n=i[e];t[e]=n}return t},ee=function(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(Object.keys(i).length!==Object.keys(t).length)return!1;for(let e in i)if(i[e]!==t[e])return!1;return!0},A=function(i){if(i!=null)return Array.isArray(i)||(i=[i,i]),[sr(i[0]),sr(i[1]!=null?i[1]:i[0])]},ut=function(i){if(i==null)return;let[t,e]=A(i);return si(t,e)},gn=function(i,t){if(i==null||t==null)return;let[e,n]=A(i),[r,o]=A(t);return si(e,r)&&si(n,o)},sr=function(i){return typeof i=="number"?i:Gr(i)},si=function(i,t){return typeof i=="number"?i===t:ee(i,t)},Ke=class extends S{constructor(){super(...arguments),this.update=this.update.bind(this),this.selectionManagers=[]}start(){this.started||(this.started=!0,document.addEventListener("selectionchange",this.update,!0))}stop(){if(this.started)return this.started=!1,document.removeEventListener("selectionchange",this.update,!0)}registerSelectionManager(t){if(!this.selectionManagers.includes(t))return this.selectionManagers.push(t),this.start()}unregisterSelectionManager(t){if(this.selectionManagers=this.selectionManagers.filter(e=>e!==t),this.selectionManagers.length===0)return this.stop()}notifySelectionManagersOfSelectionChange(){return this.selectionManagers.map(t=>t.selectionDidChange())}update(){this.notifySelectionManagersOfSelectionChange()}reset(){this.update()}},It=new Ke,Kr=function(){let i=window.getSelection();if(i.rangeCount>0)return i},ve=function(){var i;let t=(i=Kr())===null||i===void 0?void 0:i.getRangeAt(0);if(t&&!ts(t))return t},Jr=function(i){let t=window.getSelection();return t.removeAllRanges(),t.addRange(i),It.update()},ts=i=>ar(i.startContainer)||ar(i.endContainer),ar=i=>!Object.getPrototypeOf(i),ge=i=>i.replace(new RegExp("".concat(fn),"g"),"").replace(new RegExp("".concat(bt),"g")," "),es=i=>i.replace(/\r\n?/g,` +`),Ti=new RegExp("[^\\S".concat(bt,"]")),ki=i=>i.replace(new RegExp("".concat(Ti.source),"g")," ").replace(/\ {2,}/g," "),ns=function(i,t){let e,n;return i=Ot.box(i),t=Ot.box(t),t.lengthe+1&&i.charAt(n-1).isEqualTo(t.charAt(r-1));)n--,r--;return{utf16String:i.slice(e,n),offset:e}},U=class extends dt{static fromCommonAttributesOfObjects(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];if(!t.length)return new this;let e=ae(t[0]),n=e.getKeys();return t.slice(1).forEach(r=>{n=e.getKeysCommonToHash(ae(r)),e=e.slice(n)}),e}static box(t){return ae(t)}constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};super(...arguments),this.values=Ue(t)}add(t,e){return this.merge(is(t,e))}remove(t){return new U(Ue(this.values,t))}get(t){return this.values[t]}has(t){return t in this.values}merge(t){return new U(rs(this.values,os(t)))}slice(t){let e={};return Array.from(t).forEach(n=>{this.has(n)&&(e[n]=this.values[n])}),new U(e)}getKeys(){return Object.keys(this.values)}getKeysCommonToHash(t){return t=ae(t),this.getKeys().filter(e=>this.values[e]===t.values[e])}isEqualTo(t){return Pt(this.toArray(),ae(t).toArray())}isEmpty(){return this.getKeys().length===0}toArray(){if(!this.array){let t=[];for(let e in this.values){let n=this.values[e];t.push(t.push(e,n))}this.array=t.slice(0)}return this.array}toObject(){return Ue(this.values)}toJSON(){return this.toObject()}contentsForInspection(){return{values:JSON.stringify(this.values)}}},is=function(i,t){let e={};return e[i]=t,e},rs=function(i,t){let e=Ue(i);for(let n in t){let r=t[n];e[n]=r}return e},Ue=function(i,t){let e={};return Object.keys(i).sort().forEach(r=>{r!==t&&(e[r]=i[r])}),e},ae=function(i){return i instanceof U?i:new U(i)},os=function(i){return i instanceof U?i.values:i},Ae=class{static groupObjects(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],{depth:e,asTree:n}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r;n&&e==null&&(e=0);let o=[];return Array.from(t).forEach(s=>{var l;if(r){var c,d,g;if((c=s.canBeGrouped)!==null&&c!==void 0&&c.call(s,e)&&(d=(g=r[r.length-1]).canBeGroupedWith)!==null&&d!==void 0&&d.call(g,s,e)){r.push(s);return}else o.push(new this(r,{depth:e,asTree:n})),r=null}(l=s.canBeGrouped)!==null&&l!==void 0&&l.call(s,e)?r=[s]:o.push(s)}),r&&o.push(new this(r,{depth:e,asTree:n})),o}constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],{depth:e,asTree:n}=arguments.length>1?arguments[1]:void 0;this.objects=t,n&&(this.depth=e,this.objects=this.constructor.groupObjects(this.objects,{asTree:n,depth:this.depth+1}))}getObjects(){return this.objects}getDepth(){return this.depth}getCacheKey(){let t=["objectGroup"];return Array.from(this.getObjects()).forEach(e=>{t.push(e.getCacheKey())}),t.join("/")}},ai=class extends S{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];super(...arguments),this.objects={},Array.from(t).forEach(e=>{let n=JSON.stringify(e);this.objects[n]==null&&(this.objects[n]=e)})}find(t){let e=JSON.stringify(t);return this.objects[e]}},li=class{constructor(t){this.reset(t)}add(t){let e=cr(t);this.elements[e]=t}remove(t){let e=cr(t),n=this.elements[e];if(n)return delete this.elements[e],n}reset(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return this.elements={},Array.from(t).forEach(e=>{this.add(e)}),t}},cr=i=>i.dataset.trixStoreKey,Yt=class extends S{isPerforming(){return this.performing===!0}hasPerformed(){return this.performed===!0}hasSucceeded(){return this.performed&&this.succeeded}hasFailed(){return this.performed&&!this.succeeded}getPromise(){return this.promise||(this.promise=new Promise((t,e)=>(this.performing=!0,this.perform((n,r)=>{this.succeeded=n,this.performing=!1,this.performed=!0,this.succeeded?t(r):e(r)})))),this.promise}perform(t){return t(!1)}release(){var t,e;(t=this.promise)===null||t===void 0||(e=t.cancel)===null||e===void 0||e.call(t),this.promise=null,this.performing=null,this.performed=null,this.succeeded=null}};Yt.proxyMethod("getPromise().then");Yt.proxyMethod("getPromise().catch");var ht=class extends S{constructor(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(...arguments),this.object=t,this.options=e,this.childViews=[],this.rootView=this}getNodes(){return this.nodes||(this.nodes=this.createNodes()),this.nodes.map(t=>t.cloneNode(!0))}invalidate(){var t;return this.nodes=null,this.childViews=[],(t=this.parentView)===null||t===void 0?void 0:t.invalidate()}invalidateViewForObject(t){var e;return(e=this.findViewForObject(t))===null||e===void 0?void 0:e.invalidate()}findOrCreateCachedChildView(t,e,n){let r=this.getCachedViewForObject(e);return r?this.recordChildView(r):(r=this.createChildView(...arguments),this.cacheViewForObject(r,e)),r}createChildView(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};e instanceof Ae&&(n.viewClass=t,t=ci);let r=new t(e,n);return this.recordChildView(r)}recordChildView(t){return t.parentView=this,t.rootView=this.rootView,this.childViews.push(t),t}getAllChildViews(){let t=[];return this.childViews.forEach(e=>{t.push(e),t=t.concat(e.getAllChildViews())}),t}findElement(){return this.findElementForObject(this.object)}findElementForObject(t){let e=t?.id;if(e)return this.rootView.element.querySelector("[data-trix-id='".concat(e,"']"))}findViewForObject(t){for(let e of this.getAllChildViews())if(e.object===t)return e}getViewCache(){if(this.rootView===this){if(this.isViewCachingEnabled())return this.viewCache||(this.viewCache={}),this.viewCache}else return this.rootView.getViewCache()}isViewCachingEnabled(){return this.shouldCacheViews!==!1}enableViewCaching(){this.shouldCacheViews=!0}disableViewCaching(){this.shouldCacheViews=!1}getCachedViewForObject(t){var e;return(e=this.getViewCache())===null||e===void 0?void 0:e[t.getCacheKey()]}cacheViewForObject(t,e){let n=this.getViewCache();n&&(n[e.getCacheKey()]=t)}garbageCollectCachedViews(){let t=this.getViewCache();if(t){let n=this.getAllChildViews().concat(this).map(r=>r.object.getCacheKey());for(let r in t)n.includes(r)||delete t[r]}}},ci=class extends ht{constructor(){super(...arguments),this.objectGroup=this.object,this.viewClass=this.options.viewClass,delete this.options.viewClass}getChildViews(){return this.childViews.length||Array.from(this.objectGroup.getObjects()).forEach(t=>{this.findOrCreateCachedChildView(this.viewClass,t,this.options)}),this.childViews}createNodes(){let t=this.createContainerElement();return this.getChildViews().forEach(e=>{Array.from(e.getNodes()).forEach(n=>{t.appendChild(n)})}),[t]}createContainerElement(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.objectGroup.getDepth();return this.getChildViews()[0].createContainerElement(t)}};var{entries:Yr,setPrototypeOf:ur,isFrozen:ss,getPrototypeOf:as,getOwnPropertyDescriptor:ls}=Object,{freeze:V,seal:X,create:Xr}=Object,{apply:ui,construct:di}=typeof Reflect<"u"&&Reflect;V||(V=function(t){return t});X||(X=function(t){return t});ui||(ui=function(t,e){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o1?e-1:0),r=1;r1?e-1:0),r=1;r2&&arguments[2]!==void 0?arguments[2]:Ve;ur&&ur(i,null);let n=t.length;for(;n--;){let r=t[n];if(typeof r=="string"){let o=e(r);o!==r&&(ss(t)||(t[n]=o),r=o)}i[r]=!0}return i}function gs(i){for(let t=0;t/gm),ys=X(/\$\{[\w\W]*/gm),As=X(/^data-[\-\w.\u00B7-\uFFFF]+$/),xs=X(/^aria-[\-\w]+$/),Zr=X(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Es=X(/^(?:\w+script|data):/i),ws=X(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Qr=X(/^html$/i),Cs=X(/^[a-z][.\w]*(-[.\w]+)+$/i),pr=Object.freeze({__proto__:null,ARIA_ATTR:xs,ATTR_WHITESPACE:ws,CUSTOM_ELEMENT:Cs,DATA_ATTR:As,DOCTYPE_NAME:Qr,ERB_EXPR:vs,IS_ALLOWED_URI:Zr,IS_SCRIPT_OR_DATA:Es,MUSTACHE_EXPR:bs,TMPLIT_EXPR:ys}),he={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Ss=function(){return typeof window>"u"?null:window},Ts=function(t,e){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let n=null,r="data-tt-policy-suffix";e&&e.hasAttribute(r)&&(n=e.getAttribute(r));let o="dompurify"+(n?"#"+n:"");try{return t.createPolicy(o,{createHTML(s){return s},createScriptURL(s){return s}})}catch{return console.warn("TrustedTypes policy "+o+" could not be created."),null}},br=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function $r(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Ss(),t=f=>$r(f);if(t.version="3.2.7",t.removed=[],!i||!i.document||i.document.nodeType!==he.document||!i.Element)return t.isSupported=!1,t;let{document:e}=i,n=e,r=n.currentScript,{DocumentFragment:o,HTMLTemplateElement:s,Node:l,Element:c,NodeFilter:d,NamedNodeMap:g=i.NamedNodeMap||i.MozNamedAttrMap,HTMLFormElement:x,DOMParser:T,trustedTypes:Z}=i,F=c.prototype,Q=de(F,"cloneNode"),Et=de(F,"remove"),mt=de(F,"nextSibling"),Bt=de(F,"childNodes"),ot=de(F,"parentNode");if(typeof s=="function"){let f=e.createElement("template");f.content&&f.content.ownerDocument&&(e=f.content.ownerDocument)}let y,J="",{implementation:wt,createNodeIterator:ne,createDocumentFragment:ho,getElementsByTagName:fo}=e,{importNode:go}=n,_=br();t.isSupported=typeof Yr=="function"&&typeof ot=="function"&&wt&&wt.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:pn,ERB_EXPR:bn,TMPLIT_EXPR:vn,DATA_ATTR:mo,ARIA_ATTR:po,IS_SCRIPT_OR_DATA:bo,ATTR_WHITESPACE:Ri,CUSTOM_ELEMENT:vo}=pr,{IS_ALLOWED_URI:Di}=pr,O=null,Li=b({},[...hr,...Un,...Vn,...Hn,...fr]),I=null,Oi=b({},[...gr,...qn,...mr,...Ne]),k=Object.seal(Xr(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ie=null,yn=null,Pi=!0,An=!0,Ii=!1,Mi=!0,_t=!1,ke=!0,Ct=!1,xn=!1,En=!1,jt=!1,Re=!1,De=!1,Fi=!0,Ni=!1,yo="user-content-",wn=!0,re=!1,Wt={},zt=null,Bi=b({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),_i=null,ji=b({},["audio","video","img","source","image","track"]),Cn=null,Wi=b({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Le="http://www.w3.org/1998/Math/MathML",Oe="http://www.w3.org/2000/svg",st="http://www.w3.org/1999/xhtml",Ut=st,Sn=!1,Tn=null,Ao=b({},[Le,Oe,st],Wn),Pe=b({},["mi","mo","mn","ms","mtext"]),Ie=b({},["annotation-xml"]),xo=b({},["title","style","font","a","script"]),oe=null,Eo=["application/xhtml+xml","text/html"],wo="text/html",P=null,Vt=null,Co=e.createElement("form"),zi=function(a){return a instanceof RegExp||a instanceof Function},kn=function(){let a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Vt&&Vt===a)){if((!a||typeof a!="object")&&(a={}),a=ct(a),oe=Eo.indexOf(a.PARSER_MEDIA_TYPE)===-1?wo:a.PARSER_MEDIA_TYPE,P=oe==="application/xhtml+xml"?Wn:Ve,O=tt(a,"ALLOWED_TAGS")?b({},a.ALLOWED_TAGS,P):Li,I=tt(a,"ALLOWED_ATTR")?b({},a.ALLOWED_ATTR,P):Oi,Tn=tt(a,"ALLOWED_NAMESPACES")?b({},a.ALLOWED_NAMESPACES,Wn):Ao,Cn=tt(a,"ADD_URI_SAFE_ATTR")?b(ct(Wi),a.ADD_URI_SAFE_ATTR,P):Wi,_i=tt(a,"ADD_DATA_URI_TAGS")?b(ct(ji),a.ADD_DATA_URI_TAGS,P):ji,zt=tt(a,"FORBID_CONTENTS")?b({},a.FORBID_CONTENTS,P):Bi,ie=tt(a,"FORBID_TAGS")?b({},a.FORBID_TAGS,P):ct({}),yn=tt(a,"FORBID_ATTR")?b({},a.FORBID_ATTR,P):ct({}),Wt=tt(a,"USE_PROFILES")?a.USE_PROFILES:!1,Pi=a.ALLOW_ARIA_ATTR!==!1,An=a.ALLOW_DATA_ATTR!==!1,Ii=a.ALLOW_UNKNOWN_PROTOCOLS||!1,Mi=a.ALLOW_SELF_CLOSE_IN_ATTR!==!1,_t=a.SAFE_FOR_TEMPLATES||!1,ke=a.SAFE_FOR_XML!==!1,Ct=a.WHOLE_DOCUMENT||!1,jt=a.RETURN_DOM||!1,Re=a.RETURN_DOM_FRAGMENT||!1,De=a.RETURN_TRUSTED_TYPE||!1,En=a.FORCE_BODY||!1,Fi=a.SANITIZE_DOM!==!1,Ni=a.SANITIZE_NAMED_PROPS||!1,wn=a.KEEP_CONTENT!==!1,re=a.IN_PLACE||!1,Di=a.ALLOWED_URI_REGEXP||Zr,Ut=a.NAMESPACE||st,Pe=a.MATHML_TEXT_INTEGRATION_POINTS||Pe,Ie=a.HTML_INTEGRATION_POINTS||Ie,k=a.CUSTOM_ELEMENT_HANDLING||{},a.CUSTOM_ELEMENT_HANDLING&&zi(a.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(k.tagNameCheck=a.CUSTOM_ELEMENT_HANDLING.tagNameCheck),a.CUSTOM_ELEMENT_HANDLING&&zi(a.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(k.attributeNameCheck=a.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),a.CUSTOM_ELEMENT_HANDLING&&typeof a.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(k.allowCustomizedBuiltInElements=a.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),_t&&(An=!1),Re&&(jt=!0),Wt&&(O=b({},fr),I=[],Wt.html===!0&&(b(O,hr),b(I,gr)),Wt.svg===!0&&(b(O,Un),b(I,qn),b(I,Ne)),Wt.svgFilters===!0&&(b(O,Vn),b(I,qn),b(I,Ne)),Wt.mathMl===!0&&(b(O,Hn),b(I,mr),b(I,Ne))),a.ADD_TAGS&&(O===Li&&(O=ct(O)),b(O,a.ADD_TAGS,P)),a.ADD_ATTR&&(I===Oi&&(I=ct(I)),b(I,a.ADD_ATTR,P)),a.ADD_URI_SAFE_ATTR&&b(Cn,a.ADD_URI_SAFE_ATTR,P),a.FORBID_CONTENTS&&(zt===Bi&&(zt=ct(zt)),b(zt,a.FORBID_CONTENTS,P)),wn&&(O["#text"]=!0),Ct&&b(O,["html","head","body"]),O.table&&(b(O,["tbody"]),delete ie.tbody),a.TRUSTED_TYPES_POLICY){if(typeof a.TRUSTED_TYPES_POLICY.createHTML!="function")throw ue('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof a.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw ue('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');y=a.TRUSTED_TYPES_POLICY,J=y.createHTML("")}else y===void 0&&(y=Ts(Z,r)),y!==null&&typeof J=="string"&&(J=y.createHTML(""));V&&V(a),Vt=a}},Ui=b({},[...Un,...Vn,...ms]),Vi=b({},[...Hn,...ps]),So=function(a){let u=ot(a);(!u||!u.tagName)&&(u={namespaceURI:Ut,tagName:"template"});let h=Ve(a.tagName),w=Ve(u.tagName);return Tn[a.namespaceURI]?a.namespaceURI===Oe?u.namespaceURI===st?h==="svg":u.namespaceURI===Le?h==="svg"&&(w==="annotation-xml"||Pe[w]):Boolean(Ui[h]):a.namespaceURI===Le?u.namespaceURI===st?h==="math":u.namespaceURI===Oe?h==="math"&&Ie[w]:Boolean(Vi[h]):a.namespaceURI===st?u.namespaceURI===Oe&&!Ie[w]||u.namespaceURI===Le&&!Pe[w]?!1:!Vi[h]&&(xo[h]||!Ui[h]):!!(oe==="application/xhtml+xml"&&Tn[a.namespaceURI]):!1},nt=function(a){le(t.removed,{element:a});try{ot(a).removeChild(a)}catch{Et(a)}},St=function(a,u){try{le(t.removed,{attribute:u.getAttributeNode(a),from:u})}catch{le(t.removed,{attribute:null,from:u})}if(u.removeAttribute(a),a==="is")if(jt||Re)try{nt(u)}catch{}else try{u.setAttribute(a,"")}catch{}},Hi=function(a){let u=null,h=null;if(En)a=""+a;else{let L=zn(a,/^[\r\n\t ]+/);h=L&&L[0]}oe==="application/xhtml+xml"&&Ut===st&&(a=''+a+"");let w=y?y.createHTML(a):a;if(Ut===st)try{u=new T().parseFromString(w,oe)}catch{}if(!u||!u.documentElement){u=wt.createDocument(Ut,"template",null);try{u.documentElement.innerHTML=Sn?J:w}catch{}}let N=u.body||u.documentElement;return a&&h&&N.insertBefore(e.createTextNode(h),N.childNodes[0]||null),Ut===st?fo.call(u,Ct?"html":"body")[0]:Ct?u.documentElement:N},qi=function(a){return ne.call(a.ownerDocument||a,a,d.SHOW_ELEMENT|d.SHOW_COMMENT|d.SHOW_TEXT|d.SHOW_PROCESSING_INSTRUCTION|d.SHOW_CDATA_SECTION,null)},Rn=function(a){return a instanceof x&&(typeof a.nodeName!="string"||typeof a.textContent!="string"||typeof a.removeChild!="function"||!(a.attributes instanceof g)||typeof a.removeAttribute!="function"||typeof a.setAttribute!="function"||typeof a.namespaceURI!="string"||typeof a.insertBefore!="function"||typeof a.hasChildNodes!="function")},Gi=function(a){return typeof l=="function"&&a instanceof l};function at(f,a,u){Fe(f,h=>{h.call(t,a,u,Vt)})}let Ki=function(a){let u=null;if(at(_.beforeSanitizeElements,a,null),Rn(a))return nt(a),!0;let h=P(a.nodeName);if(at(_.uponSanitizeElement,a,{tagName:h,allowedTags:O}),ke&&a.hasChildNodes()&&!Gi(a.firstElementChild)&&j(/<[/\w!]/g,a.innerHTML)&&j(/<[/\w!]/g,a.textContent)||a.nodeType===he.progressingInstruction||ke&&a.nodeType===he.comment&&j(/<[/\w]/g,a.data))return nt(a),!0;if(!O[h]||ie[h]){if(!ie[h]&&Yi(h)&&(k.tagNameCheck instanceof RegExp&&j(k.tagNameCheck,h)||k.tagNameCheck instanceof Function&&k.tagNameCheck(h)))return!1;if(wn&&!zt[h]){let w=ot(a)||a.parentNode,N=Bt(a)||a.childNodes;if(N&&w){let L=N.length;for(let q=L-1;q>=0;--q){let lt=Q(N[q],!0);lt.__removalCount=(a.__removalCount||0)+1,w.insertBefore(lt,mt(a))}}}return nt(a),!0}return a instanceof c&&!So(a)||(h==="noscript"||h==="noembed"||h==="noframes")&&j(/<\/no(script|embed|frames)/i,a.innerHTML)?(nt(a),!0):(_t&&a.nodeType===he.text&&(u=a.textContent,Fe([pn,bn,vn],w=>{u=ce(u,w," ")}),a.textContent!==u&&(le(t.removed,{element:a.cloneNode()}),a.textContent=u)),at(_.afterSanitizeElements,a,null),!1)},Ji=function(a,u,h){if(Fi&&(u==="id"||u==="name")&&(h in e||h in Co))return!1;if(!(An&&!yn[u]&&j(mo,u))){if(!(Pi&&j(po,u))){if(!I[u]||yn[u]){if(!(Yi(a)&&(k.tagNameCheck instanceof RegExp&&j(k.tagNameCheck,a)||k.tagNameCheck instanceof Function&&k.tagNameCheck(a))&&(k.attributeNameCheck instanceof RegExp&&j(k.attributeNameCheck,u)||k.attributeNameCheck instanceof Function&&k.attributeNameCheck(u,a))||u==="is"&&k.allowCustomizedBuiltInElements&&(k.tagNameCheck instanceof RegExp&&j(k.tagNameCheck,h)||k.tagNameCheck instanceof Function&&k.tagNameCheck(h))))return!1}else if(!Cn[u]){if(!j(Di,ce(h,Ri,""))){if(!((u==="src"||u==="xlink:href"||u==="href")&&a!=="script"&&ds(h,"data:")===0&&_i[a])){if(!(Ii&&!j(bo,ce(h,Ri,"")))){if(h)return!1}}}}}}return!0},Yi=function(a){return a!=="annotation-xml"&&zn(a,vo)},Xi=function(a){at(_.beforeSanitizeAttributes,a,null);let{attributes:u}=a;if(!u||Rn(a))return;let h={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:I,forceKeepAttr:void 0},w=u.length;for(;w--;){let N=u[w],{name:L,namespaceURI:q,value:lt}=N,Ht=P(L),Dn=lt,M=L==="value"?Dn:hs(Dn);if(h.attrName=Ht,h.attrValue=M,h.keepAttr=!0,h.forceKeepAttr=void 0,at(_.uponSanitizeAttribute,a,h),M=h.attrValue,Ni&&(Ht==="id"||Ht==="name")&&(St(L,a),M=yo+M),ke&&j(/((--!?|])>)|<\/(style|title|textarea)/i,M)){St(L,a);continue}if(Ht==="attributename"&&zn(M,"href")){St(L,a);continue}if(h.forceKeepAttr)continue;if(!h.keepAttr){St(L,a);continue}if(!Mi&&j(/\/>/i,M)){St(L,a);continue}_t&&Fe([pn,bn,vn],Qi=>{M=ce(M,Qi," ")});let Zi=P(a.nodeName);if(!Ji(Zi,Ht,M)){St(L,a);continue}if(y&&typeof Z=="object"&&typeof Z.getAttributeType=="function"&&!q)switch(Z.getAttributeType(Zi,Ht)){case"TrustedHTML":{M=y.createHTML(M);break}case"TrustedScriptURL":{M=y.createScriptURL(M);break}}if(M!==Dn)try{q?a.setAttributeNS(q,L,M):a.setAttribute(L,M),Rn(a)?nt(a):dr(t.removed)}catch{St(L,a)}}at(_.afterSanitizeAttributes,a,null)},To=function f(a){let u=null,h=qi(a);for(at(_.beforeSanitizeShadowDOM,a,null);u=h.nextNode();)at(_.uponSanitizeShadowNode,u,null),Ki(u),Xi(u),u.content instanceof o&&f(u.content);at(_.afterSanitizeShadowDOM,a,null)};return t.sanitize=function(f){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},u=null,h=null,w=null,N=null;if(Sn=!f,Sn&&(f=""),typeof f!="string"&&!Gi(f))if(typeof f.toString=="function"){if(f=f.toString(),typeof f!="string")throw ue("dirty is not a string, aborting")}else throw ue("toString is not a function");if(!t.isSupported)return f;if(xn||kn(a),t.removed=[],typeof f=="string"&&(re=!1),re){if(f.nodeName){let lt=P(f.nodeName);if(!O[lt]||ie[lt])throw ue("root node is forbidden and cannot be sanitized in-place")}}else if(f instanceof l)u=Hi(""),h=u.ownerDocument.importNode(f,!0),h.nodeType===he.element&&h.nodeName==="BODY"||h.nodeName==="HTML"?u=h:u.appendChild(h);else{if(!jt&&!_t&&!Ct&&f.indexOf("<")===-1)return y&&De?y.createHTML(f):f;if(u=Hi(f),!u)return jt?null:De?J:""}u&&En&&nt(u.firstChild);let L=qi(re?f:u);for(;w=L.nextNode();)Ki(w),Xi(w),w.content instanceof o&&To(w.content);if(re)return f;if(jt){if(Re)for(N=ho.call(u.ownerDocument);u.firstChild;)N.appendChild(u.firstChild);else N=u;return(I.shadowroot||I.shadowrootmode)&&(N=go.call(n,N,!0)),N}let q=Ct?u.outerHTML:u.innerHTML;return Ct&&O["!doctype"]&&u.ownerDocument&&u.ownerDocument.doctype&&u.ownerDocument.doctype.name&&j(Qr,u.ownerDocument.doctype.name)&&(q=" +`+q),_t&&Fe([pn,bn,vn],lt=>{q=ce(q,lt," ")}),y&&De?y.createHTML(q):q},t.setConfig=function(){let f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};kn(f),xn=!0},t.clearConfig=function(){Vt=null,xn=!1},t.isValidAttribute=function(f,a,u){Vt||kn({});let h=P(f),w=P(a);return Ji(h,w,u)},t.addHook=function(f,a){typeof a=="function"&&le(_[f],a)},t.removeHook=function(f,a){if(a!==void 0){let u=cs(_[f],a);return u===-1?void 0:us(_[f],u,1)[0]}return dr(_[f])},t.removeHooks=function(f){_[f]=[]},t.removeAllHooks=function(){_=br()},t}var xe=$r();xe.addHook("uponSanitizeAttribute",function(i,t){/^data-trix-/.test(t.attrName)&&(t.forceKeepAttr=!0)});var ks="style href src width height language class".split(" "),Rs="javascript:".split(" "),Ds="script iframe form noscript".split(" "),Xt=class extends S{static setHTML(t,e,n){let r=new this(e,n).sanitize(),o=r.getHTML?r.getHTML():r.outerHTML;t.innerHTML=o}static sanitize(t,e){let n=new this(t,e);return n.sanitize(),n}constructor(t){let{allowedAttributes:e,forbiddenProtocols:n,forbiddenElements:r,purifyOptions:o}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(...arguments),this.allowedAttributes=e||ks,this.forbiddenProtocols=n||Rs,this.forbiddenElements=r||Ds,this.purifyOptions=o||{},this.body=Ls(t)}sanitize(){this.sanitizeElements(),this.normalizeListElementNesting();let t=Object.assign({},Nr,this.purifyOptions);return xe.setConfig(t),this.body=xe.sanitize(this.body),this.body}getHTML(){return this.body.innerHTML}getBody(){return this.body}sanitizeElements(){let t=He(this.body),e=[];for(;t.nextNode();){let n=t.currentNode;switch(n.nodeType){case Node.ELEMENT_NODE:this.elementIsRemovable(n)?e.push(n):this.sanitizeElement(n);break;case Node.COMMENT_NODE:e.push(n);break}}return e.forEach(n=>yt(n)),this.body}sanitizeElement(t){return t.hasAttribute("href")&&this.forbiddenProtocols.includes(t.protocol)&&t.removeAttribute("href"),Array.from(t.attributes).forEach(e=>{let{name:n}=e;!this.allowedAttributes.includes(n)&&n.indexOf("data-trix")!==0&&t.removeAttribute(n)}),t}normalizeListElementNesting(){return Array.from(this.body.querySelectorAll("ul,ol")).forEach(t=>{let e=t.previousElementSibling;e&&W(e)==="li"&&e.appendChild(t)}),this.body}elementIsRemovable(t){if(t?.nodeType===Node.ELEMENT_NODE)return this.elementIsForbidden(t)||this.elementIsntSerializable(t)}elementIsForbidden(t){return this.forbiddenElements.includes(W(t))}elementIsntSerializable(t){return t.getAttribute("data-trix-serialize")==="false"&&!Dt(t)}},Ls=function(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";i=i.replace(/<\/html[^>]*>[^]*$/i,"");let t=document.implementation.createHTMLDocument("");return t.documentElement.innerHTML=i,Array.from(t.head.querySelectorAll("style")).forEach(e=>{t.body.appendChild(e)}),t.body},{css:pt}=Te,Ee=class extends ht{constructor(){super(...arguments),this.attachment=this.object,this.attachment.uploadProgressDelegate=this,this.attachmentPiece=this.options.piece}createContentNodes(){return[]}createNodes(){let t,e=t=p({tagName:"figure",className:this.getClassName(),data:this.getData(),editable:!1}),n=this.getHref();return n&&(t=p({tagName:"a",editable:!1,attributes:{href:n,tabindex:-1}}),e.appendChild(t)),this.attachment.hasContent()?Xt.setHTML(t,this.attachment.getContent()):this.createContentNodes().forEach(r=>{t.appendChild(r)}),t.appendChild(this.createCaptionElement()),this.attachment.isPending()&&(this.progressElement=p({tagName:"progress",attributes:{class:pt.attachmentProgress,value:this.attachment.getUploadProgress(),max:100},data:{trixMutable:!0,trixStoreKey:["progressElement",this.attachment.id].join("/")}}),e.appendChild(this.progressElement)),[vr("left"),e,vr("right")]}createCaptionElement(){let t=p({tagName:"figcaption",className:pt.attachmentCaption}),e=this.attachmentPiece.getCaption();if(e)t.classList.add("".concat(pt.attachmentCaption,"--edited")),t.textContent=e;else{let n,r,o=this.getCaptionConfig();if(o.name&&(n=this.attachment.getFilename()),o.size&&(r=this.attachment.getFormattedFilesize()),n){let s=p({tagName:"span",className:pt.attachmentName,textContent:n});t.appendChild(s)}if(r){n&&t.appendChild(document.createTextNode(" "));let s=p({tagName:"span",className:pt.attachmentSize,textContent:r});t.appendChild(s)}}return t}getClassName(){let t=[pt.attachment,"".concat(pt.attachment,"--").concat(this.attachment.getType())],e=this.attachment.getExtension();return e&&t.push("".concat(pt.attachment,"--").concat(e)),t.join(" ")}getData(){let t={trixAttachment:JSON.stringify(this.attachment),trixContentType:this.attachment.getContentType(),trixId:this.attachment.id},{attributes:e}=this.attachmentPiece;return e.isEmpty()||(t.trixAttributes=JSON.stringify(e)),this.attachment.isPending()&&(t.trixSerialize=!1),t}getHref(){if(!Os(this.attachment.getContent(),"a")){let t=this.attachment.getHref();if(t&&xe.isValidAttribute("a","href",t))return t}}getCaptionConfig(){var t;let e=this.attachment.getType(),n=Gr((t=yi[e])===null||t===void 0?void 0:t.caption);return e==="file"&&(n.name=!0),n}findProgressElement(){var t;return(t=this.findElement())===null||t===void 0?void 0:t.querySelector("progress")}attachmentDidChangeUploadProgress(){let t=this.attachment.getUploadProgress(),e=this.findProgressElement();e&&(e.value=t)}},vr=i=>p({tagName:"span",textContent:fn,data:{trixCursorTarget:i,trixSerialize:!1}}),Os=function(i,t){let e=p("div");return Xt.setHTML(e,i||""),e.querySelector(t)},Je=class extends Ee{constructor(){super(...arguments),this.attachment.previewDelegate=this}createContentNodes(){return this.image=p({tagName:"img",attributes:{src:""},data:{trixMutable:!0}}),this.refresh(this.image),[this.image]}createCaptionElement(){let t=super.createCaptionElement(...arguments);return t.textContent||t.setAttribute("data-trix-placeholder",m.captionPlaceholder),t}refresh(t){if(!t){var e;t=(e=this.findElement())===null||e===void 0?void 0:e.querySelector("img")}if(t)return this.updateAttributesForImage(t)}updateAttributesForImage(t){let e=this.attachment.getURL(),n=this.attachment.getPreviewURL();if(t.src=n||e,n===e)t.removeAttribute("data-trix-serialized-attributes");else{let c=JSON.stringify({src:e});t.setAttribute("data-trix-serialized-attributes",c)}let r=this.attachment.getWidth(),o=this.attachment.getHeight(),s=this.attachment.getAttribute("alt");r!=null&&(t.width=r),o!=null&&(t.height=o),s!=null&&(t.alt=s);let l=["imageElement",this.attachment.id,t.src,t.width,t.height].join("/");t.dataset.trixStoreKey=l}attachmentDidChangeAttributes(){return this.refresh(this.image),this.refresh()}},Ye=class extends ht{constructor(){super(...arguments),this.piece=this.object,this.attributes=this.piece.getAttributes(),this.textConfig=this.options.textConfig,this.context=this.options.context,this.piece.attachment?this.attachment=this.piece.attachment:this.string=this.piece.toString()}createNodes(){let t=this.attachment?this.createAttachmentNodes():this.createStringNodes(),e=this.createElement();if(e){let n=Po(e);Array.from(t).forEach(r=>{n.appendChild(r)}),t=[e]}return t}createAttachmentNodes(){let t=this.attachment.isPreviewable()?Je:Ee;return this.createChildView(t,this.piece.attachment,{piece:this.piece}).getNodes()}createStringNodes(){var t;if((t=this.textConfig)!==null&&t!==void 0&&t.plaintext)return[document.createTextNode(this.string)];{let e=[],n=this.string.split(` +`);for(let r=0;r0){let s=p("br");e.push(s)}if(o.length){let s=document.createTextNode(this.preserveSpaces(o));e.push(s)}}return e}}createElement(){let t,e,n,r={};for(e in this.attributes){n=this.attributes[e];let s=oi(e);if(s){if(s.tagName){var o;let l=p(s.tagName);o?(o.appendChild(l),o=l):t=o=l}if(s.styleProperty&&(r[s.styleProperty]=n),s.style)for(e in s.style)n=s.style[e],r[e]=n}}if(Object.keys(r).length){t||(t=p("span"));for(e in r)n=r[e],t.style[e]=n}return t}createContainerElement(){for(let t in this.attributes){let e=this.attributes[t],n=oi(t);if(n&&n.groupTagName){let r={};return r[t]=e,p(n.groupTagName,r)}}}preserveSpaces(t){return this.context.isLast&&(t=t.replace(/\ $/,bt)),t=t.replace(/(\S)\ {3}(\S)/g,"$1 ".concat(bt," $2")).replace(/\ {2}/g,"".concat(bt," ")).replace(/\ {2}/g," ".concat(bt)),(this.context.isFirst||this.context.followsWhitespace)&&(t=t.replace(/^\ /,bt)),t}},Xe=class extends ht{constructor(){super(...arguments),this.text=this.object,this.textConfig=this.options.textConfig}createNodes(){let t=[],e=Ae.groupObjects(this.getPieces()),n=e.length-1;for(let o=0;o!t.hasAttribute("blockBreak"))}},Ps=i=>/\s$/.test(i?.toString()),{css:yr}=Te,Ze=class extends ht{constructor(){super(...arguments),this.block=this.object,this.attributes=this.block.getAttributes()}createNodes(){let e=[document.createComment("block")];if(this.block.isEmpty())e.push(p("br"));else{var n;let r=(n=D(this.block.getLastAttribute()))===null||n===void 0?void 0:n.text,o=this.findOrCreateCachedChildView(Xe,this.block.text,{textConfig:r});e.push(...Array.from(o.getNodes()||[])),this.shouldAddExtraNewlineElement()&&e.push(p("br"))}if(this.attributes.length)return e;{let r,{tagName:o}=z.default;this.block.isRTL()&&(r={dir:"rtl"});let s=p({tagName:o,attributes:r});return e.forEach(l=>s.appendChild(l)),[s]}}createContainerElement(t){let e={},n,r=this.attributes[t],{tagName:o,htmlAttributes:s=[]}=D(r);if(t===0&&this.block.isRTL()&&Object.assign(e,{dir:"rtl"}),r==="attachmentGallery"){let l=this.block.getBlockBreakPosition();n="".concat(yr.attachmentGallery," ").concat(yr.attachmentGallery,"--").concat(l)}return Object.entries(this.block.htmlAttributes).forEach(l=>{let[c,d]=l;s.includes(c)&&(e[c]=d)}),p({tagName:o,className:n,attributes:e})}shouldAddExtraNewlineElement(){return/\n\n$/.test(this.block.toString())}},Zt=class extends ht{static render(t){let e=p("div"),n=new this(t,{element:e});return n.render(),n.sync(),e}constructor(){super(...arguments),this.element=this.options.element,this.elementStore=new li,this.setDocument(this.object)}setDocument(t){t.isEqualTo(this.document)||(this.document=this.object=t)}render(){if(this.childViews=[],this.shadowElement=p("div"),!this.document.isEmpty()){let t=Ae.groupObjects(this.document.getBlocks(),{asTree:!0});Array.from(t).forEach(e=>{let n=this.findOrCreateCachedChildView(Ze,e);Array.from(n.getNodes()).map(r=>this.shadowElement.appendChild(r))})}}isSynced(){return Is(this.shadowElement,this.element)}sync(){let e=jr("trix-before-render",{cancelable:!1,attributes:{render:(r,o)=>{for(;r.lastChild;)r.removeChild(r.lastChild);r.appendChild(o)}}});this.element.dispatchEvent(e);let n=this.createDocumentFragmentForSync();return e.render(this.element,n),this.didSync()}didSync(){return this.elementStore.reset(Ar(this.element)),Si(()=>this.garbageCollectCachedViews())}createDocumentFragmentForSync(){let t=document.createDocumentFragment();return Array.from(this.shadowElement.childNodes).forEach(e=>{t.appendChild(e.cloneNode(!0))}),Array.from(Ar(t)).forEach(e=>{let n=this.elementStore.remove(e);n&&e.parentNode.replaceChild(n,e)}),t}},Ar=i=>i.querySelectorAll("[data-trix-store-key]"),Is=(i,t)=>xr(i.innerHTML)===xr(t.innerHTML),xr=i=>i.replace(/ /g," ");function Be(i){var t,e;function n(o,s){try{var l=i[o](s),c=l.value,d=c instanceof Ms;Promise.resolve(d?c.v:c).then(function(g){if(d){var x=o==="return"?"return":"next";if(!c.k||g.done)return n(x,g);g=i[x](g).value}r(l.done?"return":"normal",g)},function(g){n("throw",g)})}catch(g){r("throw",g)}}function r(o,s){switch(o){case"return":t.resolve({value:s,done:!0});break;case"throw":t.reject(s);break;default:t.resolve({value:s,done:!1})}(t=t.next)?n(t.key,t.arg):e=null}this._invoke=function(o,s){return new Promise(function(l,c){var d={key:o,arg:s,resolve:l,reject:c,next:null};e?e=e.next=d:(t=e=d,n(o,s))})},typeof i.return!="function"&&(this.return=void 0)}Be.prototype[typeof Symbol=="function"&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},Be.prototype.next=function(i){return this._invoke("next",i)},Be.prototype.throw=function(i){return this._invoke("throw",i)},Be.prototype.return=function(i){return this._invoke("return",i)};function Ms(i,t){this.v=i,this.k=t}function Fs(i,t){if(typeof i!="object"||!i)return i;var e=i[Symbol.toPrimitive];if(e!==void 0){var n=e.call(i,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(i)}function Ns(i){var t=Fs(i,"string");return typeof t=="symbol"?t:String(t)}function B(i,t,e){return t=Ns(t),t in i?Object.defineProperty(i,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):i[t]=e,i}function v(i,t){var e=to(i,t,"get");return Bs(i,e)}function ye(i,t,e){var n=to(i,t,"set");return _s(i,n,e),e}function to(i,t,e){if(!t.has(i))throw new TypeError("attempted to "+e+" private field on non-instance");return t.get(i)}function Bs(i,t){return t.get?t.get.call(i):t.value}function _s(i,t,e){if(t.set)t.set.call(i,e);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=e}}function _e(i,t,e){if(!t.has(i))throw new TypeError("attempted to get private field on non-instance");return e}function eo(i,t){if(t.has(i))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Jt(i,t,e){eo(i,t),t.set(i,e)}function js(i,t){eo(i,t),t.add(i)}var ft=class extends dt{static registerType(t,e){e.type=t,this.types[t]=e}static fromJSON(t){let e=this.types[t.type];if(e)return e.fromJSON(t)}constructor(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(...arguments),this.attributes=U.box(e)}copyWithAttributes(t){return new this.constructor(this.getValue(),t)}copyWithAdditionalAttributes(t){return this.copyWithAttributes(this.attributes.merge(t))}copyWithoutAttribute(t){return this.copyWithAttributes(this.attributes.remove(t))}copy(){return this.copyWithAttributes(this.attributes)}getAttribute(t){return this.attributes.get(t)}getAttributesHash(){return this.attributes}getAttributes(){return this.attributes.toObject()}hasAttribute(t){return this.attributes.has(t)}hasSameStringValueAsPiece(t){return t&&this.toString()===t.toString()}hasSameAttributesAsPiece(t){return t&&(this.attributes===t.attributes||this.attributes.isEqualTo(t.attributes))}isBlockBreak(){return!1}isEqualTo(t){return super.isEqualTo(...arguments)||this.hasSameConstructorAs(t)&&this.hasSameStringValueAsPiece(t)&&this.hasSameAttributesAsPiece(t)}isEmpty(){return this.length===0}isSerializable(){return!0}toJSON(){return{type:this.constructor.type,attributes:this.getAttributes()}}contentsForInspection(){return{type:this.constructor.type,attributes:this.attributes.inspect()}}canBeGrouped(){return this.hasAttribute("href")}canBeGroupedWith(t){return this.getAttribute("href")===t.getAttribute("href")}getLength(){return this.length}canBeConsolidatedWith(t){return!1}};B(ft,"types",{});var Qe=class extends Yt{constructor(t){super(...arguments),this.url=t}perform(t){let e=new Image;e.onload=()=>(e.width=this.width=e.naturalWidth,e.height=this.height=e.naturalHeight,t(!0,e)),e.onerror=()=>t(!1),e.src=this.url}},At=class extends dt{static attachmentForFile(t){let e=this.attributesForFile(t),n=new this(e);return n.setFile(t),n}static attributesForFile(t){return new U({filename:t.name,filesize:t.size,contentType:t.type})}static fromJSON(t){return new this(t)}constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};super(t),this.releaseFile=this.releaseFile.bind(this),this.attributes=U.box(t),this.didChangeAttributes()}setAttribute(t,e){this.setAttributes({[t]:e})}getAttribute(t){return this.attributes.get(t)}hasAttribute(t){return this.attributes.has(t)}getAttributes(){return this.attributes.toObject()}setAttributes(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=this.attributes.merge(t);if(!this.attributes.isEqualTo(e)){var n,r,o,s;return this.attributes=e,this.didChangeAttributes(),(n=this.previewDelegate)===null||n===void 0||(r=n.attachmentDidChangeAttributes)===null||r===void 0||r.call(n,this),(o=this.delegate)===null||o===void 0||(s=o.attachmentDidChangeAttributes)===null||s===void 0?void 0:s.call(o,this)}}didChangeAttributes(){if(this.isPreviewable())return this.preloadURL()}isPending(){return this.file!=null&&!(this.getURL()||this.getHref())}isPreviewable(){return this.attributes.has("previewable")?this.attributes.get("previewable"):At.previewablePattern.test(this.getContentType())}getType(){return this.hasContent()?"content":this.isPreviewable()?"preview":"file"}getURL(){return this.attributes.get("url")}getHref(){return this.attributes.get("href")}getFilename(){return this.attributes.get("filename")||""}getFilesize(){return this.attributes.get("filesize")}getFormattedFilesize(){let t=this.attributes.get("filesize");return typeof t=="number"?Br.formatter(t):""}getExtension(){var t;return(t=this.getFilename().match(/\.(\w+)$/))===null||t===void 0?void 0:t[1].toLowerCase()}getContentType(){return this.attributes.get("contentType")}hasContent(){return this.attributes.has("content")}getContent(){return this.attributes.get("content")}getWidth(){return this.attributes.get("width")}getHeight(){return this.attributes.get("height")}getFile(){return this.file}setFile(t){if(this.file=t,this.isPreviewable())return this.preloadFile()}releaseFile(){this.releasePreloadedFile(),this.file=null}getUploadProgress(){return this.uploadProgress!=null?this.uploadProgress:0}setUploadProgress(t){if(this.uploadProgress!==t){var e,n;return this.uploadProgress=t,(e=this.uploadProgressDelegate)===null||e===void 0||(n=e.attachmentDidChangeUploadProgress)===null||n===void 0?void 0:n.call(e,this)}}toJSON(){return this.getAttributes()}getCacheKey(){return[super.getCacheKey(...arguments),this.attributes.getCacheKey(),this.getPreviewURL()].join("/")}getPreviewURL(){return this.previewURL||this.preloadingURL}setPreviewURL(t){if(t!==this.getPreviewURL()){var e,n,r,o;return this.previewURL=t,(e=this.previewDelegate)===null||e===void 0||(n=e.attachmentDidChangeAttributes)===null||n===void 0||n.call(e,this),(r=this.delegate)===null||r===void 0||(o=r.attachmentDidChangePreviewURL)===null||o===void 0?void 0:o.call(r,this)}}preloadURL(){return this.preload(this.getURL(),this.releaseFile)}preloadFile(){if(this.file)return this.fileObjectURL=URL.createObjectURL(this.file),this.preload(this.fileObjectURL)}releasePreloadedFile(){this.fileObjectURL&&(URL.revokeObjectURL(this.fileObjectURL),this.fileObjectURL=null)}preload(t,e){if(t&&t!==this.getPreviewURL())return this.preloadingURL=t,new Qe(t).then(r=>{let{width:o,height:s}=r;return(!this.getWidth()||!this.getHeight())&&this.setAttributes({width:o,height:s}),this.preloadingURL=null,this.setPreviewURL(t),e?.()}).catch(()=>(this.preloadingURL=null,e?.()))}};B(At,"previewablePattern",/^image(\/(gif|png|webp|jpe?g)|$)/);var xt=class extends ft{static fromJSON(t){return new this(At.fromJSON(t.attachment),t.attributes)}constructor(t){super(...arguments),this.attachment=t,this.length=1,this.ensureAttachmentExclusivelyHasAttribute("href"),this.attachment.hasContent()||this.removeProhibitedAttributes()}ensureAttachmentExclusivelyHasAttribute(t){this.hasAttribute(t)&&(this.attachment.hasAttribute(t)||this.attachment.setAttributes(this.attributes.slice([t])),this.attributes=this.attributes.remove(t))}removeProhibitedAttributes(){let t=this.attributes.slice(xt.permittedAttributes);t.isEqualTo(this.attributes)||(this.attributes=t)}getValue(){return this.attachment}isSerializable(){return!this.attachment.isPending()}getCaption(){return this.attributes.get("caption")||""}isEqualTo(t){var e;return super.isEqualTo(t)&&this.attachment.id===(t==null||(e=t.attachment)===null||e===void 0?void 0:e.id)}toString(){return Ai}toJSON(){let t=super.toJSON(...arguments);return t.attachment=this.attachment,t}getCacheKey(){return[super.getCacheKey(...arguments),this.attachment.getCacheKey()].join("/")}toConsole(){return JSON.stringify(this.toString())}};B(xt,"permittedAttributes",["caption","presentation"]);ft.registerType("attachment",xt);var we=class extends ft{static fromJSON(t){return new this(t.string,t.attributes)}constructor(t){super(...arguments),this.string=es(t),this.length=this.string.length}getValue(){return this.string}toString(){return this.string.toString()}isBlockBreak(){return this.toString()===` +`&&this.getAttribute("blockBreak")===!0}toJSON(){let t=super.toJSON(...arguments);return t.string=this.string,t}canBeConsolidatedWith(t){return t&&this.hasSameConstructorAs(t)&&this.hasSameAttributesAsPiece(t)}consolidateWith(t){return new this.constructor(this.toString()+t.toString(),this.attributes)}splitAtOffset(t){let e,n;return t===0?(e=null,n=this):t===this.length?(e=this,n=null):(e=new this.constructor(this.string.slice(0,t),this.attributes),n=new this.constructor(this.string.slice(t),this.attributes)),[e,n]}toConsole(){let{string:t}=this;return t.length>15&&(t=t.slice(0,14)+"\u2026"),JSON.stringify(t.toString())}};ft.registerType("string",we);var Qt=class extends dt{static box(t){return t instanceof this?t:new this(t)}constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];super(...arguments),this.objects=t.slice(0),this.length=this.objects.length}indexOf(t){return this.objects.indexOf(t)}splice(){for(var t=arguments.length,e=new Array(t),n=0;nt(e,n))}insertObjectAtIndex(t,e){return this.splice(e,0,t)}insertSplittableListAtIndex(t,e){return this.splice(e,0,...t.objects)}insertSplittableListAtPosition(t,e){let[n,r]=this.splitObjectAtPosition(e);return new this.constructor(n).insertSplittableListAtIndex(t,r)}editObjectAtIndex(t,e){return this.replaceObjectAtIndex(e(this.objects[t]),t)}replaceObjectAtIndex(t,e){return this.splice(e,1,t)}removeObjectAtIndex(t){return this.splice(t,1)}getObjectAtIndex(t){return this.objects[t]}getSplittableListInRange(t){let[e,n,r]=this.splitObjectsAtRange(t);return new this.constructor(e.slice(n,r+1))}selectSplittableList(t){let e=this.objects.filter(n=>t(n));return new this.constructor(e)}removeObjectsInRange(t){let[e,n,r]=this.splitObjectsAtRange(t);return new this.constructor(e).splice(n,r-n+1)}transformObjectsInRange(t,e){let[n,r,o]=this.splitObjectsAtRange(t),s=n.map((l,c)=>r<=c&&c<=o?e(l):l);return new this.constructor(s)}splitObjectsAtRange(t){let e,[n,r,o]=this.splitObjectAtPosition(zs(t));return[n,e]=new this.constructor(n).splitObjectAtPosition(Us(t)+o),[n,r,e-1]}getObjectAtPosition(t){let{index:e}=this.findIndexAndOffsetAtPosition(t);return this.objects[e]}splitObjectAtPosition(t){let e,n,{index:r,offset:o}=this.findIndexAndOffsetAtPosition(t),s=this.objects.slice(0);if(r!=null)if(o===0)e=r,n=0;else{let l=this.getObjectAtIndex(r),[c,d]=l.splitAtOffset(o);s.splice(r,1,c,d),e=r+1,n=c.getLength()-o}else e=s.length,n=0;return[s,e,n]}consolidate(){let t=[],e=this.objects[0];return this.objects.slice(1).forEach(n=>{var r,o;(r=(o=e).canBeConsolidatedWith)!==null&&r!==void 0&&r.call(o,n)?e=e.consolidateWith(n):(t.push(e),e=n)}),e&&t.push(e),new this.constructor(t)}consolidateFromIndexToIndex(t,e){let r=this.objects.slice(0).slice(t,e+1),o=new this.constructor(r).consolidate().toArray();return this.splice(t,r.length,...o)}findIndexAndOffsetAtPosition(t){let e,n=0;for(e=0;ethis.endPosition+=t.getLength())),this.endPosition}toString(){return this.objects.join("")}toArray(){return this.objects.slice(0)}toJSON(){return this.toArray()}isEqualTo(t){return super.isEqualTo(...arguments)||Ws(this.objects,t?.objects)}contentsForInspection(){return{objects:"[".concat(this.objects.map(t=>t.inspect()).join(", "),"]")}}},Ws=function(i){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];if(i.length!==t.length)return!1;let e=!0;for(let n=0;ni[0],Us=i=>i[1],K=class extends dt{static textForAttachmentWithAttributes(t,e){let n=new xt(t,e);return new this([n])}static textForStringWithAttributes(t,e){let n=new we(t,e);return new this([n])}static fromJSON(t){let e=Array.from(t).map(n=>ft.fromJSON(n));return new this(e)}constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];super(...arguments);let e=t.filter(n=>!n.isEmpty());this.pieceList=new Qt(e)}copy(){return this.copyWithPieceList(this.pieceList)}copyWithPieceList(t){return new this.constructor(t.consolidate().toArray())}copyUsingObjectMap(t){let e=this.getPieces().map(n=>t.find(n)||n);return new this.constructor(e)}appendText(t){return this.insertTextAtPosition(t,this.getLength())}insertTextAtPosition(t,e){return this.copyWithPieceList(this.pieceList.insertSplittableListAtPosition(t.pieceList,e))}removeTextAtRange(t){return this.copyWithPieceList(this.pieceList.removeObjectsInRange(t))}replaceTextAtRange(t,e){return this.removeTextAtRange(e).insertTextAtPosition(t,e[0])}moveTextFromRangeToPosition(t,e){if(t[0]<=e&&e<=t[1])return;let n=this.getTextAtRange(t),r=n.getLength();return t[0]n.copyWithAdditionalAttributes(t)))}removeAttributeAtRange(t,e){return this.copyWithPieceList(this.pieceList.transformObjectsInRange(e,n=>n.copyWithoutAttribute(t)))}setAttributesAtRange(t,e){return this.copyWithPieceList(this.pieceList.transformObjectsInRange(e,n=>n.copyWithAttributes(t)))}getAttributesAtPosition(t){var e;return((e=this.pieceList.getObjectAtPosition(t))===null||e===void 0?void 0:e.getAttributes())||{}}getCommonAttributes(){let t=Array.from(this.pieceList.toArray()).map(e=>e.getAttributes());return U.fromCommonAttributesOfObjects(t).toObject()}getCommonAttributesAtRange(t){return this.getTextAtRange(t).getCommonAttributes()||{}}getExpandedRangeForAttributeAtOffset(t,e){let n,r=n=e,o=this.getLength();for(;r>0&&this.getCommonAttributesAtRange([r-1,n])[t];)r--;for(;n!!t.attachment)}getAttachments(){return this.getAttachmentPieces().map(t=>t.attachment)}getAttachmentAndPositionById(t){let e=0;for(let r of this.pieceList.toArray()){var n;if(((n=r.attachment)===null||n===void 0?void 0:n.id)===t)return{attachment:r.attachment,position:e};e+=r.length}return{attachment:null,position:null}}getAttachmentById(t){let{attachment:e}=this.getAttachmentAndPositionById(t);return e}getRangeOfAttachment(t){let e=this.getAttachmentAndPositionById(t.id),n=e.position;if(t=e.attachment,t)return[n,n+1]}updateAttributesForAttachment(t,e){let n=this.getRangeOfAttachment(e);return n?this.addAttributesAtRange(t,n):this}getLength(){return this.pieceList.getEndPosition()}isEmpty(){return this.getLength()===0}isEqualTo(t){var e;return super.isEqualTo(t)||(t==null||(e=t.pieceList)===null||e===void 0?void 0:e.isEqualTo(this.pieceList))}isBlockBreak(){return this.getLength()===1&&this.pieceList.getObjectAtIndex(0).isBlockBreak()}eachPiece(t){return this.pieceList.eachObject(t)}getPieces(){return this.pieceList.toArray()}getPieceAtPosition(t){return this.pieceList.getObjectAtPosition(t)}contentsForInspection(){return{pieceList:this.pieceList.inspect()}}toSerializableText(){let t=this.pieceList.selectSplittableList(e=>e.isSerializable());return this.copyWithPieceList(t)}toString(){return this.pieceList.toString()}toJSON(){return this.pieceList.toJSON()}toConsole(){return JSON.stringify(this.pieceList.toArray().map(t=>JSON.parse(t.toConsole())))}getDirection(){return qo(this.toString())}isRTL(){return this.getDirection()==="rtl"}},Y=class extends dt{static fromJSON(t){let e=K.fromJSON(t.text);return new this(e,t.attributes,t.htmlAttributes)}constructor(t,e,n){super(...arguments),this.text=Vs(t||new K),this.attributes=e||[],this.htmlAttributes=n||{}}isEmpty(){return this.text.isBlockBreak()}isEqualTo(t){return super.isEqualTo(t)?!0:this.text.isEqualTo(t?.text)&&Pt(this.attributes,t?.attributes)&&ee(this.htmlAttributes,t?.htmlAttributes)}copyWithText(t){return new Y(t,this.attributes,this.htmlAttributes)}copyWithoutText(){return this.copyWithText(null)}copyWithAttributes(t){return new Y(this.text,t,this.htmlAttributes)}copyWithoutAttributes(){return this.copyWithAttributes(null)}copyUsingObjectMap(t){let e=t.find(this.text);return e?this.copyWithText(e):this.copyWithText(this.text.copyUsingObjectMap(t))}addAttribute(t){let e=this.attributes.concat(Er(t));return this.copyWithAttributes(e)}addHTMLAttribute(t,e){let n=Object.assign({},this.htmlAttributes,{[t]:e});return new Y(this.text,this.attributes,n)}removeAttribute(t){let{listAttribute:e}=D(t),n=Cr(Cr(this.attributes,t),e);return this.copyWithAttributes(n)}removeLastAttribute(){return this.removeAttribute(this.getLastAttribute())}getLastAttribute(){return wr(this.attributes)}getAttributes(){return this.attributes.slice(0)}getAttributeLevel(){return this.attributes.length}getAttributeAtLevel(t){return this.attributes[t-1]}hasAttribute(t){return this.attributes.includes(t)}hasAttributes(){return this.getAttributeLevel()>0}getLastNestableAttribute(){return wr(this.getNestableAttributes())}getNestableAttributes(){return this.attributes.filter(t=>D(t).nestable)}getNestingLevel(){return this.getNestableAttributes().length}decreaseNestingLevel(){let t=this.getLastNestableAttribute();return t?this.removeAttribute(t):this}increaseNestingLevel(){let t=this.getLastNestableAttribute();if(t){let e=this.attributes.lastIndexOf(t),n=Ci(this.attributes,e+1,0,...Er(t));return this.copyWithAttributes(n)}else return this}getListItemAttributes(){return this.attributes.filter(t=>D(t).listAttribute)}isListItem(){var t;return(t=D(this.getLastAttribute()))===null||t===void 0?void 0:t.listAttribute}isTerminalBlock(){var t;return(t=D(this.getLastAttribute()))===null||t===void 0?void 0:t.terminal}breaksOnReturn(){var t;return(t=D(this.getLastAttribute()))===null||t===void 0?void 0:t.breakOnReturn}findLineBreakInDirectionFromPosition(t,e){let n=this.toString(),r;switch(t){case"forward":r=n.indexOf(` +`,e);break;case"backward":r=n.slice(0,e).lastIndexOf(` +`)}if(r!==-1)return r}contentsForInspection(){return{text:this.text.inspect(),attributes:this.attributes}}toString(){return this.text.toString()}toJSON(){return{text:this.text,attributes:this.attributes,htmlAttributes:this.htmlAttributes}}getDirection(){return this.text.getDirection()}isRTL(){return this.text.isRTL()}getLength(){return this.text.getLength()}canBeConsolidatedWith(t){return!this.hasAttributes()&&!t.hasAttributes()&&this.getDirection()===t.getDirection()}consolidateWith(t){let e=K.textForStringWithAttributes(` +`),n=this.getTextWithoutBlockBreak().appendText(e);return this.copyWithText(n.appendText(t.text))}splitAtOffset(t){let e,n;return t===0?(e=null,n=this):t===this.getLength()?(e=this,n=null):(e=this.copyWithText(this.text.getTextAtRange([0,t])),n=this.copyWithText(this.text.getTextAtRange([t,this.getLength()]))),[e,n]}getBlockBreakPosition(){return this.text.getLength()-1}getTextWithoutBlockBreak(){return no(this.text)?this.text.getTextAtRange([0,this.getBlockBreakPosition()]):this.text.copy()}canBeGrouped(t){return this.attributes[t]}canBeGroupedWith(t,e){let n=t.getAttributes(),r=n[e],o=this.attributes[e];return o===r&&!(D(o).group===!1&&!Jo().includes(n[e+1]))&&(this.getDirection()===t.getDirection()||t.isEmpty())}},Vs=function(i){return i=Hs(i),i=Gs(i),i},Hs=function(i){let t=!1,e=i.getPieces(),n=e.slice(0,e.length-1),r=e[e.length-1];return r?(n=n.map(o=>o.isBlockBreak()?(t=!0,Ks(o)):o),t?new K([...n,r]):i):i},qs=K.textForStringWithAttributes(` +`,{blockBreak:!0}),Gs=function(i){return no(i)?i:i.appendText(qs)},no=function(i){let t=i.getLength();return t===0?!1:i.getTextAtRange([t-1,t]).isBlockBreak()},Ks=i=>i.copyWithoutAttribute("blockBreak"),Er=function(i){let{listAttribute:t}=D(i);return t?[t,i]:[i]},wr=i=>i.slice(-1)[0],Cr=function(i,t){let e=i.lastIndexOf(t);return e===-1?i:Ci(i,e,1)},G=class extends dt{static fromJSON(t){let e=Array.from(t).map(n=>Y.fromJSON(n));return new this(e)}static fromString(t,e){let n=K.textForStringWithAttributes(t,e);return new this([new Y(n)])}constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];super(...arguments),t.length===0&&(t=[new Y]),this.blockList=Qt.box(t)}isEmpty(){let t=this.getBlockAtIndex(0);return this.blockList.length===1&&t.isEmpty()&&!t.hasAttributes()}copy(){let e=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}).consolidateBlocks?this.blockList.consolidate().toArray():this.blockList.toArray();return new this.constructor(e)}copyUsingObjectsFromDocument(t){let e=new ai(t.getObjects());return this.copyUsingObjectMap(e)}copyUsingObjectMap(t){let e=this.getBlocks().map(n=>t.find(n)||n.copyUsingObjectMap(t));return new this.constructor(e)}copyWithBaseBlockAttributes(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],e=this.getBlocks().map(n=>{let r=t.concat(n.getAttributes());return n.copyWithAttributes(r)});return new this.constructor(e)}replaceBlock(t,e){let n=this.blockList.indexOf(t);return n===-1?this:new this.constructor(this.blockList.replaceObjectAtIndex(e,n))}insertDocumentAtRange(t,e){let{blockList:n}=t;e=A(e);let[r]=e,{index:o,offset:s}=this.locationFromPosition(r),l=this,c=this.getBlockAtPosition(r);return ut(e)&&c.isEmpty()&&!c.hasAttributes()?l=new this.constructor(l.blockList.removeObjectAtIndex(o)):c.getBlockBreakPosition()===s&&r++,l=l.removeTextAtRange(e),new this.constructor(l.blockList.insertSplittableListAtPosition(n,r))}mergeDocumentAtRange(t,e){let n,r;e=A(e);let[o]=e,s=this.locationFromPosition(o),l=this.getBlockAtIndex(s.index).getAttributes(),c=t.getBaseBlockAttributes(),d=l.slice(-c.length);if(Pt(c,d)){let T=l.slice(0,-c.length);n=t.copyWithBaseBlockAttributes(T)}else n=t.copy({consolidateBlocks:!0}).copyWithBaseBlockAttributes(l);let g=n.getBlockCount(),x=n.getBlockAtIndex(0);if(Pt(l,x.getAttributes())){let T=x.getTextWithoutBlockBreak();if(r=this.insertTextAtRange(T,e),g>1){n=new this.constructor(n.getBlocks().slice(1));let Z=o+T.getLength();r=r.insertDocumentAtRange(n,Z)}}else r=this.insertDocumentAtRange(n,e);return r}insertTextAtRange(t,e){e=A(e);let[n]=e,{index:r,offset:o}=this.locationFromPosition(n),s=this.removeTextAtRange(e);return new this.constructor(s.blockList.editObjectAtIndex(r,l=>l.copyWithText(l.text.insertTextAtPosition(t,o))))}removeTextAtRange(t){let e;t=A(t);let[n,r]=t;if(ut(t))return this;let[o,s]=Array.from(this.locationRangeFromRange(t)),l=o.index,c=o.offset,d=this.getBlockAtIndex(l),g=s.index,x=s.offset,T=this.getBlockAtIndex(g);if(r-n===1&&d.getBlockBreakPosition()===c&&T.getBlockBreakPosition()!==x&&T.text.getStringAtPosition(x)===` +`)e=this.blockList.editObjectAtIndex(g,F=>F.copyWithText(F.text.removeTextAtRange([x,x+1])));else{let F,Q=d.text.getTextAtRange([0,c]),Et=T.text.getTextAtRange([x,T.getLength()]),mt=Q.appendText(Et);l!==g&&c===0&&d.getAttributeLevel()>=T.getAttributeLevel()?F=T.copyWithText(mt):F=d.copyWithText(mt);let y=g+1-l;e=this.blockList.splice(l,y,F)}return new this.constructor(e)}moveTextFromRangeToPosition(t,e){let n;t=A(t);let[r,o]=t;if(r<=e&&e<=o)return this;let s=this.getDocumentAtRange(t),l=this.removeTextAtRange(t),c=rr=r.editObjectAtIndex(l,function(){return D(t)?o.addAttribute(t,e):s[0]===s[1]?o:o.copyWithText(o.text.addAttributeAtRange(t,e,s))})),new this.constructor(r)}addAttribute(t,e){let{blockList:n}=this;return this.eachBlock((r,o)=>n=n.editObjectAtIndex(o,()=>r.addAttribute(t,e))),new this.constructor(n)}removeAttributeAtRange(t,e){let{blockList:n}=this;return this.eachBlockAtRange(e,function(r,o,s){D(t)?n=n.editObjectAtIndex(s,()=>r.removeAttribute(t)):o[0]!==o[1]&&(n=n.editObjectAtIndex(s,()=>r.copyWithText(r.text.removeAttributeAtRange(t,o))))}),new this.constructor(n)}updateAttributesForAttachment(t,e){let n=this.getRangeOfAttachment(e),[r]=Array.from(n),{index:o}=this.locationFromPosition(r),s=this.getTextAtIndex(o);return new this.constructor(this.blockList.editObjectAtIndex(o,l=>l.copyWithText(s.updateAttributesForAttachment(t,e))))}removeAttributeForAttachment(t,e){let n=this.getRangeOfAttachment(e);return this.removeAttributeAtRange(t,n)}setHTMLAttributeAtPosition(t,e,n){let r=this.getBlockAtPosition(t),o=r.addHTMLAttribute(e,n);return this.replaceBlock(r,o)}insertBlockBreakAtRange(t){let e;t=A(t);let[n]=t,{offset:r}=this.locationFromPosition(n),o=this.removeTextAtRange(t);return r===0&&(e=[new Y]),new this.constructor(o.blockList.insertSplittableListAtPosition(new Qt(e),n))}applyBlockAttributeAtRange(t,e,n){let r=this.expandRangeToLineBreaksAndSplitBlocks(n),o=r.document;n=r.range;let s=D(t);if(s.listAttribute){o=o.removeLastListAttributeAtRange(n,{exceptAttributeName:t});let l=o.convertLineBreaksToBlockBreaksInRange(n);o=l.document,n=l.range}else s.exclusive?o=o.removeBlockAttributesAtRange(n):s.terminal?o=o.removeLastTerminalAttributeAtRange(n):o=o.consolidateBlocksAtRange(n);return o.addAttributeAtRange(t,e,n)}removeLastListAttributeAtRange(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{blockList:n}=this;return this.eachBlockAtRange(t,function(r,o,s){let l=r.getLastAttribute();!l||!D(l).listAttribute||l!==e.exceptAttributeName&&(n=n.editObjectAtIndex(s,()=>r.removeAttribute(l)))}),new this.constructor(n)}removeLastTerminalAttributeAtRange(t){let{blockList:e}=this;return this.eachBlockAtRange(t,function(n,r,o){let s=n.getLastAttribute();!s||!D(s).terminal||(e=e.editObjectAtIndex(o,()=>n.removeAttribute(s)))}),new this.constructor(e)}removeBlockAttributesAtRange(t){let{blockList:e}=this;return this.eachBlockAtRange(t,function(n,r,o){n.hasAttributes()&&(e=e.editObjectAtIndex(o,()=>n.copyWithoutAttributes()))}),new this.constructor(e)}expandRangeToLineBreaksAndSplitBlocks(t){let e;t=A(t);let[n,r]=t,o=this.locationFromPosition(n),s=this.locationFromPosition(r),l=this,c=l.getBlockAtIndex(o.index);if(o.offset=c.findLineBreakInDirectionFromPosition("backward",o.offset),o.offset!=null&&(e=l.positionFromLocation(o),l=l.insertBlockBreakAtRange([e,e+1]),s.index+=1,s.offset-=l.getBlockAtIndex(o.index).getLength(),o.index+=1),o.offset=0,s.offset===0&&s.index>o.index)s.index-=1,s.offset=l.getBlockAtIndex(s.index).getBlockBreakPosition();else{let d=l.getBlockAtIndex(s.index);d.text.getStringAtRange([s.offset-1,s.offset])===` +`?s.offset-=1:s.offset=d.findLineBreakInDirectionFromPosition("forward",s.offset),s.offset!==d.getBlockBreakPosition()&&(e=l.positionFromLocation(s),l=l.insertBlockBreakAtRange([e,e+1]))}return n=l.positionFromLocation(o),r=l.positionFromLocation(s),t=A([n,r]),{document:l,range:t}}convertLineBreaksToBlockBreaksInRange(t){t=A(t);let[e]=t,n=this.getStringAtRange(t).slice(0,-1),r=this;return n.replace(/.*?\n/g,function(o){e+=o.length,r=r.insertBlockBreakAtRange([e-1,e])}),{document:r,range:t}}consolidateBlocksAtRange(t){t=A(t);let[e,n]=t,r=this.locationFromPosition(e).index,o=this.locationFromPosition(n).index;return new this.constructor(this.blockList.consolidateFromIndexToIndex(r,o))}getDocumentAtRange(t){t=A(t);let e=this.blockList.getSplittableListInRange(t).toArray();return new this.constructor(e)}getStringAtRange(t){let e,n=t=A(t);return n[n.length-1]!==this.getLength()&&(e=-1),this.getDocumentAtRange(t).toString().slice(0,e)}getBlockAtIndex(t){return this.blockList.getObjectAtIndex(t)}getBlockAtPosition(t){let{index:e}=this.locationFromPosition(t);return this.getBlockAtIndex(e)}getTextAtIndex(t){var e;return(e=this.getBlockAtIndex(t))===null||e===void 0?void 0:e.text}getTextAtPosition(t){let{index:e}=this.locationFromPosition(t);return this.getTextAtIndex(e)}getPieceAtPosition(t){let{index:e,offset:n}=this.locationFromPosition(t);return this.getTextAtIndex(e).getPieceAtPosition(n)}getCharacterAtPosition(t){let{index:e,offset:n}=this.locationFromPosition(t);return this.getTextAtIndex(e).getStringAtRange([n,n+1])}getLength(){return this.blockList.getEndPosition()}getBlocks(){return this.blockList.toArray()}getBlockCount(){return this.blockList.length}getEditCount(){return this.editCount}eachBlock(t){return this.blockList.eachObject(t)}eachBlockAtRange(t,e){let n,r;t=A(t);let[o,s]=t,l=this.locationFromPosition(o),c=this.locationFromPosition(s);if(l.index===c.index)return n=this.getBlockAtIndex(l.index),r=[l.offset,c.offset],e(n,r,l.index);for(let d=l.index;d<=c.index;d++)if(n=this.getBlockAtIndex(d),n){switch(d){case l.index:r=[l.offset,n.text.getLength()];break;case c.index:r=[0,c.offset];break;default:r=[0,n.text.getLength()]}e(n,r,d)}}getCommonAttributesAtRange(t){t=A(t);let[e]=t;if(ut(t))return this.getCommonAttributesAtPosition(e);{let n=[],r=[];return this.eachBlockAtRange(t,function(o,s){if(s[0]!==s[1])return n.push(o.text.getCommonAttributesAtRange(s)),r.push(Sr(o))}),U.fromCommonAttributesOfObjects(n).merge(U.fromCommonAttributesOfObjects(r)).toObject()}}getCommonAttributesAtPosition(t){let e,n,{index:r,offset:o}=this.locationFromPosition(t),s=this.getBlockAtIndex(r);if(!s)return{};let l=Sr(s),c=s.text.getAttributesAtPosition(o),d=s.text.getAttributesAtPosition(o-1),g=Object.keys(Lt).filter(x=>Lt[x].inheritable);for(e in d)n=d[e],(n===c[e]||g.includes(e))&&(l[e]=n);return l}getRangeOfCommonAttributeAtPosition(t,e){let{index:n,offset:r}=this.locationFromPosition(e),o=this.getTextAtIndex(n),[s,l]=Array.from(o.getExpandedRangeForAttributeAtOffset(t,r)),c=this.positionFromLocation({index:n,offset:s}),d=this.positionFromLocation({index:n,offset:l});return A([c,d])}getBaseBlockAttributes(){let t=this.getBlockAtIndex(0).getAttributes();for(let e=1;e{let o=[];for(let s=0;s{let{text:n}=e;return t=t.concat(n.getAttachmentPieces())}),t}getAttachments(){return this.getAttachmentPieces().map(t=>t.attachment)}getRangeOfAttachment(t){let e=0,n=this.blockList.toArray();for(let r=0;r{let o=r.getLength();r.hasAttribute(t)&&n.push([e,e+o]),e+=o}),n}findRangesForTextAttribute(t){let{withValue:e}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=0,r=[],o=[],s=function(l){return e?l.getAttribute(t)===e:l.hasAttribute(t)};return this.getPieces().forEach(l=>{let c=l.getLength();s(l)&&(r[1]===n?r[1]=n+c:o.push(r=[n,n+c])),n+=c}),o}locationFromPosition(t){let e=this.blockList.findIndexAndOffsetAtPosition(Math.max(0,t));if(e.index!=null)return e;{let n=this.getBlocks();return{index:n.length-1,offset:n[n.length-1].getLength()}}}positionFromLocation(t){return this.blockList.findPositionAtIndexAndOffset(t.index,t.offset)}locationRangeFromPosition(t){return A(this.locationFromPosition(t))}locationRangeFromRange(t){if(t=A(t),!t)return;let[e,n]=Array.from(t),r=this.locationFromPosition(e),o=this.locationFromPosition(n);return A([r,o])}rangeFromLocationRange(t){let e;t=A(t);let n=this.positionFromLocation(t[0]);return ut(t)||(e=this.positionFromLocation(t[1])),A([n,e])}isEqualTo(t){return this.blockList.isEqualTo(t?.blockList)}getTexts(){return this.getBlocks().map(t=>t.text)}getPieces(){let t=[];return Array.from(this.getTexts()).forEach(e=>{t.push(...Array.from(e.getPieces()||[]))}),t}getObjects(){return this.getBlocks().concat(this.getTexts()).concat(this.getPieces())}toSerializableDocument(){let t=[];return this.blockList.eachObject(e=>t.push(e.copyWithText(e.text.toSerializableText()))),new this.constructor(t)}toString(){return this.blockList.toString()}toJSON(){return this.blockList.toJSON()}toConsole(){return JSON.stringify(this.blockList.toArray().map(t=>JSON.parse(t.text.toConsole())))}},Sr=function(i){let t={},e=i.getLastAttribute();return e&&(t[e]=!0),t},Gn=function(i){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},e="string";return i=ge(i),{string:i,attributes:t,type:e}},Js=function(i){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return{attachment:i,attributes:t,type:"attachment"}},Ys=function(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return{text:[],attributes:i,htmlAttributes:t}},Tr=(i,t)=>{try{return JSON.parse(i.getAttribute("data-trix-".concat(t)))}catch{return{}}},Xs=i=>{let t=i.getAttribute("width"),e=i.getAttribute("height"),n={};return t&&(n.width=parseInt(t,10)),e&&(n.height=parseInt(e,10)),n},Mt=class extends S{static parse(t,e){let n=new this(t,e);return n.parse(),n}constructor(t){let{referenceElement:e,purifyOptions:n}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(...arguments),this.html=t,this.referenceElement=e,this.purifyOptions=n,this.blocks=[],this.blockElements=[],this.processedElements=[]}getDocument(){return G.fromJSON(this.blocks)}parse(){try{this.createHiddenContainer(),Xt.setHTML(this.containerElement,this.html,{purifyOptions:this.purifyOptions});let t=He(this.containerElement,{usingFilter:Qs});for(;t.nextNode();)this.processNode(t.currentNode);return this.translateBlockElementMarginsToNewlines()}finally{this.removeHiddenContainer()}}createHiddenContainer(){return this.referenceElement?(this.containerElement=this.referenceElement.cloneNode(!1),this.containerElement.removeAttribute("id"),this.containerElement.setAttribute("data-trix-internal",""),this.containerElement.style.display="none",this.referenceElement.parentNode.insertBefore(this.containerElement,this.referenceElement.nextSibling)):(this.containerElement=p({tagName:"div",style:{display:"none"}}),document.body.appendChild(this.containerElement))}removeHiddenContainer(){return yt(this.containerElement)}processNode(t){switch(t.nodeType){case Node.TEXT_NODE:if(!this.isInsignificantTextNode(t))return this.appendBlockForTextNode(t),this.processTextNode(t);break;case Node.ELEMENT_NODE:return this.appendBlockForElement(t),this.processElement(t)}}appendBlockForTextNode(t){let e=t.parentNode;if(e===this.currentBlockElement&&this.isBlockElement(t.previousSibling))return this.appendStringWithAttributes(` +`);if(e===this.containerElement||this.isBlockElement(e)){var n;let r=this.getBlockAttributes(e),o=this.getBlockHTMLAttributes(e);Pt(r,(n=this.currentBlock)===null||n===void 0?void 0:n.attributes)||(this.currentBlock=this.appendBlockForAttributesWithElement(r,e,o),this.currentBlockElement=e)}}appendBlockForElement(t){let e=this.isBlockElement(t),n=kt(this.currentBlockElement,t);if(e&&!this.isBlockElement(t.firstChild)){if(!this.isInsignificantTextNode(t.firstChild)||!this.isBlockElement(t.firstElementChild)){let r=this.getBlockAttributes(t),o=this.getBlockHTMLAttributes(t);if(t.firstChild)if(!(n&&Pt(r,this.currentBlock.attributes)))this.currentBlock=this.appendBlockForAttributesWithElement(r,t,o),this.currentBlockElement=t;else return this.appendStringWithAttributes(` +`)}}else if(this.currentBlockElement&&!n&&!e){let r=this.findParentBlockElement(t);if(r)return this.appendBlockForElement(r);this.currentBlock=this.appendEmptyBlock(),this.currentBlockElement=null}}findParentBlockElement(t){let{parentElement:e}=t;for(;e&&e!==this.containerElement;){if(this.isBlockElement(e)&&this.blockElements.includes(e))return e;e=e.parentElement}return null}processTextNode(t){let e=t.data;if(!kr(t.parentNode)){var n;e=ki(e),io((n=t.previousSibling)===null||n===void 0?void 0:n.textContent)&&(e=$s(e))}return this.appendStringWithAttributes(e,this.getTextAttributes(t.parentNode))}processElement(t){let e;if(Dt(t)){if(e=Tr(t,"attachment"),Object.keys(e).length){let n=this.getTextAttributes(t);this.appendAttachmentWithAttributes(e,n),t.innerHTML=""}return this.processedElements.push(t)}else switch(W(t)){case"br":return!this.isExtraBR(t)&&!this.isBlockElement(t.nextSibling)&&this.appendStringWithAttributes(` +`,this.getTextAttributes(t)),this.processedElements.push(t);case"img":e={url:t.getAttribute("src"),contentType:"image"};let n=Xs(t);for(let r in n){let o=n[r];e[r]=o}return this.appendAttachmentWithAttributes(e,this.getTextAttributes(t)),this.processedElements.push(t);case"tr":if(this.needsTableSeparator(t))return this.appendStringWithAttributes(ze.tableRowSeparator);break;case"td":if(this.needsTableSeparator(t))return this.appendStringWithAttributes(ze.tableCellSeparator);break}}appendBlockForAttributesWithElement(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.blockElements.push(e);let r=Ys(t,n);return this.blocks.push(r),r}appendEmptyBlock(){return this.appendBlockForAttributesWithElement([],null)}appendStringWithAttributes(t,e){return this.appendPiece(Gn(t,e))}appendAttachmentWithAttributes(t,e){return this.appendPiece(Js(t,e))}appendPiece(t){return this.blocks.length===0&&this.appendEmptyBlock(),this.blocks[this.blocks.length-1].text.push(t)}appendStringToTextAtIndex(t,e){let{text:n}=this.blocks[e],r=n[n.length-1];if(r?.type==="string")r.string+=t;else return n.push(Gn(t))}prependStringToTextAtIndex(t,e){let{text:n}=this.blocks[e],r=n[0];if(r?.type==="string")r.string=t+r.string;else return n.unshift(Gn(t))}getTextAttributes(t){let e,n={};for(let r in Lt){let o=Lt[r];if(o.tagName&&vt(t,{matchingSelector:o.tagName,untilNode:this.containerElement}))n[r]=!0;else if(o.parser){if(e=o.parser(t),e){let s=!1;for(let l of this.findBlockElementAncestors(t))if(o.parser(l)===e){s=!0;break}s||(n[r]=e)}}else o.styleProperty&&(e=t.style[o.styleProperty],e&&(n[r]=e))}if(Dt(t)){let r=Tr(t,"attributes");for(let o in r)e=r[o],n[o]=e}return n}getBlockAttributes(t){let e=[];for(;t&&t!==this.containerElement;){for(let r in z){let o=z[r];if(o.parse!==!1&&W(t)===o.tagName){var n;((n=o.test)!==null&&n!==void 0&&n.call(o,t)||!o.test)&&(e.push(r),o.listAttribute&&e.push(o.listAttribute))}}t=t.parentNode}return e.reverse()}getBlockHTMLAttributes(t){let e={},n=Object.values(z).find(o=>o.tagName===W(t));return(n?.htmlAttributes||[]).forEach(o=>{t.hasAttribute(o)&&(e[o]=t.getAttribute(o))}),e}findBlockElementAncestors(t){let e=[];for(;t&&t!==this.containerElement;){let n=W(t);pe().includes(n)&&e.push(t),t=t.parentNode}return e}isBlockElement(t){if(t?.nodeType===Node.ELEMENT_NODE&&!Dt(t)&&!vt(t,{matchingSelector:"td",untilNode:this.containerElement}))return pe().includes(W(t))||window.getComputedStyle(t).display==="block"}isInsignificantTextNode(t){if(t?.nodeType!==Node.TEXT_NODE||!ta(t.data))return;let{parentNode:e,previousSibling:n,nextSibling:r}=t;if(!(Zs(e.previousSibling)&&!this.isBlockElement(e.previousSibling))&&!kr(e))return!n||this.isBlockElement(n)||!r||this.isBlockElement(r)}isExtraBR(t){return W(t)==="br"&&this.isBlockElement(t.parentNode)&&t.parentNode.lastChild===t}needsTableSeparator(t){if(ze.removeBlankTableCells){var e;let n=(e=t.previousSibling)===null||e===void 0?void 0:e.textContent;return n&&/\S/.test(n)}else return t.previousSibling}translateBlockElementMarginsToNewlines(){let t=this.getMarginOfDefaultBlockElement();for(let e=0;et.top*2&&this.prependStringToTextAtIndex(` +`,e),n.bottom>t.bottom*2&&this.appendStringToTextAtIndex(` +`,e))}}getMarginOfBlockElementAtIndex(t){let e=this.blockElements[t];if(e&&e.textContent&&!pe().includes(W(e))&&!this.processedElements.includes(e))return Rr(e)}getMarginOfDefaultBlockElement(){let t=p(z.default.tagName);return this.containerElement.appendChild(t),Rr(t)}},kr=function(i){let{whiteSpace:t}=window.getComputedStyle(i);return["pre","pre-wrap","pre-line"].includes(t)},Zs=i=>i&&!io(i.textContent),Rr=function(i){let t=window.getComputedStyle(i);if(t.display==="block")return{top:parseInt(t.marginTop),bottom:parseInt(t.marginBottom)}},Qs=function(i){return W(i)==="style"?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT},$s=i=>i.replace(new RegExp("^".concat(Ti.source,"+")),""),ta=i=>new RegExp("^".concat(Ti.source,"*$")).test(i),io=i=>/\s$/.test(i),ea="[data-trix-serialize=false]",na=["contenteditable","data-trix-id","data-trix-store-key","data-trix-mutable","data-trix-placeholder","tabindex"],hi="data-trix-serialized-attributes",ia="[".concat(hi,"]"),ra=new RegExp("","g"),oa={"application/json":function(i){let t;if(i instanceof G)t=i;else if(i instanceof HTMLElement)t=Mt.parse(i.innerHTML).getDocument();else throw new Error("unserializable object");return t.toSerializableDocument().toJSONString()},"text/html":function(i){let t;if(i instanceof G)t=Zt.render(i);else if(i instanceof HTMLElement)t=i.cloneNode(!0);else throw new Error("unserializable object");return Array.from(t.querySelectorAll(ea)).forEach(e=>{yt(e)}),na.forEach(e=>{Array.from(t.querySelectorAll("[".concat(e,"]"))).forEach(n=>{n.removeAttribute(e)})}),Array.from(t.querySelectorAll(ia)).forEach(e=>{try{let n=JSON.parse(e.getAttribute(hi));e.removeAttribute(hi);for(let r in n){let o=n[r];e.setAttribute(r,o)}}catch{}}),t.innerHTML.replace(ra,"")}};var sa=function(i,t){let e=oa[t];if(e)return e(i);throw new Error("unknown content type: ".concat(t))};var aa=Object.freeze({__proto__:null}),E=class extends S{constructor(t,e){super(...arguments),this.attachmentManager=t,this.attachment=e,this.id=this.attachment.id,this.file=this.attachment.file}remove(){return this.attachmentManager.requestRemovalOfAttachment(this.attachment)}};E.proxyMethod("attachment.getAttribute");E.proxyMethod("attachment.hasAttribute");E.proxyMethod("attachment.setAttribute");E.proxyMethod("attachment.getAttributes");E.proxyMethod("attachment.setAttributes");E.proxyMethod("attachment.isPending");E.proxyMethod("attachment.isPreviewable");E.proxyMethod("attachment.getURL");E.proxyMethod("attachment.getPreviewURL");E.proxyMethod("attachment.setPreviewURL");E.proxyMethod("attachment.getHref");E.proxyMethod("attachment.getFilename");E.proxyMethod("attachment.getFilesize");E.proxyMethod("attachment.getFormattedFilesize");E.proxyMethod("attachment.getExtension");E.proxyMethod("attachment.getContentType");E.proxyMethod("attachment.getFile");E.proxyMethod("attachment.setFile");E.proxyMethod("attachment.releaseFile");E.proxyMethod("attachment.getUploadProgress");E.proxyMethod("attachment.setUploadProgress");var $e=class extends S{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];super(...arguments),this.managedAttachments={},Array.from(t).forEach(e=>{this.manageAttachment(e)})}getAttachments(){let t=[];for(let e in this.managedAttachments){let n=this.managedAttachments[e];t.push(n)}return t}manageAttachment(t){return this.managedAttachments[t.id]||(this.managedAttachments[t.id]=new E(this,t)),this.managedAttachments[t.id]}attachmentIsManaged(t){return t.id in this.managedAttachments}requestRemovalOfAttachment(t){if(this.attachmentIsManaged(t)){var e,n;return(e=this.delegate)===null||e===void 0||(n=e.attachmentManagerDidRequestRemovalOfAttachment)===null||n===void 0?void 0:n.call(e,t)}}unmanageAttachment(t){let e=this.managedAttachments[t.id];return delete this.managedAttachments[t.id],e}},tn=class{constructor(t){this.composition=t,this.document=this.composition.document;let e=this.composition.getSelectedRange();this.startPosition=e[0],this.endPosition=e[1],this.startLocation=this.document.locationFromPosition(this.startPosition),this.endLocation=this.document.locationFromPosition(this.endPosition),this.block=this.document.getBlockAtIndex(this.endLocation.index),this.breaksOnReturn=this.block.breaksOnReturn(),this.previousCharacter=this.block.text.getStringAtPosition(this.endLocation.offset-1),this.nextCharacter=this.block.text.getStringAtPosition(this.endLocation.offset)}shouldInsertBlockBreak(){return this.block.hasAttributes()&&this.block.isListItem()&&!this.block.isEmpty()?this.startLocation.offset!==0:this.breaksOnReturn&&this.nextCharacter!==` +`}shouldBreakFormattedBlock(){return this.block.hasAttributes()&&!this.block.isListItem()&&(this.breaksOnReturn&&this.nextCharacter===` +`||this.previousCharacter===` +`)}shouldDecreaseListLevel(){return this.block.hasAttributes()&&this.block.isListItem()&&this.block.isEmpty()}shouldPrependListItem(){return this.block.isListItem()&&this.startLocation.offset===0&&!this.block.isEmpty()}shouldRemoveLastBlockAttribute(){return this.block.hasAttributes()&&!this.block.isListItem()&&this.block.isEmpty()}},Dr=" ",it=class extends S{constructor(){super(...arguments),this.document=new G,this.attachments=[],this.currentAttributes={},this.revision=0}setDocument(t){if(!t.isEqualTo(this.document)){var e,n;return this.document=t,this.refreshAttachments(),this.revision++,(e=this.delegate)===null||e===void 0||(n=e.compositionDidChangeDocument)===null||n===void 0?void 0:n.call(e,t)}}getSnapshot(){return{document:this.document,selectedRange:this.getSelectedRange()}}loadSnapshot(t){var e,n,r,o;let{document:s,selectedRange:l}=t;return(e=this.delegate)===null||e===void 0||(n=e.compositionWillLoadSnapshot)===null||n===void 0||n.call(e),this.setDocument(s??new G),this.setSelection(l??[0,0]),(r=this.delegate)===null||r===void 0||(o=r.compositionDidLoadSnapshot)===null||o===void 0?void 0:o.call(r)}insertText(t){let{updatePosition:e}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{updatePosition:!0},n=this.getSelectedRange();this.setDocument(this.document.insertTextAtRange(t,n));let r=n[0],o=r+t.getLength();return e&&this.setSelection(o),this.notifyDelegateOfInsertionAtRange([r,o])}insertBlock(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:new Y,e=new G([t]);return this.insertDocument(e)}insertDocument(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:new G,e=this.getSelectedRange();this.setDocument(this.document.insertDocumentAtRange(t,e));let n=e[0],r=n+t.getLength();return this.setSelection(r),this.notifyDelegateOfInsertionAtRange([n,r])}insertString(t,e){let n=this.getCurrentTextAttributes(),r=K.textForStringWithAttributes(t,n);return this.insertText(r,e)}insertBlockBreak(){let t=this.getSelectedRange();this.setDocument(this.document.insertBlockBreakAtRange(t));let e=t[0],n=e+1;return this.setSelection(n),this.notifyDelegateOfInsertionAtRange([e,n])}insertLineBreak(){let t=new tn(this);if(t.shouldDecreaseListLevel())return this.decreaseListLevel(),this.setSelection(t.startPosition);if(t.shouldPrependListItem()){let e=new G([t.block.copyWithoutText()]);return this.insertDocument(e)}else return t.shouldInsertBlockBreak()?this.insertBlockBreak():t.shouldRemoveLastBlockAttribute()?this.removeLastBlockAttribute():t.shouldBreakFormattedBlock()?this.breakFormattedBlock(t):this.insertString(` +`)}insertHTML(t){let e=Mt.parse(t,{purifyOptions:{SAFE_FOR_XML:!0}}).getDocument(),n=this.getSelectedRange();this.setDocument(this.document.mergeDocumentAtRange(e,n));let r=n[0],o=r+e.getLength()-1;return this.setSelection(o),this.notifyDelegateOfInsertionAtRange([r,o])}replaceHTML(t){let e=Mt.parse(t).getDocument().copyUsingObjectsFromDocument(this.document),n=this.getLocationRange({strict:!1}),r=this.document.rangeFromLocationRange(n);return this.setDocument(e),this.setSelection(r)}insertFile(t){return this.insertFiles([t])}insertFiles(t){let e=[];return Array.from(t).forEach(n=>{var r;if((r=this.delegate)!==null&&r!==void 0&&r.compositionShouldAcceptFile(n)){let o=At.attachmentForFile(n);e.push(o)}}),this.insertAttachments(e)}insertAttachment(t){return this.insertAttachments([t])}insertAttachments(t){let e=new K;return Array.from(t).forEach(n=>{var r;let o=n.getType(),s=(r=yi[o])===null||r===void 0?void 0:r.presentation,l=this.getCurrentTextAttributes();s&&(l.presentation=s);let c=K.textForAttachmentWithAttributes(n,l);e=e.appendText(c)}),this.insertText(e)}shouldManageDeletingInDirection(t){let e=this.getLocationRange();if(ut(e)){if(t==="backward"&&e[0].offset===0||this.shouldManageMovingCursorInDirection(t))return!0}else if(e[0].index!==e[1].index)return!0;return!1}deleteInDirection(t){let{length:e}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n,r,o,s=this.getLocationRange(),l=this.getSelectedRange(),c=ut(l);if(c?r=t==="backward"&&s[0].offset===0:o=s[0].index!==s[1].index,r&&this.canDecreaseBlockAttributeLevel()){let d=this.getBlock();if(d.isListItem()?this.decreaseListLevel():this.decreaseBlockAttributeLevel(),this.setSelection(l[0]),d.isEmpty())return!1}if(c&&(l=this.getExpandedRangeInDirection(t,{length:e}),t==="backward"&&(n=this.getAttachmentAtRange(l))),n)return this.editAttachment(n),!1;if(this.setDocument(this.document.removeTextAtRange(l)),this.setSelection(l[0]),r||o)return!1}moveTextFromRange(t){let[e]=Array.from(this.getSelectedRange());return this.setDocument(this.document.moveTextFromRangeToPosition(t,e)),this.setSelection(e)}removeAttachment(t){let e=this.document.getRangeOfAttachment(t);if(e)return this.stopEditingAttachment(),this.setDocument(this.document.removeTextAtRange(e)),this.setSelection(e[0])}removeLastBlockAttribute(){let[t,e]=Array.from(this.getSelectedRange()),n=this.document.getBlockAtPosition(e);return this.removeCurrentAttribute(n.getLastAttribute()),this.setSelection(t)}insertPlaceholder(){return this.placeholderPosition=this.getPosition(),this.insertString(Dr)}selectPlaceholder(){if(this.placeholderPosition!=null)return this.setSelectedRange([this.placeholderPosition,this.placeholderPosition+Dr.length]),this.getSelectedRange()}forgetPlaceholder(){this.placeholderPosition=null}hasCurrentAttribute(t){let e=this.currentAttributes[t];return e!=null&&e!==!1}toggleCurrentAttribute(t){let e=!this.currentAttributes[t];return e?this.setCurrentAttribute(t,e):this.removeCurrentAttribute(t)}canSetCurrentAttribute(t){return D(t)?this.canSetCurrentBlockAttribute(t):this.canSetCurrentTextAttribute(t)}canSetCurrentTextAttribute(t){let e=this.getSelectedDocument();if(!!e){for(let n of Array.from(e.getAttachments()))if(!n.hasContent())return!1;return!0}}canSetCurrentBlockAttribute(t){let e=this.getBlock();if(!!e)return!e.isTerminalBlock()}setCurrentAttribute(t,e){return D(t)?this.setBlockAttribute(t,e):(this.setTextAttribute(t,e),this.currentAttributes[t]=e,this.notifyDelegateOfCurrentAttributesChange())}setHTMLAtributeAtPosition(t,e,n){var r;let o=this.document.getBlockAtPosition(t),s=(r=D(o.getLastAttribute()))===null||r===void 0?void 0:r.htmlAttributes;if(o&&s!==null&&s!==void 0&&s.includes(e)){let l=this.document.setHTMLAttributeAtPosition(t,e,n);this.setDocument(l)}}setTextAttribute(t,e){let n=this.getSelectedRange();if(!n)return;let[r,o]=Array.from(n);if(r===o){if(t==="href"){let s=K.textForStringWithAttributes(e,{href:e});return this.insertText(s)}}else return this.setDocument(this.document.addAttributeAtRange(t,e,n))}setBlockAttribute(t,e){let n=this.getSelectedRange();if(this.canSetCurrentAttribute(t))return this.setDocument(this.document.applyBlockAttributeAtRange(t,e,n)),this.setSelection(n)}removeCurrentAttribute(t){return D(t)?(this.removeBlockAttribute(t),this.updateCurrentAttributes()):(this.removeTextAttribute(t),delete this.currentAttributes[t],this.notifyDelegateOfCurrentAttributesChange())}removeTextAttribute(t){let e=this.getSelectedRange();if(!!e)return this.setDocument(this.document.removeAttributeAtRange(t,e))}removeBlockAttribute(t){let e=this.getSelectedRange();if(!!e)return this.setDocument(this.document.removeAttributeAtRange(t,e))}canDecreaseNestingLevel(){var t;return((t=this.getBlock())===null||t===void 0?void 0:t.getNestingLevel())>0}canIncreaseNestingLevel(){var t;let e=this.getBlock();if(!!e)if((t=D(e.getLastNestableAttribute()))!==null&&t!==void 0&&t.listAttribute){let n=this.getPreviousBlock();if(n)return Uo(n.getListItemAttributes(),e.getListItemAttributes())}else return e.getNestingLevel()>0}decreaseNestingLevel(){let t=this.getBlock();if(!!t)return this.setDocument(this.document.replaceBlock(t,t.decreaseNestingLevel()))}increaseNestingLevel(){let t=this.getBlock();if(!!t)return this.setDocument(this.document.replaceBlock(t,t.increaseNestingLevel()))}canDecreaseBlockAttributeLevel(){var t;return((t=this.getBlock())===null||t===void 0?void 0:t.getAttributeLevel())>0}decreaseBlockAttributeLevel(){var t;let e=(t=this.getBlock())===null||t===void 0?void 0:t.getLastAttribute();if(e)return this.removeCurrentAttribute(e)}decreaseListLevel(){let[t]=Array.from(this.getSelectedRange()),{index:e}=this.document.locationFromPosition(t),n=e,r=this.getBlock().getAttributeLevel(),o=this.document.getBlockAtIndex(n+1);for(;o&&!(!o.isListItem()||o.getAttributeLevel()<=r);)n++,o=this.document.getBlockAtIndex(n+1);t=this.document.positionFromLocation({index:e,offset:0});let s=this.document.positionFromLocation({index:n,offset:0});return this.setDocument(this.document.removeLastListAttributeAtRange([t,s]))}updateCurrentAttributes(){let t=this.getSelectedRange({ignoreLock:!0});if(t){let e=this.document.getCommonAttributesAtRange(t);if(Array.from(ri()).forEach(n=>{e[n]||this.canSetCurrentAttribute(n)||(e[n]=!1)}),!ee(e,this.currentAttributes))return this.currentAttributes=e,this.notifyDelegateOfCurrentAttributesChange()}}getCurrentAttributes(){return _r.call({},this.currentAttributes)}getCurrentTextAttributes(){let t={};for(let e in this.currentAttributes){let n=this.currentAttributes[e];n!==!1&&oi(e)&&(t[e]=n)}return t}freezeSelection(){return this.setCurrentAttribute("frozen",!0)}thawSelection(){return this.removeCurrentAttribute("frozen")}hasFrozenSelection(){return this.hasCurrentAttribute("frozen")}setSelection(t){var e;let n=this.document.locationRangeFromRange(t);return(e=this.delegate)===null||e===void 0?void 0:e.compositionDidRequestChangingSelectionToLocationRange(n)}getSelectedRange(){let t=this.getLocationRange();if(t)return this.document.rangeFromLocationRange(t)}setSelectedRange(t){let e=this.document.locationRangeFromRange(t);return this.getSelectionManager().setLocationRange(e)}getPosition(){let t=this.getLocationRange();if(t)return this.document.positionFromLocation(t[0])}getLocationRange(t){return this.targetLocationRange?this.targetLocationRange:this.getSelectionManager().getLocationRange(t)||A({index:0,offset:0})}withTargetLocationRange(t,e){let n;this.targetLocationRange=t;try{n=e()}finally{this.targetLocationRange=null}return n}withTargetRange(t,e){let n=this.document.locationRangeFromRange(t);return this.withTargetLocationRange(n,e)}withTargetDOMRange(t,e){let n=this.createLocationRangeFromDOMRange(t,{strict:!1});return this.withTargetLocationRange(n,e)}getExpandedRangeInDirection(t){let{length:e}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},[n,r]=Array.from(this.getSelectedRange());return t==="backward"?e?n-=e:n=this.translateUTF16PositionFromOffset(n,-1):e?r+=e:r=this.translateUTF16PositionFromOffset(r,1),A([n,r])}shouldManageMovingCursorInDirection(t){if(this.editingAttachment)return!0;let e=this.getExpandedRangeInDirection(t);return this.getAttachmentAtRange(e)!=null}moveCursorInDirection(t){let e,n;if(this.editingAttachment)n=this.document.getRangeOfAttachment(this.editingAttachment);else{let r=this.getSelectedRange();n=this.getExpandedRangeInDirection(t),e=!gn(r,n)}if(t==="backward"?this.setSelectedRange(n[0]):this.setSelectedRange(n[1]),e){let r=this.getAttachmentAtRange(n);if(r)return this.editAttachment(r)}}expandSelectionInDirection(t){let{length:e}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=this.getExpandedRangeInDirection(t,{length:e});return this.setSelectedRange(n)}expandSelectionForEditing(){if(this.hasCurrentAttribute("href"))return this.expandSelectionAroundCommonAttribute("href")}expandSelectionAroundCommonAttribute(t){let e=this.getPosition(),n=this.document.getRangeOfCommonAttributeAtPosition(t,e);return this.setSelectedRange(n)}selectionContainsAttachments(){var t;return((t=this.getSelectedAttachments())===null||t===void 0?void 0:t.length)>0}selectionIsInCursorTarget(){return this.editingAttachment||this.positionIsCursorTarget(this.getPosition())}positionIsCursorTarget(t){let e=this.document.locationFromPosition(t);if(e)return this.locationIsCursorTarget(e)}positionIsBlockBreak(t){var e;return(e=this.document.getPieceAtPosition(t))===null||e===void 0?void 0:e.isBlockBreak()}getSelectedDocument(){let t=this.getSelectedRange();if(t)return this.document.getDocumentAtRange(t)}getSelectedAttachments(){var t;return(t=this.getSelectedDocument())===null||t===void 0?void 0:t.getAttachments()}getAttachments(){return this.attachments.slice(0)}refreshAttachments(){let t=this.document.getAttachments(),{added:e,removed:n}=Vo(this.attachments,t);return this.attachments=t,Array.from(n).forEach(r=>{var o,s;r.delegate=null,(o=this.delegate)===null||o===void 0||(s=o.compositionDidRemoveAttachment)===null||s===void 0||s.call(o,r)}),(()=>{let r=[];return Array.from(e).forEach(o=>{var s,l;o.delegate=this,r.push((s=this.delegate)===null||s===void 0||(l=s.compositionDidAddAttachment)===null||l===void 0?void 0:l.call(s,o))}),r})()}attachmentDidChangeAttributes(t){var e,n;return this.revision++,(e=this.delegate)===null||e===void 0||(n=e.compositionDidEditAttachment)===null||n===void 0?void 0:n.call(e,t)}attachmentDidChangePreviewURL(t){var e,n;return this.revision++,(e=this.delegate)===null||e===void 0||(n=e.compositionDidChangeAttachmentPreviewURL)===null||n===void 0?void 0:n.call(e,t)}editAttachment(t,e){var n,r;if(t!==this.editingAttachment)return this.stopEditingAttachment(),this.editingAttachment=t,(n=this.delegate)===null||n===void 0||(r=n.compositionDidStartEditingAttachment)===null||r===void 0?void 0:r.call(n,this.editingAttachment,e)}stopEditingAttachment(){var t,e;!this.editingAttachment||((t=this.delegate)===null||t===void 0||(e=t.compositionDidStopEditingAttachment)===null||e===void 0||e.call(t,this.editingAttachment),this.editingAttachment=null)}updateAttributesForAttachment(t,e){return this.setDocument(this.document.updateAttributesForAttachment(t,e))}removeAttributeForAttachment(t,e){return this.setDocument(this.document.removeAttributeForAttachment(t,e))}breakFormattedBlock(t){let{document:e}=t,{block:n}=t,r=t.startPosition,o=[r-1,r];n.getBlockBreakPosition()===t.startLocation.offset?(n.breaksOnReturn()&&t.nextCharacter===` +`?r+=1:e=e.removeTextAtRange(o),o=[r,r]):t.nextCharacter===` +`?t.previousCharacter===` +`?o=[r-1,r+1]:(o=[r,r+1],r+=1):t.startLocation.offset-1!==0&&(r+=1);let s=new G([n.removeLastAttribute().copyWithoutText()]);return this.setDocument(e.insertDocumentAtRange(s,o)),this.setSelection(r)}getPreviousBlock(){let t=this.getLocationRange();if(t){let{index:e}=t[0];if(e>0)return this.document.getBlockAtIndex(e-1)}}getBlock(){let t=this.getLocationRange();if(t)return this.document.getBlockAtIndex(t[0].index)}getAttachmentAtRange(t){let e=this.document.getDocumentAtRange(t);if(e.toString()==="".concat(Ai,` +`))return e.getAttachments()[0]}notifyDelegateOfCurrentAttributesChange(){var t,e;return(t=this.delegate)===null||t===void 0||(e=t.compositionDidChangeCurrentAttributes)===null||e===void 0?void 0:e.call(t,this.currentAttributes)}notifyDelegateOfInsertionAtRange(t){var e,n;return(e=this.delegate)===null||e===void 0||(n=e.compositionDidPerformInsertionAtRange)===null||n===void 0?void 0:n.call(e,t)}translateUTF16PositionFromOffset(t,e){let n=this.document.toUTF16String(),r=n.offsetFromUCS2Offset(t);return n.offsetToUCS2Offset(r+e)}};it.proxyMethod("getSelectionManager().getPointRange");it.proxyMethod("getSelectionManager().setLocationRangeFromPointRange");it.proxyMethod("getSelectionManager().createLocationRangeFromDOMRange");it.proxyMethod("getSelectionManager().locationIsCursorTarget");it.proxyMethod("getSelectionManager().selectionIsExpanded");it.proxyMethod("delegate?.getSelectionManager");var Ce=class extends S{constructor(t){super(...arguments),this.composition=t,this.undoEntries=[],this.redoEntries=[]}recordUndoEntry(t){let{context:e,consolidatable:n}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=this.undoEntries.slice(-1)[0];if(!n||!la(r,t,e)){let o=this.createEntry({description:t,context:e});this.undoEntries.push(o),this.redoEntries=[]}}undo(){let t=this.undoEntries.pop();if(t){let e=this.createEntry(t);return this.redoEntries.push(e),this.composition.loadSnapshot(t.snapshot)}}redo(){let t=this.redoEntries.pop();if(t){let e=this.createEntry(t);return this.undoEntries.push(e),this.composition.loadSnapshot(t.snapshot)}}canUndo(){return this.undoEntries.length>0}canRedo(){return this.redoEntries.length>0}createEntry(){let{description:t,context:e}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return{description:t?.toString(),context:JSON.stringify(e),snapshot:this.composition.getSnapshot()}}},la=(i,t,e)=>i?.description===t?.toString()&&i?.context===JSON.stringify(e),Kn="attachmentGallery",ca="presentation",ua="gallery",en=class{constructor(t){this.document=t.document,this.selectedRange=t.selectedRange}perform(){return this.removeBlockAttribute(),this.applyBlockAttribute()}getSnapshot(){return{document:this.document,selectedRange:this.selectedRange}}removeBlockAttribute(){return this.findRangesOfBlocks().map(t=>this.document=this.document.removeAttributeAtRange(Kn,t))}applyBlockAttribute(){let t=0;this.findRangesOfPieces().forEach(e=>{e[1]-e[0]>1&&(e[0]+=t,e[1]+=t,this.document.getCharacterAtPosition(e[1])!==` +`&&(this.document=this.document.insertBlockBreakAtRange(e[1]),e[1]0&&arguments[0]!==void 0?arguments[0]:"",e=Mt.parse(t,{referenceElement:this.element}).getDocument();return this.loadDocument(e)}loadJSON(t){let{document:e,selectedRange:n}=t;return e=G.fromJSON(e),this.loadSnapshot({document:e,selectedRange:n})}loadSnapshot(t){return this.undoManager=new Ce(this.composition),this.composition.loadSnapshot(t)}getDocument(){return this.composition.document}getSelectedDocument(){return this.composition.getSelectedDocument()}getSnapshot(){return this.composition.getSnapshot()}toJSON(){return this.getSnapshot()}deleteInDirection(t){return this.composition.deleteInDirection(t)}insertAttachment(t){return this.composition.insertAttachment(t)}insertAttachments(t){return this.composition.insertAttachments(t)}insertDocument(t){return this.composition.insertDocument(t)}insertFile(t){return this.composition.insertFile(t)}insertFiles(t){return this.composition.insertFiles(t)}insertHTML(t){return this.composition.insertHTML(t)}insertString(t){return this.composition.insertString(t)}insertText(t){return this.composition.insertText(t)}insertLineBreak(){return this.composition.insertLineBreak()}getSelectedRange(){return this.composition.getSelectedRange()}getPosition(){return this.composition.getPosition()}getClientRectAtPosition(t){let e=this.getDocument().locationRangeFromRange([t,t+1]);return this.selectionManager.getClientRectAtLocationRange(e)}expandSelectionInDirection(t){return this.composition.expandSelectionInDirection(t)}moveCursorInDirection(t){return this.composition.moveCursorInDirection(t)}setSelectedRange(t){return this.composition.setSelectedRange(t)}activateAttribute(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return this.composition.setCurrentAttribute(t,e)}attributeIsActive(t){return this.composition.hasCurrentAttribute(t)}canActivateAttribute(t){return this.composition.canSetCurrentAttribute(t)}deactivateAttribute(t){return this.composition.removeCurrentAttribute(t)}setHTMLAtributeAtPosition(t,e,n){this.composition.setHTMLAtributeAtPosition(t,e,n)}canDecreaseNestingLevel(){return this.composition.canDecreaseNestingLevel()}canIncreaseNestingLevel(){return this.composition.canIncreaseNestingLevel()}decreaseNestingLevel(){if(this.canDecreaseNestingLevel())return this.composition.decreaseNestingLevel()}increaseNestingLevel(){if(this.canIncreaseNestingLevel())return this.composition.increaseNestingLevel()}canRedo(){return this.undoManager.canRedo()}canUndo(){return this.undoManager.canUndo()}recordUndoEntry(t){let{context:e,consolidatable:n}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.undoManager.recordUndoEntry(t,{context:e,consolidatable:n})}redo(){if(this.canRedo())return this.undoManager.redo()}undo(){if(this.canUndo())return this.undoManager.undo()}},rn=class{constructor(t){this.element=t}findLocationFromContainerAndOffset(t,e){let{strict:n}=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{strict:!0},r=0,o=!1,s={index:0,offset:0},l=this.findAttachmentElementParentForNode(t);l&&(t=l.parentNode,e=On(l));let c=He(this.element,{usingFilter:oo});for(;c.nextNode();){let d=c.currentNode;if(d===t&&be(t)){Kt(d)||(s.offset+=e);break}else{if(d.parentNode===t){if(r++===e)break}else if(!kt(t,d)&&r>0)break;er(d,{strict:n})?(o&&s.index++,s.offset=0,o=!0):s.offset+=Jn(d)}}return s}findContainerAndOffsetFromLocation(t){let e,n;if(t.index===0&&t.offset===0){for(e=this.element,n=0;e.firstChild;)if(e=e.firstChild,Pn(e)){n=1;break}return[e,n]}let[r,o]=this.findNodeAndOffsetFromLocation(t);if(!!r){if(be(r))Jn(r)===0?(e=r.parentNode.parentNode,n=On(r.parentNode),Kt(r,{name:"right"})&&n++):(e=r,n=t.offset-o);else{if(e=r.parentNode,!er(r.previousSibling)&&!Pn(e))for(;r===e.lastChild&&(r=e,e=e.parentNode,!Pn(e)););n=On(r),t.offset!==0&&n++}return[e,n]}}findNodeAndOffsetFromLocation(t){let e,n,r=0;for(let o of this.getSignificantNodesForIndex(t.index)){let s=Jn(o);if(t.offset<=r+s)if(be(o)){if(e=o,n=r,t.offset===n&&Kt(e))break}else e||(e=o,n=r);if(r+=s,r>t.offset)break}return[e,n]}findAttachmentElementParentForNode(t){for(;t&&t!==this.element;){if(Dt(t))return t;t=t.parentNode}}getSignificantNodesForIndex(t){let e=[],n=He(this.element,{usingFilter:ha}),r=!1;for(;n.nextNode();){let s=n.currentNode;if(Gt(s)){var o;if(o!=null?o++:o=0,o===t)r=!0;else if(r)break}else r&&e.push(s)}return e}},Jn=function(i){return i.nodeType===Node.TEXT_NODE?Kt(i)?0:i.textContent.length:W(i)==="br"||Dt(i)?1:0},ha=function(i){return fa(i)===NodeFilter.FILTER_ACCEPT?oo(i):NodeFilter.FILTER_REJECT},fa=function(i){return zr(i)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT},oo=function(i){return Dt(i.parentNode)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT},on=class{createDOMRangeFromPoint(t){let{x:e,y:n}=t,r;if(document.caretPositionFromPoint){let{offsetNode:o,offset:s}=document.caretPositionFromPoint(e,n);return r=document.createRange(),r.setStart(o,s),r}else{if(document.caretRangeFromPoint)return document.caretRangeFromPoint(e,n);if(document.body.createTextRange){let o=ve();try{let s=document.body.createTextRange();s.moveToPoint(e,n),s.select()}catch{}return r=ve(),Jr(o),r}}}getClientRectsForDOMRange(t){let e=Array.from(t.getClientRects()),n=e[0],r=e[e.length-1];return[n,r]}},gt=class extends S{constructor(t){super(...arguments),this.didMouseDown=this.didMouseDown.bind(this),this.selectionDidChange=this.selectionDidChange.bind(this),this.element=t,this.locationMapper=new rn(this.element),this.pointMapper=new on,this.lockCount=0,C("mousedown",{onElement:this.element,withCallback:this.didMouseDown})}getLocationRange(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return t.strict===!1?this.createLocationRangeFromDOMRange(ve()):t.ignoreLock?this.currentLocationRange:this.lockedLocationRange?this.lockedLocationRange:this.currentLocationRange}setLocationRange(t){if(this.lockedLocationRange)return;t=A(t);let e=this.createDOMRangeFromLocationRange(t);e&&(Jr(e),this.updateCurrentLocationRange(t))}setLocationRangeFromPointRange(t){t=A(t);let e=this.getLocationAtPoint(t[0]),n=this.getLocationAtPoint(t[1]);this.setLocationRange([e,n])}getClientRectAtLocationRange(t){let e=this.createDOMRangeFromLocationRange(t);if(e)return this.getClientRectsForDOMRange(e)[1]}locationIsCursorTarget(t){let e=Array.from(this.findNodeAndOffsetFromLocation(t))[0];return Kt(e)}lock(){this.lockCount++===0&&(this.updateCurrentLocationRange(),this.lockedLocationRange=this.getLocationRange())}unlock(){if(--this.lockCount===0){let{lockedLocationRange:t}=this;if(this.lockedLocationRange=null,t!=null)return this.setLocationRange(t)}}clearSelection(){var t;return(t=Kr())===null||t===void 0?void 0:t.removeAllRanges()}selectionIsCollapsed(){var t;return((t=ve())===null||t===void 0?void 0:t.collapsed)===!0}selectionIsExpanded(){return!this.selectionIsCollapsed()}createLocationRangeFromDOMRange(t,e){if(t==null||!this.domRangeWithinElement(t))return;let n=this.findLocationFromContainerAndOffset(t.startContainer,t.startOffset,e);if(!n)return;let r=t.collapsed?void 0:this.findLocationFromContainerAndOffset(t.endContainer,t.endOffset,e);return A([n,r])}didMouseDown(){return this.pauseTemporarily()}pauseTemporarily(){let t;this.paused=!0;let e=()=>{if(this.paused=!1,clearTimeout(n),Array.from(t).forEach(r=>{r.destroy()}),kt(document,this.element))return this.selectionDidChange()},n=setTimeout(e,200);t=["mousemove","keydown"].map(r=>C(r,{onElement:document,withCallback:e}))}selectionDidChange(){if(!this.paused&&!Ei(this.element))return this.updateCurrentLocationRange()}updateCurrentLocationRange(t){if((t??(t=this.createLocationRangeFromDOMRange(ve())))&&!gn(t,this.currentLocationRange)){var e,n;return this.currentLocationRange=t,(e=this.delegate)===null||e===void 0||(n=e.locationRangeDidChange)===null||n===void 0?void 0:n.call(e,this.currentLocationRange.slice(0))}}createDOMRangeFromLocationRange(t){let e=this.findContainerAndOffsetFromLocation(t[0]),n=ut(t)?e:this.findContainerAndOffsetFromLocation(t[1])||e;if(e!=null&&n!=null){let r=document.createRange();return r.setStart(...Array.from(e||[])),r.setEnd(...Array.from(n||[])),r}}getLocationAtPoint(t){let e=this.createDOMRangeFromPoint(t);if(e){var n;return(n=this.createLocationRangeFromDOMRange(e))===null||n===void 0?void 0:n[0]}}domRangeWithinElement(t){return t.collapsed?kt(this.element,t.startContainer):kt(this.element,t.startContainer)&&kt(this.element,t.endContainer)}};gt.proxyMethod("locationMapper.findLocationFromContainerAndOffset");gt.proxyMethod("locationMapper.findContainerAndOffsetFromLocation");gt.proxyMethod("locationMapper.findNodeAndOffsetFromLocation");gt.proxyMethod("pointMapper.createDOMRangeFromPoint");gt.proxyMethod("pointMapper.getClientRectsForDOMRange");var so=Object.freeze({__proto__:null,Attachment:At,AttachmentManager:$e,AttachmentPiece:xt,Block:Y,Composition:it,Document:G,Editor:nn,HTMLParser:Mt,HTMLSanitizer:Xt,LineBreakInsertion:tn,LocationMapper:rn,ManagedAttachment:E,Piece:ft,PointMapper:on,SelectionManager:gt,SplittableList:Qt,StringPiece:we,Text:K,UndoManager:Ce}),ga=Object.freeze({__proto__:null,ObjectView:ht,AttachmentView:Ee,BlockView:Ze,DocumentView:Zt,PieceView:Ye,PreviewableAttachmentView:Je,TextView:Xe}),{lang:Yn,css:Tt,keyNames:ma}=Te,Xn=function(i){return function(){let t=i.apply(this,arguments);t.do(),this.undos||(this.undos=[]),this.undos.push(t.undo)}},sn=class extends S{constructor(t,e,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(...arguments),B(this,"makeElementMutable",Xn(()=>({do:()=>{this.element.dataset.trixMutable=!0},undo:()=>delete this.element.dataset.trixMutable}))),B(this,"addToolbar",Xn(()=>{let o=p({tagName:"div",className:Tt.attachmentToolbar,data:{trixMutable:!0},childNodes:p({tagName:"div",className:"trix-button-row",childNodes:p({tagName:"span",className:"trix-button-group trix-button-group--actions",childNodes:p({tagName:"button",className:"trix-button trix-button--remove",textContent:Yn.remove,attributes:{title:Yn.remove},data:{trixAction:"remove"}})})})});return this.attachment.isPreviewable()&&o.appendChild(p({tagName:"div",className:Tt.attachmentMetadataContainer,childNodes:p({tagName:"span",className:Tt.attachmentMetadata,childNodes:[p({tagName:"span",className:Tt.attachmentName,textContent:this.attachment.getFilename(),attributes:{title:this.attachment.getFilename()}}),p({tagName:"span",className:Tt.attachmentSize,textContent:this.attachment.getFormattedFilesize()})]})})),C("click",{onElement:o,withCallback:this.didClickToolbar}),C("click",{onElement:o,matchingSelector:"[data-trix-action]",withCallback:this.didClickActionButton}),me("trix-attachment-before-toolbar",{onElement:this.element,attributes:{toolbar:o,attachment:this.attachment}}),{do:()=>this.element.appendChild(o),undo:()=>yt(o)}})),B(this,"installCaptionEditor",Xn(()=>{let o=p({tagName:"textarea",className:Tt.attachmentCaptionEditor,attributes:{placeholder:Yn.captionPlaceholder},data:{trixMutable:!0}});o.value=this.attachmentPiece.getCaption();let s=o.cloneNode();s.classList.add("trix-autoresize-clone"),s.tabIndex=-1;let l=function(){s.value=o.value,o.style.height=s.scrollHeight+"px"};C("input",{onElement:o,withCallback:l}),C("input",{onElement:o,withCallback:this.didInputCaption}),C("keydown",{onElement:o,withCallback:this.didKeyDownCaption}),C("change",{onElement:o,withCallback:this.didChangeCaption}),C("blur",{onElement:o,withCallback:this.didBlurCaption});let c=this.element.querySelector("figcaption"),d=c.cloneNode();return{do:()=>{if(c.style.display="none",d.appendChild(o),d.appendChild(s),d.classList.add("".concat(Tt.attachmentCaption,"--editing")),c.parentElement.insertBefore(d,c),l(),this.options.editCaption)return Si(()=>o.focus())},undo(){yt(d),c.style.display=null}}})),this.didClickToolbar=this.didClickToolbar.bind(this),this.didClickActionButton=this.didClickActionButton.bind(this),this.didKeyDownCaption=this.didKeyDownCaption.bind(this),this.didInputCaption=this.didInputCaption.bind(this),this.didChangeCaption=this.didChangeCaption.bind(this),this.didBlurCaption=this.didBlurCaption.bind(this),this.attachmentPiece=t,this.element=e,this.container=n,this.options=r,this.attachment=this.attachmentPiece.attachment,W(this.element)==="a"&&(this.element=this.element.firstChild),this.install()}install(){this.makeElementMutable(),this.addToolbar(),this.attachment.isPreviewable()&&this.installCaptionEditor()}uninstall(){var t;let e=this.undos.pop();for(this.savePendingCaption();e;)e(),e=this.undos.pop();(t=this.delegate)===null||t===void 0||t.didUninstallAttachmentEditor(this)}savePendingCaption(){if(this.pendingCaption!=null){let o=this.pendingCaption;if(this.pendingCaption=null,o){var t,e;(t=this.delegate)===null||t===void 0||(e=t.attachmentEditorDidRequestUpdatingAttributesForAttachment)===null||e===void 0||e.call(t,{caption:o},this.attachment)}else{var n,r;(n=this.delegate)===null||n===void 0||(r=n.attachmentEditorDidRequestRemovingAttributeForAttachment)===null||r===void 0||r.call(n,"caption",this.attachment)}}}didClickToolbar(t){return t.preventDefault(),t.stopPropagation()}didClickActionButton(t){var e;switch(t.target.getAttribute("data-trix-action")){case"remove":return(e=this.delegate)===null||e===void 0?void 0:e.attachmentEditorDidRequestRemovalOfAttachment(this.attachment)}}didKeyDownCaption(t){if(ma[t.keyCode]==="return"){var e,n;return t.preventDefault(),this.savePendingCaption(),(e=this.delegate)===null||e===void 0||(n=e.attachmentEditorDidRequestDeselectingAttachment)===null||n===void 0?void 0:n.call(e,this.attachment)}}didInputCaption(t){this.pendingCaption=t.target.value.replace(/\s/g," ").trim()}didChangeCaption(t){return this.savePendingCaption()}didBlurCaption(t){return this.savePendingCaption()}},an=class extends S{constructor(t,e){super(...arguments),this.didFocus=this.didFocus.bind(this),this.didBlur=this.didBlur.bind(this),this.didClickAttachment=this.didClickAttachment.bind(this),this.element=t,this.composition=e,this.documentView=new Zt(this.composition.document,{element:this.element}),C("focus",{onElement:this.element,withCallback:this.didFocus}),C("blur",{onElement:this.element,withCallback:this.didBlur}),C("click",{onElement:this.element,matchingSelector:"a[contenteditable=false]",preventDefault:!0}),C("mousedown",{onElement:this.element,matchingSelector:Rt,withCallback:this.didClickAttachment}),C("click",{onElement:this.element,matchingSelector:"a".concat(Rt),preventDefault:!0})}didFocus(t){var e;let n=()=>{if(!this.focused){var r,o;return this.focused=!0,(r=this.delegate)===null||r===void 0||(o=r.compositionControllerDidFocus)===null||o===void 0?void 0:o.call(r)}};return((e=this.blurPromise)===null||e===void 0?void 0:e.then(n))||n()}didBlur(t){this.blurPromise=new Promise(e=>Si(()=>{if(!Ei(this.element)){var n,r;this.focused=null,(n=this.delegate)===null||n===void 0||(r=n.compositionControllerDidBlur)===null||r===void 0||r.call(n)}return this.blurPromise=null,e()}))}didClickAttachment(t,e){var n,r;let o=this.findAttachmentForElement(e),s=!!vt(t.target,{matchingSelector:"figcaption"});return(n=this.delegate)===null||n===void 0||(r=n.compositionControllerDidSelectAttachment)===null||r===void 0?void 0:r.call(n,o,{editCaption:s})}getSerializableElement(){return this.isEditingAttachment()?this.documentView.shadowElement:this.element}render(){var t,e;if(this.revision!==this.composition.revision&&(this.documentView.setDocument(this.composition.document),this.documentView.render(),this.revision=this.composition.revision),this.canSyncDocumentView()&&!this.documentView.isSynced()){var n,r,o,s;(n=this.delegate)===null||n===void 0||(r=n.compositionControllerWillSyncDocumentView)===null||r===void 0||r.call(n),this.documentView.sync(),(o=this.delegate)===null||o===void 0||(s=o.compositionControllerDidSyncDocumentView)===null||s===void 0||s.call(o)}return(t=this.delegate)===null||t===void 0||(e=t.compositionControllerDidRender)===null||e===void 0?void 0:e.call(t)}rerenderViewForObject(t){return this.invalidateViewForObject(t),this.render()}invalidateViewForObject(t){return this.documentView.invalidateViewForObject(t)}isViewCachingEnabled(){return this.documentView.isViewCachingEnabled()}enableViewCaching(){return this.documentView.enableViewCaching()}disableViewCaching(){return this.documentView.disableViewCaching()}refreshViewCache(){return this.documentView.garbageCollectCachedViews()}isEditingAttachment(){return!!this.attachmentEditor}installAttachmentEditorForAttachment(t,e){var n;if(((n=this.attachmentEditor)===null||n===void 0?void 0:n.attachment)===t)return;let r=this.documentView.findElementForObject(t);if(!r)return;this.uninstallAttachmentEditor();let o=this.composition.document.getAttachmentPieceForAttachment(t);this.attachmentEditor=new sn(o,r,this.element,e),this.attachmentEditor.delegate=this}uninstallAttachmentEditor(){var t;return(t=this.attachmentEditor)===null||t===void 0?void 0:t.uninstall()}didUninstallAttachmentEditor(){return this.attachmentEditor=null,this.render()}attachmentEditorDidRequestUpdatingAttributesForAttachment(t,e){var n,r;return(n=this.delegate)===null||n===void 0||(r=n.compositionControllerWillUpdateAttachment)===null||r===void 0||r.call(n,e),this.composition.updateAttributesForAttachment(t,e)}attachmentEditorDidRequestRemovingAttributeForAttachment(t,e){var n,r;return(n=this.delegate)===null||n===void 0||(r=n.compositionControllerWillUpdateAttachment)===null||r===void 0||r.call(n,e),this.composition.removeAttributeForAttachment(t,e)}attachmentEditorDidRequestRemovalOfAttachment(t){var e,n;return(e=this.delegate)===null||e===void 0||(n=e.compositionControllerDidRequestRemovalOfAttachment)===null||n===void 0?void 0:n.call(e,t)}attachmentEditorDidRequestDeselectingAttachment(t){var e,n;return(e=this.delegate)===null||e===void 0||(n=e.compositionControllerDidRequestDeselectingAttachment)===null||n===void 0?void 0:n.call(e,t)}canSyncDocumentView(){return!this.isEditingAttachment()}findAttachmentForElement(t){return this.composition.document.getAttachmentById(parseInt(t.dataset.trixId,10))}},ln=class extends S{},ao="data-trix-mutable",pa="[".concat(ao,"]"),ba={attributes:!0,childList:!0,characterData:!0,characterDataOldValue:!0,subtree:!0},cn=class extends S{constructor(t){super(t),this.didMutate=this.didMutate.bind(this),this.element=t,this.observer=new window.MutationObserver(this.didMutate),this.start()}start(){return this.reset(),this.observer.observe(this.element,ba)}stop(){return this.observer.disconnect()}didMutate(t){if(this.mutations.push(...Array.from(this.findSignificantMutations(t)||[])),this.mutations.length){var e,n;return(e=this.delegate)===null||e===void 0||(n=e.elementDidMutate)===null||n===void 0||n.call(e,this.getMutationSummary()),this.reset()}}reset(){this.mutations=[]}findSignificantMutations(t){return t.filter(e=>this.mutationIsSignificant(e))}mutationIsSignificant(t){if(this.nodeIsMutable(t.target))return!1;for(let e of Array.from(this.nodesModifiedByMutation(t)))if(this.nodeIsSignificant(e))return!0;return!1}nodeIsSignificant(t){return t!==this.element&&!this.nodeIsMutable(t)&&!zr(t)}nodeIsMutable(t){return vt(t,{matchingSelector:pa})}nodesModifiedByMutation(t){let e=[];switch(t.type){case"attributes":t.attributeName!==ao&&e.push(t.target);break;case"characterData":e.push(t.target.parentNode),e.push(t.target);break;case"childList":e.push(...Array.from(t.addedNodes||[])),e.push(...Array.from(t.removedNodes||[]));break}return e}getMutationSummary(){return this.getTextMutationSummary()}getTextMutationSummary(){let{additions:t,deletions:e}=this.getTextChangesFromCharacterData(),n=this.getTextChangesFromChildList();Array.from(n.additions).forEach(l=>{Array.from(t).includes(l)||t.push(l)}),e.push(...Array.from(n.deletions||[]));let r={},o=t.join("");o&&(r.textAdded=o);let s=e.join("");return s&&(r.textDeleted=s),r}getMutationsByType(t){return Array.from(this.mutations).filter(e=>e.type===t)}getTextChangesFromChildList(){let t,e,n=[],r=[];Array.from(this.getMutationsByType("childList")).forEach(c=>{n.push(...Array.from(c.addedNodes||[])),r.push(...Array.from(c.removedNodes||[]))}),n.length===0&&r.length===1&&Gt(r[0])?(t=[],e=[` +`]):(t=fi(n),e=fi(r));let s=t.filter((c,d)=>c!==e[d]).map(ge),l=e.filter((c,d)=>c!==t[d]).map(ge);return{additions:s,deletions:l}}getTextChangesFromCharacterData(){let t,e,n=this.getMutationsByType("characterData");if(n.length){let r=n[0],o=n[n.length-1],s=ge(r.oldValue),l=ge(o.target.data),c=ns(s,l);t=c.added,e=c.removed}return{additions:t?[t]:[],deletions:e?[e]:[]}}},fi=function(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=[];for(let e of Array.from(i))switch(e.nodeType){case Node.TEXT_NODE:t.push(e.data);break;case Node.ELEMENT_NODE:W(e)==="br"?t.push(` +`):t.push(...Array.from(fi(e.childNodes)||[]));break}return t},un=class extends Yt{constructor(t){super(...arguments),this.file=t}perform(t){let e=new FileReader;return e.onerror=()=>t(!1),e.onload=()=>{e.onerror=null;try{e.abort()}catch{}return t(!0,this.file)},e.readAsArrayBuffer(this.file)}},gi=class{constructor(t){this.element=t}shouldIgnore(t){return Se.samsungAndroid?(this.previousEvent=this.event,this.event=t,this.checkSamsungKeyboardBuggyModeStart(),this.checkSamsungKeyboardBuggyModeEnd(),this.buggyMode):!1}checkSamsungKeyboardBuggyModeStart(){this.insertingLongTextAfterUnidentifiedChar()&&va(this.element.innerText,this.event.data)&&(this.buggyMode=!0,this.event.preventDefault())}checkSamsungKeyboardBuggyModeEnd(){this.buggyMode&&this.event.inputType!=="insertText"&&(this.buggyMode=!1)}insertingLongTextAfterUnidentifiedChar(){var t;return this.isBeforeInputInsertText()&&this.previousEventWasUnidentifiedKeydown()&&((t=this.event.data)===null||t===void 0?void 0:t.length)>50}isBeforeInputInsertText(){return this.event.type==="beforeinput"&&this.event.inputType==="insertText"}previousEventWasUnidentifiedKeydown(){var t,e;return((t=this.previousEvent)===null||t===void 0?void 0:t.type)==="keydown"&&((e=this.previousEvent)===null||e===void 0?void 0:e.key)==="Unidentified"}},va=(i,t)=>Lr(i)===Lr(t),ya=new RegExp("(".concat(Ai,"|").concat(fn,"|").concat(bt,"|\\s)+"),"g"),Lr=i=>i.replace(ya," ").trim(),$t=class extends S{constructor(t){super(...arguments),this.element=t,this.mutationObserver=new cn(this.element),this.mutationObserver.delegate=this,this.flakyKeyboardDetector=new gi(this.element);for(let e in this.constructor.events)C(e,{onElement:this.element,withCallback:this.handlerFor(e)})}elementDidMutate(t){}editorWillSyncDocumentView(){return this.mutationObserver.stop()}editorDidSyncDocumentView(){return this.mutationObserver.start()}requestRender(){var t,e;return(t=this.delegate)===null||t===void 0||(e=t.inputControllerDidRequestRender)===null||e===void 0?void 0:e.call(t)}requestReparse(){var t,e;return(t=this.delegate)===null||t===void 0||(e=t.inputControllerDidRequestReparse)===null||e===void 0||e.call(t),this.requestRender()}attachFiles(t){let e=Array.from(t).map(n=>new un(n));return Promise.all(e).then(n=>{this.handleInput(function(){var r,o;return(r=this.delegate)===null||r===void 0||r.inputControllerWillAttachFiles(),(o=this.responder)===null||o===void 0||o.insertFiles(n),this.requestRender()})})}handlerFor(t){return e=>{e.defaultPrevented||this.handleInput(()=>{if(!Ei(this.element)){if(this.flakyKeyboardDetector.shouldIgnore(e))return;this.eventName=t,this.constructor.events[t].call(this,e)}})}}handleInput(t){try{var e;(e=this.delegate)===null||e===void 0||e.inputControllerWillHandleInput(),t.call(this)}finally{var n;(n=this.delegate)===null||n===void 0||n.inputControllerDidHandleInput()}}createLinkHTML(t,e){let n=document.createElement("a");return n.href=t,n.textContent=e||t,n.outerHTML}};B($t,"events",{});var Zn,Or,{browser:Aa,keyNames:lo}=Te,xa=0,et=class extends $t{constructor(){super(...arguments),this.resetInputSummary()}setInputSummary(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.inputSummary.eventName=this.eventName;for(let e in t){let n=t[e];this.inputSummary[e]=n}return this.inputSummary}resetInputSummary(){this.inputSummary={}}reset(){return this.resetInputSummary(),It.reset()}elementDidMutate(t){if(this.isComposing()){var e,n;return(e=this.delegate)===null||e===void 0||(n=e.inputControllerDidAllowUnhandledInput)===null||n===void 0?void 0:n.call(e)}else return this.handleInput(function(){return this.mutationIsSignificant(t)&&(this.mutationIsExpected(t)?this.requestRender():this.requestReparse()),this.reset()})}mutationIsExpected(t){let{textAdded:e,textDeleted:n}=t;if(this.inputSummary.preferDocument)return!0;let r=e!=null?e===this.inputSummary.textAdded:!this.inputSummary.textAdded,o=n!=null?this.inputSummary.didDelete:!this.inputSummary.didDelete,s=[` +`,` +`].includes(e)&&!r,l=n===` +`&&!o;if(s&&!l||l&&!s){let g=this.getSelectedRange();if(g){var d;let x=s?e.replace(/\n$/,"").length||-1:e?.length||1;if((d=this.responder)!==null&&d!==void 0&&d.positionIsBlockBreak(g[1]+x))return!0}}return r&&o}mutationIsSignificant(t){var e;let n=Object.keys(t).length>0,r=((e=this.compositionInput)===null||e===void 0?void 0:e.getEndData())==="";return n||!r}getCompositionInput(){if(this.isComposing())return this.compositionInput;this.compositionInput=new rt(this)}isComposing(){return this.compositionInput&&!this.compositionInput.isEnded()}deleteInDirection(t,e){var n;if(((n=this.responder)===null||n===void 0?void 0:n.deleteInDirection(t))===!1){if(e)return e.preventDefault(),this.requestRender()}else return this.setInputSummary({didDelete:!0})}serializeSelectionToDataTransfer(t){var e;if(!Qo(t))return;let n=(e=this.responder)===null||e===void 0?void 0:e.getSelectedDocument().toSerializableDocument();return t.setData("application/x-trix-document",JSON.stringify(n)),t.setData("text/html",Zt.render(n).innerHTML),t.setData("text/plain",n.toString().replace(/\n$/,"")),!0}canAcceptDataTransfer(t){let e={};return Array.from(t?.types||[]).forEach(n=>{e[n]=!0}),e.Files||e["application/x-trix-document"]||e["text/html"]||e["text/plain"]}getPastedHTMLUsingHiddenElement(t){let e=this.getSelectedRange(),n={position:"absolute",left:"".concat(window.pageXOffset,"px"),top:"".concat(window.pageYOffset,"px"),opacity:0},r=p({style:n,tagName:"div",editable:!0});return document.body.appendChild(r),r.focus(),requestAnimationFrame(()=>{let o=r.innerHTML;return yt(r),this.setSelectedRange(e),t(o)})}};B(et,"events",{keydown(i){this.isComposing()||this.resetInputSummary(),this.inputSummary.didInput=!0;let t=lo[i.keyCode];if(t){var e;let r=this.keys;["ctrl","alt","shift","meta"].forEach(o=>{if(i["".concat(o,"Key")]){var s;o==="ctrl"&&(o="control"),r=(s=r)===null||s===void 0?void 0:s[o]}}),((e=r)===null||e===void 0?void 0:e[t])!=null&&(this.setInputSummary({keyName:t}),It.reset(),r[t].call(this,i))}if(qr(i)){let r=String.fromCharCode(i.keyCode).toLowerCase();if(r){var n;let o=["alt","shift"].map(s=>{if(i["".concat(s,"Key")])return s}).filter(s=>s);o.push(r),(n=this.delegate)!==null&&n!==void 0&&n.inputControllerDidReceiveKeyboardCommand(o)&&i.preventDefault()}}},keypress(i){if(this.inputSummary.eventName!=null||i.metaKey||i.ctrlKey&&!i.altKey)return;let t=Ca(i);if(t){var e,n;return(e=this.delegate)===null||e===void 0||e.inputControllerWillPerformTyping(),(n=this.responder)===null||n===void 0||n.insertString(t),this.setInputSummary({textAdded:t,didDelete:this.selectionIsExpanded()})}},textInput(i){let{data:t}=i,{textAdded:e}=this.inputSummary;if(e&&e!==t&&e.toUpperCase()===t){var n;let r=this.getSelectedRange();return this.setSelectedRange([r[0],r[1]+e.length]),(n=this.responder)===null||n===void 0||n.insertString(t),this.setInputSummary({textAdded:t}),this.setSelectedRange(r)}},dragenter(i){i.preventDefault()},dragstart(i){var t,e;return this.serializeSelectionToDataTransfer(i.dataTransfer),this.draggedRange=this.getSelectedRange(),(t=this.delegate)===null||t===void 0||(e=t.inputControllerDidStartDrag)===null||e===void 0?void 0:e.call(t)},dragover(i){if(this.draggedRange||this.canAcceptDataTransfer(i.dataTransfer)){i.preventDefault();let n={x:i.clientX,y:i.clientY};if(!ee(n,this.draggingPoint)){var t,e;return this.draggingPoint=n,(t=this.delegate)===null||t===void 0||(e=t.inputControllerDidReceiveDragOverPoint)===null||e===void 0?void 0:e.call(t,this.draggingPoint)}}},dragend(i){var t,e;(t=this.delegate)===null||t===void 0||(e=t.inputControllerDidCancelDrag)===null||e===void 0||e.call(t),this.draggedRange=null,this.draggingPoint=null},drop(i){var t,e;i.preventDefault();let n=(t=i.dataTransfer)===null||t===void 0?void 0:t.files,r=i.dataTransfer.getData("application/x-trix-document"),o={x:i.clientX,y:i.clientY};if((e=this.responder)===null||e===void 0||e.setLocationRangeFromPointRange(o),n!=null&&n.length)this.attachFiles(n);else if(this.draggedRange){var s,l;(s=this.delegate)===null||s===void 0||s.inputControllerWillMoveText(),(l=this.responder)===null||l===void 0||l.moveTextFromRange(this.draggedRange),this.draggedRange=null,this.requestRender()}else if(r){var c;let d=G.fromJSONString(r);(c=this.responder)===null||c===void 0||c.insertDocument(d),this.requestRender()}this.draggedRange=null,this.draggingPoint=null},cut(i){var t;if((t=this.responder)!==null&&t!==void 0&&t.selectionIsExpanded()){var e;if(this.serializeSelectionToDataTransfer(i.clipboardData)&&i.preventDefault(),(e=this.delegate)===null||e===void 0||e.inputControllerWillCutText(),this.deleteInDirection("backward"),i.defaultPrevented)return this.requestRender()}},copy(i){var t;(t=this.responder)!==null&&t!==void 0&&t.selectionIsExpanded()&&this.serializeSelectionToDataTransfer(i.clipboardData)&&i.preventDefault()},paste(i){let t=i.clipboardData||i.testClipboardData,e={clipboard:t};if(!t||Sa(i)){this.getPastedHTMLUsingHiddenElement(y=>{var J,wt,ne;return e.type="text/html",e.html=y,(J=this.delegate)===null||J===void 0||J.inputControllerWillPaste(e),(wt=this.responder)===null||wt===void 0||wt.insertHTML(e.html),this.requestRender(),(ne=this.delegate)===null||ne===void 0?void 0:ne.inputControllerDidPaste(e)});return}let n=t.getData("URL"),r=t.getData("text/html"),o=t.getData("public.url-name");if(n){var s,l,c;let y;e.type="text/html",o?y=ki(o).trim():y=n,e.html=this.createLinkHTML(n,y),(s=this.delegate)===null||s===void 0||s.inputControllerWillPaste(e),this.setInputSummary({textAdded:y,didDelete:this.selectionIsExpanded()}),(l=this.responder)===null||l===void 0||l.insertHTML(e.html),this.requestRender(),(c=this.delegate)===null||c===void 0||c.inputControllerDidPaste(e)}else if(Hr(t)){var d,g,x;e.type="text/plain",e.string=t.getData("text/plain"),(d=this.delegate)===null||d===void 0||d.inputControllerWillPaste(e),this.setInputSummary({textAdded:e.string,didDelete:this.selectionIsExpanded()}),(g=this.responder)===null||g===void 0||g.insertString(e.string),this.requestRender(),(x=this.delegate)===null||x===void 0||x.inputControllerDidPaste(e)}else if(r){var T,Z,F;e.type="text/html",e.html=r,(T=this.delegate)===null||T===void 0||T.inputControllerWillPaste(e),(Z=this.responder)===null||Z===void 0||Z.insertHTML(e.html),this.requestRender(),(F=this.delegate)===null||F===void 0||F.inputControllerDidPaste(e)}else if(Array.from(t.types).includes("Files")){var Q,Et;let y=(Q=t.items)===null||Q===void 0||(Q=Q[0])===null||Q===void 0||(Et=Q.getAsFile)===null||Et===void 0?void 0:Et.call(Q);if(y){var mt,Bt,ot;let J=Ea(y);!y.name&&J&&(y.name="pasted-file-".concat(++xa,".").concat(J)),e.type="File",e.file=y,(mt=this.delegate)===null||mt===void 0||mt.inputControllerWillAttachFiles(),(Bt=this.responder)===null||Bt===void 0||Bt.insertFile(e.file),this.requestRender(),(ot=this.delegate)===null||ot===void 0||ot.inputControllerDidPaste(e)}}i.preventDefault()},compositionstart(i){return this.getCompositionInput().start(i.data)},compositionupdate(i){return this.getCompositionInput().update(i.data)},compositionend(i){return this.getCompositionInput().end(i.data)},beforeinput(i){this.inputSummary.didInput=!0},input(i){return this.inputSummary.didInput=!0,i.stopPropagation()}});B(et,"keys",{backspace(i){var t;return(t=this.delegate)===null||t===void 0||t.inputControllerWillPerformTyping(),this.deleteInDirection("backward",i)},delete(i){var t;return(t=this.delegate)===null||t===void 0||t.inputControllerWillPerformTyping(),this.deleteInDirection("forward",i)},return(i){var t,e;return this.setInputSummary({preferDocument:!0}),(t=this.delegate)===null||t===void 0||t.inputControllerWillPerformTyping(),(e=this.responder)===null||e===void 0?void 0:e.insertLineBreak()},tab(i){var t;if((t=this.responder)!==null&&t!==void 0&&t.canIncreaseNestingLevel()){var e;(e=this.responder)===null||e===void 0||e.increaseNestingLevel(),this.requestRender(),i.preventDefault()}},left(i){if(this.selectionIsInCursorTarget()){var t;return i.preventDefault(),(t=this.responder)===null||t===void 0?void 0:t.moveCursorInDirection("backward")}},right(i){if(this.selectionIsInCursorTarget()){var t;return i.preventDefault(),(t=this.responder)===null||t===void 0?void 0:t.moveCursorInDirection("forward")}},control:{d(i){var t;return(t=this.delegate)===null||t===void 0||t.inputControllerWillPerformTyping(),this.deleteInDirection("forward",i)},h(i){var t;return(t=this.delegate)===null||t===void 0||t.inputControllerWillPerformTyping(),this.deleteInDirection("backward",i)},o(i){var t,e;return i.preventDefault(),(t=this.delegate)===null||t===void 0||t.inputControllerWillPerformTyping(),(e=this.responder)===null||e===void 0||e.insertString(` +`,{updatePosition:!1}),this.requestRender()}},shift:{return(i){var t,e;(t=this.delegate)===null||t===void 0||t.inputControllerWillPerformTyping(),(e=this.responder)===null||e===void 0||e.insertString(` +`),this.requestRender(),i.preventDefault()},tab(i){var t;if((t=this.responder)!==null&&t!==void 0&&t.canDecreaseNestingLevel()){var e;(e=this.responder)===null||e===void 0||e.decreaseNestingLevel(),this.requestRender(),i.preventDefault()}},left(i){if(this.selectionIsInCursorTarget())return i.preventDefault(),this.expandSelectionInDirection("backward")},right(i){if(this.selectionIsInCursorTarget())return i.preventDefault(),this.expandSelectionInDirection("forward")}},alt:{backspace(i){var t;return this.setInputSummary({preferDocument:!1}),(t=this.delegate)===null||t===void 0?void 0:t.inputControllerWillPerformTyping()}},meta:{backspace(i){var t;return this.setInputSummary({preferDocument:!1}),(t=this.delegate)===null||t===void 0?void 0:t.inputControllerWillPerformTyping()}}});et.proxyMethod("responder?.getSelectedRange");et.proxyMethod("responder?.setSelectedRange");et.proxyMethod("responder?.expandSelectionInDirection");et.proxyMethod("responder?.selectionIsInCursorTarget");et.proxyMethod("responder?.selectionIsExpanded");var Ea=i=>{var t;return(t=i.type)===null||t===void 0||(t=t.match(/\/(\w+)$/))===null||t===void 0?void 0:t[1]},wa=!!((Zn=(Or=" ").codePointAt)!==null&&Zn!==void 0&&Zn.call(Or,0)),Ca=function(i){if(i.key&&wa&&i.key.codePointAt(0)===i.keyCode)return i.key;{let t;if(i.which===null?t=i.keyCode:i.which!==0&&i.charCode!==0&&(t=i.charCode),t!=null&&lo[t]!=="escape")return Ot.fromCodepoints([t]).toString()}},Sa=function(i){let t=i.clipboardData;if(t)if(t.types.includes("text/html")){for(let e of t.types){let n=/^CorePasteboardFlavorType/.test(e),r=/^dyn\./.test(e)&&t.getData(e);if(n||r)return!0}return!1}else{let e=t.types.includes("com.apple.webarchive"),n=t.types.includes("com.apple.flat-rtfd");return e||n}},rt=class extends S{constructor(t){super(...arguments),this.inputController=t,this.responder=this.inputController.responder,this.delegate=this.inputController.delegate,this.inputSummary=this.inputController.inputSummary,this.data={}}start(t){if(this.data.start=t,this.isSignificant()){var e;if(this.inputSummary.eventName==="keypress"&&this.inputSummary.textAdded){var n;(n=this.responder)===null||n===void 0||n.deleteInDirection("left")}this.selectionIsExpanded()||(this.insertPlaceholder(),this.requestRender()),this.range=(e=this.responder)===null||e===void 0?void 0:e.getSelectedRange()}}update(t){if(this.data.update=t,this.isSignificant()){let e=this.selectPlaceholder();e&&(this.forgetPlaceholder(),this.range=e)}}end(t){if(this.data.end=t,this.isSignificant()){if(this.forgetPlaceholder(),this.canApplyToDocument()){var e,n,r,o;return this.setInputSummary({preferDocument:!0,didInput:!1}),(e=this.delegate)===null||e===void 0||e.inputControllerWillPerformTyping(),(n=this.responder)===null||n===void 0||n.setSelectedRange(this.range),(r=this.responder)===null||r===void 0||r.insertString(this.data.end),(o=this.responder)===null||o===void 0?void 0:o.setSelectedRange(this.range[0]+this.data.end.length)}else if(this.data.start!=null||this.data.update!=null)return this.requestReparse(),this.inputController.reset()}else return this.inputController.reset()}getEndData(){return this.data.end}isEnded(){return this.getEndData()!=null}isSignificant(){return Aa.composesExistingText?this.inputSummary.didInput:!0}canApplyToDocument(){var t,e;return((t=this.data.start)===null||t===void 0?void 0:t.length)===0&&((e=this.data.end)===null||e===void 0?void 0:e.length)>0&&this.range}};rt.proxyMethod("inputController.setInputSummary");rt.proxyMethod("inputController.requestRender");rt.proxyMethod("inputController.requestReparse");rt.proxyMethod("responder?.selectionIsExpanded");rt.proxyMethod("responder?.insertPlaceholder");rt.proxyMethod("responder?.selectPlaceholder");rt.proxyMethod("responder?.forgetPlaceholder");var Ft=class extends $t{constructor(){super(...arguments),this.render=this.render.bind(this)}elementDidMutate(){if(this.scheduledRender){if(this.composing){var t,e;return(t=this.delegate)===null||t===void 0||(e=t.inputControllerDidAllowUnhandledInput)===null||e===void 0?void 0:e.call(t)}}else return this.reparse()}scheduleRender(){return this.scheduledRender?this.scheduledRender:this.scheduledRender=requestAnimationFrame(this.render)}render(){var t;if(cancelAnimationFrame(this.scheduledRender),this.scheduledRender=null,!this.composing){var e;(e=this.delegate)===null||e===void 0||e.render()}(t=this.afterRender)===null||t===void 0||t.call(this),this.afterRender=null}reparse(){var t;return(t=this.delegate)===null||t===void 0?void 0:t.reparse()}insertString(){var t;let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=arguments.length>1?arguments[1]:void 0;return(t=this.delegate)===null||t===void 0||t.inputControllerWillPerformTyping(),this.withTargetDOMRange(function(){var r;return(r=this.responder)===null||r===void 0?void 0:r.insertString(e,n)})}toggleAttributeIfSupported(t){if(ri().includes(t)){var e;return(e=this.delegate)===null||e===void 0||e.inputControllerWillPerformFormatting(t),this.withTargetDOMRange(function(){var n;return(n=this.responder)===null||n===void 0?void 0:n.toggleCurrentAttribute(t)})}}activateAttributeIfSupported(t,e){if(ri().includes(t)){var n;return(n=this.delegate)===null||n===void 0||n.inputControllerWillPerformFormatting(t),this.withTargetDOMRange(function(){var r;return(r=this.responder)===null||r===void 0?void 0:r.setCurrentAttribute(t,e)})}}deleteInDirection(t){let{recordUndoEntry:e}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{recordUndoEntry:!0};if(e){var n;(n=this.delegate)===null||n===void 0||n.inputControllerWillPerformTyping()}let r=()=>{var s;return(s=this.responder)===null||s===void 0?void 0:s.deleteInDirection(t)},o=this.getTargetDOMRange({minLength:this.composing?1:2});return o?this.withTargetDOMRange(o,r):r()}withTargetDOMRange(t,e){if(typeof t=="function"&&(e=t,t=this.getTargetDOMRange()),t){var n;return(n=this.responder)===null||n===void 0?void 0:n.withTargetDOMRange(t,e.bind(this))}else return It.reset(),e.call(this)}getTargetDOMRange(){var t,e;let{minLength:n}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{minLength:0},r=(t=(e=this.event).getTargetRanges)===null||t===void 0?void 0:t.call(e);if(r&&r.length){let o=Ta(r[0]);if(n===0||o.toString().length>=n)return o}}withEvent(t,e){let n;this.event=t;try{n=e.call(this)}finally{this.event=null}return n}};B(Ft,"events",{keydown(i){if(qr(i)){var t;let e=Da(i);(t=this.delegate)!==null&&t!==void 0&&t.inputControllerDidReceiveKeyboardCommand(e)&&i.preventDefault()}else{let e=i.key;i.altKey&&(e+="+Alt"),i.shiftKey&&(e+="+Shift");let n=this.constructor.keys[e];if(n)return this.withEvent(i,n)}},paste(i){var t;let e,n=(t=i.clipboardData)===null||t===void 0?void 0:t.getData("URL");if(co(i))return i.preventDefault(),this.attachFiles(i.clipboardData.files);if(Ra(i)){var r,o,s;return i.preventDefault(),e={type:"text/plain",string:i.clipboardData.getData("text/plain")},(r=this.delegate)===null||r===void 0||r.inputControllerWillPaste(e),(o=this.responder)===null||o===void 0||o.insertString(e.string),this.render(),(s=this.delegate)===null||s===void 0?void 0:s.inputControllerDidPaste(e)}else if(n){var l,c,d;return i.preventDefault(),e={type:"text/html",html:this.createLinkHTML(n)},(l=this.delegate)===null||l===void 0||l.inputControllerWillPaste(e),(c=this.responder)===null||c===void 0||c.insertHTML(e.html),this.render(),(d=this.delegate)===null||d===void 0?void 0:d.inputControllerDidPaste(e)}},beforeinput(i){let t=this.constructor.inputTypes[i.inputType],e=$o(i);t&&(this.withEvent(i,t),e||this.scheduleRender()),e&&this.render()},input(i){It.reset()},dragstart(i){var t;if((t=this.responder)!==null&&t!==void 0&&t.selectionContainsAttachments()){var e;i.dataTransfer.setData("application/x-trix-dragging",!0),this.dragging={range:(e=this.responder)===null||e===void 0?void 0:e.getSelectedRange(),point:$n(i)}}},dragenter(i){Qn(i)&&i.preventDefault()},dragover(i){if(this.dragging){i.preventDefault();let e=$n(i);if(!ee(e,this.dragging.point)){var t;return this.dragging.point=e,(t=this.responder)===null||t===void 0?void 0:t.setLocationRangeFromPointRange(e)}}else Qn(i)&&i.preventDefault()},drop(i){if(this.dragging){var t,e;return i.preventDefault(),(t=this.delegate)===null||t===void 0||t.inputControllerWillMoveText(),(e=this.responder)===null||e===void 0||e.moveTextFromRange(this.dragging.range),this.dragging=null,this.scheduleRender()}else if(Qn(i)){var n;i.preventDefault();let r=$n(i);return(n=this.responder)===null||n===void 0||n.setLocationRangeFromPointRange(r),this.attachFiles(i.dataTransfer.files)}},dragend(){if(this.dragging){var i;(i=this.responder)===null||i===void 0||i.setSelectedRange(this.dragging.range),this.dragging=null}},compositionend(i){this.composing&&(this.composing=!1,Se.recentAndroid||this.scheduleRender())}});B(Ft,"keys",{ArrowLeft(){var i;if((i=this.responder)!==null&&i!==void 0&&i.shouldManageMovingCursorInDirection("backward")){var t;return this.event.preventDefault(),(t=this.responder)===null||t===void 0?void 0:t.moveCursorInDirection("backward")}},ArrowRight(){var i;if((i=this.responder)!==null&&i!==void 0&&i.shouldManageMovingCursorInDirection("forward")){var t;return this.event.preventDefault(),(t=this.responder)===null||t===void 0?void 0:t.moveCursorInDirection("forward")}},Backspace(){var i;if((i=this.responder)!==null&&i!==void 0&&i.shouldManageDeletingInDirection("backward")){var t,e;return this.event.preventDefault(),(t=this.delegate)===null||t===void 0||t.inputControllerWillPerformTyping(),(e=this.responder)===null||e===void 0||e.deleteInDirection("backward"),this.render()}},Tab(){var i;if((i=this.responder)!==null&&i!==void 0&&i.canIncreaseNestingLevel()){var t;return this.event.preventDefault(),(t=this.responder)===null||t===void 0||t.increaseNestingLevel(),this.render()}},"Tab+Shift"(){var i;if((i=this.responder)!==null&&i!==void 0&&i.canDecreaseNestingLevel()){var t;return this.event.preventDefault(),(t=this.responder)===null||t===void 0||t.decreaseNestingLevel(),this.render()}}});B(Ft,"inputTypes",{deleteByComposition(){return this.deleteInDirection("backward",{recordUndoEntry:!1})},deleteByCut(){return this.deleteInDirection("backward")},deleteByDrag(){return this.event.preventDefault(),this.withTargetDOMRange(function(){var i;this.deleteByDragRange=(i=this.responder)===null||i===void 0?void 0:i.getSelectedRange()})},deleteCompositionText(){return this.deleteInDirection("backward",{recordUndoEntry:!1})},deleteContent(){return this.deleteInDirection("backward")},deleteContentBackward(){return this.deleteInDirection("backward")},deleteContentForward(){return this.deleteInDirection("forward")},deleteEntireSoftLine(){return this.deleteInDirection("forward")},deleteHardLineBackward(){return this.deleteInDirection("backward")},deleteHardLineForward(){return this.deleteInDirection("forward")},deleteSoftLineBackward(){return this.deleteInDirection("backward")},deleteSoftLineForward(){return this.deleteInDirection("forward")},deleteWordBackward(){return this.deleteInDirection("backward")},deleteWordForward(){return this.deleteInDirection("forward")},formatBackColor(){return this.activateAttributeIfSupported("backgroundColor",this.event.data)},formatBold(){return this.toggleAttributeIfSupported("bold")},formatFontColor(){return this.activateAttributeIfSupported("color",this.event.data)},formatFontName(){return this.activateAttributeIfSupported("font",this.event.data)},formatIndent(){var i;if((i=this.responder)!==null&&i!==void 0&&i.canIncreaseNestingLevel())return this.withTargetDOMRange(function(){var t;return(t=this.responder)===null||t===void 0?void 0:t.increaseNestingLevel()})},formatItalic(){return this.toggleAttributeIfSupported("italic")},formatJustifyCenter(){return this.toggleAttributeIfSupported("justifyCenter")},formatJustifyFull(){return this.toggleAttributeIfSupported("justifyFull")},formatJustifyLeft(){return this.toggleAttributeIfSupported("justifyLeft")},formatJustifyRight(){return this.toggleAttributeIfSupported("justifyRight")},formatOutdent(){var i;if((i=this.responder)!==null&&i!==void 0&&i.canDecreaseNestingLevel())return this.withTargetDOMRange(function(){var t;return(t=this.responder)===null||t===void 0?void 0:t.decreaseNestingLevel()})},formatRemove(){this.withTargetDOMRange(function(){for(let e in(i=this.responder)===null||i===void 0?void 0:i.getCurrentAttributes()){var i,t;(t=this.responder)===null||t===void 0||t.removeCurrentAttribute(e)}})},formatSetBlockTextDirection(){return this.activateAttributeIfSupported("blockDir",this.event.data)},formatSetInlineTextDirection(){return this.activateAttributeIfSupported("textDir",this.event.data)},formatStrikeThrough(){return this.toggleAttributeIfSupported("strike")},formatSubscript(){return this.toggleAttributeIfSupported("sub")},formatSuperscript(){return this.toggleAttributeIfSupported("sup")},formatUnderline(){return this.toggleAttributeIfSupported("underline")},historyRedo(){var i;return(i=this.delegate)===null||i===void 0?void 0:i.inputControllerWillPerformRedo()},historyUndo(){var i;return(i=this.delegate)===null||i===void 0?void 0:i.inputControllerWillPerformUndo()},insertCompositionText(){return this.composing=!0,this.insertString(this.event.data)},insertFromComposition(){return this.composing=!1,this.insertString(this.event.data)},insertFromDrop(){let i=this.deleteByDragRange;if(i){var t;return this.deleteByDragRange=null,(t=this.delegate)===null||t===void 0||t.inputControllerWillMoveText(),this.withTargetDOMRange(function(){var e;return(e=this.responder)===null||e===void 0?void 0:e.moveTextFromRange(i)})}},insertFromPaste(){let{dataTransfer:i}=this.event,t={dataTransfer:i},e=i.getData("URL"),n=i.getData("text/html");if(e){var r;let c;this.event.preventDefault(),t.type="text/html";let d=i.getData("public.url-name");d?c=ki(d).trim():c=e,t.html=this.createLinkHTML(e,c),(r=this.delegate)===null||r===void 0||r.inputControllerWillPaste(t),this.withTargetDOMRange(function(){var g;return(g=this.responder)===null||g===void 0?void 0:g.insertHTML(t.html)}),this.afterRender=()=>{var g;return(g=this.delegate)===null||g===void 0?void 0:g.inputControllerDidPaste(t)}}else if(Hr(i)){var o;t.type="text/plain",t.string=i.getData("text/plain"),(o=this.delegate)===null||o===void 0||o.inputControllerWillPaste(t),this.withTargetDOMRange(function(){var c;return(c=this.responder)===null||c===void 0?void 0:c.insertString(t.string)}),this.afterRender=()=>{var c;return(c=this.delegate)===null||c===void 0?void 0:c.inputControllerDidPaste(t)}}else if(ka(this.event)){var s;t.type="File",t.file=i.files[0],(s=this.delegate)===null||s===void 0||s.inputControllerWillPaste(t),this.withTargetDOMRange(function(){var c;return(c=this.responder)===null||c===void 0?void 0:c.insertFile(t.file)}),this.afterRender=()=>{var c;return(c=this.delegate)===null||c===void 0?void 0:c.inputControllerDidPaste(t)}}else if(n){var l;this.event.preventDefault(),t.type="text/html",t.html=n,(l=this.delegate)===null||l===void 0||l.inputControllerWillPaste(t),this.withTargetDOMRange(function(){var c;return(c=this.responder)===null||c===void 0?void 0:c.insertHTML(t.html)}),this.afterRender=()=>{var c;return(c=this.delegate)===null||c===void 0?void 0:c.inputControllerDidPaste(t)}}},insertFromYank(){return this.insertString(this.event.data)},insertLineBreak(){return this.insertString(` +`)},insertLink(){return this.activateAttributeIfSupported("href",this.event.data)},insertOrderedList(){return this.toggleAttributeIfSupported("number")},insertParagraph(){var i;return(i=this.delegate)===null||i===void 0||i.inputControllerWillPerformTyping(),this.withTargetDOMRange(function(){var t;return(t=this.responder)===null||t===void 0?void 0:t.insertLineBreak()})},insertReplacementText(){let i=this.event.dataTransfer.getData("text/plain"),t=this.event.getTargetRanges()[0];this.withTargetDOMRange(t,()=>{this.insertString(i,{updatePosition:!1})})},insertText(){var i;return this.insertString(this.event.data||((i=this.event.dataTransfer)===null||i===void 0?void 0:i.getData("text/plain")))},insertTranspose(){return this.insertString(this.event.data)},insertUnorderedList(){return this.toggleAttributeIfSupported("bullet")}});var Ta=function(i){let t=document.createRange();return t.setStart(i.startContainer,i.startOffset),t.setEnd(i.endContainer,i.endOffset),t},Qn=i=>{var t;return Array.from(((t=i.dataTransfer)===null||t===void 0?void 0:t.types)||[]).includes("Files")},ka=i=>{var t;return((t=i.dataTransfer.files)===null||t===void 0?void 0:t[0])&&!co(i)&&!Zo(i)},co=function(i){let t=i.clipboardData;if(t)return Array.from(t.types).filter(n=>n.match(/file/i)).length===t.types.length&&t.files.length>=1},Ra=function(i){let t=i.clipboardData;if(t)return t.types.includes("text/plain")&&t.types.length===1},Da=function(i){let t=[];return i.altKey&&t.push("alt"),i.shiftKey&&t.push("shift"),t.push(i.key),t},$n=i=>({x:i.clientX,y:i.clientY}),mi="[data-trix-attribute]",pi="[data-trix-action]",La="".concat(mi,", ").concat(pi),mn="[data-trix-dialog]",Oa="".concat(mn,"[data-trix-active]"),Pa="".concat(mn," [data-trix-method]"),Pr="".concat(mn," [data-trix-input]"),Ir=(i,t)=>(t||(t=qt(i)),i.querySelector("[data-trix-input][name='".concat(t,"']"))),Mr=i=>i.getAttribute("data-trix-action"),qt=i=>i.getAttribute("data-trix-attribute")||i.getAttribute("data-trix-dialog-attribute"),Ia=i=>i.getAttribute("data-trix-dialog"),dn=class extends S{constructor(t){super(t),this.didClickActionButton=this.didClickActionButton.bind(this),this.didClickAttributeButton=this.didClickAttributeButton.bind(this),this.didClickDialogButton=this.didClickDialogButton.bind(this),this.didKeyDownDialogInput=this.didKeyDownDialogInput.bind(this),this.element=t,this.attributes={},this.actions={},this.resetDialogInputs(),C("mousedown",{onElement:this.element,matchingSelector:pi,withCallback:this.didClickActionButton}),C("mousedown",{onElement:this.element,matchingSelector:mi,withCallback:this.didClickAttributeButton}),C("click",{onElement:this.element,matchingSelector:La,preventDefault:!0}),C("click",{onElement:this.element,matchingSelector:Pa,withCallback:this.didClickDialogButton}),C("keydown",{onElement:this.element,matchingSelector:Pr,withCallback:this.didKeyDownDialogInput})}didClickActionButton(t,e){var n;(n=this.delegate)===null||n===void 0||n.toolbarDidClickButton(),t.preventDefault();let r=Mr(e);if(this.getDialog(r))return this.toggleDialog(r);var o;return(o=this.delegate)===null||o===void 0?void 0:o.toolbarDidInvokeAction(r,e)}didClickAttributeButton(t,e){var n;(n=this.delegate)===null||n===void 0||n.toolbarDidClickButton(),t.preventDefault();let r=qt(e);if(this.getDialog(r))this.toggleDialog(r);else{var o;(o=this.delegate)===null||o===void 0||o.toolbarDidToggleAttribute(r)}return this.refreshAttributeButtons()}didClickDialogButton(t,e){let n=vt(e,{matchingSelector:mn}),r=e.getAttribute("data-trix-method");return this[r].call(this,n)}didKeyDownDialogInput(t,e){if(t.keyCode===13){t.preventDefault();let n=e.getAttribute("name"),r=this.getDialog(n);this.setAttribute(r)}if(t.keyCode===27)return t.preventDefault(),this.hideDialog()}updateActions(t){return this.actions=t,this.refreshActionButtons()}refreshActionButtons(){return this.eachActionButton((t,e)=>{t.disabled=this.actions[e]===!1})}eachActionButton(t){return Array.from(this.element.querySelectorAll(pi)).map(e=>t(e,Mr(e)))}updateAttributes(t){return this.attributes=t,this.refreshAttributeButtons()}refreshAttributeButtons(){return this.eachAttributeButton((t,e)=>(t.disabled=this.attributes[e]===!1,this.attributes[e]||this.dialogIsVisible(e)?(t.setAttribute("data-trix-active",""),t.classList.add("trix-active")):(t.removeAttribute("data-trix-active"),t.classList.remove("trix-active"))))}eachAttributeButton(t){return Array.from(this.element.querySelectorAll(mi)).map(e=>t(e,qt(e)))}applyKeyboardCommand(t){let e=JSON.stringify(t.sort());for(let n of Array.from(this.element.querySelectorAll("[data-trix-key]"))){let r=n.getAttribute("data-trix-key").split("+");if(JSON.stringify(r.sort())===e)return me("mousedown",{onElement:n}),!0}return!1}dialogIsVisible(t){let e=this.getDialog(t);if(e)return e.hasAttribute("data-trix-active")}toggleDialog(t){return this.dialogIsVisible(t)?this.hideDialog():this.showDialog(t)}showDialog(t){var e,n;this.hideDialog(),(e=this.delegate)===null||e===void 0||e.toolbarWillShowDialog();let r=this.getDialog(t);r.setAttribute("data-trix-active",""),r.classList.add("trix-active"),Array.from(r.querySelectorAll("input[disabled]")).forEach(s=>{s.removeAttribute("disabled")});let o=qt(r);if(o){let s=Ir(r,t);s&&(s.value=this.attributes[o]||"",s.select())}return(n=this.delegate)===null||n===void 0?void 0:n.toolbarDidShowDialog(t)}setAttribute(t){var e;let n=qt(t),r=Ir(t,n);return r.willValidate&&(r.setCustomValidity(""),!r.checkValidity()||!this.isSafeAttribute(r))?(r.setCustomValidity("Invalid value"),r.setAttribute("data-trix-validate",""),r.classList.add("trix-validate"),r.focus()):((e=this.delegate)===null||e===void 0||e.toolbarDidUpdateAttribute(n,r.value),this.hideDialog())}isSafeAttribute(t){return t.hasAttribute("data-trix-validate-href")?xe.isValidAttribute("a","href",t.value):!0}removeAttribute(t){var e;let n=qt(t);return(e=this.delegate)===null||e===void 0||e.toolbarDidRemoveAttribute(n),this.hideDialog()}hideDialog(){let t=this.element.querySelector(Oa);if(t){var e;return t.removeAttribute("data-trix-active"),t.classList.remove("trix-active"),this.resetDialogInputs(),(e=this.delegate)===null||e===void 0?void 0:e.toolbarDidHideDialog(Ia(t))}}resetDialogInputs(){Array.from(this.element.querySelectorAll(Pr)).forEach(t=>{t.setAttribute("disabled","disabled"),t.removeAttribute("data-trix-validate"),t.classList.remove("trix-validate")})}getDialog(t){return this.element.querySelector("[data-trix-dialog=".concat(t,"]"))}},Ma=(i,t)=>gn(i.selectedRange,t.selectedRange)&&i.document.isEqualTo(t.document),Nt=class extends ln{constructor(t){let{editorElement:e,document:n,html:r}=t;super(...arguments),this.editorElement=e,this.selectionManager=new gt(this.editorElement),this.selectionManager.delegate=this,this.composition=new it,this.composition.delegate=this,this.attachmentManager=new $e(this.composition.getAttachments()),this.attachmentManager.delegate=this,this.inputController=wi.getLevel()===2?new Ft(this.editorElement):new et(this.editorElement),this.inputController.delegate=this,this.inputController.responder=this.composition,this.compositionController=new an(this.editorElement,this.composition),this.compositionController.delegate=this,this.toolbarController=new dn(this.editorElement.toolbarElement),this.toolbarController.delegate=this,this.editor=new nn(this.composition,this.selectionManager,this.editorElement),n?this.editor.loadDocument(n):this.editor.loadHTML(r)}registerSelectionManager(){return It.registerSelectionManager(this.selectionManager)}unregisterSelectionManager(){return It.unregisterSelectionManager(this.selectionManager)}render(){return this.compositionController.render()}reparse(){return this.composition.replaceHTML(this.editorElement.innerHTML)}compositionDidChangeDocument(t){if(this.notifyEditorElement("document-change"),!this.handlingInput)return this.render()}compositionDidChangeCurrentAttributes(t){return this.currentAttributes=t,this.toolbarController.updateAttributes(this.currentAttributes),this.updateCurrentActions(),this.notifyEditorElement("attributes-change",{attributes:this.currentAttributes})}compositionDidPerformInsertionAtRange(t){this.pasting&&(this.pastedRange=t)}compositionShouldAcceptFile(t){return this.notifyEditorElement("file-accept",{file:t})}compositionDidAddAttachment(t){let e=this.attachmentManager.manageAttachment(t);return this.notifyEditorElement("attachment-add",{attachment:e})}compositionDidEditAttachment(t){this.compositionController.rerenderViewForObject(t);let e=this.attachmentManager.manageAttachment(t);return this.notifyEditorElement("attachment-edit",{attachment:e}),this.notifyEditorElement("change")}compositionDidChangeAttachmentPreviewURL(t){return this.compositionController.invalidateViewForObject(t),this.notifyEditorElement("change")}compositionDidRemoveAttachment(t){let e=this.attachmentManager.unmanageAttachment(t);return this.notifyEditorElement("attachment-remove",{attachment:e})}compositionDidStartEditingAttachment(t,e){return this.attachmentLocationRange=this.composition.document.getLocationRangeOfAttachment(t),this.compositionController.installAttachmentEditorForAttachment(t,e),this.selectionManager.setLocationRange(this.attachmentLocationRange)}compositionDidStopEditingAttachment(t){this.compositionController.uninstallAttachmentEditor(),this.attachmentLocationRange=null}compositionDidRequestChangingSelectionToLocationRange(t){if(!(this.loadingSnapshot&&!this.isFocused())&&(this.requestedLocationRange=t,this.compositionRevisionWhenLocationRangeRequested=this.composition.revision,!this.handlingInput))return this.render()}compositionWillLoadSnapshot(){this.loadingSnapshot=!0}compositionDidLoadSnapshot(){this.compositionController.refreshViewCache(),this.render(),this.loadingSnapshot=!1}getSelectionManager(){return this.selectionManager}attachmentManagerDidRequestRemovalOfAttachment(t){return this.removeAttachment(t)}compositionControllerWillSyncDocumentView(){return this.inputController.editorWillSyncDocumentView(),this.selectionManager.lock(),this.selectionManager.clearSelection()}compositionControllerDidSyncDocumentView(){return this.inputController.editorDidSyncDocumentView(),this.selectionManager.unlock(),this.updateCurrentActions(),this.notifyEditorElement("sync")}compositionControllerDidRender(){this.requestedLocationRange&&(this.compositionRevisionWhenLocationRangeRequested===this.composition.revision&&this.selectionManager.setLocationRange(this.requestedLocationRange),this.requestedLocationRange=null,this.compositionRevisionWhenLocationRangeRequested=null),this.renderedCompositionRevision!==this.composition.revision&&(this.runEditorFilters(),this.composition.updateCurrentAttributes(),this.notifyEditorElement("render")),this.renderedCompositionRevision=this.composition.revision}compositionControllerDidFocus(){return this.isFocusedInvisibly()&&this.setLocationRange({index:0,offset:0}),this.toolbarController.hideDialog(),this.notifyEditorElement("focus")}compositionControllerDidBlur(){return this.notifyEditorElement("blur")}compositionControllerDidSelectAttachment(t,e){return this.toolbarController.hideDialog(),this.composition.editAttachment(t,e)}compositionControllerDidRequestDeselectingAttachment(t){let e=this.attachmentLocationRange||this.composition.document.getLocationRangeOfAttachment(t);return this.selectionManager.setLocationRange(e[1])}compositionControllerWillUpdateAttachment(t){return this.editor.recordUndoEntry("Edit Attachment",{context:t.id,consolidatable:!0})}compositionControllerDidRequestRemovalOfAttachment(t){return this.removeAttachment(t)}inputControllerWillHandleInput(){this.handlingInput=!0,this.requestedRender=!1}inputControllerDidRequestRender(){this.requestedRender=!0}inputControllerDidHandleInput(){if(this.handlingInput=!1,this.requestedRender)return this.requestedRender=!1,this.render()}inputControllerDidAllowUnhandledInput(){return this.notifyEditorElement("change")}inputControllerDidRequestReparse(){return this.reparse()}inputControllerWillPerformTyping(){return this.recordTypingUndoEntry()}inputControllerWillPerformFormatting(t){return this.recordFormattingUndoEntry(t)}inputControllerWillCutText(){return this.editor.recordUndoEntry("Cut")}inputControllerWillPaste(t){return this.editor.recordUndoEntry("Paste"),this.pasting=!0,this.notifyEditorElement("before-paste",{paste:t})}inputControllerDidPaste(t){return t.range=this.pastedRange,this.pastedRange=null,this.pasting=null,this.notifyEditorElement("paste",{paste:t})}inputControllerWillMoveText(){return this.editor.recordUndoEntry("Move")}inputControllerWillAttachFiles(){return this.editor.recordUndoEntry("Drop Files")}inputControllerWillPerformUndo(){return this.editor.undo()}inputControllerWillPerformRedo(){return this.editor.redo()}inputControllerDidReceiveKeyboardCommand(t){return this.toolbarController.applyKeyboardCommand(t)}inputControllerDidStartDrag(){this.locationRangeBeforeDrag=this.selectionManager.getLocationRange()}inputControllerDidReceiveDragOverPoint(t){return this.selectionManager.setLocationRangeFromPointRange(t)}inputControllerDidCancelDrag(){this.selectionManager.setLocationRange(this.locationRangeBeforeDrag),this.locationRangeBeforeDrag=null}locationRangeDidChange(t){return this.composition.updateCurrentAttributes(),this.updateCurrentActions(),this.attachmentLocationRange&&!gn(this.attachmentLocationRange,t)&&this.composition.stopEditingAttachment(),this.notifyEditorElement("selection-change")}toolbarDidClickButton(){if(!this.getLocationRange())return this.setLocationRange({index:0,offset:0})}toolbarDidInvokeAction(t,e){return this.invokeAction(t,e)}toolbarDidToggleAttribute(t){if(this.recordFormattingUndoEntry(t),this.composition.toggleCurrentAttribute(t),this.render(),!this.selectionFrozen)return this.editorElement.focus()}toolbarDidUpdateAttribute(t,e){if(this.recordFormattingUndoEntry(t),this.composition.setCurrentAttribute(t,e),this.render(),!this.selectionFrozen)return this.editorElement.focus()}toolbarDidRemoveAttribute(t){if(this.recordFormattingUndoEntry(t),this.composition.removeCurrentAttribute(t),this.render(),!this.selectionFrozen)return this.editorElement.focus()}toolbarWillShowDialog(t){return this.composition.expandSelectionForEditing(),this.freezeSelection()}toolbarDidShowDialog(t){return this.notifyEditorElement("toolbar-dialog-show",{dialogName:t})}toolbarDidHideDialog(t){return this.thawSelection(),this.editorElement.focus(),this.notifyEditorElement("toolbar-dialog-hide",{dialogName:t})}freezeSelection(){if(!this.selectionFrozen)return this.selectionManager.lock(),this.composition.freezeSelection(),this.selectionFrozen=!0,this.render()}thawSelection(){if(this.selectionFrozen)return this.composition.thawSelection(),this.selectionManager.unlock(),this.selectionFrozen=!1,this.render()}canInvokeAction(t){if(this.actionIsExternal(t))return!0;var e;return!!((e=this.actions[t])!==null&&e!==void 0&&(e=e.test)!==null&&e!==void 0&&e.call(this))}invokeAction(t,e){if(this.actionIsExternal(t))return this.notifyEditorElement("action-invoke",{actionName:t,invokingElement:e});var n;return(n=this.actions[t])===null||n===void 0||(n=n.perform)===null||n===void 0?void 0:n.call(this)}actionIsExternal(t){return/^x-./.test(t)}getCurrentActions(){let t={};for(let e in this.actions)t[e]=this.canInvokeAction(e);return t}updateCurrentActions(){let t=this.getCurrentActions();if(!ee(t,this.currentActions))return this.currentActions=t,this.toolbarController.updateActions(this.currentActions),this.notifyEditorElement("actions-change",{actions:this.currentActions})}runEditorFilters(){let t=this.composition.getSnapshot();if(Array.from(this.editor.filters).forEach(e=>{let{document:n,selectedRange:r}=t;t=e.call(this.editor,t)||{},t.document||(t.document=n),t.selectedRange||(t.selectedRange=r)}),!Ma(t,this.composition.getSnapshot()))return this.composition.loadSnapshot(t)}updateInputElement(){let t=this.compositionController.getSerializableElement(),e=sa(t,"text/html");return this.editorElement.setFormValue(e)}notifyEditorElement(t,e){switch(t){case"document-change":this.documentChangedSinceLastRender=!0;break;case"render":this.documentChangedSinceLastRender&&(this.documentChangedSinceLastRender=!1,this.notifyEditorElement("change"));break;case"change":case"attachment-add":case"attachment-edit":case"attachment-remove":this.updateInputElement();break}return this.editorElement.notify(t,e)}removeAttachment(t){return this.editor.recordUndoEntry("Delete Attachment"),this.composition.removeAttachment(t),this.render()}recordFormattingUndoEntry(t){let e=D(t),n=this.selectionManager.getLocationRange();if(e||!ut(n))return this.editor.recordUndoEntry("Formatting",{context:this.getUndoContext(),consolidatable:!0})}recordTypingUndoEntry(){return this.editor.recordUndoEntry("Typing",{context:this.getUndoContext(this.currentAttributes),consolidatable:!0})}getUndoContext(){for(var t=arguments.length,e=new Array(t),n=0;n0?Math.floor(new Date().getTime()/ii.interval):0}isFocused(){var t;return this.editorElement===((t=this.editorElement.ownerDocument)===null||t===void 0?void 0:t.activeElement)}isFocusedInvisibly(){return this.isFocused()&&!this.getLocationRange()}get actions(){return this.constructor.actions}};B(Nt,"actions",{undo:{test(){return this.editor.canUndo()},perform(){return this.editor.undo()}},redo:{test(){return this.editor.canRedo()},perform(){return this.editor.redo()}},link:{test(){return this.editor.canActivateAttribute("href")}},increaseNestingLevel:{test(){return this.editor.canIncreaseNestingLevel()},perform(){return this.editor.increaseNestingLevel()&&this.render()}},decreaseNestingLevel:{test(){return this.editor.canDecreaseNestingLevel()},perform(){return this.editor.decreaseNestingLevel()&&this.render()}},attachFiles:{test(){return!0},perform(){return wi.pickFiles(this.editor.insertFiles)}}});Nt.proxyMethod("getSelectionManager().setLocationRange");Nt.proxyMethod("getSelectionManager().getLocationRange");var Fa=Object.freeze({__proto__:null,AttachmentEditorController:sn,CompositionController:an,Controller:ln,EditorController:Nt,InputController:$t,Level0InputController:et,Level2InputController:Ft,ToolbarController:dn}),Na=Object.freeze({__proto__:null,MutationObserver:cn,SelectionChangeObserver:Ke}),Ba=Object.freeze({__proto__:null,FileVerificationOperation:un,ImagePreloadOperation:Qe});Vr("trix-toolbar",`%t { + display: block; +} + +%t { + white-space: nowrap; +} + +%t [data-trix-dialog] { + display: none; +} + +%t [data-trix-dialog][data-trix-active] { + display: block; +} + +%t [data-trix-dialog] [data-trix-validate]:invalid { + background-color: #ffdddd; +}`);var hn=class extends HTMLElement{connectedCallback(){this.innerHTML===""&&(this.innerHTML=Ur.getDefaultHTML())}get editorElements(){if(this.id){var t;let e=(t=this.ownerDocument)===null||t===void 0?void 0:t.querySelectorAll('trix-editor[toolbar="'.concat(this.id,'"]'));return Array.from(e)}else return[]}get editorElement(){let[t]=this.editorElements;return t}},_a=0,ja=function(i){if(!document.querySelector(":focus")&&i.hasAttribute("autofocus")&&document.querySelector("[autofocus]")===i)return i.focus()},Wa=function(i){if(!i.hasAttribute("contenteditable"))return i.toggleAttribute("contenteditable",!i.disabled),Oo("focus",{onElement:i,withCallback(){return za(i)}})},za=function(i){return Ua(i),Va(i)},Ua=function(i){var t,e;if((t=(e=document).queryCommandSupported)!==null&&t!==void 0&&t.call(e,"enableObjectResizing"))return document.execCommand("enableObjectResizing",!1,!1),C("mscontrolselect",{onElement:i,preventDefault:!0})},Va=function(i){var t,e;if((t=(e=document).queryCommandSupported)!==null&&t!==void 0&&t.call(e,"DefaultParagraphSeparator")){let{tagName:n}=z.default;if(["div","p"].includes(n))return document.execCommand("DefaultParagraphSeparator",!1,n)}},Ha=function(i){if(!i.hasAttribute("role"))return i.setAttribute("role","textbox")},qa=function(i){if(i.hasAttribute("aria-label")||i.hasAttribute("aria-labelledby"))return;let t=function(){let n=Array.from(i.labels).map(r=>{if(!r.contains(i))return r.textContent}).filter(r=>r).join(" ");return n?i.setAttribute("aria-label",n):i.removeAttribute("aria-label")};return t(),C("focus",{onElement:i,withCallback:t})},Fr=function(){return Se.forcesObjectResizing?{display:"inline",width:"auto"}:{display:"inline-block",width:"1px"}}();Vr("trix-editor",`%t { + display: block; +} + +%t:empty::before { + content: attr(placeholder); + color: graytext; + cursor: text; + pointer-events: none; + white-space: pre-line; +} + +%t a[contenteditable=false] { + cursor: text; +} + +%t img { + max-width: 100%; + height: auto; +} + +%t `.concat(Rt,` figcaption textarea { + resize: none; +} + +%t `).concat(Rt,` figcaption textarea.trix-autoresize-clone { + position: absolute; + left: -9999px; + max-height: 0px; +} + +%t `).concat(Rt,` figcaption[data-trix-placeholder]:empty::before { + content: attr(data-trix-placeholder); + color: graytext; +} + +%t [data-trix-cursor-target] { + display: `).concat(Fr.display,` !important; + width: `).concat(Fr.width,` !important; + padding: 0 !important; + margin: 0 !important; + border: none !important; +} + +%t [data-trix-cursor-target=left] { + vertical-align: top !important; + margin-left: -1px !important; +} + +%t [data-trix-cursor-target=right] { + vertical-align: bottom !important; + margin-right: -1px !important; +}`));var $=new WeakMap,je=new WeakMap,fe=new WeakSet,bi=class{constructor(t){js(this,fe),B(this,"value",""),Jt(this,$,{writable:!0,value:void 0}),Jt(this,je,{writable:!0,value:void 0}),this.element=t,ye(this,$,t.attachInternals()),ye(this,je,!1)}connectedCallback(){_e(this,fe,We).call(this)}disconnectedCallback(){}get form(){return v(this,$).form}get name(){return this.element.getAttribute("name")}set name(t){this.element.setAttribute("name",t)}get labels(){return v(this,$).labels}get disabled(){return v(this,je)||this.element.hasAttribute("disabled")}set disabled(t){this.element.toggleAttribute("disabled",t)}get required(){return this.element.hasAttribute("required")}set required(t){this.element.toggleAttribute("required",t),_e(this,fe,We).call(this)}get validity(){return v(this,$).validity}get validationMessage(){return v(this,$).validationMessage}get willValidate(){return v(this,$).willValidate}formDisabledCallback(t){ye(this,je,t)}setFormValue(t){this.value=t,_e(this,fe,We).call(this),v(this,$).setFormValue(this.element.disabled?void 0:this.value)}checkValidity(){return v(this,$).checkValidity()}reportValidity(){return v(this,$).reportValidity()}setCustomValidity(t){_e(this,fe,We).call(this,t)}};function We(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",{required:t,value:e}=this.element,n=t&&!e,r=!!i,o=p("input",{required:t}),s=i||o.validationMessage;v(this,$).setValidity({valueMissing:n,customError:r},s)}var ti=new WeakMap,ei=new WeakMap,ni=new WeakMap,vi=class{constructor(t){Jt(this,ti,{writable:!0,value:void 0}),Jt(this,ei,{writable:!0,value:e=>{e.defaultPrevented||e.target===this.element.form&&this.element.reset()}}),Jt(this,ni,{writable:!0,value:e=>{if(e.defaultPrevented||this.element.contains(e.target))return;let n=vt(e.target,{matchingSelector:"label"});!n||!Array.from(this.labels).includes(n)||this.element.focus()}}),this.element=t}connectedCallback(){ye(this,ti,qa(this.element)),window.addEventListener("reset",v(this,ei),!1),window.addEventListener("click",v(this,ni),!1)}disconnectedCallback(){var t;(t=v(this,ti))===null||t===void 0||t.destroy(),window.removeEventListener("reset",v(this,ei),!1),window.removeEventListener("click",v(this,ni),!1)}get labels(){let t=[];this.element.id&&this.element.ownerDocument&&t.push(...Array.from(this.element.ownerDocument.querySelectorAll("label[for='".concat(this.element.id,"']"))||[]));let e=vt(this.element,{matchingSelector:"label"});return e&&[this.element,null].includes(e.control)&&t.push(e),t}get form(){return console.warn("This browser does not support the .form property for trix-editor elements."),null}get name(){return console.warn("This browser does not support the .name property for trix-editor elements."),null}set name(t){console.warn("This browser does not support the .name property for trix-editor elements.")}get disabled(){return console.warn("This browser does not support the [disabled] attribute for trix-editor elements."),!1}set disabled(t){console.warn("This browser does not support the [disabled] attribute for trix-editor elements.")}get required(){return console.warn("This browser does not support the [required] attribute for trix-editor elements."),!1}set required(t){console.warn("This browser does not support the [required] attribute for trix-editor elements.")}get validity(){return console.warn("This browser does not support the validity property for trix-editor elements."),null}get validationMessage(){return console.warn("This browser does not support the validationMessage property for trix-editor elements."),""}get willValidate(){return console.warn("This browser does not support the willValidate property for trix-editor elements."),!1}formDisabledCallback(t){}setFormValue(t){}checkValidity(){return console.warn("This browser does not support checkValidity() for trix-editor elements."),!0}reportValidity(){return console.warn("This browser does not support reportValidity() for trix-editor elements."),!0}setCustomValidity(t){console.warn("This browser does not support setCustomValidity(validationMessage) for trix-editor elements.")}},R=new WeakMap,te=class extends HTMLElement{constructor(){super(),Jt(this,R,{writable:!0,value:void 0}),this.willCreateInput=!0,ye(this,R,this.constructor.formAssociated?new bi(this):new vi(this))}get trixId(){return this.hasAttribute("trix-id")?this.getAttribute("trix-id"):(this.setAttribute("trix-id",++_a),this.trixId)}get labels(){return v(this,R).labels}get disabled(){let{inputElement:t}=this;return t?t.disabled:v(this,R).disabled}set disabled(t){let{inputElement:e}=this;e&&(e.disabled=t),v(this,R).disabled=t}get required(){return v(this,R).required}set required(t){v(this,R).required=t}get validity(){return v(this,R).validity}get validationMessage(){return v(this,R).validationMessage}get willValidate(){return v(this,R).willValidate}get type(){return this.localName}get toolbarElement(){if(this.hasAttribute("toolbar")){var t;return(t=this.ownerDocument)===null||t===void 0?void 0:t.getElementById(this.getAttribute("toolbar"))}else if(this.parentNode){let e="trix-toolbar-".concat(this.trixId);return this.setAttribute("toolbar",e),this.internalToolbar=p("trix-toolbar",{id:e}),this.parentNode.insertBefore(this.internalToolbar,this),this.internalToolbar}else return}get form(){let{inputElement:t}=this;return t?t.form:v(this,R).form}get inputElement(){if(this.hasAttribute("input")){var t;return(t=this.ownerDocument)===null||t===void 0?void 0:t.getElementById(this.getAttribute("input"))}else return}get editor(){var t;return(t=this.editorController)===null||t===void 0?void 0:t.editor}get name(){let{inputElement:t}=this;return t?t.name:v(this,R).name}set name(t){let{inputElement:e}=this;e?e.name=t:v(this,R).name=t}get value(){let{inputElement:t}=this;return t?t.value:v(this,R).value}set value(t){var e;this.defaultValue=t,(e=this.editor)===null||e===void 0||e.loadHTML(this.defaultValue)}attributeChangedCallback(t,e,n){t==="connected"&&this.isConnected&&e!=null&&e!==n&&requestAnimationFrame(()=>this.reconnect())}notify(t,e){if(this.editorController)return me("trix-".concat(t),{onElement:this,attributes:e})}setFormValue(t){let{inputElement:e}=this;e&&(e.value=t),v(this,R).setFormValue(t)}connectedCallback(){if(!this.hasAttribute("data-trix-internal")){if(Wa(this),Ha(this),!this.editorController){if(me("trix-before-initialize",{onElement:this}),this.defaultValue=this.inputElement?this.inputElement.value:this.innerHTML,!this.hasAttribute("input")&&this.parentNode&&this.willCreateInput){let t="trix-input-".concat(this.trixId);this.setAttribute("input",t);let e=p("input",{type:"hidden",id:t});this.parentNode.insertBefore(e,this.nextElementSibling)}this.editorController=new Nt({editorElement:this,html:this.defaultValue}),requestAnimationFrame(()=>me("trix-initialize",{onElement:this}))}this.editorController.registerSelectionManager(),v(this,R).connectedCallback(),this.toggleAttribute("connected",!0),ja(this)}}disconnectedCallback(){var t;(t=this.editorController)===null||t===void 0||t.unregisterSelectionManager(),v(this,R).disconnectedCallback(),this.toggleAttribute("connected",!1)}reconnect(){this.removeInternalToolbar(),this.disconnectedCallback(),this.connectedCallback()}removeInternalToolbar(){var t;(t=this.internalToolbar)===null||t===void 0||t.remove(),this.internalToolbar=null}checkValidity(){return v(this,R).checkValidity()}reportValidity(){return v(this,R).reportValidity()}setCustomValidity(t){v(this,R).setCustomValidity(t)}formDisabledCallback(t){let{inputElement:e}=this;e&&(e.disabled=t),this.toggleAttribute("contenteditable",!t),v(this,R).formDisabledCallback(t)}formResetCallback(){this.reset()}reset(){this.value=this.defaultValue}};B(te,"formAssociated","ElementInternals"in window);B(te,"observedAttributes",["connected"]);var Ga=Object.freeze({__proto__:null,TrixEditorElement:te,TrixToolbarElement:hn}),Ka=Object.freeze({__proto__:null,Filter:en,attachmentGalleryFilter:ro}),uo={VERSION:ko,config:Te,core:aa,models:so,views:ga,controllers:Fa,observers:Na,operations:Ba,elements:Ga,filters:Ka};Object.assign(uo,so);function Ja(){customElements.get("trix-toolbar")||customElements.define("trix-toolbar",hn),customElements.get("trix-editor")||customElements.define("trix-editor",te)}window.Trix=uo;setTimeout(Ja,0);export{uo as default}; +/*! @license DOMPurify 3.2.7 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.7/LICENSE */ diff --git a/resources/js/libs/lexxy.js b/resources/js/libs/lexxy.js new file mode 100644 index 00000000..13b4d1d9 --- /dev/null +++ b/resources/js/libs/lexxy.js @@ -0,0 +1,6 @@ +import * as Lexxy from "@37signals/lexxy" + +// Rich Text Laravel uses a custom attachment tag name, so we must configure it here... +Lexxy.configure({ global: { attachmentTagName: "rich-text-attachment" } }) + +export default Lexxy; diff --git a/resources/js/libs/trix.js b/resources/js/libs/trix.js new file mode 100644 index 00000000..6acd443a --- /dev/null +++ b/resources/js/libs/trix.js @@ -0,0 +1,5 @@ +import Trix from 'trix'; + +window.Trix = Trix; + +export default Trix; diff --git a/resources/views/app.blade.php b/resources/views/app.blade.php index 2a8f54c8..bb18bcf3 100755 --- a/resources/views/app.blade.php +++ b/resources/views/app.blade.php @@ -464,19 +464,23 @@ closeModal() } }) - document.addEventListener('DOMContentLoaded', function () { + function autoDismissFlashMessage() { const errorBox = document.getElementById('error-box') - if (errorBox) { - // Fade out the error box after 3 seconds - setTimeout(() => { - errorBox.classList.add('opacity-0') // Add fade-out class - // Remove the error box after the fade-out transition ends - errorBox.addEventListener('transitionend', () => { - errorBox.remove() - }) - }, 3000) // Duration before starting fade out - } - }) + if (!errorBox) return + + setTimeout(() => { + errorBox.classList.add('opacity-0') + errorBox.addEventListener('transitionend', () => { + errorBox.remove() + }) + }, 5000) + } + + if (document.readyState === 'loading') { + document.addEventListener('DOMContentLoaded', autoDismissFlashMessage) + } else { + autoDismissFlashMessage() + } @yield('script') diff --git a/resources/views/attendance/index.blade.php b/resources/views/attendance/index.blade.php index 1faca913..4dfcf1b4 100755 --- a/resources/views/attendance/index.blade.php +++ b/resources/views/attendance/index.blade.php @@ -38,7 +38,7 @@ if (!empty($user->tasks)) { }); } //dd(count($break = $user->attendanceBreaks)); -if (count($user->attendanceBreaks) > 0){ +if (count($user->attendanceBreaks) > 0) { $break = $user->attendanceBreaks[0]; if ($break->break_end == null) { $now = Carbon::now()->format('Y-m-d H:i:s'); @@ -68,7 +68,7 @@ if (count($user->attendanceBreaks) > 0){ {{-- --}} @if (!isset($_COOKIE['token-0'])) -
    @csrf

    سامانه گذارش کار

    @@ -89,6 +89,12 @@ if (count($user->attendanceBreaks) > 0){ style="width: 100%"> ورود/خروج + sghl +
    {{--

    {{Carbon::now()}}

    --}} -{{-- @if(session('open_task_modal'))--}} -{{-- --}} -{{-- @endif--}} + {{-- @if(session('open_task_modal'))--}} + {{-- --}} + {{-- @endif--}} @else @@ -253,19 +259,44 @@ if (count($user->attendanceBreaks) > 0){ attestation: "direct" }; submitBtn.addEventListener('click', async () => { - // ابتدا اعتبارسنجی اثر انگشت توسط WebAuthn if (!window.PublicKeyCredential) { alert('مرورگر شما از احراز هویت بیومتریک پشتیبانی نمی‌کند.'); return; } + + // یک چالش تصادفی بسازید + const challenge = new Uint8Array(32); + window.crypto.getRandomValues(challenge); + + // گزینه‌های احراز هویت (Authentication) + const getOptions = { + publicKey: { + challenge: challenge, + timeout: 60000, + rpId: window.location.hostname, // اختیاری؛ برای لوکال‌هاست خالی بگذارید + userVerification: "required", + allowCredentials: [] // خالی بگذارید تا هر کلید موجود نمایش داده شود + } + }; + try { - const credential = await navigator.credentials.create({ - publicKey: createOptions - }); + // به جای create از get استفاده کنید + const assertion = await navigator.credentials.get(getOptions); + console.log('احراز هویت موفق:', assertion); + // اینجا فرم را سابمیت کنید یا هر عملیات دیگر attendanceForm.submit(); } catch (error) { - output.textContent = error.name === 'NotAllowedError' ? 'احراز هویت لغو شد یا دسترسی مجاز نبود.' : 'عملیات ناموفق بود. لطفاً دوباره امتحان کنید.'; + const message = error.name === 'NotAllowedError' + ? 'احراز هویت لغو شد یا دسترسی مجاز نبود.' + : 'عملیات ناموفق بود. لطفاً دوباره امتحان کنید.'; + const output = document.getElementById('output'); + if (output) { + output.textContent = message; + } else { + alert(message); + } + console.error(error); } }); @@ -415,7 +446,6 @@ if (count($user->attendanceBreaks) > 0){ }); - @endif
    @@ -447,7 +477,7 @@ if (count($user->attendanceBreaks) > 0){ class=" example1 form-control border p-2 rounded date-picker-input" value="" placeholder="تاریخ" readonly - > + > @@ -885,329 +915,330 @@ if (count($user->attendanceBreaks) > 0){ method: "POST", headers: { 'X-CSRF-TOKEN': '{{ csrf_token() }}', - 'Accept': 'application/json' - } - }) - .then(res => { - if (res.ok) { - window.location.reload(); - } else { - window.location.reload(); - // breakBtn.textContent = 'خطا'; - // breakBtn.disabled = false; - // console.error('Server error on break action:', res.statusText); - } - }) - .catch(err => { - window.location.reload(); - - // breakBtn.textContent = 'خطای شبکه'; - // breakBtn.disabled = false; - // console.error('Network error:', err); - }); - }); - } - - - - - - - - - {{--let breakStarted = false;--}} - {{--let breakStartTime = null;--}} - {{--let breakTimer = null;--}} - - {{--const breakBtn = document.getElementById('breakAttendance');--}} - - {{--function formatLocalDatetime(date) {--}} - {{-- const year = date.getFullYear();--}} - {{-- const month = String(date.getMonth() + 1).padStart(2, '0');--}} - {{-- const day = String(date.getDate()).padStart(2, '0');--}} - {{-- const hours = String(date.getHours()).padStart(2, '0');--}} - {{-- const minutes = String(date.getMinutes()).padStart(2, '0');--}} - {{-- const seconds = String(date.getSeconds()).padStart(2, '0');--}} - - {{-- return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;--}} - {{--}--}} - - {{--function formatDuration(totalSeconds) {--}} - {{-- const hours = Math.floor(totalSeconds / 3600);--}} - {{-- const minutes = Math.floor((totalSeconds % 3600) / 60);--}} - - {{-- const h = String(hours);--}} - {{-- const i = String(minutes).padStart(2, '0');--}} - - {{-- return `${h}:${i}`;--}} - {{--}--}} - - - {{--breakBtn.addEventListener('click', () => {--}} - {{-- if (!breakStarted) {--}} - {{-- // شروع استراحت 🚀--}} - {{-- breakStarted = true;--}} - {{-- breakStartTime = new Date();--}} - - {{-- // تغییر ظاهر دکمه و شروع تایمر (همچنان M:S نمایش داده می شود)--}} - {{-- breakBtn.classList.remove('bg-gray-500', 'hover:bg-gray-600');--}} - {{-- breakBtn.classList.add('bg-red-500', 'hover:bg-red-600');--}} - {{-- breakBtn.textContent = '00:00';--}} - - {{-- let seconds = 0;--}} - {{-- breakTimer = setInterval(() => {--}} - {{-- seconds++;--}} - {{-- // اینجا همچنان به صورت دقیقه:ثانیه نمایش داده می شود--}} - {{-- const m = String(Math.floor(seconds / 60)).padStart(2, '0');--}} - {{-- const s = String(seconds % 60).padStart(2, '0');--}} - {{-- breakBtn.textContent = ` ${m}:${s}`;--}} - {{-- }, 1000);--}} - {{-- //send start time--}} - {{-- let formData = new FormData();--}} - {{-- formData.append('start_time', formatLocalDatetime(breakStartTime));--}} - - {{-- formData.append('_token', '{{ csrf_token() }}');--}} - - {{-- fetch("{{ url('attendance/break') }}", {--}} - {{-- method: "POST",--}} - {{-- body: formData--}} - {{-- })--}} - {{-- .then(res => res.json())--}} - {{-- .then(data => console.log('✅ Break Started Logged:', data))--}} - {{-- .catch(err => console.error('💥 Error starting break:', err));--}} - - {{-- } else {--}} - {{-- // پایان استراحت 🛑--}} - {{-- breakStarted = false;--}} - {{-- const breakEndTime = new Date();--}} - {{-- clearInterval(breakTimer);--}} - - {{-- // 1. محاسبه مدت زمان استراحت (بر حسب ثانیه)--}} - {{-- const durationSec = Math.floor((breakEndTime - breakStartTime) / 1000);--}} - - {{-- // 2. تبدیل زمان های شروع و پایان به فرمت رشته ای--}} - {{-- const breakStartTime_str = formatLocalDatetime(breakStartTime);--}} - {{-- const breakEndTime_str = formatLocalDatetime(breakEndTime);--}} - - {{-- // 3. فرمت کردن مدت زمان به H:i (فقط برای نمایش در کنسول/هشدار)--}} - {{-- const duration_formatted_h_i = formatDuration(durationSec);--}} - - {{-- // 4. نمایش دکمه به حالت اولیه--}} - {{-- breakBtn.classList.remove('bg-red-500', 'hover:bg-red-600');--}} - {{-- // breakBtn.classList.add('bg-gray-500', 'hover:bg-gray-600');--}} - {{-- breakBtn.textContent = 'استراحت';--}} - - {{-- // 5. ارسال داده‌ها به سرور--}} - {{-- let formData = new FormData();--}} - {{-- formData.append('start_time', breakStartTime_str);--}} - {{-- formData.append('end_time', breakEndTime_str);--}} - {{-- formData.append('duration_seconds', durationSec);--}} - {{-- formData.append('_token', '{{ csrf_token() }}');--}} - - {{-- fetch("{{ url('attendance/break') }}", {--}} - {{-- method: "POST",--}} - {{-- body: formData--}} - {{-- })--}} - {{-- .then(res => res.json())--}} - {{-- .then(data => console.log('✅ Break saved:', data))--}} - {{-- .catch(err => console.error('💥 Error:', err));--}} - {{-- }--}} - {{--});--}} - - - - - - {{-- ATTENDANCE MODAL--}} - function clearTime(fieldId) { - document.getElementById(fieldId).value = ''; - } - - function closeModal() { - document.getElementById('modal-container').classList.add('hidden'); - } - - document.getElementById('modal-container').addEventListener('click', (e) => { - if (e.target === document.getElementById('modal-container')) { - closeModal(); + 'Accept': 'application/json' } - }); - - function confirmSubmit() { - return confirm("آیا تغییرات اعمال شوند؟"); - } - - function openModal(title, id, enteredAt, exitedAt) { - const isNewEntry = id === 'new'; - const modalTitleElement = document.getElementById('modal-title'); - - // ✅ بهترین روش: انتخاب مستقیم فیلد مخفی با ID آن - const hiddenIdInput = document.getElementById('edit_id'); - // const hiddenIdInput = document.getElementById('delete_id'); - - // انتخاب فیلد ID برای فرم حذف - const deleteIdInput = document.getElementById('delete_id'); - const submitButton = document.querySelector('#modal-content button[type="submit"]'); - const hiddenDateInput = document.querySelector('input[name="date"]'); - - // مقداردهی به فرم حذف - if (deleteIdInput) { - deleteIdInput.value = id; - } - - const newDateLabel = document.getElementById('new-date-label'); - const newDateGroup = document.getElementById('new-date-group'); - const displayDateInput = document.getElementById('display_date'); - - const panelLink = document.getElementById('panel-access-link'); - panelLink.href = `/go_down/${id}`; - - document.getElementById('modal-container').classList.remove('hidden'); - - const startTimeInput = document.querySelector('input[name="starttime"]'); - const endTimeInput = document.querySelector('input[name="endtime"]'); - - // تنظیم ساعت‌ها - if (enteredAt && !isNaN(new Date(enteredAt).getTime())) { - startTimeInput.value = new Date(enteredAt).toLocaleTimeString('en-GB', { - hour: '2-digit', - minute: '2-digit' - }); - } else { - startTimeInput.value = '09:00'; - } - - if (exitedAt && !isNaN(new Date(exitedAt).getTime())) { - endTimeInput.value = new Date(exitedAt).toLocaleTimeString('en-GB', { - hour: '2-digit', - minute: '2-digit' - }); - } - // else { - // endTimeInput.value = '17:30'; - // } - - - if (isNewEntry) { - // حالت ثبت جدید - modalTitleElement.innerText = 'ثبت روز کاری جدید'; - newDateLabel.style.display = 'block'; - newDateGroup.style.display = 'block'; - - displayDateInput.value = ''; - hiddenDateInput.value = ''; - - // ✅ اصلاح: مقداردهی 'new' به فیلد ID - if (hiddenIdInput) hiddenIdInput.value = 'new'; - - submitButton.onclick = function () { - if (hiddenDateInput.value === '') { - alert("لطفاً یک تاریخ را از تقویم انتخاب کنید."); - return false; - } - return confirmSubmit(); - }; - - } else { - // حالت ویرایش - modalTitleElement.innerText = 'تغییر ساعت کاری'; - newDateLabel.style.display = 'none'; - newDateGroup.style.display = 'none'; - - // ✅ اصلاح: استفاده از متغیر 'id' که از جدول فرستاده شده است - if (hiddenIdInput) hiddenIdInput.value = id; - if (hiddenDateInput) hiddenDateInput.value = enteredAt; - - submitButton.onclick = function () { - return confirmSubmit(); - }; - } - - //date and clock picker - $('.clockpicker').clockpicker({ - autoclose: false, - placement: 'center', - donetext: 'ثبت', - vibrate: true, - }); - - // --- فعال‌سازی تقویم --- - $(".example1").persianDatepicker({ - format: "YYYY/MM/DD", - altField: '#date', - altFormat: 'YYYY-MM-DD', - calendar: { - persian: { - locale: 'fa', - leapYearMode: "astronomical" - } - }, - observer: true, - initialValue: false, - initialValueType: 'gregorian', - autoClose: true, - toolbox: { - calendarSwitch: {enabled: false}, - todayButton: {enabled: true, text: {fa: "امروز"}} - }, - }); - - } - - - $(document).ready(function () { - - // 1. فعال‌سازی Clockpicker - $('.clockpicker').clockpicker({ - autoclose: false, - placement: 'center', - donetext: 'ثبت', - vibrate: true, - // donetext: true, - }); - - - $(".example1").persianDatepicker({ - format: "YYYY/MM/DD", - altField: '#date', - altFormat: 'YYYY-MM-DD', - calendar: { - persian: { - locale: 'fa', - leapYearMode: "astronomical" - } - }, - observer: true, - initialValue: false, - initialValueType: 'gregorian', - autoClose: true, - toolbox: { - calendarSwitch: {enabled: false}, - todayButton: {enabled: true, text: {fa: "امروز"}} - }, - onSelect: function (unix) { - // تبدیل تاریخ انتخابی به میلادی درست با timezone ایران - const d = new persianDate(unix).toCalendar('gregorian').toLocale('en'); - console.log("Gregorian (Fixed):", d.format("YYYY-MM-DD")); + }) + .then(res => { + if (res.status == 'error') { + console.log(res); + window.location.reload(); + } else { + console.log(res); + breakBtn.textContent = 'خطا'; + breakBtn.disabled = false; + console.error('Server error on break action:', res.statusText); + window.location.reload(); } + }) + .catch(err => { + console.log(err); + window.location.reload(); + + // breakBtn.textContent = 'خطای شبکه'; + // breakBtn.disabled = false; + // console.error('Network error:', err); }); - - // 2. فعال‌سازی Persian Datepicker - // $('.example1').pDatepicker({ - // format: 'YYYY/MM/DD', - // // placement: 'center', - // altField: '#date', // این فیلد مخفی، تاریخ میلادی تبدیل شده را دریافت می‌کند - // altFormat: 'YYYY-MM-DD', // میلادی ذخیره بشه - // // changeMonth: true, - // // changeYear: true, - // // showOtherMonths: true, - // // selectOtherMonths: true, - // autoClose: true, - // - // }); + }); + } + + + + + + + {{--let breakStarted = false;--}} + {{--let breakStartTime = null;--}} + {{--let breakTimer = null;--}} + + {{--const breakBtn = document.getElementById('breakAttendance');--}} + + {{--function formatLocalDatetime(date) {--}} + {{-- const year = date.getFullYear();--}} + {{-- const month = String(date.getMonth() + 1).padStart(2, '0');--}} + {{-- const day = String(date.getDate()).padStart(2, '0');--}} + {{-- const hours = String(date.getHours()).padStart(2, '0');--}} + {{-- const minutes = String(date.getMinutes()).padStart(2, '0');--}} + {{-- const seconds = String(date.getSeconds()).padStart(2, '0');--}} + + {{-- return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;--}} + {{--}--}} + + {{--function formatDuration(totalSeconds) {--}} + {{-- const hours = Math.floor(totalSeconds / 3600);--}} + {{-- const minutes = Math.floor((totalSeconds % 3600) / 60);--}} + + {{-- const h = String(hours);--}} + {{-- const i = String(minutes).padStart(2, '0');--}} + + {{-- return `${h}:${i}`;--}} + {{--}--}} + + + {{--breakBtn.addEventListener('click', () => {--}} + {{-- if (!breakStarted) {--}} + {{-- // شروع استراحت 🚀--}} + {{-- breakStarted = true;--}} + {{-- breakStartTime = new Date();--}} + + {{-- // تغییر ظاهر دکمه و شروع تایمر (همچنان M:S نمایش داده می شود)--}} + {{-- breakBtn.classList.remove('bg-gray-500', 'hover:bg-gray-600');--}} + {{-- breakBtn.classList.add('bg-red-500', 'hover:bg-red-600');--}} + {{-- breakBtn.textContent = '00:00';--}} + + {{-- let seconds = 0;--}} + {{-- breakTimer = setInterval(() => {--}} + {{-- seconds++;--}} + {{-- // اینجا همچنان به صورت دقیقه:ثانیه نمایش داده می شود--}} + {{-- const m = String(Math.floor(seconds / 60)).padStart(2, '0');--}} + {{-- const s = String(seconds % 60).padStart(2, '0');--}} + {{-- breakBtn.textContent = ` ${m}:${s}`;--}} + {{-- }, 1000);--}} + {{-- //send start time--}} + {{-- let formData = new FormData();--}} + {{-- formData.append('start_time', formatLocalDatetime(breakStartTime));--}} + + {{-- formData.append('_token', '{{ csrf_token() }}');--}} + + {{-- fetch("{{ url('attendance/break') }}", {--}} + {{-- method: "POST",--}} + {{-- body: formData--}} + {{-- })--}} + {{-- .then(res => res.json())--}} + {{-- .then(data => console.log('✅ Break Started Logged:', data))--}} + {{-- .catch(err => console.error('💥 Error starting break:', err));--}} + + {{-- } else {--}} + {{-- // پایان استراحت 🛑--}} + {{-- breakStarted = false;--}} + {{-- const breakEndTime = new Date();--}} + {{-- clearInterval(breakTimer);--}} + + {{-- // 1. محاسبه مدت زمان استراحت (بر حسب ثانیه)--}} + {{-- const durationSec = Math.floor((breakEndTime - breakStartTime) / 1000);--}} + + {{-- // 2. تبدیل زمان های شروع و پایان به فرمت رشته ای--}} + {{-- const breakStartTime_str = formatLocalDatetime(breakStartTime);--}} + {{-- const breakEndTime_str = formatLocalDatetime(breakEndTime);--}} + + {{-- // 3. فرمت کردن مدت زمان به H:i (فقط برای نمایش در کنسول/هشدار)--}} + {{-- const duration_formatted_h_i = formatDuration(durationSec);--}} + + {{-- // 4. نمایش دکمه به حالت اولیه--}} + {{-- breakBtn.classList.remove('bg-red-500', 'hover:bg-red-600');--}} + {{-- // breakBtn.classList.add('bg-gray-500', 'hover:bg-gray-600');--}} + {{-- breakBtn.textContent = 'استراحت';--}} + + {{-- // 5. ارسال داده‌ها به سرور--}} + {{-- let formData = new FormData();--}} + {{-- formData.append('start_time', breakStartTime_str);--}} + {{-- formData.append('end_time', breakEndTime_str);--}} + {{-- formData.append('duration_seconds', durationSec);--}} + {{-- formData.append('_token', '{{ csrf_token() }}');--}} + + {{-- fetch("{{ url('attendance/break') }}", {--}} + {{-- method: "POST",--}} + {{-- body: formData--}} + {{-- })--}} + {{-- .then(res => res.json())--}} + {{-- .then(data => console.log('✅ Break saved:', data))--}} + {{-- .catch(err => console.error('💥 Error:', err));--}} + {{-- }--}} + {{--});--}} + + + + + + {{-- ATTENDANCE MODAL--}} + function clearTime(fieldId) { + document.getElementById(fieldId).value = ''; + } + + function closeModal() { + document.getElementById('modal-container').classList.add('hidden'); + } + + document.getElementById('modal-container').addEventListener('click', (e) => { + if (e.target === document.getElementById('modal-container')) { + closeModal(); + } + }); + + function confirmSubmit() { + return confirm("آیا تغییرات اعمال شوند؟"); + } + + function openModal(title, id, enteredAt, exitedAt) { + const isNewEntry = id === 'new'; + const modalTitleElement = document.getElementById('modal-title'); + + const hiddenIdInput = document.getElementById('edit_id'); + // const hiddenIdInput = document.getElementById('delete_id'); + + const deleteIdInput = document.getElementById('delete_id'); + const submitButton = document.querySelector('#modal-content button[type="submit"]'); + const hiddenDateInput = document.querySelector('input[name="date"]'); + + // مقداردهی به فرم حذف + if (deleteIdInput) { + deleteIdInput.value = id; + } + + const newDateLabel = document.getElementById('new-date-label'); + const newDateGroup = document.getElementById('new-date-group'); + const displayDateInput = document.getElementById('display_date'); + + const panelLink = document.getElementById('panel-access-link'); + panelLink.href = `/go_down/${id}`; + + document.getElementById('modal-container').classList.remove('hidden'); + + const startTimeInput = document.querySelector('input[name="starttime"]'); + const endTimeInput = document.querySelector('input[name="endtime"]'); + + // تنظیم ساعت‌ها + if (enteredAt && !isNaN(new Date(enteredAt).getTime())) { + startTimeInput.value = new Date(enteredAt).toLocaleTimeString('en-GB', { + hour: '2-digit', + minute: '2-digit' }); + } else { + startTimeInput.value = '09:00'; + } + + if (exitedAt && !isNaN(new Date(exitedAt).getTime())) { + endTimeInput.value = new Date(exitedAt).toLocaleTimeString('en-GB', { + hour: '2-digit', + minute: '2-digit' + }); + } + // else { + // endTimeInput.value = '17:30'; + // } + + + if (isNewEntry) { + // حالت ثبت جدید + modalTitleElement.innerText = 'ثبت روز کاری جدید'; + newDateLabel.style.display = 'block'; + newDateGroup.style.display = 'block'; + + displayDateInput.value = ''; + hiddenDateInput.value = ''; + + // ✅ اصلاح: مقداردهی 'new' به فیلد ID + if (hiddenIdInput) hiddenIdInput.value = 'new'; + + submitButton.onclick = function () { + if (hiddenDateInput.value === '') { + alert("لطفاً یک تاریخ را از تقویم انتخاب کنید."); + return false; + } + return confirmSubmit(); + }; + + } else { + // حالت ویرایش + modalTitleElement.innerText = 'تغییر ساعت کاری'; + newDateLabel.style.display = 'none'; + newDateGroup.style.display = 'none'; + + // ✅ اصلاح: استفاده از متغیر 'id' که از جدول فرستاده شده است + if (hiddenIdInput) hiddenIdInput.value = id; + if (hiddenDateInput) hiddenDateInput.value = enteredAt; + + submitButton.onclick = function () { + return confirmSubmit(); + }; + } + + //date and clock picker + $('.clockpicker').clockpicker({ + autoclose: false, + placement: 'center', + donetext: 'ثبت', + vibrate: true, + }); + + // --- فعال‌سازی تقویم --- + $(".example1").persianDatepicker({ + format: "YYYY/MM/DD", + altField: '#date', + altFormat: 'YYYY-MM-DD', + calendar: { + persian: { + locale: 'fa', + leapYearMode: "astronomical" + } + }, + observer: true, + initialValue: false, + initialValueType: 'gregorian', + autoClose: true, + toolbox: { + calendarSwitch: {enabled: false}, + todayButton: {enabled: true, text: {fa: "امروز"}} + }, + }); + + } + + + $(document).ready(function () { + + // 1. فعال‌سازی Clockpicker + $('.clockpicker').clockpicker({ + autoclose: false, + placement: 'center', + donetext: 'ثبت', + vibrate: true, + // donetext: true, + }); + + + $(".example1").persianDatepicker({ + format: "YYYY/MM/DD", + altField: '#date', + altFormat: 'YYYY-MM-DD', + calendar: { + persian: { + locale: 'fa', + leapYearMode: "astronomical" + } + }, + observer: true, + initialValue: false, + initialValueType: 'gregorian', + autoClose: true, + toolbox: { + calendarSwitch: {enabled: false}, + todayButton: {enabled: true, text: {fa: "امروز"}} + }, + onSelect: function (unix) { + // تبدیل تاریخ انتخابی به میلادی درست با timezone ایران + const d = new persianDate(unix).toCalendar('gregorian').toLocale('en'); + console.log("Gregorian (Fixed):", d.format("YYYY-MM-DD")); + } + }); + + // 2. فعال‌سازی Persian Datepicker + // $('.example1').pDatepicker({ + // format: 'YYYY/MM/DD', + // // placement: 'center', + // altField: '#date', // این فیلد مخفی، تاریخ میلادی تبدیل شده را دریافت می‌کند + // altFormat: 'YYYY-MM-DD', // میلادی ذخیره بشه + // // changeMonth: true, + // // changeYear: true, + // // showOtherMonths: true, + // // selectOtherMonths: true, + // autoClose: true, + // + // }); + + + }); diff --git a/resources/views/tasks/create.blade.php b/resources/views/tasks/create.blade.php index 51b7d3be..ca5e71ff 100644 --- a/resources/views/tasks/create.blade.php +++ b/resources/views/tasks/create.blade.php @@ -1,91 +1,247 @@ +assignees) { + $decoded = json_decode($task->assignees, true); + $selectedAssignees = is_array($decoded) ? $decoded : []; + } +} + + +?> @extends('app') @section('content')
    -
    -

    ایجاد وظیفه جدید

    -
    +
    +

    {{isset($task) ? "ویرایش وظیفه" : "ایجاد وظیفه جدید"}} +

    + @csrf - - - + @if(isset($task)) + + @endif + + - - - + + - - + + + + + - - +
    + + + - - - + + + {{--
    --}} + + + {{--
    --}} + +
    - - + + + + -{{-- --}} - -
    - @foreach($users as $user) - - @endforeach + + - - - + {{-- --}} + {{-- --}} + {{-- --}} - - - + + @if(!empty($apps) && count($apps) > 0) + @foreach($apps as $app) + + @endforeach + @endif - - - - - -
    +
    + class="bg-cyan-600 text-white py-2 px-4 rounded-lg hover:bg-cyan-700 transition "> + {{isset($task) ? "ویرایش" : "ایجاد وظیفه جدید"}} +
    + + @endsection \ No newline at end of file diff --git a/resources/views/tasks/tasks.blade.php b/resources/views/tasks/tasks.blade.php index f8168d46..a4444b69 100644 --- a/resources/views/tasks/tasks.blade.php +++ b/resources/views/tasks/tasks.blade.php @@ -2,9 +2,17 @@ use Morilog\Jalali\Jalalian; use Carbon\Carbon; -use App\Models\Pivot_Tasks; +use App\Models\User; +use App\Models\App; +$mentionUsers = User::select('id', 'name', 'user_name')->get(); +$appsList = App::select('id', 'name_fa')->get(); +$isAdminLevel1 = false; +if (isset($_COOKIE['user_identity'])) { + $isAdminLevel1 = (int)User::where('user_name', $_COOKIE['user_identity'])->value('is_admin') === 1; +} + $backlog = << @@ -52,180 +60,184 @@ $cancelled = << "$in_progress",// in progress - "a9ce312f-cfca-491e-8e3d-1975aa6ebc10" => "$todo",//to do - "dea1fb57-a281-4fe7-8f3e-ee5567637e35" => "$error",// error - "770fbe42-99f6-41db-9b9e-773d9cced1a5" => "$backlog",//backlog - "b0e464e1-34eb-41ea-b2f7-3ef7483bc9f0" => "$done",//done - "d61d14a3-72f7-4f44-894b-efe8b2a75be1" => "$cancelled",//canceled + 1 => "$backlog",//backlog + 2 => "$todo",//to do + 3 => "$in_progress",// in progress + 4 => "$done",//done ]; -$p_tasks = Pivot_Tasks::get(); +//$p_tasks = Pivot_Tasks::get(); +$priorityLabels = [ + 'urgent' => 'فوری', + 'high' => 'بالا', + 'medium' => 'متوسط', + 'low' => 'پایین' +]; +$priorityColors = [ + 'urgent' => 'bg-red-100 text-red-800', + 'high' => 'bg-orange-100 text-orange-800', + 'medium' => 'bg-yellow-100 text-yellow-800', + 'low' => 'bg-green-100 text-green-800' +]; -foreach ($work_item as $work) { - $duration = '00:00:00'; - $totalSeconds = 0; - - - $items = $sub_work_items->where('parent', $work->task_id); - if (count($items) >= 1) { - foreach ($items as $item) { - - - - - $p_t = $p_tasks->where('task_id', $item->task_id)->first(); -// dump($item->task_id, $p_t?->duration); - if (!empty($p_t)) { - - $item->p_id = $p_t->id; - $item->started_at = $p_t->started_at; - $item->ended_at = $p_t->ended_at; - $item->duration = $p_t->duration; - if ($p_t->duration !== null) { -// dump($p_t->duration); - - [$h1, $m1, $s1] = explode(':', $p_t->duration); - $durationSeconds = $h1 * 3600 + $m1 * 60 + $s1; - - $totalSeconds += $durationSeconds; - - - } - } - } - $hours = floor($totalSeconds / 3600); - $minutes = floor(($totalSeconds % 3600) / 60); - $seconds = $totalSeconds % 60; - - $duration = sprintf('%02d:%02d:%02d', $hours, $minutes, $seconds); - } - $work->total_duration = $duration ?? '00:00:00'; -} -//dd($work_item,'sub',$sub_work_items); ?> @extends('app') @section('content')
    {{-- {{dd(count($tasks))}}--}} - @if(count($tasks) > 0) - {{--
    --}} - {{--

    --}} - {{-- وظیفه ها--}} - {{--

    --}} - {{--
    --}} -
    - @foreach($work_item as $t) -{{-- {{dump(Pivot_Tasks::where('task_id',$t->task_id)->whereNotNull('duration')->first())}}--}} -{{-- {{dump($t->total_duration)}}--}} -
    - - {{-- @endforeach--}} - {{-- @foreach($tasks as $t)--}} - - @endforeach
    + @else

    وظیفه ای ندارید

    @@ -235,27 +247,188 @@ foreach ($work_item as $work) { - {{-- START TASK MODAL --}} -