pdf wip
This commit is contained in:
1 parent
8971b8b948
commit
f676ec5a51
51 files changed
+1662
-600
No files matched your search
@@ -1,54 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Actions\Download;
|
||||
|
||||
use App\Actions\Generate\GenerateStandardTexte;
|
||||
use App\Models\Projekt;
|
||||
use Illuminate\Support\Facades\File;
|
||||
use Illuminate\Support\Facades\Response;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
|
||||
class DownloadStandardTexte
|
||||
{
|
||||
public function download($projekts_id, $mode)
|
||||
{
|
||||
|
||||
if ($mode == 'new') {
|
||||
Projekt::where('id', $projekts_id)->update(['pdf_standardtexte' => '', 'pdf_standardtexte_ok' => '0']);
|
||||
}
|
||||
|
||||
$headers = [
|
||||
'Content-Type: application/pdf',
|
||||
'Cache-Control: max-age=0',
|
||||
'Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT',
|
||||
'Cache-Control: cache, must-revalidate',
|
||||
];
|
||||
|
||||
$projekt = Projekt::where('id', $projekts_id)->first()->toArray();
|
||||
|
||||
$filepath = Storage::disk('public')->path("/download/$projekts_id/standards/");
|
||||
|
||||
if ($projekt['pdf_standardtexte_ok'] == 0) {
|
||||
|
||||
$filename = preg_replace("'[^0-9a-zA-Z]'", '', $projekt['intname']).'.pdf';
|
||||
|
||||
if (! File::isDirectory($filepath)) {
|
||||
File::makeDirectory($filepath, 0777, true, true);
|
||||
}
|
||||
$file = $filepath.$filename;
|
||||
|
||||
GenerateStandardTexte::generate($file, $projekts_id);
|
||||
|
||||
Projekt::where('id', $projekts_id)->update(['pdf_standardtexte' => $filename, 'pdf_standardtexte_ok' => 1]);
|
||||
|
||||
return Response::download($file, $projekt['name'], $headers);
|
||||
} else {
|
||||
|
||||
$filename = $projekt['pdf_standardtexte'];
|
||||
|
||||
$file = $filepath.$filename;
|
||||
|
||||
return Response::download($file, $projekt['name'], $headers);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -8,7 +8,7 @@ use Illuminate\Support\Facades\File;
|
||||
use Illuminate\Support\Facades\Response;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
|
||||
class DownloadExcel
|
||||
class Excel
|
||||
{
|
||||
public function download($projekts_id, $mode)
|
||||
{
|
||||
@@ -0,0 +1,64 @@
|
||||
<?php
|
||||
|
||||
namespace App\Actions\Download;
|
||||
|
||||
use App\Actions\Generate\MakeGutachten;
|
||||
use App\Models\Projekte;
|
||||
use Illuminate\Support\Facades\File;
|
||||
use Illuminate\Support\Facades\Response;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
|
||||
class Gutachten
|
||||
{
|
||||
public function download($projekts_id, $mode)
|
||||
{
|
||||
if ($mode == 'new') {
|
||||
Projekte::where('id', $projekts_id)->update(['pdf_gutachten_name' => '', 'pdf_gutachten_status' => '0']);
|
||||
}
|
||||
|
||||
$headers = [
|
||||
'Content-Type: application/pdf',
|
||||
'Cache-Control: max-age=0',
|
||||
'Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT',
|
||||
'Cache-Control: cache, must-revalidate',
|
||||
];
|
||||
|
||||
$projekt = Projekte::where('id', $projekts_id)->first()->toArray();
|
||||
|
||||
$filepath = Storage::disk('public')->path("/download/$projekts_id/");
|
||||
|
||||
$filename = 'Gutachten '.preg_replace("'[^0-9a-zA-Z]'", '', $projekt['interner_name']).'.pdf';
|
||||
|
||||
if (! File::isDirectory($filepath)) {
|
||||
File::makeDirectory($filepath, 0777, true, true);
|
||||
}
|
||||
$file = $filepath.$filename;
|
||||
|
||||
MakeGutachten::generate($file, $projekts_id);
|
||||
|
||||
return Response::download($file, $projekt['offizieller_name'], $headers);
|
||||
|
||||
// if ($projekt['pdf_standardtexte_ok'] == 0) {
|
||||
|
||||
// $filename = preg_replace("'[^0-9a-zA-Z]'", '', $projekt['interner_name']).'.pdf';
|
||||
|
||||
// if (! File::isDirectory($filepath)) {
|
||||
// File::makeDirectory($filepath, 0777, true, true);
|
||||
// }
|
||||
// $file = $filepath.$filename;
|
||||
|
||||
// MakeGutachten::generate($file, $projekts_id);
|
||||
|
||||
// Projekt::where('id', $projekts_id)->update(['pdf_standardtexte' => $filename, 'pdf_standardtexte_ok' => 1]);
|
||||
|
||||
// return Response::download($file, $projekt['name'], $headers);
|
||||
// } else {
|
||||
|
||||
// $filename = $projekt['pdf_standardtexte'];
|
||||
|
||||
// $file = $filepath.$filename;
|
||||
|
||||
// return Response::download($file, $projekt['name'], $headers);
|
||||
// }
|
||||
}
|
||||
}
|
||||
@@ -8,13 +8,13 @@ use Illuminate\Support\Facades\File;
|
||||
use Illuminate\Support\Facades\Response;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
|
||||
class DownloadNutzwerte
|
||||
class Nutzwerte
|
||||
{
|
||||
public function download($projekts_id, $mode)
|
||||
{
|
||||
|
||||
if ($mode == 'new') {
|
||||
Projekt::where('id', $projekts_id)->update(['pdf_nutzwerte' => '', 'pdf_nutzwerte_ok' => '0']);
|
||||
Projekt::where('id', $projekts_id)->update(['pdf_nutzwerte_name' => '', 'pdf_nutzwerte_status' => '0']);
|
||||
}
|
||||
|
||||
$headers = [
|
||||
@@ -24,11 +24,11 @@ class DownloadNutzwerte
|
||||
'Cache-Control: cache, must-revalidate',
|
||||
];
|
||||
|
||||
$projekt = Projekt::where('id', $projekts_id)->first()->toArray();
|
||||
$projekt = Projekte::where('id', $projekts_id)->first()->toArray();
|
||||
|
||||
$filepath = Storage::disk('public')->path("/download/$projekts_id/nutzwerte/");
|
||||
|
||||
if ($projekt['pdf_nutzwerte_ok'] == 0) {
|
||||
if ($projekt['pdf_nutzwerte_status'] == 0) {
|
||||
|
||||
$filename = preg_replace("'[^0-9a-zA-Z]'", '', $projekt['intname']).'.pdf';
|
||||
|
||||
@@ -45,7 +45,7 @@ class DownloadNutzwerte
|
||||
|
||||
} else {
|
||||
|
||||
$filename = $projekt['pdf_nutzwerte'];
|
||||
$filename = $projekt['pdf_nutzwerte_name'];
|
||||
|
||||
$file = $filepath.$filename;
|
||||
|
||||
@@ -1,250 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Actions\Generate;
|
||||
|
||||
use App\Actions\Generate\StandardTexte\AllgemeinTabelle;
|
||||
use App\Actions\Generate\StandardTexte\Deckblatt;
|
||||
use App\Actions\Generate\StandardTexte\Inhalt;
|
||||
use App\Actions\Generate\StandardTexte\Paragraph6Tabelle;
|
||||
use App\Actions\Generate\StandardTexte\Standardtext;
|
||||
use App\Actions\Generate\StandardTexte\Tabelle;
|
||||
use App\Models\Auftraggeber;
|
||||
use App\Models\Gutachter;
|
||||
use App\Models\Inhaltsverzeichnis;
|
||||
use App\Models\Platzhalter;
|
||||
use App\Models\Projekt;
|
||||
use Mpdf\HTMLParserMode;
|
||||
use Mpdf\Mpdf;
|
||||
|
||||
class GenerateStandardTexte
|
||||
{
|
||||
public static $projekt;
|
||||
|
||||
public static $gutachter;
|
||||
|
||||
public static $auftraggeber;
|
||||
|
||||
public static $platzhalter = [];
|
||||
|
||||
public static function generate($filepath, $projekts_id)
|
||||
{
|
||||
self::$projekt = Projekt::where('id', $projekts_id)->get()->first();
|
||||
self::$gutachter = Gutachter::where('id', self::$projekt->gutachters_id)->get()->first();
|
||||
self::$auftraggeber = Auftraggeber::where('id', self::$projekt->auftraggebers_id)->get()->first();
|
||||
self::$platzhalter = Platzhalter::where('projekts_id', $projekts_id)->pluck('platzhaltertext', 'platzhalter')->toArray();
|
||||
|
||||
$mpdf = new Mpdf(
|
||||
[
|
||||
'debug' => true,
|
||||
'mode' => 'utf-8',
|
||||
'format' => 'A4-P',
|
||||
'margin_left' => 10,
|
||||
'margin_right' => 10,
|
||||
'margin_top' => 12,
|
||||
'margin_bottom' => 20,
|
||||
'margin_header' => 0,
|
||||
'margin_footer' => 0,
|
||||
]
|
||||
);
|
||||
|
||||
$stylesheet = file_get_contents(__DIR__.'/../../../resources/css/pdf-download.css');
|
||||
$mpdf->WriteHTML($stylesheet, HTMLParserMode::HEADER_CSS);
|
||||
$mpdf->SetTitle('Nutzwertgutachen '.self::$projekt->name);
|
||||
|
||||
$mpdf->SetTitle('Standardtexte '.self::$projekt->name);
|
||||
$mpdf->SetCreator('www.nutzwertgutachten.at');
|
||||
$mpdf->SetAuthor(self::$gutachter->adressenblock);
|
||||
|
||||
$inhalte = Inhaltsverzeichnis::where('projekts_id', $projekts_id)->where('is_active', 1)->orderBy('pos')->get();
|
||||
if (count($inhalte) == 0) {
|
||||
exit;
|
||||
}
|
||||
foreach ($inhalte as $inhalt) {
|
||||
|
||||
$standardtext = Standardtext::replace($inhalt['standardtext']);
|
||||
|
||||
switch ($inhalt['kennung']) {
|
||||
|
||||
case 'deckblatt':
|
||||
$html = Deckblatt::load($standardtext);
|
||||
$mpdf->WriteHTML($html, HTMLParserMode::HTML_BODY);
|
||||
break;
|
||||
|
||||
case 'inhalt':
|
||||
if ($inhalt['neue_seite']) {
|
||||
$mpdf->AddPage();
|
||||
}
|
||||
$html = Inhalt::load($standardtext);
|
||||
$mpdf->WriteHTML($html, HTMLParserMode::HTML_BODY);
|
||||
$mpdf->SetHTMLFooter('<div class="size09 center">Seite {PAGENO}<br><br></div>');
|
||||
break;
|
||||
|
||||
case 'allgemeineangaben':
|
||||
if ($inhalt['neue_seite']) {
|
||||
$mpdf->AddPage();
|
||||
$mpdf->SetHTMLFooter('<div class="size09 center">Seite {PAGENO}<br><br></div>');
|
||||
}
|
||||
$html = '<div class="header">'.$inhalt['index'].' - '.$inhalt['titel'].'</div>';
|
||||
$mpdf->WriteHTML($html, HTMLParserMode::HTML_BODY);
|
||||
break;
|
||||
|
||||
case 'auftraggeber':
|
||||
if ($inhalt['neue_seite']) {
|
||||
$mpdf->AddPage();
|
||||
$mpdf->SetHTMLFooter('<div class="size09 center">Seite {PAGENO}<br><br></div>');
|
||||
}
|
||||
$html = '<div class="header">'.$inhalt['index'].' - '.$inhalt['titel'].'</div>';
|
||||
$html .= trim(self::$auftraggeber->adressenblock);
|
||||
$mpdf->WriteHTML($html, HTMLParserMode::HTML_BODY);
|
||||
break;
|
||||
|
||||
case 'zweck':
|
||||
if ($inhalt['neue_seite']) {
|
||||
$mpdf->AddPage();
|
||||
$mpdf->SetHTMLFooter('<div class="size09 center">Seite {PAGENO}<br><br></div>');
|
||||
}
|
||||
$html = '<div class="header">'.$inhalt['index'].' - '.$inhalt['titel'].'</div>';
|
||||
$html .= $standardtext;
|
||||
$mpdf->WriteHTML($html, HTMLParserMode::HTML_BODY);
|
||||
break;
|
||||
|
||||
case 'ortsbesichtigung':
|
||||
if ($inhalt['neue_seite']) {
|
||||
$mpdf->AddPage();
|
||||
$mpdf->SetHTMLFooter('<div class="size09 center">Seite {PAGENO}<br><br></div>');
|
||||
}
|
||||
$html = '<div class="header">'.$inhalt['index'].' - '.$inhalt['titel'].'</div>';
|
||||
$html .= $standardtext;
|
||||
$mpdf->WriteHTML($html, HTMLParserMode::HTML_BODY);
|
||||
break;
|
||||
|
||||
case 'unterlagen':
|
||||
if ($inhalt['neue_seite']) {
|
||||
$mpdf->AddPage();
|
||||
$mpdf->SetHTMLFooter('<div class="size09 center">Seite {PAGENO}<br><br></div>');
|
||||
}
|
||||
$html = '<div class="header">'.$inhalt['index'].' - '.$inhalt['titel'].'</div>';
|
||||
$html .= $standardtext;
|
||||
$mpdf->WriteHTML($html, HTMLParserMode::HTML_BODY);
|
||||
break;
|
||||
|
||||
case 'befund':
|
||||
if ($inhalt['neue_seite']) {
|
||||
$mpdf->AddPage();
|
||||
$mpdf->SetHTMLFooter('<div class="size09 center">Seite {PAGENO}<br><br></div>');
|
||||
}
|
||||
$html = '<div class="header">'.$inhalt['index'].' - '.$inhalt['titel'].'</div>';
|
||||
$mpdf->WriteHTML($html, HTMLParserMode::HTML_BODY);
|
||||
break;
|
||||
|
||||
case 'grundbuchstand':
|
||||
if ($inhalt['neue_seite']) {
|
||||
$mpdf->AddPage();
|
||||
$mpdf->SetHTMLFooter('<div class="size09 center">Seite {PAGENO}<br><br></div>');
|
||||
}
|
||||
$html = '<div class="header">'.$inhalt['index'].' - '.$inhalt['titel'].'</div>';
|
||||
$html .= Tabelle::load($standardtext);
|
||||
$mpdf->WriteHTML($html, HTMLParserMode::HTML_BODY);
|
||||
break;
|
||||
|
||||
case 'beschreibung':
|
||||
if ($inhalt['neue_seite']) {
|
||||
$mpdf->AddPage();
|
||||
$mpdf->SetHTMLFooter('<div class="size09 center">Seite {PAGENO}<br><br></div>');
|
||||
}
|
||||
$html = '<div class="header">'.$inhalt['index'].' - '.$inhalt['titel'].'</div>';
|
||||
$html .= $standardtext;
|
||||
$mpdf->WriteHTML($html, HTMLParserMode::HTML_BODY);
|
||||
break;
|
||||
|
||||
case 'paragraph_6_teil_1':
|
||||
if ($inhalt['neue_seite']) {
|
||||
$mpdf->AddPage();
|
||||
$mpdf->SetHTMLFooter('<div class="size09 center">Seite {PAGENO}<br><br></div>');
|
||||
}
|
||||
$html = '<div class="header">'.$inhalt['index'].' - '.$inhalt['titel'].'</div>';
|
||||
$html .= $standardtext;
|
||||
$mpdf->WriteHTML($html, HTMLParserMode::HTML_BODY);
|
||||
break;
|
||||
|
||||
case 'paragraph_6_tabelle':
|
||||
if ($inhalt['neue_seite']) {
|
||||
$mpdf->AddPage();
|
||||
}
|
||||
$mpdf->SetHTMLFooter('<div class="size09 center">Seite {PAGENO}<br><br></div>');
|
||||
$html = '<div class="header">'.$inhalt['index'].' - '.$inhalt['titel'].'</div>';
|
||||
$html = Paragraph6Tabelle::load($projekts_id);
|
||||
$mpdf->WriteHTML($html, HTMLParserMode::HTML_BODY);
|
||||
break;
|
||||
|
||||
case 'paragraph_6_teil_2':
|
||||
if ($inhalt['neue_seite']) {
|
||||
$mpdf->AddPage();
|
||||
$mpdf->SetHTMLFooter('<div class="size09 center">Seite {PAGENO}<br><br></div>');
|
||||
}
|
||||
$html = '<div class="header">'.$inhalt['index'].' - '.$inhalt['titel'].'</div>';
|
||||
$html .= $standardtext;
|
||||
$mpdf->WriteHTML($html, HTMLParserMode::HTML_BODY);
|
||||
break;
|
||||
|
||||
case 'allgemeinflaechen_nach_p6':
|
||||
if ($inhalt['neue_seite']) {
|
||||
$mpdf->AddPage();
|
||||
$mpdf->SetHTMLFooter('<div class="size09 center">Seite {PAGENO}<br><br></div>');
|
||||
}
|
||||
$html = '<div class="header">ALLGEMEINFLÄCHEN</div>';
|
||||
$html .= AllgemeinTabelle::load($projekts_id);
|
||||
$html .= '<br><br><br><br><br><br><br>';
|
||||
$html .= '<table class="inhalt"><tr>';
|
||||
$html .= '<td>'.self::$projekt->erstellung.'</td>';
|
||||
$html .= '<td class="right">'.self::$gutachter->kennung.'</td>';
|
||||
$html .= '</tr></table>';
|
||||
$mpdf->WriteHTML($html, HTMLParserMode::HTML_BODY);
|
||||
break;
|
||||
|
||||
case 'gutachten':
|
||||
if ($inhalt['neue_seite']) {
|
||||
$mpdf->AddPage();
|
||||
}
|
||||
$mpdf->SetHTMLFooter('<div class="size09 center">Seite {PAGENO}<br><br></div>');
|
||||
$html = '<div class="header">'.$inhalt['index'].' - '.$inhalt['titel'].'</div>';
|
||||
$mpdf->WriteHTML($html, HTMLParserMode::HTML_BODY);
|
||||
break;
|
||||
|
||||
case 'allgemeine-grundsaetze':
|
||||
if ($inhalt['neue_seite']) {
|
||||
$mpdf->AddPage();
|
||||
$mpdf->SetHTMLFooter('<div class="size09 center">Seite {PAGENO}<br><br></div>');
|
||||
}
|
||||
$html = '<div class="header">'.$inhalt['index'].' - '.$inhalt['titel'].'</div>';
|
||||
$html .= $standardtext;
|
||||
$mpdf->WriteHTML($html, HTMLParserMode::HTML_BODY);
|
||||
break;
|
||||
|
||||
case 'allgemeine-bewertungen':
|
||||
if ($inhalt['neue_seite']) {
|
||||
$mpdf->AddPage();
|
||||
$mpdf->SetHTMLFooter('<div class="size09 center">Seite {PAGENO}<br><br></div>');
|
||||
}
|
||||
$html = '<div class="header">'.$inhalt['index'].' - '.$inhalt['titel'].'</div>';
|
||||
$html .= $standardtext;
|
||||
$mpdf->WriteHTML($html, HTMLParserMode::HTML_BODY);
|
||||
break;
|
||||
|
||||
case 'zubehoer':
|
||||
if ($inhalt['neue_seite']) {
|
||||
$mpdf->AddPage();
|
||||
$mpdf->SetHTMLFooter('<div class="size09 center">Seite {PAGENO}<br><br></div>');
|
||||
}
|
||||
$html = '<div class="header">'.$inhalt['titel'].'</div>';
|
||||
$html .= $standardtext;
|
||||
$mpdf->WriteHTML($html, HTMLParserMode::HTML_BODY);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
ob_clean();
|
||||
|
||||
$mpdf->Output($filepath, 'F');
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace App\Actions\Generate\StandardTexte;
|
||||
namespace App\Actions\Generate\Gutachten;
|
||||
|
||||
use App\Models\Allgemeinflaechen;
|
||||
use App\Utilities\Html;
|
||||
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
namespace App\Actions\Generate\Gutachten;
|
||||
|
||||
use App\Actions\Generate\MakeGutachten;
|
||||
|
||||
class Deckblatt
|
||||
{
|
||||
public static function create()
|
||||
{
|
||||
// GUTACHTER
|
||||
|
||||
$html = '<div class="right">';
|
||||
$html .= '<p class="big">'.MakeGutachten::$gutachter->company.'</p>';
|
||||
$html .= '<p class="gray small">'.nl2br(MakeGutachten::$gutachter->address).'</p>';
|
||||
$html .= '</div>';
|
||||
|
||||
// if (MakeGutachten::$gutachter->kopf == 'adressenblock') {
|
||||
// $html .= '<div class="right">'.MakeGutachten::$gutachter->adressenblock.'</div>';
|
||||
// } elseif (MakeGutachten::$gutachter->kopf == 'logo') {
|
||||
// $html .= '<div class="right">';
|
||||
// $html .= '<img src="'.public_path().'/storage/'.MakeGutachten::$gutachter->clientlogo.'" style="width:'.MakeGutachten::$gutachter->breite.'mm; height: auto;">';
|
||||
// $html .= '</div>';
|
||||
// }
|
||||
// $html .= '</div>';
|
||||
|
||||
$html .= '<div class="title">Gutachten';
|
||||
$html .= '<div class="base ml-1 mt-2">'.trim(MakeGutachten::$projekt->interner_name).'</div>';
|
||||
$html .= '</div>';
|
||||
|
||||
$html .= '<div class="festsetzung">Zur Festsetzung der Nutzwerte';
|
||||
$html .= '<div class="base">'.trim(MakeGutachten::$projekt->offizieller_name).'</div>';
|
||||
$html .= '</div>';
|
||||
|
||||
// // AUFTRAGGEBER
|
||||
// $html .= '<div class="auftraggeber">';
|
||||
// $html .= MakeGutachten::$auftraggeber->adressenblock;
|
||||
|
||||
return $html;
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace App\Actions\Generate\StandardTexte;
|
||||
namespace App\Actions\Generate\Gutachten;
|
||||
|
||||
use App\Utilities\Html;
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace App\Actions\Generate\StandardTexte;
|
||||
namespace App\Actions\Generate\Gutachten;
|
||||
|
||||
use App\Utilities\Html;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace App\Actions\Generate\StandardTexte;
|
||||
namespace App\Actions\Generate\Gutachten;
|
||||
|
||||
use App\Actions\Generate\GenerateStandardTexte;
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace App\Actions\Generate\StandardTexte;
|
||||
namespace App\Actions\Generate\Gutachten;
|
||||
|
||||
use App\Utilities\Html;
|
||||
|
||||
@@ -10,7 +10,7 @@ use PhpOffice\PhpSpreadsheet\Spreadsheet;
|
||||
use PhpOffice\PhpSpreadsheet\Style\Border;
|
||||
use PhpOffice\PhpSpreadsheet\Style\Fill;
|
||||
|
||||
class GenerateExcel
|
||||
class MakeExcel
|
||||
{
|
||||
public static function generate($filepath, $projekts_id)
|
||||
{
|
||||
@@ -0,0 +1,260 @@
|
||||
<?php
|
||||
|
||||
namespace App\Actions\Generate;
|
||||
|
||||
use App\Actions\Generate\Gutachten\AllgemeinTabelle;
|
||||
use App\Actions\Generate\Gutachten\Deckblatt;
|
||||
use App\Actions\Generate\Gutachten\Inhalt;
|
||||
use App\Actions\Generate\Gutachten\Paragraph6Tabelle;
|
||||
use App\Actions\Generate\Gutachten\Standardtext;
|
||||
use App\Actions\Generate\Gutachten\Tabelle;
|
||||
use App\Models\Auftraggeber;
|
||||
use App\Models\Gutachter;
|
||||
use App\Models\Inhaltsverzeichnis;
|
||||
use App\Models\Platzhalter;
|
||||
use App\Models\Projekte;
|
||||
use Mpdf\HTMLParserMode;
|
||||
use Mpdf\Mpdf;
|
||||
|
||||
class MakeGutachten
|
||||
{
|
||||
public static $projekt;
|
||||
|
||||
public static $gutachter;
|
||||
|
||||
public static $auftraggeber;
|
||||
|
||||
public static $platzhalter = [];
|
||||
|
||||
public static function generate($filepath, $projekts_id)
|
||||
{
|
||||
|
||||
self::$projekt = Projekte::where('id', $projekts_id)->get()->first();
|
||||
|
||||
self::$gutachter = Gutachter::where('id', self::$projekt->gutachter_id)->get()->first();
|
||||
|
||||
self::$auftraggeber = Auftraggeber::where('id', self::$projekt->auftraggeber_id)->get()->first();
|
||||
|
||||
// self::$platzhalter = Platzhalter::where('projekts_id', $projekts_id)->pluck('platzhaltertext', 'platzhalter')->toArray();
|
||||
|
||||
$mpdf = new Mpdf(
|
||||
[
|
||||
'debug' => true,
|
||||
'mode' => 'utf-8',
|
||||
'format' => 'A4-P',
|
||||
'margin_left' => 15,
|
||||
'margin_right' => 10,
|
||||
'margin_top' => 10,
|
||||
'margin_bottom' => 10,
|
||||
'margin_header' => 0,
|
||||
'margin_footer' => 0,
|
||||
]
|
||||
);
|
||||
|
||||
$stylesheet = file_get_contents(__DIR__.'/../../../resources/css/pdf-download.css');
|
||||
$mpdf->WriteHTML($stylesheet, HTMLParserMode::HEADER_CSS);
|
||||
$mpdf->SetTitle('Nutzwertgutachen '.self::$projekt->offizieller_name);
|
||||
|
||||
$mpdf->SetTitle('Gutachten '.self::$projekt->offizieller_name);
|
||||
$mpdf->SetCreator('nutzwerte.at');
|
||||
$mpdf->SetAuthor(self::$gutachter->title.' '.self::$gutachter->gender.' '.self::$gutachter->name);
|
||||
|
||||
/**
|
||||
* DECKBLATT
|
||||
*/
|
||||
$html = Deckblatt::create();
|
||||
$mpdf->WriteHTML($html, HTMLParserMode::HTML_BODY);
|
||||
|
||||
// $inhalte = Inhaltsverzeichnis::where('projekts_id', $projekts_id)->where('is_active', 1)->orderBy('pos')->get();
|
||||
// if (count($inhalte) == 0) {
|
||||
// exit;
|
||||
// }
|
||||
// foreach ($inhalte as $inhalt) {
|
||||
|
||||
// $standardtext = Standardtext::replace($inhalt['standardtext']);
|
||||
|
||||
// switch ($inhalt['kennung']) {
|
||||
|
||||
// case 'deckblatt':
|
||||
// $html = Deckblatt::load($standardtext);
|
||||
// $mpdf->WriteHTML($html, HTMLParserMode::HTML_BODY);
|
||||
// break;
|
||||
|
||||
// case 'inhalt':
|
||||
// if ($inhalt['neue_seite']) {
|
||||
// $mpdf->AddPage();
|
||||
// }
|
||||
// $html = Inhalt::load($standardtext);
|
||||
// $mpdf->WriteHTML($html, HTMLParserMode::HTML_BODY);
|
||||
// $mpdf->SetHTMLFooter('<div class="size09 center">Seite {PAGENO}<br><br></div>');
|
||||
// break;
|
||||
|
||||
// case 'allgemeineangaben':
|
||||
// if ($inhalt['neue_seite']) {
|
||||
// $mpdf->AddPage();
|
||||
// $mpdf->SetHTMLFooter('<div class="size09 center">Seite {PAGENO}<br><br></div>');
|
||||
// }
|
||||
// $html = '<div class="header">'.$inhalt['index'].' - '.$inhalt['titel'].'</div>';
|
||||
// $mpdf->WriteHTML($html, HTMLParserMode::HTML_BODY);
|
||||
// break;
|
||||
|
||||
// case 'auftraggeber':
|
||||
// if ($inhalt['neue_seite']) {
|
||||
// $mpdf->AddPage();
|
||||
// $mpdf->SetHTMLFooter('<div class="size09 center">Seite {PAGENO}<br><br></div>');
|
||||
// }
|
||||
// $html = '<div class="header">'.$inhalt['index'].' - '.$inhalt['titel'].'</div>';
|
||||
// $html .= trim(self::self::$auftraggeber->adressenblock);
|
||||
// $mpdf->WriteHTML($html, HTMLParserMode::HTML_BODY);
|
||||
// break;
|
||||
|
||||
// case 'zweck':
|
||||
// if ($inhalt['neue_seite']) {
|
||||
// $mpdf->AddPage();
|
||||
// $mpdf->SetHTMLFooter('<div class="size09 center">Seite {PAGENO}<br><br></div>');
|
||||
// }
|
||||
// $html = '<div class="header">'.$inhalt['index'].' - '.$inhalt['titel'].'</div>';
|
||||
// $html .= $standardtext;
|
||||
// $mpdf->WriteHTML($html, HTMLParserMode::HTML_BODY);
|
||||
// break;
|
||||
|
||||
// case 'ortsbesichtigung':
|
||||
// if ($inhalt['neue_seite']) {
|
||||
// $mpdf->AddPage();
|
||||
// $mpdf->SetHTMLFooter('<div class="size09 center">Seite {PAGENO}<br><br></div>');
|
||||
// }
|
||||
// $html = '<div class="header">'.$inhalt['index'].' - '.$inhalt['titel'].'</div>';
|
||||
// $html .= $standardtext;
|
||||
// $mpdf->WriteHTML($html, HTMLParserMode::HTML_BODY);
|
||||
// break;
|
||||
|
||||
// case 'unterlagen':
|
||||
// if ($inhalt['neue_seite']) {
|
||||
// $mpdf->AddPage();
|
||||
// $mpdf->SetHTMLFooter('<div class="size09 center">Seite {PAGENO}<br><br></div>');
|
||||
// }
|
||||
// $html = '<div class="header">'.$inhalt['index'].' - '.$inhalt['titel'].'</div>';
|
||||
// $html .= $standardtext;
|
||||
// $mpdf->WriteHTML($html, HTMLParserMode::HTML_BODY);
|
||||
// break;
|
||||
|
||||
// case 'befund':
|
||||
// if ($inhalt['neue_seite']) {
|
||||
// $mpdf->AddPage();
|
||||
// $mpdf->SetHTMLFooter('<div class="size09 center">Seite {PAGENO}<br><br></div>');
|
||||
// }
|
||||
// $html = '<div class="header">'.$inhalt['index'].' - '.$inhalt['titel'].'</div>';
|
||||
// $mpdf->WriteHTML($html, HTMLParserMode::HTML_BODY);
|
||||
// break;
|
||||
|
||||
// case 'grundbuchstand':
|
||||
// if ($inhalt['neue_seite']) {
|
||||
// $mpdf->AddPage();
|
||||
// $mpdf->SetHTMLFooter('<div class="size09 center">Seite {PAGENO}<br><br></div>');
|
||||
// }
|
||||
// $html = '<div class="header">'.$inhalt['index'].' - '.$inhalt['titel'].'</div>';
|
||||
// $html .= Tabelle::load($standardtext);
|
||||
// $mpdf->WriteHTML($html, HTMLParserMode::HTML_BODY);
|
||||
// break;
|
||||
|
||||
// case 'beschreibung':
|
||||
// if ($inhalt['neue_seite']) {
|
||||
// $mpdf->AddPage();
|
||||
// $mpdf->SetHTMLFooter('<div class="size09 center">Seite {PAGENO}<br><br></div>');
|
||||
// }
|
||||
// $html = '<div class="header">'.$inhalt['index'].' - '.$inhalt['titel'].'</div>';
|
||||
// $html .= $standardtext;
|
||||
// $mpdf->WriteHTML($html, HTMLParserMode::HTML_BODY);
|
||||
// break;
|
||||
|
||||
// case 'paragraph_6_teil_1':
|
||||
// if ($inhalt['neue_seite']) {
|
||||
// $mpdf->AddPage();
|
||||
// $mpdf->SetHTMLFooter('<div class="size09 center">Seite {PAGENO}<br><br></div>');
|
||||
// }
|
||||
// $html = '<div class="header">'.$inhalt['index'].' - '.$inhalt['titel'].'</div>';
|
||||
// $html .= $standardtext;
|
||||
// $mpdf->WriteHTML($html, HTMLParserMode::HTML_BODY);
|
||||
// break;
|
||||
|
||||
// case 'paragraph_6_tabelle':
|
||||
// if ($inhalt['neue_seite']) {
|
||||
// $mpdf->AddPage();
|
||||
// }
|
||||
// $mpdf->SetHTMLFooter('<div class="size09 center">Seite {PAGENO}<br><br></div>');
|
||||
// $html = '<div class="header">'.$inhalt['index'].' - '.$inhalt['titel'].'</div>';
|
||||
// $html = Paragraph6Tabelle::load($projekts_id);
|
||||
// $mpdf->WriteHTML($html, HTMLParserMode::HTML_BODY);
|
||||
// break;
|
||||
|
||||
// case 'paragraph_6_teil_2':
|
||||
// if ($inhalt['neue_seite']) {
|
||||
// $mpdf->AddPage();
|
||||
// $mpdf->SetHTMLFooter('<div class="size09 center">Seite {PAGENO}<br><br></div>');
|
||||
// }
|
||||
// $html = '<div class="header">'.$inhalt['index'].' - '.$inhalt['titel'].'</div>';
|
||||
// $html .= $standardtext;
|
||||
// $mpdf->WriteHTML($html, HTMLParserMode::HTML_BODY);
|
||||
// break;
|
||||
|
||||
// case 'allgemeinflaechen_nach_p6':
|
||||
// if ($inhalt['neue_seite']) {
|
||||
// $mpdf->AddPage();
|
||||
// $mpdf->SetHTMLFooter('<div class="size09 center">Seite {PAGENO}<br><br></div>');
|
||||
// }
|
||||
// $html = '<div class="header">ALLGEMEINFLÄCHEN</div>';
|
||||
// $html .= AllgemeinTabelle::load($projekts_id);
|
||||
// $html .= '<br><br><br><br><br><br><br>';
|
||||
// $html .= '<table class="inhalt"><tr>';
|
||||
// $html .= '<td>'.self::$projekt->erstellung.'</td>';
|
||||
// $html .= '<td class="right">'.self::$gutachter->kennung.'</td>';
|
||||
// $html .= '</tr></table>';
|
||||
// $mpdf->WriteHTML($html, HTMLParserMode::HTML_BODY);
|
||||
// break;
|
||||
|
||||
// case 'gutachten':
|
||||
// if ($inhalt['neue_seite']) {
|
||||
// $mpdf->AddPage();
|
||||
// }
|
||||
// $mpdf->SetHTMLFooter('<div class="size09 center">Seite {PAGENO}<br><br></div>');
|
||||
// $html = '<div class="header">'.$inhalt['index'].' - '.$inhalt['titel'].'</div>';
|
||||
// $mpdf->WriteHTML($html, HTMLParserMode::HTML_BODY);
|
||||
// break;
|
||||
|
||||
// case 'allgemeine-grundsaetze':
|
||||
// if ($inhalt['neue_seite']) {
|
||||
// $mpdf->AddPage();
|
||||
// $mpdf->SetHTMLFooter('<div class="size09 center">Seite {PAGENO}<br><br></div>');
|
||||
// }
|
||||
// $html = '<div class="header">'.$inhalt['index'].' - '.$inhalt['titel'].'</div>';
|
||||
// $html .= $standardtext;
|
||||
// $mpdf->WriteHTML($html, HTMLParserMode::HTML_BODY);
|
||||
// break;
|
||||
|
||||
// case 'allgemeine-bewertungen':
|
||||
// if ($inhalt['neue_seite']) {
|
||||
// $mpdf->AddPage();
|
||||
// $mpdf->SetHTMLFooter('<div class="size09 center">Seite {PAGENO}<br><br></div>');
|
||||
// }
|
||||
// $html = '<div class="header">'.$inhalt['index'].' - '.$inhalt['titel'].'</div>';
|
||||
// $html .= $standardtext;
|
||||
// $mpdf->WriteHTML($html, HTMLParserMode::HTML_BODY);
|
||||
// break;
|
||||
|
||||
// case 'zubehoer':
|
||||
// if ($inhalt['neue_seite']) {
|
||||
// $mpdf->AddPage();
|
||||
// $mpdf->SetHTMLFooter('<div class="size09 center">Seite {PAGENO}<br><br></div>');
|
||||
// }
|
||||
// $html = '<div class="header">'.$inhalt['titel'].'</div>';
|
||||
// $html .= $standardtext;
|
||||
// $mpdf->WriteHTML($html, HTMLParserMode::HTML_BODY);
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
|
||||
ob_clean();
|
||||
|
||||
$mpdf->Output($filepath, 'F');
|
||||
}
|
||||
}
|
||||
@@ -16,7 +16,7 @@ use App\Models\Projekt;
|
||||
use Mpdf\HTMLParserMode;
|
||||
use Mpdf\Mpdf;
|
||||
|
||||
class GenerateNutzwerte
|
||||
class MakeNutzwerte
|
||||
{
|
||||
public static $projekt;
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Actions\Generate\StandardTexte;
|
||||
|
||||
use App\Actions\Generate\GenerateStandardTexte;
|
||||
|
||||
class Deckblatt
|
||||
{
|
||||
public static function load($standardtext)
|
||||
{
|
||||
// GUTACHTER
|
||||
$html = '<div class="deckblatt">';
|
||||
if (GenerateStandardTexte::$gutachter->kopf == 'adressenblock') {
|
||||
$html .= '<div class="right">'.GenerateStandardTexte::$gutachter->adressenblock.'</div>';
|
||||
} elseif (GenerateStandardTexte::$gutachter->kopf == 'logo') {
|
||||
$html .= '<div class="right">';
|
||||
$html .= '<img src="'.public_path().'/storage/'.GenerateStandardTexte::$gutachter->clientlogo.'" style="width:'.GenerateStandardTexte::$gutachter->breite.'mm; height: auto;">';
|
||||
$html .= '</div>';
|
||||
}
|
||||
$html .= '</div>';
|
||||
|
||||
// TITEL
|
||||
$html .= '<div class="title">Gutachten';
|
||||
$html .= '<div class="basetext">'.trim(GenerateStandardTexte::$projekt->name).'</div>';
|
||||
$html .= '</div>';
|
||||
|
||||
// PROJEKT
|
||||
$html .= '<div class="festsetzung">Zur Festsetzung der Nutzwerte';
|
||||
$html .= '<div class="basetext">'.trim($standardtext).'</div>';
|
||||
$html .= '</div>';
|
||||
|
||||
// AUFTRAGGEBER
|
||||
$html .= '<div class="auftraggeber">';
|
||||
$html .= GenerateStandardTexte::$auftraggeber->adressenblock;
|
||||
$html .= '</div>';
|
||||
|
||||
return $html;
|
||||
}
|
||||
}
|
||||
@@ -115,10 +115,6 @@ class Register extends BaseRegister
|
||||
Textarea::make('kontos.address')
|
||||
->label('Adresse')
|
||||
->required(),
|
||||
TextInput::make('kontos.country')
|
||||
->label('Land')
|
||||
->default('Österreich')
|
||||
->required(),
|
||||
])->columnSpan(4),
|
||||
Fieldset::make('Kontaktperson')
|
||||
->visible(fn (Get $get): bool => $get('register-modus') == 'new')
|
||||
|
||||
@@ -31,10 +31,6 @@ class AuftraggeberForm
|
||||
Textarea::make('address')
|
||||
->label('Adresse')
|
||||
->required(),
|
||||
TextInput::make('country')
|
||||
->label('Land')
|
||||
->default('Österreich')
|
||||
->required(),
|
||||
]),
|
||||
Tab::make('Kontaktperson')
|
||||
->icon('lucide-contact')
|
||||
|
||||
@@ -31,12 +31,8 @@ class GutachterForm
|
||||
Textarea::make('address')
|
||||
->label('Adresse')
|
||||
->required(),
|
||||
TextInput::make('country')
|
||||
->label('Land')
|
||||
->default('Österreich')
|
||||
->required(),
|
||||
]),
|
||||
Tab::make('Kontaktperson')
|
||||
Tab::make('Gutachter')
|
||||
->icon('lucide-contact')
|
||||
->inlineLabel()
|
||||
->schema([
|
||||
@@ -76,7 +72,7 @@ class GutachterForm
|
||||
'1:1',
|
||||
])
|
||||
->directory('gutachter-logo')
|
||||
->label('Gutachter Logo'),
|
||||
->label('Logo'),
|
||||
]),
|
||||
Tab::make('Anzeige Im Gutachten')
|
||||
->icon('phosphor-eye')
|
||||
@@ -85,9 +81,9 @@ class GutachterForm
|
||||
CheckboxList::make('kopf')
|
||||
->Label('Bitte auswählen')
|
||||
->options([
|
||||
'logo' => '<div class="flex gap-2"><svg xmlns="http://www.w3.org/2000/svg" width="16" fill="currentColor" viewBox="0 0 256 256"><path d="M104,40H56A16,16,0,0,0,40,56v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V56A16,16,0,0,0,104,40Zm0,64H56V56h48v48Zm96-64H152a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V56A16,16,0,0,0,200,40Zm0,64H152V56h48v48Zm-96,32H56a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V152A16,16,0,0,0,104,136Zm0,64H56V152h48v48Zm96-64H152a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V152A16,16,0,0,0,200,136Zm0,64H152V152h48v48Z"></path></svg>Logo des Gutachters</div>',
|
||||
'logo' => '<div class="flex gap-2"><svg xmlns="http://www.w3.org/2000/svg" width="16" fill="currentColor" viewBox="0 0 256 256"><path d="M104,40H56A16,16,0,0,0,40,56v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V56A16,16,0,0,0,104,40Zm0,64H56V56h48v48Zm96-64H152a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V56A16,16,0,0,0,200,40Zm0,64H152V56h48v48Zm-96,32H56a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V152A16,16,0,0,0,104,136Zm0,64H56V152h48v48Zm96-64H152a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V152A16,16,0,0,0,200,136Zm0,64H152V152h48v48Z"></path></svg>Logo</div>',
|
||||
'firma' => '<div class="flex gap-2"><svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-stamp-icon lucide-stamp"><path d="M14 13V8.5C14 7 15 7 15 5a3 3 0 0 0-6 0c0 2 1 2 1 3.5V13"/><path d="M20 15.5a2.5 2.5 0 0 0-2.5-2.5h-11A2.5 2.5 0 0 0 4 15.5V17a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1z"/><path d="M5 22h14"/></svg> Firma mit Adresse</div>',
|
||||
'name' => '<div class="flex gap-2"><svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-contact-icon lucide-contact"><path d="M16 2v2"/><path d="M7 22v-2a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v2"/><path d="M8 2v2"/><circle cx="12" cy="11" r="3"/><rect x="3" y="4" width="18" height="18" rx="2"/></svg> Name des Gutachters</div>',
|
||||
'name' => '<div class="flex gap-2"><svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-contact-icon lucide-contact"><path d="M16 2v2"/><path d="M7 22v-2a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v2"/><path d="M8 2v2"/><circle cx="12" cy="11" r="3"/><rect x="3" y="4" width="18" height="18" rx="2"/></svg>Gutachter</div>',
|
||||
])
|
||||
->allowHtml()
|
||||
->columnSpanFull(),
|
||||
|
||||
@@ -41,10 +41,6 @@ class KontoForm
|
||||
Textarea::make('address')
|
||||
->label('Adresse')
|
||||
->required(),
|
||||
TextInput::make('country')
|
||||
->label('Land')
|
||||
->default('Österreich')
|
||||
->required(),
|
||||
])->columnSpanFull(),
|
||||
Tab::make('Kontaktperson')
|
||||
->icon('lucide-contact')
|
||||
|
||||
@@ -15,40 +15,48 @@ class EditProjekte extends EditRecord
|
||||
protected function getHeaderActions(): array
|
||||
{
|
||||
return [
|
||||
Action::make('standardtexte')
|
||||
->label('Standard Texte')
|
||||
Action::make('gutachten')
|
||||
->disabled(fn ($record): bool => ! $record->pdf_gutachten_status)
|
||||
->color(fn ($record): string => match ($record->pdf_gutachten_status) {
|
||||
1 => 'info',
|
||||
default => 'gray',
|
||||
})
|
||||
->label('Gutachten')
|
||||
->icon('icon-pdf')
|
||||
->url(fn ($record) => route('standard.download', ['record' => $record, 'mode' => 'file']))
|
||||
->openUrlInNewTab(),
|
||||
Action::make('nutzwerte')
|
||||
->color('gray')
|
||||
->label('Nutzwerte')
|
||||
->icon('icon-pdf')
|
||||
->url(fn ($record) => route('nutzwerte.download', ['record' => $record, 'mode' => 'file']))
|
||||
->openUrlInNewTab(),
|
||||
Action::make('nutzwerte_excel')
|
||||
Action::make('excel')
|
||||
->color('gray')
|
||||
->label('Nutzdaten')
|
||||
->color('success')
|
||||
->icon('icon-excel')
|
||||
->url(fn ($record) => route('excel.download', ['record' => $record, 'mode' => 'file']))
|
||||
->openUrlInNewTab(),
|
||||
ActionGroup::make([
|
||||
Action::make('generator_standardtexte')
|
||||
->label('Standards Generieren')
|
||||
->icon('heroicon-o-cog-8-tooth')
|
||||
->url(fn ($record) => route('standard.download', ['record' => $record, 'mode' => 'new']))
|
||||
->openUrlInNewTab(),
|
||||
Action::make('generator_nutzwerte')
|
||||
->label('Nutzwerte Generieren')
|
||||
->icon('heroicon-o-cog-8-tooth')
|
||||
->url(fn ($record) => route('nutzwerte.download', ['record' => $record, 'mode' => 'new']))
|
||||
->openUrlInNewTab(),
|
||||
Action::make('nutzwerte_excel')
|
||||
->label('Excel Generieren')
|
||||
->icon('heroicon-o-cog-8-tooth')
|
||||
->url(fn ($record) => route('excel.download', ['record' => $record, 'mode' => 'new']))
|
||||
->openUrlInNewTab(),
|
||||
Action::make('make_gutachten')
|
||||
->label('Gutachten Erstellen')
|
||||
->icon('heroicon-o-cog-8-tooth')
|
||||
->url(fn ($record) => route('standard.download', ['record' => $record, 'mode' => 'new']))
|
||||
->openUrlInNewTab(),
|
||||
Action::make('make_nutzwerte')
|
||||
->label('Nutzwerte Erstellen')
|
||||
->icon('heroicon-o-cog-8-tooth')
|
||||
->url(fn ($record) => route('nutzwerte.download', ['record' => $record, 'mode' => 'new']))
|
||||
->openUrlInNewTab(),
|
||||
Action::make('make_excel')
|
||||
->label('Datenblatt Erstellen')
|
||||
->icon('heroicon-o-cog-8-tooth')
|
||||
->url(fn ($record) => route('excel.download', ['record' => $record, 'mode' => 'new']))
|
||||
->openUrlInNewTab(),
|
||||
DeleteAction::make()->label('Projekt löschen'),
|
||||
]),
|
||||
])->label('Berechnen')
|
||||
->icon('heroicon-m-ellipsis-vertical')
|
||||
->color('primary'),
|
||||
];
|
||||
}
|
||||
|
||||
@@ -56,12 +64,4 @@ class EditProjekte extends EditRecord
|
||||
{
|
||||
return 'Projekt Änderungen gespeichert';
|
||||
}
|
||||
|
||||
// protected function getFormActions(): array
|
||||
// {
|
||||
// return [
|
||||
// $this->getSaveFormAction()->label('Sichern'),
|
||||
// $this->getCancelFormAction()->label('Zurück zu Liste'),
|
||||
// ];
|
||||
// }
|
||||
}
|
||||
@@ -53,7 +53,10 @@ class RaeumeallesRelationManager extends RelationManager
|
||||
->striped()
|
||||
->recordTitleAttribute('top_nummer')
|
||||
->columns([
|
||||
TextColumn::make('top_nummer')->searchable()->label('Top'),
|
||||
TextColumn::make('top_nummer')
|
||||
->extraAttributes(['pointer-events' => 'none'])
|
||||
->searchable()
|
||||
->label('Top'),
|
||||
TextColumn::make('geschoss')->searchable(),
|
||||
TextColumn::make('raumart')->searchable(),
|
||||
TextInputColumn::make('faktor')
|
||||
|
||||
@@ -20,7 +20,6 @@ class Auftraggeber extends Model
|
||||
'company',
|
||||
'logo',
|
||||
'address',
|
||||
'country',
|
||||
'email',
|
||||
'phone',
|
||||
'use_logo',
|
||||
|
||||
@@ -20,7 +20,6 @@ class Gutachter extends Model
|
||||
'company',
|
||||
'logo',
|
||||
'address',
|
||||
'country',
|
||||
'email',
|
||||
'phone',
|
||||
'use_logo',
|
||||
|
||||
@@ -24,7 +24,6 @@ class Konto extends Model
|
||||
'company',
|
||||
'email',
|
||||
'address',
|
||||
'country',
|
||||
'phone',
|
||||
'uid_number',
|
||||
'plan_id',
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Policies;
|
||||
|
||||
use Illuminate\Foundation\Auth\User as AuthUser;
|
||||
use App\Models\KontoTextblock;
|
||||
use Illuminate\Auth\Access\HandlesAuthorization;
|
||||
|
||||
class KontoTextblockPolicy
|
||||
{
|
||||
use HandlesAuthorization;
|
||||
|
||||
public function viewAny(AuthUser $authUser): bool
|
||||
{
|
||||
return $authUser->can('ViewAny:KontoTextblock');
|
||||
}
|
||||
|
||||
public function view(AuthUser $authUser, KontoTextblock $kontoTextblock): bool
|
||||
{
|
||||
return $authUser->can('View:KontoTextblock');
|
||||
}
|
||||
|
||||
public function create(AuthUser $authUser): bool
|
||||
{
|
||||
return $authUser->can('Create:KontoTextblock');
|
||||
}
|
||||
|
||||
public function update(AuthUser $authUser, KontoTextblock $kontoTextblock): bool
|
||||
{
|
||||
return $authUser->can('Update:KontoTextblock');
|
||||
}
|
||||
|
||||
public function delete(AuthUser $authUser, KontoTextblock $kontoTextblock): bool
|
||||
{
|
||||
return $authUser->can('Delete:KontoTextblock');
|
||||
}
|
||||
|
||||
public function restore(AuthUser $authUser, KontoTextblock $kontoTextblock): bool
|
||||
{
|
||||
return $authUser->can('Restore:KontoTextblock');
|
||||
}
|
||||
|
||||
public function forceDelete(AuthUser $authUser, KontoTextblock $kontoTextblock): bool
|
||||
{
|
||||
return $authUser->can('ForceDelete:KontoTextblock');
|
||||
}
|
||||
|
||||
public function forceDeleteAny(AuthUser $authUser): bool
|
||||
{
|
||||
return $authUser->can('ForceDeleteAny:KontoTextblock');
|
||||
}
|
||||
|
||||
public function restoreAny(AuthUser $authUser): bool
|
||||
{
|
||||
return $authUser->can('RestoreAny:KontoTextblock');
|
||||
}
|
||||
|
||||
public function replicate(AuthUser $authUser, KontoTextblock $kontoTextblock): bool
|
||||
{
|
||||
return $authUser->can('Replicate:KontoTextblock');
|
||||
}
|
||||
|
||||
public function reorder(AuthUser $authUser): bool
|
||||
{
|
||||
return $authUser->can('Reorder:KontoTextblock');
|
||||
}
|
||||
|
||||
}
|
||||
Vendored
+9
@@ -1,4 +1,13 @@
|
||||
<?php return array (
|
||||
'default' =>
|
||||
array (
|
||||
'/Users/hermanntelser/Sites/nutzwerte_fi4/resources/svg' =>
|
||||
array (
|
||||
0 => 'excel',
|
||||
1 => 'logo',
|
||||
2 => 'pdf',
|
||||
),
|
||||
),
|
||||
'heroicons' =>
|
||||
array (
|
||||
'/Users/hermanntelser/Sites/nutzwerte_fi4/vendor/blade-ui-kit/blade-heroicons/src/../resources/svg' =>
|
||||
|
||||
Vendored
+29
-18
@@ -124,9 +124,9 @@
|
||||
'timezone' => 'UTC',
|
||||
'locale' => 'de',
|
||||
'fallback_locale' => 'en',
|
||||
'faker_locale' => 'at_AT',
|
||||
'faker_locale' => 'de_AT',
|
||||
'cipher' => 'AES-256-CBC',
|
||||
'key' => 'base64:yRi9h21i7xAkGpeF7JoArovQJU1w6xwczQ6ijpYpJrs=',
|
||||
'key' => 'base64:3uv/ppXplpqmYtiZ5ZyILnoOTmKfZAz27bfsnR1qmaE=',
|
||||
'previous_keys' =>
|
||||
array (
|
||||
),
|
||||
@@ -248,6 +248,33 @@
|
||||
),
|
||||
'password_timeout' => 10800,
|
||||
),
|
||||
'blade-icons' =>
|
||||
array (
|
||||
'sets' =>
|
||||
array (
|
||||
'default' =>
|
||||
array (
|
||||
'path' => 'resources/svg',
|
||||
'disk' => '',
|
||||
'prefix' => 'icon',
|
||||
'fallback' => '',
|
||||
'class' => '',
|
||||
'attributes' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
),
|
||||
'class' => '',
|
||||
'attributes' =>
|
||||
array (
|
||||
),
|
||||
'fallback' => '',
|
||||
'components' =>
|
||||
array (
|
||||
'disabled' => false,
|
||||
'default' => 'icon',
|
||||
),
|
||||
),
|
||||
'cache' =>
|
||||
array (
|
||||
'default' => 'database',
|
||||
@@ -1016,22 +1043,6 @@
|
||||
array (
|
||||
),
|
||||
),
|
||||
'blade-icons' =>
|
||||
array (
|
||||
'sets' =>
|
||||
array (
|
||||
),
|
||||
'class' => '',
|
||||
'attributes' =>
|
||||
array (
|
||||
),
|
||||
'fallback' => '',
|
||||
'components' =>
|
||||
array (
|
||||
'disabled' => false,
|
||||
'default' => 'icon',
|
||||
),
|
||||
),
|
||||
'blade-phosphor-icons' =>
|
||||
array (
|
||||
'prefix' => 'phosphor',
|
||||
|
||||
Vendored
+222
-36
@@ -531,7 +531,7 @@ app('router')->setCompiledRoutes(
|
||||
array (
|
||||
0 =>
|
||||
array (
|
||||
'_route' => 'generated::nhkspirB08wPcEqX',
|
||||
'_route' => 'generated::veIjWBrdBWrIMC8t',
|
||||
),
|
||||
1 => NULL,
|
||||
2 =>
|
||||
@@ -551,7 +551,7 @@ app('router')->setCompiledRoutes(
|
||||
array (
|
||||
0 =>
|
||||
array (
|
||||
'_route' => 'generated::0ZTEqfES7Kdi161v',
|
||||
'_route' => 'generated::muSK0SQhbdwIoCYo',
|
||||
),
|
||||
1 => NULL,
|
||||
2 =>
|
||||
@@ -609,7 +609,7 @@ app('router')->setCompiledRoutes(
|
||||
array (
|
||||
0 =>
|
||||
array (
|
||||
'_route' => 'generated::uvB5MUuG5RfsaOV2',
|
||||
'_route' => 'generated::0bUCD3kvi7kZPEzz',
|
||||
),
|
||||
1 => NULL,
|
||||
2 =>
|
||||
@@ -629,7 +629,7 @@ app('router')->setCompiledRoutes(
|
||||
array (
|
||||
0 =>
|
||||
array (
|
||||
'_route' => 'generated::AVv0QYbNzkUoiFdJ',
|
||||
'_route' => 'generated::4mvgzXznCYOJRrHd',
|
||||
),
|
||||
1 => NULL,
|
||||
2 =>
|
||||
@@ -649,7 +649,7 @@ app('router')->setCompiledRoutes(
|
||||
array (
|
||||
0 =>
|
||||
array (
|
||||
'_route' => 'generated::AuyL1OA8uHrzBpon',
|
||||
'_route' => 'generated::vN8kq9ib2yxLbjiy',
|
||||
),
|
||||
1 => NULL,
|
||||
2 =>
|
||||
@@ -669,7 +669,7 @@ app('router')->setCompiledRoutes(
|
||||
array (
|
||||
0 =>
|
||||
array (
|
||||
'_route' => 'generated::l6oTxL1NqW6yBegd',
|
||||
'_route' => 'generated::TYNHx7Avrc44zPUT',
|
||||
),
|
||||
1 => NULL,
|
||||
2 =>
|
||||
@@ -689,7 +689,7 @@ app('router')->setCompiledRoutes(
|
||||
array (
|
||||
0 =>
|
||||
array (
|
||||
'_route' => 'generated::q9BkNRCuUHnyFeYH',
|
||||
'_route' => 'generated::xtVGH3JdXqIkaMQk',
|
||||
),
|
||||
1 => NULL,
|
||||
2 =>
|
||||
@@ -706,7 +706,7 @@ app('router')->setCompiledRoutes(
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
0 => '{^(?|/filament/(?|exports/([^/]++)/download(*:45)|imports/([^/]++)/failed\\-rows/download(*:90))|/app/(?|email\\-(?|verification/verify/([^/]++)/([^/]++)(*:153)|change\\-verification/verify/([^/]++)/([^/]++)(?|(*:209)|/block(*:223)))|projektes/([^/]++)/edit(*:256)|administration/shield/roles/([^/]++)(?|(*:303)|/edit(*:316)))|/livewire/preview\\-file/([^/]++)(*:358)|/storage/(.*)(*:379))/?$}sDu',
|
||||
0 => '{^(?|/filament/(?|exports/([^/]++)/download(*:45)|imports/([^/]++)/failed\\-rows/download(*:90))|/app/(?|e(?|mail\\-(?|verification/verify/([^/]++)/([^/]++)(*:156)|change\\-verification/verify/([^/]++)/([^/]++)(?|(*:212)|/block(*:226)))|xcel/([^/]++)/([^/]++)/download(*:267))|projektes/([^/]++)/edit(*:299)|administration/shield/roles/([^/]++)(?|(*:346)|/edit(*:359))|nutzwerte/([^/]++)/([^/]++)/download(*:404)|standard/([^/]++)/([^/]++)/download(*:447))|/livewire/preview\\-file/([^/]++)(*:488)|/storage/(.*)(*:509))/?$}sDu',
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
@@ -756,7 +756,7 @@ app('router')->setCompiledRoutes(
|
||||
6 => NULL,
|
||||
),
|
||||
),
|
||||
153 =>
|
||||
156 =>
|
||||
array (
|
||||
0 =>
|
||||
array (
|
||||
@@ -780,7 +780,7 @@ app('router')->setCompiledRoutes(
|
||||
6 => NULL,
|
||||
),
|
||||
),
|
||||
209 =>
|
||||
212 =>
|
||||
array (
|
||||
0 =>
|
||||
array (
|
||||
@@ -804,7 +804,7 @@ app('router')->setCompiledRoutes(
|
||||
6 => NULL,
|
||||
),
|
||||
),
|
||||
223 =>
|
||||
226 =>
|
||||
array (
|
||||
0 =>
|
||||
array (
|
||||
@@ -828,7 +828,31 @@ app('router')->setCompiledRoutes(
|
||||
6 => NULL,
|
||||
),
|
||||
),
|
||||
256 =>
|
||||
267 =>
|
||||
array (
|
||||
0 =>
|
||||
array (
|
||||
0 =>
|
||||
array (
|
||||
'_route' => 'excel.download',
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
0 => 'record',
|
||||
1 => 'mode',
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
'GET' => 0,
|
||||
'HEAD' => 1,
|
||||
),
|
||||
3 => NULL,
|
||||
4 => false,
|
||||
5 => false,
|
||||
6 => NULL,
|
||||
),
|
||||
),
|
||||
299 =>
|
||||
array (
|
||||
0 =>
|
||||
array (
|
||||
@@ -851,7 +875,7 @@ app('router')->setCompiledRoutes(
|
||||
6 => NULL,
|
||||
),
|
||||
),
|
||||
303 =>
|
||||
346 =>
|
||||
array (
|
||||
0 =>
|
||||
array (
|
||||
@@ -874,7 +898,7 @@ app('router')->setCompiledRoutes(
|
||||
6 => NULL,
|
||||
),
|
||||
),
|
||||
316 =>
|
||||
359 =>
|
||||
array (
|
||||
0 =>
|
||||
array (
|
||||
@@ -897,7 +921,55 @@ app('router')->setCompiledRoutes(
|
||||
6 => NULL,
|
||||
),
|
||||
),
|
||||
358 =>
|
||||
404 =>
|
||||
array (
|
||||
0 =>
|
||||
array (
|
||||
0 =>
|
||||
array (
|
||||
'_route' => 'nutzwerte.download',
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
0 => 'record',
|
||||
1 => 'mode',
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
'GET' => 0,
|
||||
'HEAD' => 1,
|
||||
),
|
||||
3 => NULL,
|
||||
4 => false,
|
||||
5 => false,
|
||||
6 => NULL,
|
||||
),
|
||||
),
|
||||
447 =>
|
||||
array (
|
||||
0 =>
|
||||
array (
|
||||
0 =>
|
||||
array (
|
||||
'_route' => 'standard.download',
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
0 => 'record',
|
||||
1 => 'mode',
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
'GET' => 0,
|
||||
'HEAD' => 1,
|
||||
),
|
||||
3 => NULL,
|
||||
4 => false,
|
||||
5 => false,
|
||||
6 => NULL,
|
||||
),
|
||||
),
|
||||
488 =>
|
||||
array (
|
||||
0 =>
|
||||
array (
|
||||
@@ -920,7 +992,7 @@ app('router')->setCompiledRoutes(
|
||||
6 => NULL,
|
||||
),
|
||||
),
|
||||
379 =>
|
||||
509 =>
|
||||
array (
|
||||
0 =>
|
||||
array (
|
||||
@@ -2668,7 +2740,7 @@ app('router')->setCompiledRoutes(
|
||||
'waitSeconds' => NULL,
|
||||
'withTrashed' => false,
|
||||
),
|
||||
'generated::nhkspirB08wPcEqX' =>
|
||||
'generated::veIjWBrdBWrIMC8t' =>
|
||||
array (
|
||||
'methods' =>
|
||||
array (
|
||||
@@ -2680,7 +2752,7 @@ app('router')->setCompiledRoutes(
|
||||
array (
|
||||
'uses' => 'Livewire\\Mechanisms\\FrontendAssets\\FrontendAssets@returnJavaScriptAsFile',
|
||||
'controller' => 'Livewire\\Mechanisms\\FrontendAssets\\FrontendAssets@returnJavaScriptAsFile',
|
||||
'as' => 'generated::nhkspirB08wPcEqX',
|
||||
'as' => 'generated::veIjWBrdBWrIMC8t',
|
||||
),
|
||||
'fallback' => false,
|
||||
'defaults' =>
|
||||
@@ -2696,7 +2768,7 @@ app('router')->setCompiledRoutes(
|
||||
'waitSeconds' => NULL,
|
||||
'withTrashed' => false,
|
||||
),
|
||||
'generated::0ZTEqfES7Kdi161v' =>
|
||||
'generated::muSK0SQhbdwIoCYo' =>
|
||||
array (
|
||||
'methods' =>
|
||||
array (
|
||||
@@ -2708,7 +2780,7 @@ app('router')->setCompiledRoutes(
|
||||
array (
|
||||
'uses' => 'Livewire\\Mechanisms\\FrontendAssets\\FrontendAssets@maps',
|
||||
'controller' => 'Livewire\\Mechanisms\\FrontendAssets\\FrontendAssets@maps',
|
||||
'as' => 'generated::0ZTEqfES7Kdi161v',
|
||||
'as' => 'generated::muSK0SQhbdwIoCYo',
|
||||
),
|
||||
'fallback' => false,
|
||||
'defaults' =>
|
||||
@@ -2810,7 +2882,7 @@ app('router')->setCompiledRoutes(
|
||||
'waitSeconds' => NULL,
|
||||
'withTrashed' => false,
|
||||
),
|
||||
'generated::uvB5MUuG5RfsaOV2' =>
|
||||
'generated::0bUCD3kvi7kZPEzz' =>
|
||||
array (
|
||||
'methods' =>
|
||||
array (
|
||||
@@ -2838,8 +2910,8 @@ app('router')->setCompiledRoutes(
|
||||
return response(\\Illuminate\\Support\\Facades\\View::file(\'/Users/hermanntelser/Sites/nutzwerte_fi4/vendor/laravel/framework/src/Illuminate/Foundation/Configuration\'.\'/../resources/health-up.blade.php\', [
|
||||
\'exception\' => $exception,
|
||||
]), status: $exception ? 500 : 200);
|
||||
}";s:5:"scope";s:54:"Illuminate\\Foundation\\Configuration\\ApplicationBuilder";s:4:"this";N;s:4:"self";s:32:"0000000000000f300000000000000000";}}',
|
||||
'as' => 'generated::uvB5MUuG5RfsaOV2',
|
||||
}";s:5:"scope";s:54:"Illuminate\\Foundation\\Configuration\\ApplicationBuilder";s:4:"this";N;s:4:"self";s:32:"0000000000000f360000000000000000";}}',
|
||||
'as' => 'generated::0bUCD3kvi7kZPEzz',
|
||||
),
|
||||
'fallback' => false,
|
||||
'defaults' =>
|
||||
@@ -2855,7 +2927,7 @@ app('router')->setCompiledRoutes(
|
||||
'waitSeconds' => NULL,
|
||||
'withTrashed' => false,
|
||||
),
|
||||
'generated::AVv0QYbNzkUoiFdJ' =>
|
||||
'generated::4mvgzXznCYOJRrHd' =>
|
||||
array (
|
||||
'methods' =>
|
||||
array (
|
||||
@@ -2871,13 +2943,13 @@ app('router')->setCompiledRoutes(
|
||||
),
|
||||
'uses' => 'O:55:"Laravel\\SerializableClosure\\UnsignedSerializableClosure":1:{s:12:"serializable";O:46:"Laravel\\SerializableClosure\\Serializers\\Native":5:{s:3:"use";a:0:{}s:8:"function";s:50:"function () {
|
||||
return \\view(\'pages.welcome\');
|
||||
}";s:5:"scope";s:37:"Illuminate\\Routing\\RouteFileRegistrar";s:4:"this";N;s:4:"self";s:32:"0000000000000f370000000000000000";}}',
|
||||
}";s:5:"scope";s:37:"Illuminate\\Routing\\RouteFileRegistrar";s:4:"this";N;s:4:"self";s:32:"0000000000000f3d0000000000000000";}}',
|
||||
'namespace' => NULL,
|
||||
'prefix' => '',
|
||||
'where' =>
|
||||
array (
|
||||
),
|
||||
'as' => 'generated::AVv0QYbNzkUoiFdJ',
|
||||
'as' => 'generated::4mvgzXznCYOJRrHd',
|
||||
),
|
||||
'fallback' => false,
|
||||
'defaults' =>
|
||||
@@ -2893,7 +2965,7 @@ app('router')->setCompiledRoutes(
|
||||
'waitSeconds' => NULL,
|
||||
'withTrashed' => false,
|
||||
),
|
||||
'generated::AuyL1OA8uHrzBpon' =>
|
||||
'generated::vN8kq9ib2yxLbjiy' =>
|
||||
array (
|
||||
'methods' =>
|
||||
array (
|
||||
@@ -2909,13 +2981,13 @@ app('router')->setCompiledRoutes(
|
||||
),
|
||||
'uses' => 'O:55:"Laravel\\SerializableClosure\\UnsignedSerializableClosure":1:{s:12:"serializable";O:46:"Laravel\\SerializableClosure\\Serializers\\Native":5:{s:3:"use";a:0:{}s:8:"function";s:52:"function () {
|
||||
return \\view(\'pages.nutzwerte\');
|
||||
}";s:5:"scope";s:37:"Illuminate\\Routing\\RouteFileRegistrar";s:4:"this";N;s:4:"self";s:32:"0000000000000f390000000000000000";}}',
|
||||
}";s:5:"scope";s:37:"Illuminate\\Routing\\RouteFileRegistrar";s:4:"this";N;s:4:"self";s:32:"0000000000000f3f0000000000000000";}}',
|
||||
'namespace' => NULL,
|
||||
'prefix' => '',
|
||||
'where' =>
|
||||
array (
|
||||
),
|
||||
'as' => 'generated::AuyL1OA8uHrzBpon',
|
||||
'as' => 'generated::vN8kq9ib2yxLbjiy',
|
||||
),
|
||||
'fallback' => false,
|
||||
'defaults' =>
|
||||
@@ -2931,7 +3003,7 @@ app('router')->setCompiledRoutes(
|
||||
'waitSeconds' => NULL,
|
||||
'withTrashed' => false,
|
||||
),
|
||||
'generated::l6oTxL1NqW6yBegd' =>
|
||||
'generated::TYNHx7Avrc44zPUT' =>
|
||||
array (
|
||||
'methods' =>
|
||||
array (
|
||||
@@ -2947,13 +3019,13 @@ app('router')->setCompiledRoutes(
|
||||
),
|
||||
'uses' => 'O:55:"Laravel\\SerializableClosure\\UnsignedSerializableClosure":1:{s:12:"serializable";O:46:"Laravel\\SerializableClosure\\Serializers\\Native":5:{s:3:"use";a:0:{}s:8:"function";s:51:"function () {
|
||||
return \\view(\'pages.programm\');
|
||||
}";s:5:"scope";s:37:"Illuminate\\Routing\\RouteFileRegistrar";s:4:"this";N;s:4:"self";s:32:"0000000000000f3b0000000000000000";}}',
|
||||
}";s:5:"scope";s:37:"Illuminate\\Routing\\RouteFileRegistrar";s:4:"this";N;s:4:"self";s:32:"0000000000000f410000000000000000";}}',
|
||||
'namespace' => NULL,
|
||||
'prefix' => '',
|
||||
'where' =>
|
||||
array (
|
||||
),
|
||||
'as' => 'generated::l6oTxL1NqW6yBegd',
|
||||
'as' => 'generated::TYNHx7Avrc44zPUT',
|
||||
),
|
||||
'fallback' => false,
|
||||
'defaults' =>
|
||||
@@ -2969,7 +3041,7 @@ app('router')->setCompiledRoutes(
|
||||
'waitSeconds' => NULL,
|
||||
'withTrashed' => false,
|
||||
),
|
||||
'generated::q9BkNRCuUHnyFeYH' =>
|
||||
'generated::xtVGH3JdXqIkaMQk' =>
|
||||
array (
|
||||
'methods' =>
|
||||
array (
|
||||
@@ -2985,13 +3057,127 @@ app('router')->setCompiledRoutes(
|
||||
),
|
||||
'uses' => 'O:55:"Laravel\\SerializableClosure\\UnsignedSerializableClosure":1:{s:12:"serializable";O:46:"Laravel\\SerializableClosure\\Serializers\\Native":5:{s:3:"use";a:0:{}s:8:"function";s:52:"function () {
|
||||
return \\view(\'pages.impressum\');
|
||||
}";s:5:"scope";s:37:"Illuminate\\Routing\\RouteFileRegistrar";s:4:"this";N;s:4:"self";s:32:"0000000000000f3d0000000000000000";}}',
|
||||
}";s:5:"scope";s:37:"Illuminate\\Routing\\RouteFileRegistrar";s:4:"this";N;s:4:"self";s:32:"0000000000000f430000000000000000";}}',
|
||||
'namespace' => NULL,
|
||||
'prefix' => '',
|
||||
'where' =>
|
||||
array (
|
||||
),
|
||||
'as' => 'generated::q9BkNRCuUHnyFeYH',
|
||||
'as' => 'generated::xtVGH3JdXqIkaMQk',
|
||||
),
|
||||
'fallback' => false,
|
||||
'defaults' =>
|
||||
array (
|
||||
),
|
||||
'wheres' =>
|
||||
array (
|
||||
),
|
||||
'bindingFields' =>
|
||||
array (
|
||||
),
|
||||
'lockSeconds' => NULL,
|
||||
'waitSeconds' => NULL,
|
||||
'withTrashed' => false,
|
||||
),
|
||||
'nutzwerte.download' =>
|
||||
array (
|
||||
'methods' =>
|
||||
array (
|
||||
0 => 'GET',
|
||||
1 => 'HEAD',
|
||||
),
|
||||
'uri' => 'app/nutzwerte/{record}/{mode}/download',
|
||||
'action' =>
|
||||
array (
|
||||
'middleware' =>
|
||||
array (
|
||||
0 => 'web',
|
||||
1 => 'Filament\\Http\\Middleware\\Authenticate',
|
||||
),
|
||||
'uses' => '\\App\\Actions\\Download\\Nutzwerte@download',
|
||||
'controller' => '\\App\\Actions\\Download\\Nutzwerte@download',
|
||||
'namespace' => NULL,
|
||||
'prefix' => '',
|
||||
'where' =>
|
||||
array (
|
||||
),
|
||||
'as' => 'nutzwerte.download',
|
||||
),
|
||||
'fallback' => false,
|
||||
'defaults' =>
|
||||
array (
|
||||
),
|
||||
'wheres' =>
|
||||
array (
|
||||
),
|
||||
'bindingFields' =>
|
||||
array (
|
||||
),
|
||||
'lockSeconds' => NULL,
|
||||
'waitSeconds' => NULL,
|
||||
'withTrashed' => false,
|
||||
),
|
||||
'standard.download' =>
|
||||
array (
|
||||
'methods' =>
|
||||
array (
|
||||
0 => 'GET',
|
||||
1 => 'HEAD',
|
||||
),
|
||||
'uri' => 'app/standard/{record}/{mode}/download',
|
||||
'action' =>
|
||||
array (
|
||||
'middleware' =>
|
||||
array (
|
||||
0 => 'web',
|
||||
1 => 'Filament\\Http\\Middleware\\Authenticate',
|
||||
),
|
||||
'uses' => '\\App\\Actions\\Download\\Gutachten@download',
|
||||
'controller' => '\\App\\Actions\\Download\\Gutachten@download',
|
||||
'namespace' => NULL,
|
||||
'prefix' => '',
|
||||
'where' =>
|
||||
array (
|
||||
),
|
||||
'as' => 'standard.download',
|
||||
),
|
||||
'fallback' => false,
|
||||
'defaults' =>
|
||||
array (
|
||||
),
|
||||
'wheres' =>
|
||||
array (
|
||||
),
|
||||
'bindingFields' =>
|
||||
array (
|
||||
),
|
||||
'lockSeconds' => NULL,
|
||||
'waitSeconds' => NULL,
|
||||
'withTrashed' => false,
|
||||
),
|
||||
'excel.download' =>
|
||||
array (
|
||||
'methods' =>
|
||||
array (
|
||||
0 => 'GET',
|
||||
1 => 'HEAD',
|
||||
),
|
||||
'uri' => 'app/excel/{record}/{mode}/download',
|
||||
'action' =>
|
||||
array (
|
||||
'middleware' =>
|
||||
array (
|
||||
0 => 'web',
|
||||
1 => 'Filament\\Http\\Middleware\\Authenticate',
|
||||
),
|
||||
'uses' => '\\App\\Actions\\Download\\Excel@download',
|
||||
'controller' => '\\App\\Actions\\Download\\Excel@download',
|
||||
'namespace' => NULL,
|
||||
'prefix' => '',
|
||||
'where' =>
|
||||
array (
|
||||
),
|
||||
'as' => 'excel.download',
|
||||
),
|
||||
'fallback' => false,
|
||||
'defaults' =>
|
||||
@@ -3023,7 +3209,7 @@ app('router')->setCompiledRoutes(
|
||||
$config,
|
||||
$isProduction
|
||||
))($request, $path);
|
||||
}";s:5:"scope";s:47:"Illuminate\\Filesystem\\FilesystemServiceProvider";s:4:"this";N;s:4:"self";s:32:"0000000000000f400000000000000000";}}',
|
||||
}";s:5:"scope";s:47:"Illuminate\\Filesystem\\FilesystemServiceProvider";s:4:"this";N;s:4:"self";s:32:"0000000000000f490000000000000000";}}',
|
||||
'as' => 'storage.local',
|
||||
),
|
||||
'fallback' => false,
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
"laravel/tinker": "^2.10.1",
|
||||
"livewire/livewire": "^3.6",
|
||||
"mallardduck/blade-lucide-icons": "^1.23",
|
||||
"mpdf/mpdf": "^8.2",
|
||||
"spatie/laravel-login-link": "^1.6",
|
||||
"swisnl/filament-backgrounds": "^2.0",
|
||||
"ysfkaya/filament-phone-input": "^4.0"
|
||||
|
||||
Generated
+397
-102
@@ -4,7 +4,7 @@
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "bd1043a56ded4898f9fa116694f7c17e",
|
||||
"content-hash": "5bf8156a015fa583c079454642668dd3",
|
||||
"packages": [
|
||||
{
|
||||
"name": "agencetwogether/hookshelper",
|
||||
@@ -1462,16 +1462,16 @@
|
||||
},
|
||||
{
|
||||
"name": "filament/actions",
|
||||
"version": "v4.1.6",
|
||||
"version": "v4.1.7",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/filamentphp/actions.git",
|
||||
"reference": "bd54da3378705c246c4a0c2d7f185853295bbcd9"
|
||||
"reference": "d27cb2edc10687104d63ba223ad898722d3068e5"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/filamentphp/actions/zipball/bd54da3378705c246c4a0c2d7f185853295bbcd9",
|
||||
"reference": "bd54da3378705c246c4a0c2d7f185853295bbcd9",
|
||||
"url": "https://api.github.com/repos/filamentphp/actions/zipball/d27cb2edc10687104d63ba223ad898722d3068e5",
|
||||
"reference": "d27cb2edc10687104d63ba223ad898722d3068e5",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -1507,20 +1507,20 @@
|
||||
"issues": "https://github.com/filamentphp/filament/issues",
|
||||
"source": "https://github.com/filamentphp/filament"
|
||||
},
|
||||
"time": "2025-10-07T12:45:33+00:00"
|
||||
"time": "2025-10-12T16:21:25+00:00"
|
||||
},
|
||||
{
|
||||
"name": "filament/filament",
|
||||
"version": "v4.1.6",
|
||||
"version": "v4.1.7",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/filamentphp/panels.git",
|
||||
"reference": "d03d2f80f08002e55c9617bb480dc8cd0403892a"
|
||||
"reference": "35dc992a4402ae0fb0fe9e92a0f2f2aea0a6c26f"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/filamentphp/panels/zipball/d03d2f80f08002e55c9617bb480dc8cd0403892a",
|
||||
"reference": "d03d2f80f08002e55c9617bb480dc8cd0403892a",
|
||||
"url": "https://api.github.com/repos/filamentphp/panels/zipball/35dc992a4402ae0fb0fe9e92a0f2f2aea0a6c26f",
|
||||
"reference": "35dc992a4402ae0fb0fe9e92a0f2f2aea0a6c26f",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -1564,20 +1564,20 @@
|
||||
"issues": "https://github.com/filamentphp/filament/issues",
|
||||
"source": "https://github.com/filamentphp/filament"
|
||||
},
|
||||
"time": "2025-10-08T11:01:55+00:00"
|
||||
"time": "2025-10-12T16:21:29+00:00"
|
||||
},
|
||||
{
|
||||
"name": "filament/forms",
|
||||
"version": "v4.1.6",
|
||||
"version": "v4.1.7",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/filamentphp/forms.git",
|
||||
"reference": "ddfa808665077bccae64242dc763e0434e98183f"
|
||||
"reference": "a0ec199bc173ac9d62052594f28e14b00338b2cb"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/filamentphp/forms/zipball/ddfa808665077bccae64242dc763e0434e98183f",
|
||||
"reference": "ddfa808665077bccae64242dc763e0434e98183f",
|
||||
"url": "https://api.github.com/repos/filamentphp/forms/zipball/a0ec199bc173ac9d62052594f28e14b00338b2cb",
|
||||
"reference": "a0ec199bc173ac9d62052594f28e14b00338b2cb",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -1614,20 +1614,20 @@
|
||||
"issues": "https://github.com/filamentphp/filament/issues",
|
||||
"source": "https://github.com/filamentphp/filament"
|
||||
},
|
||||
"time": "2025-10-08T10:40:16+00:00"
|
||||
"time": "2025-10-12T16:21:39+00:00"
|
||||
},
|
||||
{
|
||||
"name": "filament/infolists",
|
||||
"version": "v4.1.6",
|
||||
"version": "v4.1.7",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/filamentphp/infolists.git",
|
||||
"reference": "0817b9c0e5e15e0e19b57e01322083b80cf4b715"
|
||||
"reference": "c6572b83fd6b97105c9f915797c6b2c10fae424d"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/filamentphp/infolists/zipball/0817b9c0e5e15e0e19b57e01322083b80cf4b715",
|
||||
"reference": "0817b9c0e5e15e0e19b57e01322083b80cf4b715",
|
||||
"url": "https://api.github.com/repos/filamentphp/infolists/zipball/c6572b83fd6b97105c9f915797c6b2c10fae424d",
|
||||
"reference": "c6572b83fd6b97105c9f915797c6b2c10fae424d",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -1659,11 +1659,11 @@
|
||||
"issues": "https://github.com/filamentphp/filament/issues",
|
||||
"source": "https://github.com/filamentphp/filament"
|
||||
},
|
||||
"time": "2025-09-29T08:02:20+00:00"
|
||||
"time": "2025-10-12T16:21:24+00:00"
|
||||
},
|
||||
{
|
||||
"name": "filament/notifications",
|
||||
"version": "v4.1.6",
|
||||
"version": "v4.1.7",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/filamentphp/notifications.git",
|
||||
@@ -1710,16 +1710,16 @@
|
||||
},
|
||||
{
|
||||
"name": "filament/schemas",
|
||||
"version": "v4.1.6",
|
||||
"version": "v4.1.7",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/filamentphp/schemas.git",
|
||||
"reference": "21f58ba01bd88e1fca2c1fa9a06ddfa949e9270b"
|
||||
"reference": "16143a73fbf8cec9bacaae98d49fafa9137a5f5d"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/filamentphp/schemas/zipball/21f58ba01bd88e1fca2c1fa9a06ddfa949e9270b",
|
||||
"reference": "21f58ba01bd88e1fca2c1fa9a06ddfa949e9270b",
|
||||
"url": "https://api.github.com/repos/filamentphp/schemas/zipball/16143a73fbf8cec9bacaae98d49fafa9137a5f5d",
|
||||
"reference": "16143a73fbf8cec9bacaae98d49fafa9137a5f5d",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -1751,20 +1751,20 @@
|
||||
"issues": "https://github.com/filamentphp/filament/issues",
|
||||
"source": "https://github.com/filamentphp/filament"
|
||||
},
|
||||
"time": "2025-10-06T08:10:46+00:00"
|
||||
"time": "2025-10-12T16:21:23+00:00"
|
||||
},
|
||||
{
|
||||
"name": "filament/support",
|
||||
"version": "v4.1.6",
|
||||
"version": "v4.1.7",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/filamentphp/support.git",
|
||||
"reference": "e3294c6cd71d0b6c8cba8d20c99d5af651351a86"
|
||||
"reference": "fbd989a4ea8520badaff9e997f39d02c601b1b9f"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/filamentphp/support/zipball/e3294c6cd71d0b6c8cba8d20c99d5af651351a86",
|
||||
"reference": "e3294c6cd71d0b6c8cba8d20c99d5af651351a86",
|
||||
"url": "https://api.github.com/repos/filamentphp/support/zipball/fbd989a4ea8520badaff9e997f39d02c601b1b9f",
|
||||
"reference": "fbd989a4ea8520badaff9e997f39d02c601b1b9f",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -1809,20 +1809,20 @@
|
||||
"issues": "https://github.com/filamentphp/filament/issues",
|
||||
"source": "https://github.com/filamentphp/filament"
|
||||
},
|
||||
"time": "2025-10-08T10:40:12+00:00"
|
||||
"time": "2025-10-12T16:21:23+00:00"
|
||||
},
|
||||
{
|
||||
"name": "filament/tables",
|
||||
"version": "v4.1.6",
|
||||
"version": "v4.1.7",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/filamentphp/tables.git",
|
||||
"reference": "b3bf48fd079d8abdf6dfb0936f1d1c8c4a4479ab"
|
||||
"reference": "72a25ca036c7307b38582fd1b203efd2d5fee03d"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/filamentphp/tables/zipball/b3bf48fd079d8abdf6dfb0936f1d1c8c4a4479ab",
|
||||
"reference": "b3bf48fd079d8abdf6dfb0936f1d1c8c4a4479ab",
|
||||
"url": "https://api.github.com/repos/filamentphp/tables/zipball/72a25ca036c7307b38582fd1b203efd2d5fee03d",
|
||||
"reference": "72a25ca036c7307b38582fd1b203efd2d5fee03d",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -1854,20 +1854,20 @@
|
||||
"issues": "https://github.com/filamentphp/filament/issues",
|
||||
"source": "https://github.com/filamentphp/filament"
|
||||
},
|
||||
"time": "2025-10-08T11:01:10+00:00"
|
||||
"time": "2025-10-12T16:21:29+00:00"
|
||||
},
|
||||
{
|
||||
"name": "filament/widgets",
|
||||
"version": "v4.1.6",
|
||||
"version": "v4.1.7",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/filamentphp/widgets.git",
|
||||
"reference": "f0b009e52737a2f973771928ada952ff577704ba"
|
||||
"reference": "4e3ebbd1b97c14c0a6e440b05717ec9d6b030ebb"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/filamentphp/widgets/zipball/f0b009e52737a2f973771928ada952ff577704ba",
|
||||
"reference": "f0b009e52737a2f973771928ada952ff577704ba",
|
||||
"url": "https://api.github.com/repos/filamentphp/widgets/zipball/4e3ebbd1b97c14c0a6e440b05717ec9d6b030ebb",
|
||||
"reference": "4e3ebbd1b97c14c0a6e440b05717ec9d6b030ebb",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -1898,7 +1898,7 @@
|
||||
"issues": "https://github.com/filamentphp/filament/issues",
|
||||
"source": "https://github.com/filamentphp/filament"
|
||||
},
|
||||
"time": "2025-10-08T10:39:57+00:00"
|
||||
"time": "2025-10-12T16:21:25+00:00"
|
||||
},
|
||||
{
|
||||
"name": "fruitcake/php-cors",
|
||||
@@ -4095,6 +4095,239 @@
|
||||
],
|
||||
"time": "2025-03-24T10:02:05+00:00"
|
||||
},
|
||||
{
|
||||
"name": "mpdf/mpdf",
|
||||
"version": "v8.2.6",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/mpdf/mpdf.git",
|
||||
"reference": "dd30e3b01061cf8dfe65e7041ab4cc46d8ebdd44"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/mpdf/mpdf/zipball/dd30e3b01061cf8dfe65e7041ab4cc46d8ebdd44",
|
||||
"reference": "dd30e3b01061cf8dfe65e7041ab4cc46d8ebdd44",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-gd": "*",
|
||||
"ext-mbstring": "*",
|
||||
"mpdf/psr-http-message-shim": "^1.0 || ^2.0",
|
||||
"mpdf/psr-log-aware-trait": "^2.0 || ^3.0",
|
||||
"myclabs/deep-copy": "^1.7",
|
||||
"paragonie/random_compat": "^1.4|^2.0|^9.99.99",
|
||||
"php": "^5.6 || ^7.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0",
|
||||
"psr/http-message": "^1.0 || ^2.0",
|
||||
"psr/log": "^1.0 || ^2.0 || ^3.0",
|
||||
"setasign/fpdi": "^2.1"
|
||||
},
|
||||
"require-dev": {
|
||||
"mockery/mockery": "^1.3.0",
|
||||
"mpdf/qrcode": "^1.1.0",
|
||||
"squizlabs/php_codesniffer": "^3.5.0",
|
||||
"tracy/tracy": "~2.5",
|
||||
"yoast/phpunit-polyfills": "^1.0"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-bcmath": "Needed for generation of some types of barcodes",
|
||||
"ext-xml": "Needed mainly for SVG manipulation",
|
||||
"ext-zlib": "Needed for compression of embedded resources, such as fonts"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"files": [
|
||||
"src/functions.php"
|
||||
],
|
||||
"psr-4": {
|
||||
"Mpdf\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"GPL-2.0-only"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Matěj Humpál",
|
||||
"role": "Developer, maintainer"
|
||||
},
|
||||
{
|
||||
"name": "Ian Back",
|
||||
"role": "Developer (retired)"
|
||||
}
|
||||
],
|
||||
"description": "PHP library generating PDF files from UTF-8 encoded HTML",
|
||||
"homepage": "https://mpdf.github.io",
|
||||
"keywords": [
|
||||
"pdf",
|
||||
"php",
|
||||
"utf-8"
|
||||
],
|
||||
"support": {
|
||||
"docs": "https://mpdf.github.io",
|
||||
"issues": "https://github.com/mpdf/mpdf/issues",
|
||||
"source": "https://github.com/mpdf/mpdf"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://www.paypal.me/mpdf",
|
||||
"type": "custom"
|
||||
}
|
||||
],
|
||||
"time": "2025-08-18T08:51:51+00:00"
|
||||
},
|
||||
{
|
||||
"name": "mpdf/psr-http-message-shim",
|
||||
"version": "v2.0.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/mpdf/psr-http-message-shim.git",
|
||||
"reference": "f25a0153d645e234f9db42e5433b16d9b113920f"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/mpdf/psr-http-message-shim/zipball/f25a0153d645e234f9db42e5433b16d9b113920f",
|
||||
"reference": "f25a0153d645e234f9db42e5433b16d9b113920f",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"psr/http-message": "^2.0"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Mpdf\\PsrHttpMessageShim\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Mark Dorison",
|
||||
"email": "mark@chromatichq.com"
|
||||
},
|
||||
{
|
||||
"name": "Kristofer Widholm",
|
||||
"email": "kristofer@chromatichq.com"
|
||||
},
|
||||
{
|
||||
"name": "Nigel Cunningham",
|
||||
"email": "nigel.cunningham@technocrat.com.au"
|
||||
}
|
||||
],
|
||||
"description": "Shim to allow support of different psr/message versions.",
|
||||
"support": {
|
||||
"issues": "https://github.com/mpdf/psr-http-message-shim/issues",
|
||||
"source": "https://github.com/mpdf/psr-http-message-shim/tree/v2.0.1"
|
||||
},
|
||||
"time": "2023-10-02T14:34:03+00:00"
|
||||
},
|
||||
{
|
||||
"name": "mpdf/psr-log-aware-trait",
|
||||
"version": "v3.0.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/mpdf/psr-log-aware-trait.git",
|
||||
"reference": "a633da6065e946cc491e1c962850344bb0bf3e78"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/mpdf/psr-log-aware-trait/zipball/a633da6065e946cc491e1c962850344bb0bf3e78",
|
||||
"reference": "a633da6065e946cc491e1c962850344bb0bf3e78",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"psr/log": "^3.0"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Mpdf\\PsrLogAwareTrait\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Mark Dorison",
|
||||
"email": "mark@chromatichq.com"
|
||||
},
|
||||
{
|
||||
"name": "Kristofer Widholm",
|
||||
"email": "kristofer@chromatichq.com"
|
||||
}
|
||||
],
|
||||
"description": "Trait to allow support of different psr/log versions.",
|
||||
"support": {
|
||||
"issues": "https://github.com/mpdf/psr-log-aware-trait/issues",
|
||||
"source": "https://github.com/mpdf/psr-log-aware-trait/tree/v3.0.0"
|
||||
},
|
||||
"time": "2023-05-03T06:19:36+00:00"
|
||||
},
|
||||
{
|
||||
"name": "myclabs/deep-copy",
|
||||
"version": "1.13.4",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/myclabs/DeepCopy.git",
|
||||
"reference": "07d290f0c47959fd5eed98c95ee5602db07e0b6a"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/07d290f0c47959fd5eed98c95ee5602db07e0b6a",
|
||||
"reference": "07d290f0c47959fd5eed98c95ee5602db07e0b6a",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^7.1 || ^8.0"
|
||||
},
|
||||
"conflict": {
|
||||
"doctrine/collections": "<1.6.8",
|
||||
"doctrine/common": "<2.13.3 || >=3 <3.2.2"
|
||||
},
|
||||
"require-dev": {
|
||||
"doctrine/collections": "^1.6.8",
|
||||
"doctrine/common": "^2.13.3 || ^3.2.2",
|
||||
"phpspec/prophecy": "^1.10",
|
||||
"phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"files": [
|
||||
"src/DeepCopy/deep_copy.php"
|
||||
],
|
||||
"psr-4": {
|
||||
"DeepCopy\\": "src/DeepCopy/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"description": "Create deep copies (clones) of your objects",
|
||||
"keywords": [
|
||||
"clone",
|
||||
"copy",
|
||||
"duplicate",
|
||||
"object",
|
||||
"object graph"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/myclabs/DeepCopy/issues",
|
||||
"source": "https://github.com/myclabs/DeepCopy/tree/1.13.4"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy",
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2025-08-01T08:46:24+00:00"
|
||||
},
|
||||
{
|
||||
"name": "nesbot/carbon",
|
||||
"version": "3.10.3",
|
||||
@@ -4730,6 +4963,56 @@
|
||||
},
|
||||
"time": "2025-09-24T15:06:41+00:00"
|
||||
},
|
||||
{
|
||||
"name": "paragonie/random_compat",
|
||||
"version": "v9.99.100",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/paragonie/random_compat.git",
|
||||
"reference": "996434e5492cb4c3edcb9168db6fbb1359ef965a"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/paragonie/random_compat/zipball/996434e5492cb4c3edcb9168db6fbb1359ef965a",
|
||||
"reference": "996434e5492cb4c3edcb9168db6fbb1359ef965a",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">= 7"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "4.*|5.*",
|
||||
"vimeo/psalm": "^1"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes."
|
||||
},
|
||||
"type": "library",
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Paragon Initiative Enterprises",
|
||||
"email": "security@paragonie.com",
|
||||
"homepage": "https://paragonie.com"
|
||||
}
|
||||
],
|
||||
"description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7",
|
||||
"keywords": [
|
||||
"csprng",
|
||||
"polyfill",
|
||||
"pseudorandom",
|
||||
"random"
|
||||
],
|
||||
"support": {
|
||||
"email": "info@paragonie.com",
|
||||
"issues": "https://github.com/paragonie/random_compat/issues",
|
||||
"source": "https://github.com/paragonie/random_compat"
|
||||
},
|
||||
"time": "2020-10-15T08:29:30+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpoption/phpoption",
|
||||
"version": "1.9.4",
|
||||
@@ -5840,6 +6123,78 @@
|
||||
],
|
||||
"time": "2022-12-17T21:53:22+00:00"
|
||||
},
|
||||
{
|
||||
"name": "setasign/fpdi",
|
||||
"version": "v2.6.4",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/Setasign/FPDI.git",
|
||||
"reference": "4b53852fde2734ec6a07e458a085db627c60eada"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/Setasign/FPDI/zipball/4b53852fde2734ec6a07e458a085db627c60eada",
|
||||
"reference": "4b53852fde2734ec6a07e458a085db627c60eada",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-zlib": "*",
|
||||
"php": "^7.1 || ^8.0"
|
||||
},
|
||||
"conflict": {
|
||||
"setasign/tfpdf": "<1.31"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^7",
|
||||
"setasign/fpdf": "~1.8.6",
|
||||
"setasign/tfpdf": "~1.33",
|
||||
"squizlabs/php_codesniffer": "^3.5",
|
||||
"tecnickcom/tcpdf": "^6.8"
|
||||
},
|
||||
"suggest": {
|
||||
"setasign/fpdf": "FPDI will extend this class but as it is also possible to use TCPDF or tFPDF as an alternative. There's no fixed dependency configured."
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"setasign\\Fpdi\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Jan Slabon",
|
||||
"email": "jan.slabon@setasign.com",
|
||||
"homepage": "https://www.setasign.com"
|
||||
},
|
||||
{
|
||||
"name": "Maximilian Kresse",
|
||||
"email": "maximilian.kresse@setasign.com",
|
||||
"homepage": "https://www.setasign.com"
|
||||
}
|
||||
],
|
||||
"description": "FPDI is a collection of PHP classes facilitating developers to read pages from existing PDF documents and use them as templates in FPDF. Because it is also possible to use FPDI with TCPDF, there are no fixed dependencies defined. Please see suggestions for packages which evaluates the dependencies automatically.",
|
||||
"homepage": "https://www.setasign.com/fpdi",
|
||||
"keywords": [
|
||||
"fpdf",
|
||||
"fpdi",
|
||||
"pdf"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/Setasign/FPDI/issues",
|
||||
"source": "https://github.com/Setasign/FPDI/tree/v2.6.4"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://tidelift.com/funding/github/packagist/setasign/fpdi",
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2025-08-05T09:57:14+00:00"
|
||||
},
|
||||
{
|
||||
"name": "spatie/invade",
|
||||
"version": "2.1.0",
|
||||
@@ -9943,66 +10298,6 @@
|
||||
},
|
||||
"time": "2024-05-16T03:13:13+00:00"
|
||||
},
|
||||
{
|
||||
"name": "myclabs/deep-copy",
|
||||
"version": "1.13.4",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/myclabs/DeepCopy.git",
|
||||
"reference": "07d290f0c47959fd5eed98c95ee5602db07e0b6a"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/07d290f0c47959fd5eed98c95ee5602db07e0b6a",
|
||||
"reference": "07d290f0c47959fd5eed98c95ee5602db07e0b6a",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^7.1 || ^8.0"
|
||||
},
|
||||
"conflict": {
|
||||
"doctrine/collections": "<1.6.8",
|
||||
"doctrine/common": "<2.13.3 || >=3 <3.2.2"
|
||||
},
|
||||
"require-dev": {
|
||||
"doctrine/collections": "^1.6.8",
|
||||
"doctrine/common": "^2.13.3 || ^3.2.2",
|
||||
"phpspec/prophecy": "^1.10",
|
||||
"phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"files": [
|
||||
"src/DeepCopy/deep_copy.php"
|
||||
],
|
||||
"psr-4": {
|
||||
"DeepCopy\\": "src/DeepCopy/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"description": "Create deep copies (clones) of your objects",
|
||||
"keywords": [
|
||||
"clone",
|
||||
"copy",
|
||||
"duplicate",
|
||||
"object",
|
||||
"object graph"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/myclabs/DeepCopy/issues",
|
||||
"source": "https://github.com/myclabs/DeepCopy/tree/1.13.4"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy",
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2025-08-01T08:46:24+00:00"
|
||||
},
|
||||
{
|
||||
"name": "nunomaduro/collision",
|
||||
"version": "v8.8.2",
|
||||
|
||||
@@ -0,0 +1,183 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Icons Sets
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| With this config option you can define a couple of
|
||||
| default icon sets. Provide a key name for your icon
|
||||
| set and a combination from the options below.
|
||||
|
|
||||
*/
|
||||
|
||||
'sets' => [
|
||||
|
||||
'default' => [
|
||||
|
||||
/*
|
||||
|-----------------------------------------------------------------
|
||||
| Icons Path
|
||||
|-----------------------------------------------------------------
|
||||
|
|
||||
| Provide the relative path from your app root to your SVG icons
|
||||
| directory. Icons are loaded recursively so there's no need to
|
||||
| list every sub-directory.
|
||||
|
|
||||
| Relative to the disk root when the disk option is set.
|
||||
|
|
||||
*/
|
||||
|
||||
'path' => 'resources/svg',
|
||||
|
||||
/*
|
||||
|-----------------------------------------------------------------
|
||||
| Filesystem Disk
|
||||
|-----------------------------------------------------------------
|
||||
|
|
||||
| Optionally, provide a specific filesystem disk to read
|
||||
| icons from. When defining a disk, the "path" option
|
||||
| starts relatively from the disk root.
|
||||
|
|
||||
*/
|
||||
|
||||
'disk' => '',
|
||||
|
||||
/*
|
||||
|-----------------------------------------------------------------
|
||||
| Default Prefix
|
||||
|-----------------------------------------------------------------
|
||||
|
|
||||
| This config option allows you to define a default prefix for
|
||||
| your icons. The dash separator will be applied automatically
|
||||
| to every icon name. It's required and needs to be unique.
|
||||
|
|
||||
*/
|
||||
|
||||
'prefix' => 'icon',
|
||||
|
||||
/*
|
||||
|-----------------------------------------------------------------
|
||||
| Fallback Icon
|
||||
|-----------------------------------------------------------------
|
||||
|
|
||||
| This config option allows you to define a fallback
|
||||
| icon when an icon in this set cannot be found.
|
||||
|
|
||||
*/
|
||||
|
||||
'fallback' => '',
|
||||
|
||||
/*
|
||||
|-----------------------------------------------------------------
|
||||
| Default Set Classes
|
||||
|-----------------------------------------------------------------
|
||||
|
|
||||
| This config option allows you to define some classes which
|
||||
| will be applied by default to all icons within this set.
|
||||
|
|
||||
*/
|
||||
|
||||
'class' => '',
|
||||
|
||||
/*
|
||||
|-----------------------------------------------------------------
|
||||
| Default Set Attributes
|
||||
|-----------------------------------------------------------------
|
||||
|
|
||||
| This config option allows you to define some attributes which
|
||||
| will be applied by default to all icons within this set.
|
||||
|
|
||||
*/
|
||||
|
||||
'attributes' => [
|
||||
// 'width' => 50,
|
||||
// 'height' => 50,
|
||||
],
|
||||
|
||||
],
|
||||
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Global Default Classes
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This config option allows you to define some classes which
|
||||
| will be applied by default to all icons.
|
||||
|
|
||||
*/
|
||||
|
||||
'class' => '',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Global Default Attributes
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This config option allows you to define some attributes which
|
||||
| will be applied by default to all icons.
|
||||
|
|
||||
*/
|
||||
|
||||
'attributes' => [
|
||||
// 'width' => 50,
|
||||
// 'height' => 50,
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Global Fallback Icon
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This config option allows you to define a global fallback
|
||||
| icon when an icon in any set cannot be found. It can
|
||||
| reference any icon from any configured set.
|
||||
|
|
||||
*/
|
||||
|
||||
'fallback' => '',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Components
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| These config options allow you to define some
|
||||
| settings related to Blade Components.
|
||||
|
|
||||
*/
|
||||
|
||||
'components' => [
|
||||
|
||||
/*
|
||||
|----------------------------------------------------------------------
|
||||
| Disable Components
|
||||
|----------------------------------------------------------------------
|
||||
|
|
||||
| This config option allows you to disable Blade components
|
||||
| completely. It's useful to avoid performance problems
|
||||
| when working with large icon libraries.
|
||||
|
|
||||
*/
|
||||
|
||||
'disabled' => false,
|
||||
|
||||
/*
|
||||
|----------------------------------------------------------------------
|
||||
| Default Icon Component Name
|
||||
|----------------------------------------------------------------------
|
||||
|
|
||||
| This config option allows you to define the name
|
||||
| for the default Icon class component.
|
||||
|
|
||||
*/
|
||||
|
||||
'default' => 'icon',
|
||||
|
||||
],
|
||||
|
||||
];
|
||||
@@ -24,7 +24,6 @@ class AuftraggeberFactory extends Factory
|
||||
'name' => fake()->name(),
|
||||
'company' => fake()->Company(),
|
||||
'address' => fake()->Address(),
|
||||
'country' => 'Österreich',
|
||||
'email' => fake()->email(),
|
||||
'phone' => fake()->PhoneNumber(),
|
||||
];
|
||||
|
||||
@@ -17,14 +17,19 @@ class GutachterFactory extends Factory
|
||||
*/
|
||||
public function definition(): array
|
||||
{
|
||||
|
||||
$adress = '9170 Bad Leonfelden / Simone-Wittmann-Weg 3
|
||||
UID: ATU68008336 . Firmenbuchnummer 23456w
|
||||
Telefon: +43 699 4727182 / Fax: +43 699 4727182-3
|
||||
gpetrovic@gmx.at';
|
||||
|
||||
return [
|
||||
'konto_id' => Konto::all()->random()->id,
|
||||
'title' => fake()->randomElement(['Architekt:in', 'Ziviltechniker:in']),
|
||||
'gender' => fake()->randomElement(['Frau', 'Herr']),
|
||||
'name' => fake()->name(),
|
||||
'company' => fake()->Company(),
|
||||
'address' => fake()->Address(),
|
||||
'country' => 'Österreich',
|
||||
'address' => $adress,
|
||||
'email' => fake()->email(),
|
||||
'phone' => fake()->PhoneNumber(),
|
||||
];
|
||||
|
||||
@@ -23,7 +23,6 @@ class KontoFactory extends Factory
|
||||
'company' => fake()->Company(),
|
||||
'email' => fake()->email(),
|
||||
'address' => fake()->Address(),
|
||||
'country' => 'Österreich',
|
||||
'phone' => fake()->PhoneNumber(),
|
||||
'uid_number' => 'ATU'.fake()->randomNumber(8, true),
|
||||
'plan_id' => fake()->numberBetween(1, 3),
|
||||
|
||||
@@ -19,7 +19,6 @@ return new class extends Migration
|
||||
$table->string('company');
|
||||
$table->string('email')->nullable();
|
||||
$table->string('address')->nullable();
|
||||
$table->string('country')->nullable();
|
||||
$table->string('phone')->nullable();
|
||||
$table->string('uid_number')->nullable();
|
||||
$table->string('guthaben')->default(0);
|
||||
|
||||
@@ -20,7 +20,6 @@ return new class extends Migration
|
||||
$table->string('company')->nullable();
|
||||
$table->string('logo')->nullable();
|
||||
$table->text('address')->nullable();
|
||||
$table->string('country')->nullable();
|
||||
$table->string('email')->nullable();
|
||||
$table->string('phone')->nullable();
|
||||
$table->boolean('use_logo')->default(false);
|
||||
|
||||
@@ -20,7 +20,6 @@ return new class extends Migration
|
||||
$table->string('company')->nullable();
|
||||
$table->string('logo')->nullable();
|
||||
$table->text('address')->nullable();
|
||||
$table->string('country')->nullable();
|
||||
$table->string('email')->email()->nullable();
|
||||
$table->string('phone')->tel()->nullable();
|
||||
$table->boolean('use_logo')->default(false);
|
||||
|
||||
@@ -22,6 +22,12 @@ return new class extends Migration
|
||||
$table->text('beschreibung')->nullable();
|
||||
$table->string('erstellung')->nullable();
|
||||
$table->string('status')->default('entwurf');
|
||||
$table->string('pdf_gutachten_name');
|
||||
$table->string('pdf_nutzwerte_name');
|
||||
$table->string('excel_nutzwerte_name');
|
||||
$table->boolean('pdf_nutzwerte_status')->default(0);
|
||||
$table->boolean('pdf_gutachten_status')->default(0);
|
||||
$table->boolean('excel_nutzwerte_status')->default(0);
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
});
|
||||
|
||||
@@ -12,10 +12,10 @@ class KontoSeeder extends Seeder
|
||||
*/
|
||||
public function run(): void
|
||||
{
|
||||
$sql = "INSERT INTO `kontos` (`id`, `title`, `gender`, `name`, `company`, `email`, `address`, `location`, `plz`, `country`, `phone`, `uid_number`, `option_id`, `gutachten_zahl`, `gutachten_zeit`, `gutachten_abgeschlossen`, `created_at`, `updated_at`)
|
||||
$sql = "INSERT INTO `kontos` (`id`, `title`, `gender`, `name`, `company`, `email`, `address`, `location`, `plz`, `phone`, `uid_number`, `option_id`, `gutachten_zahl`, `gutachten_zeit`, `gutachten_abgeschlossen`, `created_at`, `updated_at`)
|
||||
VALUES
|
||||
('1', 'Architekt', 'Herr', 'Hanno Vogl-Fernheim', 'Architekt Vogl-Fernheim', 'office@vogl-fernheim.eu', 'Richardsweg 1', 'Innsbruck', '6020', 'Österreich', '+43 0512 560303', 'ATU 61718733', '1', '1', NULL, '1', NULL, NULL),
|
||||
('2', 'Staatl. bef. u. beeideter Ziviltechniker', 'Herr', 'Christoph Falkner', 'Ziviltechniker Christoph Falkner', 'christophfalkner@me.com', 'Adele-Obermayr-Straße 2', 'Innsbruck', '6020', 'Österreich', '+43 650 92210248', 'ATU56874500', '1', '1', NULL, '1', NULL, NULL);
|
||||
('1', 'Architekt', 'Herr', 'Hanno Vogl-Fernheim', 'Architekt Vogl-Fernheim', 'office@vogl-fernheim.eu', 'Richardsweg 1', 'Innsbruck', '6020', '+43 0512 560303', 'ATU 61718733', '1', '1', NULL, '1', NULL, NULL),
|
||||
('2', 'Staatl. bef. u. beeideter Ziviltechniker', 'Herr', 'Christoph Falkner', 'Ziviltechniker Christoph Falkner', 'christophfalkner@me.com', 'Adele-Obermayr-Straße 2', 'Innsbruck', '6020', '+43 650 92210248', 'ATU56874500', '1', '1', NULL, '1', NULL, NULL);
|
||||
";
|
||||
DB::unprepared($sql);
|
||||
}
|
||||
|
||||
Generated
+10
@@ -2020,6 +2020,7 @@
|
||||
"integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
},
|
||||
@@ -2264,12 +2265,21 @@
|
||||
"dev": true,
|
||||
"license": "0BSD"
|
||||
},
|
||||
"node_modules/undici-types": {
|
||||
"version": "7.14.0",
|
||||
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.14.0.tgz",
|
||||
"integrity": "sha512-QQiYxHuyZ9gQUIrmPo3IA+hUl4KYk8uSA7cHrcKd/l3p1OTpZcM0Tbp9x7FAtXdAYhlasd60ncPpgu6ihG6TOA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true
|
||||
},
|
||||
"node_modules/vite": {
|
||||
"version": "7.1.5",
|
||||
"resolved": "https://registry.npmjs.org/vite/-/vite-7.1.5.tgz",
|
||||
"integrity": "sha512-4cKBO9wR75r0BeIWWWId9XK9Lj6La5X846Zw9dFfzMRw38IlTk2iCcUt6hsyiDRcPidc55ZParFYDXi0nXOeLQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"esbuild": "^0.25.0",
|
||||
"fdir": "^6.5.0",
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
/*! tailwindcss v4.1.13 | MIT License | https://tailwindcss.com */
|
||||
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-tracking:initial;--tw-duration:initial;--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-ease:initial;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-divide-x-reverse:0;--tw-content:"";--tw-outline-style:solid;--tw-space-x-reverse:0}}}@layer theme{:root,:host{--font-mono:var(--mono-font-family),ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-sky-400:oklch(74.6% .16 232.661);--color-gray-100:var(--gray-100);--color-gray-200:var(--gray-200);--color-gray-300:var(--gray-300);--color-gray-400:var(--gray-400);--color-gray-500:var(--gray-500);--color-gray-600:var(--gray-600);--color-gray-700:var(--gray-700);--color-gray-900:var(--gray-900);--color-gray-950:var(--gray-950);--color-black:#000;--color-white:#fff;--spacing:.25rem;--breakpoint-sm:40rem;--breakpoint-md:48rem;--breakpoint-lg:64rem;--breakpoint-xl:80rem;--breakpoint-2xl:96rem;--container-3xs:16rem;--container-xs:20rem;--container-sm:24rem;--container-md:28rem;--container-lg:32rem;--container-xl:36rem;--container-2xl:42rem;--container-3xl:48rem;--container-4xl:56rem;--container-5xl:64rem;--container-6xl:72rem;--container-7xl:80rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-base:1rem;--text-base--line-height:calc(1.5/1);--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2/1.5);--text-3xl:1.875rem;--text-3xl--line-height:calc(2.25/1.875);--font-weight-thin:100;--font-weight-extralight:200;--font-weight-light:300;--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--font-weight-extrabold:800;--font-weight-black:900;--tracking-tighter:-.05em;--tracking-tight:-.025em;--leading-loose:2;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--ease-in:cubic-bezier(.4,0,1,1);--ease-out:cubic-bezier(0,0,.2,1);--ease-in-out:cubic-bezier(.4,0,.2,1);--animate-spin:spin 1s linear infinite;--animate-pulse:pulse 2s cubic-bezier(.4,0,.6,1)infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-family),ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--default-mono-font-family:var(--mono-font-family),ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-primary-400:var(--primary-400)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;heLine truncated
|
||||
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-tracking:initial;--tw-duration:initial;--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-ease:initial;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-divide-x-reverse:0;--tw-content:"";--tw-outline-style:solid;--tw-space-x-reverse:0}}}@layer theme{:root,:host{--font-mono:var(--mono-font-family),ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-sky-400:oklch(74.6% .16 232.661);--color-gray-100:var(--gray-100);--color-gray-200:var(--gray-200);--color-gray-300:var(--gray-300);--color-gray-400:var(--gray-400);--color-gray-500:var(--gray-500);--color-gray-600:var(--gray-600);--color-gray-700:var(--gray-700);--color-gray-900:var(--gray-900);--color-gray-950:var(--gray-950);--color-black:#000;--color-white:#fff;--spacing:.25rem;--breakpoint-sm:40rem;--breakpoint-md:48rem;--breakpoint-lg:64rem;--breakpoint-xl:80rem;--breakpoint-2xl:96rem;--container-3xs:16rem;--container-xs:20rem;--container-sm:24rem;--container-md:28rem;--container-lg:32rem;--container-xl:36rem;--container-2xl:42rem;--container-3xl:48rem;--container-4xl:56rem;--container-5xl:64rem;--container-6xl:72rem;--container-7xl:80rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-base:1rem;--text-base--line-height:calc(1.5/1);--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2/1.5);--text-3xl:1.875rem;--text-3xl--line-height:calc(2.25/1.875);--font-weight-thin:100;--font-weight-extralight:200;--font-weight-light:300;--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--font-weight-extrabold:800;--font-weight-black:900;--tracking-tighter:-.05em;--tracking-tight:-.025em;--leading-loose:2;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--ease-in:cubic-bezier(.4,0,1,1);--ease-out:cubic-bezier(0,0,.2,1);--ease-in-out:cubic-bezier(.4,0,.2,1);--animate-spin:spin 1s linear infinite;--animate-pulse:pulse 2s cubic-bezier(.4,0,.6,1)infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-family),ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--default-mono-font-family:var(--mono-font-family),ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-primary-400:var(--primary-400)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;heLine truncated
|
||||
@@ -1,16 +1,16 @@
|
||||
function he(t){this.content=t}he.prototype={constructor:he,find:function(t){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===t)return e;return-1},get:function(t){var e=this.find(t);return e==-1?void 0:this.content[e+1]},update:function(t,e,n){var r=n&&n!=t?this.remove(n):this,o=r.find(t),i=r.content.slice();return o==-1?i.push(n||t,e):(i[o+1]=e,n&&(i[o]=n)),new he(i)},remove:function(t){var e=this.find(t);if(e==-1)return this;var n=this.content.slice();return n.splice(e,2),new he(n)},addToStart:function(t,e){return new he([t,e].concat(this.remove(t).content))},addToEnd:function(t,e){var n=this.remove(t).content.slice();return n.push(t,e),new he(n)},addBefore:function(t,e,n){var r=this.remove(e),o=r.content.slice(),i=r.find(t);return o.splice(i==-1?o.length:i,0,e,n),new he(o)},forEach:function(t){for(var e=0;e<this.content.length;e+=2)t(this.content[e],this.content[e+1])},prepend:function(t){return t=he.from(t),t.size?new he(t.content.concat(this.subtract(t).content)):this},append:function(t){return t=he.from(t),t.size?new he(this.subtract(t).content.concat(t.content)):this},subtract:function(t){var e=this;t=he.from(t);for(var n=0;n<t.content.length;n+=2)e=e.remove(t.content[n]);return e},toObject:function(){var t={};return this.forEach(function(e,n){t[e]=n}),t},get size(){return this.content.length>>1}};he.from=function(t){if(t instanceof he)return t;var e=[];if(t)for(var n in t)e.push(n,t[n]);return new he(e)};var wi=he;function ca(t,e,n){for(let r=0;;r++){if(r==t.childCount||r==e.childCount)return t.childCount==e.childCount?null:n;let o=t.child(r),i=e.child(r);if(o==i){n+=o.nodeSize;continue}if(!o.sameMarkup(i))return n;if(o.isText&&o.text!=i.text){for(let s=0;o.text[s]==i.text[s];s++)n++;return n}if(o.content.size||i.content.size){let s=ca(o.content,i.content,n+1);if(s!=null)return s}n+=o.nodeSize}}function da(t,e,n,r){for(let o=t.childCount,i=e.childCount;;){if(o==0||i==0)return o==i?null:{a:n,b:r};let s=t.child(--o),l=e.child(--i),a=s.nodeSize;if(s==l){n-=a,r-=a;continue}if(!s.sameMarkup(l))return{a:n,b:r};if(s.isText&&s.text!=l.text){let c=0,d=Math.min(s.text.length,l.text.length);for(;c<d&&s.text[s.text.length-c-1]==l.text[l.text.length-c-1];)c++,n--,r--;return{a:n,b:r}}if(s.content.size||l.content.size){let c=da(s.content,l.content,n-1,r-1);if(c)return c}n-=a,r-=a}}var w=class t{constructor(e,n){if(this.content=e,this.size=n||0,n==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,n,r,o=0,i){for(let s=0,l=0;l<n;s++){let a=this.content[s],c=l+a.nodeSize;if(c>e&&r(a,o+l,i||null,s)!==!1&&a.content.size){let d=l+1;a.nodesBetween(Math.max(0,e-d),Math.min(a.content.size,n-d),r,o+d)}l=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,n,r,o){let i="",s=!0;return this.nodesBetween(e,n,(l,a)=>{let c=l.isText?l.text.slice(Math.max(e,a)-a,n-a):l.isLeaf?o?typeof o=="function"?o(l):o:l.type.spec.leafText?l.type.spec.leafText(l):"":"";l.isBlock&&(l.isLeaf&&c||l.isTextblock)&&r&&(s?s=!1:i+=r),i+=c},0),i}append(e){if(!e.size)return this;if(!this.size)return e;let n=this.lastChild,r=e.firstChild,o=this.content.slice(),i=0;for(n.isText&&n.sameMarkup(r)&&(o[o.length-1]=n.withText(n.text+r.text),i=1);i<e.content.length;i++)o.push(e.content[i]);return new t(o,this.size+e.size)}cut(e,n=this.size){if(e==0&&n==this.size)return this;let r=[],o=0;if(n>e)for(let i=0,s=0;s<n;i++){let l=this.content[i],a=s+l.nodeSize;a>e&&((s<e||a>n)&&(l.isText?l=l.cut(Math.max(0,e-s),Math.min(l.text.length,n-s)):l=l.cut(Math.max(0,e-s-1),Math.min(l.content.size,n-s-1))),r.push(l),o+=l.nodeSize),s=a}return new t(r,o)}cutByIndex(e,n){return e==n?t.empty:e==0&&n==this.content.length?this:new t(this.content.slice(e,n))}replaceChild(e,n){let r=this.content[e];if(r==n)return this;let o=this.content.slice(),i=this.size+n.nodeSize-r.nodeSize;return o[e]=n,new t(o,i)}addToStart(e){return new t([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new t(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let n=0;n<this.content.length;n++)if(!this.content[n].eq(e.content[n]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let n=this.content[e];if(!n)throw new RangeError("Index "+e+" out of range for "+this);return n}maybeChild(e){return this.content[e]||null}forEach(e){for(let n=0,r=0;n<this.content.length;n++){let o=this.content[n];e(o,r,n),r+=o.nodeSize}}findDiffStart(e,n=0){return ca(this,e,n)}findDiffEnd(e,n=this.size,r=e.size){return da(this,e,n,r)}findIndex(e){if(e==0)return Sr(0,e);if(e==this.size)return Sr(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let n=0,r=0;;n++){let o=this.child(n),i=r+o.nodeSize;if(i>=e)return i==e?Sr(n+1,i):Sr(n,r);r=i}}toString(){return"<"+this.toStringInner()+">"}toStringILine truncated
|
||||
`)}};Ft.empty=new Ft(!0);var Ti=class{constructor(e,n){this.string=e,this.nodeTypes=n,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}};function ya(t){let e=[];do e.push(Uh(t));while(t.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function Uh(t){let e=[];do e.push(Jh(t));while(t.next&&t.next!=")"&&t.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function Jh(t){let e=Yh(t);for(;;)if(t.eat("+"))e={type:"plus",expr:e};else if(t.eat("*"))e={type:"star",expr:e};else if(t.eat("?"))e={type:"opt",expr:e};else if(t.eat("{"))e=qh(t,e);else break;return e}function ta(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");let e=Number(t.next);return t.pos++,e}function qh(t,e){let n=ta(t),r=n;return t.eat(",")&&(t.next!="}"?r=ta(t):r=-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:e}}function Gh(t,e){let n=t.nodeTypes,r=n[e];if(r)return[r];let o=[];for(let i in n){let s=n[i];s.isInGroup(e)&&o.push(s)}return o.length==0&&t.err("No node type or group '"+e+"' found"),o}function Yh(t){if(t.eat("(")){let e=ya(t);return t.eat(")")||t.err("Missing closing paren"),e}else if(/\W/.test(t.next))t.err("Unexpected token '"+t.next+"'");else{let e=Gh(t,t.next).map(n=>(t.inline==null?t.inline=n.isInline:t.inline!=n.isInline&&t.err("Mixing inline and block content"),{type:"name",value:n}));return t.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}function Xh(t){let e=[[]];return o(i(t,0),n()),e;function n(){return e.push([])-1}function r(s,l,a){let c={term:a,to:l};return e[s].push(c),c}function o(s,l){s.forEach(a=>a.to=l)}function i(s,l){if(s.type=="choice")return s.exprs.reduce((a,c)=>a.concat(i(c,l)),[]);if(s.type=="seq")for(let a=0;;a++){let c=i(s.exprs[a],l);if(a==s.exprs.length-1)return c;o(c,l=n())}else if(s.type=="star"){let a=n();return r(l,a),o(i(s.expr,a),a),[r(a)]}else if(s.type=="plus"){let a=n();return o(i(s.expr,l),a),o(i(s.expr,a),a),[r(a)]}else{if(s.type=="opt")return[r(l)].concat(i(s.expr,l));if(s.type=="range"){let a=l;for(let c=0;c<s.min;c++){let d=n();o(i(s.expr,a),d),a=d}if(s.max==-1)o(i(s.expr,a),a);else for(let c=s.min;c<s.max;c++){let d=n();r(a,d),o(i(s.expr,a),d),a=d}return[r(a)]}else{if(s.type=="name")return[r(l,void 0,s.value)];throw new Error("Unknown expr type")}}}}function ba(t,e){return e-t}function na(t,e){let n=[];return r(e),n.sort(ba);function r(o){let i=t[o];if(i.length==1&&!i[0].term)return r(i[0].to);n.push(o);for(let s=0;s<i.length;s++){let{term:l,to:a}=i[s];!l&&n.indexOf(a)==-1&&r(a)}}}function Qh(t){let e=Object.create(null);return n(na(t,0));function n(r){let o=[];r.forEach(s=>{t[s].forEach(({term:l,to:a})=>{if(!l)return;let c;for(let d=0;d<o.length;d++)o[d][0]==l&&(c=o[d][1]);na(t,a).forEach(d=>{c||o.push([l,c=[]]),c.indexOf(d)==-1&&c.push(d)})})});let i=e[r.join(",")]=new Ft(r.indexOf(t.length-1)>-1);for(let s=0;s<o.length;s++){let l=o[s][1].sort(ba);i.next.push({type:o[s][0],next:e[l.join(",")]||n(l)})}return i}}function Zh(t,e){for(let n=0,r=[t];n<r.length;n++){let o=r[n],i=!o.validEnd,s=[];for(let l=0;l<o.next.length;l++){let{type:a,next:c}=o.next[l];s.push(a.name),i&&!(a.isText||a.hasRequiredAttrs())&&(i=!1),r.indexOf(c)==-1&&r.push(c)}i&&e.err("Only non-generatable nodes ("+s.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function xa(t){let e=Object.create(null);for(let n in t){let r=t[n];if(!r.hasDefault)return null;e[n]=r.default}return e}function wa(t,e){let n=Object.create(null);for(let r in t){let o=e&&e[r];if(o===void 0){let i=t[r];if(i.hasDefault)o=i.default;else throw new RangeError("No value supplied for attribute "+r)}n[r]=o}return n}function Sa(t,e,n,r){for(let o in e)if(!(o in t))throw new RangeError(`Unsupported attribute ${o} for ${n} of type ${o}`);for(let o in t){let i=t[o];i.validate&&i.validate(e[o])}}function ka(t,e){let n=Object.create(null);if(e)for(let r in e)n[r]=new Ai(t,r,e[r]);return n}var Tr=class t{constructor(e,n,r){this.name=e,this.schema=n,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=ka(e,r.attrs),this.defaultAttrs=xa(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(r.inline||e=="text"),this.isText=e=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==Ft.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(e){return this.groups.indexOf(e)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.def
Line truncated
|
||||
function he(t){this.content=t}he.prototype={constructor:he,find:function(t){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===t)return e;return-1},get:function(t){var e=this.find(t);return e==-1?void 0:this.content[e+1]},update:function(t,e,n){var r=n&&n!=t?this.remove(n):this,o=r.find(t),i=r.content.slice();return o==-1?i.push(n||t,e):(i[o+1]=e,n&&(i[o]=n)),new he(i)},remove:function(t){var e=this.find(t);if(e==-1)return this;var n=this.content.slice();return n.splice(e,2),new he(n)},addToStart:function(t,e){return new he([t,e].concat(this.remove(t).content))},addToEnd:function(t,e){var n=this.remove(t).content.slice();return n.push(t,e),new he(n)},addBefore:function(t,e,n){var r=this.remove(e),o=r.content.slice(),i=r.find(t);return o.splice(i==-1?o.length:i,0,e,n),new he(o)},forEach:function(t){for(var e=0;e<this.content.length;e+=2)t(this.content[e],this.content[e+1])},prepend:function(t){return t=he.from(t),t.size?new he(t.content.concat(this.subtract(t).content)):this},append:function(t){return t=he.from(t),t.size?new he(this.subtract(t).content.concat(t.content)):this},subtract:function(t){var e=this;t=he.from(t);for(var n=0;n<t.content.length;n+=2)e=e.remove(t.content[n]);return e},toObject:function(){var t={};return this.forEach(function(e,n){t[e]=n}),t},get size(){return this.content.length>>1}};he.from=function(t){if(t instanceof he)return t;var e=[];if(t)for(var n in t)e.push(n,t[n]);return new he(e)};var wi=he;function ca(t,e,n){for(let r=0;;r++){if(r==t.childCount||r==e.childCount)return t.childCount==e.childCount?null:n;let o=t.child(r),i=e.child(r);if(o==i){n+=o.nodeSize;continue}if(!o.sameMarkup(i))return n;if(o.isText&&o.text!=i.text){for(let s=0;o.text[s]==i.text[s];s++)n++;return n}if(o.content.size||i.content.size){let s=ca(o.content,i.content,n+1);if(s!=null)return s}n+=o.nodeSize}}function da(t,e,n,r){for(let o=t.childCount,i=e.childCount;;){if(o==0||i==0)return o==i?null:{a:n,b:r};let s=t.child(--o),l=e.child(--i),a=s.nodeSize;if(s==l){n-=a,r-=a;continue}if(!s.sameMarkup(l))return{a:n,b:r};if(s.isText&&s.text!=l.text){let c=0,d=Math.min(s.text.length,l.text.length);for(;c<d&&s.text[s.text.length-c-1]==l.text[l.text.length-c-1];)c++,n--,r--;return{a:n,b:r}}if(s.content.size||l.content.size){let c=da(s.content,l.content,n-1,r-1);if(c)return c}n-=a,r-=a}}var x=class t{constructor(e,n){if(this.content=e,this.size=n||0,n==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,n,r,o=0,i){for(let s=0,l=0;l<n;s++){let a=this.content[s],c=l+a.nodeSize;if(c>e&&r(a,o+l,i||null,s)!==!1&&a.content.size){let d=l+1;a.nodesBetween(Math.max(0,e-d),Math.min(a.content.size,n-d),r,o+d)}l=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,n,r,o){let i="",s=!0;return this.nodesBetween(e,n,(l,a)=>{let c=l.isText?l.text.slice(Math.max(e,a)-a,n-a):l.isLeaf?o?typeof o=="function"?o(l):o:l.type.spec.leafText?l.type.spec.leafText(l):"":"";l.isBlock&&(l.isLeaf&&c||l.isTextblock)&&r&&(s?s=!1:i+=r),i+=c},0),i}append(e){if(!e.size)return this;if(!this.size)return e;let n=this.lastChild,r=e.firstChild,o=this.content.slice(),i=0;for(n.isText&&n.sameMarkup(r)&&(o[o.length-1]=n.withText(n.text+r.text),i=1);i<e.content.length;i++)o.push(e.content[i]);return new t(o,this.size+e.size)}cut(e,n=this.size){if(e==0&&n==this.size)return this;let r=[],o=0;if(n>e)for(let i=0,s=0;s<n;i++){let l=this.content[i],a=s+l.nodeSize;a>e&&((s<e||a>n)&&(l.isText?l=l.cut(Math.max(0,e-s),Math.min(l.text.length,n-s)):l=l.cut(Math.max(0,e-s-1),Math.min(l.content.size,n-s-1))),r.push(l),o+=l.nodeSize),s=a}return new t(r,o)}cutByIndex(e,n){return e==n?t.empty:e==0&&n==this.content.length?this:new t(this.content.slice(e,n))}replaceChild(e,n){let r=this.content[e];if(r==n)return this;let o=this.content.slice(),i=this.size+n.nodeSize-r.nodeSize;return o[e]=n,new t(o,i)}addToStart(e){return new t([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new t(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let n=0;n<this.content.length;n++)if(!this.content[n].eq(e.content[n]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let n=this.content[e];if(!n)throw new RangeError("Index "+e+" out of range for "+this);return n}maybeChild(e){return this.content[e]||null}forEach(e){for(let n=0,r=0;n<this.content.length;n++){let o=this.content[n];e(o,r,n),r+=o.nodeSize}}findDiffStart(e,n=0){return ca(this,e,n)}findDiffEnd(e,n=this.size,r=e.size){return da(this,e,n,r)}findIndex(e){if(e==0)return Sr(0,e);if(e==this.size)return Sr(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let n=0,r=0;;n++){let o=this.child(n),i=r+o.nodeSize;if(i>=e)return i==e?Sr(n+1,i):Sr(n,r);r=i}}toString(){return"<"+this.toStringInner()+">"}toStringILine truncated
|
||||
`)}};Ft.empty=new Ft(!0);var Ti=class{constructor(e,n){this.string=e,this.nodeTypes=n,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}};function ya(t){let e=[];do e.push(Uh(t));while(t.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function Uh(t){let e=[];do e.push(Jh(t));while(t.next&&t.next!=")"&&t.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function Jh(t){let e=Yh(t);for(;;)if(t.eat("+"))e={type:"plus",expr:e};else if(t.eat("*"))e={type:"star",expr:e};else if(t.eat("?"))e={type:"opt",expr:e};else if(t.eat("{"))e=qh(t,e);else break;return e}function ta(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");let e=Number(t.next);return t.pos++,e}function qh(t,e){let n=ta(t),r=n;return t.eat(",")&&(t.next!="}"?r=ta(t):r=-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:e}}function Gh(t,e){let n=t.nodeTypes,r=n[e];if(r)return[r];let o=[];for(let i in n){let s=n[i];s.isInGroup(e)&&o.push(s)}return o.length==0&&t.err("No node type or group '"+e+"' found"),o}function Yh(t){if(t.eat("(")){let e=ya(t);return t.eat(")")||t.err("Missing closing paren"),e}else if(/\W/.test(t.next))t.err("Unexpected token '"+t.next+"'");else{let e=Gh(t,t.next).map(n=>(t.inline==null?t.inline=n.isInline:t.inline!=n.isInline&&t.err("Mixing inline and block content"),{type:"name",value:n}));return t.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}function Xh(t){let e=[[]];return o(i(t,0),n()),e;function n(){return e.push([])-1}function r(s,l,a){let c={term:a,to:l};return e[s].push(c),c}function o(s,l){s.forEach(a=>a.to=l)}function i(s,l){if(s.type=="choice")return s.exprs.reduce((a,c)=>a.concat(i(c,l)),[]);if(s.type=="seq")for(let a=0;;a++){let c=i(s.exprs[a],l);if(a==s.exprs.length-1)return c;o(c,l=n())}else if(s.type=="star"){let a=n();return r(l,a),o(i(s.expr,a),a),[r(a)]}else if(s.type=="plus"){let a=n();return o(i(s.expr,l),a),o(i(s.expr,a),a),[r(a)]}else{if(s.type=="opt")return[r(l)].concat(i(s.expr,l));if(s.type=="range"){let a=l;for(let c=0;c<s.min;c++){let d=n();o(i(s.expr,a),d),a=d}if(s.max==-1)o(i(s.expr,a),a);else for(let c=s.min;c<s.max;c++){let d=n();r(a,d),o(i(s.expr,a),d),a=d}return[r(a)]}else{if(s.type=="name")return[r(l,void 0,s.value)];throw new Error("Unknown expr type")}}}}function ba(t,e){return e-t}function na(t,e){let n=[];return r(e),n.sort(ba);function r(o){let i=t[o];if(i.length==1&&!i[0].term)return r(i[0].to);n.push(o);for(let s=0;s<i.length;s++){let{term:l,to:a}=i[s];!l&&n.indexOf(a)==-1&&r(a)}}}function Qh(t){let e=Object.create(null);return n(na(t,0));function n(r){let o=[];r.forEach(s=>{t[s].forEach(({term:l,to:a})=>{if(!l)return;let c;for(let d=0;d<o.length;d++)o[d][0]==l&&(c=o[d][1]);na(t,a).forEach(d=>{c||o.push([l,c=[]]),c.indexOf(d)==-1&&c.push(d)})})});let i=e[r.join(",")]=new Ft(r.indexOf(t.length-1)>-1);for(let s=0;s<o.length;s++){let l=o[s][1].sort(ba);i.next.push({type:o[s][0],next:e[l.join(",")]||n(l)})}return i}}function Zh(t,e){for(let n=0,r=[t];n<r.length;n++){let o=r[n],i=!o.validEnd,s=[];for(let l=0;l<o.next.length;l++){let{type:a,next:c}=o.next[l];s.push(a.name),i&&!(a.isText||a.hasRequiredAttrs())&&(i=!1),r.indexOf(c)==-1&&r.push(c)}i&&e.err("Only non-generatable nodes ("+s.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function xa(t){let e=Object.create(null);for(let n in t){let r=t[n];if(!r.hasDefault)return null;e[n]=r.default}return e}function wa(t,e){let n=Object.create(null);for(let r in t){let o=e&&e[r];if(o===void 0){let i=t[r];if(i.hasDefault)o=i.default;else throw new RangeError("No value supplied for attribute "+r)}n[r]=o}return n}function Sa(t,e,n,r){for(let o in e)if(!(o in t))throw new RangeError(`Unsupported attribute ${o} for ${n} of type ${o}`);for(let o in t){let i=t[o];i.validate&&i.validate(e[o])}}function ka(t,e){let n=Object.create(null);if(e)for(let r in e)n[r]=new Ai(t,r,e[r]);return n}var Tr=class t{constructor(e,n,r){this.name=e,this.schema=n,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=ka(e,r.attrs),this.defaultAttrs=xa(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(r.inline||e=="text"),this.isText=e=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==Ft.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(e){return this.groups.indexOf(e)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.def
Line truncated
|
||||
`);else if(r=r.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(r)&&this.open==this.nodes.length-1){let s=o.content[o.content.length-1],l=e.previousSibling;(!s||l&&l.nodeName=="BR"||s.isText&&/[ \t\r\n\u000c]$/.test(s.text))&&(r=r.slice(1))}r&&this.insertNode(this.parser.schema.text(r),n,!/\S/.test(r)),this.findInText(e)}else this.findInside(e)}addElement(e,n,r){let o=this.localPreserveWS,i=this.top;(e.tagName=="PRE"||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let s=e.nodeName.toLowerCase(),l;Ma.hasOwnProperty(s)&&this.parser.normalizeLists&&op(e);let a=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(l=this.parser.matchTag(e,this,r));e:if(a?a.ignore:rp.hasOwnProperty(s))this.findInside(e),this.ignoreFallback(e,n);else if(!a||a.skip||a.closeParent){a&&a.closeParent?this.open=Math.max(0,this.open-1):a&&a.skip.nodeType&&(e=a.skip);let c,d=this.needsBlock;if(Ca.hasOwnProperty(s))i.content.length&&i.content[0].isInline&&this.open&&(this.open--,i=this.top),c=!0,i.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,n);break e}let u=a&&a.skip?n:this.readStyles(e,n);u&&this.addAll(e,u),c&&this.sync(i),this.needsBlock=d}else{let c=this.readStyles(e,n);c&&this.addElementByRule(e,a,c,a.consuming===!1?l:void 0)}this.localPreserveWS=o}leafFallback(e,n){e.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(`
|
||||
`),n)}ignoreFallback(e,n){e.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),n,!0)}readStyles(e,n){let r=e.style;if(r&&r.length)for(let o=0;o<this.parser.matchedStyles.length;o++){let i=this.parser.matchedStyles[o],s=r.getPropertyValue(i);if(s)for(let l=void 0;;){let a=this.parser.matchStyle(i,s,this,l);if(!a)break;if(a.ignore)return null;if(a.clearMark?n=n.filter(c=>!a.clearMark(c)):n=n.concat(this.parser.schema.marks[a.mark].create(a.attrs)),a.consuming===!1)l=a;else break}}return n}addElementByRule(e,n,r,o){let i,s;if(n.node)if(s=this.parser.schema.nodes[n.node],s.isLeaf)this.insertNode(s.create(n.attrs),r,e.nodeName=="BR")||this.leafFallback(e,r);else{let a=this.enter(s,n.attrs||null,r,n.preserveWhitespace);a&&(i=!0,r=a)}else{let a=this.parser.schema.marks[n.mark];r=r.concat(a.create(n.attrs))}let l=this.top;if(s&&s.isLeaf)this.findInside(e);else if(o)this.addElement(e,r,o);else if(n.getContent)this.findInside(e),n.getContent(e,this.parser.schema).forEach(a=>this.insertNode(a,r,!1));else{let a=e;typeof n.contentElement=="string"?a=e.querySelector(n.contentElement):typeof n.contentElement=="function"?a=n.contentElement(e):n.contentElement&&(a=n.contentElement),this.findAround(e,a,!0),this.addAll(a,r),this.findAround(e,a,!1)}i&&this.sync(l)&&this.open--}addAll(e,n,r,o){let i=r||0;for(let s=r?e.childNodes[r]:e.firstChild,l=o==null?null:e.childNodes[o];s!=l;s=s.nextSibling,++i)this.findAtPoint(e,i),this.addDOM(s,n);this.findAtPoint(e,i)}findPlace(e,n,r){let o,i;for(let s=this.open,l=0;s>=0;s--){let a=this.nodes[s],c=a.findWrapping(e);if(c&&(!o||o.length>c.length+l)&&(o=c,i=a,!c.length))break;if(a.solid){if(r)break;l+=2}}if(!o)return null;this.sync(i);for(let s=0;s<o.length;s++)n=this.enterInner(o[s],null,n,!1);return n}insertNode(e,n,r){if(e.isInline&&this.needsBlock&&!this.top.type){let i=this.textblockFromContext();i&&(n=this.enterInner(i,null,n))}let o=this.findPlace(e,n,r);if(o){this.closeExtra();let i=this.top;i.match&&(i.match=i.match.matchType(e.type));let s=K.none;for(let l of o.concat(e.marks))(i.type?i.type.allowsMarkType(l.type):sa(l.type,e.type))&&(s=l.addToSet(s));return i.content.push(e.mark(s)),!0}return!1}enter(e,n,r,o){let i=this.findPlace(e.create(n),r,!1);return i&&(i=this.enterInner(e,n,r,!0,o)),i}enterInner(e,n,r,o=!1,i){this.closeExtra();let s=this.top;s.match=s.match&&s.match.matchType(e);let l=oa(e,i,s.options);s.options&Rn&&s.content.length==0&&(l|=Rn);let a=K.none;return r=r.filter(c=>(s.type?s.type.allowsMarkType(c.type):sa(c.type,e))?(a=c.addToSet(a),!1):!0),this.nodes.push(new sn(e,n,a,o,null,l)),this.open++,r}closeExtra(e=!1){let n=this.nodes.length-1;if(n>this.open){for(;n>this.open;n--)this.nodes[n-1].content.push(this.nodes[n].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(e){for(let n=this.open;n>=0;n--){if(this.nodes[n]==e)return this.open=n,!0;this.localPreserveWS&&(this.nodes[n].options|=Pn)}return!1}get currentPos(){this.closeExtra();let e=0;for(let n=this.open;n>=0;n--){let r=this.nodes[n].content;for(let o=r.length-1;o>=0;o--)e+=r[o].nodeSize;n&&e++}return e}findAtPoint(e,n){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==e&&this.find[r].offset==n&&(this.find[r].pos=this.currentPos)}findInside(e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].pos==null&&e.nodeType==1&&e.contains(this.find[n].node)&&(this.find[n].pos=this.currentPos)}findAround(e,n,r){if(e!=n&&this.find)for(let o=0;o<this.find.length;o++)this.find[o].pos==null&&e.nodeType==1&&e.contains(this.find[o].node)&&n.compareDocumentPosition(this.find[o].node)&(r?2:4)&&(this.find[o].pos=this.currentPos)}findInText(e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==e&&(this.find[n].pos=this.currentPos-(e.nodeValue.length-this.find[n].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let n=e.split("/"),r=this.options.context,o=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),i=-(r?r.depth+1:0)+(o?0:1),s=(l,a)=>{for(;l>=0;l--){let c=n[l];if(c==""){if(l==n.length-1||l==0)continue;for(;a>=i;a--)if(s(l-1,a))return!0;return!1}else{let d=a>0||a==0&&o?this.nodes[a].type:r&&a>=i?r.node(a-i).type:null;if(!d||d.name!=c&&!d.isInGroup(c))return!1;a--}}return!0};return s(n.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let n=e.depth;n>=0;n--){let r=e.node(n).contentMatchAt(e.indexAfter(n)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let n in this.parser.schema.nodes){let r=this.parser.schema.nodes[n];if(r.isTextblock&&r.defaultAttrs)return r}}};function op(t){for(let e=t.firstChild,n=null;e;e=e.nextSibling){let r=e.nodeType==1?e.nodeName.toLowerCase():null;r&&Ma.hasOwnProperty(r)&&n?(n.appendChild(e),e=n):r=="li"?n=e:r&&(n=null)}}function ip(t,e){return(t.matches||t.msMatchesSelector||t.webkitM
Line truncated
|
||||
`))}})}function bp(t,e,n){let r=t.resolve(e),o=r.index();return r.parent.canReplaceWith(o,o+1,n)}function xp(t,e,n,r,o){let i=t.doc.nodeAt(e);if(!i)throw new RangeError("No node at given position");n||(n=i.type);let s=n.create(r,null,o||i.marks);if(i.isLeaf)return t.replaceWith(e,e+i.nodeSize,s);if(!n.validContent(i.content))throw new RangeError("Invalid content for node type "+n.name);t.step(new re(e,e+i.nodeSize,e+1,e+i.nodeSize-1,new E(w.from(s),0,0),1,!0))}function Ae(t,e,n=1,r){let o=t.resolve(e),i=o.depth-n,s=r&&r[r.length-1]||o.parent;if(i<0||o.parent.type.spec.isolating||!o.parent.canReplace(o.index(),o.parent.childCount)||!s.type.validContent(o.parent.content.cutByIndex(o.index(),o.parent.childCount)))return!1;for(let c=o.depth-1,d=n-2;c>i;c--,d--){let u=o.node(c),f=o.index(c);if(u.type.spec.isolating)return!1;let h=u.content.cutByIndex(f,u.childCount),p=r&&r[d+1];p&&(h=h.replaceChild(0,p.type.create(p.attrs)));let m=r&&r[d]||u;if(!u.canReplace(f+1,u.childCount)||!m.type.validContent(h))return!1}let l=o.indexAfter(i),a=r&&r[0];return o.node(i).canReplaceWith(l,l,a?a.type:o.node(i+1).type)}function wp(t,e,n=1,r){let o=t.doc.resolve(e),i=w.empty,s=w.empty;for(let l=o.depth,a=o.depth-n,c=n-1;l>a;l--,c--){i=w.from(o.node(l).copy(i));let d=r&&r[c];s=w.from(d?d.type.create(d.attrs,s):o.node(l).copy(s))}t.step(new pe(e,e,new E(i.append(s),n,n),!0))}function Ne(t,e){let n=t.resolve(e),r=n.index();return Ia(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function Sp(t,e){e.content.size||t.type.compatibleContent(e.type);let n=t.contentMatchAt(t.childCount),{linebreakReplacement:r}=t.type.schema;for(let o=0;o<e.childCount;o++){let i=e.child(o),s=i.type==r?t.type.schema.nodes.text:i.type;if(n=n.matchType(s),!n||!t.type.allowsMarks(i.marks))return!1}return n.validEnd}function Ia(t,e){return!!(t&&e&&!t.isLeaf&&Sp(t,e))}function $t(t,e,n=-1){let r=t.resolve(e);for(let o=r.depth;;o--){let i,s,l=r.index(o);if(o==r.depth?(i=r.nodeBefore,s=r.nodeAfter):n>0?(i=r.node(o+1),l++,s=r.node(o).maybeChild(l)):(i=r.node(o).maybeChild(l-1),s=r.node(o+1)),i&&!i.isTextblock&&Ia(i,s)&&r.node(o).canReplace(l,l+1))return e;if(o==0)break;e=n<0?r.before(o):r.after(o)}}function kp(t,e,n){let r=null,{linebreakReplacement:o}=t.doc.type.schema,i=t.doc.resolve(e-n),s=i.node().type;if(o&&s.inlineContent){let d=s.whitespace=="pre",u=!!s.contentMatch.matchType(o);d&&!u?r=!1:!d&&u&&(r=!0)}let l=t.steps.length;if(r===!1){let d=t.doc.resolve(e+n);Pa(t,d.node(),d.before(),l)}s.inlineContent&&Li(t,e+n-1,s,i.node().contentMatchAt(i.index()),r==null);let a=t.mapping.slice(l),c=a.map(e-n);if(t.step(new pe(c,a.map(e+n,-1),E.empty,!0)),r===!0){let d=t.doc.resolve(c);Da(t,d.node(),d.before(),t.steps.length)}return t}function Cp(t,e,n){let r=t.resolve(e);if(r.parent.canReplaceWith(r.index(),r.index(),n))return e;if(r.parentOffset==0)for(let o=r.depth-1;o>=0;o--){let i=r.index(o);if(r.node(o).canReplaceWith(i,i,n))return r.before(o+1);if(i>0)return null}if(r.parentOffset==r.parent.content.size)for(let o=r.depth-1;o>=0;o--){let i=r.indexAfter(o);if(r.node(o).canReplaceWith(i,i,n))return r.after(o+1);if(i<r.node(o).childCount)return null}return null}function Rr(t,e,n){let r=t.resolve(e);if(!n.content.size)return e;let o=n.content;for(let i=0;i<n.openStart;i++)o=o.firstChild.content;for(let i=1;i<=(n.openStart==0&&n.size?2:1);i++)for(let s=r.depth;s>=0;s--){let l=s==r.depth?0:r.pos<=(r.start(s+1)+r.end(s+1))/2?-1:1,a=r.index(s)+(l>0?1:0),c=r.node(s),d=!1;if(i==1)d=c.canReplace(a,a,o);else{let u=c.contentMatchAt(a).findWrapping(o.firstChild.type);d=u&&c.canReplaceWith(a,a,u[0])}if(d)return l==0?r.pos:l<0?r.before(s+1):r.after(s+1)}return null}function $n(t,e,n=e,r=E.empty){if(e==n&&!r.size)return null;let o=t.resolve(e),i=t.resolve(n);return La(o,i,r)?new pe(e,n,r):new Pi(o,i,r).fit()}function La(t,e,n){return!n.openStart&&!n.openEnd&&t.start()==e.start()&&t.parent.canReplace(t.index(),e.index(),n.content)}var Pi=class{constructor(e,n,r){this.$from=e,this.$to=n,this.unplaced=r,this.frontier=[],this.placed=w.empty;for(let o=0;o<=e.depth;o++){let i=e.node(o);this.frontier.push({type:i.type,match:i.contentMatchAt(e.indexAfter(o))})}for(let o=e.depth;o>0;o--)this.placed=w.from(e.node(o).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let c=this.findFittable();c?this.placeNodes(c):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,r=this.$from,o=this.close(e<0?this.$to:r.doc.resolve(e));if(!o)return null;let i=this.placed,s=r.depth,l=o.depth;for(;s&&l&&i.childCount==1;)i=i.firstChild.content,s--,l--;let a=new E(i,s,l);return e>-1?new re(r.pos,e,this.$to.pos,this.$to.end(),a,n):a.size||r.pos!=this.$to.pos?new pe(r.pos,o.pos,a):null}findFittable(){let e=this.unplaced.openStart;for(let n=this.unplaced.content,r=0,o=this.unplaced.openEnd;r<e;r++){let i=n.firstChild;if(n.childCount>1&&(o=0),i.type.spec.isolating&&o<=r){e=r;break}n=i.content}for(let n=1;n<=2;n++
Line truncated
|
||||
`),u&&p==h.nodeValue.length)for(let m=h,g;m;m=m.parentNode){if(g=m.nextSibling){g.nodeName=="BR"&&(l=a={node:g.parentNode,offset:de(g)+1});break}let y=m.pmViewDesc;if(y&&y.node&&y.node.isBlock)break}}else{let m=h.childNodes[p-1];u=m&&(m.nodeName=="BR"||m.contentEditable=="false")}}if(Pe&&d.focusNode&&d.focusNode!=a.node&&d.focusNode.nodeType==1){let h=d.focusNode.childNodes[d.focusOffset];h&&h.contentEditable=="false"&&(o=!0)}if(!(o||u&&xe)&&qt(l.node,l.offset,d.anchorNode,d.anchorOffset)&&qt(a.node,a.offset,d.focusNode,d.focusOffset))return;let f=!1;if((c.extend||e==n)&&!(u&&Pe)){c.collapse(l.node,l.offset);try{e!=n&&c.extend(a.node,a.offset),f=!0}catch{}}if(!f){if(e>n){let p=l;l=a,a=p}let h=document.createRange();h.setEnd(a.node,a.offset),h.setStart(l.node,l.offset),c.removeAllRanges(),c.addRange(h)}}ignoreMutation(e){return!this.contentDOM&&e.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,n){for(let r=0,o=0;o<this.children.length;o++){let i=this.children[o],s=r+i.size;if(r==s?e<=s&&n>=r:e<s&&n>r){let l=r+i.border,a=s-i.border;if(e>=l&&n<=a){this.dirty=e==r||n==s?Wt:ec,e==l&&n==a&&(i.contentLost||i.dom.parentNode!=this.contentDOM)?i.dirty=qe:i.markDirty(e-l,n-l);return}else i.dirty=i.dom==i.contentDOM&&i.dom.parentNode==this.contentDOM&&!i.children.length?Wt:qe}r=s}this.dirty=Wt}markParentsDirty(){let e=1;for(let n=this.parent;n;n=n.parent,e++){let r=e==1?Wt:ec;n.dirty<r&&(n.dirty=r)}}get domAtom(){return!1}get ignoreForCoords(){return!1}get ignoreForSelection(){return!1}isText(e){return!1}},Lr=class extends Gt{constructor(e,n,r,o){let i,s=n.type.toDOM;if(typeof s=="function"&&(s=s(r,()=>{if(!i)return o;if(i.parent)return i.parent.posBeforeChild(i)})),!n.type.spec.raw){if(s.nodeType!=1){let l=document.createElement("span");l.appendChild(s),s=l}s.contentEditable="false",s.classList.add("ProseMirror-widget")}super(e,[],s,null),this.widget=n,this.widget=n,i=this}matchesWidget(e){return this.dirty==Ie&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let n=this.widget.spec.stopEvent;return n?n(e):!1}ignoreMutation(e){return e.type!="selection"||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get ignoreForSelection(){return!!this.widget.type.spec.relaxedSide}get side(){return this.widget.type.side}},Gi=class extends Gt{constructor(e,n,r,o){super(e,[],n,null),this.textDOM=r,this.text=o}get size(){return this.text.length}localPosFromDOM(e,n){return e!=this.textDOM?this.posAtStart+(n?this.size:0):this.posAtStart+n}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return e.type==="characterData"&&e.target.nodeValue==e.oldValue}},xn=class t extends Gt{constructor(e,n,r,o,i){super(e,[],r,o),this.mark=n,this.spec=i}static create(e,n,r,o){let i=o.nodeViews[n.type.name],s=i&&i(n,o,r);return(!s||!s.dom)&&(s=it.renderSpec(document,n.type.spec.toDOM(n,r),null,n.attrs)),new t(e,n,s.dom,s.contentDOM||s.dom,s)}parseRule(){return this.dirty&qe||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return this.dirty!=qe&&this.mark.eq(e)}markDirty(e,n){if(super.markDirty(e,n),this.dirty!=Ie){let r=this.parent;for(;!r.node;)r=r.parent;r.dirty<this.dirty&&(r.dirty=this.dirty),this.dirty=Ie}}slice(e,n,r){let o=t.create(this.parent,this.mark,!0,r),i=this.children,s=this.size;n<s&&(i=Zi(i,n,s,r)),e>0&&(i=Zi(i,0,e,r));for(let l=0;l<i.length;l++)i[l].parent=o;return o.children=i,o}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}},At=class t extends Gt{constructor(e,n,r,o,i,s,l,a,c){super(e,[],i,s),this.node=n,this.outerDeco=r,this.innerDeco=o,this.nodeDOM=l}static create(e,n,r,o,i,s){let l=i.nodeViews[n.type.name],a,c=l&&l(n,i,()=>{if(!a)return s;if(a.parent)return a.parent.posBeforeChild(a)},r,o),d=c&&c.dom,u=c&&c.contentDOM;if(n.isText){if(!d)d=document.createTextNode(n.text);else if(d.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else d||({dom:d,contentDOM:u}=it.renderSpec(document,n.type.spec.toDOM(n),null,n.attrs));!u&&!n.isText&&d.nodeName!="BR"&&(d.hasAttribute("contenteditable")||(d.contentEditable="false"),n.type.spec.draggable&&(d.draggable=!0));let f=d;return d=Bc(d,r,n),c?a=new Yi(e,n,r,o,d,u||null,f,c,i,s+1):n.isText?new Br(e,n,r,o,d,f,i):new t(e,n,r,o,d,u||null,f,i,s+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let e={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(e.preserveWhitespace="full"),!this.contentDOM)e.getContent=()=>this.node.content;else if(!this.contentLost)e.contentElement=this.contentDOM;else{for(let n=this.children.length-1;n>=0;n--){let r=this.children[n];if(this.dom.contains(r.dom.parentNode)){e.contentElement=r.dom.parentNode;b
Line truncated
|
||||
`),n)}ignoreFallback(e,n){e.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),n,!0)}readStyles(e,n){let r=e.style;if(r&&r.length)for(let o=0;o<this.parser.matchedStyles.length;o++){let i=this.parser.matchedStyles[o],s=r.getPropertyValue(i);if(s)for(let l=void 0;;){let a=this.parser.matchStyle(i,s,this,l);if(!a)break;if(a.ignore)return null;if(a.clearMark?n=n.filter(c=>!a.clearMark(c)):n=n.concat(this.parser.schema.marks[a.mark].create(a.attrs)),a.consuming===!1)l=a;else break}}return n}addElementByRule(e,n,r,o){let i,s;if(n.node)if(s=this.parser.schema.nodes[n.node],s.isLeaf)this.insertNode(s.create(n.attrs),r,e.nodeName=="BR")||this.leafFallback(e,r);else{let a=this.enter(s,n.attrs||null,r,n.preserveWhitespace);a&&(i=!0,r=a)}else{let a=this.parser.schema.marks[n.mark];r=r.concat(a.create(n.attrs))}let l=this.top;if(s&&s.isLeaf)this.findInside(e);else if(o)this.addElement(e,r,o);else if(n.getContent)this.findInside(e),n.getContent(e,this.parser.schema).forEach(a=>this.insertNode(a,r,!1));else{let a=e;typeof n.contentElement=="string"?a=e.querySelector(n.contentElement):typeof n.contentElement=="function"?a=n.contentElement(e):n.contentElement&&(a=n.contentElement),this.findAround(e,a,!0),this.addAll(a,r),this.findAround(e,a,!1)}i&&this.sync(l)&&this.open--}addAll(e,n,r,o){let i=r||0;for(let s=r?e.childNodes[r]:e.firstChild,l=o==null?null:e.childNodes[o];s!=l;s=s.nextSibling,++i)this.findAtPoint(e,i),this.addDOM(s,n);this.findAtPoint(e,i)}findPlace(e,n,r){let o,i;for(let s=this.open,l=0;s>=0;s--){let a=this.nodes[s],c=a.findWrapping(e);if(c&&(!o||o.length>c.length+l)&&(o=c,i=a,!c.length))break;if(a.solid){if(r)break;l+=2}}if(!o)return null;this.sync(i);for(let s=0;s<o.length;s++)n=this.enterInner(o[s],null,n,!1);return n}insertNode(e,n,r){if(e.isInline&&this.needsBlock&&!this.top.type){let i=this.textblockFromContext();i&&(n=this.enterInner(i,null,n))}let o=this.findPlace(e,n,r);if(o){this.closeExtra();let i=this.top;i.match&&(i.match=i.match.matchType(e.type));let s=K.none;for(let l of o.concat(e.marks))(i.type?i.type.allowsMarkType(l.type):sa(l.type,e.type))&&(s=l.addToSet(s));return i.content.push(e.mark(s)),!0}return!1}enter(e,n,r,o){let i=this.findPlace(e.create(n),r,!1);return i&&(i=this.enterInner(e,n,r,!0,o)),i}enterInner(e,n,r,o=!1,i){this.closeExtra();let s=this.top;s.match=s.match&&s.match.matchType(e);let l=oa(e,i,s.options);s.options&Rn&&s.content.length==0&&(l|=Rn);let a=K.none;return r=r.filter(c=>(s.type?s.type.allowsMarkType(c.type):sa(c.type,e))?(a=c.addToSet(a),!1):!0),this.nodes.push(new sn(e,n,a,o,null,l)),this.open++,r}closeExtra(e=!1){let n=this.nodes.length-1;if(n>this.open){for(;n>this.open;n--)this.nodes[n-1].content.push(this.nodes[n].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(e){for(let n=this.open;n>=0;n--){if(this.nodes[n]==e)return this.open=n,!0;this.localPreserveWS&&(this.nodes[n].options|=Pn)}return!1}get currentPos(){this.closeExtra();let e=0;for(let n=this.open;n>=0;n--){let r=this.nodes[n].content;for(let o=r.length-1;o>=0;o--)e+=r[o].nodeSize;n&&e++}return e}findAtPoint(e,n){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==e&&this.find[r].offset==n&&(this.find[r].pos=this.currentPos)}findInside(e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].pos==null&&e.nodeType==1&&e.contains(this.find[n].node)&&(this.find[n].pos=this.currentPos)}findAround(e,n,r){if(e!=n&&this.find)for(let o=0;o<this.find.length;o++)this.find[o].pos==null&&e.nodeType==1&&e.contains(this.find[o].node)&&n.compareDocumentPosition(this.find[o].node)&(r?2:4)&&(this.find[o].pos=this.currentPos)}findInText(e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==e&&(this.find[n].pos=this.currentPos-(e.nodeValue.length-this.find[n].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let n=e.split("/"),r=this.options.context,o=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),i=-(r?r.depth+1:0)+(o?0:1),s=(l,a)=>{for(;l>=0;l--){let c=n[l];if(c==""){if(l==n.length-1||l==0)continue;for(;a>=i;a--)if(s(l-1,a))return!0;return!1}else{let d=a>0||a==0&&o?this.nodes[a].type:r&&a>=i?r.node(a-i).type:null;if(!d||d.name!=c&&!d.isInGroup(c))return!1;a--}}return!0};return s(n.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let n=e.depth;n>=0;n--){let r=e.node(n).contentMatchAt(e.indexAfter(n)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let n in this.parser.schema.nodes){let r=this.parser.schema.nodes[n];if(r.isTextblock&&r.defaultAttrs)return r}}};function op(t){for(let e=t.firstChild,n=null;e;e=e.nextSibling){let r=e.nodeType==1?e.nodeName.toLowerCase():null;r&&Ma.hasOwnProperty(r)&&n?(n.appendChild(e),e=n):r=="li"?n=e:r&&(n=null)}}function ip(t,e){return(t.matches||t.msMatchesSelector||t.webkitM
Line truncated
|
||||
`))}})}function bp(t,e,n){let r=t.resolve(e),o=r.index();return r.parent.canReplaceWith(o,o+1,n)}function xp(t,e,n,r,o){let i=t.doc.nodeAt(e);if(!i)throw new RangeError("No node at given position");n||(n=i.type);let s=n.create(r,null,o||i.marks);if(i.isLeaf)return t.replaceWith(e,e+i.nodeSize,s);if(!n.validContent(i.content))throw new RangeError("Invalid content for node type "+n.name);t.step(new re(e,e+i.nodeSize,e+1,e+i.nodeSize-1,new O(x.from(s),0,0),1,!0))}function Ae(t,e,n=1,r){let o=t.resolve(e),i=o.depth-n,s=r&&r[r.length-1]||o.parent;if(i<0||o.parent.type.spec.isolating||!o.parent.canReplace(o.index(),o.parent.childCount)||!s.type.validContent(o.parent.content.cutByIndex(o.index(),o.parent.childCount)))return!1;for(let c=o.depth-1,d=n-2;c>i;c--,d--){let u=o.node(c),f=o.index(c);if(u.type.spec.isolating)return!1;let h=u.content.cutByIndex(f,u.childCount),p=r&&r[d+1];p&&(h=h.replaceChild(0,p.type.create(p.attrs)));let m=r&&r[d]||u;if(!u.canReplace(f+1,u.childCount)||!m.type.validContent(h))return!1}let l=o.indexAfter(i),a=r&&r[0];return o.node(i).canReplaceWith(l,l,a?a.type:o.node(i+1).type)}function wp(t,e,n=1,r){let o=t.doc.resolve(e),i=x.empty,s=x.empty;for(let l=o.depth,a=o.depth-n,c=n-1;l>a;l--,c--){i=x.from(o.node(l).copy(i));let d=r&&r[c];s=x.from(d?d.type.create(d.attrs,s):o.node(l).copy(s))}t.step(new pe(e,e,new O(i.append(s),n,n),!0))}function Ne(t,e){let n=t.resolve(e),r=n.index();return Ia(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function Sp(t,e){e.content.size||t.type.compatibleContent(e.type);let n=t.contentMatchAt(t.childCount),{linebreakReplacement:r}=t.type.schema;for(let o=0;o<e.childCount;o++){let i=e.child(o),s=i.type==r?t.type.schema.nodes.text:i.type;if(n=n.matchType(s),!n||!t.type.allowsMarks(i.marks))return!1}return n.validEnd}function Ia(t,e){return!!(t&&e&&!t.isLeaf&&Sp(t,e))}function $t(t,e,n=-1){let r=t.resolve(e);for(let o=r.depth;;o--){let i,s,l=r.index(o);if(o==r.depth?(i=r.nodeBefore,s=r.nodeAfter):n>0?(i=r.node(o+1),l++,s=r.node(o).maybeChild(l)):(i=r.node(o).maybeChild(l-1),s=r.node(o+1)),i&&!i.isTextblock&&Ia(i,s)&&r.node(o).canReplace(l,l+1))return e;if(o==0)break;e=n<0?r.before(o):r.after(o)}}function kp(t,e,n){let r=null,{linebreakReplacement:o}=t.doc.type.schema,i=t.doc.resolve(e-n),s=i.node().type;if(o&&s.inlineContent){let d=s.whitespace=="pre",u=!!s.contentMatch.matchType(o);d&&!u?r=!1:!d&&u&&(r=!0)}let l=t.steps.length;if(r===!1){let d=t.doc.resolve(e+n);Pa(t,d.node(),d.before(),l)}s.inlineContent&&Li(t,e+n-1,s,i.node().contentMatchAt(i.index()),r==null);let a=t.mapping.slice(l),c=a.map(e-n);if(t.step(new pe(c,a.map(e+n,-1),O.empty,!0)),r===!0){let d=t.doc.resolve(c);Da(t,d.node(),d.before(),t.steps.length)}return t}function Cp(t,e,n){let r=t.resolve(e);if(r.parent.canReplaceWith(r.index(),r.index(),n))return e;if(r.parentOffset==0)for(let o=r.depth-1;o>=0;o--){let i=r.index(o);if(r.node(o).canReplaceWith(i,i,n))return r.before(o+1);if(i>0)return null}if(r.parentOffset==r.parent.content.size)for(let o=r.depth-1;o>=0;o--){let i=r.indexAfter(o);if(r.node(o).canReplaceWith(i,i,n))return r.after(o+1);if(i<r.node(o).childCount)return null}return null}function Rr(t,e,n){let r=t.resolve(e);if(!n.content.size)return e;let o=n.content;for(let i=0;i<n.openStart;i++)o=o.firstChild.content;for(let i=1;i<=(n.openStart==0&&n.size?2:1);i++)for(let s=r.depth;s>=0;s--){let l=s==r.depth?0:r.pos<=(r.start(s+1)+r.end(s+1))/2?-1:1,a=r.index(s)+(l>0?1:0),c=r.node(s),d=!1;if(i==1)d=c.canReplace(a,a,o);else{let u=c.contentMatchAt(a).findWrapping(o.firstChild.type);d=u&&c.canReplaceWith(a,a,u[0])}if(d)return l==0?r.pos:l<0?r.before(s+1):r.after(s+1)}return null}function $n(t,e,n=e,r=O.empty){if(e==n&&!r.size)return null;let o=t.resolve(e),i=t.resolve(n);return La(o,i,r)?new pe(e,n,r):new Pi(o,i,r).fit()}function La(t,e,n){return!n.openStart&&!n.openEnd&&t.start()==e.start()&&t.parent.canReplace(t.index(),e.index(),n.content)}var Pi=class{constructor(e,n,r){this.$from=e,this.$to=n,this.unplaced=r,this.frontier=[],this.placed=x.empty;for(let o=0;o<=e.depth;o++){let i=e.node(o);this.frontier.push({type:i.type,match:i.contentMatchAt(e.indexAfter(o))})}for(let o=e.depth;o>0;o--)this.placed=x.from(e.node(o).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let c=this.findFittable();c?this.placeNodes(c):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,r=this.$from,o=this.close(e<0?this.$to:r.doc.resolve(e));if(!o)return null;let i=this.placed,s=r.depth,l=o.depth;for(;s&&l&&i.childCount==1;)i=i.firstChild.content,s--,l--;let a=new O(i,s,l);return e>-1?new re(r.pos,e,this.$to.pos,this.$to.end(),a,n):a.size||r.pos!=this.$to.pos?new pe(r.pos,o.pos,a):null}findFittable(){let e=this.unplaced.openStart;for(let n=this.unplaced.content,r=0,o=this.unplaced.openEnd;r<e;r++){let i=n.firstChild;if(n.childCount>1&&(o=0),i.type.spec.isolating&&o<=r){e=r;break}n=i.content}for(let n=1;n<=2;n++
Line truncated
|
||||
`),u&&p==h.nodeValue.length)for(let m=h,g;m;m=m.parentNode){if(g=m.nextSibling){g.nodeName=="BR"&&(l=a={node:g.parentNode,offset:de(g)+1});break}let y=m.pmViewDesc;if(y&&y.node&&y.node.isBlock)break}}else{let m=h.childNodes[p-1];u=m&&(m.nodeName=="BR"||m.contentEditable=="false")}}if(Pe&&d.focusNode&&d.focusNode!=a.node&&d.focusNode.nodeType==1){let h=d.focusNode.childNodes[d.focusOffset];h&&h.contentEditable=="false"&&(o=!0)}if(!(o||u&&xe)&&qt(l.node,l.offset,d.anchorNode,d.anchorOffset)&&qt(a.node,a.offset,d.focusNode,d.focusOffset))return;let f=!1;if((c.extend||e==n)&&!(u&&Pe)){c.collapse(l.node,l.offset);try{e!=n&&c.extend(a.node,a.offset),f=!0}catch{}}if(!f){if(e>n){let p=l;l=a,a=p}let h=document.createRange();h.setEnd(a.node,a.offset),h.setStart(l.node,l.offset),c.removeAllRanges(),c.addRange(h)}}ignoreMutation(e){return!this.contentDOM&&e.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,n){for(let r=0,o=0;o<this.children.length;o++){let i=this.children[o],s=r+i.size;if(r==s?e<=s&&n>=r:e<s&&n>r){let l=r+i.border,a=s-i.border;if(e>=l&&n<=a){this.dirty=e==r||n==s?Wt:ec,e==l&&n==a&&(i.contentLost||i.dom.parentNode!=this.contentDOM)?i.dirty=qe:i.markDirty(e-l,n-l);return}else i.dirty=i.dom==i.contentDOM&&i.dom.parentNode==this.contentDOM&&!i.children.length?Wt:qe}r=s}this.dirty=Wt}markParentsDirty(){let e=1;for(let n=this.parent;n;n=n.parent,e++){let r=e==1?Wt:ec;n.dirty<r&&(n.dirty=r)}}get domAtom(){return!1}get ignoreForCoords(){return!1}get ignoreForSelection(){return!1}isText(e){return!1}},Lr=class extends Gt{constructor(e,n,r,o){let i,s=n.type.toDOM;if(typeof s=="function"&&(s=s(r,()=>{if(!i)return o;if(i.parent)return i.parent.posBeforeChild(i)})),!n.type.spec.raw){if(s.nodeType!=1){let l=document.createElement("span");l.appendChild(s),s=l}s.contentEditable="false",s.classList.add("ProseMirror-widget")}super(e,[],s,null),this.widget=n,this.widget=n,i=this}matchesWidget(e){return this.dirty==Ie&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let n=this.widget.spec.stopEvent;return n?n(e):!1}ignoreMutation(e){return e.type!="selection"||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get ignoreForSelection(){return!!this.widget.type.spec.relaxedSide}get side(){return this.widget.type.side}},Gi=class extends Gt{constructor(e,n,r,o){super(e,[],n,null),this.textDOM=r,this.text=o}get size(){return this.text.length}localPosFromDOM(e,n){return e!=this.textDOM?this.posAtStart+(n?this.size:0):this.posAtStart+n}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return e.type==="characterData"&&e.target.nodeValue==e.oldValue}},xn=class t extends Gt{constructor(e,n,r,o,i){super(e,[],r,o),this.mark=n,this.spec=i}static create(e,n,r,o){let i=o.nodeViews[n.type.name],s=i&&i(n,o,r);return(!s||!s.dom)&&(s=it.renderSpec(document,n.type.spec.toDOM(n,r),null,n.attrs)),new t(e,n,s.dom,s.contentDOM||s.dom,s)}parseRule(){return this.dirty&qe||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return this.dirty!=qe&&this.mark.eq(e)}markDirty(e,n){if(super.markDirty(e,n),this.dirty!=Ie){let r=this.parent;for(;!r.node;)r=r.parent;r.dirty<this.dirty&&(r.dirty=this.dirty),this.dirty=Ie}}slice(e,n,r){let o=t.create(this.parent,this.mark,!0,r),i=this.children,s=this.size;n<s&&(i=Zi(i,n,s,r)),e>0&&(i=Zi(i,0,e,r));for(let l=0;l<i.length;l++)i[l].parent=o;return o.children=i,o}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}},At=class t extends Gt{constructor(e,n,r,o,i,s,l,a,c){super(e,[],i,s),this.node=n,this.outerDeco=r,this.innerDeco=o,this.nodeDOM=l}static create(e,n,r,o,i,s){let l=i.nodeViews[n.type.name],a,c=l&&l(n,i,()=>{if(!a)return s;if(a.parent)return a.parent.posBeforeChild(a)},r,o),d=c&&c.dom,u=c&&c.contentDOM;if(n.isText){if(!d)d=document.createTextNode(n.text);else if(d.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else d||({dom:d,contentDOM:u}=it.renderSpec(document,n.type.spec.toDOM(n),null,n.attrs));!u&&!n.isText&&d.nodeName!="BR"&&(d.hasAttribute("contenteditable")||(d.contentEditable="false"),n.type.spec.draggable&&(d.draggable=!0));let f=d;return d=Bc(d,r,n),c?a=new Yi(e,n,r,o,d,u||null,f,c,i,s+1):n.isText?new Br(e,n,r,o,d,f,i):new t(e,n,r,o,d,u||null,f,i,s+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let e={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(e.preserveWhitespace="full"),!this.contentDOM)e.getContent=()=>this.node.content;else if(!this.contentLost)e.contentElement=this.contentDOM;else{for(let n=this.children.length-1;n>=0;n--){let r=this.children[n];if(this.dom.contains(r.dom.parentNode)){e.contentElement=r.dom.parentNode;b
Line truncated
|
||||
|
||||
`);return{dom:a,text:f,slice:e}}function Vc(t,e,n,r,o){let i=o.parent.type.spec.code,s,l;if(!n&&!e)return null;let a=!!e&&(r||i||!n);if(a){if(t.someProp("transformPastedText",f=>{e=f(e,i||r,t)}),i)return l=new E(w.from(t.state.schema.text(e.replace(/\r\n?/g,`
|
||||
`))),0,0),t.someProp("transformPasted",f=>{l=f(l,t,!0)}),l;let u=t.someProp("clipboardTextParser",f=>f(e,o,r,t));if(u)l=u;else{let f=o.marks(),{schema:h}=t.state,p=it.fromSchema(h);s=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach(m=>{let g=s.appendChild(document.createElement("p"));m&&g.appendChild(p.serializeNode(h.text(m,f)))})}}else t.someProp("transformPastedHTML",u=>{n=u(n,t)}),s=wm(n),Yn&&Sm(s);let c=s&&s.querySelector("[data-pm-slice]"),d=c&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(c.getAttribute("data-pm-slice")||"");if(d&&d[3])for(let u=+d[3];u>0;u--){let f=s.firstChild;for(;f&&f.nodeType!=1;)f=f.nextSibling;if(!f)break;s=f}if(l||(l=(t.someProp("clipboardParser")||t.someProp("domParser")||Ue.fromSchema(t.state.schema)).parseSlice(s,{preserveWhitespace:!!(a||d),context:o,ruleFromNode(f){return f.nodeName=="BR"&&!f.nextSibling&&f.parentNode&&!ym.test(f.parentNode.nodeName)?{ignore:!0}:null}})),d)l=km(hc(l,+d[1],+d[2]),d[4]);else if(l=E.maxOpen(bm(l.content,o),!0),l.openStart||l.openEnd){let u=0,f=0;for(let h=l.content.firstChild;u<l.openStart&&!h.type.spec.isolating;u++,h=h.firstChild);for(let h=l.content.lastChild;f<l.openEnd&&!h.type.spec.isolating;f++,h=h.lastChild);l=hc(l,u,f)}return t.someProp("transformPasted",u=>{l=u(l,t,a)}),l}var ym=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function bm(t,e){if(t.childCount<2)return t;for(let n=e.depth;n>=0;n--){let o=e.node(n).contentMatchAt(e.index(n)),i,s=[];if(t.forEach(l=>{if(!s)return;let a=o.findWrapping(l.type),c;if(!a)return s=null;if(c=s.length&&i.length&&Wc(a,i,l,s[s.length-1],0))s[s.length-1]=c;else{s.length&&(s[s.length-1]=jc(s[s.length-1],i.length));let d=_c(l,a);s.push(d),o=o.matchType(d.type),i=a}}),s)return w.from(s)}return t}function _c(t,e,n=0){for(let r=e.length-1;r>=n;r--)t=e[r].create(null,w.from(t));return t}function Wc(t,e,n,r,o){if(o<t.length&&o<e.length&&t[o]==e[o]){let i=Wc(t,e,n,r.lastChild,o+1);if(i)return r.copy(r.content.replaceChild(r.childCount-1,i));if(r.contentMatchAt(r.childCount).matchType(o==t.length-1?n.type:t[o+1]))return r.copy(r.content.append(w.from(_c(n,t,o+1))))}}function jc(t,e){if(e==0)return t;let n=t.content.replaceChild(t.childCount-1,jc(t.lastChild,e-1)),r=t.contentMatchAt(t.childCount).fillBefore(w.empty,!0);return t.copy(n.append(r))}function ns(t,e,n,r,o,i){let s=e<0?t.firstChild:t.lastChild,l=s.content;return t.childCount>1&&(i=0),o<r-1&&(l=ns(l,e,n,r,o+1,i)),o>=n&&(l=e<0?s.contentMatchAt(0).fillBefore(l,i<=o).append(l):l.append(s.contentMatchAt(s.childCount).fillBefore(w.empty,!0))),t.replaceChild(e<0?0:t.childCount-1,s.copy(l))}function hc(t,e,n){return e<t.openStart&&(t=new E(ns(t.content,-1,e,t.openStart,0,t.openEnd),e,t.openEnd)),n<t.openEnd&&(t=new E(ns(t.content,1,n,t.openEnd,0,0),t.openStart,n)),t}var Kc={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]},pc=null;function Uc(){return pc||(pc=document.implementation.createHTMLDocument("title"))}var _i=null;function xm(t){let e=window.trustedTypes;return e?(_i||(_i=e.defaultPolicy||e.createPolicy("ProseMirrorClipboard",{createHTML:n=>n})),_i.createHTML(t)):t}function wm(t){let e=/^(\s*<meta [^>]*>)*/.exec(t);e&&(t=t.slice(e[0].length));let n=Uc().createElement("div"),r=/<([a-z][^>\s]+)/i.exec(t),o;if((o=r&&Kc[r[1].toLowerCase()])&&(t=o.map(i=>"<"+i+">").join("")+t+o.map(i=>"</"+i+">").reverse().join("")),n.innerHTML=xm(t),o)for(let i=0;i<o.length;i++)n=n.querySelector(o[i])||n;return n}function Sm(t){let e=t.querySelectorAll(ge?"span:not([class]):not([style])":"span.Apple-converted-space");for(let n=0;n<e.length;n++){let r=e[n];r.childNodes.length==1&&r.textContent=="\xA0"&&r.parentNode&&r.parentNode.replaceChild(t.ownerDocument.createTextNode(" "),r)}}function km(t,e){if(!t.size)return t;let n=t.content.firstChild.type.schema,r;try{r=JSON.parse(e)}catch{return t}let{content:o,openStart:i,openEnd:s}=t;for(let l=r.length-2;l>=0;l-=2){let a=n.nodes[r[l]];if(!a||a.hasRequiredAttrs())break;o=w.from(a.create(r[l+1],o)),i++,s++}return new E(o,i,s)}var we={},Se={},Cm={touchstart:!0,touchmove:!0},rs=class{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:"",button:0},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastChromeDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}};function Mm(t){for(let e in we){let n=we[e];t.dom.addEventListener(e,t.input.eventHandlers[e]=r=>{Tm(t,r)&&!ps(t,r)&&(t.editable||!(r.type in Se))&&n(t,r)},Cm[e]?{passive:
Line truncated
|
||||
`).scrollIntoView()),!0)};function As(t){for(let e=0;e<t.edgeCount;e++){let{type:n}=t.edge(e);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}var Es=(t,e)=>{let{$head:n,$anchor:r}=t.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let o=n.node(-1),i=n.indexAfter(-1),s=As(o.contentMatchAt(i));if(!s||!o.canReplaceWith(i,i,s))return!1;if(e){let l=n.after(),a=t.tr.replaceWith(l,l,s.createAndFill());a.setSelection(D.near(a.doc.resolve(l),1)),e(a.scrollIntoView())}return!0},Os=(t,e)=>{let n=t.selection,{$from:r,$to:o}=n;if(n instanceof be||r.parent.inlineContent||o.parent.inlineContent)return!1;let i=As(o.parent.contentMatchAt(o.indexAfter()));if(!i||!i.isTextblock)return!1;if(e){let s=(!r.parentOffset&&o.index()<o.parent.childCount?r:o).pos,l=t.tr.insert(s,i.createAndFill());l.setSelection(R.create(l.doc,s+1)),e(l.scrollIntoView())}return!0},Ns=(t,e)=>{let{$cursor:n}=t.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let i=n.before();if(Ae(t.doc,i))return e&&e(t.tr.split(i).scrollIntoView()),!0}let r=n.blockRange(),o=r&&at(r);return o==null?!1:(e&&e(t.tr.lift(r,o).scrollIntoView()),!0)};function dg(t){return(e,n)=>{let{$from:r,$to:o}=e.selection;if(e.selection instanceof P&&e.selection.node.isBlock)return!r.parentOffset||!Ae(e.doc,r.pos)?!1:(n&&n(e.tr.split(r.pos).scrollIntoView()),!0);if(!r.depth)return!1;let i=[],s,l,a=!1,c=!1;for(let h=r.depth;;h--)if(r.node(h).isBlock){a=r.end(h)==r.pos+(r.depth-h),c=r.start(h)==r.pos-(r.depth-h),l=As(r.node(h-1).contentMatchAt(r.indexAfter(h-1)));let m=t&&t(o.parent,a,r);i.unshift(m||(a&&l?{type:l}:null)),s=h;break}else{if(h==1)return!1;i.unshift(null)}let d=e.tr;(e.selection instanceof R||e.selection instanceof be)&&d.deleteSelection();let u=d.mapping.map(r.pos),f=Ae(d.doc,u,i.length,i);if(f||(i[0]=l?{type:l}:null,f=Ae(d.doc,u,i.length,i)),!f)return!1;if(d.split(u,i.length,i),!a&&c&&r.node(s).type!=l){let h=d.mapping.map(r.before(s)),p=d.doc.resolve(h);l&&r.node(s-1).canReplaceWith(p.index(),p.index()+1,l)&&d.setNodeMarkup(d.mapping.map(r.before(s)),l)}return n&&n(d.scrollIntoView()),!0}}var ug=dg();var hd=(t,e)=>{let{$from:n,to:r}=t.selection,o,i=n.sharedDepth(r);return i==0?!1:(o=n.before(i),e&&e(t.tr.setSelection(P.create(t.doc,o))),!0)},fg=(t,e)=>(e&&e(t.tr.setSelection(new be(t.doc))),!0);function hg(t,e,n){let r=e.nodeBefore,o=e.nodeAfter,i=e.index();return!r||!o||!r.type.compatibleContent(o.type)?!1:!r.content.size&&e.parent.canReplace(i-1,i)?(n&&n(t.tr.delete(e.pos-r.nodeSize,e.pos).scrollIntoView()),!0):!e.parent.canReplace(i,i+1)||!(o.isTextblock||Ne(t.doc,e.pos))?!1:(n&&n(t.tr.join(e.pos).scrollIntoView()),!0)}function pd(t,e,n,r){let o=e.nodeBefore,i=e.nodeAfter,s,l,a=o.type.spec.isolating||i.type.spec.isolating;if(!a&&hg(t,e,n))return!0;let c=!a&&e.parent.canReplace(e.index(),e.index()+1);if(c&&(s=(l=o.contentMatchAt(o.childCount)).findWrapping(i.type))&&l.matchType(s[0]||i.type).validEnd){if(n){let h=e.pos+i.nodeSize,p=w.empty;for(let y=s.length-1;y>=0;y--)p=w.from(s[y].create(null,p));p=w.from(o.copy(p));let m=t.tr.step(new re(e.pos-1,h,e.pos,h,new E(p,1,0),s.length,!0)),g=m.doc.resolve(h+2*s.length);g.nodeAfter&&g.nodeAfter.type==o.type&&Ne(m.doc,g.pos)&&m.join(g.pos),n(m.scrollIntoView())}return!0}let d=i.type.spec.isolating||r>0&&a?null:D.findFrom(e,1),u=d&&d.$from.blockRange(d.$to),f=u&&at(u);if(f!=null&&f>=e.depth)return n&&n(t.tr.lift(u,f).scrollIntoView()),!0;if(c&&wn(i,"start",!0)&&wn(o,"end")){let h=o,p=[];for(;p.push(h),!h.isTextblock;)h=h.lastChild;let m=i,g=1;for(;!m.isTextblock;m=m.firstChild)g++;if(h.canReplace(h.childCount,h.childCount,m.content)){if(n){let y=w.empty;for(let S=p.length-1;S>=0;S--)y=w.from(p[S].copy(y));let b=t.tr.step(new re(e.pos-p.length,e.pos+i.nodeSize,e.pos+g,e.pos+i.nodeSize-g,new E(y,p.length,0),0,!0));n(b.scrollIntoView())}return!0}}return!1}function md(t){return function(e,n){let r=e.selection,o=t<0?r.$from:r.$to,i=o.depth;for(;o.node(i).isInline;){if(!i)return!1;i--}return o.node(i).isTextblock?(n&&n(e.tr.setSelection(R.create(e.doc,t<0?o.start(i):o.end(i)))),!0):!1}}var Rs=md(-1),Ds=md(1);function gd(t,e=null){return function(n,r){let{$from:o,$to:i}=n.selection,s=o.blockRange(i),l=s&&dn(s,t,e);return l?(r&&r(n.tr.wrap(s,l).scrollIntoView()),!0):!1}}function Ps(t,e=null){return function(n,r){let o=!1;for(let i=0;i<n.selection.ranges.length&&!o;i++){let{$from:{pos:s},$to:{pos:l}}=n.selection.ranges[i];n.doc.nodesBetween(s,l,(a,c)=>{if(o)return!1;if(!(!a.isTextblock||a.hasMarkup(t,e)))if(a.type==t)o=!0;else{let d=n.doc.resolve(c),u=d.index();o=d.parent.canReplaceWith(u,u+1,t)}})}if(!o)return!1;if(r){let i=n.tr;for(let s=0;s<n.selection.ranges.length;s++){let{$from:{pos:l},$to:{pos:a}}=n.selection.ranges[s];i.setBlockType(l,a,t,e)}r(i.scrollIntoView())}return!0}}function Is(...t){return function(e,n,r){for(let o=0;o<t.length;o++)if(t[o](e,n,r))return!0;return!1}}var xs=Is(Gr,ws,Ss),od=Is(Gr,Cs,Ms),Ot={Enter:Is(Ts,Os,Ns,ug),"Mod-Enter":Es,Backspace:xs,"Mod-
Line truncated
|
||||
`);return{dom:a,text:f,slice:e}}function Vc(t,e,n,r,o){let i=o.parent.type.spec.code,s,l;if(!n&&!e)return null;let a=!!e&&(r||i||!n);if(a){if(t.someProp("transformPastedText",f=>{e=f(e,i||r,t)}),i)return l=new O(x.from(t.state.schema.text(e.replace(/\r\n?/g,`
|
||||
`))),0,0),t.someProp("transformPasted",f=>{l=f(l,t,!0)}),l;let u=t.someProp("clipboardTextParser",f=>f(e,o,r,t));if(u)l=u;else{let f=o.marks(),{schema:h}=t.state,p=it.fromSchema(h);s=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach(m=>{let g=s.appendChild(document.createElement("p"));m&&g.appendChild(p.serializeNode(h.text(m,f)))})}}else t.someProp("transformPastedHTML",u=>{n=u(n,t)}),s=wm(n),Yn&&Sm(s);let c=s&&s.querySelector("[data-pm-slice]"),d=c&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(c.getAttribute("data-pm-slice")||"");if(d&&d[3])for(let u=+d[3];u>0;u--){let f=s.firstChild;for(;f&&f.nodeType!=1;)f=f.nextSibling;if(!f)break;s=f}if(l||(l=(t.someProp("clipboardParser")||t.someProp("domParser")||Ue.fromSchema(t.state.schema)).parseSlice(s,{preserveWhitespace:!!(a||d),context:o,ruleFromNode(f){return f.nodeName=="BR"&&!f.nextSibling&&f.parentNode&&!ym.test(f.parentNode.nodeName)?{ignore:!0}:null}})),d)l=km(hc(l,+d[1],+d[2]),d[4]);else if(l=O.maxOpen(bm(l.content,o),!0),l.openStart||l.openEnd){let u=0,f=0;for(let h=l.content.firstChild;u<l.openStart&&!h.type.spec.isolating;u++,h=h.firstChild);for(let h=l.content.lastChild;f<l.openEnd&&!h.type.spec.isolating;f++,h=h.lastChild);l=hc(l,u,f)}return t.someProp("transformPasted",u=>{l=u(l,t,a)}),l}var ym=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function bm(t,e){if(t.childCount<2)return t;for(let n=e.depth;n>=0;n--){let o=e.node(n).contentMatchAt(e.index(n)),i,s=[];if(t.forEach(l=>{if(!s)return;let a=o.findWrapping(l.type),c;if(!a)return s=null;if(c=s.length&&i.length&&Wc(a,i,l,s[s.length-1],0))s[s.length-1]=c;else{s.length&&(s[s.length-1]=jc(s[s.length-1],i.length));let d=_c(l,a);s.push(d),o=o.matchType(d.type),i=a}}),s)return x.from(s)}return t}function _c(t,e,n=0){for(let r=e.length-1;r>=n;r--)t=e[r].create(null,x.from(t));return t}function Wc(t,e,n,r,o){if(o<t.length&&o<e.length&&t[o]==e[o]){let i=Wc(t,e,n,r.lastChild,o+1);if(i)return r.copy(r.content.replaceChild(r.childCount-1,i));if(r.contentMatchAt(r.childCount).matchType(o==t.length-1?n.type:t[o+1]))return r.copy(r.content.append(x.from(_c(n,t,o+1))))}}function jc(t,e){if(e==0)return t;let n=t.content.replaceChild(t.childCount-1,jc(t.lastChild,e-1)),r=t.contentMatchAt(t.childCount).fillBefore(x.empty,!0);return t.copy(n.append(r))}function ns(t,e,n,r,o,i){let s=e<0?t.firstChild:t.lastChild,l=s.content;return t.childCount>1&&(i=0),o<r-1&&(l=ns(l,e,n,r,o+1,i)),o>=n&&(l=e<0?s.contentMatchAt(0).fillBefore(l,i<=o).append(l):l.append(s.contentMatchAt(s.childCount).fillBefore(x.empty,!0))),t.replaceChild(e<0?0:t.childCount-1,s.copy(l))}function hc(t,e,n){return e<t.openStart&&(t=new O(ns(t.content,-1,e,t.openStart,0,t.openEnd),e,t.openEnd)),n<t.openEnd&&(t=new O(ns(t.content,1,n,t.openEnd,0,0),t.openStart,n)),t}var Kc={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]},pc=null;function Uc(){return pc||(pc=document.implementation.createHTMLDocument("title"))}var _i=null;function xm(t){let e=window.trustedTypes;return e?(_i||(_i=e.defaultPolicy||e.createPolicy("ProseMirrorClipboard",{createHTML:n=>n})),_i.createHTML(t)):t}function wm(t){let e=/^(\s*<meta [^>]*>)*/.exec(t);e&&(t=t.slice(e[0].length));let n=Uc().createElement("div"),r=/<([a-z][^>\s]+)/i.exec(t),o;if((o=r&&Kc[r[1].toLowerCase()])&&(t=o.map(i=>"<"+i+">").join("")+t+o.map(i=>"</"+i+">").reverse().join("")),n.innerHTML=xm(t),o)for(let i=0;i<o.length;i++)n=n.querySelector(o[i])||n;return n}function Sm(t){let e=t.querySelectorAll(ge?"span:not([class]):not([style])":"span.Apple-converted-space");for(let n=0;n<e.length;n++){let r=e[n];r.childNodes.length==1&&r.textContent=="\xA0"&&r.parentNode&&r.parentNode.replaceChild(t.ownerDocument.createTextNode(" "),r)}}function km(t,e){if(!t.size)return t;let n=t.content.firstChild.type.schema,r;try{r=JSON.parse(e)}catch{return t}let{content:o,openStart:i,openEnd:s}=t;for(let l=r.length-2;l>=0;l-=2){let a=n.nodes[r[l]];if(!a||a.hasRequiredAttrs())break;o=x.from(a.create(r[l+1],o)),i++,s++}return new O(o,i,s)}var we={},Se={},Cm={touchstart:!0,touchmove:!0},rs=class{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:"",button:0},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastChromeDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}};function Mm(t){for(let e in we){let n=we[e];t.dom.addEventListener(e,t.input.eventHandlers[e]=r=>{Tm(t,r)&&!ps(t,r)&&(t.editable||!(r.type in Se))&&n(t,r)},Cm[e]?{passive:
Line truncated
|
||||
`).scrollIntoView()),!0)};function As(t){for(let e=0;e<t.edgeCount;e++){let{type:n}=t.edge(e);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}var Es=(t,e)=>{let{$head:n,$anchor:r}=t.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let o=n.node(-1),i=n.indexAfter(-1),s=As(o.contentMatchAt(i));if(!s||!o.canReplaceWith(i,i,s))return!1;if(e){let l=n.after(),a=t.tr.replaceWith(l,l,s.createAndFill());a.setSelection(D.near(a.doc.resolve(l),1)),e(a.scrollIntoView())}return!0},Os=(t,e)=>{let n=t.selection,{$from:r,$to:o}=n;if(n instanceof be||r.parent.inlineContent||o.parent.inlineContent)return!1;let i=As(o.parent.contentMatchAt(o.indexAfter()));if(!i||!i.isTextblock)return!1;if(e){let s=(!r.parentOffset&&o.index()<o.parent.childCount?r:o).pos,l=t.tr.insert(s,i.createAndFill());l.setSelection(R.create(l.doc,s+1)),e(l.scrollIntoView())}return!0},Ns=(t,e)=>{let{$cursor:n}=t.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let i=n.before();if(Ae(t.doc,i))return e&&e(t.tr.split(i).scrollIntoView()),!0}let r=n.blockRange(),o=r&&at(r);return o==null?!1:(e&&e(t.tr.lift(r,o).scrollIntoView()),!0)};function dg(t){return(e,n)=>{let{$from:r,$to:o}=e.selection;if(e.selection instanceof P&&e.selection.node.isBlock)return!r.parentOffset||!Ae(e.doc,r.pos)?!1:(n&&n(e.tr.split(r.pos).scrollIntoView()),!0);if(!r.depth)return!1;let i=[],s,l,a=!1,c=!1;for(let h=r.depth;;h--)if(r.node(h).isBlock){a=r.end(h)==r.pos+(r.depth-h),c=r.start(h)==r.pos-(r.depth-h),l=As(r.node(h-1).contentMatchAt(r.indexAfter(h-1)));let m=t&&t(o.parent,a,r);i.unshift(m||(a&&l?{type:l}:null)),s=h;break}else{if(h==1)return!1;i.unshift(null)}let d=e.tr;(e.selection instanceof R||e.selection instanceof be)&&d.deleteSelection();let u=d.mapping.map(r.pos),f=Ae(d.doc,u,i.length,i);if(f||(i[0]=l?{type:l}:null,f=Ae(d.doc,u,i.length,i)),!f)return!1;if(d.split(u,i.length,i),!a&&c&&r.node(s).type!=l){let h=d.mapping.map(r.before(s)),p=d.doc.resolve(h);l&&r.node(s-1).canReplaceWith(p.index(),p.index()+1,l)&&d.setNodeMarkup(d.mapping.map(r.before(s)),l)}return n&&n(d.scrollIntoView()),!0}}var ug=dg();var hd=(t,e)=>{let{$from:n,to:r}=t.selection,o,i=n.sharedDepth(r);return i==0?!1:(o=n.before(i),e&&e(t.tr.setSelection(P.create(t.doc,o))),!0)},fg=(t,e)=>(e&&e(t.tr.setSelection(new be(t.doc))),!0);function hg(t,e,n){let r=e.nodeBefore,o=e.nodeAfter,i=e.index();return!r||!o||!r.type.compatibleContent(o.type)?!1:!r.content.size&&e.parent.canReplace(i-1,i)?(n&&n(t.tr.delete(e.pos-r.nodeSize,e.pos).scrollIntoView()),!0):!e.parent.canReplace(i,i+1)||!(o.isTextblock||Ne(t.doc,e.pos))?!1:(n&&n(t.tr.join(e.pos).scrollIntoView()),!0)}function pd(t,e,n,r){let o=e.nodeBefore,i=e.nodeAfter,s,l,a=o.type.spec.isolating||i.type.spec.isolating;if(!a&&hg(t,e,n))return!0;let c=!a&&e.parent.canReplace(e.index(),e.index()+1);if(c&&(s=(l=o.contentMatchAt(o.childCount)).findWrapping(i.type))&&l.matchType(s[0]||i.type).validEnd){if(n){let h=e.pos+i.nodeSize,p=x.empty;for(let y=s.length-1;y>=0;y--)p=x.from(s[y].create(null,p));p=x.from(o.copy(p));let m=t.tr.step(new re(e.pos-1,h,e.pos,h,new O(p,1,0),s.length,!0)),g=m.doc.resolve(h+2*s.length);g.nodeAfter&&g.nodeAfter.type==o.type&&Ne(m.doc,g.pos)&&m.join(g.pos),n(m.scrollIntoView())}return!0}let d=i.type.spec.isolating||r>0&&a?null:D.findFrom(e,1),u=d&&d.$from.blockRange(d.$to),f=u&&at(u);if(f!=null&&f>=e.depth)return n&&n(t.tr.lift(u,f).scrollIntoView()),!0;if(c&&wn(i,"start",!0)&&wn(o,"end")){let h=o,p=[];for(;p.push(h),!h.isTextblock;)h=h.lastChild;let m=i,g=1;for(;!m.isTextblock;m=m.firstChild)g++;if(h.canReplace(h.childCount,h.childCount,m.content)){if(n){let y=x.empty;for(let S=p.length-1;S>=0;S--)y=x.from(p[S].copy(y));let b=t.tr.step(new re(e.pos-p.length,e.pos+i.nodeSize,e.pos+g,e.pos+i.nodeSize-g,new O(y,p.length,0),0,!0));n(b.scrollIntoView())}return!0}}return!1}function md(t){return function(e,n){let r=e.selection,o=t<0?r.$from:r.$to,i=o.depth;for(;o.node(i).isInline;){if(!i)return!1;i--}return o.node(i).isTextblock?(n&&n(e.tr.setSelection(R.create(e.doc,t<0?o.start(i):o.end(i)))),!0):!1}}var Rs=md(-1),Ds=md(1);function gd(t,e=null){return function(n,r){let{$from:o,$to:i}=n.selection,s=o.blockRange(i),l=s&&dn(s,t,e);return l?(r&&r(n.tr.wrap(s,l).scrollIntoView()),!0):!1}}function Ps(t,e=null){return function(n,r){let o=!1;for(let i=0;i<n.selection.ranges.length&&!o;i++){let{$from:{pos:s},$to:{pos:l}}=n.selection.ranges[i];n.doc.nodesBetween(s,l,(a,c)=>{if(o)return!1;if(!(!a.isTextblock||a.hasMarkup(t,e)))if(a.type==t)o=!0;else{let d=n.doc.resolve(c),u=d.index();o=d.parent.canReplaceWith(u,u+1,t)}})}if(!o)return!1;if(r){let i=n.tr;for(let s=0;s<n.selection.ranges.length;s++){let{$from:{pos:l},$to:{pos:a}}=n.selection.ranges[s];i.setBlockType(l,a,t,e)}r(i.scrollIntoView())}return!0}}function Is(...t){return function(e,n,r){for(let o=0;o<t.length;o++)if(t[o](e,n,r))return!0;return!1}}var xs=Is(Gr,ws,Ss),od=Is(Gr,Cs,Ms),Ot={Enter:Is(Ts,Os,Ns,ug),"Mod-Enter":Es,Backspace:xs,"Mod-
Line truncated
|
||||
|
||||
`,textSerializers:s={}}=n||{},l="";return t.nodesBetween(r,o,(a,c,d,u)=>{var f;a.isBlock&&c>r&&(l+=i);let h=s?.[a.type.name];if(h)return d&&(l+=h({node:a,pos:c,parent:d,index:u,range:e})),!1;a.isText&&(l+=(f=a?.text)==null?void 0:f.slice(Math.max(r,c)-c,o-c))}),l}function vg(t,e){let n={from:0,to:t.content.size};return Pd(t,n,e)}function Id(t){return Object.fromEntries(Object.entries(t.nodes).filter(([,e])=>e.spec.toText).map(([e,n])=>[e,n.spec.toText]))}function mt(t,e){if(typeof t=="string"){if(!e.marks[t])throw Error(`There is no mark type named '${t}'. Maybe you forgot to add the extension?`);return e.marks[t]}return t}function Ld(t,e){let n=mt(e,t.schema),{from:r,to:o,empty:i}=t.selection,s=[];i?(t.storedMarks&&s.push(...t.storedMarks),s.push(...t.selection.$head.marks())):t.doc.nodesBetween(r,o,a=>{s.push(...a.marks)});let l=s.find(a=>a.type.name===n.name);return l?{...l.attrs}:{}}function ee(t,e){if(typeof t=="string"){if(!e.nodes[t])throw Error(`There is no node type named '${t}'. Maybe you forgot to add the extension?`);return e.nodes[t]}return t}function Tg(t,e){let n=ee(e,t.schema),{from:r,to:o}=t.selection,i=[];t.doc.nodesBetween(r,o,l=>{i.push(l)});let s=i.reverse().find(l=>l.type.name===n.name);return s?{...s.attrs}:{}}function io(t,e){return e.nodes[t]?"node":e.marks[t]?"mark":null}function Ks(t,e){let n=io(typeof e=="string"?e:e.name,t.schema);return n==="node"?Tg(t,e):n==="mark"?Ld(t,e):{}}function Ag(t,e=JSON.stringify){let n={};return t.filter(r=>{let o=e(r);return Object.prototype.hasOwnProperty.call(n,o)?!1:n[o]=!0})}function Eg(t){let e=Ag(t);return e.length===1?e:e.filter((n,r)=>!e.filter((i,s)=>s!==r).some(i=>n.oldRange.from>=i.oldRange.from&&n.oldRange.to<=i.oldRange.to&&n.newRange.from>=i.newRange.from&&n.newRange.to<=i.newRange.to))}function Us(t){let{mapping:e,steps:n}=t,r=[];return e.maps.forEach((o,i)=>{let s=[];if(o.ranges.length)o.forEach((l,a)=>{s.push({from:l,to:a})});else{let{from:l,to:a}=n[i];if(l===void 0||a===void 0)return;s.push({from:l,to:a})}s.forEach(({from:l,to:a})=>{let c=e.slice(i).map(l,-1),d=e.slice(i).map(a),u=e.invert().map(c,-1),f=e.invert().map(d);r.push({oldRange:{from:u,to:f},newRange:{from:c,to:d}})})}),Eg(r)}function Js(t){return Object.prototype.toString.call(t)==="[object RegExp]"}function no(t,e,n={strict:!0}){let r=Object.keys(e);return r.length?r.every(o=>n.strict?e[o]===t[o]:Js(e[o])?e[o].test(t[o]):e[o]===t[o]):!0}function Bd(t,e,n={}){return t.find(r=>r.type===e&&no(Object.fromEntries(Object.keys(n).map(o=>[o,r.attrs[o]])),n))}function kd(t,e,n={}){return!!Bd(t,e,n)}function qs(t,e,n){var r;if(!t||!e)return;let o=t.parent.childAfter(t.parentOffset);if((!o.node||!o.node.marks.some(d=>d.type===e))&&(o=t.parent.childBefore(t.parentOffset)),!o.node||!o.node.marks.some(d=>d.type===e)||(n=n||((r=o.node.marks[0])==null?void 0:r.attrs),!Bd([...o.node.marks],e,n)))return;let s=o.index,l=t.start()+o.offset,a=s+1,c=l+o.node.nodeSize;for(;s>0&&kd([...t.parent.child(s-1).marks],e,n);)s-=1,l-=t.parent.child(s).nodeSize;for(;a<t.parent.childCount&&kd([...t.parent.child(a).marks],e,n);)c+=t.parent.child(a).nodeSize,a+=1;return{from:l,to:c}}function so(t,e,n){let r=[];return t===e?n.resolve(t).marks().forEach(o=>{let i=n.resolve(t),s=qs(i,o.type);s&&r.push({mark:o,...s})}):n.nodesBetween(t,e,(o,i)=>{!o||o?.nodeSize===void 0||r.push(...o.marks.map(s=>({from:i,to:i+o.nodeSize,mark:s})))}),r}var zd=(t,e,n,r=20)=>{let o=t.doc.resolve(n),i=r,s=null;for(;i>0&&s===null;){let l=o.node(i);l?.type.name===e?s=l:i-=1}return[s,i]};function Ls(t,e){return e.nodes[t]||e.marks[t]||null}function eo(t,e,n){return Object.fromEntries(Object.entries(n).filter(([r])=>{let o=t.find(i=>i.type===e&&i.name===r);return o?o.attribute.keepOnSplit:!1}))}var Og=(t,e=500)=>{let n="",r=t.parentOffset;return t.parent.nodesBetween(Math.max(0,r-e),r,(o,i,s,l)=>{var a,c;let d=((c=(a=o.type.spec).toText)==null?void 0:c.call(a,{node:o,pos:i,parent:s,index:l}))||o.textContent||"%leaf%";n+=o.isAtom&&!o.isText?d:d.slice(0,Math.max(0,r-i))}),n};function Fs(t,e,n={}){let{empty:r,ranges:o}=t.selection,i=e?mt(e,t.schema):null;if(r)return!!(t.storedMarks||t.selection.$from.marks()).filter(u=>i?i.name===u.type.name:!0).find(u=>no(u.attrs,n,{strict:!1}));let s=0,l=[];if(o.forEach(({$from:u,$to:f})=>{let h=u.pos,p=f.pos;t.doc.nodesBetween(h,p,(m,g)=>{if(!m.isText&&!m.marks.length)return;let y=Math.max(h,g),b=Math.min(p,g+m.nodeSize),S=b-y;s+=S,l.push(...m.marks.map(T=>({mark:T,from:y,to:b})))})}),s===0)return!1;let a=l.filter(u=>i?i.name===u.mark.type.name:!0).filter(u=>no(u.mark.attrs,n,{strict:!1})).reduce((u,f)=>u+f.to-f.from,0),c=l.filter(u=>i?u.mark.type!==i&&u.mark.type.excludes(i):!0).reduce((u,f)=>u+f.to-f.from,0);return(a>0?a+c:a)>=s}function Ge(t,e,n={}){let{from:r,to:o,empty:i}=t.selection,s=e?ee(e,t.schema):null,l=[];t.doc.nodesBetween(r,o,(u,f)=>{if(u.isText)return;let h=Math.max(r,f),p=Math.min(o,f+u.nodeSize);l.push({node:u,from:h,to:p})});let a=o-r,c=l.filter(u=>s?s.name===u.node.type.name:!0).
Line truncated
|
||||
`,rules:n,plugin:r}):!1}},isInputRules:!0});return r}function Pg(t){return Object.prototype.toString.call(t).slice(8,-1)}function Qr(t){return Pg(t)!=="Object"?!1:t.constructor===Object&&Object.getPrototypeOf(t)===Object.prototype}function _d(t,e){let n={...t};return Qr(t)&&Qr(e)&&Object.keys(e).forEach(r=>{Qr(e[r])&&Qr(t[r])?n[r]=_d(t[r],e[r]):n[r]=e[r]}),n}var Ys=class{constructor(t={}){this.type="extendable",this.parent=null,this.child=null,this.name="",this.config={name:this.name},this.config={...this.config,...t},this.name=this.config.name}get options(){return{...U(L(this,"addOptions",{name:this.name}))||{}}}get storage(){return{...U(L(this,"addStorage",{name:this.name,options:this.options}))||{}}}configure(t={}){let e=this.extend({...this.config,addOptions:()=>_d(this.options,t)});return e.name=this.name,e.parent=this.parent,e}extend(t={}){let e=new this.constructor({...this.config,...t});return e.parent=this,this.child=e,e.name="name"in t?t.name:e.parent.name,e}},Z=class Wd extends Ys{constructor(){super(...arguments),this.type="mark"}static create(e={}){let n=typeof e=="function"?e():e;return new Wd(n)}static handleExit({editor:e,mark:n}){let{tr:r}=e.state,o=e.state.selection.$from;if(o.pos===o.end()){let s=o.marks();if(!!!s.find(c=>c?.type.name===n.name))return!1;let a=s.find(c=>c?.type.name===n.name);return a&&r.removeStoredMark(a),r.insertText(" ",o.pos),e.view.dispatch(r),!0}return!1}configure(e){return super.configure(e)}extend(e){let n=typeof e=="function"?e():e;return super.extend(n)}};function Ig(t){return typeof t=="number"}var Lg=class{constructor(t){this.find=t.find,this.handler=t.handler}},Bg=(t,e,n)=>{if(Js(e))return[...t.matchAll(e)];let r=e(t,n);return r?r.map(o=>{let i=[o.text];return i.index=o.index,i.input=t,i.data=o.data,o.replaceWith&&(o.text.includes(o.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),i.push(o.replaceWith)),i}):[]};function zg(t){let{editor:e,state:n,from:r,to:o,rule:i,pasteEvent:s,dropEvent:l}=t,{commands:a,chain:c,can:d}=new oo({editor:e,state:n}),u=[];return n.doc.nodesBetween(r,o,(h,p)=>{var m,g,y,b,S;if((g=(m=h.type)==null?void 0:m.spec)!=null&&g.code||!(h.isText||h.isTextblock||h.isInline))return;let T=(S=(b=(y=h.content)==null?void 0:y.size)!=null?b:h.nodeSize)!=null?S:0,k=Math.max(r,p),C=Math.min(o,p+T);if(k>=C)return;let A=h.isText?h.text||"":h.textBetween(k-p,C-p,void 0,"\uFFFC");Bg(A,i.find,s).forEach(N=>{if(N.index===void 0)return;let v=k+N.index+1,F=v+N[0].length,_={from:n.tr.mapping.map(v),to:n.tr.mapping.map(F)},G=i.handler({state:n,range:_,match:N,commands:a,chain:c,can:d,pasteEvent:s,dropEvent:l});u.push(G)})}),u.every(h=>h!==null)}var Zr=null,Hg=t=>{var e;let n=new ClipboardEvent("paste",{clipboardData:new DataTransfer});return(e=n.clipboardData)==null||e.setData("text/html",t),n};function Fg(t){let{editor:e,rules:n}=t,r=null,o=!1,i=!1,s=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,l;try{l=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{l=null}let a=({state:d,from:u,to:f,rule:h,pasteEvt:p})=>{let m=d.tr,g=ro({state:d,transaction:m});if(!(!zg({editor:e,state:g,from:Math.max(u-1,0),to:f.b-1,rule:h,pasteEvent:p,dropEvent:l})||!m.steps.length)){try{l=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{l=null}return s=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,m}};return n.map(d=>new I({view(u){let f=p=>{var m;r=(m=u.dom.parentElement)!=null&&m.contains(p.target)?u.dom.parentElement:null,r&&(Zr=e)},h=()=>{Zr&&(Zr=null)};return window.addEventListener("dragstart",f),window.addEventListener("dragend",h),{destroy(){window.removeEventListener("dragstart",f),window.removeEventListener("dragend",h)}}},props:{handleDOMEvents:{drop:(u,f)=>{if(i=r===u.dom.parentElement,l=f,!i){let h=Zr;h?.isEditable&&setTimeout(()=>{let p=h.state.selection;p&&h.commands.deleteRange({from:p.from,to:p.to})},10)}return!1},paste:(u,f)=>{var h;let p=(h=f.clipboardData)==null?void 0:h.getData("text/html");return s=f,o=!!p?.includes("data-pm-slice"),!1}}},appendTransaction:(u,f,h)=>{let p=u[0],m=p.getMeta("uiEvent")==="paste"&&!o,g=p.getMeta("uiEvent")==="drop"&&!i,y=p.getMeta("applyPasteRules"),b=!!y;if(!m&&!g&&!b)return;if(b){let{text:k}=y;typeof k=="string"?k=k:k=Ws(w.from(k),h.schema);let{from:C}=y,A=C+k.length,x=Hg(k);return a({rule:d,state:h,from:C,to:{b:A},pasteEvt:x})}let S=f.doc.content.findDiffStart(h.doc.content),T=f.doc.content.findDiffEnd(h.doc.content);if(!(!Ig(S)||!T||S===T.b))return a({rule:d,state:h,from:S,to:T,pasteEvt:s})}}))}var uo=class{constructor(t,e){this.splittableMarks=[],this.editor=e,this.extensions=Dd(t),this.schema=Cg(this.extensions,e),this.setupExtensions()}get commands(){return this.extensions.reduce((t,e)=>{let n={name:e.name,options:e.options,storage:this.editor.extensionStorage[e.name],editor:this.editor,type:Ls(e.name,this.schema)},r=L(e,"addCommands",n);return r?{...t,...r()}:t},{})}get plugins(){let{editor:t}=this;return js([...this.extensions
Line truncated
|
||||
`,textSerializers:s={}}=n||{},l="";return t.nodesBetween(r,o,(a,c,d,u)=>{var f;a.isBlock&&c>r&&(l+=i);let h=s?.[a.type.name];if(h)return d&&(l+=h({node:a,pos:c,parent:d,index:u,range:e})),!1;a.isText&&(l+=(f=a?.text)==null?void 0:f.slice(Math.max(r,c)-c,o-c))}),l}function vg(t,e){let n={from:0,to:t.content.size};return Pd(t,n,e)}function Id(t){return Object.fromEntries(Object.entries(t.nodes).filter(([,e])=>e.spec.toText).map(([e,n])=>[e,n.spec.toText]))}function mt(t,e){if(typeof t=="string"){if(!e.marks[t])throw Error(`There is no mark type named '${t}'. Maybe you forgot to add the extension?`);return e.marks[t]}return t}function Ld(t,e){let n=mt(e,t.schema),{from:r,to:o,empty:i}=t.selection,s=[];i?(t.storedMarks&&s.push(...t.storedMarks),s.push(...t.selection.$head.marks())):t.doc.nodesBetween(r,o,a=>{s.push(...a.marks)});let l=s.find(a=>a.type.name===n.name);return l?{...l.attrs}:{}}function ee(t,e){if(typeof t=="string"){if(!e.nodes[t])throw Error(`There is no node type named '${t}'. Maybe you forgot to add the extension?`);return e.nodes[t]}return t}function Tg(t,e){let n=ee(e,t.schema),{from:r,to:o}=t.selection,i=[];t.doc.nodesBetween(r,o,l=>{i.push(l)});let s=i.reverse().find(l=>l.type.name===n.name);return s?{...s.attrs}:{}}function io(t,e){return e.nodes[t]?"node":e.marks[t]?"mark":null}function Ks(t,e){let n=io(typeof e=="string"?e:e.name,t.schema);return n==="node"?Tg(t,e):n==="mark"?Ld(t,e):{}}function Ag(t,e=JSON.stringify){let n={};return t.filter(r=>{let o=e(r);return Object.prototype.hasOwnProperty.call(n,o)?!1:n[o]=!0})}function Eg(t){let e=Ag(t);return e.length===1?e:e.filter((n,r)=>!e.filter((i,s)=>s!==r).some(i=>n.oldRange.from>=i.oldRange.from&&n.oldRange.to<=i.oldRange.to&&n.newRange.from>=i.newRange.from&&n.newRange.to<=i.newRange.to))}function Us(t){let{mapping:e,steps:n}=t,r=[];return e.maps.forEach((o,i)=>{let s=[];if(o.ranges.length)o.forEach((l,a)=>{s.push({from:l,to:a})});else{let{from:l,to:a}=n[i];if(l===void 0||a===void 0)return;s.push({from:l,to:a})}s.forEach(({from:l,to:a})=>{let c=e.slice(i).map(l,-1),d=e.slice(i).map(a),u=e.invert().map(c,-1),f=e.invert().map(d);r.push({oldRange:{from:u,to:f},newRange:{from:c,to:d}})})}),Eg(r)}function Js(t){return Object.prototype.toString.call(t)==="[object RegExp]"}function no(t,e,n={strict:!0}){let r=Object.keys(e);return r.length?r.every(o=>n.strict?e[o]===t[o]:Js(e[o])?e[o].test(t[o]):e[o]===t[o]):!0}function Bd(t,e,n={}){return t.find(r=>r.type===e&&no(Object.fromEntries(Object.keys(n).map(o=>[o,r.attrs[o]])),n))}function kd(t,e,n={}){return!!Bd(t,e,n)}function qs(t,e,n){var r;if(!t||!e)return;let o=t.parent.childAfter(t.parentOffset);if((!o.node||!o.node.marks.some(d=>d.type===e))&&(o=t.parent.childBefore(t.parentOffset)),!o.node||!o.node.marks.some(d=>d.type===e)||(n=n||((r=o.node.marks[0])==null?void 0:r.attrs),!Bd([...o.node.marks],e,n)))return;let s=o.index,l=t.start()+o.offset,a=s+1,c=l+o.node.nodeSize;for(;s>0&&kd([...t.parent.child(s-1).marks],e,n);)s-=1,l-=t.parent.child(s).nodeSize;for(;a<t.parent.childCount&&kd([...t.parent.child(a).marks],e,n);)c+=t.parent.child(a).nodeSize,a+=1;return{from:l,to:c}}function so(t,e,n){let r=[];return t===e?n.resolve(t).marks().forEach(o=>{let i=n.resolve(t),s=qs(i,o.type);s&&r.push({mark:o,...s})}):n.nodesBetween(t,e,(o,i)=>{!o||o?.nodeSize===void 0||r.push(...o.marks.map(s=>({from:i,to:i+o.nodeSize,mark:s})))}),r}var zd=(t,e,n,r=20)=>{let o=t.doc.resolve(n),i=r,s=null;for(;i>0&&s===null;){let l=o.node(i);l?.type.name===e?s=l:i-=1}return[s,i]};function Ls(t,e){return e.nodes[t]||e.marks[t]||null}function eo(t,e,n){return Object.fromEntries(Object.entries(n).filter(([r])=>{let o=t.find(i=>i.type===e&&i.name===r);return o?o.attribute.keepOnSplit:!1}))}var Og=(t,e=500)=>{let n="",r=t.parentOffset;return t.parent.nodesBetween(Math.max(0,r-e),r,(o,i,s,l)=>{var a,c;let d=((c=(a=o.type.spec).toText)==null?void 0:c.call(a,{node:o,pos:i,parent:s,index:l}))||o.textContent||"%leaf%";n+=o.isAtom&&!o.isText?d:d.slice(0,Math.max(0,r-i))}),n};function Fs(t,e,n={}){let{empty:r,ranges:o}=t.selection,i=e?mt(e,t.schema):null;if(r)return!!(t.storedMarks||t.selection.$from.marks()).filter(u=>i?i.name===u.type.name:!0).find(u=>no(u.attrs,n,{strict:!1}));let s=0,l=[];if(o.forEach(({$from:u,$to:f})=>{let h=u.pos,p=f.pos;t.doc.nodesBetween(h,p,(m,g)=>{if(!m.isText&&!m.marks.length)return;let y=Math.max(h,g),b=Math.min(p,g+m.nodeSize),S=b-y;s+=S,l.push(...m.marks.map(M=>({mark:M,from:y,to:b})))})}),s===0)return!1;let a=l.filter(u=>i?i.name===u.mark.type.name:!0).filter(u=>no(u.mark.attrs,n,{strict:!1})).reduce((u,f)=>u+f.to-f.from,0),c=l.filter(u=>i?u.mark.type!==i&&u.mark.type.excludes(i):!0).reduce((u,f)=>u+f.to-f.from,0);return(a>0?a+c:a)>=s}function Ge(t,e,n={}){let{from:r,to:o,empty:i}=t.selection,s=e?ee(e,t.schema):null,l=[];t.doc.nodesBetween(r,o,(u,f)=>{if(u.isText)return;let h=Math.max(r,f),p=Math.min(o,f+u.nodeSize);l.push({node:u,from:h,to:p})});let a=o-r,c=l.filter(u=>s?s.name===u.node.type.name:!0).
Line truncated
|
||||
`,rules:n,plugin:r}):!1}},isInputRules:!0});return r}function Pg(t){return Object.prototype.toString.call(t).slice(8,-1)}function Qr(t){return Pg(t)!=="Object"?!1:t.constructor===Object&&Object.getPrototypeOf(t)===Object.prototype}function _d(t,e){let n={...t};return Qr(t)&&Qr(e)&&Object.keys(e).forEach(r=>{Qr(e[r])&&Qr(t[r])?n[r]=_d(t[r],e[r]):n[r]=e[r]}),n}var Ys=class{constructor(t={}){this.type="extendable",this.parent=null,this.child=null,this.name="",this.config={name:this.name},this.config={...this.config,...t},this.name=this.config.name}get options(){return{...U(L(this,"addOptions",{name:this.name}))||{}}}get storage(){return{...U(L(this,"addStorage",{name:this.name,options:this.options}))||{}}}configure(t={}){let e=this.extend({...this.config,addOptions:()=>_d(this.options,t)});return e.name=this.name,e.parent=this.parent,e}extend(t={}){let e=new this.constructor({...this.config,...t});return e.parent=this,this.child=e,e.name="name"in t?t.name:e.parent.name,e}},Z=class Wd extends Ys{constructor(){super(...arguments),this.type="mark"}static create(e={}){let n=typeof e=="function"?e():e;return new Wd(n)}static handleExit({editor:e,mark:n}){let{tr:r}=e.state,o=e.state.selection.$from;if(o.pos===o.end()){let s=o.marks();if(!!!s.find(c=>c?.type.name===n.name))return!1;let a=s.find(c=>c?.type.name===n.name);return a&&r.removeStoredMark(a),r.insertText(" ",o.pos),e.view.dispatch(r),!0}return!1}configure(e){return super.configure(e)}extend(e){let n=typeof e=="function"?e():e;return super.extend(n)}};function Ig(t){return typeof t=="number"}var Lg=class{constructor(t){this.find=t.find,this.handler=t.handler}},Bg=(t,e,n)=>{if(Js(e))return[...t.matchAll(e)];let r=e(t,n);return r?r.map(o=>{let i=[o.text];return i.index=o.index,i.input=t,i.data=o.data,o.replaceWith&&(o.text.includes(o.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),i.push(o.replaceWith)),i}):[]};function zg(t){let{editor:e,state:n,from:r,to:o,rule:i,pasteEvent:s,dropEvent:l}=t,{commands:a,chain:c,can:d}=new oo({editor:e,state:n}),u=[];return n.doc.nodesBetween(r,o,(h,p)=>{var m,g,y,b,S;if((g=(m=h.type)==null?void 0:m.spec)!=null&&g.code||!(h.isText||h.isTextblock||h.isInline))return;let M=(S=(b=(y=h.content)==null?void 0:y.size)!=null?b:h.nodeSize)!=null?S:0,w=Math.max(r,p),v=Math.min(o,p+M);if(w>=v)return;let E=h.isText?h.text||"":h.textBetween(w-p,v-p,void 0,"\uFFFC");Bg(E,i.find,s).forEach(T=>{if(T.index===void 0)return;let C=w+T.index+1,F=C+T[0].length,_={from:n.tr.mapping.map(C),to:n.tr.mapping.map(F)},G=i.handler({state:n,range:_,match:T,commands:a,chain:c,can:d,pasteEvent:s,dropEvent:l});u.push(G)})}),u.every(h=>h!==null)}var Zr=null,Hg=t=>{var e;let n=new ClipboardEvent("paste",{clipboardData:new DataTransfer});return(e=n.clipboardData)==null||e.setData("text/html",t),n};function Fg(t){let{editor:e,rules:n}=t,r=null,o=!1,i=!1,s=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,l;try{l=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{l=null}let a=({state:d,from:u,to:f,rule:h,pasteEvt:p})=>{let m=d.tr,g=ro({state:d,transaction:m});if(!(!zg({editor:e,state:g,from:Math.max(u-1,0),to:f.b-1,rule:h,pasteEvent:p,dropEvent:l})||!m.steps.length)){try{l=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{l=null}return s=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,m}};return n.map(d=>new I({view(u){let f=p=>{var m;r=(m=u.dom.parentElement)!=null&&m.contains(p.target)?u.dom.parentElement:null,r&&(Zr=e)},h=()=>{Zr&&(Zr=null)};return window.addEventListener("dragstart",f),window.addEventListener("dragend",h),{destroy(){window.removeEventListener("dragstart",f),window.removeEventListener("dragend",h)}}},props:{handleDOMEvents:{drop:(u,f)=>{if(i=r===u.dom.parentElement,l=f,!i){let h=Zr;h?.isEditable&&setTimeout(()=>{let p=h.state.selection;p&&h.commands.deleteRange({from:p.from,to:p.to})},10)}return!1},paste:(u,f)=>{var h;let p=(h=f.clipboardData)==null?void 0:h.getData("text/html");return s=f,o=!!p?.includes("data-pm-slice"),!1}}},appendTransaction:(u,f,h)=>{let p=u[0],m=p.getMeta("uiEvent")==="paste"&&!o,g=p.getMeta("uiEvent")==="drop"&&!i,y=p.getMeta("applyPasteRules"),b=!!y;if(!m&&!g&&!b)return;if(b){let{text:w}=y;typeof w=="string"?w=w:w=Ws(x.from(w),h.schema);let{from:v}=y,E=v+w.length,k=Hg(w);return a({rule:d,state:h,from:v,to:{b:E},pasteEvt:k})}let S=f.doc.content.findDiffStart(h.doc.content),M=f.doc.content.findDiffEnd(h.doc.content);if(!(!Ig(S)||!M||S===M.b))return a({rule:d,state:h,from:S,to:M,pasteEvt:s})}}))}var uo=class{constructor(t,e){this.splittableMarks=[],this.editor=e,this.extensions=Dd(t),this.schema=Cg(this.extensions,e),this.setupExtensions()}get commands(){return this.extensions.reduce((t,e)=>{let n={name:e.name,options:e.options,storage:this.editor.extensionStorage[e.name],editor:this.editor,type:Ls(e.name,this.schema)},r=L(e,"addCommands",n);return r?{...t,...r()}:t},{})}get plugins(){let{editor:t}=this;return js([...this.extensions
Line truncated
|
||||
position: relative;
|
||||
}
|
||||
|
||||
@@ -82,23 +82,23 @@ img.ProseMirror-separator {
|
||||
display: block;
|
||||
}`;function Xy(t,e,n){let r=document.querySelector(`style[data-tiptap-style${n?`-${n}`:""}]`);if(r!==null)return r;let o=document.createElement("style");return e&&o.setAttribute("nonce",e),o.setAttribute(`data-tiptap-style${n?`-${n}`:""}`,""),o.innerHTML=t,document.getElementsByTagName("head")[0].appendChild(o),o}var ru=class extends wg{constructor(t={}){super(),this.css=null,this.editorView=null,this.isFocused=!1,this.isInitialized=!1,this.extensionStorage={},this.instanceId=Math.random().toString(36).slice(2,9),this.options={element:typeof document<"u"?document.createElement("div"):null,content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,editorProps:{},parseOptions:{},coreExtensionOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,enableContentCheck:!1,emitContentError:!1,onBeforeCreate:()=>null,onCreate:()=>null,onMount:()=>null,onUnmount:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null,onContentError:({error:r})=>{throw r},onPaste:()=>null,onDrop:()=>null,onDelete:()=>null},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.setOptions(t),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.on("mount",this.options.onMount),this.on("unmount",this.options.onUnmount),this.on("contentError",this.options.onContentError),this.on("create",this.options.onCreate),this.on("update",this.options.onUpdate),this.on("selectionUpdate",this.options.onSelectionUpdate),this.on("transaction",this.options.onTransaction),this.on("focus",this.options.onFocus),this.on("blur",this.options.onBlur),this.on("destroy",this.options.onDestroy),this.on("drop",({event:r,slice:o,moved:i})=>this.options.onDrop(r,o,i)),this.on("paste",({event:r,slice:o})=>this.options.onPaste(r,o)),this.on("delete",this.options.onDelete);let e=this.createDoc(),n=Vd(e,this.options.autofocus);this.editorState=Ir.create({doc:e,schema:this.schema,selection:n||void 0}),this.options.element&&this.mount(this.options.element)}mount(t){if(typeof document>"u")throw new Error("[tiptap error]: The editor cannot be mounted because there is no 'document' defined in this environment.");this.createView(t),this.emit("mount",{editor:this}),window.setTimeout(()=>{this.isDestroyed||(this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}),this.isInitialized=!0)},0)}unmount(){if(this.editorView){let t=this.editorView.dom;t?.editor&&delete t.editor,this.editorView.destroy()}if(this.editorView=null,this.isInitialized=!1,this.css)try{typeof this.css.remove=="function"?this.css.remove():this.css.parentNode&&this.css.parentNode.removeChild(this.css)}catch(t){console.warn("Failed to remove CSS element:",t)}this.css=null,this.emit("unmount",{editor:this})}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager.chain()}can(){return this.commandManager.can()}injectCSS(){this.options.injectCSS&&typeof document<"u"&&(this.css=Xy(Yy,this.options.injectNonce))}setOptions(t={}){this.options={...this.options,...t},!(!this.editorView||!this.state||this.isDestroyed)&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(t,e=!0){this.setOptions({editable:t}),e&&this.emit("update",{editor:this,transaction:this.state.tr,appendedTransactions:[]})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get view(){return this.editorView?this.editorView:new Proxy({state:this.editorState,updateState:t=>{this.editorState=t},dispatch:t=>{this.editorState=this.state.apply(t)},composing:!1,dragging:null,editable:!0,isDestroyed:!1},{get:(t,e)=>{if(e==="state")return this.editorState;if(e in t)return Reflect.get(t,e);throw new Error(`[tiptap error]: The editor view is not available. Cannot access view['${e}']. The editor may not be mounted yet.`)}})}get state(){return this.editorView&&(this.editorState=this.view.state),this.editorState}registerPlugin(t,e){let n=Nd(e)?e(t,[...this.state.plugins]):[...this.state.plugins,t],r=this.state.reconfigure({plugins:n});return this.view.updateState(r),r}unregisterPlugin(t){if(this.isDestroyed)return;let e=this.state.plugins,n=e;if([].concat(t).forEach(o=>{let i=typeof o=="string"?`${o}$`:o.key;n=n.filter(s=>!s.key.startsWith(i))}),e.length===n.length)return;let r=this.state.reconfigure({plugins:n});return this.view.updateState(r),r}createExtensionManager(){var t,e;let r=[...this.options.enableCoreExtensions?[Xd,Kd.configure({blockSeparator:(e=(t=this.options.coreExtensionOptions)==null?void 0:t.clipboardTextSerializer)==null?void 0:e.blockSeparator}),qd,Zd,eu,nu,Yd,tu,Gd].filter(o=>typeof this.options.enableCoreExtensions=="object"?this.options.enableCoreExtensions[o.name]!==!1:!0):[],...this.options.extensions].filter(o=>["e
Line truncated
|
||||
|
||||
`,textSerializers:n={}}=t||{};return vg(this.state.doc,{blockSeparator:e,textSerializers:{...Id(this.schema),...n}})}get isEmpty(){return tr(this.state.doc)}destroy(){this.emit("destroy"),this.unmount(),this.removeAllListeners()}get isDestroyed(){var t,e;return(e=(t=this.editorView)==null?void 0:t.isDestroyed)!=null?e:!0}$node(t,e){var n;return((n=this.$doc)==null?void 0:n.querySelector(t,e))||null}$nodes(t,e){var n;return((n=this.$doc)==null?void 0:n.querySelectorAll(t,e))||null}$pos(t){let e=this.state.doc.resolve(t);return new Gy(e,this)}get $doc(){return this.$pos(0)}};function Le(t){return new co({find:t.find,handler:({state:e,range:n,match:r})=>{let o=U(t.getAttributes,void 0,r);if(o===!1||o===null)return null;let{tr:i}=e,s=r[r.length-1],l=r[0];if(s){let a=l.search(/\S/),c=n.from+l.indexOf(s),d=c+s.length;if(so(n.from,n.to,e.doc).filter(h=>h.mark.type.excluded.find(m=>m===t.type&&m!==h.mark.type)).filter(h=>h.to>c).length)return null;d<n.to&&i.delete(d,n.to),c>n.from&&i.delete(n.from+a,c);let f=n.from+a+s.length;i.addMark(n.from+a,f,t.type.create(o||{})),i.removeStoredMark(t.type)}}})}function fo(t){return new co({find:t.find,handler:({state:e,range:n,match:r})=>{let o=U(t.getAttributes,void 0,r)||{},{tr:i}=e,s=n.from,l=n.to,a=t.type.create(o);if(r[1]){let c=r[0].lastIndexOf(r[1]),d=s+c;d>l?d=l:l=d+r[1].length;let u=r[0][r[0].length-1];i.insertText(u,s+r[0].length-1),i.replaceWith(d,l,a)}else if(r[0]){let c=t.type.isInline?s:s-1;i.insert(c,t.type.create(o)).delete(i.mapping.map(s),i.mapping.map(l))}i.scrollIntoView()}})}function nr(t){return new co({find:t.find,handler:({state:e,range:n,match:r})=>{let o=e.doc.resolve(n.from),i=U(t.getAttributes,void 0,r)||{};if(!o.node(-1).canReplaceWith(o.index(-1),o.indexAfter(-1),t.type))return null;e.tr.delete(n.from,n.to).setBlockType(n.from,n.from,t.type,i)}})}function Xe(t){return new co({find:t.find,handler:({state:e,range:n,match:r,chain:o})=>{let i=U(t.getAttributes,void 0,r)||{},s=e.tr.delete(n.from,n.to),a=s.doc.resolve(n.from).blockRange(),c=a&&dn(a,t.type,i);if(!c)return null;if(s.wrap(a,c),t.keepMarks&&t.editor){let{selection:u,storedMarks:f}=e,{splittableMarks:h}=t.editor.extensionManager,p=f||u.$to.parentOffset&&u.$from.marks();if(p){let m=p.filter(g=>h.includes(g.type.name));s.ensureMarks(m)}}if(t.keepAttributes){let u=t.type.name==="bulletList"||t.type.name==="orderedList"?"listItem":"taskList";o().updateAttributes(u,i).run()}let d=s.doc.resolve(n.from-1).nodeBefore;d&&d.type===t.type&&Ne(s.doc,n.from-1)&&(!t.joinPredicate||t.joinPredicate(r,d))&&s.join(n.from-1)}})}function ou(t,e){let{selection:n}=t,{$from:r}=n;if(n instanceof P){let i=r.index();return r.parent.canReplaceWith(i,i+1,e)}let o=r.depth;for(;o>=0;){let i=r.index(o);if(r.node(o).contentMatchAt(i).matchType(e))return!0;o-=1}return!1}function iu(t){return t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}function Qy(t,e,n={}){let{state:r}=e,{doc:o,tr:i}=r,s=t;o.descendants((l,a)=>{let c=i.mapping.map(a),d=i.mapping.map(a)+l.nodeSize,u=null;if(l.marks.forEach(h=>{if(h!==s)return!1;u=h}),!u)return;let f=!1;if(Object.keys(n).forEach(h=>{n[h]!==u.attrs[h]&&(f=!0)}),f){let h=t.type.create({...t.attrs,...n});i.removeMark(c,d,t.type),i.addMark(c,d,h)}}),i.docChanged&&e.view.dispatch(i)}var H=class su extends Ys{constructor(){super(...arguments),this.type="node"}static create(e={}){let n=typeof e=="function"?e():e;return new su(n)}configure(e){return super.configure(e)}extend(e){let n=typeof e=="function"?e():e;return super.extend(n)}};function Ce(t){return new Lg({find:t.find,handler:({state:e,range:n,match:r,pasteEvent:o})=>{let i=U(t.getAttributes,void 0,r,o);if(i===!1||i===null)return null;let{tr:s}=e,l=r[r.length-1],a=r[0],c=n.to;if(l){let d=a.search(/\S/),u=n.from+a.indexOf(l),f=u+l.length;if(so(n.from,n.to,e.doc).filter(p=>p.mark.type.excluded.find(g=>g===t.type&&g!==p.mark.type)).filter(p=>p.to>u).length)return null;f<n.to&&s.delete(f,n.to),u>n.from&&s.delete(n.from+d,u),c=n.from+d+l.length,s.addMark(n.from+d,c,t.type.create(i||{})),s.removeStoredMark(t.type)}}})}function lu(t={}){return new I({view(e){return new Qs(e,t)}})}var Qs=class{constructor(e,n){var r;this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=(r=n.width)!==null&&r!==void 0?r:1,this.color=n.color===!1?void 0:n.color||"black",this.class=n.class,this.handlers=["dragover","dragend","drop","dragleave"].map(o=>{let i=s=>{this[o](s)};return e.dom.addEventListener(o,i),{name:o,handler:i}})}destroy(){this.handlers.forEach(({name:e,handler:n})=>this.editorView.dom.removeEventListener(e,n))}update(e,n){this.cursorPos!=null&&n.doc!=e.state.doc&&(this.cursorPos>e.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(e){e!=this.cursorPos&&(this.cursorPos=e,e==null?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let e=this.editorView.state.doc.resolve(this.cursorPos),n=!e.parent.inlineContent,r,o=this.editorView.dom,i=o.getBoundin
Line truncated
|
||||
`,textSerializers:n={}}=t||{};return vg(this.state.doc,{blockSeparator:e,textSerializers:{...Id(this.schema),...n}})}get isEmpty(){return tr(this.state.doc)}destroy(){this.emit("destroy"),this.unmount(),this.removeAllListeners()}get isDestroyed(){var t,e;return(e=(t=this.editorView)==null?void 0:t.isDestroyed)!=null?e:!0}$node(t,e){var n;return((n=this.$doc)==null?void 0:n.querySelector(t,e))||null}$nodes(t,e){var n;return((n=this.$doc)==null?void 0:n.querySelectorAll(t,e))||null}$pos(t){let e=this.state.doc.resolve(t);return new Gy(e,this)}get $doc(){return this.$pos(0)}};function Le(t){return new co({find:t.find,handler:({state:e,range:n,match:r})=>{let o=U(t.getAttributes,void 0,r);if(o===!1||o===null)return null;let{tr:i}=e,s=r[r.length-1],l=r[0];if(s){let a=l.search(/\S/),c=n.from+l.indexOf(s),d=c+s.length;if(so(n.from,n.to,e.doc).filter(h=>h.mark.type.excluded.find(m=>m===t.type&&m!==h.mark.type)).filter(h=>h.to>c).length)return null;d<n.to&&i.delete(d,n.to),c>n.from&&i.delete(n.from+a,c);let f=n.from+a+s.length;i.addMark(n.from+a,f,t.type.create(o||{})),i.removeStoredMark(t.type)}}})}function fo(t){return new co({find:t.find,handler:({state:e,range:n,match:r})=>{let o=U(t.getAttributes,void 0,r)||{},{tr:i}=e,s=n.from,l=n.to,a=t.type.create(o);if(r[1]){let c=r[0].lastIndexOf(r[1]),d=s+c;d>l?d=l:l=d+r[1].length;let u=r[0][r[0].length-1];i.insertText(u,s+r[0].length-1),i.replaceWith(d,l,a)}else if(r[0]){let c=t.type.isInline?s:s-1;i.insert(c,t.type.create(o)).delete(i.mapping.map(s),i.mapping.map(l))}i.scrollIntoView()}})}function nr(t){return new co({find:t.find,handler:({state:e,range:n,match:r})=>{let o=e.doc.resolve(n.from),i=U(t.getAttributes,void 0,r)||{};if(!o.node(-1).canReplaceWith(o.index(-1),o.indexAfter(-1),t.type))return null;e.tr.delete(n.from,n.to).setBlockType(n.from,n.from,t.type,i)}})}function Xe(t){return new co({find:t.find,handler:({state:e,range:n,match:r,chain:o})=>{let i=U(t.getAttributes,void 0,r)||{},s=e.tr.delete(n.from,n.to),a=s.doc.resolve(n.from).blockRange(),c=a&&dn(a,t.type,i);if(!c)return null;if(s.wrap(a,c),t.keepMarks&&t.editor){let{selection:u,storedMarks:f}=e,{splittableMarks:h}=t.editor.extensionManager,p=f||u.$to.parentOffset&&u.$from.marks();if(p){let m=p.filter(g=>h.includes(g.type.name));s.ensureMarks(m)}}if(t.keepAttributes){let u=t.type.name==="bulletList"||t.type.name==="orderedList"?"listItem":"taskList";o().updateAttributes(u,i).run()}let d=s.doc.resolve(n.from-1).nodeBefore;d&&d.type===t.type&&Ne(s.doc,n.from-1)&&(!t.joinPredicate||t.joinPredicate(r,d))&&s.join(n.from-1)}})}function ou(t,e){let{selection:n}=t,{$from:r}=n;if(n instanceof P){let i=r.index();return r.parent.canReplaceWith(i,i+1,e)}let o=r.depth;for(;o>=0;){let i=r.index(o);if(r.node(o).contentMatchAt(i).matchType(e))return!0;o-=1}return!1}function iu(t){return t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}function Qy(t,e,n={}){let{state:r}=e,{doc:o,tr:i}=r,s=t;o.descendants((l,a)=>{let c=i.mapping.map(a),d=i.mapping.map(a)+l.nodeSize,u=null;if(l.marks.forEach(h=>{if(h!==s)return!1;u=h}),!u)return;let f=!1;if(Object.keys(n).forEach(h=>{n[h]!==u.attrs[h]&&(f=!0)}),f){let h=t.type.create({...t.attrs,...n});i.removeMark(c,d,t.type),i.addMark(c,d,h)}}),i.docChanged&&e.view.dispatch(i)}var H=class su extends Ys{constructor(){super(...arguments),this.type="node"}static create(e={}){let n=typeof e=="function"?e():e;return new su(n)}configure(e){return super.configure(e)}extend(e){let n=typeof e=="function"?e():e;return super.extend(n)}};function Ce(t){return new Lg({find:t.find,handler:({state:e,range:n,match:r,pasteEvent:o})=>{let i=U(t.getAttributes,void 0,r,o);if(i===!1||i===null)return null;let{tr:s}=e,l=r[r.length-1],a=r[0],c=n.to;if(l){let d=a.search(/\S/),u=n.from+a.indexOf(l),f=u+l.length;if(so(n.from,n.to,e.doc).filter(p=>p.mark.type.excluded.find(g=>g===t.type&&g!==p.mark.type)).filter(p=>p.to>u).length)return null;f<n.to&&s.delete(f,n.to),u>n.from&&s.delete(n.from+d,u),c=n.from+d+l.length,s.addMark(n.from+d,c,t.type.create(i||{})),s.removeStoredMark(t.type)}}})}function lu(t={}){return new I({view(e){return new Qs(e,t)}})}var Qs=class{constructor(e,n){var r;this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=(r=n.width)!==null&&r!==void 0?r:1,this.color=n.color===!1?void 0:n.color||"black",this.class=n.class,this.handlers=["dragover","dragend","drop","dragleave"].map(o=>{let i=s=>{this[o](s)};return e.dom.addEventListener(o,i),{name:o,handler:i}})}destroy(){this.handlers.forEach(({name:e,handler:n})=>this.editorView.dom.removeEventListener(e,n))}update(e,n){this.cursorPos!=null&&n.doc!=e.state.doc&&(this.cursorPos>e.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(e){e!=this.cursorPos&&(this.cursorPos=e,e==null?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let e=this.editorView.state.doc.resolve(this.cursorPos),n=!e.parent.inlineContent,r,o=this.editorView.dom,i=o.getBoundin
Line truncated
|
||||
`,`
|
||||
`).split(`
|
||||
`).map(f=>i+f).join(`
|
||||
`);return s.replaceWith(l,a,e.schema.text(u)),!0})},"Shift-Tab":({editor:t})=>{if(!this.options.enableTabIndentation)return!1;let{state:e}=t,{selection:n}=e,{$from:r,empty:o}=n;return r.parent.type!==this.type?!1:o?t.commands.command(({tr:i})=>{var s;let{pos:l}=r,a=r.start(),c=r.end(),u=e.doc.textBetween(a,c,`
|
||||
`,`
|
||||
`).split(`
|
||||
`),f=0,h=0,p=l-a;for(let T=0;T<u.length;T+=1){if(h+u[T].length>=p){f=T;break}h+=u[T].length+1}let g=((s=u[f].match(/^ */))==null?void 0:s[0])||"",y=Math.min(g.length,this.options.tabSize);if(y===0)return!0;let b=a;for(let T=0;T<f;T+=1)b+=u[T].length+1;return i.delete(b,b+y),l-b<=y&&i.setSelection(R.create(i.doc,b)),!0}):t.commands.command(({tr:i})=>{let{from:s,to:l}=n,d=e.doc.textBetween(s,l,`
|
||||
`),f=0,h=0,p=l-a;for(let M=0;M<u.length;M+=1){if(h+u[M].length>=p){f=M;break}h+=u[M].length+1}let g=((s=u[f].match(/^ */))==null?void 0:s[0])||"",y=Math.min(g.length,this.options.tabSize);if(y===0)return!0;let b=a;for(let M=0;M<f;M+=1)b+=u[M].length+1;return i.delete(b,b+y),l-b<=y&&i.setSelection(R.create(i.doc,b)),!0}):t.commands.command(({tr:i})=>{let{from:s,to:l}=n,d=e.doc.textBetween(s,l,`
|
||||
`,`
|
||||
`).split(`
|
||||
`).map(u=>{var f;let h=((f=u.match(/^ */))==null?void 0:f[0])||"",p=Math.min(h.length,this.options.tabSize);return u.slice(p)}).join(`
|
||||
`);return i.replaceWith(s,l,e.schema.text(d)),!0})},Enter:({editor:t})=>{if(!this.options.exitOnTripleEnter)return!1;let{state:e}=t,{selection:n}=e,{$from:r,empty:o}=n;if(!o||r.parent.type!==this.type)return!1;let i=r.parentOffset===r.parent.nodeSize-2,s=r.parent.textContent.endsWith(`
|
||||
|
||||
`);return!i||!s?!1:t.chain().command(({tr:l})=>(l.delete(r.pos-2,r.pos),!0)).exitCode().run()},ArrowDown:({editor:t})=>{if(!this.options.exitOnArrowDown)return!1;let{state:e}=t,{selection:n,doc:r}=e,{$from:o,empty:i}=n;if(!i||o.parent.type!==this.type||!(o.parentOffset===o.parent.nodeSize-2))return!1;let l=o.after();return l===void 0?!1:r.nodeAt(l)?t.commands.command(({tr:c})=>(c.setSelection(D.near(r.resolve(l))),!0)):t.commands.exitCode()}}},addInputRules(){return[nr({find:C0,type:this.type,getAttributes:t=>({language:t[1]})}),nr({find:M0,type:this.type,getAttributes:t=>({language:t[1]})})]},addProseMirrorPlugins(){return[new I({key:new z("codeBlockVSCodeHandler"),props:{handlePaste:(t,e)=>{if(!e.clipboardData||this.editor.isActive(this.type.name))return!1;let n=e.clipboardData.getData("text/plain"),r=e.clipboardData.getData("vscode-editor-data"),o=r?JSON.parse(r):void 0,i=o?.mode;if(!n||!i)return!1;let{tr:s,schema:l}=t.state,a=l.text(n.replace(/\r\n?/g,`
|
||||
`));return s.replaceSelectionWith(this.type.create({language:i},a)),s.selection.$from.parent.type!==this.type&&s.setSelection(R.near(s.doc.resolve(Math.max(0,s.selection.from-2)))),s.setMeta("paste",!0),t.dispatch(s),!0}}})]}}),wu=v0;var Su=H.create({name:"customBlock",group:"block",atom:!0,defining:!0,draggable:!0,selectable:!0,isolating:!0,allowGapCursor:!0,inline:!1,addNodeView(){return({editor:t,node:e,getPos:n,HTMLAttributes:r,decorations:o,extension:i})=>{let s=document.createElement("div");s.setAttribute("data-config",e.attrs.config),s.setAttribute("data-id",e.attrs.id),s.setAttribute("data-type","customBlock");let l=document.createElement("div");if(l.className="fi-fo-rich-editor-custom-block-header fi-not-prose",s.appendChild(l),t.isEditable&&typeof e.attrs.config=="object"&&e.attrs.config!==null&&Object.keys(e.attrs.config).length>0){let c=document.createElement("div");c.className="fi-fo-rich-editor-custom-block-edit-btn-ctn",l.appendChild(c);let d=document.createElement("button");d.className="fi-icon-btn",d.type="button",d.innerHTML=i.options.editCustomBlockButtonIconHtml,d.addEventListener("click",()=>i.options.editCustomBlockUsing(e.attrs.id,e.attrs.config)),c.appendChild(d)}let a=document.createElement("p");if(a.className="fi-fo-rich-editor-custom-block-heading",a.textContent=e.attrs.label,l.appendChild(a),t.isEditable){let c=document.createElement("div");c.className="fi-fo-rich-editor-custom-block-delete-btn-ctn",l.appendChild(c);let d=document.createElement("button");d.className="fi-icon-btn",d.type="button",d.innerHTML=i.options.deleteCustomBlockButtonIconHtml,d.addEventListener("click",()=>t.chain().setNodeSelection(n()).deleteSelection().run()),c.appendChild(d)}if(e.attrs.preview){let c=document.createElement("div");c.className="fi-fo-rich-editor-custom-block-preview fi-not-prose",c.innerHTML=new TextDecoder().decode(Uint8Array.from(atob(e.attrs.preview),d=>d.charCodeAt(0))),s.appendChild(c)}return{dom:s}}},addOptions(){return{deleteCustomBlockButtonIconHtml:null,editCustomBlockButtonIconHtml:null,editCustomBlockUsing:()=>{},insertCustomBlockUsing:()=>{}}},addAttributes(){return{config:{default:null,parseHTML:t=>JSON.parse(t.getAttribute("data-config"))},id:{default:null,parseHTML:t=>t.getAttribute("data-id"),renderHTML:t=>t.id?{"data-id":t.id}:{}},label:{default:null,parseHTML:t=>t.getAttribute("data-label"),rendered:!1},preview:{default:null,parseHTML:t=>t.getAttribute("data-preview"),rendered:!1}}},parseHTML(){return[{tag:`div[data-type="${this.name}"]`}]},renderHTML({HTMLAttributes:t}){return["div",O(t)]},addKeyboardShortcuts(){return{Backspace:()=>this.editor.commands.command(({tr:t,state:e})=>{let n=!1,{selection:r}=e,{empty:o,anchor:i}=r;if(!o)return!1;let s=new le,l=0;return e.doc.nodesBetween(i-1,i,(a,c)=>{if(a.type.name===this.name)return n=!0,s=a,l=c,!1}),n})}},addProseMirrorPlugins(){let{insertCustomBlockUsing:t}=this.options;return[new I({props:{handleDrop(e,n){if(!n||(n.preventDefault(),!n.dataTransfer.getData("customBlock")))return!1;let r=n.dataTransfer.getData("customBlock");return t(r,e.posAtCoords({left:n.clientX,top:n.clientY}).pos),!1}}})]}});var yo=(t,e)=>e.view.domAtPos(t).node.offsetParent!==null,T0=(t,e,n)=>{for(let r=t.depth;r>0;r-=1){let o=t.node(r),i=e(o),s=yo(t.start(r),n);if(i&&s)return{pos:r>0?t.before(r):0,start:t.start(r),depth:r,node:o}}},ku=(t,e)=>{let{state:n,view:r,extensionManager:o}=t,{schema:i,selection:s}=n,{empty:l,$anchor:a}=s,c=!!o.extensions.find(y=>y.name==="gapCursor");if(!l||a.parent.type!==i.nodes.detailsSummary||!c||e==="right"&&a.parentOffset!==a.parent.nodeSize-2)return!1;let d=Ye(y=>y.type===i.nodes.details)(s);if(!d)return!1;let u=kn(d.node,y=>y.type===i.nodes.detailsContent);if(!u.length||yo(d.start+u[0].pos+1,t))return!1;let h=n.doc.resolve(d.pos+d.node.nodeSize),p=se.findFrom(h,1,!1);if(!p)return!1;let{tr:m}=n,g=new se(p);return m.setSelection(g),m.scrollIntoView(),r.dispatch(m),!0},Cu=H.create({name:"details",content:"detailsSummary detailsContent",group:"block",defining:!0,isolating:!0,allowGapCursor:!1,addOptions(){return{persist:!1,openClassName:"is-open",HTMLAttributes:{}}},addAttributes(){return this.options.persist?{open:{default:!1,parseHTML:t=>t.hasAttribute("open"),renderHTML:({open:t})=>t?{open:""}:{}}}:[]},parseHTML(){return[{tag:"details"}]},renderHTML({HTMLAttributes:t}){return["details",O(this.options.HTMLAttributes,t),0]},addNodeView(){return({editor:t,getPos:e,node:n,HTMLAttributes:r})=>{let o=document.createElement("div"),i=O(this.options.HTMLAttributes,r,{"data-type":this.name});Object.entries(i).forEach(([c,d])=>o.setAttribute(c,d));let s=document.createElement("button");s.type="button",o.append(s);let l=document.createElement("div");o.append(l);let a=c=>{if(c!==void 0)if(c){if(o.classList.contains(this.options.openClassName))return;o.classList.add(this.options.openClassName)}else{if(!o.classList.contains(this.options.openClassName))return;o.classList.remove(this.options.openClassName)}else o.classList.toggle(thi
Line truncated
|
||||
`},addCommands(){return{setHardBreak:()=>({commands:t,chain:e,state:n,editor:r})=>t.first([()=>t.exitCode(),()=>t.command(()=>{let{selection:o,storedMarks:i}=n;if(o.$from.parent.type.spec.isolating)return!1;let{keepMarks:s}=this.options,{splittableMarks:l}=r.extensionManager,a=i||o.$to.parentOffset&&o.$from.marks();return e().insertContent({type:this.name}).command(({tr:c,dispatch:d})=>{if(d&&a&&s){let u=a.filter(f=>l.includes(f.type.name));c.ensureMarks(u)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),Ou=E0;var O0=H.create({name:"heading",addOptions(){return{levels:[1,2,3,4,5,6],HTMLAttributes:{}}},content:"inline*",group:"block",defining:!0,addAttributes(){return{level:{default:1,rendered:!1}}},parseHTML(){return this.options.levels.map(t=>({tag:`h${t}`,attrs:{level:t}}))},renderHTML({node:t,HTMLAttributes:e}){return[`h${this.options.levels.includes(t.attrs.level)?t.attrs.level:this.options.levels[0]}`,O(this.options.HTMLAttributes,e),0]},addCommands(){return{setHeading:t=>({commands:e})=>this.options.levels.includes(t.level)?e.setNode(this.name,t):!1,toggleHeading:t=>({commands:e})=>this.options.levels.includes(t.level)?e.toggleNode(this.name,"paragraph",t):!1}},addKeyboardShortcuts(){return this.options.levels.reduce((t,e)=>({...t,[`Mod-Alt-${e}`]:()=>this.editor.commands.toggleHeading({level:e})}),{})},addInputRules(){return this.options.levels.map(t=>nr({find:new RegExp(`^(#{${Math.min(...this.options.levels)},${t}})\\s$`),type:this.type,getAttributes:{level:t}}))}}),Nu=O0;var N0=/(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))$/,R0=/(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))/g,D0=Z.create({name:"highlight",addOptions(){return{multicolor:!1,HTMLAttributes:{}}},addAttributes(){return this.options.multicolor?{color:{default:null,parseHTML:t=>t.getAttribute("data-color")||t.style.backgroundColor,renderHTML:t=>t.color?{"data-color":t.color,style:`background-color: ${t.color}; color: inherit`}:{}}}:{}},parseHTML(){return[{tag:"mark"}]},renderHTML({HTMLAttributes:t}){return["mark",O(this.options.HTMLAttributes,t),0]},addCommands(){return{setHighlight:t=>({commands:e})=>e.setMark(this.name,t),toggleHighlight:t=>({commands:e})=>e.toggleMark(this.name,t),unsetHighlight:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-h":()=>this.editor.commands.toggleHighlight()}},addInputRules(){return[Le({find:N0,type:this.type})]},addPasteRules(){return[Ce({find:R0,type:this.type})]}}),Ru=D0;var P0=H.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{}}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:t}){return["hr",O(this.options.HTMLAttributes,t)]},addCommands(){return{setHorizontalRule:()=>({chain:t,state:e})=>{if(!ou(e,e.schema.nodes[this.name]))return!1;let{selection:n}=e,{$to:r}=n,o=t();return lo(n)?o.insertContentAt(r.pos,{type:this.name}):o.insertContent({type:this.name}),o.command(({tr:i,dispatch:s})=>{var l;if(s){let{$to:a}=i.selection,c=a.end();if(a.nodeAfter)a.nodeAfter.isTextblock?i.setSelection(R.create(i.doc,a.pos+1)):a.nodeAfter.isBlock?i.setSelection(P.create(i.doc,a.pos)):i.setSelection(R.create(i.doc,a.pos));else{let d=(l=a.parent.type.contentMatch.defaultType)==null?void 0:l.create();d&&(i.insert(c,d),i.setSelection(R.create(i.doc,c+1)))}i.scrollIntoView()}return!0}).run()}}},addInputRules(){return[fo({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}}),Du=P0;var I0=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,L0=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,B0=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,z0=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,H0=Z.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:t=>t.style.fontStyle!=="normal"&&null},{style:"font-style=normal",clearMark:t=>t.type.name===this.name},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:t}){return["em",O(this.options.HTMLAttributes,t),0]},addCommands(){return{setItalic:()=>({commands:t})=>t.setMark(this.name),toggleItalic:()=>({commands:t})=>t.toggleMark(this.name),unsetItalic:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[Le({find:I0,type:this.type}),Le({find:B0,type:this.type})]},addPasteRules(){return[Ce({find:L0,type:this.type}),Ce({find:z0,type:this.type})]}}),Pu=H0;var F0=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,$0=H.create({name:"image",addOptions(){return{inline:!1,allowBase64:!1,HTMLAttributes:{}}},inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes(){return{src:{default:null},alt:{default:null},title:{default:null},width:{default:null},height:{default:null}}},parseHTML(){return[{tag:this.options.allowBase64?"img[src]":'img[src]:not([src
Line truncated
|
||||
`,J0="\uFE0F",q0="\u200D",dl="\uFFFC",bo=null,xo=null;function G0(t=[]){let e={};Me.groups=e;let n=new Me;bo==null&&(bo=Fu(V0)),xo==null&&(xo=Fu(_0)),M(n,"'",zo),M(n,"{",sr),M(n,"}",lr),M(n,"[",ko),M(n,"]",Co),M(n,"(",Mo),M(n,")",vo),M(n,"<",To),M(n,">",Ao),M(n,"\uFF08",Eo),M(n,"\uFF09",Oo),M(n,"\u300C",No),M(n,"\u300D",Ro),M(n,"\u300E",Do),M(n,"\u300F",Po),M(n,"\uFF1C",Io),M(n,"\uFF1E",Lo),M(n,"&",Bo),M(n,"*",Ho),M(n,"@",Rt),M(n,"`",$o),M(n,"^",Vo),M(n,":",Dt),M(n,",",kl),M(n,"$",_o),M(n,".",et),M(n,"=",Wo),M(n,"!",Cl),M(n,"-",ze),M(n,"%",ar),M(n,"|",jo),M(n,"+",Ko),M(n,"#",Uo),M(n,"?",cr),M(n,'"',Ml),M(n,"/",tt),M(n,";",vl),M(n,"~",dr),M(n,"_",Jo),M(n,"\\",Fo),M(n,"\u30FB",Uu);let r=te(n,yt,wl,{[fl]:!0});te(r,yt,r);let o=te(r,gt,ju,{[ir]:!0}),i=te(r,rr,Ku,{[or]:!0}),s=te(n,gt,bt,{[hl]:!0});te(s,yt,o),te(s,gt,s),te(o,yt,o),te(o,gt,o);let l=te(n,rr,gl,{[pl]:!0});te(l,gt),te(l,yt,i),te(l,rr,l),te(i,yt,i),te(i,gt),te(i,rr,i);let a=M(n,cl,Sl,{[sl]:!0}),c=M(n,Hu,xl,{[sl]:!0}),d=te(n,al,xl,{[sl]:!0});M(n,dl,d),M(c,cl,a),M(c,dl,d),te(c,al,d),M(d,Hu),M(d,cl),te(d,al,d),M(d,dl,d);let u=te(n,ll,Ju,{[Wu]:!0});M(u,"#"),te(u,ll,u),M(u,J0,u);let f=M(u,q0);M(f,"#"),te(f,ll,u);let h=[[gt,s],[yt,o]],p=[[gt,null],[rr,l],[yt,i]];for(let m=0;m<bo.length;m++)Nt(n,bo[m],yl,bt,h);for(let m=0;m<xo.length;m++)Nt(n,xo[m],bl,gl,p);Qt(yl,{tld:!0,ascii:!0},e),Qt(bl,{utld:!0,alpha:!0},e),Nt(n,"file",So,bt,h),Nt(n,"mailto",So,bt,h),Nt(n,"http",Mn,bt,h),Nt(n,"https",Mn,bt,h),Nt(n,"ftp",Mn,bt,h),Nt(n,"ftps",Mn,bt,h),Qt(So,{scheme:!0,ascii:!0},e),Qt(Mn,{slashscheme:!0,ascii:!0},e),t=t.sort((m,g)=>m[0]>g[0]?1:-1);for(let m=0;m<t.length;m++){let g=t[m][0],b=t[m][1]?{[W0]:!0}:{[j0]:!0};g.indexOf("-")>=0?b[ml]=!0:gt.test(g)?yt.test(g)?b[ir]=!0:b[hl]=!0:b[fl]=!0,zu(n,g,g,b)}return zu(n,"localhost",ur,{ascii:!0}),n.jd=new Me(qo),{start:n,tokens:Object.assign({groups:e},qu)}}function Gu(t,e){let n=Y0(e.replace(/[A-Z]/g,l=>l.toLowerCase())),r=n.length,o=[],i=0,s=0;for(;s<r;){let l=t,a=null,c=0,d=null,u=-1,f=-1;for(;s<r&&(a=l.go(n[s]));)l=a,l.accepts()?(u=0,f=0,d=l):u>=0&&(u+=n[s].length,f++),c+=n[s].length,i+=n[s].length,s++;i-=u,s-=f,c-=u,o.push({t:d.t,v:e.slice(i-c,i),s:i-c,e:i})}return o}function Y0(t){let e=[],n=t.length,r=0;for(;r<n;){let o=t.charCodeAt(r),i,s=o<55296||o>56319||r+1===n||(i=t.charCodeAt(r+1))<56320||i>57343?t[r]:t.slice(r,r+2);e.push(s),r+=s.length}return e}function Nt(t,e,n,r,o){let i,s=e.length;for(let l=0;l<s-1;l++){let a=e[l];t.j[a]?i=t.j[a]:(i=new Me(r),i.jr=o.slice(),t.j[a]=i),t=i}return i=new Me(n),i.jr=o.slice(),t.j[e[s-1]]=i,i}function Fu(t){let e=[],n=[],r=0,o="0123456789";for(;r<t.length;){let i=0;for(;o.indexOf(t[r+i])>=0;)i++;if(i>0){e.push(n.join(""));for(let s=parseInt(t.substring(r,r+i),10);s>0;s--)n.pop();r+=i}else n.push(t[r]),r++}return e}var fr={defaultProtocol:"http",events:null,format:$u,formatHref:$u,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function Tl(t,e=null){let n=Object.assign({},fr);t&&(n=Object.assign(n,t instanceof Tl?t.o:t));let r=n.ignoreTags,o=[];for(let i=0;i<r.length;i++)o.push(r[i].toUpperCase());this.o=n,e&&(this.defaultRender=e),this.ignoreTags=o}Tl.prototype={o:fr,ignoreTags:[],defaultRender(t){return t},check(t){return this.get("validate",t.toString(),t)},get(t,e,n){let r=e!=null,o=this.o[t];return o&&(typeof o=="object"?(o=n.t in o?o[n.t]:fr[t],typeof o=="function"&&r&&(o=o(e,n))):typeof o=="function"&&r&&(o=o(e,n.t,n)),o)},getObj(t,e,n){let r=this.o[t];return typeof r=="function"&&e!=null&&(r=r(e,n.t,n)),r},render(t){let e=t.render(this);return(this.get("render",null,t)||this.defaultRender)(e,t.t,t)}};function $u(t){return t}function Yu(t,e){this.t="token",this.v=t,this.tk=e}Yu.prototype={isLink:!1,toString(){return this.v},toHref(t){return this.toString()},toFormattedString(t){let e=this.toString(),n=t.get("truncate",e,this),r=t.get("format",e,this);return n&&r.length>n?r.substring(0,n)+"\u2026":r},toFormattedHref(t){return t.get("formatHref",this.toHref(t.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(t=fr.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(t),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(t){return{type:this.t,value:this.toFormattedString(t),isLink:this.isLink,href:this.toFormattedHref(t),start:this.startIndex(),end:this.endIndex()}},validate(t){return t.get("validate",this.toString(),this)},render(t){let e=this,n=this.toHref(t.get("defaultProtocol")),r=t.get("formatHref",n,this),o=t.get("tagName",n,e),i=this.toFormattedString(t),s={},l=t.get("className",n,e),a=t.get("target",n,e),c=t.get("rel",n,e),d=t.getObj("attributes",n,e),u=t.getObj("events",n,e);return s.href=r,l&&(s.class=l),a&&(s.target=a),c&&(s.rel=c),d&&Object.assign(s,d),{tagName:o,attributes:s,content:i,eventListeners:u}}};function Go(t,e){class n extends Yu{constructor(o,i){super(o,i),thLine truncated
|
||||
`));return s.replaceSelectionWith(this.type.create({language:i},a)),s.selection.$from.parent.type!==this.type&&s.setSelection(R.near(s.doc.resolve(Math.max(0,s.selection.from-2)))),s.setMeta("paste",!0),t.dispatch(s),!0}}})]}}),wu=v0;var Su=H.create({name:"customBlock",group:"block",atom:!0,defining:!0,draggable:!0,selectable:!0,isolating:!0,allowGapCursor:!0,inline:!1,addNodeView(){return({editor:t,node:e,getPos:n,HTMLAttributes:r,decorations:o,extension:i})=>{let s=document.createElement("div");s.setAttribute("data-config",e.attrs.config),s.setAttribute("data-id",e.attrs.id),s.setAttribute("data-type","customBlock");let l=document.createElement("div");if(l.className="fi-fo-rich-editor-custom-block-header fi-not-prose",s.appendChild(l),t.isEditable&&typeof e.attrs.config=="object"&&e.attrs.config!==null&&Object.keys(e.attrs.config).length>0){let c=document.createElement("div");c.className="fi-fo-rich-editor-custom-block-edit-btn-ctn",l.appendChild(c);let d=document.createElement("button");d.className="fi-icon-btn",d.type="button",d.innerHTML=i.options.editCustomBlockButtonIconHtml,d.addEventListener("click",()=>i.options.editCustomBlockUsing(e.attrs.id,e.attrs.config)),c.appendChild(d)}let a=document.createElement("p");if(a.className="fi-fo-rich-editor-custom-block-heading",a.textContent=e.attrs.label,l.appendChild(a),t.isEditable){let c=document.createElement("div");c.className="fi-fo-rich-editor-custom-block-delete-btn-ctn",l.appendChild(c);let d=document.createElement("button");d.className="fi-icon-btn",d.type="button",d.innerHTML=i.options.deleteCustomBlockButtonIconHtml,d.addEventListener("click",()=>t.chain().setNodeSelection(n()).deleteSelection().run()),c.appendChild(d)}if(e.attrs.preview){let c=document.createElement("div");c.className="fi-fo-rich-editor-custom-block-preview fi-not-prose",c.innerHTML=new TextDecoder().decode(Uint8Array.from(atob(e.attrs.preview),d=>d.charCodeAt(0))),s.appendChild(c)}return{dom:s}}},addOptions(){return{deleteCustomBlockButtonIconHtml:null,editCustomBlockButtonIconHtml:null,editCustomBlockUsing:()=>{},insertCustomBlockUsing:()=>{}}},addAttributes(){return{config:{default:null,parseHTML:t=>JSON.parse(t.getAttribute("data-config"))},id:{default:null,parseHTML:t=>t.getAttribute("data-id"),renderHTML:t=>t.id?{"data-id":t.id}:{}},label:{default:null,parseHTML:t=>t.getAttribute("data-label"),rendered:!1},preview:{default:null,parseHTML:t=>t.getAttribute("data-preview"),rendered:!1}}},parseHTML(){return[{tag:`div[data-type="${this.name}"]`}]},renderHTML({HTMLAttributes:t}){return["div",N(t)]},addKeyboardShortcuts(){return{Backspace:()=>this.editor.commands.command(({tr:t,state:e})=>{let n=!1,{selection:r}=e,{empty:o,anchor:i}=r;if(!o)return!1;let s=new le,l=0;return e.doc.nodesBetween(i-1,i,(a,c)=>{if(a.type.name===this.name)return n=!0,s=a,l=c,!1}),n})}},addProseMirrorPlugins(){let{insertCustomBlockUsing:t}=this.options;return[new I({props:{handleDrop(e,n){if(!n||(n.preventDefault(),!n.dataTransfer.getData("customBlock")))return!1;let r=n.dataTransfer.getData("customBlock");return t(r,e.posAtCoords({left:n.clientX,top:n.clientY}).pos),!1}}})]}});var yo=(t,e)=>e.view.domAtPos(t).node.offsetParent!==null,T0=(t,e,n)=>{for(let r=t.depth;r>0;r-=1){let o=t.node(r),i=e(o),s=yo(t.start(r),n);if(i&&s)return{pos:r>0?t.before(r):0,start:t.start(r),depth:r,node:o}}},ku=(t,e)=>{let{state:n,view:r,extensionManager:o}=t,{schema:i,selection:s}=n,{empty:l,$anchor:a}=s,c=!!o.extensions.find(y=>y.name==="gapCursor");if(!l||a.parent.type!==i.nodes.detailsSummary||!c||e==="right"&&a.parentOffset!==a.parent.nodeSize-2)return!1;let d=Ye(y=>y.type===i.nodes.details)(s);if(!d)return!1;let u=kn(d.node,y=>y.type===i.nodes.detailsContent);if(!u.length||yo(d.start+u[0].pos+1,t))return!1;let h=n.doc.resolve(d.pos+d.node.nodeSize),p=se.findFrom(h,1,!1);if(!p)return!1;let{tr:m}=n,g=new se(p);return m.setSelection(g),m.scrollIntoView(),r.dispatch(m),!0},Cu=H.create({name:"details",content:"detailsSummary detailsContent",group:"block",defining:!0,isolating:!0,allowGapCursor:!1,addOptions(){return{persist:!1,openClassName:"is-open",HTMLAttributes:{}}},addAttributes(){return this.options.persist?{open:{default:!1,parseHTML:t=>t.hasAttribute("open"),renderHTML:({open:t})=>t?{open:""}:{}}}:[]},parseHTML(){return[{tag:"details"}]},renderHTML({HTMLAttributes:t}){return["details",N(this.options.HTMLAttributes,t),0]},addNodeView(){return({editor:t,getPos:e,node:n,HTMLAttributes:r})=>{let o=document.createElement("div"),i=N(this.options.HTMLAttributes,r,{"data-type":this.name});Object.entries(i).forEach(([c,d])=>o.setAttribute(c,d));let s=document.createElement("button");s.type="button",o.append(s);let l=document.createElement("div");o.append(l);let a=c=>{if(c!==void 0)if(c){if(o.classList.contains(this.options.openClassName))return;o.classList.add(this.options.openClassName)}else{if(!o.classList.contains(this.options.openClassName))return;o.classList.remove(this.options.openClassName)}else o.classList.toggle(thi
Line truncated
|
||||
`},addCommands(){return{setHardBreak:()=>({commands:t,chain:e,state:n,editor:r})=>t.first([()=>t.exitCode(),()=>t.command(()=>{let{selection:o,storedMarks:i}=n;if(o.$from.parent.type.spec.isolating)return!1;let{keepMarks:s}=this.options,{splittableMarks:l}=r.extensionManager,a=i||o.$to.parentOffset&&o.$from.marks();return e().insertContent({type:this.name}).command(({tr:c,dispatch:d})=>{if(d&&a&&s){let u=a.filter(f=>l.includes(f.type.name));c.ensureMarks(u)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),Ou=E0;var O0=H.create({name:"heading",addOptions(){return{levels:[1,2,3,4,5,6],HTMLAttributes:{}}},content:"inline*",group:"block",defining:!0,addAttributes(){return{level:{default:1,rendered:!1}}},parseHTML(){return this.options.levels.map(t=>({tag:`h${t}`,attrs:{level:t}}))},renderHTML({node:t,HTMLAttributes:e}){return[`h${this.options.levels.includes(t.attrs.level)?t.attrs.level:this.options.levels[0]}`,N(this.options.HTMLAttributes,e),0]},addCommands(){return{setHeading:t=>({commands:e})=>this.options.levels.includes(t.level)?e.setNode(this.name,t):!1,toggleHeading:t=>({commands:e})=>this.options.levels.includes(t.level)?e.toggleNode(this.name,"paragraph",t):!1}},addKeyboardShortcuts(){return this.options.levels.reduce((t,e)=>({...t,[`Mod-Alt-${e}`]:()=>this.editor.commands.toggleHeading({level:e})}),{})},addInputRules(){return this.options.levels.map(t=>nr({find:new RegExp(`^(#{${Math.min(...this.options.levels)},${t}})\\s$`),type:this.type,getAttributes:{level:t}}))}}),Nu=O0;var N0=/(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))$/,R0=/(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))/g,D0=Z.create({name:"highlight",addOptions(){return{multicolor:!1,HTMLAttributes:{}}},addAttributes(){return this.options.multicolor?{color:{default:null,parseHTML:t=>t.getAttribute("data-color")||t.style.backgroundColor,renderHTML:t=>t.color?{"data-color":t.color,style:`background-color: ${t.color}; color: inherit`}:{}}}:{}},parseHTML(){return[{tag:"mark"}]},renderHTML({HTMLAttributes:t}){return["mark",N(this.options.HTMLAttributes,t),0]},addCommands(){return{setHighlight:t=>({commands:e})=>e.setMark(this.name,t),toggleHighlight:t=>({commands:e})=>e.toggleMark(this.name,t),unsetHighlight:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-h":()=>this.editor.commands.toggleHighlight()}},addInputRules(){return[Le({find:N0,type:this.type})]},addPasteRules(){return[Ce({find:R0,type:this.type})]}}),Ru=D0;var P0=H.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{}}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:t}){return["hr",N(this.options.HTMLAttributes,t)]},addCommands(){return{setHorizontalRule:()=>({chain:t,state:e})=>{if(!ou(e,e.schema.nodes[this.name]))return!1;let{selection:n}=e,{$to:r}=n,o=t();return lo(n)?o.insertContentAt(r.pos,{type:this.name}):o.insertContent({type:this.name}),o.command(({tr:i,dispatch:s})=>{var l;if(s){let{$to:a}=i.selection,c=a.end();if(a.nodeAfter)a.nodeAfter.isTextblock?i.setSelection(R.create(i.doc,a.pos+1)):a.nodeAfter.isBlock?i.setSelection(P.create(i.doc,a.pos)):i.setSelection(R.create(i.doc,a.pos));else{let d=(l=a.parent.type.contentMatch.defaultType)==null?void 0:l.create();d&&(i.insert(c,d),i.setSelection(R.create(i.doc,c+1)))}i.scrollIntoView()}return!0}).run()}}},addInputRules(){return[fo({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}}),Du=P0;var I0=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,L0=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,B0=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,z0=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,H0=Z.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:t=>t.style.fontStyle!=="normal"&&null},{style:"font-style=normal",clearMark:t=>t.type.name===this.name},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:t}){return["em",N(this.options.HTMLAttributes,t),0]},addCommands(){return{setItalic:()=>({commands:t})=>t.setMark(this.name),toggleItalic:()=>({commands:t})=>t.toggleMark(this.name),unsetItalic:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[Le({find:I0,type:this.type}),Le({find:B0,type:this.type})]},addPasteRules(){return[Ce({find:L0,type:this.type}),Ce({find:z0,type:this.type})]}}),Pu=H0;var F0=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,$0=H.create({name:"image",addOptions(){return{inline:!1,allowBase64:!1,HTMLAttributes:{}}},inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes(){return{src:{default:null},alt:{default:null},title:{default:null},width:{default:null},height:{default:null}}},parseHTML(){return[{tag:this.options.allowBase64?"img[src]":'img[src]:not([src
Line truncated
|
||||
`,J0="\uFE0F",q0="\u200D",dl="\uFFFC",bo=null,xo=null;function G0(t=[]){let e={};Me.groups=e;let n=new Me;bo==null&&(bo=Fu(V0)),xo==null&&(xo=Fu(_0)),A(n,"'",zo),A(n,"{",sr),A(n,"}",lr),A(n,"[",ko),A(n,"]",Co),A(n,"(",Mo),A(n,")",vo),A(n,"<",To),A(n,">",Ao),A(n,"\uFF08",Eo),A(n,"\uFF09",Oo),A(n,"\u300C",No),A(n,"\u300D",Ro),A(n,"\u300E",Do),A(n,"\u300F",Po),A(n,"\uFF1C",Io),A(n,"\uFF1E",Lo),A(n,"&",Bo),A(n,"*",Ho),A(n,"@",Rt),A(n,"`",$o),A(n,"^",Vo),A(n,":",Dt),A(n,",",kl),A(n,"$",_o),A(n,".",et),A(n,"=",Wo),A(n,"!",Cl),A(n,"-",ze),A(n,"%",ar),A(n,"|",jo),A(n,"+",Ko),A(n,"#",Uo),A(n,"?",cr),A(n,'"',Ml),A(n,"/",tt),A(n,";",vl),A(n,"~",dr),A(n,"_",Jo),A(n,"\\",Fo),A(n,"\u30FB",Uu);let r=te(n,yt,wl,{[fl]:!0});te(r,yt,r);let o=te(r,gt,ju,{[ir]:!0}),i=te(r,rr,Ku,{[or]:!0}),s=te(n,gt,bt,{[hl]:!0});te(s,yt,o),te(s,gt,s),te(o,yt,o),te(o,gt,o);let l=te(n,rr,gl,{[pl]:!0});te(l,gt),te(l,yt,i),te(l,rr,l),te(i,yt,i),te(i,gt),te(i,rr,i);let a=A(n,cl,Sl,{[sl]:!0}),c=A(n,Hu,xl,{[sl]:!0}),d=te(n,al,xl,{[sl]:!0});A(n,dl,d),A(c,cl,a),A(c,dl,d),te(c,al,d),A(d,Hu),A(d,cl),te(d,al,d),A(d,dl,d);let u=te(n,ll,Ju,{[Wu]:!0});A(u,"#"),te(u,ll,u),A(u,J0,u);let f=A(u,q0);A(f,"#"),te(f,ll,u);let h=[[gt,s],[yt,o]],p=[[gt,null],[rr,l],[yt,i]];for(let m=0;m<bo.length;m++)Nt(n,bo[m],yl,bt,h);for(let m=0;m<xo.length;m++)Nt(n,xo[m],bl,gl,p);Qt(yl,{tld:!0,ascii:!0},e),Qt(bl,{utld:!0,alpha:!0},e),Nt(n,"file",So,bt,h),Nt(n,"mailto",So,bt,h),Nt(n,"http",Mn,bt,h),Nt(n,"https",Mn,bt,h),Nt(n,"ftp",Mn,bt,h),Nt(n,"ftps",Mn,bt,h),Qt(So,{scheme:!0,ascii:!0},e),Qt(Mn,{slashscheme:!0,ascii:!0},e),t=t.sort((m,g)=>m[0]>g[0]?1:-1);for(let m=0;m<t.length;m++){let g=t[m][0],b=t[m][1]?{[W0]:!0}:{[j0]:!0};g.indexOf("-")>=0?b[ml]=!0:gt.test(g)?yt.test(g)?b[ir]=!0:b[hl]=!0:b[fl]=!0,zu(n,g,g,b)}return zu(n,"localhost",ur,{ascii:!0}),n.jd=new Me(qo),{start:n,tokens:Object.assign({groups:e},qu)}}function Gu(t,e){let n=Y0(e.replace(/[A-Z]/g,l=>l.toLowerCase())),r=n.length,o=[],i=0,s=0;for(;s<r;){let l=t,a=null,c=0,d=null,u=-1,f=-1;for(;s<r&&(a=l.go(n[s]));)l=a,l.accepts()?(u=0,f=0,d=l):u>=0&&(u+=n[s].length,f++),c+=n[s].length,i+=n[s].length,s++;i-=u,s-=f,c-=u,o.push({t:d.t,v:e.slice(i-c,i),s:i-c,e:i})}return o}function Y0(t){let e=[],n=t.length,r=0;for(;r<n;){let o=t.charCodeAt(r),i,s=o<55296||o>56319||r+1===n||(i=t.charCodeAt(r+1))<56320||i>57343?t[r]:t.slice(r,r+2);e.push(s),r+=s.length}return e}function Nt(t,e,n,r,o){let i,s=e.length;for(let l=0;l<s-1;l++){let a=e[l];t.j[a]?i=t.j[a]:(i=new Me(r),i.jr=o.slice(),t.j[a]=i),t=i}return i=new Me(n),i.jr=o.slice(),t.j[e[s-1]]=i,i}function Fu(t){let e=[],n=[],r=0,o="0123456789";for(;r<t.length;){let i=0;for(;o.indexOf(t[r+i])>=0;)i++;if(i>0){e.push(n.join(""));for(let s=parseInt(t.substring(r,r+i),10);s>0;s--)n.pop();r+=i}else n.push(t[r]),r++}return e}var fr={defaultProtocol:"http",events:null,format:$u,formatHref:$u,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function Tl(t,e=null){let n=Object.assign({},fr);t&&(n=Object.assign(n,t instanceof Tl?t.o:t));let r=n.ignoreTags,o=[];for(let i=0;i<r.length;i++)o.push(r[i].toUpperCase());this.o=n,e&&(this.defaultRender=e),this.ignoreTags=o}Tl.prototype={o:fr,ignoreTags:[],defaultRender(t){return t},check(t){return this.get("validate",t.toString(),t)},get(t,e,n){let r=e!=null,o=this.o[t];return o&&(typeof o=="object"?(o=n.t in o?o[n.t]:fr[t],typeof o=="function"&&r&&(o=o(e,n))):typeof o=="function"&&r&&(o=o(e,n.t,n)),o)},getObj(t,e,n){let r=this.o[t];return typeof r=="function"&&e!=null&&(r=r(e,n.t,n)),r},render(t){let e=t.render(this);return(this.get("render",null,t)||this.defaultRender)(e,t.t,t)}};function $u(t){return t}function Yu(t,e){this.t="token",this.v=t,this.tk=e}Yu.prototype={isLink:!1,toString(){return this.v},toHref(t){return this.toString()},toFormattedString(t){let e=this.toString(),n=t.get("truncate",e,this),r=t.get("format",e,this);return n&&r.length>n?r.substring(0,n)+"\u2026":r},toFormattedHref(t){return t.get("formatHref",this.toHref(t.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(t=fr.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(t),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(t){return{type:this.t,value:this.toFormattedString(t),isLink:this.isLink,href:this.toFormattedHref(t),start:this.startIndex(),end:this.endIndex()}},validate(t){return t.get("validate",this.toString(),this)},render(t){let e=this,n=this.toHref(t.get("defaultProtocol")),r=t.get("formatHref",n,this),o=t.get("tagName",n,e),i=this.toFormattedString(t),s={},l=t.get("className",n,e),a=t.get("target",n,e),c=t.get("rel",n,e),d=t.getObj("attributes",n,e),u=t.getObj("events",n,e);return s.href=r,l&&(s.class=l),a&&(s.target=a),c&&(s.rel=c),d&&Object.assign(s,d),{tagName:o,attributes:s,content:i,eventListeners:u}}};function Go(t,e){class n extends Yu{constructor(o,i){super(o,i),thLine truncated
|
||||
1. Must only contain digits, lowercase ASCII letters or "-"
|
||||
2. Cannot start or end with "-"
|
||||
3. "-" cannot repeat`);X.customSchemes.push([t,e])}function nb(){X.scanner=G0(X.customSchemes);for(let t=0;t<X.tokenQueue.length;t++)X.tokenQueue[t][1]({scanner:X.scanner});X.parser=Q0(X.scanner.tokens);for(let t=0;t<X.pluginQueue.length;t++)X.pluginQueue[t][1]({scanner:X.scanner,parser:X.parser});return X.initialized=!0,X}function Yo(t){return X.initialized||nb(),Z0(X.parser.start,t,Gu(X.scanner.start,t))}Yo.scan=Gu;function Xo(t,e=null,n=null){if(e&&typeof e=="object"){if(n)throw Error(`linkifyjs: Invalid link type ${e}; must be a string`);n=e,e=null}let r=new Tl(n),o=Yo(t),i=[];for(let s=0;s<o.length;s++){let l=o[s];l.isLink&&(!e||l.t===e)&&r.check(l)&&i.push(l.toFormattedObject(r))}return i}var El="[\0- \xA0\u1680\u180E\u2000-\u2029\u205F\u3000]",rb=new RegExp(El),ob=new RegExp(`${El}$`),ib=new RegExp(El,"g");function sb(t){return t.length===1?t[0].isLink:t.length===3&&t[1].isLink?["()","[]"].includes(t[0].value+t[2].value):!1}function lb(t){return new I({key:new z("autolink"),appendTransaction:(e,n,r)=>{let o=e.some(c=>c.docChanged)&&!n.doc.eq(r.doc),i=e.some(c=>c.getMeta("preventAutolink"));if(!o||i)return;let{tr:s}=r,l=$s(n.doc,[...e]);if(Us(l).forEach(({newRange:c})=>{let d=Od(r.doc,c,h=>h.isTextblock),u,f;if(d.length>1)u=d[0],f=r.doc.textBetween(u.pos,u.pos+u.node.nodeSize,void 0," ");else if(d.length){let h=r.doc.textBetween(c.from,c.to," "," ");if(!ob.test(h))return;u=d[0],f=r.doc.textBetween(u.pos,c.to,void 0," ")}if(u&&f){let h=f.split(rb).filter(Boolean);if(h.length<=0)return!1;let p=h[h.length-1],m=u.pos+f.lastIndexOf(p);if(!p)return!1;let g=Yo(p).map(y=>y.toObject(t.defaultProtocol));if(!sb(g))return!1;g.filter(y=>y.isLink).map(y=>({...y,from:m+y.start+1,to:m+y.end+1})).filter(y=>r.schema.marks.code?!r.doc.rangeHasMark(y.from,y.to,r.schema.marks.code):!0).filter(y=>t.validate(y.value)).filter(y=>t.shouldAutoLink(y.value)).forEach(y=>{so(y.from,y.to,r.doc).some(b=>b.mark.type===t.type)||s.addMark(y.from,y.to,t.type.create({href:y.href}))})}}),!!s.steps.length)return s}})}function ab(t){return new I({key:new z("handleClickLink"),props:{handleClick:(e,n,r)=>{var o,i;if(r.button!==0||!e.editable)return!1;let s=null;if(r.target instanceof HTMLAnchorElement)s=r.target;else{let d=r.target,u=[];for(;d.nodeName!=="DIV";)u.push(d),d=d.parentNode;s=u.find(f=>f.nodeName==="A")}if(!s)return!1;let l=Ks(e.state,t.type.name),a=(o=s?.href)!=null?o:l.href,c=(i=s?.target)!=null?i:l.target;return t.enableClickSelection&&t.editor.commands.extendMarkRange(t.type.name),s&&a?(window.open(a,c),!0):!1}}})}function cb(t){return new I({key:new z("handlePasteLink"),props:{handlePaste:(e,n,r)=>{let{state:o}=e,{selection:i}=o,{empty:s}=i;if(s)return!1;let l="";r.content.forEach(c=>{l+=c.textContent});let a=Xo(l,{defaultProtocol:t.defaultProtocol}).find(c=>c.isLink&&c.value===l);return!l||!a?!1:t.editor.commands.setMark(t.type,{href:a.href})}}})}function Zt(t,e){let n=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];return e&&e.forEach(r=>{let o=typeof r=="string"?r:r.scheme;o&&n.push(o)}),!t||t.replace(ib,"").match(new RegExp(`^(?:(?:${n.join("|")}):|[^a-z]|[a-z0-9+.-]+(?:[^a-z+.-:]|$))`,"i"))}var db=Z.create({name:"link",priority:1e3,keepOnSplit:!1,exitable:!0,onCreate(){this.options.validate&&!this.options.shouldAutoLink&&(this.options.shouldAutoLink=this.options.validate,console.warn("The `validate` option is deprecated. Rename to the `shouldAutoLink` option instead.")),this.options.protocols.forEach(t=>{if(typeof t=="string"){Al(t);return}Al(t.scheme,t.optionalSlashes)})},onDestroy(){Xu()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,enableClickSelection:!1,linkOnPaste:!0,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},isAllowedUri:(t,e)=>!!Zt(t,e.protocols),validate:t=>!!t,shouldAutoLink:t=>!!t}},addAttributes(){return{href:{default:null,parseHTML(t){return t.getAttribute("href")}},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class}}},parseHTML(){return[{tag:"a[href]",getAttrs:t=>{let e=t.getAttribute("href");return!e||!this.options.isAllowedUri(e,{defaultValidate:n=>!!Zt(n,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:null}}]},renderHTML({HTMLAttributes:t}){return this.options.isAllowedUri(t.href,{defaultValidate:e=>!!Zt(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?["a",O(this.options.HTMLAttributes,t),0]:["a",O(this.options.HTMLAttributes,{...t,href:""}),0]},addCommands(){return{setLink:t=>({chain:e})=>{let{href:n}=t;return this.options.isAllowedUri(n,{defaultValidate:r=>!!Zt(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?e().setMark(this.name,t).setMeta("preventAutolink",!0).run():!1},toggleLink:t=>({chain:e}
Line truncated
|
||||
3. "-" cannot repeat`);X.customSchemes.push([t,e])}function nb(){X.scanner=G0(X.customSchemes);for(let t=0;t<X.tokenQueue.length;t++)X.tokenQueue[t][1]({scanner:X.scanner});X.parser=Q0(X.scanner.tokens);for(let t=0;t<X.pluginQueue.length;t++)X.pluginQueue[t][1]({scanner:X.scanner,parser:X.parser});return X.initialized=!0,X}function Yo(t){return X.initialized||nb(),Z0(X.parser.start,t,Gu(X.scanner.start,t))}Yo.scan=Gu;function Xo(t,e=null,n=null){if(e&&typeof e=="object"){if(n)throw Error(`linkifyjs: Invalid link type ${e}; must be a string`);n=e,e=null}let r=new Tl(n),o=Yo(t),i=[];for(let s=0;s<o.length;s++){let l=o[s];l.isLink&&(!e||l.t===e)&&r.check(l)&&i.push(l.toFormattedObject(r))}return i}var El="[\0- \xA0\u1680\u180E\u2000-\u2029\u205F\u3000]",rb=new RegExp(El),ob=new RegExp(`${El}$`),ib=new RegExp(El,"g");function sb(t){return t.length===1?t[0].isLink:t.length===3&&t[1].isLink?["()","[]"].includes(t[0].value+t[2].value):!1}function lb(t){return new I({key:new z("autolink"),appendTransaction:(e,n,r)=>{let o=e.some(c=>c.docChanged)&&!n.doc.eq(r.doc),i=e.some(c=>c.getMeta("preventAutolink"));if(!o||i)return;let{tr:s}=r,l=$s(n.doc,[...e]);if(Us(l).forEach(({newRange:c})=>{let d=Od(r.doc,c,h=>h.isTextblock),u,f;if(d.length>1)u=d[0],f=r.doc.textBetween(u.pos,u.pos+u.node.nodeSize,void 0," ");else if(d.length){let h=r.doc.textBetween(c.from,c.to," "," ");if(!ob.test(h))return;u=d[0],f=r.doc.textBetween(u.pos,c.to,void 0," ")}if(u&&f){let h=f.split(rb).filter(Boolean);if(h.length<=0)return!1;let p=h[h.length-1],m=u.pos+f.lastIndexOf(p);if(!p)return!1;let g=Yo(p).map(y=>y.toObject(t.defaultProtocol));if(!sb(g))return!1;g.filter(y=>y.isLink).map(y=>({...y,from:m+y.start+1,to:m+y.end+1})).filter(y=>r.schema.marks.code?!r.doc.rangeHasMark(y.from,y.to,r.schema.marks.code):!0).filter(y=>t.validate(y.value)).filter(y=>t.shouldAutoLink(y.value)).forEach(y=>{so(y.from,y.to,r.doc).some(b=>b.mark.type===t.type)||s.addMark(y.from,y.to,t.type.create({href:y.href}))})}}),!!s.steps.length)return s}})}function ab(t){return new I({key:new z("handleClickLink"),props:{handleClick:(e,n,r)=>{var o,i;if(r.button!==0||!e.editable)return!1;let s=null;if(r.target instanceof HTMLAnchorElement)s=r.target;else{let d=r.target,u=[];for(;d.nodeName!=="DIV";)u.push(d),d=d.parentNode;s=u.find(f=>f.nodeName==="A")}if(!s)return!1;let l=Ks(e.state,t.type.name),a=(o=s?.href)!=null?o:l.href,c=(i=s?.target)!=null?i:l.target;return t.enableClickSelection&&t.editor.commands.extendMarkRange(t.type.name),s&&a?(window.open(a,c),!0):!1}}})}function cb(t){return new I({key:new z("handlePasteLink"),props:{handlePaste:(e,n,r)=>{let{state:o}=e,{selection:i}=o,{empty:s}=i;if(s)return!1;let l="";r.content.forEach(c=>{l+=c.textContent});let a=Xo(l,{defaultProtocol:t.defaultProtocol}).find(c=>c.isLink&&c.value===l);return!l||!a?!1:t.editor.commands.setMark(t.type,{href:a.href})}}})}function Zt(t,e){let n=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];return e&&e.forEach(r=>{let o=typeof r=="string"?r:r.scheme;o&&n.push(o)}),!t||t.replace(ib,"").match(new RegExp(`^(?:(?:${n.join("|")}):|[^a-z]|[a-z0-9+.-]+(?:[^a-z+.-:]|$))`,"i"))}var db=Z.create({name:"link",priority:1e3,keepOnSplit:!1,exitable:!0,onCreate(){this.options.validate&&!this.options.shouldAutoLink&&(this.options.shouldAutoLink=this.options.validate,console.warn("The `validate` option is deprecated. Rename to the `shouldAutoLink` option instead.")),this.options.protocols.forEach(t=>{if(typeof t=="string"){Al(t);return}Al(t.scheme,t.optionalSlashes)})},onDestroy(){Xu()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,enableClickSelection:!1,linkOnPaste:!0,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},isAllowedUri:(t,e)=>!!Zt(t,e.protocols),validate:t=>!!t,shouldAutoLink:t=>!!t}},addAttributes(){return{href:{default:null,parseHTML(t){return t.getAttribute("href")}},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class}}},parseHTML(){return[{tag:"a[href]",getAttrs:t=>{let e=t.getAttribute("href");return!e||!this.options.isAllowedUri(e,{defaultValidate:n=>!!Zt(n,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:null}}]},renderHTML({HTMLAttributes:t}){return this.options.isAllowedUri(t.href,{defaultValidate:e=>!!Zt(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?["a",N(this.options.HTMLAttributes,t),0]:["a",N(this.options.HTMLAttributes,{...t,href:""}),0]},addCommands(){return{setLink:t=>({chain:e})=>{let{href:n}=t;return this.options.isAllowedUri(n,{defaultValidate:r=>!!Zt(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?e().setMark(this.name,t).setMeta("preventAutolink",!0).run():!1},toggleLink:t=>({chain:e}
Line truncated
|
||||
@@ -1 +1 @@
|
||||
var i=()=>({isSticky:!1,enableSticky(){this.isSticky=this.$el.getBoundingClientRect().top>0},disableSticky(){this.isSticky=!1}});export{i as default};
|
||||
var i=()=>({isSticky:!1,width:0,resizeObserver:null,boundUpdateWidth:null,init(){let e=this.$el.parentElement;e&&(this.updateWidth(),this.resizeObserver=new ResizeObserver(()=>this.updateWidth()),this.resizeObserver.observe(e),this.boundUpdateWidth=this.updateWidth.bind(this),window.addEventListener("resize",this.boundUpdateWidth))},enableSticky(){this.isSticky=this.$el.getBoundingClientRect().top>0},disableSticky(){this.isSticky=!1},updateWidth(){let e=this.$el.parentElement;if(!e)return;let t=getComputedStyle(this.$root.querySelector(".fi-ac"));this.width=e.offsetWidth+parseInt(t.marginInlineStart,10)*-1+parseInt(t.marginInlineEnd,10)*-1},destroy(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null),this.boundUpdateWidth&&(window.removeEventListener("resize",this.boundUpdateWidth),this.boundUpdateWidth=null)}});export{i as default};
|
||||
@@ -1 +1 @@
|
||||
(()=>{var d=()=>({isSticky:!1,enableSticky(){this.isSticky=this.$el.getBoundingClientRect().top>0},disableSticky(){this.isSticky=!1}});var m=function(i,e,n){let t=i;if(e.startsWith("/")&&(n=!0,e=e.slice(1)),n)return e;for(;e.startsWith("../");)t=t.includes(".")?t.slice(0,t.lastIndexOf(".")):null,e=e.slice(3);return["",null,void 0].includes(t)?e:["",null,void 0].includes(e)?t:`${t}.${e}`},u=i=>{let e=Alpine.findClosest(i,n=>n.__livewire);if(!e)throw"Could not find Livewire component in DOM tree.";return e.__livewire};document.addEventListener("alpine:init",()=>{window.Alpine.data("filamentSchema",({livewireId:i})=>({handleFormValidationError(e){e.detail.livewireId===i&&this.$nextTick(()=>{let n=this.$el.querySelector("[data-validation-error]");if(!n)return;let t=n;for(;t;)t.dispatchEvent(new CustomEvent("expand")),t=t.parentNode;setTimeout(()=>n.closest("[data-field-wrapper]").scrollIntoView({behavior:"smooth",block:"start",inline:"start"}),200)})},isStateChanged(e,n){if(e===void 0)return!1;try{return JSON.stringify(e)!==JSON.stringify(n)}catch{return e!==n}}})),window.Alpine.data("filamentSchemaComponent",({path:i,containerPath:e,$wire:n})=>({$statePath:i,$get:(t,o)=>n.$get(m(e,t,o)),$set:(t,o,l,a=!1)=>n.$set(m(e,t,l),o,a),get $state(){return n.$get(i)}})),window.Alpine.data("filamentActionsSchemaComponent",d),Livewire.hook("commit",({component:i,commit:e,respond:n,succeed:t,fail:o})=>{t(({snapshot:l,effects:a})=>{a.dispatches?.forEach(r=>{if(!r.params?.awaitSchemaComponent)return;let s=Array.from(i.el.querySelectorAll(`[wire\\:partial="schema-component::${r.params.awaitSchemaComponent}"]`)).filter(c=>u(c)===i);if(s.length!==1){if(s.length>1)throw`Multiple schema components found with key [${r.params.awaitSchemaComponent}].`;window.addEventListener(`schema-component-${i.id}-${r.params.awaitSchemaComponent}-loaded`,()=>{window.dispatchEvent(new CustomEvent(r.name,{detail:r.params}))},{once:!0})}})})})});})();
|
||||
(()=>{var d=()=>({isSticky:!1,width:0,resizeObserver:null,boundUpdateWidth:null,init(){let t=this.$el.parentElement;t&&(this.updateWidth(),this.resizeObserver=new ResizeObserver(()=>this.updateWidth()),this.resizeObserver.observe(t),this.boundUpdateWidth=this.updateWidth.bind(this),window.addEventListener("resize",this.boundUpdateWidth))},enableSticky(){this.isSticky=this.$el.getBoundingClientRect().top>0},disableSticky(){this.isSticky=!1},updateWidth(){let t=this.$el.parentElement;if(!t)return;let e=getComputedStyle(this.$root.querySelector(".fi-ac"));this.width=t.offsetWidth+parseInt(e.marginInlineStart,10)*-1+parseInt(e.marginInlineEnd,10)*-1},destroy(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null),this.boundUpdateWidth&&(window.removeEventListener("resize",this.boundUpdateWidth),this.boundUpdateWidth=null)}});var u=function(t,e,n){let i=t;if(e.startsWith("/")&&(n=!0,e=e.slice(1)),n)return e;for(;e.startsWith("../");)i=i.includes(".")?i.slice(0,i.lastIndexOf(".")):null,e=e.slice(3);return["",null,void 0].includes(i)?e:["",null,void 0].includes(e)?i:`${i}.${e}`},c=t=>{let e=Alpine.findClosest(t,n=>n.__livewire);if(!e)throw"Could not find Livewire component in DOM tree.";return e.__livewire};document.addEventListener("alpine:init",()=>{window.Alpine.data("filamentSchema",({livewireId:t})=>({handleFormValidationError(e){e.detail.livewireId===t&&this.$nextTick(()=>{let n=this.$el.querySelector("[data-validation-error]");if(!n)return;let i=n;for(;i;)i.dispatchEvent(new CustomEvent("expand")),i=i.parentNode;setTimeout(()=>n.closest("[data-field-wrapper]").scrollIntoView({behavior:"smooth",block:"start",inline:"start"}),200)})},isStateChanged(e,n){if(e===void 0)return!1;try{return JSON.stringify(e)!==JSON.stringify(n)}catch{return e!==n}}})),window.Alpine.data("filamentSchemaComponent",({path:t,containerPath:e,$wire:n})=>({$statePath:t,$get:(i,s)=>n.$get(u(e,i,s)),$set:(i,s,a,o=!1)=>n.$set(u(e,i,a),s,o),get $state(){return n.$get(t)}})),window.Alpine.data("filamentActionsSchemaComponent",d),Livewire.hook("commit",({component:t,commit:e,respond:n,succeed:i,fail:s})=>{i(({snapshot:a,effects:o})=>{o.dispatches?.forEach(r=>{if(!r.params?.awaitSchemaComponent)return;let l=Array.from(t.el.querySelectorAll(`[wire\\:partial="schema-component::${r.params.awaitSchemaComponent}"]`)).filter(h=>c(h)===t);if(l.length!==1){if(l.length>1)throw`Multiple schema components found with key [${r.params.awaitSchemaComponent}].`;window.addEventListener(`schema-component-${t.id}-${r.params.awaitSchemaComponent}-loaded`,()=>{window.dispatchEvent(new CustomEvent(r.name,{detail:r.params}))},{once:!0})}})})})});})();
|
||||
@@ -1,4 +1,4 @@
|
||||
(()=>{var qo=Object.create;var Ti=Object.defineProperty;var Go=Object.getOwnPropertyDescriptor;var Ko=Object.getOwnPropertyNames;var Jo=Object.getPrototypeOf,Qo=Object.prototype.hasOwnProperty;var Kr=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Zo=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Ko(t))!Qo.call(e,i)&&i!==r&&Ti(e,i,{get:()=>t[i],enumerable:!(n=Go(t,i))||n.enumerable});return e};var ea=(e,t,r)=>(r=e!=null?qo(Jo(e)):{},Zo(t||!e||!e.__esModule?Ti(r,"default",{value:e,enumerable:!0}):r,e));var uo=Kr(()=>{});var po=Kr(()=>{});var ho=Kr((Hs,yr)=>{(function(){"use strict";var e="input is invalid type",t="finalize already called",r=typeof window=="object",n=r?window:{};n.JS_MD5_NO_WINDOW&&(r=!1);var i=!r&&typeof self=="object",o=!n.JS_MD5_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;o?n=global:i&&(n=self);var a=!n.JS_MD5_NO_COMMON_JS&&typeof yr=="object"&&yr.exports,c=typeof define=="function"&&define.amd,f=!n.JS_MD5_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",d="0123456789abcdef".split(""),y=[128,32768,8388608,-2147483648],m=[0,8,16,24],O=["hex","array","digest","buffer","arrayBuffer","base64"],E="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),S=[],_;if(f){var I=new ArrayBuffer(68);_=new Uint8Array(I),S=new Uint32Array(I)}var $=Array.isArray;(n.JS_MD5_NO_NODE_JS||!$)&&($=function(l){return Object.prototype.toString.call(l)==="[object Array]"});var A=ArrayBuffer.isView;f&&(n.JS_MD5_NO_ARRAY_BUFFER_IS_VIEW||!A)&&(A=function(l){return typeof l=="object"&&l.buffer&&l.buffer.constructor===ArrayBuffer});var N=function(l){var h=typeof l;if(h==="string")return[l,!0];if(h!=="object"||l===null)throw new Error(e);if(f&&l.constructor===ArrayBuffer)return[new Uint8Array(l),!1];if(!$(l)&&!A(l))throw new Error(e);return[l,!1]},Y=function(l){return function(h){return new X(!0).update(h)[l]()}},ne=function(){var l=Y("hex");o&&(l=J(l)),l.create=function(){return new X},l.update=function(p){return l.create().update(p)};for(var h=0;h<O.length;++h){var v=O[h];l[v]=Y(v)}return l},J=function(l){var h=uo(),v=po().Buffer,p;v.from&&!n.JS_MD5_NO_BUFFER_FROM?p=v.from:p=function(M){return new v(M)};var j=function(M){if(typeof M=="string")return h.createHash("md5").update(M,"utf8").digest("hex");if(M==null)throw new Error(e);return M.constructor===ArrayBuffer&&(M=new Uint8Array(M)),$(M)||A(M)||M.constructor===v?h.createHash("md5").update(p(M)).digest("hex"):l(M)};return j},V=function(l){return function(h,v){return new Q(h,!0).update(v)[l]()}},de=function(){var l=V("hex");l.create=function(p){return new Q(p)},l.update=function(p,j){return l.create(p).update(j)};for(var h=0;h<O.length;++h){var v=O[h];l[v]=V(v)}return l};function X(l){if(l)S[0]=S[16]=S[1]=S[2]=S[3]=S[4]=S[5]=S[6]=S[7]=S[8]=S[9]=S[10]=S[11]=S[12]=S[13]=S[14]=S[15]=0,this.blocks=S,this.buffer8=_;else if(f){var h=new ArrayBuffer(68);this.buffer8=new Uint8Array(h),this.blocks=new Uint32Array(h)}else this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.h0=this.h1=this.h2=this.h3=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0}X.prototype.update=function(l){if(this.finalized)throw new Error(t);var h=N(l);l=h[0];for(var v=h[1],p,j=0,M,R=l.length,Z=this.blocks,ze=this.buffer8;j<R;){if(this.hashed&&(this.hashed=!1,Z[0]=Z[16],Z[16]=Z[1]=Z[2]=Z[3]=Z[4]=Z[5]=Z[6]=Z[7]=Z[8]=Z[9]=Z[10]=Z[11]=Z[12]=Z[13]=Z[14]=Z[15]=0),v)if(f)for(M=this.start;j<R&&M<64;++j)p=l.charCodeAt(j),p<128?ze[M++]=p:p<2048?(ze[M++]=192|p>>>6,ze[M++]=128|p&63):p<55296||p>=57344?(ze[M++]=224|p>>>12,ze[M++]=128|p>>>6&63,ze[M++]=128|p&63):(p=65536+((p&1023)<<10|l.charCodeAt(++j)&1023),ze[M++]=240|p>>>18,ze[M++]=128|p>>>12&63,ze[M++]=128|p>>>6&63,ze[M++]=128|p&63);else for(M=this.start;j<R&&M<64;++j)p=l.charCodeAt(j),p<128?Z[M>>>2]|=p<<m[M++&3]:p<2048?(Z[M>>>2]|=(192|p>>>6)<<m[M++&3],Z[M>>>2]|=(128|p&63)<<m[M++&3]):p<55296||p>=57344?(Z[M>>>2]|=(224|p>>>12)<<m[M++&3],Z[M>>>2]|=(128|p>>>6&63)<<m[M++&3],Z[M>>>2]|=(128|p&63)<<m[M++&3]):(p=65536+((p&1023)<<10|l.charCodeAt(++j)&1023),Z[M>>>2]|=(240|p>>>18)<<m[M++&3],Z[M>>>2]|=(128|p>>>12&63)<<m[M++&3],Z[M>>>2]|=(128|p>>>6&63)<<m[M++&3],Z[M>>>2]|=(128|p&63)<<m[M++&3]);else if(f)for(M=this.start;j<R&&M<64;++j)ze[M++]=l[j];else for(M=this.start;j<R&&M<64;++j)Z[M>>>2]|=l[j]<<m[M++&3];this.lastByteIndex=M,this.bytes+=M-this.start,M>=64?(this.start=M-64,this.hash(),this.hashed=!0):this.start=M}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this},X.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var l=this.blocks,h=this.lastByteIndex;l[h>>>2]|=y[h&3],h>=56&&(this.hashed||this.hash(),l[0]=l[16],l[16]=l[1]=l[2]=l[3]=l[4]=l[5]=l[6]=l[7]=l[8]=l[9]=l[10]=l[11]=l[12]=l[13]=l[14]=l[15]=0),l[14]=this.bytes<<3,l[15]=this.hBytes<<3|this.bytes>>>29,this.hash()}},X.prototype.hash=function(){var l,h,v,p,j,M,R=this.blocks;this.first?(l=R[0]-680876937,l=(l<<7|l>>>25)-271733879<<0,p=(-173Line truncated
|
||||
(()=>{var qo=Object.create;var Ti=Object.defineProperty;var Go=Object.getOwnPropertyDescriptor;var Ko=Object.getOwnPropertyNames;var Jo=Object.getPrototypeOf,Qo=Object.prototype.hasOwnProperty;var Kr=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Zo=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Ko(t))!Qo.call(e,i)&&i!==r&&Ti(e,i,{get:()=>t[i],enumerable:!(n=Go(t,i))||n.enumerable});return e};var ea=(e,t,r)=>(r=e!=null?qo(Jo(e)):{},Zo(t||!e||!e.__esModule?Ti(r,"default",{value:e,enumerable:!0}):r,e));var uo=Kr(()=>{});var po=Kr(()=>{});var ho=Kr((Hs,yr)=>{(function(){"use strict";var e="input is invalid type",t="finalize already called",r=typeof window=="object",n=r?window:{};n.JS_MD5_NO_WINDOW&&(r=!1);var i=!r&&typeof self=="object",o=!n.JS_MD5_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;o?n=global:i&&(n=self);var a=!n.JS_MD5_NO_COMMON_JS&&typeof yr=="object"&&yr.exports,c=typeof define=="function"&&define.amd,f=!n.JS_MD5_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",d="0123456789abcdef".split(""),y=[128,32768,8388608,-2147483648],m=[0,8,16,24],O=["hex","array","digest","buffer","arrayBuffer","base64"],E="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),S=[],_;if(f){var I=new ArrayBuffer(68);_=new Uint8Array(I),S=new Uint32Array(I)}var $=Array.isArray;(n.JS_MD5_NO_NODE_JS||!$)&&($=function(l){return Object.prototype.toString.call(l)==="[object Array]"});var A=ArrayBuffer.isView;f&&(n.JS_MD5_NO_ARRAY_BUFFER_IS_VIEW||!A)&&(A=function(l){return typeof l=="object"&&l.buffer&&l.buffer.constructor===ArrayBuffer});var N=function(l){var h=typeof l;if(h==="string")return[l,!0];if(h!=="object"||l===null)throw new Error(e);if(f&&l.constructor===ArrayBuffer)return[new Uint8Array(l),!1];if(!$(l)&&!A(l))throw new Error(e);return[l,!1]},Y=function(l){return function(h){return new X(!0).update(h)[l]()}},ne=function(){var l=Y("hex");o&&(l=J(l)),l.create=function(){return new X},l.update=function(p){return l.create().update(p)};for(var h=0;h<O.length;++h){var v=O[h];l[v]=Y(v)}return l},J=function(l){var h=uo(),v=po().Buffer,p;v.from&&!n.JS_MD5_NO_BUFFER_FROM?p=v.from:p=function(M){return new v(M)};var j=function(M){if(typeof M=="string")return h.createHash("md5").update(M,"utf8").digest("hex");if(M==null)throw new Error(e);return M.constructor===ArrayBuffer&&(M=new Uint8Array(M)),$(M)||A(M)||M.constructor===v?h.createHash("md5").update(p(M)).digest("hex"):l(M)};return j},V=function(l){return function(h,v){return new Q(h,!0).update(v)[l]()}},de=function(){var l=V("hex");l.create=function(p){return new Q(p)},l.update=function(p,j){return l.create(p).update(j)};for(var h=0;h<O.length;++h){var v=O[h];l[v]=V(v)}return l};function X(l){if(l)S[0]=S[16]=S[1]=S[2]=S[3]=S[4]=S[5]=S[6]=S[7]=S[8]=S[9]=S[10]=S[11]=S[12]=S[13]=S[14]=S[15]=0,this.blocks=S,this.buffer8=_;else if(f){var h=new ArrayBuffer(68);this.buffer8=new Uint8Array(h),this.blocks=new Uint32Array(h)}else this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.h0=this.h1=this.h2=this.h3=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0}X.prototype.update=function(l){if(this.finalized)throw new Error(t);var h=N(l);l=h[0];for(var v=h[1],p,j=0,M,R=l.length,Z=this.blocks,ze=this.buffer8;j<R;){if(this.hashed&&(this.hashed=!1,Z[0]=Z[16],Z[16]=Z[1]=Z[2]=Z[3]=Z[4]=Z[5]=Z[6]=Z[7]=Z[8]=Z[9]=Z[10]=Z[11]=Z[12]=Z[13]=Z[14]=Z[15]=0),v)if(f)for(M=this.start;j<R&&M<64;++j)p=l.charCodeAt(j),p<128?ze[M++]=p:p<2048?(ze[M++]=192|p>>>6,ze[M++]=128|p&63):p<55296||p>=57344?(ze[M++]=224|p>>>12,ze[M++]=128|p>>>6&63,ze[M++]=128|p&63):(p=65536+((p&1023)<<10|l.charCodeAt(++j)&1023),ze[M++]=240|p>>>18,ze[M++]=128|p>>>12&63,ze[M++]=128|p>>>6&63,ze[M++]=128|p&63);else for(M=this.start;j<R&&M<64;++j)p=l.charCodeAt(j),p<128?Z[M>>>2]|=p<<m[M++&3]:p<2048?(Z[M>>>2]|=(192|p>>>6)<<m[M++&3],Z[M>>>2]|=(128|p&63)<<m[M++&3]):p<55296||p>=57344?(Z[M>>>2]|=(224|p>>>12)<<m[M++&3],Z[M>>>2]|=(128|p>>>6&63)<<m[M++&3],Z[M>>>2]|=(128|p&63)<<m[M++&3]):(p=65536+((p&1023)<<10|l.charCodeAt(++j)&1023),Z[M>>>2]|=(240|p>>>18)<<m[M++&3],Z[M>>>2]|=(128|p>>>12&63)<<m[M++&3],Z[M>>>2]|=(128|p>>>6&63)<<m[M++&3],Z[M>>>2]|=(128|p&63)<<m[M++&3]);else if(f)for(M=this.start;j<R&&M<64;++j)ze[M++]=l[j];else for(M=this.start;j<R&&M<64;++j)Z[M>>>2]|=l[j]<<m[M++&3];this.lastByteIndex=M,this.bytes+=M-this.start,M>=64?(this.start=M-64,this.hash(),this.hashed=!0):this.start=M}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this},X.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var l=this.blocks,h=this.lastByteIndex;l[h>>>2]|=y[h&3],h>=56&&(this.hashed||this.hash(),l[0]=l[16],l[16]=l[1]=l[2]=l[3]=l[4]=l[5]=l[6]=l[7]=l[8]=l[9]=l[10]=l[11]=l[12]=l[13]=l[14]=l[15]=0),l[14]=this.bytes<<3,l[15]=this.hBytes<<3|this.bytes>>>29,this.hash()}},X.prototype.hash=function(){var l,h,v,p,j,M,R=this.blocks;this.first?(l=R[0]-680876937,l=(l<<7|l>>>25)-271733879<<0,p=(-173Line truncated
|
||||
|
||||
`,'Disable the "computeStyles" modifier\'s `adaptive` option to allow',"for smooth transitions, or remove these properties from the CSS","transition declaration on the popper element if only transitioning","opacity or background-color for example.",`
|
||||
|
||||
|
||||
@@ -0,0 +1,192 @@
|
||||
body {
|
||||
/* font-family: Arial, Helvetica, sans-serif; */
|
||||
font-family: Verdana, Geneva, Tahoma, sans-serif;
|
||||
font-size: 1rem;
|
||||
line-height: 1.6rem;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.big {
|
||||
font-size: 1.6rem;
|
||||
line-height: 2rem;
|
||||
margin-bottom: .5rem;
|
||||
}
|
||||
|
||||
.base {
|
||||
font-size: 1rem;
|
||||
line-height: 1.6rem;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.small {
|
||||
font-size: 0.7rem;
|
||||
line-height: 1rem;
|
||||
}
|
||||
|
||||
|
||||
.gray {
|
||||
color: #4a5565;
|
||||
}
|
||||
|
||||
.hellgrau {
|
||||
background-color: #f3f4f6;
|
||||
}
|
||||
|
||||
.red {
|
||||
color: red;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: auto 0;
|
||||
}
|
||||
|
||||
.m10 {
|
||||
margin: 10px;
|
||||
}
|
||||
|
||||
.m20 {
|
||||
margin: 20px 10px 10px;
|
||||
}
|
||||
|
||||
.ml-1 {
|
||||
margin-left: 1mm;
|
||||
}
|
||||
|
||||
.mt-2 {
|
||||
margin-top: 2mm;
|
||||
}
|
||||
|
||||
.mtop {
|
||||
margin-top: 20mm;
|
||||
}
|
||||
|
||||
.green {
|
||||
color: green;
|
||||
}
|
||||
|
||||
.header {
|
||||
padding: 1.3mm 3mm;
|
||||
margin: 2rem 0;
|
||||
font-size: 1.2rem;
|
||||
border: 0.3mm solid #e5e7eb;
|
||||
background-color: #f3f4f6;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.title {
|
||||
position: absolute;
|
||||
font-weight: bold;
|
||||
font-size: 2.2rem;
|
||||
top: 90mm;
|
||||
width: 185mm;
|
||||
}
|
||||
|
||||
.festsetzung {
|
||||
position: absolute;
|
||||
font-weight: bold;
|
||||
text-align: right;
|
||||
font-size: 1.6rem;
|
||||
top: 130mm;
|
||||
width: 185mm;
|
||||
}
|
||||
|
||||
.auftraggeber {
|
||||
position: absolute;
|
||||
text-align: right;
|
||||
bottom: 20mm;
|
||||
right: 15mm;
|
||||
left: 15mm;
|
||||
}
|
||||
|
||||
.table-striped tr:nth-child(2n-1) td {
|
||||
background-color: #f3f4f6;
|
||||
}
|
||||
|
||||
.deckblatt {
|
||||
/* 210mm x 297mm */
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: #f3f4f6;
|
||||
padding: 10mm;
|
||||
}
|
||||
|
||||
table.table-striped td.head,
|
||||
td.head {
|
||||
font-weight: bold;
|
||||
vertical-align: bottom;
|
||||
background-color: #f3f4f6 !important;
|
||||
}
|
||||
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
empty-cells: show;
|
||||
width: 100% !important;
|
||||
margin-top: 10mm;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
table.inhalt {
|
||||
margin: 10mm;
|
||||
}
|
||||
|
||||
td {
|
||||
font-size: 0.75rem;
|
||||
padding: 0.5rem;
|
||||
}
|
||||
|
||||
.inhalt td {
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.text-75 td {
|
||||
font-size: 0.75rem;
|
||||
}
|
||||
|
||||
.wp10 {
|
||||
width: 10%;
|
||||
}
|
||||
|
||||
.wp20 {
|
||||
width: 20%;
|
||||
}
|
||||
|
||||
.wp25 {
|
||||
width: 29%;
|
||||
}
|
||||
|
||||
.w10p {
|
||||
width: 20mm;
|
||||
}
|
||||
|
||||
.border {
|
||||
border: 0.3mm solid #e5e7eb;
|
||||
}
|
||||
|
||||
.bt {
|
||||
border-top: 0.3mm solid #e5e7eb;
|
||||
}
|
||||
|
||||
.bb {
|
||||
border-bottom: 0.3mm solid #e5e7eb;
|
||||
}
|
||||
|
||||
.bl {
|
||||
border-left: 0.3mm solid #e5e7eb;
|
||||
}
|
||||
|
||||
.br {
|
||||
border-right: 0.3mm solid #e5e7eb;
|
||||
}
|
||||
|
||||
.right {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.center {
|
||||
text-align: center;
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 0 384 512" fill="currentColor">
|
||||
<path d="M48 448V64c0-8.8 7.2-16 16-16H224v80c0 17.7 14.3 32 32 32h80V448c0 8.8-7.2 16-16 16H64c-8.8 0-16-7.2-16-16zM64 0C28.7 0 0 28.7 0 64V448c0 35.3 28.7 64 64 64H320c35.3 0 64-28.7 64-64V154.5c0-17-6.7-33.3-18.7-45.3L274.7 18.7C262.7 6.7 246.5 0 229.5 0H64zm90.9 233.3c-8.1-10.5-23.2-12.3-33.7-4.2s-12.3 23.2-4.2 33.7L161.6 320l-44.5 57.3c-8.1 10.5-6.3 25.5 4.2 33.7s25.5 6.3 33.7-4.2L192 359.1l37.1 47.6c8.1 10.5 23.2 12.3 33.7 4.2s12.3-23.2 4.2-33.7L222.4 320l44.5-57.3c8.1-10.5 6.3-25.5-4.2-33.7s-25.5-6.3-33.7 4.2L192 280.9l-37.1-47.6z" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 652 B |
@@ -0,0 +1,6 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
|
||||
<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5">
|
||||
<path d="M12 17.239a2.857 2.857 0 1 0 0-5.714a2.857 2.857 0 0 0 0 5.714m-.476-7.857h.952m-.476 0v2.143m3.199-1.015l.673.673m-.336-.336l-1.516 1.515M17 13.906v.952m0-.476h-2.143m1.015 3.199l-.673.673m.337-.336l-1.516-1.516m-1.544 2.98h-.952m.476 0v-2.143m-3.199 1.015l-.673-.673m.336.337l1.516-1.516M7 14.858v-.952m0 .476h2.143m-1.015-3.199l.673-.673m-.337.337l1.516 1.515" />
|
||||
<path d="M3.75 12.382v9a1.5 1.5 0 0 0 1.5 1.5h13.5a1.5 1.5 0 0 0 1.5-1.5v-9m3-1.5l-9.885-9.226a2 2 0 0 0-2.73 0L.75 10.882" />
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 709 B |
@@ -0,0 +1,3 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 0 512 512" fill="currentColor">
|
||||
<path d="M64 464H96v48H64c-35.3 0-64-28.7-64-64V64C0 28.7 28.7 0 64 0H229.5c17 0 33.3 6.7 45.3 18.7l90.5 90.5c12 12 18.7 28.3 18.7 45.3V288H336V160H256c-17.7 0-32-14.3-32-32V48H64c-8.8 0-16 7.2-16 16V448c0 8.8 7.2 16 16 16zM176 352h32c30.9 0 56 25.1 56 56s-25.1 56-56 56H192v32c0 8.8-7.2 16-16 16s-16-7.2-16-16V448 368c0-8.8 7.2-16 16-16zm32 80c13.3 0 24-10.7 24-24s-10.7-24-24-24H192v48h16zm96-80h32c26.5 0 48 21.5 48 48v64c0 26.5-21.5 48-48 48H304c-8.8 0-16-7.2-16-16V368c0-8.8 7.2-16 16-16zm32 128c8.8 0 16-7.2 16-16V400c0-8.8-7.2-16-16-16H320v96h16zm80-112c0-8.8 7.2-16 16-16h48c8.8 0 16 7.2 16 16s-7.2 16-16 16H448v32h32c8.8 0 16 7.2 16 16s-7.2 16-16 16H448v48c0 8.8-7.2 16-16 16s-16-7.2-16-16V432 368z" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 816 B |
@@ -0,0 +1,80 @@
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<title>Invoice</title>
|
||||
<script src="https://cdn.tailwindcss.com"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div class="px-2 py-8 max-w-xl mx-auto">
|
||||
<div class="flex items-center justify-between mb-8">
|
||||
<div class="flex items-center">
|
||||
<div class="text-gray-700 font-semibold text-lg">Your Company Name</div>
|
||||
</div>
|
||||
<div class="text-gray-700">
|
||||
<div class="font-bold text-xl mb-2 uppercase">Invoice</div>
|
||||
<div class="text-sm">Date: 01/05/2023</div>
|
||||
<div class="text-sm">Invoice #: {{ $invoiceNumber }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="border-b-2 border-gray-300 pb-8 mb-8">
|
||||
<h2 class="text-2xl font-bold mb-4">Bill To:</h2>
|
||||
<div class="text-gray-700 mb-2">{{ $customerName }}</div>
|
||||
<div class="text-gray-700 mb-2">123 Main St.</div>
|
||||
<div class="text-gray-700 mb-2">Anytown, USA 12345</div>
|
||||
<div class="text-gray-700">johndoe@example.com</div>
|
||||
</div>
|
||||
<table class="w-full text-left mb-8">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-gray-700 font-bold uppercase py-2">Description</th>
|
||||
<th class="text-gray-700 font-bold uppercase py-2">Quantity</th>
|
||||
<th class="text-gray-700 font-bold uppercase py-2">Price</th>
|
||||
<th class="text-gray-700 font-bold uppercase py-2">Total</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="py-4 text-gray-700">Product 1</td>
|
||||
<td class="py-4 text-gray-700">1</td>
|
||||
<td class="py-4 text-gray-700">$100.00</td>
|
||||
<td class="py-4 text-gray-700">$100.00</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="py-4 text-gray-700">Product 2</td>
|
||||
<td class="py-4 text-gray-700">2</td>
|
||||
<td class="py-4 text-gray-700">$50.00</td>
|
||||
<td class="py-4 text-gray-700">$100.00</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="py-4 text-gray-700">Product 3</td>
|
||||
<td class="py-4 text-gray-700">3</td>
|
||||
<td class="py-4 text-gray-700">$75.00</td>
|
||||
<td class="py-4 text-gray-700">$225.00</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="flex justify-end mb-8">
|
||||
<div class="text-gray-700 mr-2">Subtotal:</div>
|
||||
<div class="text-gray-700">$425.00</div>
|
||||
</div>
|
||||
<div class="text-right mb-8">
|
||||
<div class="text-gray-700 mr-2">Tax:</div>
|
||||
<div class="text-gray-700">$25.50</div>
|
||||
|
||||
</div>
|
||||
<div class="flex justify-end mb-8">
|
||||
<div class="text-gray-700 mr-2">Total:</div>
|
||||
<div class="text-gray-700 font-bold text-xl">$450.50</div>
|
||||
</div>
|
||||
<div class="border-t-2 border-gray-300 pt-8 mb-8">
|
||||
<div class="text-gray-700 mb-2">Payment is due within 30 days. Late payments are subject to fees.</div>
|
||||
<div class="text-gray-700 mb-2">Please make checks payable to Your Company Name and mail to:</div>
|
||||
<div class="text-gray-700">123 Main St., Anytown, USA 12345</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
+7
-6
@@ -1,8 +1,9 @@
|
||||
<?php
|
||||
|
||||
use App\Actions\Download\DownloadExcel;
|
||||
use App\Actions\Download\DownloadNutzwerte;
|
||||
use App\Actions\Download\DownloadStandardTexte;
|
||||
use App\Actions\Download\Excel;
|
||||
use App\Actions\Download\Gutachten;
|
||||
use App\Actions\Download\Nutzwerte;
|
||||
use Filament\Http\Middleware\Authenticate;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
|
||||
Route::get('/', function () {
|
||||
@@ -18,6 +19,6 @@ Route::get('/impressum', function () {
|
||||
return view('pages.impressum');
|
||||
});
|
||||
|
||||
Route::get('/admin/nutzwerte/{record}/{mode}/download', [DownloadNutzwerte::class, 'download'])->name('nutzwerte.download');
|
||||
Route::get('/admin/standard/{record}/{mode}/download', [DownloadStandardTexte::class, 'download'])->name('standard.download');
|
||||
Route::get('/admin/excel/{record}/{mode}/download', [DownloadExcel::class, 'download'])->name('excel.download');
|
||||
Route::middleware(Authenticate::class)->get('/app/nutzwerte/{record}/{mode}/download', [Nutzwerte::class, 'download'])->name('nutzwerte.download');
|
||||
Route::middleware(Authenticate::class)->get('/app/standard/{record}/{mode}/download', [Gutachten::class, 'download'])->name('standard.download');
|
||||
Route::middleware(Authenticate::class)->get('/app/excel/{record}/{mode}/download', [Excel::class, 'download'])->name('excel.download');
|
||||
Reference in new issue
Block a user