Compare commits
57
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0ae5f49bcf | ||
|
|
9217960de0 | ||
|
|
d1d27a9ebd | ||
|
|
3bd8ce5aee | ||
|
|
4f56edc4fc | ||
|
|
623851bd70 | ||
|
|
39eda9726d | ||
|
|
f718ba57bc | ||
|
|
1de5668032 | ||
|
|
35bf421da8 | ||
|
|
a7cdfbd1cb | ||
|
|
92016256ce | ||
|
|
b96fb2800f | ||
|
|
d16ddd15eb | ||
|
|
aff53371d9 | ||
|
|
425510fb16 | ||
|
|
e3f9b3deb1 | ||
|
|
72ff4e5c76 | ||
|
|
5482ac07c6 | ||
|
|
7e38f05650 | ||
|
|
df29429257 | ||
|
|
f6bcd31bd8 | ||
|
|
77c9117556 | ||
|
|
8fdb399386 | ||
|
|
47f250d27f | ||
|
|
40c6b27ccb | ||
|
|
db01151ca3 | ||
|
|
9fcea8fb09 | ||
|
|
38e71927bc | ||
|
|
70787ace44 | ||
|
|
25021bdafb | ||
|
|
03b46e7bfb | ||
|
|
ec9ac92a95 | ||
|
|
8025bf2692 | ||
|
|
c48d3b1756 | ||
|
|
d053f57b10 | ||
|
|
b522d60954 | ||
|
|
b38e190714 | ||
|
|
d81adb4ddc | ||
|
|
094763fd86 | ||
|
|
a1a98c75c5 | ||
|
|
fb5ec85c9f | ||
|
|
e8054b2292 | ||
|
|
60ae6cf7a6 | ||
|
|
296d6001cd | ||
|
|
aa051525a1 | ||
|
|
b288513bb4 | ||
|
|
74930351f1 | ||
|
|
65d4603793 | ||
|
|
023c11019c | ||
|
|
88d8ae0954 | ||
|
|
ca362f81c8 | ||
|
|
4634e14924 | ||
|
|
69486f65ee | ||
|
|
060b6c647e | ||
|
|
8e186fc231 | ||
|
|
c7bd1efdaa |
No files matched your search
@@ -5,6 +5,7 @@ vendor
|
|||||||
public/build
|
public/build
|
||||||
public/hot
|
public/hot
|
||||||
storage/app/public/*
|
storage/app/public/*
|
||||||
|
storage/app/private/*
|
||||||
storage/framework/cache/*
|
storage/framework/cache/*
|
||||||
storage/framework/sessions/*
|
storage/framework/sessions/*
|
||||||
storage/framework/views/*
|
storage/framework/views/*
|
||||||
|
|||||||
+21
-8
@@ -31,7 +31,7 @@ DB_DATABASE=boboko
|
|||||||
DB_USERNAME=root
|
DB_USERNAME=root
|
||||||
DB_PASSWORD=dev
|
DB_PASSWORD=dev
|
||||||
|
|
||||||
SESSION_DRIVER=database
|
SESSION_DRIVER=redis
|
||||||
SESSION_LIFETIME=120
|
SESSION_LIFETIME=120
|
||||||
SESSION_ENCRYPT=false
|
SESSION_ENCRYPT=false
|
||||||
SESSION_PATH=/
|
SESSION_PATH=/
|
||||||
@@ -41,7 +41,7 @@ BROADCAST_CONNECTION=log
|
|||||||
FILESYSTEM_DISK=local
|
FILESYSTEM_DISK=local
|
||||||
QUEUE_CONNECTION=database
|
QUEUE_CONNECTION=database
|
||||||
|
|
||||||
CACHE_STORE=database
|
CACHE_STORE=redis
|
||||||
# CACHE_PREFIX=
|
# CACHE_PREFIX=
|
||||||
|
|
||||||
MEMCACHED_HOST=127.0.0.1
|
MEMCACHED_HOST=127.0.0.1
|
||||||
@@ -58,8 +58,8 @@ MAIL_PORT=1025
|
|||||||
MAIL_USERNAME=null
|
MAIL_USERNAME=null
|
||||||
MAIL_PASSWORD=null
|
MAIL_PASSWORD=null
|
||||||
MAIL_FROM_ADDRESS="hello@example.com"
|
MAIL_FROM_ADDRESS="hello@example.com"
|
||||||
|
# Fallback only: the sender name comes from Store Details' "Mail from name" when set.
|
||||||
MAIL_FROM_NAME="${APP_NAME}"
|
MAIL_FROM_NAME="${APP_NAME}"
|
||||||
CONTACT_EMAIL=
|
|
||||||
|
|
||||||
HCAPTCHA_SITEKEY=
|
HCAPTCHA_SITEKEY=
|
||||||
HCAPTCHA_SECRET=
|
HCAPTCHA_SECRET=
|
||||||
@@ -72,11 +72,7 @@ AWS_USE_PATH_STYLE_ENDPOINT=false
|
|||||||
|
|
||||||
VITE_APP_NAME="${APP_NAME}"
|
VITE_APP_NAME="${APP_NAME}"
|
||||||
|
|
||||||
OTEL_SERVICE_NAME=boboko-starter
|
SESSION_SECURE_COOKIE=true
|
||||||
OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf
|
|
||||||
OTEL_PROPAGATORS=baggage,tracecontext
|
|
||||||
OTEL_PHP_AUTOLOAD_ENABLED=true
|
|
||||||
OTEL_EXPORTER_OTLP_ENDPOINT=
|
|
||||||
|
|
||||||
# Stoic is the headless CMS, proxied at /stoic/ behind the app in prod (see docker/nginx/prod.conf)
|
# Stoic is the headless CMS, proxied at /stoic/ behind the app in prod (see docker/nginx/prod.conf)
|
||||||
STOIC_SECRET=dev-secret-change-me
|
STOIC_SECRET=dev-secret-change-me
|
||||||
@@ -88,6 +84,9 @@ SCOUT_QUEUE=true
|
|||||||
MEILISEARCH_KEY=dev-meilisearch-key-change-me
|
MEILISEARCH_KEY=dev-meilisearch-key-change-me
|
||||||
MEILISEARCH_HOST=http://meilisearch:7700
|
MEILISEARCH_HOST=http://meilisearch:7700
|
||||||
|
|
||||||
|
# Lunar sets all prices inclusive of tax with these values
|
||||||
|
LUNAR_STORE_INCLUSIVE_OF_TAX=true
|
||||||
|
|
||||||
# Host-side ports — change these if another project on this machine already uses the defaults
|
# Host-side ports — change these if another project on this machine already uses the defaults
|
||||||
APP_PORT=8090
|
APP_PORT=8090
|
||||||
STOIC_PORT=2727
|
STOIC_PORT=2727
|
||||||
@@ -96,3 +95,17 @@ POSTGRES_HOST_PORT=5436
|
|||||||
MAILPIT_PORT=8025
|
MAILPIT_PORT=8025
|
||||||
VITE_PORT=5173
|
VITE_PORT=5173
|
||||||
MEILISEARCH_PORT=7700
|
MEILISEARCH_PORT=7700
|
||||||
|
|
||||||
|
STRIPE_SECRET=secret
|
||||||
|
STRIPE_PUBLIC_KEY=public_key
|
||||||
|
STRIPE_WEBHOOK_SECRET=webhook_secret
|
||||||
|
|
||||||
|
BOXNOW_BASE_URL=https://api-stage.boxnow.gr/api/v1
|
||||||
|
BOXNOW_LOCATION_API_URL=https://locationapi-stage.boxnow.gr/api/v1
|
||||||
|
BOXNOW_CLIENT_ID=box-client-id
|
||||||
|
BOXNOW_CLIENT_SECRET=box-client-secret
|
||||||
|
BOXNOW_PARTNER_ID=box-partner-id
|
||||||
|
BOXNOW_ORIGIN_LOCATION_ID=box-location-id
|
||||||
|
BOXNOW_SENDER_NAME=test
|
||||||
|
BOXNOW_SENDER_EMAIL=test@test.com
|
||||||
|
BOXNOW_SENDER_PHONE=+306912345678
|
||||||
@@ -17,11 +17,7 @@
|
|||||||
/public/build
|
/public/build
|
||||||
/public/hot
|
/public/hot
|
||||||
/public/sitemap.xml
|
/public/sitemap.xml
|
||||||
/public/logos/core
|
|
||||||
/public/storage
|
/public/storage
|
||||||
/public/css/filament
|
|
||||||
/public/js/filament
|
|
||||||
/public/fonts/filament
|
|
||||||
/storage/*.key
|
/storage/*.key
|
||||||
/storage/framework/migrated
|
/storage/framework/migrated
|
||||||
/storage/pail
|
/storage/pail
|
||||||
|
|||||||
+6
-11
@@ -26,6 +26,9 @@ ENTRYPOINT ["/entrypoint-vite.sh"]
|
|||||||
|
|
||||||
# ── Stage 2b: Node / Vite build ──────────────────────────────────────────────
|
# ── Stage 2b: Node / Vite build ──────────────────────────────────────────────
|
||||||
FROM node:22-alpine AS node-build
|
FROM node:22-alpine AS node-build
|
||||||
|
# git: same reason as vite-dev above — npm needs it to resolve @boboko/core's
|
||||||
|
# git+https tagged-VCS form.
|
||||||
|
RUN apk add --no-cache git
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY package*.json ./
|
COPY package*.json ./
|
||||||
RUN npm ci --ignore-scripts
|
RUN npm ci --ignore-scripts
|
||||||
@@ -61,6 +64,7 @@ RUN apt-get update \
|
|||||||
php8.5-xml \
|
php8.5-xml \
|
||||||
php8.5-curl \
|
php8.5-curl \
|
||||||
php8.5-redis \
|
php8.5-redis \
|
||||||
|
php8.5-soap \
|
||||||
postgresql-client-18 \
|
postgresql-client-18 \
|
||||||
&& rm -rf /var/lib/apt/lists/* \
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
&& mkdir -p /run/php \
|
&& mkdir -p /run/php \
|
||||||
@@ -91,18 +95,9 @@ COPY . .
|
|||||||
RUN chown -R www-data:www-data storage bootstrap/cache \
|
RUN chown -R www-data:www-data storage bootstrap/cache \
|
||||||
&& chmod -R 775 storage bootstrap/cache
|
&& chmod -R 775 storage bootstrap/cache
|
||||||
|
|
||||||
# Package discovery and asset publishing are fully determined by composer.lock + code,
|
|
||||||
# so they belong in the image, not in every container's entrypoint. Only asset-type
|
|
||||||
# tags are force-republished here — config tags (core-config, lunar) are a deliberate
|
|
||||||
# one-time `vendor:publish` step you run and commit by hand, since re-running them would
|
|
||||||
# silently overwrite any local edits to config/core.php or config/lunar/*.php.
|
|
||||||
RUN php artisan package:discover --ansi \
|
|
||||||
&& php artisan vendor:publish --tag=core-assets --force --ansi \
|
|
||||||
&& php artisan vendor:publish --tag=public --force --ansi \
|
|
||||||
&& php artisan filament:assets --ansi
|
|
||||||
|
|
||||||
COPY docker/entrypoint.sh /entrypoint.sh
|
COPY docker/entrypoint.sh /entrypoint.sh
|
||||||
RUN chmod +x /entrypoint.sh
|
COPY docker/entrypoint-worker.sh /entrypoint-worker.sh
|
||||||
|
RUN chmod +x /entrypoint.sh /entrypoint-worker.sh
|
||||||
|
|
||||||
EXPOSE 9000
|
EXPOSE 9000
|
||||||
ENTRYPOINT ["/entrypoint.sh"]
|
ENTRYPOINT ["/entrypoint.sh"]
|
||||||
|
|||||||
+2
-8
@@ -19,7 +19,6 @@
|
|||||||
pull
|
pull
|
||||||
docker_build
|
docker_build
|
||||||
docker_up
|
docker_up
|
||||||
migrate
|
|
||||||
artisan_optimize
|
artisan_optimize
|
||||||
restart_workers
|
restart_workers
|
||||||
stoic_generate_thumbs
|
stoic_generate_thumbs
|
||||||
@@ -45,12 +44,6 @@
|
|||||||
{{ $compose }} up -d --remove-orphans
|
{{ $compose }} up -d --remove-orphans
|
||||||
@endtask
|
@endtask
|
||||||
|
|
||||||
@task('migrate', ['on' => 'web'])
|
|
||||||
echo ">>> Running migrations..."
|
|
||||||
cd {{ $path }}
|
|
||||||
{{ $compose }} exec -T app php artisan migrate --force < /dev/null
|
|
||||||
@endtask
|
|
||||||
|
|
||||||
@task('artisan_optimize', ['on' => 'web'])
|
@task('artisan_optimize', ['on' => 'web'])
|
||||||
echo ">>> Optimizing..."
|
echo ">>> Optimizing..."
|
||||||
cd {{ $path }}
|
cd {{ $path }}
|
||||||
@@ -61,9 +54,10 @@
|
|||||||
@endtask
|
@endtask
|
||||||
|
|
||||||
@task('restart_workers', ['on' => 'web'])
|
@task('restart_workers', ['on' => 'web'])
|
||||||
echo ">>> Restarting queue workers..."
|
echo ">>> Restarting queue workers and scheduler..."
|
||||||
cd {{ $path }}
|
cd {{ $path }}
|
||||||
{{ $compose }} restart queue
|
{{ $compose }} restart queue
|
||||||
|
{{ $compose }} restart scheduler
|
||||||
@endtask
|
@endtask
|
||||||
|
|
||||||
@task('password_protect', ['on' => 'web'])
|
@task('password_protect', ['on' => 'web'])
|
||||||
|
|||||||
@@ -44,7 +44,11 @@ public function show(string $locale, Request $request, int $orderId): View
|
|||||||
return view('account.orders.show', [
|
return view('account.orders.show', [
|
||||||
'order' => $order,
|
'order' => $order,
|
||||||
'paymentMethodName' => $paymentMethodName,
|
'paymentMethodName' => $paymentMethodName,
|
||||||
'shipments' => $order->shipments->whereNull('cancelled_at')->whereNotNull('tracking_reference'),
|
// Active shipments with a number; return vouchers are the shop's
|
||||||
|
// business, not the customer's.
|
||||||
|
'shipments' => $order->shipments
|
||||||
|
->reject(fn ($shipment) => $shipment->isCancelled() || $shipment->isReturn() || blank($shipment->tracking_reference))
|
||||||
|
->values(),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -5,16 +5,18 @@
|
|||||||
use App\Http\Requests\ContactRequest;
|
use App\Http\Requests\ContactRequest;
|
||||||
use App\Mail\ContactConfirmationMail;
|
use App\Mail\ContactConfirmationMail;
|
||||||
use App\Mail\ContactMessageMail;
|
use App\Mail\ContactMessageMail;
|
||||||
|
use App\Models\StoicPage;
|
||||||
use Illuminate\Http\RedirectResponse;
|
use Illuminate\Http\RedirectResponse;
|
||||||
use Illuminate\Support\Facades\Log;
|
use Illuminate\Support\Facades\Log;
|
||||||
use Illuminate\Support\Facades\Mail;
|
use Illuminate\Support\Facades\Mail;
|
||||||
use Illuminate\Support\Facades\RateLimiter;
|
use Illuminate\Support\Facades\RateLimiter;
|
||||||
use Illuminate\View\View;
|
use Illuminate\View\View;
|
||||||
|
use Modules\Core\Store\Services\StoreDetailsService;
|
||||||
use Throwable;
|
use Throwable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Contact form. Nothing is stored: the message is emailed to the store
|
* Contact form. Nothing is stored: the message is emailed to the store
|
||||||
* (CONTACT_EMAIL) and the sender gets a generic confirmation. Both are sent
|
* (Store Details' contact email) and the sender gets a generic confirmation. Both are sent
|
||||||
* synchronously so a failed store email can be reported back on the form.
|
* synchronously so a failed store email can be reported back on the form.
|
||||||
*
|
*
|
||||||
* Limited per IP in here rather than with throttle middleware, so the limit
|
* Limited per IP in here rather than with throttle middleware, so the limit
|
||||||
@@ -27,7 +29,16 @@ class ContactController extends Controller
|
|||||||
|
|
||||||
public function index(string $locale): View
|
public function index(string $locale): View
|
||||||
{
|
{
|
||||||
return view('contact');
|
$page = StoicPage::localized('contact');
|
||||||
|
|
||||||
|
if (! $page) {
|
||||||
|
abort(404);
|
||||||
|
}
|
||||||
|
|
||||||
|
return view('contact', [
|
||||||
|
'page' => $page,
|
||||||
|
'store' => app(StoreDetailsService::class)->current(),
|
||||||
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function send(string $locale, ContactRequest $request): RedirectResponse
|
public function send(string $locale, ContactRequest $request): RedirectResponse
|
||||||
@@ -41,11 +52,11 @@ public function send(string $locale, ContactRequest $request): RedirectResponse
|
|||||||
RateLimiter::hit($key, self::SEND_DECAY_SECONDS);
|
RateLimiter::hit($key, self::SEND_DECAY_SECONDS);
|
||||||
|
|
||||||
$data = $request->validated();
|
$data = $request->validated();
|
||||||
$to = config('services.contact.email');
|
$to = app(StoreDetailsService::class)->current()->contact_email;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (blank($to)) {
|
if (blank($to)) {
|
||||||
throw new \RuntimeException('CONTACT_EMAIL is not set.');
|
throw new \RuntimeException('Store Details has no contact email.');
|
||||||
}
|
}
|
||||||
|
|
||||||
Mail::to($to)->send(new ContactMessageMail(
|
Mail::to($to)->send(new ContactMessageMail(
|
||||||
|
|||||||
@@ -4,27 +4,72 @@
|
|||||||
|
|
||||||
use App\Catalog\ProductCard;
|
use App\Catalog\ProductCard;
|
||||||
use App\Models\StoicPage;
|
use App\Models\StoicPage;
|
||||||
|
use Modules\Core\Catalog\DTOs\ProductFilters;
|
||||||
|
use Modules\Core\Catalog\Services\CollectionService;
|
||||||
use Modules\Core\Catalog\Services\ProductService;
|
use Modules\Core\Catalog\Services\ProductService;
|
||||||
|
|
||||||
class HomeController extends Controller
|
class HomeController extends Controller
|
||||||
{
|
{
|
||||||
public function __construct(private readonly ProductService $products) {}
|
/** Slug of the hero collection in the "Homepage" collection group. */
|
||||||
|
private const HERO_COLLECTION_SLUG = 'hero';
|
||||||
|
|
||||||
|
private const HERO_FALLBACK_COUNT = 5;
|
||||||
|
|
||||||
|
private const CLASSICS_COUNT = 8;
|
||||||
|
|
||||||
|
public function __construct(
|
||||||
|
private readonly ProductService $products,
|
||||||
|
private readonly CollectionService $collections,
|
||||||
|
) {}
|
||||||
|
|
||||||
public function index(string $locale)
|
public function index(string $locale)
|
||||||
{
|
{
|
||||||
$page = StoicPage::firstWhere('slug', 'home');
|
$page = StoicPage::localized('home');
|
||||||
|
|
||||||
if (! $page) {
|
if (! $page) {
|
||||||
abort(404);
|
abort(404);
|
||||||
}
|
}
|
||||||
|
|
||||||
$products = collect($this->products->random(13))
|
// Random pool for the classics carousel, and for the hero too when the
|
||||||
->map(fn (array $product) => ProductCard::fromIndexed($product));
|
// hero collection is missing or empty. Oversized so hero products can be
|
||||||
|
// excluded from it and still leave enough.
|
||||||
|
$random = collect($this->products->random(self::HERO_FALLBACK_COUNT + self::CLASSICS_COUNT));
|
||||||
|
|
||||||
|
$hero = collect($this->heroCollectionProducts());
|
||||||
|
|
||||||
|
if ($hero->isEmpty()) {
|
||||||
|
$hero = $random->take(self::HERO_FALLBACK_COUNT);
|
||||||
|
}
|
||||||
|
|
||||||
|
$heroIds = $hero->pluck('id')->all();
|
||||||
|
|
||||||
|
$classics = $random
|
||||||
|
->reject(fn (array $product) => in_array($product['id'], $heroIds))
|
||||||
|
->take(self::CLASSICS_COUNT);
|
||||||
|
|
||||||
return view('home', [
|
return view('home', [
|
||||||
'page' => $page,
|
'page' => $page,
|
||||||
'heroProducts' => $products->take(5)->values(),
|
'heroProducts' => $hero->map(fn (array $product) => ProductCard::fromIndexed($product))->values(),
|
||||||
'classicsProducts' => $products->slice(5)->values(),
|
'classicsProducts' => $classics->map(fn (array $product) => ProductCard::fromIndexed($product))->values(),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Products the store owner picked for the hero, via the Lunar collection
|
||||||
|
* with slug "hero". Not in the owner's drag order yet: the product index
|
||||||
|
* doesn't carry per-collection position (pending a boboko-core task).
|
||||||
|
*/
|
||||||
|
private function heroCollectionProducts(): array
|
||||||
|
{
|
||||||
|
$collection = $this->collections->getBySlug(self::HERO_COLLECTION_SLUG);
|
||||||
|
|
||||||
|
if ($collection === null) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->products
|
||||||
|
->list(new ProductFilters(collectionId: $collection['id']))
|
||||||
|
->products
|
||||||
|
->items();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -3,9 +3,28 @@
|
|||||||
namespace App\Http\Controllers;
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
use App\Models\StoicPage;
|
use App\Models\StoicPage;
|
||||||
|
use Modules\Core\Store\Services\StoreDetailsService;
|
||||||
|
|
||||||
class LegalPageController extends Controller
|
class LegalPageController extends Controller
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* {placeholder} => StoreDetails column, usable in the Stoic legal page
|
||||||
|
* markdown.
|
||||||
|
*/
|
||||||
|
private const PLACEHOLDERS = [
|
||||||
|
'{store_name}' => 'name',
|
||||||
|
'{store_address}' => 'address',
|
||||||
|
'{store_phone}' => 'phone',
|
||||||
|
'{store_contact_email}' => 'contact_email',
|
||||||
|
'{store_legal_name}' => 'legal_name',
|
||||||
|
'{store_tax_identifier}' => 'tax_identifier',
|
||||||
|
'{store_registration_number}' => 'registration_number',
|
||||||
|
];
|
||||||
|
|
||||||
|
public function __construct(
|
||||||
|
private readonly StoreDetailsService $storeDetails,
|
||||||
|
) {}
|
||||||
|
|
||||||
public function terms(string $locale)
|
public function terms(string $locale)
|
||||||
{
|
{
|
||||||
return $this->show('terms-and-conditions');
|
return $this->show('terms-and-conditions');
|
||||||
@@ -28,12 +47,30 @@ public function cookies(string $locale)
|
|||||||
|
|
||||||
private function show(string $slug)
|
private function show(string $slug)
|
||||||
{
|
{
|
||||||
$page = StoicPage::firstWhere('slug', $slug);
|
$page = StoicPage::localized($slug);
|
||||||
|
|
||||||
if (! $page) {
|
if (! $page) {
|
||||||
abort(404);
|
abort(404);
|
||||||
}
|
}
|
||||||
|
|
||||||
return view('legal', ['page' => $page]);
|
return view('legal', [
|
||||||
|
'page' => $page,
|
||||||
|
'content' => $this->fillPlaceholders($page->content ?? ''),
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Swapped in before the markdown is rendered, so values are escaped: the
|
||||||
|
* rendered markdown is printed unescaped. An empty field renders as
|
||||||
|
* nothing rather than leaving the raw placeholder on the page.
|
||||||
|
*/
|
||||||
|
private function fillPlaceholders(string $content): string
|
||||||
|
{
|
||||||
|
$details = $this->storeDetails->current();
|
||||||
|
|
||||||
|
return strtr($content, array_map(
|
||||||
|
fn (string $column) => e((string) ($details->translate($column) ?? '')),
|
||||||
|
self::PLACEHOLDERS,
|
||||||
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2,17 +2,34 @@
|
|||||||
|
|
||||||
namespace App\Http\Controllers;
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
|
use App\Catalog\ProductCard;
|
||||||
use App\Catalog\ProductListing;
|
use App\Catalog\ProductListing;
|
||||||
use App\Catalog\ProductListingPage;
|
use App\Catalog\ProductListingPage;
|
||||||
|
use Modules\Core\Catalog\Services\ProductSearchService;
|
||||||
|
|
||||||
class SearchController extends Controller
|
class SearchController extends Controller
|
||||||
{
|
{
|
||||||
public function __construct(private readonly ProductListingPage $listingPage) {}
|
/** Live search answers from this many characters on. */
|
||||||
|
public const LIVE_MIN_CHARS = 3;
|
||||||
|
|
||||||
|
/** How many products the live search dropdown lists. */
|
||||||
|
private const LIVE_LIMIT = 6;
|
||||||
|
|
||||||
|
public function __construct(
|
||||||
|
private readonly ProductListingPage $listingPage,
|
||||||
|
private readonly ProductSearchService $search,
|
||||||
|
) {}
|
||||||
|
|
||||||
public function show(string $locale)
|
public function show(string $locale)
|
||||||
{
|
{
|
||||||
$query = trim((string) request()->query('q', ''));
|
$query = trim((string) request()->query('q', ''));
|
||||||
|
|
||||||
|
// The search overlay's live results: the same endpoint, asked for by
|
||||||
|
// its <turbo-frame id="search-suggestions"> as the shopper types.
|
||||||
|
if (request()->header('Turbo-Frame') === 'search-suggestions') {
|
||||||
|
return $this->suggestions($query);
|
||||||
|
}
|
||||||
|
|
||||||
if ($query === '') {
|
if ($query === '') {
|
||||||
return redirect()->route('products');
|
return redirect()->route('products');
|
||||||
}
|
}
|
||||||
@@ -28,4 +45,27 @@ public function show(string $locale)
|
|||||||
|
|
||||||
return view('search.index', [...$data, 'query' => $query]);
|
return view('search.index', [...$data, 'query' => $query]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The first few matches and how many there are in all — the dropdown
|
||||||
|
* under the search overlay. Empty below LIVE_MIN_CHARS characters.
|
||||||
|
*/
|
||||||
|
private function suggestions(string $query)
|
||||||
|
{
|
||||||
|
$products = collect();
|
||||||
|
$total = 0;
|
||||||
|
|
||||||
|
if (mb_strlen($query) >= self::LIVE_MIN_CHARS) {
|
||||||
|
$result = $this->search->search($query, perPage: self::LIVE_LIMIT);
|
||||||
|
$products = collect($result->products->items())->map(ProductCard::fromIndexed(...));
|
||||||
|
$total = $result->products->total();
|
||||||
|
}
|
||||||
|
|
||||||
|
return view('search.suggestions', [
|
||||||
|
'query' => $query,
|
||||||
|
'products' => $products,
|
||||||
|
'total' => $total,
|
||||||
|
'searched' => mb_strlen($query) >= self::LIVE_MIN_CHARS,
|
||||||
|
]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -8,7 +8,7 @@
|
|||||||
use Illuminate\Mail\Mailables\Envelope;
|
use Illuminate\Mail\Mailables\Envelope;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A contact-form message, sent to the store's CONTACT_EMAIL. Reply-To is the
|
* A contact-form message, sent to Store Details' contact email. Reply-To is the
|
||||||
* sender, so replying from the inbox goes straight to them.
|
* sender, so replying from the inbox goes straight to them.
|
||||||
*/
|
*/
|
||||||
class ContactMessageMail extends Mailable
|
class ContactMessageMail extends Mailable
|
||||||
|
|||||||
@@ -2,16 +2,32 @@
|
|||||||
|
|
||||||
namespace App\Models;
|
namespace App\Models;
|
||||||
|
|
||||||
|
use App\Services\Stoic;
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
use JacobJoergensen\LaravelPaper\Attributes\ContentPath;
|
use JacobJoergensen\LaravelPaper\Attributes\ContentPath;
|
||||||
use JacobJoergensen\LaravelPaper\Attributes\Driver;
|
use JacobJoergensen\LaravelPaper\Attributes\Driver;
|
||||||
use JacobJoergensen\LaravelPaper\Attributes\Timestamps;
|
use JacobJoergensen\LaravelPaper\Attributes\Timestamps;
|
||||||
use JacobJoergensen\LaravelPaper\Paper;
|
use JacobJoergensen\LaravelPaper\Paper;
|
||||||
|
|
||||||
|
// Points at the default locale (el), which Stoic writes every field to. Other
|
||||||
|
// locales hold only the translatable fields — use localized() to get a page
|
||||||
|
// with those layered on top for the current locale.
|
||||||
#[Driver("markdown")]
|
#[Driver("markdown")]
|
||||||
#[ContentPath("resources/stoic/content/pages")]
|
#[ContentPath("resources/stoic/content/el/pages")]
|
||||||
#[Timestamps]
|
#[Timestamps]
|
||||||
class StoicPage extends Model
|
class StoicPage extends Model
|
||||||
{
|
{
|
||||||
use Paper;
|
use Paper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The page in the current locale: the default-locale entry, with the
|
||||||
|
* current locale's non-empty fields (and body) swapped in. Untranslated
|
||||||
|
* fields fall back to the default locale.
|
||||||
|
*/
|
||||||
|
public static function localized(string $slug): ?static
|
||||||
|
{
|
||||||
|
$page = static::firstWhere('slug', $slug);
|
||||||
|
|
||||||
|
return $page?->forceFill(Stoic::localeOverrides("pages/{$slug}.md"));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
+16
-1
@@ -29,12 +29,26 @@ class User extends Authenticatable implements LunarUserInterface
|
|||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The attributes that should be hidden for serialization.
|
* The attributes that should be hidden for serialization. Every
|
||||||
|
* secret-bearing OTP/pending-email-change field is included here,
|
||||||
|
* not just remember_token — otp_code_hash and
|
||||||
|
* pending_email_code_hash are bcrypt hashes rather than the raw
|
||||||
|
* codes (see Modules\Core\Auth\Services\UserOtpService and
|
||||||
|
* Modules\Core\Customer\Services\CustomerEmailChangeService), but a
|
||||||
|
* hash is still not something any serialized response should leak,
|
||||||
|
* and otp_attempts/pending_email_attempts reveal in-progress guess
|
||||||
|
* counts.
|
||||||
*
|
*
|
||||||
* @var list<string>
|
* @var list<string>
|
||||||
*/
|
*/
|
||||||
protected $hidden = [
|
protected $hidden = [
|
||||||
'remember_token',
|
'remember_token',
|
||||||
|
'otp_code_hash',
|
||||||
|
'otp_expires_at',
|
||||||
|
'otp_attempts',
|
||||||
|
'pending_email_code_hash',
|
||||||
|
'pending_email_expires_at',
|
||||||
|
'pending_email_attempts',
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -46,6 +60,7 @@ protected function casts(): array
|
|||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'email_verified_at' => 'datetime',
|
'email_verified_at' => 'datetime',
|
||||||
|
'otp_code_hash' => 'hashed',
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -4,34 +4,80 @@
|
|||||||
|
|
||||||
use App\Models\Customer;
|
use App\Models\Customer;
|
||||||
use App\Models\Staff;
|
use App\Models\Staff;
|
||||||
|
use App\Services\StoicSettings;
|
||||||
use Illuminate\Database\Eloquent\Relations\Relation;
|
use Illuminate\Database\Eloquent\Relations\Relation;
|
||||||
|
use Illuminate\Mail\Events\MessageSending;
|
||||||
|
use Illuminate\Support\Facades\Event;
|
||||||
use Illuminate\Support\Facades\URL;
|
use Illuminate\Support\Facades\URL;
|
||||||
use Illuminate\Support\Facades\View;
|
use Illuminate\Support\Facades\View;
|
||||||
use Illuminate\Support\ServiceProvider;
|
use Illuminate\Support\ServiceProvider;
|
||||||
use Illuminate\View\View as ViewInstance;
|
use Illuminate\View\View as ViewInstance;
|
||||||
use Lunar\Facades\ModelManifest;
|
use Lunar\Facades\ModelManifest;
|
||||||
use Lunar\Facades\Telemetry;
|
use Lunar\Facades\Telemetry;
|
||||||
|
use Lunar\Models\CollectionGroup;
|
||||||
use Modules\Core\Catalog\DTOs\CollectionFilters;
|
use Modules\Core\Catalog\DTOs\CollectionFilters;
|
||||||
use Modules\Core\Catalog\Enums\CollectionSort;
|
use Modules\Core\Catalog\Enums\CollectionSort;
|
||||||
use Modules\Core\Catalog\Services\CollectionService;
|
use Modules\Core\Catalog\Services\CollectionService;
|
||||||
|
use Modules\Core\Store\Services\StoreDetailsService;
|
||||||
|
use Symfony\Component\Mime\Address;
|
||||||
|
|
||||||
class AppServiceProvider extends ServiceProvider
|
class AppServiceProvider extends ServiceProvider
|
||||||
{
|
{
|
||||||
|
public function register(): void
|
||||||
|
{
|
||||||
|
$this->app->scoped(StoicSettings::class);
|
||||||
|
}
|
||||||
|
|
||||||
public function boot(): void
|
public function boot(): void
|
||||||
{
|
{
|
||||||
Telemetry::optOut();
|
Telemetry::optOut();
|
||||||
|
|
||||||
// header.blade.php's category dropdown — root collections only, resolved
|
// header.blade.php's category dropdown — root collections of the catalog
|
||||||
// per-request so the composer runs after `locale` middleware has already
|
// group only, so merchandising groups (e.g. "Homepage") stay out of the
|
||||||
// set App::getLocale(), which CollectionService's name resolution depends on.
|
// nav. Resolved per-request so the composer runs after `locale` middleware
|
||||||
|
// has already set App::getLocale(), which CollectionService's name
|
||||||
|
// resolution depends on. The group is looked up by handle, not id, since
|
||||||
|
// ids can differ between environments.
|
||||||
View::composer('components.header', function (ViewInstance $view) {
|
View::composer('components.header', function (ViewInstance $view) {
|
||||||
$view->with('categories', app(CollectionService::class)->list(
|
$groupId = CollectionGroup::where('handle', 'shopify')->value('id');
|
||||||
filters: new CollectionFilters(rootOnly: true),
|
|
||||||
|
$view->with('categories', $groupId === null ? [] : app(CollectionService::class)->list(
|
||||||
|
filters: new CollectionFilters(groupId: $groupId, rootOnly: true),
|
||||||
perPage: 100,
|
perPage: 100,
|
||||||
sort: CollectionSort::Position,
|
sort: CollectionSort::Position,
|
||||||
)->items());
|
)->items());
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Site-wide settings edited in Stoic (settings.md): default meta
|
||||||
|
// description, social links for the footer, emails and schema.org.
|
||||||
|
View::composer(
|
||||||
|
['layouts.app', 'components.footer', 'emails.layout', 'home'],
|
||||||
|
fn (ViewInstance $view) => $view->with('stoicSettings', app(StoicSettings::class)),
|
||||||
|
);
|
||||||
|
|
||||||
|
// INTERIM, belongs in boboko-core's Store module: the sender name on
|
||||||
|
// outgoing emails comes from Store Details' "Mail from name", with
|
||||||
|
// MAIL_FROM_NAME as the fallback when it's empty. Done per message
|
||||||
|
// rather than by setting config at boot, so a long-running queue
|
||||||
|
// worker picks up a changed name without a restart. Only the default
|
||||||
|
// from address is renamed; a mailable with its own from is left alone.
|
||||||
|
Event::listen(MessageSending::class, function (MessageSending $event) {
|
||||||
|
$name = app(StoreDetailsService::class)->current()->mail_from_name;
|
||||||
|
|
||||||
|
if (blank($name)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$defaultAddress = config('mail.from.address');
|
||||||
|
|
||||||
|
$event->message->from(...array_map(
|
||||||
|
fn (Address $from) => $from->getAddress() === $defaultAddress
|
||||||
|
? new Address($from->getAddress(), $name)
|
||||||
|
: $from,
|
||||||
|
$event->message->getFrom(),
|
||||||
|
));
|
||||||
|
});
|
||||||
|
|
||||||
if ($this->app->environment('production')) {
|
if ($this->app->environment('production')) {
|
||||||
URL::forceScheme('https');
|
URL::forceScheme('https');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
use Illuminate\Support\Facades\Storage;
|
use Illuminate\Support\Facades\Storage;
|
||||||
|
use Spatie\YamlFrontMatter\YamlFrontMatter;
|
||||||
use Symfony\Component\Yaml\Yaml;
|
use Symfony\Component\Yaml\Yaml;
|
||||||
|
|
||||||
class Stoic
|
class Stoic
|
||||||
@@ -29,6 +30,42 @@ public static function presets(): array
|
|||||||
return static::$presets;
|
return static::$presets;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Stoic's default locale (first in i18n.locales), or null when i18n is off.
|
||||||
|
// Its content folder holds every field; other locales only translatable ones.
|
||||||
|
public static function defaultLocale(): ?string
|
||||||
|
{
|
||||||
|
static::loadConfig();
|
||||||
|
return static::$config["i18n"]["locales"][0]["code"] ?? null;
|
||||||
|
}
|
||||||
|
|
||||||
|
// The current locale's translated fields for a content file (path relative
|
||||||
|
// to a locale folder, e.g. "pages/home.md"), with the markdown body as
|
||||||
|
// `content`. Empty when the current locale is the default one (or i18n is
|
||||||
|
// off), the file doesn't exist, or a field is left blank — so layering this
|
||||||
|
// over the default-locale values falls back to them field by field.
|
||||||
|
public static function localeOverrides(string $file): array
|
||||||
|
{
|
||||||
|
$default = static::defaultLocale();
|
||||||
|
$locale = app()->getLocale();
|
||||||
|
|
||||||
|
if ($default === null || $locale === $default) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
|
$path = resource_path("stoic/content/{$locale}/{$file}");
|
||||||
|
|
||||||
|
if (!is_file($path)) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
|
$document = YamlFrontMatter::parse(file_get_contents($path));
|
||||||
|
|
||||||
|
return array_filter(
|
||||||
|
[...$document->matter(), "content" => trim($document->body())],
|
||||||
|
fn($value) => filled($value),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
// Returns the public URL for a stoic image at a given preset.
|
// Returns the public URL for a stoic image at a given preset.
|
||||||
public static function image(string $filename, string $preset): string
|
public static function image(string $filename, string $preset): string
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -0,0 +1,96 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Services;
|
||||||
|
|
||||||
|
use Spatie\YamlFrontMatter\YamlFrontMatter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Site-wide, marketing-editable settings from Stoic's `settings` singleton
|
||||||
|
* (resources/stoic/content/{locale}/settings.md). Read directly rather than
|
||||||
|
* through a Paper model: Paper models map to a folder of entries, and this is
|
||||||
|
* one file per locale. Legal and transactional details (address, ΑΦΜ, phone)
|
||||||
|
* live in boboko-core's StoreDetails instead.
|
||||||
|
*
|
||||||
|
* Stoic writes every field to the default locale's file and only the
|
||||||
|
* translatable ones (e.g. meta_description) to the others, so the current
|
||||||
|
* locale's file is layered over the default one; empty values fall through.
|
||||||
|
*
|
||||||
|
* Bound as scoped in AppServiceProvider, so files are parsed at most once per
|
||||||
|
* locale per request (or queued job) and edits in Stoic show up on the next one.
|
||||||
|
* The locale is read per call, not at construction, so a mail rendered with
|
||||||
|
* ->locale() still gets its own locale's values.
|
||||||
|
*/
|
||||||
|
class StoicSettings
|
||||||
|
{
|
||||||
|
private const SOCIALS = [
|
||||||
|
'facebook' => 'Facebook',
|
||||||
|
'instagram' => 'Instagram',
|
||||||
|
'tiktok' => 'TikTok',
|
||||||
|
];
|
||||||
|
|
||||||
|
/** @var array<string, array<string, mixed>> keyed by locale */
|
||||||
|
private array $data = [];
|
||||||
|
|
||||||
|
public function get(string $key, mixed $default = null): mixed
|
||||||
|
{
|
||||||
|
$value = $this->data()[$key] ?? null;
|
||||||
|
|
||||||
|
return filled($value) ? $value : $default;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Absolute og:image URL for a Stoic image field value (the page's own, else
|
||||||
|
* the default from settings.md), or null. Image fields store a
|
||||||
|
* comma-separated list; only the first is used.
|
||||||
|
*/
|
||||||
|
public function ogImageUrl(?string $pageImage = null): ?string
|
||||||
|
{
|
||||||
|
$filename = trim(explode(',', $pageImage ?: (string) $this->get('og_image', ''))[0]);
|
||||||
|
|
||||||
|
return $filename === '' ? null : url(Stoic::image($filename, 'large'));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Only the networks that have a URL set, in display order.
|
||||||
|
*
|
||||||
|
* @return list<array{icon: string, label: string, url: string}>
|
||||||
|
*/
|
||||||
|
public function socialLinks(): array
|
||||||
|
{
|
||||||
|
$links = [];
|
||||||
|
|
||||||
|
foreach (self::SOCIALS as $icon => $label) {
|
||||||
|
if ($url = $this->get("{$icon}_url")) {
|
||||||
|
$links[] = ['icon' => $icon, 'label' => $label, 'url' => $url];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $links;
|
||||||
|
}
|
||||||
|
|
||||||
|
private function data(): array
|
||||||
|
{
|
||||||
|
$locale = app()->getLocale();
|
||||||
|
|
||||||
|
return $this->data[$locale] ??= $this->load();
|
||||||
|
}
|
||||||
|
|
||||||
|
private function load(): array
|
||||||
|
{
|
||||||
|
$default = Stoic::defaultLocale();
|
||||||
|
|
||||||
|
if ($default === null) {
|
||||||
|
return $this->parse(resource_path('stoic/content/settings.md'));
|
||||||
|
}
|
||||||
|
|
||||||
|
return array_merge(
|
||||||
|
$this->parse(resource_path("stoic/content/{$default}/settings.md")),
|
||||||
|
Stoic::localeOverrides('settings.md'),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
private function parse(string $path): array
|
||||||
|
{
|
||||||
|
return is_file($path) ? YamlFrontMatter::parse(file_get_contents($path))->matter() : [];
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,74 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Support;
|
||||||
|
|
||||||
|
use Illuminate\Support\HtmlString;
|
||||||
|
use Normalizer;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Underlines the words of a product name that a search query matched, for
|
||||||
|
* the live search dropdown: every word starting with one of the query's
|
||||||
|
* words ("click" → "Edamame _Clicker_"), ignoring case and accents the way
|
||||||
|
* Meilisearch does ("παπ" → "_Παπάκι_"). Typo matches aren't marked — the
|
||||||
|
* name is shown as is.
|
||||||
|
*/
|
||||||
|
final class SearchHighlight
|
||||||
|
{
|
||||||
|
public static function name(string $name, string $query, string $class = 'underline underline-offset-4'): HtmlString
|
||||||
|
{
|
||||||
|
$terms = array_values(array_filter(preg_split('/[^\p{L}\p{N}]+/u', self::fold($query)) ?: []));
|
||||||
|
$chars = mb_str_split($name);
|
||||||
|
|
||||||
|
if ($terms === [] || $chars === []) {
|
||||||
|
return new HtmlString(e($name));
|
||||||
|
}
|
||||||
|
|
||||||
|
// One folded character per original one, so positions line up.
|
||||||
|
$folded = array_map(self::fold(...), $chars);
|
||||||
|
$html = '';
|
||||||
|
$i = 0;
|
||||||
|
$count = count($chars);
|
||||||
|
|
||||||
|
while ($i < $count) {
|
||||||
|
if (! self::isWordChar($chars[$i])) {
|
||||||
|
$html .= e($chars[$i++]);
|
||||||
|
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
$end = $i;
|
||||||
|
while ($end < $count && self::isWordChar($chars[$end])) {
|
||||||
|
$end++;
|
||||||
|
}
|
||||||
|
|
||||||
|
$word = implode('', array_slice($chars, $i, $end - $i));
|
||||||
|
$foldedWord = implode('', array_slice($folded, $i, $end - $i));
|
||||||
|
$matched = collect($terms)->contains(fn (string $term) => str_starts_with($foldedWord, $term));
|
||||||
|
|
||||||
|
$html .= $matched ? '<span class="'.e($class).'">'.e($word).'</span>' : e($word);
|
||||||
|
$i = $end;
|
||||||
|
}
|
||||||
|
|
||||||
|
return new HtmlString($html);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Lower case, without accents; Greek final sigma as σ.
|
||||||
|
*/
|
||||||
|
private static function fold(string $text): string
|
||||||
|
{
|
||||||
|
if (class_exists(Normalizer::class)) {
|
||||||
|
$text = preg_replace('/\p{Mn}+/u', '', Normalizer::normalize($text, Normalizer::FORM_D) ?: $text);
|
||||||
|
}
|
||||||
|
|
||||||
|
return strtr(mb_strtolower($text), [
|
||||||
|
'ά' => 'α', 'έ' => 'ε', 'ή' => 'η', 'ί' => 'ι', 'ό' => 'ο', 'ύ' => 'υ', 'ώ' => 'ω',
|
||||||
|
'ϊ' => 'ι', 'ϋ' => 'υ', 'ΐ' => 'ι', 'ΰ' => 'υ', 'ς' => 'σ',
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static function isWordChar(string $char): bool
|
||||||
|
{
|
||||||
|
return (bool) preg_match('/[\p{L}\p{N}]/u', $char);
|
||||||
|
}
|
||||||
|
}
|
||||||
Executable
+146
@@ -0,0 +1,146 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Switch how this app consumes boboko-core, then restart the dev stack so the
|
||||||
|
# entrypoints re-resolve it.
|
||||||
|
#
|
||||||
|
# bin/core-mode local ../boboko-core checkout (Composer path repo + npm file:)
|
||||||
|
# bin/core-mode repo tagged releases from the forge (Composer VCS repo + npm git+semver)
|
||||||
|
# bin/core-mode print the current mode
|
||||||
|
#
|
||||||
|
# Running it for the mode you're already in skips the file edits but still
|
||||||
|
# restarts the stack — that's how repo mode picks up a newly pushed tag.
|
||||||
|
#
|
||||||
|
# The toggle lives in composer.json ("repositories" <-> "_repositories") and
|
||||||
|
# package.json (@boboko/core in "dependencies" <-> "_dependencies"). The dev
|
||||||
|
# entrypoints run `composer update boboko/*` and `npm update @boboko/core` on
|
||||||
|
# every boot, which rewrites composer.lock / package-lock.json for the mode.
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
cd "$(dirname "$0")/.."
|
||||||
|
|
||||||
|
fail() { echo "!!! $*" >&2; exit 1; }
|
||||||
|
|
||||||
|
# Escape a string for use as a sed regex / replacement with "|" as delimiter.
|
||||||
|
sed_pattern() { printf '%s' "$1" | sed 's/[][\.*^$|]/\\&/g'; }
|
||||||
|
sed_replacement() { printf '%s' "$1" | sed 's/[\&|]/\\&/g'; }
|
||||||
|
|
||||||
|
current_mode() {
|
||||||
|
local composer_type npm_dep composer_mode npm_mode
|
||||||
|
# The live block is "repositories" — the leading quote keeps "_repositories" out.
|
||||||
|
composer_type=$(sed -n '/"repositories": \[/,/"type"/p' composer.json | grep -o '"type": "[a-z]*"' | head -1)
|
||||||
|
npm_dep=$(sed -n '/"dependencies": {/,/}/p' package.json | grep -o '"@boboko/core": "[^"]*"' | head -1)
|
||||||
|
|
||||||
|
case "$composer_type" in
|
||||||
|
*'"path"') composer_mode=local ;;
|
||||||
|
*'"vcs"') composer_mode=repo ;;
|
||||||
|
*) fail "Can't tell the mode from composer.json's \"repositories\" block." ;;
|
||||||
|
esac
|
||||||
|
case "$npm_dep" in
|
||||||
|
*'"file:'*) npm_mode=local ;;
|
||||||
|
*'"git+'*) npm_mode=repo ;;
|
||||||
|
*) fail "Can't tell the mode from package.json's @boboko/core dependency." ;;
|
||||||
|
esac
|
||||||
|
[ "$composer_mode" = "$npm_mode" ] ||
|
||||||
|
fail "composer.json ($composer_mode) and package.json ($npm_mode) disagree — fix by hand first."
|
||||||
|
|
||||||
|
echo "$composer_mode"
|
||||||
|
}
|
||||||
|
|
||||||
|
swap_files() {
|
||||||
|
# composer.json: swap the key names, values stay where they are.
|
||||||
|
sed -i \
|
||||||
|
-e 's/"_repositories":/"__core_mode_swap__":/' \
|
||||||
|
-e 's/"repositories":/"_repositories":/' \
|
||||||
|
-e 's/"__core_mode_swap__":/"repositories":/' \
|
||||||
|
composer.json
|
||||||
|
|
||||||
|
# package.json: swap the two @boboko/core values (live and parked).
|
||||||
|
local a b
|
||||||
|
a=$(grep -o '"@boboko/core": "[^"]*"' package.json | sed -n 1p)
|
||||||
|
b=$(grep -o '"@boboko/core": "[^"]*"' package.json | sed -n 2p)
|
||||||
|
[ -n "$a" ] && [ -n "$b" ] || fail "Expected two @boboko/core entries in package.json."
|
||||||
|
sed -i \
|
||||||
|
-e "s|$(sed_pattern "$a")|__core_mode_swap__|" \
|
||||||
|
-e "s|$(sed_pattern "$b")|$(sed_replacement "$a")|" \
|
||||||
|
-e "s|__core_mode_swap__|$(sed_replacement "$b")|" \
|
||||||
|
package.json
|
||||||
|
}
|
||||||
|
|
||||||
|
wrapper_for() {
|
||||||
|
if [ "$1" = local ]; then echo bin/dc-core.sh; else echo bin/dc; fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# The app healthcheck (php-fpm -t) passes before the entrypoint finishes, so
|
||||||
|
# wait on the entrypoints' own log lines instead: the app's composer block is
|
||||||
|
# done once it clears caches, the vite container's npm block once Vite is up.
|
||||||
|
wait_for_log() {
|
||||||
|
local dc=$1 service=$2 pattern=$3 label=$4 waited=0
|
||||||
|
printf '>>> Waiting for %s' "$label"
|
||||||
|
until $dc logs --no-color "$service" 2>&1 | grep -q "$pattern"; do
|
||||||
|
if [ -z "$($dc ps -q --status running "$service")" ]; then
|
||||||
|
echo
|
||||||
|
$dc logs --no-color --tail 40 "$service"
|
||||||
|
fail "$service stopped before finishing (logs above)."
|
||||||
|
fi
|
||||||
|
if [ "$waited" -ge 600 ]; then
|
||||||
|
echo
|
||||||
|
$dc logs --no-color --tail 40 "$service"
|
||||||
|
fail "Timed out after 600s waiting for $service (logs above)."
|
||||||
|
fi
|
||||||
|
printf '.'
|
||||||
|
sleep 3
|
||||||
|
waited=$((waited + 3))
|
||||||
|
done
|
||||||
|
echo " done"
|
||||||
|
}
|
||||||
|
|
||||||
|
mode=$(current_mode)
|
||||||
|
|
||||||
|
if [ $# -eq 0 ]; then
|
||||||
|
echo "$mode"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
target=$1
|
||||||
|
[ "$target" = local ] || [ "$target" = repo ] || fail "Usage: bin/core-mode [local|repo]"
|
||||||
|
if [ "$target" = local ] && [ ! -d ../boboko-core ]; then
|
||||||
|
fail "../boboko-core not found — local mode needs the core checkout next to this repo."
|
||||||
|
fi
|
||||||
|
|
||||||
|
old_dc=$(wrapper_for "$mode")
|
||||||
|
new_dc=$(wrapper_for "$target")
|
||||||
|
|
||||||
|
echo ">>> Stopping stack ($mode mode)..."
|
||||||
|
$old_dc down
|
||||||
|
|
||||||
|
if [ "$mode" != "$target" ]; then
|
||||||
|
echo ">>> Switching composer.json / package.json: $mode -> $target"
|
||||||
|
swap_files
|
||||||
|
[ "$(current_mode)" = "$target" ] || fail "Switch didn't take — check composer.json / package.json."
|
||||||
|
else
|
||||||
|
echo ">>> Already in $target mode, restarting to re-resolve boboko-core"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# The entrypoints run `composer install` / `npm install` from the lockfiles
|
||||||
|
# BEFORE re-resolving core. Local-mode lockfiles point at ../boboko-core,
|
||||||
|
# which isn't mounted in repo mode, so the install fails. The committed
|
||||||
|
# lockfiles are always repo mode — restore those and let the entrypoints bump
|
||||||
|
# them to the newest tag.
|
||||||
|
if [ "$target" = repo ]; then
|
||||||
|
if grep -A14 '"name": "boboko/core"' composer.lock | grep -q '"type": "path"' ||
|
||||||
|
grep -A6 '"node_modules/@boboko/core": {' package-lock.json | grep -q '"link": true'; then
|
||||||
|
echo ">>> Lockfiles still point at ../boboko-core — restoring the committed ones"
|
||||||
|
git checkout HEAD -- composer.lock package-lock.json
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo ">>> Starting stack ($target mode)..."
|
||||||
|
if ! $new_dc up -d; then
|
||||||
|
$new_dc logs --no-color --tail 40 app
|
||||||
|
fail "Stack failed to start (app logs above)."
|
||||||
|
fi
|
||||||
|
|
||||||
|
wait_for_log "$new_dc" app '\[entrypoint\] Caches cleared' "composer to re-resolve boboko/core"
|
||||||
|
wait_for_log "$new_dc" vite 'ready in' "npm to re-resolve @boboko/core"
|
||||||
|
|
||||||
|
version=$(grep -A1 '"name": "boboko/core"' composer.lock | grep -o '"version": "[^"]*"' | cut -d'"' -f4)
|
||||||
|
echo ">>> Now in $target mode — boboko/core $version"
|
||||||
Executable
+120
@@ -0,0 +1,120 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Deploy this app to production with the latest boboko-core tag.
|
||||||
|
#
|
||||||
|
# 1. Refuses to run with uncommitted work (the server deploys what's pushed,
|
||||||
|
# nothing else) — only the core wiring files are allowed to be dirty.
|
||||||
|
# 2. Pulls translation lines added in the Language Lines UI into core's
|
||||||
|
# seeders (boboko:translations:pull) — in local mode; if any are pulled,
|
||||||
|
# stops so you can release core first. In repo mode it only checks.
|
||||||
|
# 3. Switches to repo mode if you're on the local ../boboko-core checkout,
|
||||||
|
# and restarts the stack either way so the lockfiles pick up the newest
|
||||||
|
# tag (bin/core-mode repo).
|
||||||
|
# 4. Commits the lockfile bump, if any, asks for confirmation, pushes.
|
||||||
|
# 5. Runs `envoy run deploy` (see Envoy.blade.php) against .env.envoy's host.
|
||||||
|
#
|
||||||
|
# Leaves you in repo mode — run `bin/core-mode local` to go back.
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
cd "$(dirname "$0")/.."
|
||||||
|
|
||||||
|
fail() { echo "!!! $*" >&2; exit 1; }
|
||||||
|
|
||||||
|
[ -f .env.envoy ] || fail ".env.envoy not found — copy .env.envoy.example and fill it in."
|
||||||
|
branch=$(grep -m1 '^DEPLOY_BRANCH=' .env.envoy | cut -d= -f2-)
|
||||||
|
host=$(grep -m1 '^DEPLOY_SSH_HOST=' .env.envoy | cut -d= -f2-)
|
||||||
|
branch=${branch:-master}
|
||||||
|
|
||||||
|
[ "$(git branch --show-current)" = "$branch" ] || fail "You're not on $branch (the branch Envoy deploys)."
|
||||||
|
|
||||||
|
# Anything tracked and modified other than the four core wiring files would be
|
||||||
|
# silently left out of the deploy — make that a hard stop instead.
|
||||||
|
dirty=$(git status --porcelain --untracked-files=no |
|
||||||
|
grep -vE '^.. (composer\.json|composer\.lock|package\.json|package-lock\.json)$' || true)
|
||||||
|
if [ -n "$dirty" ]; then
|
||||||
|
echo "$dirty"
|
||||||
|
fail "Commit or stash these first — the server only deploys what's pushed."
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo ">>> Fetching origin..."
|
||||||
|
git fetch origin "$branch"
|
||||||
|
[ "$(git rev-list --count "HEAD..origin/$branch")" -eq 0 ] || fail "origin/$branch has commits you don't — pull first."
|
||||||
|
|
||||||
|
# Translation lines added through the Language Lines UI only reach other apps
|
||||||
|
# once they're in core's seeders. In local mode, pull them into
|
||||||
|
# ../boboko-core; in repo mode the command can only report them.
|
||||||
|
lines_in() { printf '%s\n' "$1" | sed -n 's/^\([0-9][0-9]*\) line(s).*/\1/p' | tail -1; }
|
||||||
|
|
||||||
|
if [ "$(bin/core-mode)" = local ]; then
|
||||||
|
echo ">>> Pulling UI-added translations into ../boboko-core's seeders..."
|
||||||
|
out=$(bin/dc-core.sh exec -T app php artisan boboko:translations:pull --no-ansi) ||
|
||||||
|
fail "boboko:translations:pull failed — is the stack running (bin/dc-core.sh up -d)?"
|
||||||
|
echo "$out"
|
||||||
|
pulled=$(lines_in "$out")
|
||||||
|
if [ "${pulled:-0}" -gt 0 ]; then
|
||||||
|
fail "Pulled $pulled translation line(s) into ../boboko-core. Review, commit, tag and push core, then rerun bin/deploy."
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo ">>> Checking for UI-added translations missing from core's seeders..."
|
||||||
|
if out=$(bin/dc exec -T app php artisan boboko:translations:pull --dry-run --no-ansi 2>&1); then
|
||||||
|
missing=$(lines_in "$out")
|
||||||
|
if [ "${missing:-0}" -gt 0 ]; then
|
||||||
|
echo "$out"
|
||||||
|
fail "These lines are only in this database — run bin/core-mode local and rerun bin/deploy to pull them into core."
|
||||||
|
fi
|
||||||
|
echo " nothing missing"
|
||||||
|
else
|
||||||
|
echo " skipped — the installed boboko/core doesn't have boboko:translations:pull yet"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Switch to repo mode (or just restart if already there) so both lockfiles
|
||||||
|
# resolve the newest boboko-core tag.
|
||||||
|
bin/core-mode repo
|
||||||
|
|
||||||
|
git diff --quiet HEAD -- composer.json package.json ||
|
||||||
|
fail "composer.json / package.json differ from HEAD in repo mode — they should only differ by the local/repo toggle."
|
||||||
|
if grep -A14 '"name": "boboko/core"' composer.lock | grep -q '"type": "path"'; then
|
||||||
|
fail "composer.lock still points boboko/core at the local path repo."
|
||||||
|
fi
|
||||||
|
if grep -A6 '"node_modules/@boboko/core": {' package-lock.json | grep -q '"link": true'; then
|
||||||
|
fail "package-lock.json still links @boboko/core to the local checkout."
|
||||||
|
fi
|
||||||
|
|
||||||
|
version=$(grep -A1 '"name": "boboko/core"' composer.lock | grep -o '"version": "[^"]*"' | cut -d'"' -f4)
|
||||||
|
|
||||||
|
# A tag you created in ../boboko-core but never pushed won't be resolved.
|
||||||
|
if [ -d ../boboko-core ]; then
|
||||||
|
latest=$(git -C ../boboko-core tag --sort=-v:refname | head -1)
|
||||||
|
if [ -n "$latest" ] && [ "$latest" != "v$version" ]; then
|
||||||
|
echo "!!! Warning: resolved boboko/core $version, but ../boboko-core's newest tag is $latest."
|
||||||
|
echo "!!! Did you push it? (git -C ../boboko-core push origin $latest)"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! git diff --quiet HEAD -- composer.lock package-lock.json; then
|
||||||
|
echo ">>> Committing lockfiles for boboko/core $version..."
|
||||||
|
git add composer.lock package-lock.json
|
||||||
|
git commit -m "Chore: Bumping boboko/core to $version"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo ">>> Deploying $branch to $host with boboko/core $version."
|
||||||
|
pending=$(git log --oneline "origin/$branch..HEAD")
|
||||||
|
if [ -n "$pending" ]; then
|
||||||
|
echo ">>> Commits to push:"
|
||||||
|
echo "$pending"
|
||||||
|
else
|
||||||
|
echo ">>> Nothing new to push — this redeploys origin/$branch as-is."
|
||||||
|
fi
|
||||||
|
echo
|
||||||
|
read -r -p "Push and deploy? [y/N] " answer
|
||||||
|
[ "$answer" = y ] || [ "$answer" = Y ] || fail "Aborted."
|
||||||
|
|
||||||
|
if [ -n "$pending" ]; then
|
||||||
|
git push origin "$branch"
|
||||||
|
fi
|
||||||
|
|
||||||
|
vendor/bin/envoy run deploy
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo ">>> Done. You're in repo mode — run bin/core-mode local to go back to your ../boboko-core checkout."
|
||||||
+25
-4
@@ -6,11 +6,23 @@
|
|||||||
|
|
||||||
return Application::configure(basePath: dirname(__DIR__))
|
return Application::configure(basePath: dirname(__DIR__))
|
||||||
->withRouting(
|
->withRouting(
|
||||||
web: __DIR__.'/../routes/web.php',
|
web: __DIR__ . '/../routes/web.php',
|
||||||
commands: __DIR__.'/../routes/console.php',
|
commands: __DIR__ . '/../routes/console.php',
|
||||||
health: '/up',
|
health: '/up',
|
||||||
)
|
)
|
||||||
->withMiddleware(function (Middleware $middleware): void {
|
->withMiddleware(function (Middleware $middleware): void {
|
||||||
|
// nginx (docker/nginx/prod.conf) only listens on plain HTTP:80.
|
||||||
|
// Without trusting that layer's X-Forwarded-Proto header, Laravel sees every
|
||||||
|
// request as http://, so url()/signed-route generation and
|
||||||
|
// verification (URL::hasValidSignature()) both use the wrong
|
||||||
|
// scheme — breaks any signed URL whose recipient hits it over
|
||||||
|
// https (e.g. Modules\Core\Shipping\Http\Controllers\
|
||||||
|
// DownloadShipmentLabelController's label links) with a 401.
|
||||||
|
// '*' trusts whatever's immediately upstream, since that's
|
||||||
|
// container-to-container inside the same deploy, not arbitrary
|
||||||
|
// public traffic.
|
||||||
|
$middleware->trustProxies(at: '*');
|
||||||
|
|
||||||
// Laravel's priority list would otherwise run `auth` before core's
|
// Laravel's priority list would otherwise run `auth` before core's
|
||||||
// `locale` middleware, so the redirects below would build URLs before
|
// `locale` middleware, so the redirects below would build URLs before
|
||||||
// URL::defaults(['locale' => …]) is set, throwing a missing-parameter error.
|
// URL::defaults(['locale' => …]) is set, throwing a missing-parameter error.
|
||||||
@@ -21,8 +33,17 @@
|
|||||||
|
|
||||||
// Both resolve inside the {locale} group, after the `locale` middleware
|
// Both resolve inside the {locale} group, after the `locale` middleware
|
||||||
// has set URL::defaults(['locale' => …]), so route() needs no locale arg.
|
// has set URL::defaults(['locale' => …]), so route() needs no locale arg.
|
||||||
$middleware->redirectGuestsTo(fn () => route('login'));
|
$middleware->redirectGuestsTo(fn() => route('login'));
|
||||||
$middleware->redirectUsersTo(fn () => route('home'));
|
$middleware->redirectUsersTo(fn() => route('home'));
|
||||||
|
|
||||||
|
// Core's session registry (Modules\Core\Auth\Services\
|
||||||
|
// UserSessionService) is enforcement-optional by design — see
|
||||||
|
// EnsureSessionNotRevoked's own docblock — and this app never
|
||||||
|
// wired it in. Without this, revokeAllSessions() only flips a DB
|
||||||
|
// flag that nothing checks per-request: a leaked/stolen session
|
||||||
|
// cookie keeps working even after being "revoked". Appended to
|
||||||
|
// `web` (runs after `auth` resolves the user, which it needs).
|
||||||
|
$middleware->appendToGroup('web', \Modules\Core\Auth\Http\Middleware\EnsureSessionNotRevoked::class);
|
||||||
})
|
})
|
||||||
->withExceptions(function (Exceptions $exceptions): void {
|
->withExceptions(function (Exceptions $exceptions): void {
|
||||||
//
|
//
|
||||||
|
|||||||
+4
-4
@@ -12,9 +12,6 @@
|
|||||||
"artesaos/seotools": "^1.4",
|
"artesaos/seotools": "^1.4",
|
||||||
"boboko/core": "0.*",
|
"boboko/core": "0.*",
|
||||||
"jacobjoergensen/laravel-paper": "^1.12",
|
"jacobjoergensen/laravel-paper": "^1.12",
|
||||||
"open-telemetry/exporter-otlp": "^1.4",
|
|
||||||
"open-telemetry/opentelemetry-auto-laravel": "^1.7",
|
|
||||||
"open-telemetry/sdk": "^1.14",
|
|
||||||
"php-http/guzzle7-adapter": "^1.1",
|
"php-http/guzzle7-adapter": "^1.1",
|
||||||
"spatie/laravel-sitemap": "^8.1",
|
"spatie/laravel-sitemap": "^8.1",
|
||||||
"spatie/laravel-webhook-server": "^3.10",
|
"spatie/laravel-webhook-server": "^3.10",
|
||||||
@@ -100,5 +97,8 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"minimum-stability": "stable",
|
"minimum-stability": "stable",
|
||||||
"prefer-stable": true
|
"prefer-stable": true,
|
||||||
|
"require-dev": {
|
||||||
|
"laravel/envoy": "^2.12"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Generated
+766
-1049
File diff suppressed because it is too large.
Load diff
@@ -74,7 +74,7 @@
|
|||||||
// ones that already worked, like collection_ids), not just the
|
// ones that already worked, like collection_ids), not just the
|
||||||
// new order_count one. Caught in practice, reverted.
|
// new order_count one. Caught in practice, reverted.
|
||||||
Lunar\Models\Product::class => Modules\Core\Catalog\Services\ProductIndexer::class,
|
Lunar\Models\Product::class => Modules\Core\Catalog\Services\ProductIndexer::class,
|
||||||
Lunar\Models\ProductOption::class => Lunar\Search\ProductOptionIndexer::class,
|
Lunar\Models\ProductOption::class => Lunar\Search\ProductOptionIndexer::class
|
||||||
],
|
],
|
||||||
|
|
||||||
];
|
];
|
||||||
@@ -35,11 +35,6 @@
|
|||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
|
||||||
// Where contact-form messages are sent (ContactController).
|
|
||||||
'contact' => [
|
|
||||||
'email' => env('CONTACT_EMAIL'),
|
|
||||||
],
|
|
||||||
|
|
||||||
// Bot check on guest forms (login, contact), verified by App\Rules\HCaptcha. For
|
// Bot check on guest forms (login, contact), verified by App\Rules\HCaptcha. For
|
||||||
// local dev use hCaptcha's test keys, the real ones reject localhost:
|
// local dev use hCaptcha's test keys, the real ones reject localhost:
|
||||||
// sitekey 10000000-ffff-ffff-ffff-000000000001,
|
// sitekey 10000000-ffff-ffff-ffff-000000000001,
|
||||||
|
|||||||
@@ -1,115 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace Database\Seeders;
|
|
||||||
|
|
||||||
use Illuminate\Database\Seeder;
|
|
||||||
use Modules\Core\Localization\Services\TranslationService;
|
|
||||||
use Spatie\TranslationLoader\LanguageLine;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Default `validation` translation lines — Laravel's own error-message group
|
|
||||||
* (`validation.required`, `validation.email`, `validation.attributes.*`, …),
|
|
||||||
* resolved by every `Validator::make()`/`$request->validate()` call in the app
|
|
||||||
* (see CheckoutController::saveAddress(), CartController, ProductController),
|
|
||||||
* not just the checkout module.
|
|
||||||
*
|
|
||||||
* Spatie's DB loader (spatie/laravel-translation-loader, wired in boboko-core's
|
|
||||||
* LocalizationServiceProvider) merges this group over Laravel's file-based
|
|
||||||
* validation.php, which the project doesn't ship a `lang/` copy of — so without
|
|
||||||
* this, Greek requests fall back to Laravel's untranslated English defaults.
|
|
||||||
* Only the rule keys and field attributes actually in use are seeded; add more
|
|
||||||
* as new rules/fields show up.
|
|
||||||
*
|
|
||||||
* Additive and idempotent: a key that already exists is left untouched, so
|
|
||||||
* anything edited in the Filament Language Lines UI wins on a re-run. Runs
|
|
||||||
* explicitly — `php artisan db:seed --class=ValidationTranslationsSeeder` — it
|
|
||||||
* is not wired into DatabaseSeeder.
|
|
||||||
*
|
|
||||||
* Greek copy uses the project's informal register (εσύ/σου).
|
|
||||||
*/
|
|
||||||
class ValidationTranslationsSeeder extends Seeder
|
|
||||||
{
|
|
||||||
public function run(): void
|
|
||||||
{
|
|
||||||
$translations = app(TranslationService::class);
|
|
||||||
|
|
||||||
foreach ($this->lines() as $key => [$en, $el]) {
|
|
||||||
$exists = LanguageLine::query()
|
|
||||||
->where('group', 'validation')
|
|
||||||
->where('key', $key)
|
|
||||||
->exists();
|
|
||||||
|
|
||||||
if ($exists) {
|
|
||||||
$this->command?->warn("validation.{$key} already exists — skipped");
|
|
||||||
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
$translations->create('validation', $key, ['en' => $en, 'el' => $el]);
|
|
||||||
$this->command?->info("validation.{$key} added");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* key => [English, Greek].
|
|
||||||
*
|
|
||||||
* @return array<string, array{0: string, 1: string}>
|
|
||||||
*/
|
|
||||||
private function lines(): array
|
|
||||||
{
|
|
||||||
return [
|
|
||||||
// ── Rule messages ─────────────────────────────────────────────
|
|
||||||
'required' => ['The :attribute field is required.', 'Το πεδίο :attribute είναι υποχρεωτικό.'],
|
|
||||||
'email' => ['The :attribute field must be a valid email address.', 'Το πεδίο :attribute πρέπει να είναι έγκυρη διεύθυνση email.'],
|
|
||||||
'string' => ['The :attribute field must be a string.', 'Το πεδίο :attribute πρέπει να είναι κείμενο.'],
|
|
||||||
'integer' => ['The :attribute field must be an integer.', 'Το πεδίο :attribute πρέπει να είναι ακέραιος αριθμός.'],
|
|
||||||
'boolean' => ['The :attribute field must be true or false.', 'Το πεδίο :attribute πρέπει να είναι true ή false.'],
|
|
||||||
'min.numeric' => ['The :attribute field must be at least :min.', 'Το πεδίο :attribute πρέπει να είναι τουλάχιστον :min.'],
|
|
||||||
'max.string' => ['The :attribute field must not be greater than :max characters.', 'Το πεδίο :attribute δεν πρέπει να ξεπερνά τους :max χαρακτήρες.'],
|
|
||||||
'between.numeric' => ['The :attribute field must be between :min and :max.', 'Το πεδίο :attribute πρέπει να είναι μεταξύ :min και :max.'],
|
|
||||||
'exists' => ['The selected :attribute is invalid.', 'Η επιλεγμένη τιμή για το πεδίο :attribute δεν είναι έγκυρη.'],
|
|
||||||
// Product custom-field photo uploads (CustomFieldUploadController, CartController).
|
|
||||||
'file' => ['The :attribute field must be a file.', 'Το πεδίο :attribute πρέπει να είναι αρχείο.'],
|
|
||||||
'mimes' => ['The :attribute field must be a file of type: :values.', 'Το πεδίο :attribute πρέπει να είναι αρχείο τύπου: :values.'],
|
|
||||||
'max.file' => ['The :attribute field must not be greater than :max kilobytes.', 'Το αρχείο στο πεδίο :attribute δεν πρέπει να ξεπερνά τα :max kilobytes.'],
|
|
||||||
'uploaded' => ['The :attribute failed to upload.', 'Η μεταφόρτωση στο πεδίο :attribute απέτυχε.'],
|
|
||||||
|
|
||||||
// ── Field names (checkout: billing/shipping address) ──────────
|
|
||||||
'attributes.contact_email' => ['email', 'email'],
|
|
||||||
'attributes.billing_first_name' => ['first name', 'όνομα'],
|
|
||||||
'attributes.billing_last_name' => ['last name', 'επώνυμο'],
|
|
||||||
'attributes.billing_company_name' => ['company name', 'επωνυμία εταιρείας'],
|
|
||||||
'attributes.billing_tax_identifier' => ['tax ID', 'ΑΦΜ'],
|
|
||||||
'attributes.billing_line_one' => ['address', 'διεύθυνση'],
|
|
||||||
'attributes.billing_line_two' => ['address line 2', 'διεύθυνση (γραμμή 2)'],
|
|
||||||
'attributes.billing_city' => ['city', 'πόλη'],
|
|
||||||
'attributes.billing_state' => ['region', 'νομό / περιοχή'],
|
|
||||||
'attributes.billing_postcode' => ['postcode', 'ταχυδρομικό κώδικα'],
|
|
||||||
'attributes.billing_country_id' => ['country', 'χώρα'],
|
|
||||||
'attributes.billing_contact_phone' => ['phone', 'τηλέφωνο'],
|
|
||||||
'attributes.shipping_first_name' => ['first name', 'όνομα'],
|
|
||||||
'attributes.shipping_last_name' => ['last name', 'επώνυμο'],
|
|
||||||
'attributes.shipping_company_name' => ['company name', 'επωνυμία εταιρείας'],
|
|
||||||
'attributes.shipping_line_one' => ['address', 'διεύθυνση'],
|
|
||||||
'attributes.shipping_line_two' => ['address line 2', 'διεύθυνση (γραμμή 2)'],
|
|
||||||
'attributes.shipping_city' => ['city', 'πόλη'],
|
|
||||||
'attributes.shipping_state' => ['region', 'νομό / περιοχή'],
|
|
||||||
'attributes.shipping_postcode' => ['postcode', 'ταχυδρομικό κώδικα'],
|
|
||||||
'attributes.shipping_country_id' => ['country', 'χώρα'],
|
|
||||||
'attributes.shipping_contact_phone' => ['phone', 'τηλέφωνο'],
|
|
||||||
'attributes.shipping_delivery_instructions' => ['delivery notes', 'σχόλια για την παράδοση'],
|
|
||||||
|
|
||||||
// ── Field names (cart) ─────────────────────────────────────────
|
|
||||||
'attributes.purchasable_id' => ['product', 'προϊόν'],
|
|
||||||
'attributes.quantity' => ['quantity', 'ποσότητα'],
|
|
||||||
'attributes.code' => ['coupon code', 'κωδικό κουπονιού'],
|
|
||||||
|
|
||||||
// ── Field names (product reviews / stock check) ────────────────
|
|
||||||
'attributes.variant' => ['variant', 'παραλλαγή'],
|
|
||||||
'attributes.rating' => ['rating', 'βαθμολογία'],
|
|
||||||
'attributes.content' => ['review text', 'κείμενο κριτικής'],
|
|
||||||
'attributes.name' => ['name', 'όνομα'],
|
|
||||||
'attributes.email' => ['email', 'email'],
|
|
||||||
];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
+28
-8
@@ -47,6 +47,7 @@ services:
|
|||||||
|
|
||||||
queue:
|
queue:
|
||||||
image: ${COMPOSE_PROJECT_NAME:-boboko-starter}-app
|
image: ${COMPOSE_PROJECT_NAME:-boboko-starter}-app
|
||||||
|
entrypoint: ["/entrypoint-worker.sh"]
|
||||||
command: php artisan queue:work --tries=3 --max-jobs=500 --memory=256
|
command: php artisan queue:work --tries=3 --max-jobs=500 --memory=256
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
env_file: .env
|
env_file: .env
|
||||||
@@ -68,6 +69,7 @@ services:
|
|||||||
|
|
||||||
scheduler:
|
scheduler:
|
||||||
image: ${COMPOSE_PROJECT_NAME:-boboko-starter}-app
|
image: ${COMPOSE_PROJECT_NAME:-boboko-starter}-app
|
||||||
|
entrypoint: ["/entrypoint-worker.sh"]
|
||||||
command: php artisan schedule:work
|
command: php artisan schedule:work
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
env_file: .env
|
env_file: .env
|
||||||
@@ -129,16 +131,15 @@ services:
|
|||||||
timeout: 5s
|
timeout: 5s
|
||||||
retries: 10
|
retries: 10
|
||||||
|
|
||||||
otel-collector:
|
|
||||||
image: otel/opentelemetry-collector-contrib:latest
|
|
||||||
restart: unless-stopped
|
|
||||||
environment:
|
|
||||||
SIGNOZ_ENDPOINT: ${OTEL_EXPORTER_OTLP_ENDPOINT}
|
|
||||||
volumes:
|
|
||||||
- ./docker/otel/collector.yml:/etc/otelcol-contrib/config.yaml:ro
|
|
||||||
|
|
||||||
stoic:
|
stoic:
|
||||||
image: ghcr.io/lexx27/stoic:latest
|
image: ghcr.io/lexx27/stoic:latest
|
||||||
|
# Runs as root — the app container's entrypoint.sh chowns the whole
|
||||||
|
# storage/ tree to www-data on every boot (docker/entrypoint.sh),
|
||||||
|
# and Stoic's own image user isn't www-data or in its group, so it
|
||||||
|
# can't write thumbnails into storage/app/public/stoic/ otherwise
|
||||||
|
# (libvips reports this as "Failed to write VipsImage to file").
|
||||||
|
# Same fix already applied in docker-compose.dev.yml.
|
||||||
|
user: root
|
||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:${STOIC_PORT:-2727}:2727"
|
- "127.0.0.1:${STOIC_PORT:-2727}:2727"
|
||||||
environment:
|
environment:
|
||||||
@@ -153,6 +154,24 @@ services:
|
|||||||
- storage:/var/www/html/storage/app
|
- storage:/var/www/html/storage/app
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
||||||
|
vector:
|
||||||
|
image: timberio/vector:latest-alpine
|
||||||
|
restart: unless-stopped
|
||||||
|
environment:
|
||||||
|
APP_ENV: ${APP_ENV:-production}
|
||||||
|
VICTORIALOGS_ENDPOINT: ${VICTORIALOGS_ENDPOINT:?VICTORIALOGS_ENDPOINT is required}
|
||||||
|
VICTORIALOGS_USER: ${VICTORIALOGS_USER:?VICTORIALOGS_USER is required}
|
||||||
|
VICTORIALOGS_PASSWORD: ${VICTORIALOGS_PASSWORD:?VICTORIALOGS_PASSWORD is required}
|
||||||
|
VECTOR_DANGEROUSLY_ALLOW_ENV_VAR_INTERPOLATION: "true"
|
||||||
|
volumes:
|
||||||
|
- ./docker/vector/vector.yaml:/etc/vector/vector.yaml:ro
|
||||||
|
- logs:/var/www/html/storage/logs:ro
|
||||||
|
- vector_data:/var/lib/vector
|
||||||
|
depends_on:
|
||||||
|
app:
|
||||||
|
condition: service_healthy
|
||||||
|
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
pgdata:
|
pgdata:
|
||||||
storage:
|
storage:
|
||||||
@@ -160,3 +179,4 @@ volumes:
|
|||||||
framework:
|
framework:
|
||||||
valkeydata:
|
valkeydata:
|
||||||
meilidata:
|
meilidata:
|
||||||
|
vector_data:
|
||||||
+23
-12
@@ -41,19 +41,17 @@ echo "[entrypoint] Caches cleared"
|
|||||||
|
|
||||||
php artisan storage:link --quiet 2>/dev/null || true
|
php artisan storage:link --quiet 2>/dev/null || true
|
||||||
|
|
||||||
if [ "$APP_ENV" != "production" ]; then
|
# Dev-only for the same reason as the composer step above — production's
|
||||||
# Dev-only for the same reason as the composer step above — production's
|
# image already has these published at build time.
|
||||||
# image already has these published at build time.
|
php artisan vendor:publish --tag=core-assets --force --ansi --quiet
|
||||||
php artisan vendor:publish --tag=core-assets --force --ansi --quiet
|
php artisan vendor:publish --tag=public --force --ansi --quiet
|
||||||
php artisan vendor:publish --tag=public --force --ansi --quiet
|
php artisan filament:assets --ansi --quiet
|
||||||
php artisan filament:assets --ansi --quiet
|
|
||||||
|
|
||||||
# No --force: core-views publishes editable Blade templates (order
|
# No --force: core-views publishes editable Blade templates (order
|
||||||
# notification emails), meant to be hand-customized per app — unlike
|
# notification emails), meant to be hand-customized per app — unlike
|
||||||
# core-assets above, republishing must not silently wipe local edits.
|
# core-assets above, republishing must not silently wipe local edits.
|
||||||
# Only fills in the vendor/core views directory if it doesn't exist yet.
|
# Only fills in the vendor/core views directory if it doesn't exist yet.
|
||||||
php artisan vendor:publish --tag=core-views --ansi --quiet
|
php artisan vendor:publish --tag=core-views --ansi --quiet
|
||||||
fi
|
|
||||||
|
|
||||||
# Everything below is universal, in both dev and production: application STATE
|
# Everything below is universal, in both dev and production: application STATE
|
||||||
# that must be current on every boot, not a build-time concern composer/assets
|
# that must be current on every boot, not a build-time concern composer/assets
|
||||||
@@ -79,6 +77,19 @@ echo "[entrypoint] Touched migrated file"
|
|||||||
echo "[entrypoint] Trying Lunar install"
|
echo "[entrypoint] Trying Lunar install"
|
||||||
php artisan lunar:install --quiet || true
|
php artisan lunar:install --quiet || true
|
||||||
|
|
||||||
|
# Same idempotent per-key upsert as lunar:install's own seeding above, just kept
|
||||||
|
# as separate seeder classes rather than folded into InstallLunarCommand — these
|
||||||
|
# are Spatie translation-loader `validation`/`checkout` groups, not Lunar store
|
||||||
|
# data, and each is safe to re-run on every boot.
|
||||||
|
echo "[entrypoint] Seeding validation translations..."
|
||||||
|
php artisan db:seed --class="Modules\Core\Localization\Database\Seeders\ValidationTranslationsSeeder" --force --quiet || true
|
||||||
|
|
||||||
|
echo "[entrypoint] Seeding checkout translations..."
|
||||||
|
php artisan db:seed --class="Modules\Core\Checkout\Database\Seeders\CheckoutTranslationsSeeder" --force --quiet || true
|
||||||
|
|
||||||
|
echo "[entrypoint] Seeding storefront translations..."
|
||||||
|
php artisan db:seed --class="Modules\Core\Localization\Database\Seeders\StorefrontTranslationsSeeder" --force --quiet || true
|
||||||
|
|
||||||
# Upserts by primary key (no --refresh), so this stays cheap and idempotent on
|
# Upserts by primary key (no --refresh), so this stays cheap and idempotent on
|
||||||
# every boot rather than flushing and rebuilding the whole index each time. Runs
|
# every boot rather than flushing and rebuilding the whole index each time. Runs
|
||||||
# in production too — a deploy that changed an indexer's field list needs this
|
# in production too — a deploy that changed an indexer's field list needs this
|
||||||
|
|||||||
@@ -25,6 +25,17 @@ server {
|
|||||||
if ($request_method = POST) { set $skip_cache 1; }
|
if ($request_method = POST) { set $skip_cache 1; }
|
||||||
if ($request_uri ~* "^/(boboko|up)") { set $skip_cache 1; }
|
if ($request_uri ~* "^/(boboko|up)") { set $skip_cache 1; }
|
||||||
if ($query_string) { set $skip_cache 1; }
|
if ($query_string) { set $skip_cache 1; }
|
||||||
|
# Any logged-in request must never be served a cached response —
|
||||||
|
# the cache key is URL-only ($scheme$request_method$host$request_uri,
|
||||||
|
# see fastcgi_cache_key below), with no per-session variation. Without
|
||||||
|
# this, the first cached hit on an authenticated GET page (e.g.
|
||||||
|
# /account) gets replayed verbatim to every other visitor of that same
|
||||||
|
# URL for up to fastcgi_cache_valid's 10m window — a real account/
|
||||||
|
# session data leak, not just a staleness bug. Laravel's session
|
||||||
|
# cookie name is env('SESSION_COOKIE', Str::slug(APP_NAME).'-session')
|
||||||
|
# (config/session.php) — APP_NAME varies per environment, so this
|
||||||
|
# matches the fixed '-session' suffix rather than a hardcoded name.
|
||||||
|
if ($http_cookie ~* "-session") { set $skip_cache 1; }
|
||||||
|
|
||||||
# Vite build assets — content-hashed filenames, safe to cache forever
|
# Vite build assets — content-hashed filenames, safe to cache forever
|
||||||
location /build/ {
|
location /build/ {
|
||||||
|
|||||||
@@ -1,30 +0,0 @@
|
|||||||
receivers:
|
|
||||||
otlp:
|
|
||||||
protocols:
|
|
||||||
http:
|
|
||||||
endpoint: 0.0.0.0:4318
|
|
||||||
|
|
||||||
processors:
|
|
||||||
batch:
|
|
||||||
timeout: 5s
|
|
||||||
send_batch_size: 512
|
|
||||||
|
|
||||||
exporters:
|
|
||||||
otlphttp:
|
|
||||||
endpoint: ${env:SIGNOZ_ENDPOINT}
|
|
||||||
compression: gzip
|
|
||||||
|
|
||||||
service:
|
|
||||||
pipelines:
|
|
||||||
traces:
|
|
||||||
receivers: [otlp]
|
|
||||||
processors: [batch]
|
|
||||||
exporters: [otlphttp]
|
|
||||||
metrics:
|
|
||||||
receivers: [otlp]
|
|
||||||
processors: [batch]
|
|
||||||
exporters: [otlphttp]
|
|
||||||
logs:
|
|
||||||
receivers: [otlp]
|
|
||||||
processors: [batch]
|
|
||||||
exporters: [otlphttp]
|
|
||||||
@@ -9,6 +9,14 @@ content_path: /content
|
|||||||
media_path: /media
|
media_path: /media
|
||||||
thumbs_path: /var/www/html/storage/app/public/stoic/
|
thumbs_path: /var/www/html/storage/app/public/stoic/
|
||||||
repository_path: /app
|
repository_path: /app
|
||||||
|
# First locale is Stoic's default: it holds every field, the others only the
|
||||||
|
# translatable ones (content/{locale}/...). Codes match app.available_locales.
|
||||||
|
i18n:
|
||||||
|
locales:
|
||||||
|
- code: el
|
||||||
|
label: Ελληνικά
|
||||||
|
- code: en
|
||||||
|
label: English
|
||||||
presets:
|
presets:
|
||||||
- code: large
|
- code: large
|
||||||
mode: resize
|
mode: resize
|
||||||
|
|||||||
@@ -0,0 +1,41 @@
|
|||||||
|
sources:
|
||||||
|
laravel_logs:
|
||||||
|
type: file
|
||||||
|
include:
|
||||||
|
- /var/www/html/storage/logs/laravel.log
|
||||||
|
read_from: beginning
|
||||||
|
|
||||||
|
transforms:
|
||||||
|
laravel_json:
|
||||||
|
type: remap
|
||||||
|
inputs:
|
||||||
|
- laravel_logs
|
||||||
|
source: |
|
||||||
|
. = parse_json!(.message)
|
||||||
|
.service = "boboko-app"
|
||||||
|
.env = "${APP_ENV}"
|
||||||
|
|
||||||
|
sinks:
|
||||||
|
victorialogs:
|
||||||
|
type: http
|
||||||
|
inputs:
|
||||||
|
- laravel_json
|
||||||
|
uri: "${VICTORIALOGS_ENDPOINT}/insert/jsonline?_stream_fields=service,env,channel,level_name&_msg_field=message&_time_field=datetime"
|
||||||
|
encoding:
|
||||||
|
codec: json
|
||||||
|
framing:
|
||||||
|
method: newline_delimited
|
||||||
|
compression: gzip
|
||||||
|
auth:
|
||||||
|
strategy: basic
|
||||||
|
user: "${VICTORIALOGS_USER}"
|
||||||
|
password: "${VICTORIALOGS_PASSWORD}"
|
||||||
|
batch:
|
||||||
|
max_bytes: 1048576
|
||||||
|
timeout_secs: 5
|
||||||
|
buffer:
|
||||||
|
type: disk
|
||||||
|
max_size: 268435488
|
||||||
|
when_full: block
|
||||||
|
healthcheck:
|
||||||
|
enabled: false
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* lunarphp/table-rate-shipping v1.5.0 ships no Greek translations for this
|
||||||
|
* namespace at all (only 'en' and a handful of other locales — no 'el'
|
||||||
|
* directory exists in the package), so this override is the only source
|
||||||
|
* for these keys in Greek, not a merge over an existing package file.
|
||||||
|
* ManageShippingRates.php:58 calls the 'prices_inc_tax' key specifically
|
||||||
|
* (missing the 'l' the package's own English file uses — see the 'en'
|
||||||
|
* override's docblock), so that's the one included here.
|
||||||
|
*/
|
||||||
|
return [
|
||||||
|
'shipping_rates' => [
|
||||||
|
'notices' => [
|
||||||
|
'prices_inc_tax' => 'Όλες οι τιμές περιλαμβάνουν ΦΠΑ, το οποίο θα ληφθεί υπόψη στον υπολογισμό της ελάχιστης αξίας παραγγελίας.',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
];
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Override for lunarphp/table-rate-shipping v1.5.0's own relationmanagers.php
|
||||||
|
* (vendor/lunarphp/table-rate-shipping/resources/lang/en/relationmanagers.php)
|
||||||
|
* — that file defines 'prices_incl_tax', but ManageShippingRates.php:58 calls
|
||||||
|
* __('lunarpanel.shipping::relationmanagers.shipping_rates.notices.prices_inc_tax')
|
||||||
|
* (missing the 'l'), so the key is genuinely never found. Merged over the
|
||||||
|
* package's own file (array_replace_recursive, see Illuminate\Translation\
|
||||||
|
* FileLoader::loadNamespaceOverrides()), so only the broken key needs
|
||||||
|
* restating here — everything else in that file still applies.
|
||||||
|
*/
|
||||||
|
return [
|
||||||
|
'shipping_rates' => [
|
||||||
|
'notices' => [
|
||||||
|
'prices_inc_tax' => 'All prices include tax, which will be considered when calculating minimum spend.',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
];
|
||||||
Generated
+14
-47
@@ -5,6 +5,7 @@
|
|||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@boboko/core": "git+https://code.radical-elements.com/boboko/core.git#semver:0.x",
|
||||||
"@hotwired/stimulus": "^3.2.2",
|
"@hotwired/stimulus": "^3.2.2",
|
||||||
"@hotwired/turbo": "^8.0.23",
|
"@hotwired/turbo": "^8.0.23",
|
||||||
"axios": "^1.15.2",
|
"axios": "^1.15.2",
|
||||||
@@ -18,11 +19,21 @@
|
|||||||
"vite": "^8.0.0"
|
"vite": "^8.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@boboko/core": {
|
||||||
|
"version": "0.31.1",
|
||||||
|
"resolved": "git+https://code.radical-elements.com/boboko/core.git#4900f0505db1f8c93e2b5efa3ef173b8654022c3",
|
||||||
|
"dependencies": {
|
||||||
|
"@hotwired/stimulus": "^3.2.2",
|
||||||
|
"leaflet": "^1.9.4"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"vite": "^8.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/@emnapi/core": {
|
"node_modules/@emnapi/core": {
|
||||||
"version": "1.11.1",
|
"version": "1.11.1",
|
||||||
"resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.11.1.tgz",
|
"resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.11.1.tgz",
|
||||||
"integrity": "sha512-RSvbQmHzdKzNsLYa/wHrbc3KN4sYLKAdPZxqiM2HATqv/SBk2/ENSHpvXGaLOMcsAyz0poEGqkmmKYG3OWiJEQ==",
|
"integrity": "sha512-RSvbQmHzdKzNsLYa/wHrbc3KN4sYLKAdPZxqiM2HATqv/SBk2/ENSHpvXGaLOMcsAyz0poEGqkmmKYG3OWiJEQ==",
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
@@ -34,7 +45,6 @@
|
|||||||
"version": "1.11.1",
|
"version": "1.11.1",
|
||||||
"resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.11.1.tgz",
|
"resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.11.1.tgz",
|
||||||
"integrity": "sha512-vgj7R3y3Wgx24IQaGPA/R6YFXLHVMOZ0uVEyIQPaWs+rd1AzfEMXlAC22FYwO1XkKR6NPsq7mUandH8oIRdZFw==",
|
"integrity": "sha512-vgj7R3y3Wgx24IQaGPA/R6YFXLHVMOZ0uVEyIQPaWs+rd1AzfEMXlAC22FYwO1XkKR6NPsq7mUandH8oIRdZFw==",
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
@@ -45,7 +55,6 @@
|
|||||||
"version": "1.2.2",
|
"version": "1.2.2",
|
||||||
"resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-1.2.2.tgz",
|
"resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-1.2.2.tgz",
|
||||||
"integrity": "sha512-c95qOXkHdydNKhscBTebqEC1CVAZpyqOfVfBzQ1qgzyl3gfeldUjIggDbIZgDKsHLgnsM+igH7TJ/eAasaVuMA==",
|
"integrity": "sha512-c95qOXkHdydNKhscBTebqEC1CVAZpyqOfVfBzQ1qgzyl3gfeldUjIggDbIZgDKsHLgnsM+igH7TJ/eAasaVuMA==",
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
@@ -121,7 +130,6 @@
|
|||||||
"version": "1.1.6",
|
"version": "1.1.6",
|
||||||
"resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-1.1.6.tgz",
|
"resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-1.1.6.tgz",
|
||||||
"integrity": "sha512-ZLv/JdUfkvOy9eCnnBaGfiO+XimbjebAeO+MRQqD/B+FR1tnRN0tpKSJHRbE8sFfS6aqsXZ67TQjfwfsxULVbg==",
|
"integrity": "sha512-ZLv/JdUfkvOy9eCnnBaGfiO+XimbjebAeO+MRQqD/B+FR1tnRN0tpKSJHRbE8sFfS6aqsXZ67TQjfwfsxULVbg==",
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
@@ -140,7 +148,6 @@
|
|||||||
"version": "0.138.0",
|
"version": "0.138.0",
|
||||||
"resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.138.0.tgz",
|
"resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.138.0.tgz",
|
||||||
"integrity": "sha512-1a7ZKmrRTCoN1XMZ4L0PyyqrMnrNlLyPuOkdSX2MZg7IiIGRUyurNhAm73ptDOraoBcIordsIGKNPKUzy3ZmfA==",
|
"integrity": "sha512-1a7ZKmrRTCoN1XMZ4L0PyyqrMnrNlLyPuOkdSX2MZg7IiIGRUyurNhAm73ptDOraoBcIordsIGKNPKUzy3ZmfA==",
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"funding": {
|
"funding": {
|
||||||
"url": "https://github.com/sponsors/Boshen"
|
"url": "https://github.com/sponsors/Boshen"
|
||||||
@@ -153,7 +160,6 @@
|
|||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
@@ -170,7 +176,6 @@
|
|||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
@@ -187,7 +192,6 @@
|
|||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
@@ -204,7 +208,6 @@
|
|||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
@@ -221,7 +224,6 @@
|
|||||||
"cpu": [
|
"cpu": [
|
||||||
"arm"
|
"arm"
|
||||||
],
|
],
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
@@ -238,7 +240,6 @@
|
|||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
@@ -255,7 +256,6 @@
|
|||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
@@ -272,7 +272,6 @@
|
|||||||
"cpu": [
|
"cpu": [
|
||||||
"ppc64"
|
"ppc64"
|
||||||
],
|
],
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
@@ -289,7 +288,6 @@
|
|||||||
"cpu": [
|
"cpu": [
|
||||||
"s390x"
|
"s390x"
|
||||||
],
|
],
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
@@ -306,7 +304,6 @@
|
|||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
@@ -323,7 +320,6 @@
|
|||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
@@ -340,7 +336,6 @@
|
|||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
@@ -357,7 +352,6 @@
|
|||||||
"cpu": [
|
"cpu": [
|
||||||
"wasm32"
|
"wasm32"
|
||||||
],
|
],
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
@@ -376,7 +370,6 @@
|
|||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
@@ -393,7 +386,6 @@
|
|||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
@@ -407,7 +399,6 @@
|
|||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.1.tgz",
|
||||||
"integrity": "sha512-2j9bGt5Jh8hj+vPtgzPtl72j0yRxHAyumoo6TNfAjsLB04UtpSvPbPcDcBMxz7n+9CYB0c1GxQFxYRg2jimqGw==",
|
"integrity": "sha512-2j9bGt5Jh8hj+vPtgzPtl72j0yRxHAyumoo6TNfAjsLB04UtpSvPbPcDcBMxz7n+9CYB0c1GxQFxYRg2jimqGw==",
|
||||||
"dev": true,
|
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/@tailwindcss/node": {
|
"node_modules/@tailwindcss/node": {
|
||||||
@@ -686,7 +677,6 @@
|
|||||||
"version": "0.10.3",
|
"version": "0.10.3",
|
||||||
"resolved": "https://registry.npmjs.org/@tybys/wasm-util/-/wasm-util-0.10.3.tgz",
|
"resolved": "https://registry.npmjs.org/@tybys/wasm-util/-/wasm-util-0.10.3.tgz",
|
||||||
"integrity": "sha512-F3fo1MYrRJYL3zER0OUOmkutjr1Vp23m7OsSgp7nq4SP6OqX6C/56XFIPAl5bt3zaBRjmW7SGz3u/6LwFpYcOg==",
|
"integrity": "sha512-F3fo1MYrRJYL3zER0OUOmkutjr1Vp23m7OsSgp7nq4SP6OqX6C/56XFIPAl5bt3zaBRjmW7SGz3u/6LwFpYcOg==",
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
@@ -894,7 +884,6 @@
|
|||||||
"version": "2.1.2",
|
"version": "2.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz",
|
"resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz",
|
||||||
"integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==",
|
"integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==",
|
||||||
"dev": true,
|
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=8"
|
"node": ">=8"
|
||||||
@@ -994,7 +983,6 @@
|
|||||||
"version": "6.5.0",
|
"version": "6.5.0",
|
||||||
"resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz",
|
"resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz",
|
||||||
"integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==",
|
"integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==",
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=12.0.0"
|
"node": ">=12.0.0"
|
||||||
@@ -1048,7 +1036,6 @@
|
|||||||
"version": "2.3.3",
|
"version": "2.3.3",
|
||||||
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
|
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
|
||||||
"integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",
|
"integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",
|
||||||
"dev": true,
|
|
||||||
"hasInstallScript": true,
|
"hasInstallScript": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
@@ -1210,7 +1197,7 @@
|
|||||||
"version": "2.7.0",
|
"version": "2.7.0",
|
||||||
"resolved": "https://registry.npmjs.org/jiti/-/jiti-2.7.0.tgz",
|
"resolved": "https://registry.npmjs.org/jiti/-/jiti-2.7.0.tgz",
|
||||||
"integrity": "sha512-AC/7JofJvZGrrneWNaEnJeOLUx+JlGt7tNa0wZiRPT4MY1wmfKjt2+6O2p2uz2+skll8OZZmJMNqeke7kKbNgQ==",
|
"integrity": "sha512-AC/7JofJvZGrrneWNaEnJeOLUx+JlGt7tNa0wZiRPT4MY1wmfKjt2+6O2p2uz2+skll8OZZmJMNqeke7kKbNgQ==",
|
||||||
"dev": true,
|
"devOptional": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"bin": {
|
"bin": {
|
||||||
"jiti": "lib/jiti-cli.mjs"
|
"jiti": "lib/jiti-cli.mjs"
|
||||||
@@ -1253,7 +1240,6 @@
|
|||||||
"version": "1.32.0",
|
"version": "1.32.0",
|
||||||
"resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.32.0.tgz",
|
"resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.32.0.tgz",
|
||||||
"integrity": "sha512-NXYBzinNrblfraPGyrbPoD19C1h9lfI/1mzgWYvXUTe414Gz/X1FD2XBZSZM7rRTrMA8JL3OtAaGifrIKhQ5yQ==",
|
"integrity": "sha512-NXYBzinNrblfraPGyrbPoD19C1h9lfI/1mzgWYvXUTe414Gz/X1FD2XBZSZM7rRTrMA8JL3OtAaGifrIKhQ5yQ==",
|
||||||
"dev": true,
|
|
||||||
"license": "MPL-2.0",
|
"license": "MPL-2.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"detect-libc": "^2.0.3"
|
"detect-libc": "^2.0.3"
|
||||||
@@ -1286,7 +1272,6 @@
|
|||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
"dev": true,
|
|
||||||
"license": "MPL-2.0",
|
"license": "MPL-2.0",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
@@ -1307,7 +1292,6 @@
|
|||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
"dev": true,
|
|
||||||
"license": "MPL-2.0",
|
"license": "MPL-2.0",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
@@ -1328,7 +1312,6 @@
|
|||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
"dev": true,
|
|
||||||
"license": "MPL-2.0",
|
"license": "MPL-2.0",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
@@ -1349,7 +1332,6 @@
|
|||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
"dev": true,
|
|
||||||
"license": "MPL-2.0",
|
"license": "MPL-2.0",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
@@ -1370,7 +1352,6 @@
|
|||||||
"cpu": [
|
"cpu": [
|
||||||
"arm"
|
"arm"
|
||||||
],
|
],
|
||||||
"dev": true,
|
|
||||||
"license": "MPL-2.0",
|
"license": "MPL-2.0",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
@@ -1391,7 +1372,6 @@
|
|||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
"dev": true,
|
|
||||||
"license": "MPL-2.0",
|
"license": "MPL-2.0",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
@@ -1412,7 +1392,6 @@
|
|||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
"dev": true,
|
|
||||||
"license": "MPL-2.0",
|
"license": "MPL-2.0",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
@@ -1433,7 +1412,6 @@
|
|||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
"dev": true,
|
|
||||||
"license": "MPL-2.0",
|
"license": "MPL-2.0",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
@@ -1454,7 +1432,6 @@
|
|||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
"dev": true,
|
|
||||||
"license": "MPL-2.0",
|
"license": "MPL-2.0",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
@@ -1475,7 +1452,6 @@
|
|||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
"dev": true,
|
|
||||||
"license": "MPL-2.0",
|
"license": "MPL-2.0",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
@@ -1496,7 +1472,6 @@
|
|||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
"dev": true,
|
|
||||||
"license": "MPL-2.0",
|
"license": "MPL-2.0",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
@@ -1560,7 +1535,6 @@
|
|||||||
"version": "3.3.15",
|
"version": "3.3.15",
|
||||||
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.15.tgz",
|
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.15.tgz",
|
||||||
"integrity": "sha512-y7Wygv/7mEOvxTuEQDB8StXdMRBWf1kR/tlhAzBRUFkB2jfcLOAxO/SHmOO2zgz1pVgK29/kyupn059/bCHdjA==",
|
"integrity": "sha512-y7Wygv/7mEOvxTuEQDB8StXdMRBWf1kR/tlhAzBRUFkB2jfcLOAxO/SHmOO2zgz1pVgK29/kyupn059/bCHdjA==",
|
||||||
"dev": true,
|
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
"type": "github",
|
"type": "github",
|
||||||
@@ -1579,14 +1553,12 @@
|
|||||||
"version": "1.1.1",
|
"version": "1.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz",
|
||||||
"integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==",
|
"integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==",
|
||||||
"dev": true,
|
|
||||||
"license": "ISC"
|
"license": "ISC"
|
||||||
},
|
},
|
||||||
"node_modules/picomatch": {
|
"node_modules/picomatch": {
|
||||||
"version": "4.0.5",
|
"version": "4.0.5",
|
||||||
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.5.tgz",
|
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.5.tgz",
|
||||||
"integrity": "sha512-RvwwcruNjI1ncT5xRakeyS9Lf8lcItv34KD+aif+VH9kduAyfYBipGh12274xtenIPZ119/R9BdTBa8gAwSh0A==",
|
"integrity": "sha512-RvwwcruNjI1ncT5xRakeyS9Lf8lcItv34KD+aif+VH9kduAyfYBipGh12274xtenIPZ119/R9BdTBa8gAwSh0A==",
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=12"
|
"node": ">=12"
|
||||||
@@ -1599,7 +1571,6 @@
|
|||||||
"version": "8.5.16",
|
"version": "8.5.16",
|
||||||
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.16.tgz",
|
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.16.tgz",
|
||||||
"integrity": "sha512-vuwillviilfKZsg0VGj5R/YwwcHx4SLsIOI/7K6mQkWx+l5cUHTjj5g0AasTBcyXsbfTgrwsUNmVUb5xVwyPwg==",
|
"integrity": "sha512-vuwillviilfKZsg0VGj5R/YwwcHx4SLsIOI/7K6mQkWx+l5cUHTjj5g0AasTBcyXsbfTgrwsUNmVUb5xVwyPwg==",
|
||||||
"dev": true,
|
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
"type": "opencollective",
|
"type": "opencollective",
|
||||||
@@ -1647,7 +1618,6 @@
|
|||||||
"version": "1.1.4",
|
"version": "1.1.4",
|
||||||
"resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.1.4.tgz",
|
"resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.1.4.tgz",
|
||||||
"integrity": "sha512-IjZYiLxZwpnhwhdBH2ugdTGVSdhCQUmLxLoqyjiL0JxYjyRst+5a0P3xfrTxJ5F638j4Mvvw5FAX5XE6eHpXbA==",
|
"integrity": "sha512-IjZYiLxZwpnhwhdBH2ugdTGVSdhCQUmLxLoqyjiL0JxYjyRst+5a0P3xfrTxJ5F638j4Mvvw5FAX5XE6eHpXbA==",
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@oxc-project/types": "=0.138.0",
|
"@oxc-project/types": "=0.138.0",
|
||||||
@@ -1704,7 +1674,6 @@
|
|||||||
"version": "1.2.1",
|
"version": "1.2.1",
|
||||||
"resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz",
|
"resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz",
|
||||||
"integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==",
|
"integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==",
|
||||||
"dev": true,
|
|
||||||
"license": "BSD-3-Clause",
|
"license": "BSD-3-Clause",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=0.10.0"
|
"node": ">=0.10.0"
|
||||||
@@ -1779,7 +1748,6 @@
|
|||||||
"version": "0.2.17",
|
"version": "0.2.17",
|
||||||
"resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.17.tgz",
|
"resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.17.tgz",
|
||||||
"integrity": "sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==",
|
"integrity": "sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==",
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"fdir": "^6.5.0",
|
"fdir": "^6.5.0",
|
||||||
@@ -1806,14 +1774,13 @@
|
|||||||
"version": "2.8.1",
|
"version": "2.8.1",
|
||||||
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz",
|
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz",
|
||||||
"integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==",
|
"integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==",
|
||||||
"dev": true,
|
"devOptional": true,
|
||||||
"license": "0BSD"
|
"license": "0BSD"
|
||||||
},
|
},
|
||||||
"node_modules/vite": {
|
"node_modules/vite": {
|
||||||
"version": "8.1.3",
|
"version": "8.1.3",
|
||||||
"resolved": "https://registry.npmjs.org/vite/-/vite-8.1.3.tgz",
|
"resolved": "https://registry.npmjs.org/vite/-/vite-8.1.3.tgz",
|
||||||
"integrity": "sha512-Ds+gBRbj0lwRO2Y5hwnUBdxSwlAve9LeRyU4sNnAr0ewW0gWF0n5bgXgUzbgZ49MV9BVUAQUFYVcDUcilUExMA==",
|
"integrity": "sha512-Ds+gBRbj0lwRO2Y5hwnUBdxSwlAve9LeRyU4sNnAr0ewW0gWF0n5bgXgUzbgZ49MV9BVUAQUFYVcDUcilUExMA==",
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"lightningcss": "^1.32.0",
|
"lightningcss": "^1.32.0",
|
||||||
|
|||||||
+1
-1
@@ -22,6 +22,6 @@
|
|||||||
},
|
},
|
||||||
"_comment_boboko_core": "Mirrors composer.json's repositories/_repositories toggle: swap @boboko/core above with the line in _dependencies below (and back) by hand to switch between the local path-repo checkout and a tagged VCS install. The #semver:0.x range mirrors composer.json's own \"boboko/core\": \"0.*\" constraint exactly — note ^0.23.0 would NOT be equivalent here, since npm's caret locks the minor version too below 1.0.0 (>=0.23.0 <0.24.0). 0.x matches any 0.y.z tag, same as Composer's 0.*. npm reads the repo's git tags, filters to valid semver ones, and resolves the best match, so `npm update @boboko/core` alone picks up a newly pushed tag within range, no manual edit here per release. See docker/entrypoint-vite.sh and CONTRIBUTE.md.",
|
"_comment_boboko_core": "Mirrors composer.json's repositories/_repositories toggle: swap @boboko/core above with the line in _dependencies below (and back) by hand to switch between the local path-repo checkout and a tagged VCS install. The #semver:0.x range mirrors composer.json's own \"boboko/core\": \"0.*\" constraint exactly — note ^0.23.0 would NOT be equivalent here, since npm's caret locks the minor version too below 1.0.0 (>=0.23.0 <0.24.0). 0.x matches any 0.y.z tag, same as Composer's 0.*. npm reads the repo's git tags, filters to valid semver ones, and resolves the best match, so `npm update @boboko/core` alone picks up a newly pushed tag within range, no manual edit here per release. See docker/entrypoint-vite.sh and CONTRIBUTE.md.",
|
||||||
"_dependencies": {
|
"_dependencies": {
|
||||||
"@boboko/core": "file:../boboko-core"
|
"@boboko/core": "file:../boboko-core"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
/*! tailwindcss v4.3.0 | 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-outline-style:solid;--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-space-x-reverse:0;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial}}}@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-2xs:18rem;--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-sm:.25rem;--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);--color-primary-500:var(--primary-500);--color-primary-600:var(--primary-600)}}@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{Line truncated
|
||||||
Executable → Regular
File mode changed.
@@ -0,0 +1 @@
|
|||||||
|
@font-face{font-family:Inter Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url("./inter-cyrillic-ext-wght-normal-SP7Z6XGK.woff2") format("woff2-variations");unicode-range:U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:Inter Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url("./inter-cyrillic-wght-normal-DR6K5BQD.woff2") format("woff2-variations");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:Inter Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url("./inter-greek-ext-wght-normal-A2J6H3EX.woff2") format("woff2-variations");unicode-range:U+1F00-1FFF}@font-face{font-family:Inter Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url("./inter-greek-wght-normal-ZABHMKQG.woff2") format("woff2-variations");unicode-range:U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF}@font-face{font-family:Inter Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url("./inter-vietnamese-wght-normal-VWEHJHBA.woff2") format("woff2-variations");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Inter Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url("./inter-latin-ext-wght-normal-ZIT2UBIY.woff2") format("woff2-variations");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Inter Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url("./inter-latin-wght-normal-DIHYUR35.woff2") format("woff2-variations");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Executable → Regular
File mode changed.
@@ -0,0 +1 @@
|
|||||||
|
(()=>{var o=({livewireId:n})=>({actionNestingIndex:null,isDestroyed:!1,shouldOverlayParentActions:!1,closedActionNestingIndexes:[],focusTargetsByNestingIndex:{},boundSyncActionModals:null,boundOnModalClosed:null,boundFocusTarget:null,boundFocusTargetFinished:null,pendingFocusTarget:null,restoringFocusTarget:null,init(){this.boundFocusTarget=t=>{if(t.detail.id!==n)return;this.pendingFocusTarget?.controller.abort(),this.restoringFocusTarget?.controller.abort();let e=new AbortController;this.pendingFocusTarget={controller:e,create:t.detail.createFocusTarget,restore:t.detail.createFocusTarget(e.signal)}},this.boundFocusTargetFinished=t=>{t.detail.id!==n||this.pendingFocusTarget?.create!==t.detail.createFocusTarget||(this.pendingFocusTarget.controller.abort(),this.pendingFocusTarget=null)},this.boundSyncActionModals=t=>{t.detail.id===n&&this.syncActionModals(t.detail.newActionNestingIndex,t.detail.shouldOverlayParentActions??!1)},this.boundOnModalClosed=t=>{let e=this.getActionNestingIndexFromModalId(t.detail.id);e!==null&&((this.shouldOverlayParentActions||e===0)&&this.restorePreviouslyFocusedElement(e-1),this.closedActionNestingIndexes.push(e))},window.addEventListener("sync-action-modals",this.boundSyncActionModals),window.addEventListener("modal-closed",this.boundOnModalClosed),window.addEventListener("action-modal-focus-target",this.boundFocusTarget),window.addEventListener("action-modal-focus-target-finished",this.boundFocusTargetFinished)},syncActionModals(t,e=!1){if(this.actionNestingIndex===t){this.actionNestingIndex!==null&&this.$nextTick(()=>this.openModal());return}let s=this.actionNestingIndex!==null&&t!==null&&t>this.actionNestingIndex,i=this.actionNestingIndex!==null&&t!==null&&t<this.actionNestingIndex,r=this.actionNestingIndex===null&&t!==null;if((s||r)&&(this.restoringFocusTarget?.controller.abort(),this.rememberPreviouslyFocusedElement()),this.actionNestingIndex!==null&&!(e&&s)&&this.closeModal(),this.actionNestingIndex=t,this.actionNestingIndex===null){this.restorePreviouslyFocusedElement(-1),this.closedActionNestingIndexes=[],this.focusTargetsByNestingIndex={},this.shouldOverlayParentActions=!1;return}if(this.shouldOverlayParentActions=e,this.closedActionNestingIndexes=this.closedActionNestingIndexes.filter(l=>l<=this.actionNestingIndex),!this.closedActionNestingIndexes.includes(this.actionNestingIndex)){if(!this.$el.querySelector(`#${this.generateModalId(t)}`)){this.$nextTick(()=>{this.openModal(),i&&this.restorePreviouslyFocusedElement()});return}this.openModal(),i&&this.restorePreviouslyFocusedElement()}},rememberPreviouslyFocusedElement(){if(this.pendingFocusTarget){this.focusTargetsByNestingIndex[this.actionNestingIndex??-1]=this.pendingFocusTarget,this.pendingFocusTarget=null;return}let t=this.$focus.focused();if(!t)return;if(this.actionNestingIndex===null){this.focusTargetsByNestingIndex[-1]=t;return}this.$el.querySelector(`#${this.generateModalId(this.actionNestingIndex)}`)?.contains(t)&&(this.focusTargetsByNestingIndex[this.actionNestingIndex]=t)},restorePreviouslyFocusedElement(t=this.actionNestingIndex){let e=this.focusTargetsByNestingIndex[t];for(let s in this.focusTargetsByNestingIndex)if(Number(s)>=t){let i=this.focusTargetsByNestingIndex[s];i!==e&&i.controller?.abort(),delete this.focusTargetsByNestingIndex[s]}this.restoringFocusTarget?.nestingIndex>t&&(this.restoringFocusTarget.controller.abort(),this.restoringFocusTarget=null),e&&(this.restoringFocusTarget?.controller.abort(),this.restoringFocusTarget=e.restore?e:null,this.restoringFocusTarget&&(this.restoringFocusTarget.nestingIndex=t),this.$nextTick(()=>requestAnimationFrame(()=>requestAnimationFrame(()=>this.$nextTick(async()=>{if(this.isDestroyed)return;if(!e.restore){e.focus({preventScroll:!0});return}let{controller:s}=e;if(!s.signal.aborted)try{await e.restore()}finally{s.abort(),this.restoringFocusTarget===e&&(this.restoringFocusTarget=null)}})))))},generateModalId(t){return`fi-${n}-action-`+t},getActionNestingIndexFromModalId(t){let e=`fi-${n}-action-`;if(!t?.startsWith(e))return null;let s=Number(t.slice(e.length));return Number.isInteger(s)?s:null},openModal(){if(this.isDestroyed)return;let t=this.generateModalId(this.actionNestingIndex);document.dispatchEvent(new CustomEvent("open-modal",{bubbles:!0,composed:!0,detail:{id:t}}))},closeModal(){let t=this.generateModalId(this.actionNestingIndex);document.dispatchEvent(new CustomEvent("close-modal-quietly",{bubbles:!0,composed:!0,detail:{id:t}}))},destroy(){this.isDestroyed=!0,this.pendingFocusTarget?.controller.abort(),this.restoringFocusTarget?.controller.abort(),Object.values(this.focusTargetsByNestingIndex).forEach(t=>t.controller?.abort()),window.removeEventListener("action-modal-focus-target",this.boundFocusTarget),window.removeEventListener("action-modal-focus-target-finished",this.boundFocusTargetFinished),this.boundSyncActionModals&&(window.removeEventListener("sync-action-modals",this.boundSyncActionModals),this.boundSyncActionModals=null),this.boundOnModalLine truncated
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
(()=>{var ne=Object.create,x=Object.defineProperty,ae=Object.getPrototypeOf,oe=Object.prototype.hasOwnProperty,le=Object.getOwnPropertyNames,ue=Object.getOwnPropertyDescriptor,fe=i=>x(i,"__esModule",{value:!0}),ce=(i,s)=>()=>(s||(s={exports:{}},i(s.exports,s)),s.exports),de=(i,s,e)=>{if(s&&typeof s=="object"||typeof s=="function")for(let n of le(s))!oe.call(i,n)&&n!=="default"&&x(i,n,{get:()=>s[n],enumerable:!(e=ue(s,n))||e.enumerable});return i},he=i=>de(fe(x(i!=null?ne(ae(i)):{},"default",i&&i.__esModule&&"default"in i?{get:()=>i.default,enumerable:!0}:{value:i,enumerable:!0})),i),pe=ce((i,s)=>{(function(e,n,o){if(!e)return;for(var l={8:"backspace",9:"tab",13:"enter",16:"shift",17:"ctrl",18:"alt",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"ins",46:"del",91:"meta",93:"meta",224:"meta"},g={106:"*",107:"+",109:"-",110:".",111:"/",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},p={"~":"`","!":"1","@":"2","#":"3",$:"4","%":"5","^":"6","&":"7","*":"8","(":"9",")":"0",_:"-","+":"=",":":";",'"':"'","<":",",">":".","?":"/","|":"\\"},_={option:"alt",command:"meta",return:"enter",escape:"esc",plus:"+",mod:/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"meta":"ctrl"},k,b=1;b<20;++b)l[111+b]="f"+b;for(b=0;b<=9;++b)l[b+96]=b.toString();function T(t,r,u){if(t.addEventListener){t.addEventListener(r,u,!1);return}t.attachEvent("on"+r,u)}function U(t){if(t.type=="keypress"){var r=String.fromCharCode(t.which);return t.shiftKey||(r=r.toLowerCase()),r}return l[t.which]?l[t.which]:g[t.which]?g[t.which]:String.fromCharCode(t.which).toLowerCase()}function V(t,r){return t.sort().join(",")===r.sort().join(",")}function B(t){var r=[];return t.shiftKey&&r.push("shift"),t.altKey&&r.push("alt"),t.ctrlKey&&r.push("ctrl"),t.metaKey&&r.push("meta"),r}function X(t){if(t.preventDefault){t.preventDefault();return}t.returnValue=!1}function Y(t){if(t.stopPropagation){t.stopPropagation();return}t.cancelBubble=!0}function E(t){return t=="shift"||t=="ctrl"||t=="alt"||t=="meta"}function Q(){if(!k){k={};for(var t in l)t>95&&t<112||l.hasOwnProperty(t)&&(k[l[t]]=t)}return k}function Z(t,r,u){return u||(u=Q()[t]?"keydown":"keypress"),u=="keypress"&&r.length&&(u="keydown"),u}function ee(t){return t==="+"?["+"]:(t=t.replace(/\+{2}/g,"+plus"),t.split("+"))}function N(t,r){var u,v,O,C=[];for(u=ee(t),O=0;O<u.length;++O)v=u[O],_[v]&&(v=_[v]),r&&r!="keypress"&&p[v]&&(v=p[v],C.push("shift")),E(v)&&C.push(v);return r=Z(v,C,r),{key:v,modifiers:C,action:r}}function $(t,r){return t===null||t===n?!1:t===r?!0:$(t.parentNode,r)}function w(t){var r=this;if(t=t||n,!(r instanceof w))return new w(t);r.target=t,r._callbacks={},r._directMap={};var u={},v,O=!1,C=!1,M=!1;function P(a){a=a||{};var c=!1,h;for(h in u){if(a[h]){c=!0;continue}u[h]=0}c||(M=!1)}function I(a,c,h,f,m,S){var d,y,A=[],D=h.type;if(!r._callbacks[a])return[];for(D=="keyup"&&E(a)&&(c=[a]),d=0;d<r._callbacks[a].length;++d)if(y=r._callbacks[a][d],!(!f&&y.seq&&u[y.seq]!=y.level)&&D==y.action&&(D=="keypress"&&!h.metaKey&&!h.ctrlKey||V(c,y.modifiers))){var re=!f&&y.combo==m,se=f&&y.seq==f&&y.level==S;(re||se)&&r._callbacks[a].splice(d,1),A.push(y)}return A}function q(a,c,h,f){r.stopCallback(c,c.target||c.srcElement,h,f)||a(c,h)===!1&&(X(c),Y(c))}r._handleKey=function(a,c,h){var f=I(a,c,h),m,S={},d=0,y=!1;for(m=0;m<f.length;++m)f[m].seq&&(d=Math.max(d,f[m].level));for(m=0;m<f.length;++m){if(f[m].seq){if(f[m].level!=d)continue;y=!0,S[f[m].seq]=1,q(f[m].callback,h,f[m].combo,f[m].seq);continue}y||q(f[m].callback,h,f[m].combo)}var A=h.type=="keypress"&&C;h.type==M&&!E(a)&&!A&&P(S),C=y&&h.type=="keydown"};function R(a){typeof a.which!="number"&&(a.which=a.keyCode);var c=U(a);if(c){if(a.type=="keyup"&&O===c){O=!1;return}r.handleKey(c,B(a),a)}}function te(){clearTimeout(v),v=setTimeout(P,1e3)}function ie(a,c,h,f){u[a]=0;function m(D){return function(){M=D,++u[a],te()}}function S(D){q(h,D,a),f!=="keyup"&&(O=U(D)),setTimeout(P,10)}for(var d=0;d<c.length;++d){var y=d+1===c.length,A=y?S:m(f||N(c[d+1]).action);G(c[d],A,f,a,d)}}function G(a,c,h,f,m){r._directMap[a+":"+h]=c,a=a.replace(/\s+/g," ");var S=a.split(" "),d;if(S.length>1){ie(a,S,c,h);return}d=N(a,h),r._callbacks[d.key]=r._callbacks[d.key]||[],I(d.key,d.modifiers,{type:d.action},f,a,m),r._callbacks[d.key][f?"unshift":"push"]({callback:c,modifiers:d.modifiers,action:d.action,seq:f,level:m,combo:a})}r._bindMultiple=function(a,c,h){for(var f=0;f<a.length;++f)G(a[f],c,h)},T(t,"keypress",R),T(t,"keydown",R),T(t,"keyup",R)}w.prototype.bind=function(t,r,u){var v=this;return t=t instanceof Array?t:[t],v._bindMultiple.call(v,t,r,u),v},w.prototype.unbind=function(t,r){var u=this;return u.bind.call(u,t,function(){},r)},w.prototype.trigger=function(t,r){var u=this;return u._directMap[t+":"+r]&&u._directMap[t+":"+r]({},t),u},w.prototype.reset=function(){var t=this;return t._callbacks={},t._directMap={},t},w.prototype.stopCallback=function(t,r){var u=this;ifLine truncated
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
(()=>{var Ci=Object.create;var he=Object.defineProperty;var Ti=Object.getOwnPropertyDescriptor;var Pi=Object.getOwnPropertyNames;var xi=Object.getPrototypeOf,Oi=Object.prototype.hasOwnProperty;var Ai=(l,h)=>()=>{try{return h||l((h={exports:{}}).exports,h),h.exports}catch(a){throw h=0,a}};var Ei=(l,h,a,c)=>{if(h&&typeof h=="object"||typeof h=="function")for(let s of Pi(h))!Oi.call(l,s)&&s!==a&&he(l,s,{get:()=>h[s],enumerable:!(c=Ti(h,s))||c.enumerable});return l};var Li=(l,h,a)=>(a=l!=null?Ci(xi(l)):{},Ei(h||!l||!l.__esModule?he(a,"default",{value:l,enumerable:!0}):a,l));var me=Ai((vt,It)=>{(function(h,a){typeof vt=="object"&&typeof It=="object"?It.exports=a():typeof define=="function"&&define.amd?define([],a):typeof vt=="object"?vt.Pusher=a():h.Pusher=a()})(window,function(){return(function(l){var h={};function a(c){if(h[c])return h[c].exports;var s=h[c]={i:c,l:!1,exports:{}};return l[c].call(s.exports,s,s.exports,a),s.l=!0,s.exports}return a.m=l,a.c=h,a.d=function(c,s,f){a.o(c,s)||Object.defineProperty(c,s,{enumerable:!0,get:f})},a.r=function(c){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(c,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(c,"__esModule",{value:!0})},a.t=function(c,s){if(s&1&&(c=a(c)),s&8||s&4&&typeof c=="object"&&c&&c.__esModule)return c;var f=Object.create(null);if(a.r(f),Object.defineProperty(f,"default",{enumerable:!0,value:c}),s&2&&typeof c!="string")for(var d in c)a.d(f,d,function(N){return c[N]}.bind(null,d));return f},a.n=function(c){var s=c&&c.__esModule?function(){return c.default}:function(){return c};return a.d(s,"a",s),s},a.o=function(c,s){return Object.prototype.hasOwnProperty.call(c,s)},a.p="",a(a.s=2)})([(function(l,h,a){"use strict";var c=this&&this.__extends||(function(){var b=function(v,y){return b=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(w,O){w.__proto__=O}||function(w,O){for(var I in O)O.hasOwnProperty(I)&&(w[I]=O[I])},b(v,y)};return function(v,y){b(v,y);function w(){this.constructor=v}v.prototype=y===null?Object.create(y):(w.prototype=y.prototype,new w)}})();Object.defineProperty(h,"__esModule",{value:!0});var s=256,f=(function(){function b(v){v===void 0&&(v="="),this._paddingCharacter=v}return b.prototype.encodedLength=function(v){return this._paddingCharacter?(v+2)/3*4|0:(v*8+5)/6|0},b.prototype.encode=function(v){for(var y="",w=0;w<v.length-2;w+=3){var O=v[w]<<16|v[w+1]<<8|v[w+2];y+=this._encodeByte(O>>>18&63),y+=this._encodeByte(O>>>12&63),y+=this._encodeByte(O>>>6&63),y+=this._encodeByte(O>>>0&63)}var I=v.length-w;if(I>0){var O=v[w]<<16|(I===2?v[w+1]<<8:0);y+=this._encodeByte(O>>>18&63),y+=this._encodeByte(O>>>12&63),I===2?y+=this._encodeByte(O>>>6&63):y+=this._paddingCharacter||"",y+=this._paddingCharacter||""}return y},b.prototype.maxDecodedLength=function(v){return this._paddingCharacter?v/4*3|0:(v*6+7)/8|0},b.prototype.decodedLength=function(v){return this.maxDecodedLength(v.length-this._getPaddingLength(v))},b.prototype.decode=function(v){if(v.length===0)return new Uint8Array(0);for(var y=this._getPaddingLength(v),w=v.length-y,O=new Uint8Array(this.maxDecodedLength(w)),I=0,q=0,M=0,J=0,F=0,z=0,B=0;q<w-4;q+=4)J=this._decodeChar(v.charCodeAt(q+0)),F=this._decodeChar(v.charCodeAt(q+1)),z=this._decodeChar(v.charCodeAt(q+2)),B=this._decodeChar(v.charCodeAt(q+3)),O[I++]=J<<2|F>>>4,O[I++]=F<<4|z>>>2,O[I++]=z<<6|B,M|=J&s,M|=F&s,M|=z&s,M|=B&s;if(q<w-1&&(J=this._decodeChar(v.charCodeAt(q)),F=this._decodeChar(v.charCodeAt(q+1)),O[I++]=J<<2|F>>>4,M|=J&s,M|=F&s),q<w-2&&(z=this._decodeChar(v.charCodeAt(q+2)),O[I++]=F<<4|z>>>2,M|=z&s),q<w-3&&(B=this._decodeChar(v.charCodeAt(q+3)),O[I++]=z<<6|B,M|=B&s),M!==0)throw new Error("Base64Coder: incorrect characters for decoding");return O},b.prototype._encodeByte=function(v){var y=v;return y+=65,y+=25-v>>>8&6,y+=51-v>>>8&-75,y+=61-v>>>8&-15,y+=62-v>>>8&3,String.fromCharCode(y)},b.prototype._decodeChar=function(v){var y=s;return y+=(42-v&v-44)>>>8&-s+v-43+62,y+=(46-v&v-48)>>>8&-s+v-47+63,y+=(47-v&v-58)>>>8&-s+v-48+52,y+=(64-v&v-91)>>>8&-s+v-65+0,y+=(96-v&v-123)>>>8&-s+v-97+26,y},b.prototype._getPaddingLength=function(v){var y=0;if(this._paddingCharacter){for(var w=v.length-1;w>=0&&v[w]===this._paddingCharacter;w--)y++;if(v.length<4||y>2)throw new Error("Base64Coder: incorrect padding")}return y},b})();h.Coder=f;var d=new f;function N(b){return d.encode(b)}h.encode=N;function P(b){return d.decode(b)}h.decode=P;var T=(function(b){c(v,b);function v(){return b!==null&&b.apply(this,arguments)||this}return v.prototype._encodeByte=function(y){var w=y;return w+=65,w+=25-y>>>8&6,w+=51-y>>>8&-75,w+=61-y>>>8&-13,w+=62-y>>>8&49,String.fromCharCode(w)},v.prototype._decodeChar=function(y){var w=s;return w+=(44-y&y-46)>>>8&-s+y-45+62,w+=(94-y&y-96)>>>8&-s+y-95+63,w+=(47-y&y-58)>>>8&-s+y-48+52,w+=(64-y&y-91)>>>8&-s+y-65+0,w+=(96-y&y-123)>>>8&-s+y-97+26,w},v})(f);h.URLSafeCoder=T;var S=new T;function C(b){return S.encode(b)}h.encodeURLSafe=C;function x(b){return S.decode(b)}h.decodeURLSafe=x,h.encodeLine truncated
|
||||||
|
`);return i!==-1?(this.position+=i+1,r.slice(0,i)):null},t.prototype.isBufferTooLong=function(n){return this.position===n.length&&n.length>br},t})(V),wr=mr,Ct;(function(e){e[e.CONNECTING=0]="CONNECTING",e[e.OPEN=1]="OPEN",e[e.CLOSED=3]="CLOSED"})(Ct||(Ct={}));var $=Ct,kr=1,Sr=(function(){function e(t,n){this.hooks=t,this.session=Yt(1e3)+"/"+xr(8),this.location=Cr(n),this.readyState=$.CONNECTING,this.openStream()}return e.prototype.send=function(t){return this.sendRaw(JSON.stringify([t]))},e.prototype.ping=function(){this.hooks.sendHeartbeat(this)},e.prototype.close=function(t,n){this.onClose(t,n,!0)},e.prototype.sendRaw=function(t){if(this.readyState===$.OPEN)try{return m.createSocketRequest("POST",Kt(Tr(this.location,this.session))).start(t),!0}catch{return!1}else return!1},e.prototype.reconnect=function(){this.closeStream(),this.openStream()},e.prototype.onClose=function(t,n,r){this.closeStream(),this.readyState=$.CLOSED,this.onclose&&this.onclose({code:t,reason:n,wasClean:r})},e.prototype.onChunk=function(t){if(t.status===200){this.readyState===$.OPEN&&this.onActivity();var n,r=t.data.slice(0,1);switch(r){case"o":n=JSON.parse(t.data.slice(1)||"{}"),this.onOpen(n);break;case"a":n=JSON.parse(t.data.slice(1)||"[]");for(var i=0;i<n.length;i++)this.onEvent(n[i]);break;case"m":n=JSON.parse(t.data.slice(1)||"null"),this.onEvent(n);break;case"h":this.hooks.onHeartbeat(this);break;case"c":n=JSON.parse(t.data.slice(1)||"[]"),this.onClose(n[0],n[1],!0);break}}},e.prototype.onOpen=function(t){this.readyState===$.CONNECTING?(t&&t.hostname&&(this.location.base=Pr(this.location.base,t.hostname)),this.readyState=$.OPEN,this.onopen&&this.onopen()):this.onClose(1006,"Server lost session",!0)},e.prototype.onEvent=function(t){this.readyState===$.OPEN&&this.onmessage&&this.onmessage({data:t})},e.prototype.onActivity=function(){this.onactivity&&this.onactivity()},e.prototype.onError=function(t){this.onerror&&this.onerror(t)},e.prototype.openStream=function(){var t=this;this.stream=m.createSocketRequest("POST",Kt(this.hooks.getReceiveURL(this.location,this.session))),this.stream.bind("chunk",function(n){t.onChunk(n)}),this.stream.bind("finished",function(n){t.hooks.onFinished(t,n)}),this.stream.bind("buffer_too_long",function(){t.reconnect()});try{this.stream.start()}catch(n){j.defer(function(){t.onError(n),t.onClose(1006,"Could not start streaming",!1)})}},e.prototype.closeStream=function(){this.stream&&(this.stream.unbind_all(),this.stream.close(),this.stream=null)},e})();function Cr(e){var t=/([^\?]*)\/*(\??.*)/.exec(e);return{base:t[1],queryString:t[2]}}function Tr(e,t){return e.base+"/"+t+"/xhr_send"}function Kt(e){var t=e.indexOf("?")===-1?"?":"&";return e+t+"t="+ +new Date+"&n="+kr++}function Pr(e,t){var n=/(https?:\/\/)([^\/:]+)((\/|:)?.*)/.exec(e);return n[1]+t+n[3]}function Yt(e){return m.randomInt(e)}function xr(e){for(var t=[],n=0;n<e;n++)t.push(Yt(32).toString(32));return t.join("")}var Or=Sr,Ar={getReceiveURL:function(e,t){return e.base+"/"+t+"/xhr_streaming"+e.queryString},onHeartbeat:function(e){e.sendRaw("[]")},sendHeartbeat:function(e){e.sendRaw("[]")},onFinished:function(e,t){e.onClose(1006,"Connection interrupted ("+t+")",!1)}},Er=Ar,Lr={getReceiveURL:function(e,t){return e.base+"/"+t+"/xhr"+e.queryString},onHeartbeat:function(){},sendHeartbeat:function(e){e.sendRaw("[]")},onFinished:function(e,t){t===200?e.reconnect():e.onClose(1006,"Connection interrupted ("+t+")",!1)}},Rr=Lr,Ir={getRequest:function(e){var t=m.getXHRAPI(),n=new t;return n.onreadystatechange=n.onprogress=function(){switch(n.readyState){case 3:n.responseText&&n.responseText.length>0&&e.onChunk(n.status,n.responseText);break;case 4:n.responseText&&n.responseText.length>0&&e.onChunk(n.status,n.responseText),e.emit("finished",n.status),e.close();break}},n},abortRequest:function(e){e.onreadystatechange=null,e.abort()}},jr=Ir,Nr={createStreamingSocket:function(e){return this.createSocket(Er,e)},createPollingSocket:function(e){return this.createSocket(Rr,e)},createSocket:function(e,t){return new Or(e,t)},createXHR:function(e,t){return this.createRequest(jr,e,t)},createRequest:function(e,t,n){return new wr(e,t,n)}},$t=Nr;$t.createXDR=function(e,t){return this.createRequest(gr,e,t)};var qr=$t,Ur={nextAuthCallbackID:1,auth_callbacks:{},ScriptReceivers:s,DependenciesReceivers:T,getDefaultStrategy:dr,Transports:_n,transportConnectionInitializer:vr,HTTPFactory:qr,TimelineTransport:Ze,getXHRAPI:function(){return window.XMLHttpRequest},getWebSocketAPI:function(){return window.WebSocket||window.MozWebSocket},setup:function(e){var t=this;window.Pusher=e;var n=function(){t.onDocumentBody(e.ready)};window.JSON?n():S.load("json2",{},n)},getDocument:function(){return document},getProtocol:function(){return this.getDocument().location.protocol},getAuthorizers:function(){return{ajax:Se,jsonp:We}},onDocumentBody:function(e){var t=this;document.body?e():setTimeout(function(){t.onDocumentBody(e)},0)},createJSONPRequest:function(e,t){return new Ke(e,t)},createScrip
Line truncated
|
||||||
|
/*! Bundled license information:
|
||||||
|
|
||||||
|
pusher-js/dist/web/pusher.js:
|
||||||
|
(*!
|
||||||
|
* Pusher JavaScript Library v7.6.0
|
||||||
|
* https://pusher.com/
|
||||||
|
*
|
||||||
|
* Copyright 2020, Pusher
|
||||||
|
* Released under the MIT licence.
|
||||||
|
*)
|
||||||
|
*/
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
function $({statePath:s,isCollapsed:l,collapseKey:u}){return{isCollapsed:u?Alpine.$persist(l).as(u):l,collapseFromEvent(m){m.detail===s&&(this.isCollapsed=!0)},expandFromEvent(m){m.detail===s&&(this.isCollapsed=!1)},expand(){this.isCollapsed=!1},toggleCollapsed(){this.isCollapsed=!this.isCollapsed},get itemClasses(){return{"fi-collapsed":this.isCollapsed}}}}function y({schemaComponent:s,moveUpAction:l,moveDownAction:u,reorderAction:m,message:S,hasCustomReorderAction:x}){let A=e=>JSON.stringify({name:e?.name,arguments:e?.arguments,context:e?.context});return{pending:null,frame:null,destroyed:!1,listeners:[],removeCommitHook:null,init(){let e=(t,o,a,p=!0)=>{t.addEventListener(o,a,p),this.listeners.push(()=>t.removeEventListener(o,a,p))};e(document,"pointerdown",t=>{this.pending?.control?.contains(t.target)||this.relinquishFocus()}),e(document,"keydown",t=>{t.key==="Tab"&&this.relinquishFocus()}),e(document,"focusin",t=>{this.pending&&t.target!==this.pending.control&&this.relinquishFocus()}),e(this.$root,"click",t=>{let o=t.target.closest("[data-reorder-direction]");if(!(!o||!this.owns(o))){if(this.pending){t.preventDefault(),t.stopImmediatePropagation();return}!o.dataset.reorderAction?.startsWith("mountAction(")||o.getAttribute("wire:click")!==o.dataset.reorderAction||o.getAttributeNames().some(a=>a==="wire:confirm"||a.startsWith("wire:confirm."))||o.disabled||this.begin(o.closest("[x-sortable-item]").getAttribute("x-sortable-item"),o.dataset.reorderDirection,o)}}),e(this.$root,"start",t=>{t.target===this.$refs.reorderItems&&this.begin(t.item.getAttribute("x-sortable-item"),"drag")}),e(this.$root,"end",t=>{if(t.target===this.$refs.reorderItems){if(t.oldDraggableIndex===t.newDraggableIndex){this.finish(),t.stopImmediatePropagation();return}this.setSortingDisabled(!0)}}),this.removeCommitHook=Livewire.hook("commit",({component:t,commit:o,succeed:a,fail:p})=>{let r=this.pending;if(t.id!==this.$wire.$id)return;let n=[];for(let i=this.$root;i&&!(i.hasAttribute("wire:id")&&i.getAttribute("wire:id")!==t.id);i=i.parentElement){let h=i.getAttribute("wire:partial");if(h&&n.push(h),i===t.el)break}let g=i=>i.html||n.some(h=>i.partials?.[h]);if(a(({effects:i})=>{this.pending===r&&(r&&(!r.synchronizing||!g(i))||this.schedule(()=>{this.destroyed||!this.$root.isConnected||(this.updateHandles(),r?.synchronizing&&this.isCurrent(r)&&this.finish())}))}),!r||r.synchronizing)return;let c=t.canonical.mountedActions??[],d=i=>i?.context?.schemaComponent===s&&i.name===r.action&&(r.direction==="drag"||String(i.arguments?.item)===r.item),v=c.some(d)&&!d(c.at(-1));if(!o.calls.some(i=>i.method==="mountAction"?d({name:i.params[0],arguments:i.params[1],context:i.params[2]}):["callMountedAction","unmountAction"].includes(i.method)&&c.some(d)))return;let C=o.calls.some(i=>i.method==="unmountAction");a(({effects:i})=>{if(!this.isCurrent(r))return;let h=t.canonical.mountedActions??[],k=h.some(d);for(let[f,w]of r.reopenedModals??[])A(h[f])!==w&&r.reopenedModals.delete(f);if(k){r.focus=!1,r.modal=!0,this.setSortingDisabled(!0);let f=h.length-1;h.length<c.length&&r.reopenedModals?.has(f)&&this.schedule(()=>{if(!this.isCurrent(r))return;let w=t.canonical.mountedActions??[];w.length===f+1&&A(w[f])===r.reopenedModals.get(f)&&this.$dispatch("open-modal",{id:`fi-${t.id}-action-${f}`})});return}if(!g(i)||v){this.resynchronize(r);return}this.schedule(()=>this.reconcile(r))}),p(()=>{this.isCurrent(r)&&(r.focus=!1,r.modal&&C&&(r.reopenedModals??(r.reopenedModals=new Map),r.reopenedModals.set(c.length-1,A(c.at(-1))),this.$dispatch("open-modal",{id:`fi-${t.id}-action-${c.length-1}`})),!r.modal&&(r.direction==="drag"?this.resynchronize(r):this.finish()))})}),this.updateHandles()},owns(e){return e.closest("[data-reorder-owner]")===this.$root},order(){return JSON.parse(this.$root.dataset.reorderItems)},reorder(e){e.target===this.$refs.reorderItems&&this.$wire.mountAction(m,{items:e.target.sortable.toArray()},{schemaComponent:s})},begin(e,t,o=null){this.pending={item:e,direction:t,control:o,focus:!o?.hasAttribute("data-reorder-hidden")&&document.activeElement===o,before:this.order(),action:t==="drag"?m:t==="up"?l:u},t!=="drag"&&this.setSortingDisabled(!0)},relinquishFocus(){this.pending&&(this.pending.focus=!1)},isCurrent(e){return!this.destroyed&&this.$root.isConnected&&this.pending===e},schedule(e){cancelAnimationFrame(this.frame),this.frame=requestAnimationFrame(e)},resynchronize(e){this.setSortingDisabled(!0),e.synchronizing=!0,this.$wire.forceRender().catch(()=>{})},reconcile(e){if(!this.isCurrent(e))return;this.updateHandles();let t=this.order(),o=e.before.filter(n=>t.includes(n)),a=t.filter(n=>e.before.includes(n)),p=t.includes(e.item)&&o.indexOf(e.item)!==a.indexOf(e.item),r=[...this.$root.querySelectorAll("[data-reorder-description]")].find(n=>this.owns(n)&&n.dataset.reorderDescription===e.item);if(p&&r&&(this.$refs.reorderStatus.textContent=S.replace(/:label|:position|:count/g,n=>({":label":r.dataset.reorderLabel,":position":String(t.indexOf(e.item)+1Line truncated
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
function c(s){return s.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase()}function o({livewireId:s}){return{areAllCheckboxesChecked:!1,checkboxListOptions:[],search:"",unsubscribeLivewireHook:null,visibleCheckboxListOptions:[],init(){this.checkboxListOptions=Array.from(this.$root.querySelectorAll(".fi-fo-checkbox-list-option")),this.updateVisibleCheckboxListOptions(),this.$nextTick(()=>{this.checkIfAllCheckboxesAreChecked()}),this.unsubscribeLivewireHook=Livewire.hook("commit",({component:e,commit:t,succeed:i,fail:h,respond:r})=>{i(({snapshot:l,effect:n})=>{this.$nextTick(()=>{e.id===s&&(this.checkboxListOptions=Array.from(this.$root.querySelectorAll(".fi-fo-checkbox-list-option")),this.updateVisibleCheckboxListOptions(),this.checkIfAllCheckboxesAreChecked())})})}),this.$watch("search",()=>{this.updateVisibleCheckboxListOptions(),this.checkIfAllCheckboxesAreChecked()})},checkIfAllCheckboxesAreChecked(){this.areAllCheckboxesChecked=this.visibleCheckboxListOptions.length===this.visibleCheckboxListOptions.filter(e=>e.querySelector("input[type=checkbox]:checked, input[type=checkbox]:disabled")).length},toggleAllCheckboxes(){this.checkIfAllCheckboxesAreChecked();let e=!this.areAllCheckboxesChecked;this.visibleCheckboxListOptions.forEach(t=>{let i=t.querySelector("input[type=checkbox]");i.disabled||i.checked!==e&&(i.checked=e,i.dispatchEvent(new Event("change")))}),this.areAllCheckboxesChecked=e},updateVisibleCheckboxListOptions(){this.visibleCheckboxListOptions=this.checkboxListOptions.filter(e=>this.matchesSearch(e))},matchesSearch(e){if(["",null,void 0].includes(this.search))return!0;let t=c(this.search);return c(e.querySelector(".fi-fo-checkbox-list-option-label")?.innerText??"").includes(t)||c(e.querySelector(".fi-fo-checkbox-list-option-description")?.innerText??"").includes(t)},destroy(){this.unsubscribeLivewireHook?.()}}}export{o as default};
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
var Ms=[],bh=[];(()=>{let O="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(e=>e?parseInt(e,36):1);for(let e=0,t=0;e<O.length;e++)(e%2?bh:Ms).push(t=t+O[e])})();function Lg(O){if(O<768)return!1;for(let e=0,t=Ms.length;;){let i=e+t>>1;if(O<Ms[i])t=i;else if(O>=bh[i])e=i+1;else return!0;if(e==t)return!1}}function Xh(O){return O>=127462&&O<=127487}var Th=8205;function xh(O,e,t=!0,i=!0){return(t?wh:Mg)(O,e,i)}function wh(O,e,t){if(e==O.length)return e;e&&kh(O.charCodeAt(e))&&vh(O.charCodeAt(e-1))&&e--;let i=Ls(O,e);for(e+=yh(i);e<O.length;){let r=Ls(O,e);if(i==Th||r==Th||t&&Lg(r))e+=yh(r),i=r;else if(Xh(r)){let n=0,s=e-2;for(;s>=0&&Xh(Ls(O,s));)n++,s-=2;if(n%2==0)break;e+=2}else break}return e}function Mg(O,e,t){for(;e>0;){let i=wh(O,e-2,t);if(i<e)return i;e--}return 0}function Ls(O,e){let t=O.charCodeAt(e);if(!vh(t)||e+1==O.length)return t;let i=O.charCodeAt(e+1);return kh(i)?(t-55296<<10)+(i-56320)+65536:t}function kh(O){return O>=56320&&O<57344}function vh(O){return O>=55296&&O<56320}function yh(O){return O<65536?1:2}var E=class O{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,i){[e,t]=HO(this,e,t);let r=[];return this.decompose(0,e,r,2),i.length&&i.decompose(0,i.length,r,3),this.decompose(t,this.length,r,1),BO.from(r,this.length-(t-e)+i.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){[e,t]=HO(this,e,t);let i=[];return this.decompose(e,t,i,0),BO.from(i,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),i=this.length-this.scanIdentical(e,-1),r=new pO(this),n=new pO(e);for(let s=t,a=t;;){if(r.next(s),n.next(s),s=0,r.lineBreak!=n.lineBreak||r.done!=n.done||r.value!=n.value)return!1;if(a+=r.value.length,r.done||a>=i)return!0}}iter(e=1){return new pO(this,e)}iterRange(e,t=this.length){return new Mr(this,e,t)}iterLines(e,t){let i;if(e==null)i=this.iter();else{t==null&&(t=this.lines+1);let r=this.line(e).from;i=this.iterRange(r,Math.max(r,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new Dr(i)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?O.empty:e.length<=32?new Le(e):BO.from(Le.split(e,[]))}},Le=class O extends E{constructor(e,t=Dg(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,i,r){for(let n=0;;n++){let s=this.text[n],a=r+s.length;if((t?i:a)>=e)return new Is(r,a,i,s);r=a+1,i++}}decompose(e,t,i,r){let n=e<=0&&t>=this.length?this:new O(Yh(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(r&1){let s=i.pop(),a=Lr(n.text,s.text.slice(),0,n.length);if(a.length<=32)i.push(new O(a,s.length+n.length));else{let o=a.length>>1;i.push(new O(a.slice(0,o)),new O(a.slice(o)))}}else i.push(n)}replace(e,t,i){if(!(i instanceof O))return super.replace(e,t,i);[e,t]=HO(this,e,t);let r=Lr(this.text,Lr(i.text,Yh(this.text,0,e)),t),n=this.length+i.length-(t-e);return r.length<=32?new O(r,n):BO.from(O.split(r,[]),n)}sliceString(e,t=this.length,i=`
|
||||||
|
`){[e,t]=HO(this,e,t);let r="";for(let n=0,s=0;n<=t&&s<this.text.length;s++){let a=this.text[s],o=n+a.length;n>e&&s&&(r+=i),e<o&&t>n&&(r+=a.slice(Math.max(0,e-n),t-n)),n=o+1}return r}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(e,t){let i=[],r=-1;for(let n of e)i.push(n),r+=n.length+1,i.length==32&&(t.push(new O(i,r)),i=[],r=-1);return r>-1&&t.push(new O(i,r)),t}},BO=class O extends E{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let i of e)this.lines+=i.lines}lineInner(e,t,i,r){for(let n=0;;n++){let s=this.children[n],a=r+s.length,o=i+s.lines-1;if((t?o:a)>=e)return s.lineInner(e,t,i,r);r=a+1,i=o+1}}decompose(e,t,i,r){for(let n=0,s=0;s<=t&&n<this.children.length;n++){let a=this.children[n],o=s+a.length;if(e<=o&&t>=s){let l=r&((s<=e?1:0)|(o>=t?2:0));s>=e&&o<=t&&!l?i.push(a):a.decompose(e-s,t-s,i,l)}s=o+1}}replace(e,t,i){if([e,t]=HO(this,e,t),i.lines<this.lines)for(let r=0,n=0;r<this.children.length;r++){let s=this.children[r],a=n+s.length;if(e>=n&&t<=a){let o=s.replace(e-n,t-n,i),l=this.lines-s.lines+o.lines;if(o.lines<l>>4&&o.lines>l>>6){let c=this.children.slice();return c[r]=o,new O(c,this.length-(t-e)+i.length)}return super.replace(n,a,o)}n=a+1}return super.replace(e,t,i)}sliceString(e,t=this.length,i=`
|
||||||
|
`){[e,t]=HO(this,e,t);let r="";for(let n=0,s=0;n<this.children.length&&s<=t;n++){let a=this.children[n],o=s+a.length;s>e&&n&&(r+=i),e<o&&t>s&&(r+=a.sliceString(e-s,t-s,i)),s=o+1}return r}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(e,t){if(!(e instanceof O))return 0;let i=0,[r,n,s,a]=t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;r+=t,n+=t){if(r==s||n==a)return i;let o=this.children[r],l=e.children[n];if(o!=l)return i+o.scanIdentical(l,t);i+=o.length+1}}static from(e,t=e.reduce((i,r)=>i+r.length+1,-1)){let i=0;for(let u of e)i+=u.lines;if(i<32){let u=[];for(let $ of e)$.flatten(u);return new Le(u,t)}let r=Math.max(32,i>>5),n=r<<1,s=r>>1,a=[],o=0,l=-1,c=[];function h(u){let $;if(u.lines>n&&u instanceof O)for(let Q of u.children)h(Q);else u.lines>s&&(o>s||!o)?(f(),a.push(u)):u instanceof Le&&o&&($=c[c.length-1])instanceof Le&&u.lines+$.lines<=32?(o+=u.lines,l+=u.length+1,c[c.length-1]=new Le($.text.concat(u.text),$.length+1+u.length)):(o+u.lines>r&&f(),o+=u.lines,l+=u.length+1,c.push(u))}function f(){o!=0&&(a.push(c.length==1?c[0]:O.from(c,l)),l=-1,o=c.length=0)}for(let u of e)h(u);return f(),a.length==1?a[0]:new O(a,t)}};E.empty=new Le([""],0);function Dg(O){let e=-1;for(let t of O)e+=t.length+1;return e}function Lr(O,e,t=0,i=1e9){for(let r=0,n=0,s=!0;n<O.length&&r<=i;n++){let a=O[n],o=r+a.length;o>=t&&(o>i&&(a=a.slice(0,i-r)),r<t&&(a=a.slice(t-r)),s?(e[e.length-1]+=a,s=!1):e.push(a)),r=o+1}return e}function Yh(O,e,t){return Lr(O,[""],e,t)}var pO=class{constructor(e,t=1){this.dir=t,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[e],this.offsets=[t>0?1:(e instanceof Le?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let i=this.nodes.length-1,r=this.nodes[i],n=this.offsets[i],s=n>>1,a=r instanceof Le?r.text.length:r.children.length;if(s==(t>0?a:0)){if(i==0)return this.done=!0,this.value="",this;t>0&&this.offsets[i-1]++,this.nodes.pop(),this.offsets.pop()}else if((n&1)==(t>0?0:1)){if(this.offsets[i]+=t,e==0)return this.lineBreak=!0,this.value=`
|
||||||
|
`,this;e--}else if(r instanceof Le){let o=r.text[s+(t<0?-1:0)];if(this.offsets[i]+=t,o.length>Math.max(0,e))return this.value=e==0?o:t>0?o.slice(e):o.slice(0,o.length-e),this;e-=o.length}else{let o=r.children[s+(t<0?-1:0)];e>o.length?(e-=o.length,this.offsets[i]+=t):(t<0&&this.offsets[i]--,this.nodes.push(o),this.offsets.push(t>0?1:(o instanceof Le?o.text.length:o.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}},Mr=class{constructor(e,t,i){this.value="",this.done=!1,this.cursor=new pO(e,t>i?-1:1),this.pos=t>i?e.length:0,this.from=Math.min(t,i),this.to=Math.max(t,i)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let i=t<0?this.pos-this.from:this.to-this.pos;e>i&&(e=i),i-=e;let{value:r}=this.cursor.next(e);return this.pos+=(r.length+e)*t,this.value=r.length<=i?r:t<0?r.slice(r.length-i):r.slice(0,i),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}},Dr=class{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:t,lineBreak:i,value:r}=this.inner.next(e);return t&&this.afterBreak?(this.value="",this.afterBreak=!1):t?(this.done=!0,this.value=""):i?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=r,this.afterBreak=!1),this}get lineBreak(){return!1}};typeof Symbol<"u"&&(E.prototype[Symbol.iterator]=function(){return this.iter()},pO.prototype[Symbol.iterator]=Mr.prototype[Symbol.iterator]=Dr.prototype[Symbol.iterator]=function(){return this});var Is=class{constructor(e,t,i,r){this.from=e,this.to=t,this.number=i,this.text=r}get length(){return this.to-this.from}};function HO(O,e,t){return e=Math.max(0,Math.min(O.length,e)),[e,Math.max(e,Math.min(O.length,t))]}function ue(O,e,t=!0,i=!0){return xh(O,e,t,i)}function Ig(O){return O>=56320&&O<57344}function Bg(O){return O>=55296&&O<56320}function Se(O,e){let t=O.charCodeAt(e);if(!Bg(t)||e+1==O.length)return t;let i=O.charCodeAt(e+1);return Ig(i)?(t-55296<<10)+(i-56320)+65536:t}function Ui(O){return O<=65535?String.fromCharCode(O):(O-=65536,String.fromCharCode((O>>10)+55296,(O&1023)+56320))}function De(O){return O<65536?1:2}var Bs=/\r\n?|\n/,pe=(function(O){return O[O.Simple=0]="Simple",O[O.TrackDel=1]="TrackDel",O[O.TrackBefore=2]="TrackBefore",O[O.TrackAfter=3]="TrackAfter",O})(pe||(pe={})),Yt=class O{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;t<this.sections.length;t+=2)e+=this.sections[t];return e}get newLength(){let e=0;for(let t=0;t<this.sections.length;t+=2){let i=this.sections[t+1];e+=i<0?this.sections[t]:i}return e}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(e){for(let t=0,i=0,r=0;t<this.sections.length;){let n=this.sections[t++],s=this.sections[t++];s<0?(e(i,r,n),r+=n):r+=s,i+=n}}iterChangedRanges(e,t=!1){Ns(this,e,t)}get invertedDesc(){let e=[];for(let t=0;t<this.sections.length;){let i=this.sections[t++],r=this.sections[t++];r<0?e.push(i,r):e.push(r,i)}return new O(e)}composeDesc(e){return this.empty?e:e.empty?this:Uh(this,e)}mapDesc(e,t=!1){return e.empty?this:Fs(this,e,t)}mapPos(e,t=-1,i=pe.Simple){let r=0,n=0;for(let s=0;s<this.sections.length;){let a=this.sections[s++],o=this.sections[s++],l=r+a;if(o<0){if(l>e)return n+(e-r);n+=a}else{if(i!=pe.Simple&&l>=e&&(i==pe.TrackDel&&r<e&&l>e||i==pe.TrackBefore&&r<e||i==pe.TrackAfter&&l>e))return null;if(l>e||l==e&&t<0&&!a)return e==r||t<0?n:n+o;n+=o}r=l}if(e>r)throw new RangeError(`Position ${e} is out of range for changeset of length ${r}`);return n}touchesRange(e,t=e){for(let i=0,r=0;i<this.sections.length&&r<=t;){let n=this.sections[i++],s=this.sections[i++],a=r+n;if(s>=0&&r<=t&&a>=e)return r<e&&a>t?"cover":!0;r=a}return!1}toString(){let e="";for(let t=0;t<this.sections.length;){let i=this.sections[t++],r=this.sections[t++];e+=(e?" ":"")+i+(r>=0?":"+r:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(t=>typeof t!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new O(e)}static create(e){return new O(e)}},ve=class O extends Yt{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return Ns(this,(t,i,r,n,s)=>e=e.replace(r,r+(i-t),s),!1),e}mapDesc(e,t=!1){return Fs(this,e,t,!0)}invert(e){let t=this.sections.slice(),i=[];for(let r=0,n=0;r<t.length;r+=2){let s=t[r],a=t[r+1];if(a>=0){t[r]=a,t[r+1]=s;let o=r>>1;for(;i.length<o;)i.push(E.empty);i.push(s?e.slice(n,n+s):E.empty)}n+=s}return new O(t,i)}compose(e){return this.empty?e:e.empty?this:Uh(this,e,!0)}map(e,t=!1){return e.empty?this:Fs(this,e,t,!0)}iterChanges(e,t=!1){Ns(this,e,t)}get desc(){return Yt
Line truncated
|
||||||
|
`}get readOnly(){return this.facet(Eh)}phrase(e,...t){for(let i of this.facet(O.phrases))if(Object.prototype.hasOwnProperty.call(i,e)){e=i[e];break}return t.length&&(e=e.replace(/\$(\$|\d*)/g,(i,r)=>{if(r=="$")return"$";let n=+(r||1);return!n||n>t.length?i:t[n-1]})),e}languageDataAt(e,t,i=-1){let r=[];for(let n of this.facet(zh))for(let s of n(this,t,i))Object.prototype.hasOwnProperty.call(s,e)&&r.push(s[e]);return r}charCategorizer(e){let t=this.languageDataAt("wordChars",e);return iP(t.length?t[0]:"")}wordAt(e){let{text:t,from:i,length:r}=this.doc.lineAt(e),n=this.charCategorizer(e),s=e-i,a=e-i;for(;s>0;){let o=ue(t,s,!1);if(n(t.slice(o,s))!=ee.Word)break;s=o}for(;a<r;){let o=ue(t,a);if(n(t.slice(a,o))!=ee.Word)break;a=o}return s==a?null:S.range(s+i,a+i)}};I.allowMultipleSelections=Ks;I.tabSize=k.define({combine:O=>O.length?O[0]:4});I.lineSeparator=Wh;I.readOnly=Eh;I.phrases=k.define({compare(O,e){let t=Object.keys(O),i=Object.keys(e);return t.length==i.length&&t.every(r=>O[r]==e[r])}});I.languageData=zh;I.changeFilter=jh;I.transactionFilter=Ch;I.transactionExtender=Gh;gO.reconfigure=V.define();function xe(O,e,t={}){let i={};for(let r of O)for(let n of Object.keys(r)){let s=r[n],a=i[n];if(a===void 0)i[n]=s;else if(!(a===s||s===void 0))if(Object.hasOwnProperty.call(t,n))i[n]=t[n](a,s);else throw new Error("Config merge conflict for field "+n)}for(let r in e)i[r]===void 0&&(i[r]=e[r]);return i}var Ot=class{eq(e){return this==e}range(e,t=e){return Ri.create(e,t,this)}};Ot.prototype.startSide=Ot.prototype.endSide=0;Ot.prototype.point=!1;Ot.prototype.mapMode=pe.TrackDel;function oa(O,e){return O==e||O.constructor==e.constructor&&O.eq(e)}var Ri=class O{constructor(e,t,i){this.from=e,this.to=t,this.value=i}static create(e,t,i){return new O(e,t,i)}};function ia(O,e){return O.from-e.from||O.value.startSide-e.value.startSide}var ra=class O{constructor(e,t,i,r){this.from=e,this.to=t,this.value=i,this.maxPoint=r}get length(){return this.to[this.to.length-1]}findIndex(e,t,i,r=0){let n=i?this.to:this.from;for(let s=r,a=n.length;;){if(s==a)return s;let o=s+a>>1,l=n[o]-e||(i?this.value[o].endSide:this.value[o].startSide)-t;if(o==s)return l>=0?s:a;l>=0?a=o:s=o+1}}between(e,t,i,r){for(let n=this.findIndex(t,-1e9,!0),s=this.findIndex(i,1e9,!1,n);n<s;n++)if(r(this.from[n]+e,this.to[n]+e,this.value[n])===!1)return!1}map(e,t){let i=[],r=[],n=[],s=-1,a=-1;for(let o=0;o<this.value.length;o++){let l=this.value[o],c=this.from[o]+e,h=this.to[o]+e,f,u;if(c==h){let $=t.mapPos(c,l.startSide,l.mapMode);if($==null||(f=u=$,l.startSide!=l.endSide&&(u=t.mapPos(c,l.endSide),u<f)))continue}else if(f=t.mapPos(c,l.startSide),u=t.mapPos(h,l.endSide),f>u||f==u&&l.startSide>0&&l.endSide<=0)continue;(u-f||l.endSide-l.startSide)<0||(s<0&&(s=f),l.point&&(a=Math.max(a,u-f)),i.push(l),r.push(f-s),n.push(u-s))}return{mapped:i.length?new O(r,n,i,a):null,pos:s}}},L=class O{constructor(e,t,i,r){this.chunkPos=e,this.chunk=t,this.nextLayer=i,this.maxPoint=r}static create(e,t,i,r){return new O(e,t,i,r)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let t of this.chunk)e+=t.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:t=[],sort:i=!1,filterFrom:r=0,filterTo:n=this.length}=e,s=e.filter;if(t.length==0&&!s)return this;if(i&&(t=t.slice().sort(ia)),this.isEmpty)return t.length?O.of(t):this;let a=new Fr(this,null,-1).goto(0),o=0,l=[],c=new Me;for(;a.value||o<t.length;)if(o<t.length&&(a.from-t[o].from||a.startSide-t[o].value.startSide)>=0){let h=t[o++];c.addInner(h.from,h.to,h.value)||l.push(h)}else a.rangeIndex==1&&a.chunkIndex<this.chunk.length&&(o==t.length||this.chunkEnd(a.chunkIndex)<t[o].from)&&(!s||r>this.chunkEnd(a.chunkIndex)||n<this.chunkPos[a.chunkIndex])&&c.addChunk(this.chunkPos[a.chunkIndex],this.chunk[a.chunkIndex])?a.nextChunk():((!s||r>a.to||n<a.from||s(a.from,a.to,a.value))&&(c.addInner(a.from,a.to,a.value)||l.push(Ri.create(a.from,a.to,a.value))),a.next());return c.finishInner(this.nextLayer.isEmpty&&!l.length?O.empty:this.nextLayer.update({add:l,filter:s,filterFrom:r,filterTo:n}))}map(e){if(e.empty||this.isEmpty)return this;let t=[],i=[],r=-1;for(let s=0;s<this.chunk.length;s++){let a=this.chunkPos[s],o=this.chunk[s],l=e.touchesRange(a,a+o.length);if(l===!1)r=Math.max(r,o.maxPoint),t.push(o),i.push(e.mapPos(a));else if(l===!0){let{mapped:c,pos:h}=o.map(a,e);c&&(r=Math.max(r,c.maxPoint),t.push(c),i.push(h))}}let n=this.nextLayer.map(e);return t.length==0?n:new O(i,t,n||O.empty,r)}between(e,t,i){if(!this.isEmpty){for(let r=0;r<this.chunk.length;r++){let n=this.chunkPos[r],s=this.chunk[r];if(t>=n&&e<=n+s.length&&s.between(n,e-n,t-n,i)===!1)return}this.nextLayer.between(e,t,i)}}iter(e=0){return Vi.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,t=0){return Vi.from(e).goto(t)}static compare(e,t,i,r,n=-1){let s=e.filter(h=>h.maxPoint>0||!h.isEmpty&&h.maxP
Line truncated
|
||||||
|
`)}static newName(){let e=Dh[Mh]||1;return Dh[Mh]=e+1,"\u037C"+e.toString(36)}static mount(e,t,i){let r=e[la],n=i&&i.nonce;r?n&&r.setNonce(n):r=new ca(e,n),r.mount(Array.isArray(t)?t:[t],e)}},Ih=new Map,ca=class{constructor(e,t){let i=e.ownerDocument||e,r=i.defaultView;if(!e.head&&e.adoptedStyleSheets&&r.CSSStyleSheet){let n=Ih.get(i);if(n)return e[la]=n;this.sheet=new r.CSSStyleSheet,Ih.set(i,this)}else this.styleTag=i.createElement("style"),t&&this.styleTag.setAttribute("nonce",t);this.modules=[],e[la]=this}mount(e,t){let i=this.sheet,r=0,n=0;for(let s=0;s<e.length;s++){let a=e[s],o=this.modules.indexOf(a);if(o<n&&o>-1&&(this.modules.splice(o,1),n--,o=-1),o==-1){if(this.modules.splice(n++,0,a),i)for(let l=0;l<a.rules.length;l++)i.insertRule(a.rules[l],r++)}else{for(;n<o;)r+=this.modules[n++].rules.length;r+=a.rules.length,n++}}if(i)t.adoptedStyleSheets.indexOf(this.sheet)<0&&(t.adoptedStyleSheets=[this.sheet,...t.adoptedStyleSheets]);else{let s="";for(let o=0;o<this.modules.length;o++)s+=this.modules[o].getRules()+`
|
||||||
|
`;this.styleTag.textContent=s;let a=t.head||t;this.styleTag.parentNode!=a&&a.insertBefore(this.styleTag,a.firstChild)}}setNonce(e){this.styleTag&&this.styleTag.getAttribute("nonce")!=e&&this.styleTag.setAttribute("nonce",e)}};var _t={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},KO={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},nP=typeof navigator<"u"&&/Mac/.test(navigator.platform),sP=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(Qe=0;Qe<10;Qe++)_t[48+Qe]=_t[96+Qe]=String(Qe);var Qe;for(Qe=1;Qe<=24;Qe++)_t[Qe+111]="F"+Qe;var Qe;for(Qe=65;Qe<=90;Qe++)_t[Qe]=String.fromCharCode(Qe+32),KO[Qe]=String.fromCharCode(Qe);var Qe;for(Kr in _t)KO.hasOwnProperty(Kr)||(KO[Kr]=_t[Kr]);var Kr;function Bh(O){var e=nP&&O.metaKey&&O.shiftKey&&!O.ctrlKey&&!O.altKey||sP&&O.shiftKey&&O.key&&O.key.length==1||O.key=="Unidentified",t=!e&&O.key||(O.shiftKey?KO:_t)[O.keyCode]||O.key||"Unidentified";return t=="Esc"&&(t="Escape"),t=="Del"&&(t="Delete"),t=="Left"&&(t="ArrowLeft"),t=="Up"&&(t="ArrowUp"),t=="Right"&&(t="ArrowRight"),t=="Down"&&(t="ArrowDown"),t}function B(){var O=arguments[0];typeof O=="string"&&(O=document.createElement(O));var e=1,t=arguments[1];if(t&&typeof t=="object"&&t.nodeType==null&&!Array.isArray(t)){for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var r=t[i];typeof r=="string"?O.setAttribute(i,r):r!=null&&(O[i]=r)}e++}for(;e<arguments.length;e++)Nh(O,arguments[e]);return O}function Nh(O,e){if(typeof e=="string")O.appendChild(document.createTextNode(e));else if(e!=null)if(e.nodeType!=null)O.appendChild(e);else if(Array.isArray(e))for(var t=0;t<e.length;t++)Nh(O,e[t]);else throw new RangeError("Unsupported child node: "+e)}var _e=typeof navigator<"u"?navigator:{userAgent:"",vendor:"",platform:""},Pa=typeof document<"u"?document:{documentElement:{style:{}}},Sa=/Edge\/(\d+)/.exec(_e.userAgent),Uf=/MSIE \d/.test(_e.userAgent),Xa=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(_e.userAgent),Zn=!!(Uf||Xa||Sa),Fh=!Zn&&/gecko\/(\d+)/i.test(_e.userAgent),ha=!Zn&&/Chrome\/(\d+)/.exec(_e.userAgent),Hh="webkitFontSmoothing"in Pa.documentElement.style,Ta=!Zn&&/Apple Computer/.test(_e.vendor),Kh=Ta&&(/Mobile\/\w+/.test(_e.userAgent)||_e.maxTouchPoints>2),Y={mac:Kh||/Mac/.test(_e.platform),windows:/Win/.test(_e.platform),linux:/Linux|X11/.test(_e.platform),ie:Zn,ie_version:Uf?Pa.documentMode||6:Xa?+Xa[1]:Sa?+Sa[1]:0,gecko:Fh,gecko_version:Fh?+(/Firefox\/(\d+)/.exec(_e.userAgent)||[0,0])[1]:0,chrome:!!ha,chrome_version:ha?+ha[1]:0,ios:Kh,android:/Android\b/.test(_e.userAgent),webkit:Hh,webkit_version:Hh?+(/\bAppleWebKit\/(\d+)/.exec(_e.userAgent)||[0,0])[1]:0,safari:Ta,safari_version:Ta?+(/\bVersion\/(\d+(\.\d+)?)/.exec(_e.userAgent)||[0,0])[1]:0,tabSize:Pa.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};function Qo(O,e){for(let t in O)t=="class"&&e.class?e.class+=" "+O.class:t=="style"&&e.style?e.style+=";"+O.style:e[t]=O[t];return e}var un=Object.create(null);function po(O,e,t){if(O==e)return!0;O||(O=un),e||(e=un);let i=Object.keys(O),r=Object.keys(e);if(i.length-(t&&i.indexOf(t)>-1?1:0)!=r.length-(t&&r.indexOf(t)>-1?1:0))return!1;for(let n of i)if(n!=t&&(r.indexOf(n)==-1||O[n]!==e[n]))return!1;return!0}function aP(O,e){for(let t=O.attributes.length-1;t>=0;t--){let i=O.attributes[t].name;e[i]==null&&O.removeAttribute(i)}for(let t in e){let i=e[t];t=="style"?O.style.cssText=i:O.getAttribute(t)!=i&&O.setAttribute(t,i)}}function Jh(O,e,t){let i=!1;if(e)for(let r in e)t&&r in t||(i=!0,r=="style"?O.style.cssText="":O.removeAttribute(r));if(t)for(let r in t)e&&e[r]==t[r]||(i=!0,r=="style"?O.style.cssText=t[r]:O.setAttribute(r,t[r]));return i}function oP(O){let e=Object.create(null);for(let t=0;t<O.attributes.length;t++){let i=O.attributes[t];e[i.name]=i.value}return e}var Ze=class{eq(e){return!1}updateDOM(e,t,i){return!1}compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}get estimatedHeight(){return-1}get lineBreaks(){return 0}ignoreEvent(e){return!0}coordsAt(e,t,i){return null}get isHidden(){return!1}get editable(){return!1}destroy(e){}},Te=(function(O){return O[O.Text=0]="Text",O[O.WidgetBefore=1]="WidgetBefore",O[O.WidgetAfter=2]="WidgetAfter",O[O.WidgetRange=3]="WidgetRange",O})(Te||(Te={})),_=class extends Ot{constructor(e,t,i,r){super(),this.startSide=e,this.endSide=t,this.widget=i,this.spec=r}get hLine truncated
|
||||||
|
`,r=O.state.doc.line(r.number+(t?1:-1)),n=O.bidiSpans(r),l=O.visualLineSide(r,!t)}if(o){if(!o(c))return a}else{if(!i)return l;o=i(c)}a=l}}function GP(O,e,t){let i=O.state.charCategorizer(e),r=i(t);return n=>{let s=i(n);return r==ee.Space&&(r=s),r==s}}function EP(O,e,t,i){let r=e.head,n=t?1:-1;if(r==(t?O.state.doc.length:0))return S.cursor(r,e.assoc);let s=e.goalColumn,a,o=O.contentDOM.getBoundingClientRect(),l=O.coordsAtPos(r,e.assoc||((e.empty?t:e.head==e.from)?1:-1)),c=O.documentTop;if(l)s==null&&(s=l.left-o.left),a=n<0?l.top:l.bottom;else{let $=O.viewState.lineBlockAt(r);s==null&&(s=Math.min(o.right-o.left,O.defaultCharacterWidth*(r-$.from))),a=(n<0?$.top:$.bottom)+c}let h=o.left+s,f=O.viewState.heightOracle.textHeight>>1,u=i??f;for(let $=0;;$+=f){let Q=a+(u+$)*n,p=ja(O,{x:h,y:Q},!1,n);if(t?Q>o.bottom:Q<o.top)return S.cursor(p.pos,p.assoc);let m=O.coordsAtPos(p.pos,p.assoc),g=m?(m.top+m.bottom)/2:0;if(!m||(t?g>a:g<a))return S.cursor(p.pos,p.assoc,void 0,s)}}function Li(O,e,t){for(;;){let i=0;for(let r of O)r.between(e-1,e+1,(n,s,a)=>{if(e>n&&e<s){let o=i||t||(e-n<s-e?-1:1);e=o<0?n:s,i=o}});if(!i)return e}}function cd(O,e){let t=null;for(let i=0;i<e.ranges.length;i++){let r=e.ranges[i],n=null;if(r.empty){let s=Li(O,r.from,0);s!=r.from&&(n=S.cursor(s,-1))}else{let s=Li(O,r.from,-1),a=Li(O,r.to,1);(s!=r.from||a!=r.to)&&(n=S.range(r.from==r.anchor?s:a,r.from==r.head?s:a))}n&&(t||(t=e.ranges.slice()),t[i]=n)}return t?S.create(t,e.mainIndex):e}function ua(O,e,t){let i=Li(O.state.facet(Ki).map(r=>r(O)),t.from,e.head>t.from?-1:1);return i==t.from?t:S.cursor(i,i<t.from?1:-1)}var nt=class{constructor(e,t){this.pos=e,this.assoc=t}};function ja(O,e,t,i){let r=O.contentDOM.getBoundingClientRect(),n=r.top+O.viewState.paddingTop,{x:s,y:a}=e,o=a-n,l;for(;;){if(o<0)return new nt(0,1);if(o>O.viewState.docHeight)return new nt(O.state.doc.length,-1);if(l=O.elementAtHeight(o),i==null)break;if(l.type==Te.Text){if(i<0?l.to<O.viewport.from:l.from>O.viewport.to)break;let f=O.docView.coordsAt(i<0?l.from:l.to,i>0?-1:1);if(f&&(i<0?f.top<=o+n:f.bottom>=o+n))break}let h=O.viewState.heightOracle.textHeight/2;o=i>0?l.bottom+h:l.top-h}if(O.viewport.from>=l.to||O.viewport.to<=l.from){if(t)return null;if(l.type==Te.Text){let h=jP(O,r,l,s,a);return new nt(h,h==l.from?1:-1)}}if(l.type!=Te.Text)return o<(l.top+l.bottom)/2?new nt(l.from,1):new nt(l.to,-1);let c=O.docView.lineAt(l.from,2);return(!c||c.length!=l.length)&&(c=O.docView.lineAt(l.from,-2)),new Ca(O,s,a,O.textDirectionAt(l.from)).scanTile(c,l.from)}var Ca=class{constructor(e,t,i,r){this.view=e,this.x=t,this.y=i,this.baseDir=r,this.line=null,this.spans=null}bidiSpansAt(e){return(!this.line||this.line.from>e||this.line.to<e)&&(this.line=this.view.state.doc.lineAt(e),this.spans=this.view.bidiSpans(this.line)),this}baseDirAt(e,t){let{line:i,spans:r}=this.bidiSpansAt(e);return r[st.find(r,e-i.from,-1,t)].level==this.baseDir}dirAt(e,t){let{line:i,spans:r}=this.bidiSpansAt(e);return r[st.find(r,e-i.from,-1,t)].dir}bidiIn(e,t){let{spans:i,line:r}=this.bidiSpansAt(e);return i.length>1||i.length&&(i[0].level!=this.baseDir||i[0].to+r.from<t)}scan(e,t,i=!1){let r=0,n=e.length-1,s=new Set,a=this.bidiIn(e[0],e[n]),o,l,c=-1,h=1e9,f;e:for(;r<n;){let $=n-r,Q=r+n>>1;t:if(s.has(Q)){let m=r+Math.floor(Math.random()*$);for(let g=0;g<$;g++){if(!s.has(m)){Q=m;break t}m++,m==n&&(m=r)}break e}s.add(Q);let p=t(Q);if(p)for(let m=0;m<p.length;m++){let g=p[m],P=0;if(!(g.width==0&&p.length>1)){if(g.bottom<this.y)(!o||o.bottom<g.bottom)&&(o=g),P=1;else if(g.top>this.y)(!l||l.top>g.top)&&(l=g),P=-1;else{let x=g.left>this.x?this.x-g.left:g.right<this.x?this.x-g.right:0,X=Math.abs(x);X<h&&(c=Q,h=X,f=g),x&&(P=x<0==(this.baseDir==H.LTR)?-1:1)}P==-1&&(!a||this.baseDirAt(e[Q],1))?n=Q:P==1&&(!a||this.baseDirAt(e[Q+1],-1))&&(r=Q+1)}}}if(!f){let $=o&&(!l||this.y-o.bottom<l.top-this.y)?o:l;return this.y=($.top+$.bottom)/2,this.scan(e,t,!0)}if(h&&!i){let{top:$,bottom:Q}=f;if(o&&o.bottom>($+$+Q)/3)return this.y=o.bottom-1,this.scan(e,t,!0);if(l&&l.top<($+Q+Q)/3)return this.y=l.top+1,this.scan(e,t,!0)}let u=(a?this.dirAt(e[c],1):this.baseDir)==H.LTR;return{i:c,after:this.x>(f.left+f.right)/2==u}}scanText(e,t){let i=[];for(let n=0;n<e.length;n=ue(e.text,n))i.push(t+n);i.push(t+e.length);let r=this.scan(i,n=>{let s=i[n]-t,a=i[n+1]-t;return Hi(e.dom,s,a).getClientRects()});return r.after?new nt(i[r.i+1],-1):new nt(i[r.i],1)}scanTile(e,t){if(!e.length)return new nt(t,1);if(e.children.length==1){let a=e.children[0];if(a.isText())return this.scanText(a,t);if(a.isComposite())return this.scanTile(a,t)}let i=[t];for(let a=0,o=t;a<e.children.length;a++)i.push(o+=e.children[a].length);let r=this.scan(i,a=>{let o=e.children[a];return o.flags&48?null:(o.dom.nodeType==1?o.dom:Hi(o.dom,0,o.length)).getClientRects()}),n=e.children[r.i],s=i[r.i];return n.isText()?this.scanText(n,s):n.isComposite()?this.scanTile(n,s):r.after?new nt(i[r.i+1],-1):new nt(s,1)}},JO="\uFFFF",Ga=class{constructor(e,t){this.points=e,this.view=t,this.text="",this.line
Line truncated
|
||||||
|
`&&O.lineWrapping&&(i&&(i=S.single(i.main.anchor-1,i.main.head-1)),t={from:n.from,to:n.to,insert:E.of([" "])}),t)return yo(O,t,i,s);if(i&&!Xn(i,n)){let a=!1,o="select";return O.inputState.lastSelectionTime>Date.now()-50&&(O.inputState.lastSelectionOrigin=="select"&&(a=!0),o=O.inputState.lastSelectionOrigin,o=="select.pointer"&&(i=cd(r.facet(Ki).map(l=>l(O)),i))),O.dispatch({selection:i,scrollIntoView:a,userEvent:o}),!0}else return!1}function yo(O,e,t,i=-1){if(Y.ios&&O.inputState.flushIOSKey(e))return!0;let r=O.state.selection.main;if(Y.android&&(e.to==r.to&&(e.from==r.from||e.from==r.from-1&&O.state.sliceDoc(e.from,r.from)==" ")&&e.insert.length==1&&e.insert.lines==2&&ni(O.contentDOM,"Enter",13)||(e.from==r.from-1&&e.to==r.to&&e.insert.length==0||i==8&&e.insert.length<e.to-e.from&&e.to>r.head)&&ni(O.contentDOM,"Backspace",8)||e.from==r.from&&e.to==r.to+1&&e.insert.length==0&&ni(O.contentDOM,"Delete",46)))return!0;let n=e.insert.toString();O.inputState.composing>=0&&O.inputState.composing++;let s,a=()=>s||(s=MP(O,e,t));return O.state.facet(Kf).some(o=>o(O,e.from,e.to,n,a))||O.dispatch(a()),!0}function MP(O,e,t){let i,r=O.state,n=r.selection.main,s=-1;if(e.from==e.to&&e.from<n.from||e.from>n.to){let o=e.from<n.from?-1:1,l=o<0?n.from:n.to,c=Li(r.facet(Ki).map(h=>h(O)),l,o);e.from==c&&(s=c)}if(s>-1)i={changes:e,selection:S.cursor(e.from+e.insert.length,-1)};else if(e.from>=n.from&&e.to<=n.to&&e.to-e.from>=(n.to-n.from)/3&&(!t||t.main.empty&&t.main.from==e.from+e.insert.length)&&O.inputState.composing<0){let o=n.from<e.from?r.sliceDoc(n.from,e.from):"",l=n.to>e.to?r.sliceDoc(e.to,n.to):"";i=r.replaceSelection(O.state.toText(o+e.insert.sliceString(0,void 0,O.state.lineBreak)+l))}else{let o=r.changes(e),l=t&&t.main.to<=o.newLength?t.main:void 0;if(r.selection.ranges.length>1&&(O.inputState.composing>=0||O.inputState.compositionPendingChange)&&e.to<=n.to+10&&e.to>=n.to-10){let c=O.state.sliceDoc(e.from,e.to),h,f=t&&ld(O,t.main.head);if(f){let $=e.insert.length-(e.to-e.from);h={from:f.from,to:f.to-$}}else h=O.state.doc.lineAt(n.head);let u=n.to-e.to;i=r.changeByRange($=>{if($.from==n.from&&$.to==n.to)return{changes:o,range:l||$.map(o)};let Q=$.to-u,p=Q-c.length;if(O.state.sliceDoc(p,Q)!=c||Q>=h.from&&p<=h.to)return{range:$};let m=r.changes({from:p,to:Q,insert:e.insert}),g=$.to-n.to;return{changes:m,range:l?S.range(Math.max(0,l.anchor+g),Math.max(0,l.head+g)):$.map(m)}})}else i={changes:o,selection:l&&r.selection.replaceRange(l)}}let a="input.type";return(O.composing||O.inputState.compositionPendingChange&&O.inputState.compositionEndedAt>Date.now()-50)&&(O.inputState.compositionPendingChange=!1,a+=".compose",O.inputState.compositionFirstChange&&(a+=".start",O.inputState.compositionFirstChange=!1)),r.update(i,{userEvent:a,scrollIntoView:!0})}function dd(O,e,t,i){let r=Math.min(O.length,e.length),n=0;for(;n<r&&O.charCodeAt(n)==e.charCodeAt(n);)n++;if(n==r&&O.length==e.length)return null;let s=O.length,a=e.length;for(;s>0&&a>0&&O.charCodeAt(s-1)==e.charCodeAt(a-1);)s--,a--;if(i=="end"){let o=Math.max(0,n-Math.min(s,a));t-=s+o-n}if(s<n&&O.length<e.length){let o=t<=n&&t>=s?n-t:0;n-=o,a=n+(a-s),s=n}else if(a<n){let o=t<=n&&t>=a?n-t:0;n-=o,s=n+(s-a),a=n}return{from:n,toA:s,toB:a}}function DP(O){let e=[];if(O.root.activeElement!=O.contentDOM)return e;let{anchorNode:t,anchorOffset:i,focusNode:r,focusOffset:n}=O.observer.selectionRange;return t&&(e.push(new Sn(t,i)),(r!=t||n!=i)&&e.push(new Sn(r,n))),e}function IP(O,e){if(O.length==0)return null;let t=O[0].pos,i=O.length==2?O[1].pos:t;return t>-1&&i>-1?S.single(t+e,i+e):null}function Xn(O,e){return e.head==O.main.head&&e.anchor==O.main.anchor}var Aa=class{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastTouchX=0,this.lastTouchY=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.lastWheelEvent=0,this.pendingIOSKey=void 0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.insertingText="",this.insertingTextAt=0,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,Y.safari&&e.contentDOM.addEventListener("input",()=>null),Y.gecko&&aS(e.contentDOM.ownerDocument)}handleEvent(e){!eS(this.view,e)||this.ignoreDuringComposition(e)||e.type=="keydown"&&this.keydown(e)||(this.view.updateState!=0?Promise.resolve().then(()=>this.runHandlers(e.type,e)):this.runHandlers(e.type,e))}runHandlers(e,t){let i=this.handlers[e];if(i){for(let r of i.observers)r(this.view,t);for(let r of i.handlers){if(t.defaultPrevented)break;if(r(this.view,t)){t.preventDefault();break}}}}ensureHandlers(e){let t=BP(e),i=this.handlers,r=this.view.content
Line truncated
|
||||||
|
`))};if((Y.mac||Y.android)&&h.from==s-1&&/^\. ?$/.test(i.text)&&e.contentDOM.getAttribute("autocorrect")=="off"&&(h={from:a,to:o,insert:E.of([i.text.replace("."," ")])}),this.pendingContextChange=h,!e.state.readOnly){let f=this.to-this.from+(h.to-h.from+h.insert.length);yo(e,h,S.single(this.toEditorPos(i.selectionStart,f),this.toEditorPos(i.selectionEnd,f)))}this.pendingContextChange&&(this.revertPending(e.state),this.setSelection(e.state)),h.from<h.to&&!h.insert.length&&e.inputState.composing>=0&&!/[\\p{Alphabetic}\\p{Number}_]/.test(t.text.slice(Math.max(0,i.updateRangeStart-1),Math.min(t.text.length,i.updateRangeStart+1)))&&this.handlers.compositionend(i)},this.handlers.characterboundsupdate=i=>{let r=[],n=null;for(let s=this.toEditorPos(i.rangeStart),a=this.toEditorPos(i.rangeEnd);s<a;s++){let o=e.coordsForChar(s);n=o&&new DOMRect(o.left,o.top,o.right-o.left,o.bottom-o.top)||n||new DOMRect,r.push(n)}t.updateCharacterBounds(i.rangeStart,r)},this.handlers.textformatupdate=i=>{let r=[];for(let n of i.getTextFormats()){let s=n.underlineStyle,a=n.underlineThickness;if(!/none/i.test(s)&&!/none/i.test(a)){let o=this.toEditorPos(n.rangeStart),l=this.toEditorPos(n.rangeEnd);if(o<l){let c=`text-decoration: underline ${/^[a-z]/.test(s)?s+" ":s=="Dashed"?"dashed ":s=="Squiggle"?"wavy ":""}${/thin/i.test(a)?1:2}px`;r.push(_.mark({attributes:{style:c}}).range(o,l))}}}e.dispatch({effects:id.of(_.set(r))})},this.handlers.compositionstart=()=>{e.inputState.composing<0&&(e.inputState.composing=0,e.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{if(e.inputState.composing=-1,e.inputState.compositionFirstChange=null,this.composing){let{drifted:i}=this.composing;this.composing=null,i&&this.reset(e.state)}};for(let i in this.handlers)t.addEventListener(i,this.handlers[i]);this.measureReq={read:i=>{this.editContext.updateControlBounds(i.contentDOM.getBoundingClientRect());let r=Fi(i.root);r&&r.rangeCount&&this.editContext.updateSelectionBounds(r.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let t=0,i=!1,r=this.pendingContextChange;return e.changes.iterChanges((n,s,a,o,l)=>{if(i)return;let c=l.length-(s-n);if(r&&s>=r.to)if(r.from==n&&r.to==s&&r.insert.eq(l)){r=this.pendingContextChange=null,t+=c,this.to+=c;return}else r=null,this.revertPending(e.state);if(n+=t,s+=t,s<=this.from)this.from+=c,this.to+=c;else if(n<this.to){if(n<this.from||s>this.to||this.to-this.from+l.length>3e4){i=!0;return}this.editContext.updateText(this.toContextPos(n),this.toContextPos(s),l.toString()),this.to+=c}t+=c}),r&&!i&&this.revertPending(e.state),!i}update(e){let t=this.pendingContextChange,i=e.startState.selection.main;this.composing&&(this.composing.drifted||!e.changes.touchesRange(i.from,i.to)&&e.transactions.some(r=>!r.isUserEvent("input.type")&&r.changes.touchesRange(this.from,this.to)))?(this.composing.drifted=!0,this.composing.editorBase=e.changes.mapPos(this.composing.editorBase)):!this.applyEdits(e)||!this.rangeIsValid(e.state)?(this.pendingContextChange=null,this.reset(e.state)):(e.docChanged||e.selectionSet||t)&&this.setSelection(e.state),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:t}=e.selection.main;this.from=Math.max(0,t-1e4),this.to=Math.min(e.doc.length,t+1e4)}reset(e){this.resetRange(e),this.editContext.updateText(0,this.editContext.text.length,e.doc.sliceString(this.from,this.to)),this.setSelection(e)}revertPending(e){let t=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(t.from),this.toContextPos(t.from+t.insert.length),e.doc.sliceString(t.from,t.to))}setSelection(e){let{main:t}=e.selection,i=this.toContextPos(Math.max(this.from,Math.min(this.to,t.anchor))),r=this.toContextPos(t.head);(this.editContext.selectionStart!=i||this.editContext.selectionEnd!=r)&&this.editContext.updateSelection(i,r)}rangeIsValid(e){let{head:t}=e.selection.main;return!(this.from>0&&t-this.from<500||this.to<e.doc.length&&this.to-t<500||this.to-this.from>1e4*3)}toEditorPos(e,t=this.to-this.from){e=Math.min(e,t);let i=this.composing;return i&&i.drifted?i.editorBase+(e-i.contextBase):e+this.from}toContextPos(e){let t=this.composing;return t&&t.drifted?t.contextBase+(e-t.editorBase):e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}},T=class O{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return!!this.inputState&&this.inputState.composing>0}get compositionStarted(){return!!this.inputState&&this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){var t;this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRe
Line truncated
|
||||||
|
-\x7F-\x9F\xAD\u061C\u200B\u200E\u200F\u2028\u2029\u202D\u202E\u2066\u2067\u2069\uFEFF\uFFF9-\uFFFC]`,ao),RS={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"},Qa=null;function VS(){var O;if(Qa==null&&typeof document<"u"&&document.body){let e=document.body.style;Qa=((O=e.tabSize)!==null&&O!==void 0?O:e.MozTabSize)!=null}return Qa||!1}var fn=k.define({combine(O){let e=xe(O,{render:null,specialChars:ZS,addSpecialChars:null});return(e.replaceTabs=!VS())&&(e.specialChars=new RegExp(" |"+e.specialChars.source,ao)),e.addSpecialChars&&(e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,ao)),e}});function Vd(O={}){return[fn.of(O),US()]}var wf=null;function US(){return wf||(wf=he.fromClass(class{constructor(O){this.view=O,this.decorations=_.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(O.state.facet(fn)),this.decorations=this.decorator.createDeco(O)}makeDecorator(O){return new so({regexp:O.specialChars,decoration:(e,t,i)=>{let{doc:r}=t.state,n=Se(e[0],0);if(n==9){let s=r.lineAt(i),a=t.state.tabSize,o=Ye(s.text,a,i-s.from);return _.replace({widget:new lo((a-o%a)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[n]||(this.decorationCache[n]=_.replace({widget:new oo(O,n)}))},boundary:O.replaceTabs?void 0:/[^]/})}update(O){let e=O.state.facet(fn);O.startState.facet(fn)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(O.view)):this.decorations=this.decorator.updateDeco(O,this.decorations)}},{decorations:O=>O.decorations}))}var qS="\u2022";function zS(O){return O>=32?qS:O==10?"\u2424":String.fromCharCode(9216+O)}var oo=class extends Ze{constructor(e,t){super(),this.options=e,this.code=t}eq(e){return e.code==this.code}toDOM(e){let t=zS(this.code),i=e.state.phrase("Control character")+" "+(RS[this.code]||"0x"+this.code.toString(16)),r=this.options.render&&this.options.render(this.code,i,t);if(r)return r;let n=document.createElement("span");return n.textContent=t,n.title=i,n.setAttribute("aria-label",i),n.className="cm-specialChar",n}ignoreEvent(){return!1}},lo=class extends Ze{constructor(e){super(),this.width=e}eq(e){return e.width==this.width}toDOM(){let e=document.createElement("span");return e.textContent=" ",e.className="cm-tab",e.style.width=this.width+"px",e}ignoreEvent(){return!1}};function Ud(){return jS}var WS=_.line({class:"cm-activeLine"}),jS=he.fromClass(class{constructor(O){this.decorations=this.getDeco(O)}update(O){(O.docChanged||O.selectionSet)&&(this.decorations=this.getDeco(O.view))}getDeco(O){let e=-1,t=[];for(let i of O.state.selection.ranges){let r=O.lineBlockAt(i.head);r.from>e&&(t.push(WS.range(r.from)),e=r.from)}return _.set(t)}},{decorations:O=>O.decorations});var co=2e3;function CS(O,e,t){let i=Math.min(e.line,t.line),r=Math.max(e.line,t.line),n=[];if(e.off>co||t.off>co||e.col<0||t.col<0){let s=Math.min(e.off,t.off),a=Math.max(e.off,t.off);for(let o=i;o<=r;o++){let l=O.doc.line(o);l.length<=a&&n.push(S.range(l.from+s,l.to+a))}}else{let s=Math.min(e.col,t.col),a=Math.max(e.col,t.col);for(let o=i;o<=r;o++){let l=O.doc.line(o),c=Hr(l.text,s,O.tabSize,!0);if(c<0)n.push(S.cursor(l.to));else{let h=Hr(l.text,a,O.tabSize);n.push(S.range(l.from+c,l.from+h))}}}return n}function GS(O,e){let t=O.coordsAtPos(O.viewport.from);return t?Math.round(Math.abs((t.left-e)/O.defaultCharacterWidth)):-1}function kf(O,e){let t=O.posAtCoords({x:e.clientX,y:e.clientY},!1),i=O.state.doc.lineAt(t),r=t-i.from,n=r>co?-1:r==i.length?GS(O,e.clientX):Ye(i.text,O.state.tabSize,t-i.from);return{line:i.number,col:n,off:r}}function ES(O,e){let t=kf(O,e),i=O.state.selection;return t?{update(r){if(r.docChanged){let n=r.changes.mapPos(r.startState.doc.line(t.line).from),s=r.state.doc.lineAt(n);t={line:s.number,col:t.col,off:Math.min(t.off,s.length)},i=i.map(r.changes)}},get(r,n,s){let a=kf(O,r);if(!a)return i;let o=CS(O.state,t,a);return o.length?s?S.create(o.concat(i.ranges)):S.create(o):i}}:null}function qd(O){let e=O?.eventFilter||(t=>t.altKey&&t.button==0);return T.mouseSelectionStyle.of((t,i)=>e(i)?ES(t,i):null)}var AS={Alt:[18,O=>!!O.altKey],Control:[17,O=>!!O.ctrlKey],Shift:[16,O=>!!O.shiftKey],Meta:[91,O=>!!O.metaKey]},LS={style:"cursor: crosshair"};function zd(O={}){let[e,t]=AS[O.key||"Alt"],i=he.fromClass(class{constructor(r){this.view=r,this.isDown=!1}set(r){this.isDown!=r&&(this.isDown=r,this.view.update([]))}},{eventObservers:{keydown(r){this.set(r.keyCode==e||t(r))},keyup(r){(r.keyCode==e||!t(r))&&this.set(!1)},mousemove(r){this.set(t(r))}}});return[i,T.contentAttributes.o
Line truncated
|
||||||
|
`:i=="r"?"\r":i=="t"?" ":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord&&this.test==e.test}create(){return this.regexp?new fl(this):new hl(this)}getCursor(e,t=0,i){let r=e.doc?e:I.create({doc:e});return i==null&&(i=r.doc.length),this.regexp?pi(this,r,t,i):Qi(this,r,t,i)}},ls=class{constructor(e){this.spec=e}};function mT(O,e,t){return(i,r,n,s)=>{if(t&&!t(i,r,n,s))return!1;let a=i>=s&&r<=s+n.length?n.slice(i-s,r-s):e.doc.sliceString(i,r);return O(a,e,i,r)}}function Qi(O,e,t,i){let r;return O.wholeWord&&(r=gT(e.doc,e.charCategorizer(e.selection.main.head))),O.test&&(r=mT(O.test,e,r)),new lO(e.doc,O.unquoted,t,i,O.caseSensitive?void 0:n=>n.toLowerCase(),r)}function gT(O,e){return(t,i,r,n)=>((n>t||n+r.length<i)&&(n=Math.max(0,t-2),r=O.sliceString(n,Math.min(O.length,i+2))),(e(cs(r,t-n))!=ee.Word||e(hs(r,t-n))!=ee.Word)&&(e(hs(r,i-n))!=ee.Word||e(cs(r,i-n))!=ee.Word))}var hl=class extends ls{constructor(e){super(e)}nextMatch(e,t,i){let r=Qi(this.spec,e,i,e.doc.length).nextOverlapping();if(r.done){let n=Math.min(e.doc.length,t+this.spec.unquoted.length);r=Qi(this.spec,e,0,n).nextOverlapping()}return r.done||r.value.from==t&&r.value.to==i?null:r.value}prevMatchInRange(e,t,i){for(let r=i;;){let n=Math.max(t,r-1e4-this.spec.unquoted.length),s=Qi(this.spec,e,n,r),a=null;for(;!s.nextOverlapping().done;)a=s.value;if(a)return a;if(n==t)return null;r-=1e4}}prevMatch(e,t,i){let r=this.prevMatchInRange(e,0,t);return r||(r=this.prevMatchInRange(e,Math.max(0,i-this.spec.unquoted.length),e.doc.length)),r&&(r.from!=t||r.to!=i)?r:null}getReplacement(e){return this.spec.unquote(this.spec.replace)}matchAll(e,t){let i=Qi(this.spec,e,0,e.doc.length),r=[];for(;!i.next().done;){if(r.length>=t)return null;r.push(i.value)}return r}highlight(e,t,i,r){let n=Qi(this.spec,e,Math.max(0,t-this.spec.unquoted.length),Math.min(i+this.spec.unquoted.length,e.doc.length));for(;!n.next().done;)r(n.value.from,n.value.to)}};function PT(O,e,t){return(i,r,n)=>(!t||t(i,r,n))&&O(n[0],e,i,r)}function pi(O,e,t,i){let r;return O.wholeWord&&(r=ST(e.charCategorizer(e.selection.main.head))),O.test&&(r=PT(O.test,e,r)),new rs(e.doc,O.search,{ignoreCase:!O.caseSensitive,test:r},t,i)}function cs(O,e){return O.slice(ue(O,e,!1),e)}function hs(O,e){return O.slice(e,ue(O,e))}function ST(O){return(e,t,i)=>!i[0].length||(O(cs(i.input,i.index))!=ee.Word||O(hs(i.input,i.index))!=ee.Word)&&(O(hs(i.input,i.index+i[0].length))!=ee.Word||O(cs(i.input,i.index+i[0].length))!=ee.Word)}var fl=class extends ls{nextMatch(e,t,i){let r=pi(this.spec,e,i,e.doc.length).next();return r.done&&(r=pi(this.spec,e,0,t).next()),r.done?null:r.value}prevMatchInRange(e,t,i){for(let r=1;;r++){let n=Math.max(t,i-r*1e4),s=pi(this.spec,e,n,i),a=null;for(;!s.next().done;)a=s.value;if(a&&(n==t||a.from>n+10))return a;if(n==t)return null}}prevMatch(e,t,i){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,i,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&]|\d+)/g,(t,i)=>{if(i=="&")return e.match[0];if(i=="$")return"$";for(let r=i.length;r>0;r--){let n=+i.slice(0,r);if(n>0&&n<e.match.length)return e.match[n]+i.slice(r)}return t})}matchAll(e,t){let i=pi(this.spec,e,0,e.doc.length),r=[];for(;!i.next().done;){if(r.length>=t)return null;r.push(i.value)}return r}highlight(e,t,i,r){let n=pi(this.spec,e,Math.max(0,t-250),Math.min(i+250,e.doc.length));for(;!n.next().done;)r(n.value.from,n.value.to)}},$r=V.define(),Ql=V.define(),oO=fe.define({create(O){return new ur(dl(O).create(),null)},update(O,e){for(let t of e.effects)t.is($r)?O=new ur(t.value.create(),O.panel):t.is(Ql)&&(O=new ur(O.query,t.value?pl:null));return O},provide:O=>xO.from(O,e=>e.panel)});var ur=class{constructor(e,t){this.query=e,this.panel=t}},XT=_.mark({class:"cm-searchMatch"}),TT=_.mark({class:"cm-searchMatch cm-searchMatch-selected"}),yT=he.fromClass(class{constructor(O){this.view=O,this.decorations=this.highlight(O.state.field(oO))}update(O){let e=O.state.field(oO);(e!=O.startState.field(oO)||O.docChanged||O.selectionSet||O.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:O,panel:e}){if(!e||!O.spec.valid)return _.none;let{view:t}=this,i=new Me;for(let r=0,n=t.visibleRanges,s=n.length;r<s;r++){let{from:a,to:o}=n[r];for(;r<s-1&&o>n[r+1].from-500;)o=n[++r].to;O.highlight(t.state,a,o,(l,c)=>{let h=t.state.selection.ranges.some(f=>f.from==l&&f.to==c);i.add(l,c,h?TT:XT)})}return i.finish()}},{decorations:O=>O.decorations});function Qr(O){return e=>{let t=e.state.field(oO,!1);return t&&t.query.spec.valid?O(e,t):Z$(e)}}var fs=Qr((O,{query:e})=>{let{to:t}=O.state.selection.main,i=e.nextMatch(O.state,t,t);if(!i)return!1;let r=S.single(i.from,i.to),n=O.state.facet(mi);return O.dispatch({selection:r,effects:[ml(O,i),n.scrollToMatch(r.main,O)],userEvent:"select.search"}),_$(O),!0}),ds=Qr((O,{query:e})=>{let{state:t}=O,{from:i}=t.selection.main,r=e.prevMatch(t,i,i);if(!r)ret
Line truncated
|
||||||
|
\${}
|
||||||
|
}`,{label:"select",detail:"statement",type:"keyword"}),j("case ${}:\n${}",{label:"case",type:"keyword"}),j("switch ${} {\n ${}\n}",{label:"switch",detail:"statement",type:"keyword"}),j("switch ${}.(${type}) {\n ${}\n}",{label:"switch",detail:"type statement",type:"keyword"}),j("if ${} {\n ${}\n}",{label:"if",detail:"block",type:"keyword"}),j(`if \${} {
|
||||||
|
\${}
|
||||||
|
} else {
|
||||||
|
\${}
|
||||||
|
}`,{label:"if",detail:"/ else block",type:"keyword"}),j('import ${name} "${module}"\n${}',{label:"import",detail:"declaration",type:"keyword"})],GQ=new yt,AQ=new Set(["SourceFile","Block","FunctionDecl","MethodDecl","FunctionLiteral","ForStatement","SwitchStatement","TypeSwitchStatement","IfStatement"]);function Xi(O,e){return(t,i)=>{e:for(let r=t.node.firstChild,n=0,s=null;;){for(;!r;){if(!n)break e;n--,r=s.nextSibling,s=s.parent}e&&r.name==e||r.name=="SpecList"?(n++,s=r,r=r.firstChild):(r.name=="DefName"&&i(r,O),r=r.nextSibling)}return!0}}var $b={FunctionDecl:Xi("function"),VarDecl:Xi("var","VarSpec"),ConstDecl:Xi("constant","ConstSpec"),TypeDecl:Xi("type","TypeSpec"),ImportDecl:Xi("constant","ImportSpec"),Parameter:Xi("var"),__proto__:null};function LQ(O,e){let t=GQ.get(e);if(t)return t;let i=[],r=!0;function n(s,a){let o=O.sliceString(s.from,s.to);i.push({label:o,type:a})}return e.cursor(C.IncludeAnonymous).iterate(s=>{if(r)r=!1;else if(s.name){let a=$b[s.name];if(a&&a(s,n)||AQ.has(s.name))return!1}else if(s.to-s.from>8192){for(let a of LQ(O,s.node))i.push(a);return!1}}),GQ.set(e,i),i}var EQ=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,MQ=["String","LineComment","BlockComment","DefName","LabelName","FieldName",".","?."],Qb=O=>{let e=W(O.state).resolveInner(O.pos,-1);if(MQ.indexOf(e.name)>-1)return null;let t=e.name=="VariableName"||e.to-e.from<20&&EQ.test(O.state.sliceDoc(e.from,e.to));if(!t&&!O.explicit)return null;let i=[];for(let r=e;r;r=r.parent)AQ.has(r.name)&&(i=i.concat(LQ(O.state.doc,r)));return{options:i,from:t?e.from:O.pos,validFor:EQ}},Oc=ne.define({name:"go",parser:CQ.configure({props:[se.add({IfStatement:le({except:/^\s*({|else\b)/}),LabeledStatement:sO,"SwitchBlock SelectBlock":O=>{let e=O.textAfter,t=/^\s*\}/.test(e),i=/^\s*(case|default)\b/.test(e);return O.baseIndent+(t||i?0:O.unit)},Block:ye({closing:"}"}),BlockComment:()=>null,Statement:le({except:/^{/})}),te.add({"Block SwitchBlock SelectBlock LiteralValue InterfaceType StructType SpecList":me,BlockComment(O){return{from:O.from+2,to:O.to-2}}})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case\b|default\b|\})$/}}),pb=O=>({label:O,type:"keyword"}),mb="interface struct chan map package go return break continue goto fallthrough else defer range true false nil".split(" ").map(pb);function DQ(){let O=ub.concat(mb);return new J(Oc,[Oc.data.of({autocomplete:cO(MQ,zt(O))}),Oc.data.of({autocomplete:Qb})])}var gb=55,Pb=1,Sb=56,Xb=2,Tb=57,yb=3,IQ=4,bb=5,ac=6,tp=7,Op=8,ip=9,rp=10,xb=11,wb=12,kb=13,ic=58,vb=14,Yb=15,BQ=59,np=21,_b=23,sp=24,Zb=25,nc=27,ap=28,Rb=29,Vb=32,Ub=35,qb=37,zb=38,Wb=0,jb=1,Cb={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},Gb={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},NQ={dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}};function Eb(O){return O==45||O==46||O==58||O>=65&&O<=90||O==95||O>=97&&O<=122||O>=161}var FQ=null,HQ=null,KQ=0;function sc(O,e){let t=O.pos+e;if(KQ==t&&HQ==O)return FQ;let i=O.peek(e),r="";for(;Eb(i);)r+=String.fromCharCode(i),i=O.peek(++e);return HQ=O,KQ=t,FQ=r?r.toLowerCase():i==Ab||i==Lb?void 0:null}var op=60,xs=62,oc=47,Ab=63,Lb=33,Mb=45;function JQ(O,e){this.name=O,this.parent=e}var Db=[ac,rp,tp,Op,ip],Ib=new Ee({start:null,shift(O,e,t,i){return Db.indexOf(e)>-1?new JQ(sc(i,1)||"",O):O},reduce(O,e){return e==np&&O?O.parent:O},reuse(O,e,t,i){let r=e.type.id;return r==ac||r==qb?new JQ(sc(i,1)||"",O):O},strict:!1}),Bb=new q((O,e)=>{if(O.next!=op){O.next<0&&e.context&&O.acceptToken(ic);return}O.advance();let t=O.next==oc;t&&O.advance();let i=sc(O,0);if(i===void 0)return;if(!i)return O.acceptToken(t?Yb:vb);let r=e.context?e.context.name:null;if(t){if(i==r)return O.acceptToken(xb);if(r&&Gb[r])return O.acceptToken(ic,-2);if(e.dialectEnabled(Wb))return O.acceptToken(wb);for(let n=e.context;n;n=n.parent)if(n.name==i)return;O.acceptToken(kb)}else{if(i=="script")return O.acceptToken(tp);if(i=="style")return O.acceptToken(Op);if(i=="textarea")return O.acceptToken(ip);if(Cb.hasOwnProperty(i))return O.acceptToken(rp);r&&NQ[r]&&NQ[r][i]?O.acceptToken(ic,-1):O.acceptToken(ac)}},{contextual:!0}),Nb=new q(O=>{for(let e=0,t=0;;t++){if(O.next<0){t&&O.acceptToken(BQ);break}if(O.next==Mb)e++;else if(O.next==xs&&e>=2){t>=3&&O.acceptToken(BQ,-2);break}else e=0;O.advance()}});function Fb(O){for(;O;O=O.parent)if(O.name=="svg"||O.name=="math")return!0;return!1}var Hb=new q((
Line truncated
|
||||||
|
\${}
|
||||||
|
} catch (\${error}) {
|
||||||
|
\${}
|
||||||
|
}`,{label:"try",detail:"/ catch block",type:"keyword"}),j("if (${}) {\n ${}\n}",{label:"if",detail:"block",type:"keyword"}),j(`if (\${}) {
|
||||||
|
\${}
|
||||||
|
} else {
|
||||||
|
\${}
|
||||||
|
}`,{label:"if",detail:"/ else block",type:"keyword"}),j(`class \${name} {
|
||||||
|
constructor(\${params}) {
|
||||||
|
\${}
|
||||||
|
}
|
||||||
|
}`,{label:"class",detail:"definition",type:"keyword"}),j('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),j('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],Zx=pp.concat([j("interface ${name} {\n ${}\n}",{label:"interface",detail:"definition",type:"keyword"}),j("type ${name} = ${type}",{label:"type",detail:"definition",type:"keyword"}),j("enum ${name} {\n ${}\n}",{label:"enum",detail:"definition",type:"keyword"})]),up=new yt,mp=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function xr(O){return(e,t)=>{let i=e.node.getChild("VariableDefinition");return i&&t(i,O),!0}}var Rx=["FunctionDeclaration"],Vx={FunctionDeclaration:xr("function"),ClassDeclaration:xr("class"),ClassExpression:()=>!0,EnumDeclaration:xr("constant"),TypeAliasDeclaration:xr("type"),NamespaceDeclaration:xr("namespace"),VariableDefinition(O,e){O.matchContext(Rx)||e(O,"variable")},TypeDefinition(O,e){e(O,"type")},__proto__:null};function gp(O,e){let t=up.get(e);if(t)return t;let i=[],r=!0;function n(s,a){let o=O.sliceString(s.from,s.to);i.push({label:o,type:a})}return e.cursor(C.IncludeAnonymous).iterate(s=>{if(r)r=!1;else if(s.name){let a=Vx[s.name];if(a&&a(s,n)||mp.has(s.name))return!1}else if(s.to-s.from>8192){for(let a of gp(O,s.node))i.push(a);return!1}}),up.set(e,i),i}var $p=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,Pp=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName","JSXText","JSXAttributeValue","JSXOpenTag","JSXCloseTag","JSXSelfClosingTag",".","?."];function Ux(O){let e=W(O.state).resolveInner(O.pos,-1);if(Pp.indexOf(e.name)>-1)return null;let t=e.name=="VariableName"||e.to-e.from<20&&$p.test(O.state.sliceDoc(e.from,e.to));if(!t&&!O.explicit)return null;let i=[];for(let r=e;r;r=r.parent)mp.has(r.name)&&(i=i.concat(gp(O.state.doc,r)));return{options:i,from:t?e.from:O.pos,validFor:$p}}var mt=ne.define({name:"javascript",parser:dp.configure({props:[se.add({IfStatement:le({except:/^\s*({|else\b)/}),TryStatement:le({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:sO,SwitchBody:O=>{let e=O.textAfter,t=/^\s*\}/.test(e),i=/^\s*(case|default)\b/.test(e);return O.baseIndent+(t?0:i?1:2)*O.unit},Block:ye({closing:"}"}),ArrowFunction:O=>O.baseIndent+O.unit,"TemplateString BlockComment":()=>null,"Statement Property":le({except:/^\s*{/}),JSXElement(O){let e=/^\s*<\//.test(O.textAfter);return O.lineIndent(O.node.from)+(e?0:O.unit)},JSXEscape(O){let e=/\s*\}/.test(O.textAfter);return O.lineIndent(O.node.from)+(e?0:O.unit)},"JSXOpenTag JSXSelfClosingTag"(O){return O.column(O.node.from)+O.unit}}),te.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":me,BlockComment(O){return{from:O.from+2,to:O.to-2}},JSXElement(O){let e=O.firstChild;if(!e||e.name=="JSXSelfClosingTag")return null;let t=O.lastChild;return{from:e.to,to:t.type.isError?O.to:t.from}},"JSXSelfClosingTag JSXOpenTag"(O){var e;let t=(e=O.firstChild)===null||e===void 0?void 0:e.nextSibling,i=O.lastChild;return!t||t.type.isError?null:{from:t.to,to:i.type.isError?O.to:i.from}}})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),Sp={test:O=>/^JSX/.test(O.name),facet:or({commentTokens:{block:{open:"{/*",close:"*/}"}}})},uc=mt.configure({dialect:"ts"},"typescript"),$c=mt.configure({dialect:"jsx",props:[Dn.add(O=>O.isTop?[Sp]:void 0)]}),Qc=mt.configure({dialect:"jsx ts",props:[Dn.add(O=>O.isTop?[Sp]:void 0)]},"typescript"),Xp=O=>({label:O,type:"keyword"}),Tp="break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(Xp),qx=Tp.concat(["declare","implements","private","protected","public"].map(Xp));function ws(O={}){let e=O.jsx?O.typescript?Qc:$c:O.typescript?uc:mt,t=O.typescript?Zx.concat(qx):pp.concat(Tp);return new J(e,[mt.data.of({autocomplete:cO(Pp,zt(t))}),mt.data.of({autocomplete:Ux}),O.jsx?jx:[]])}function zx(O){for(;;){if(O.name=="JSXOpenTag"||O.name=="JSXSelfClosingTag"||O.name=="JSXFragmentTag")return O;if(O.name=="JSXEscape"||!O.parent)return null;O=O.parent}}function Qp(O,e,t=O.length){for(let i=e?.firstChild;i;i=i.nextSibling)if(i.name=="JSXIdentifier"||i.name=="JSXBuiltin"||i.name=="JSXNamespacedName"||i.name=="JSXMemberExpression")return O.sliceString(i.from,Math.min(i.to,t));return""}var Wx=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),jx=T.inputHandler.of((O,e,t,i,r)=>{if((Wx?O.composing:O.compositionStarted)||O.state.readOnly||e!=t||i!=">"&&i!="/"||!mt.isActiveAt(O.state,e,-1))return!1;let n=r(),{state:s}=n,a=s.changeByRange(o=>{var l;let{head:c}=o,h=W(s).resolveInner(c-1,-1),f;if(h.
Line truncated
|
||||||
|
`+t.scrub(),n=this.advance(r);return n>-1&&n<r.length?this.complete(e,i,n):!1}finish(e,t){return(this.stage==2||this.stage==3)&&vr(t.content,this.pos)==t.content.length?this.complete(e,t,t.content.length):!1}complete(e,t,i){return e.addLeafElement(t,M(y.LinkReference,this.start,this.start+i,this.elts)),!0}nextStage(e){return e?(this.pos=e.to-this.start,this.elts.push(e),this.stage++,!0):(e===!1&&(this.stage=-1),!1)}advance(e){for(;;){if(this.stage==-1)return-1;if(this.stage==0){if(!this.nextStage(dm(e,this.pos,this.start,!0)))return-1;if(e.charCodeAt(this.pos)!=58)return this.stage=-1;this.elts.push(M(y.LinkMark,this.pos+this.start,this.pos+this.start+1)),this.pos++}else if(this.stage==1){if(!this.nextStage(hm(e,vr(e,this.pos),this.start)))return-1}else if(this.stage==2){let t=vr(e,this.pos),i=0;if(t>this.pos){let r=fm(e,t,this.start);if(r){let n=Sc(e,r.to-this.start);n>0&&(this.nextStage(r),i=n)}}return i||(i=Sc(e,this.pos)),i>0&&i<e.length?i:-1}else return Sc(e,this.pos)}}};function Sc(O,e){for(;e<O.length;e++){let t=O.charCodeAt(e);if(t==10)break;if(!ct(t))return-1}return e}var kc=class{nextLine(e,t,i){let r=t.depth<e.stack.length?-1:Om(t),n=t.next;if(r<0)return!1;let s=M(y.HeaderMark,e.lineStart+t.pos,e.lineStart+r);return e.nextLine(),e.addLeafElement(i,M(n==61?y.SetextHeading1:y.SetextHeading2,i.start,e.prevLineEnd(),[...e.parser.parseInline(i.content,i.start),s])),!0}finish(){return!1}},sm={LinkReference(O,e){return e.content.charCodeAt(0)==91?new wc(e):null},SetextHeading(){return new kc}},Kx=[(O,e)=>tm(e)>=0,(O,e)=>Kp(e)>=0,(O,e)=>Jp(e)>=0,(O,e)=>Uc(e,O,!0)>=0,(O,e)=>qc(e,O,!0)>=0,(O,e)=>Vc(e,O,!0)>=0,(O,e)=>nm(e,O,!0)>=0],Jx={text:"",end:0},vc=class{constructor(e,t,i,r){this.parser=e,this.input=t,this.ranges=r,this.line=new yc,this.atEnd=!1,this.reusePlaceholders=new Map,this.stoppedAt=null,this.rangeI=0,this.to=r[r.length-1].to,this.lineStart=this.absoluteLineStart=this.absoluteLineEnd=r[0].from,this.block=_s.create(y.Document,0,this.lineStart,0,0),this.stack=[this.block],this.fragments=i.length?new Zc(i,t):null,this.readLine()}get parsedPos(){return this.absoluteLineStart}advance(){if(this.stoppedAt!=null&&this.absoluteLineStart>this.stoppedAt)return this.finish();let{line:e}=this;for(;;){for(let i=0;;){let r=e.depth<this.stack.length?this.stack[this.stack.length-1]:null;for(;i<e.markers.length&&(!r||e.markers[i].from<r.end);){let n=e.markers[i++];this.addNode(n.type,n.from,n.to)}if(!r)break;this.finishContext()}if(e.pos<e.text.length)break;if(!this.nextLine())return this.finish()}if(this.fragments&&this.reuseFragment(e.basePos))return null;e:for(;;){for(let i of this.parser.blockParsers)if(i){let r=i(this,e);if(r!=!1){if(r==!0)return null;e.forward();continue e}}break}let t=new Tc(this.lineStart+e.pos,e.text.slice(e.pos));for(let i of this.parser.leafBlockParsers)if(i){let r=i(this,t);r&&t.parsers.push(r)}e:for(;this.nextLine()&&e.pos!=e.text.length;){if(e.indent<e.baseIndent+4){for(let i of this.parser.endLeafBlock)if(i(this,e,t))break e}for(let i of t.parsers)if(i.nextLine(this,e,t))return null;t.content+=`
|
||||||
|
`+e.scrub();for(let i of e.markers)t.marks.push(i)}return this.finishLeaf(t),null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=e}reuseFragment(e){if(!this.fragments.moveTo(this.absoluteLineStart+e,this.absoluteLineStart)||!this.fragments.matches(this.block.hash))return!1;let t=this.fragments.takeNodes(this);return t?(this.absoluteLineStart+=t,this.lineStart=um(this.absoluteLineStart,this.ranges),this.moveRangeI(),this.absoluteLineStart<this.to?(this.lineStart++,this.absoluteLineStart++,this.readLine()):(this.atEnd=!0,this.readLine()),!0):!1}get depth(){return this.stack.length}parentType(e=this.depth-1){return this.parser.nodeSet.types[this.stack[e].type]}nextLine(){return this.lineStart+=this.line.text.length,this.absoluteLineEnd>=this.to?(this.absoluteLineStart=this.absoluteLineEnd,this.atEnd=!0,this.readLine(),!1):(this.lineStart++,this.absoluteLineStart=this.absoluteLineEnd+1,this.moveRangeI(),this.readLine(),!0)}peekLine(){return this.scanLine(this.absoluteLineEnd+1).text}moveRangeI(){for(;this.rangeI<this.ranges.length-1&&this.absoluteLineStart>=this.ranges[this.rangeI].to;)this.rangeI++,this.absoluteLineStart=Math.max(this.absoluteLineStart,this.ranges[this.rangeI].from)}scanLine(e){let t=Jx;if(t.end=e,e>=this.to)t.text="";else if(t.text=this.lineChunkAt(e),t.end+=t.text.length,this.ranges.length>1){let i=this.absoluteLineStart,r=this.rangeI;for(;this.ranges[r].to<t.end;){r++;let n=this.ranges[r].from,s=this.lineChunkAt(n);t.end=n+s.length,t.text=t.text.slice(0,this.ranges[r-1].to-i)+s,i=t.end-t.text.length}}return t}readLine(){let{line:e}=this,{text:t,end:i}=this.scanLine(this.absoluteLineStart);for(this.absoluteLineEnd=i,e.reset(t);e.depth<this.stack.length;e.depth++){let r=this.stack[e.depth],n=this.parser.skipContextMarkup[r.type];if(!n)throw new Error("Unhandled block context "+y[r.type]);let s=this.line.markers.length;if(!n(r,this,e)){this.line.markers.length>s&&(r.end=this.line.markers[this.line.markers.length-1].to),e.forward();break}e.forward()}}lineChunkAt(e){let t=this.input.chunk(e),i;if(this.input.lineChunks)i=t==`
|
||||||
|
`?"":t;else{let r=t.indexOf(`
|
||||||
|
`);i=r<0?t:t.slice(0,r)}return e+i.length>this.to?i.slice(0,this.to-e):i}prevLineEnd(){return this.atEnd?this.lineStart:this.lineStart-1}startContext(e,t,i=0){this.block=_s.create(e,i,this.lineStart+t,this.block.hash,this.lineStart+this.line.text.length),this.stack.push(this.block)}startComposite(e,t,i=0){this.startContext(this.parser.getNodeType(e),t,i)}addNode(e,t,i){typeof e=="number"&&(e=new D(this.parser.nodeSet.types[e],xi,xi,(i??this.prevLineEnd())-t)),this.block.addChild(e,t-this.block.from)}addElement(e){this.block.addChild(e.toTree(this.parser.nodeSet),e.from-this.block.from)}addLeafElement(e,t){this.addNode(this.buffer.writeElements(_c(t.children,e.marks),-t.from).finish(t.type,t.to-t.from),t.from)}finishContext(){let e=this.stack.pop(),t=this.stack[this.stack.length-1];t.addChild(e.toTree(this.parser.nodeSet),e.from-t.from),this.block=t}finish(){for(;this.stack.length>1;)this.finishContext();return this.addGaps(this.block.toTree(this.parser.nodeSet,this.lineStart))}addGaps(e){return this.ranges.length>1?am(this.ranges,0,e.topNode,this.ranges[0].from,this.reusePlaceholders):e}finishLeaf(e){for(let i of e.parsers)if(i.finish(this,e))return;let t=_c(this.parser.parseInline(e.content,e.start),e.marks);this.addNode(this.buffer.writeElements(t,-e.start).finish(y.Paragraph,e.content.length),e.start)}elt(e,t,i,r){return typeof e=="string"?M(this.parser.getNodeType(e),t,i,r):new Rs(e,t)}get buffer(){return new Zs(this.parser.nodeSet)}};function am(O,e,t,i,r){let n=O[e].to,s=[],a=[],o=t.from+i;function l(c,h){for(;h?c>=n:c>n;){let f=O[e+1].from-n;i+=f,c+=f,e++,n=O[e].to}}for(let c=t.firstChild;c;c=c.nextSibling){l(c.from+i,!0);let h=c.from+i,f,u=r.get(c.tree);u?f=u:c.to+i>n?(f=am(O,e,c,i,r),l(c.to+i,!1)):f=c.toTree(),s.push(f),a.push(h-o)}return l(t.to+i,!1),new D(t.type,s,a,t.to+i-o,t.tree?t.tree.propValues:void 0)}var _r=class O extends eO{constructor(e,t,i,r,n,s,a,o,l){super(),this.nodeSet=e,this.blockParsers=t,this.leafBlockParsers=i,this.blockNames=r,this.endLeafBlock=n,this.skipContextMarkup=s,this.inlineParsers=a,this.inlineNames=o,this.wrappers=l,this.nodeTypes=Object.create(null);for(let c of e.types)this.nodeTypes[c.name]=c.id}createParse(e,t,i){let r=new vc(this,e,t,i);for(let n of this.wrappers)r=n(r,e,t,i);return r}configure(e){let t=Yc(e);if(!t)return this;let{nodeSet:i,skipContextMarkup:r}=this,n=this.blockParsers.slice(),s=this.leafBlockParsers.slice(),a=this.blockNames.slice(),o=this.inlineParsers.slice(),l=this.inlineNames.slice(),c=this.endLeafBlock.slice(),h=this.wrappers;if(kr(t.defineNodes)){r=Object.assign({},r);let f=i.types.slice(),u;for(let $ of t.defineNodes){let{name:Q,block:p,composite:m,style:g}=typeof $=="string"?{name:$}:$;if(f.some(X=>X.name==Q))continue;m&&(r[f.length]=(X,b,w)=>m(b,w,X.value));let P=f.length,x=m?["Block","BlockContext"]:p?P>=y.ATXHeading1&&P<=y.SetextHeading2?["Block","LeafBlock","Heading"]:["Block","LeafBlock"]:void 0;f.push(de.define({id:P,name:Q,props:x&&[[R.group,x]]})),g&&(u||(u={}),Array.isArray(g)||g instanceof Ne?u[Q]=g:Object.assign(u,g))}i=new Kt(f),u&&(i=i.extend(F(u)))}if(kr(t.props)&&(i=i.extend(...t.props)),kr(t.remove))for(let f of t.remove){let u=this.blockNames.indexOf(f),$=this.inlineNames.indexOf(f);u>-1&&(n[u]=s[u]=void 0),$>-1&&(o[$]=void 0)}if(kr(t.parseBlock))for(let f of t.parseBlock){let u=a.indexOf(f.name);if(u>-1)n[u]=f.parse,s[u]=f.leaf;else{let $=f.before?Ys(a,f.before):f.after?Ys(a,f.after)+1:a.length-1;n.splice($,0,f.parse),s.splice($,0,f.leaf),a.splice($,0,f.name)}f.endLeaf&&c.push(f.endLeaf)}if(kr(t.parseInline))for(let f of t.parseInline){let u=l.indexOf(f.name);if(u>-1)o[u]=f.parse;else{let $=f.before?Ys(l,f.before):f.after?Ys(l,f.after)+1:l.length-1;o.splice($,0,f.parse),l.splice($,0,f.name)}}return t.wrap&&(h=h.concat(t.wrap)),new O(i,n,s,a,c,r,o,l,h)}getNodeType(e){let t=this.nodeTypes[e];if(t==null)throw new RangeError(`Unknown node type '${e}'`);return t}parseInline(e,t){let i=new Rr(this,e,t);e:for(let r=t;r<i.end;){let n=i.char(r);for(let s of this.inlineParsers)if(s){let a=s(i,n,r);if(a>=0){r=a;continue e}}r++}return i.resolveMarkers(0)}};function kr(O){return O!=null&&O.length>0}function Yc(O){if(!Array.isArray(O))return O;if(O.length==0)return null;let e=Yc(O[0]);if(O.length==1)return e;let t=Yc(O.slice(1));if(!t||!e)return e||t;let i=(s,a)=>(s||xi).concat(a||xi),r=e.wrap,n=t.wrap;return{props:i(e.props,t.props),defineNodes:i(e.defineNodes,t.defineNodes),parseBlock:i(e.parseBlock,t.parseBlock),parseInline:i(e.parseInline,t.parseInline),remove:i(e.remove,t.remove),wrap:r?n?(s,a,o,l)=>r(n(s,a,o,l),a,o,l):r:n}}function Ys(O,e){let t=O.indexOf(e);if(t<0)throw new RangeError(`Position specified relative to unknown parser ${e}`);return t}var om=[de.none];for(let O=1,e;e=y[O];O++)om[O]=de.define({id:O,name:e,props:O>=y.Escape?[]:[[R.group,O in Hp?["Block","BlockContext"]:["Block","LeafBlock"]]],top:e=="Document"});var xi=[],Zs=class{constructor(e){this.nodeSet=e,this.content=[],this.nodes=[]}write(e,t,i,r=0){return t
Line truncated
|
||||||
|
`;)n--;this.fragmentEnd=n?n-1:0}let i=this.cursor;i||(i=this.cursor=this.fragment.tree.cursor(),i.firstChild());let r=e+this.fragment.offset;for(;i.to<=r;)if(!i.parent())return!1;for(;;){if(i.from>=r)return this.fragment.from<=t;if(!i.childAfter(r))return!1}}matches(e){let t=this.cursor.tree;return t&&t.prop(R.contextHash)==e}takeNodes(e){let t=this.cursor,i=this.fragment.offset,r=this.fragmentEnd-(this.fragment.openEnd?1:0),n=e.absoluteLineStart,s=n,a=e.block.children.length,o=s,l=a;for(;;){if(t.to-i>r){if(t.type.isAnonymous&&t.firstChild())continue;break}let c=um(t.from-i,e.ranges);if(t.to-i<=e.ranges[e.rangeI].to)e.addNode(t.tree,c);else{let h=new D(e.parser.nodeSet.types[y.Paragraph],[],[],0,e.block.hashProp);e.reusePlaceholders.set(h,t.tree),e.addNode(h,c)}if(t.type.is("Block")&&(tw.indexOf(t.type.id)<0?(s=t.to-i,a=e.block.children.length):(s=o,a=l),o=t.to-i,l=e.block.children.length),!t.nextSibling())break}for(;e.block.children.length>a;)e.block.children.pop(),e.block.positions.pop();return s-n}};function um(O,e){let t=O;for(let i=1;i<e.length;i++){let r=e[i-1].to,n=e[i].from;r<O&&(t-=n-r)}return t}var Ow=F({"Blockquote/...":d.quote,HorizontalRule:d.contentSeparator,"ATXHeading1/... SetextHeading1/...":d.heading1,"ATXHeading2/... SetextHeading2/...":d.heading2,"ATXHeading3/...":d.heading3,"ATXHeading4/...":d.heading4,"ATXHeading5/...":d.heading5,"ATXHeading6/...":d.heading6,"Comment CommentBlock":d.comment,Escape:d.escape,Entity:d.character,"Emphasis/...":d.emphasis,"StrongEmphasis/...":d.strong,"Link/... Image/...":d.link,"OrderedList/... BulletList/...":d.list,"BlockQuote/...":d.quote,"InlineCode CodeText":d.monospace,"URL Autolink":d.url,"HeaderMark HardBreak QuoteMark ListMark LinkMark EmphasisMark CodeMark":d.processingInstruction,"CodeInfo LinkLabel":d.labelName,LinkTitle:d.string,Paragraph:d.content}),$m=new _r(new Kt(om).extend(Ow),Object.keys(vs).map(O=>vs[O]),Object.keys(vs).map(O=>sm[O]),Object.keys(vs),Kx,Hp,Object.keys(Xc).map(O=>Xc[O]),Object.keys(Xc),[]);function iw(O,e,t){let i=[];for(let r=O.firstChild,n=e;;r=r.nextSibling){let s=r?r.from:t;if(s>n&&i.push({from:n,to:s}),!r)break;n=r.to}return i}function Qm(O){let{codeParser:e,htmlParser:t}=O;return{wrap:kO((r,n)=>{let s=r.type.id;if(e&&(s==y.CodeBlock||s==y.FencedCode)){let a="";if(s==y.FencedCode){let l=r.node.getChild(y.CodeInfo);l&&(a=n.read(l.from,l.to))}let o=e(a);if(o)return{parser:o,overlay:l=>l.type.id==y.CodeText,bracketed:s==y.FencedCode}}else if(t&&(s==y.HTMLBlock||s==y.HTMLTag||s==y.CommentBlock))return{parser:t,overlay:iw(r.node,r.from,r.to)};return null})}}var rw={resolve:"Strikethrough",mark:"StrikethroughMark"},nw={defineNodes:[{name:"Strikethrough",style:{"Strikethrough/...":d.strikethrough}},{name:"StrikethroughMark",style:d.processingInstruction}],parseInline:[{name:"Strikethrough",parse(O,e,t){if(e!=126||O.char(t+1)!=126||O.char(t+2)==126)return-1;let i=O.slice(t-1,t),r=O.slice(t+2,t+3),n=/\s|^$/.test(i),s=/\s|^$/.test(r),a=Zr.test(i),o=Zr.test(r);return O.addDelimiter(rw,t,t+2,!s&&(!o||n||a),!n&&(!a||s||o))},after:"Emphasis"}]};function Yr(O,e,t=0,i,r=0){let n=0,s=!0,a=-1,o=-1,l=!1,c=()=>{i.push(O.elt("TableCell",r+a,r+o,O.parser.parseInline(e.slice(a,o),r+a)))};for(let h=t;h<e.length;h++){let f=e.charCodeAt(h);f==124&&!l?((!s||a>-1)&&n++,s=!1,i&&(a>-1&&c(),i.push(O.elt("TableDelimiter",h+r,h+r+1))),a=o=-1):(l||f!=32&&f!=9)&&(a<0&&(a=h),o=h+1),l=!l&&f==92}return a>-1&&(n++,i&&c()),n}function Lp(O,e){for(let t=e;t<O.length;t++){let i=O.charCodeAt(t);if(i==124)return!0;i==92&&t++}return!1}var pm=/^\|?(\s*:?-+:?\s*\|)+(\s*:?-+:?\s*)?$/,Us=class{constructor(){this.rows=null}nextLine(e,t,i){if(this.rows==null){this.rows=!1;let r;if((t.next==45||t.next==58||t.next==124)&&pm.test(r=t.text.slice(t.pos))){let n=[];Yr(e,i.content,0,n,i.start)==Yr(e,r,t.pos)&&(this.rows=[e.elt("TableHeader",i.start,i.start+i.content.length,n),e.elt("TableDelimiter",e.lineStart+t.pos,e.lineStart+t.text.length)])}}else if(this.rows){let r=[];Yr(e,t.text,t.pos,r,e.lineStart),this.rows.push(e.elt("TableRow",e.lineStart+t.pos,e.lineStart+t.text.length,r))}return!1}finish(e,t){return this.rows?(e.addLeafElement(t,e.elt("Table",t.start,t.start+t.content.length,this.rows)),!0):!1}},sw={defineNodes:[{name:"Table",block:!0},{name:"TableHeader",style:{"TableHeader/...":d.heading}},"TableRow",{name:"TableCell",style:d.content},{name:"TableDelimiter",style:d.processingInstruction}],parseBlock:[{name:"Table",leaf(O,e){return Lp(e.content,0)?new Us:null},endLeaf(O,e,t){if(t.parsers.some(r=>r instanceof Us)||!Lp(e.text,e.basePos))return!1;let i=O.peekLine();return pm.test(i)&&Yr(O,e.text,e.basePos)==Yr(O,i,e.basePos)},before:"SetextHeading"}]},Rc=class{nextLine(){return!1}finish(e,t){return e.addLeafElement(t,e.elt("Task",t.start,t.start+t.content.length,[e.elt("TaskMarker",t.start,t.start+3),...e.parser.parseInline(t.content.slice(3),t.start+3)])),!0}},aw={defineNodes:[{name:"Task",block:!0,style:d.list},{name:"TaskMarker",style:d.atom}],parseBlock:[{name
Line truncated
|
||||||
|
|
||||||
|
`,{label:"if",detail:"block",type:"keyword"}),j("if ${}:\n ${}\nelse:\n ${}",{label:"if",detail:"/ else block",type:"keyword"}),j("class ${name}:\n def __init__(self, ${params}):\n ${}",{label:"class",detail:"definition",type:"keyword"}),j("import ${module}",{label:"import",detail:"statement",type:"keyword"}),j("from ${module} import ${names}",{label:"from",detail:"import",type:"keyword"})],lY=cO(Og,zt(aY.concat(oY)));function Nc(O){let{node:e,pos:t}=O,i=O.lineIndent(t,-1),r=null;for(;;){let n=e.childBefore(t);if(n)if(n.name=="Comment")t=n.from;else if(n.name=="Body"||n.name=="MatchBody")O.baseIndentFor(n)+O.unit<=i&&(r=n),e=n;else if(n.name=="MatchClause")e=n;else if(n.type.is("Statement"))e=n;else break;else break}return r}function Fc(O,e){let t=O.baseIndentFor(e),i=O.lineAt(O.pos,-1),r=i.from+i.text.length;return/^\s*($|#)/.test(i.text)&&O.node.to<r+100&&!/\S/.test(O.state.sliceDoc(r,O.node.to))&&O.lineIndent(O.pos,-1)<=t||/^\s*(else:|elif |except |finally:|case\s+[^=:]+:)/.test(O.textAfter)&&O.lineIndent(O.pos,-1)>t?null:t+O.unit}var Hc=ne.define({name:"python",parser:Hm.configure({props:[se.add({Body:O=>{var e;let t=/^\s*(#|$)/.test(O.textAfter)&&Nc(O)||O.node;return(e=Fc(O,t))!==null&&e!==void 0?e:O.continue()},MatchBody:O=>{var e;let t=Nc(O);return(e=Fc(O,t||O.node))!==null&&e!==void 0?e:O.continue()},IfStatement:O=>/^\s*(else:|elif )/.test(O.textAfter)?O.baseIndent:O.continue(),"ForStatement WhileStatement":O=>/^\s*else:/.test(O.textAfter)?O.baseIndent:O.continue(),TryStatement:O=>/^\s*(except[ :]|finally:|else:)/.test(O.textAfter)?O.baseIndent:O.continue(),MatchStatement:O=>/^\s*case /.test(O.textAfter)?O.baseIndent+O.unit:O.continue(),"TupleExpression ComprehensionExpression ParamList ArgList ParenthesizedExpression":ye({closing:")"}),"DictionaryExpression DictionaryComprehensionExpression SetExpression SetComprehensionExpression":ye({closing:"}"}),"ArrayExpression ArrayComprehensionExpression":ye({closing:"]"}),MemberExpression:O=>O.baseIndent+O.unit,"String FormatString":()=>null,Script:O=>{var e;let t=Nc(O);return(e=t&&Fc(O,t))!==null&&e!==void 0?e:O.continue()}}),te.add({"ArrayExpression DictionaryExpression SetExpression TupleExpression":me,Body:(O,e)=>({from:O.from+1,to:O.to-(O.to==e.doc.length?0:1)}),"String FormatString":(O,e)=>({from:e.doc.lineAt(O.from).to,to:O.to})})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"'''",'"""'],stringPrefixes:["f","fr","rf","r","u","b","br","rb","F","FR","RF","R","U","B","BR","RB"]},commentTokens:{line:"#"},indentOnInput:/^\s*([\}\]\)]|else:|elif |except |finally:|case\s+[^:]*:?)$/}});function ig(){return new J(Hc,[Hc.data.of({autocomplete:sY}),Hc.data.of({autocomplete:lY})])}var cY=36,rg=1,hY=2,wi=3,Kc=4,fY=5,dY=6,uY=7,$Y=8,QY=9,pY=10,mY=11,gY=12,PY=13,SY=14,XY=15,TY=16,yY=17,ng=18,bY=19,dg=20,ug=21,sg=22,xY=23,wY=24;function eh(O){return O>=65&&O<=90||O>=97&&O<=122||O>=48&&O<=57}function kY(O){return O>=48&&O<=57||O>=97&&O<=102||O>=65&&O<=70}function EO(O,e,t){for(let i=!1;;){if(O.next<0)return;if(O.next==e&&!i){O.advance();return}i=t&&!i&&O.next==92,O.advance()}}function vY(O,e){e:for(;;){if(O.next<0)return;if(O.next==36){O.advance();for(let t=0;t<e.length;t++){if(O.next!=e.charCodeAt(t))continue e;O.advance()}if(O.next==36){O.advance();return}}else O.advance()}}function YY(O,e){let t="[{<(".indexOf(String.fromCharCode(e)),i=t<0?e:"]}>)".charCodeAt(t);for(;;){if(O.next<0)return;if(O.next==i&&O.peek(1)==39){O.advance(2);return}O.advance()}}function th(O,e){for(;!(O.next!=95&&!eh(O.next));)e!=null&&(e+=String.fromCharCode(O.next)),O.advance();return e}function _Y(O){if(O.next==39||O.next==34||O.next==96){let e=O.next;O.advance(),EO(O,e,!1)}else th(O)}function ag(O,e){for(;O.next==48||O.next==49;)O.advance();e&&O.next==e&&O.advance()}function og(O,e){for(;;){if(O.next==46){if(e)break;e=!0}else if(O.next<48||O.next>57)break;O.advance()}if(O.next==69||O.next==101)for(O.advance(),(O.next==43||O.next==45)&&O.advance();O.next>=48&&O.next<=57;)O.advance()}function lg(O){for(;!(O.next<0||O.next==10);)O.advance()}function GO(O,e){for(let t=0;t<e.length;t++)if(e.charCodeAt(t)==O)return!0;return!1}var Jc=` \r
|
||||||
|
`;function $g(O,e,t){let i=Object.create(null);i.true=i.false=fY,i.null=i.unknown=dY;for(let r of O.split(" "))r&&(i[r]=dg);for(let r of e.split(" "))r&&(i[r]=ug);for(let r of(t||"").split(" "))r&&(i[r]=wY);return i}var AO="array binary bit boolean char character clob date decimal double float int integer interval large national nchar nclob numeric object precision real smallint time timestamp varchar varying ",LO="absolute action add after all allocate alter and any are as asc assertion at authorization before begin between both breadth by call cascade cascaded case cast catalog check close collate collation column commit condition connect connection constraint constraints constructor continue corresponding count create cross cube current current_date current_default_transform_group current_transform_group_for_type current_path current_role current_time current_timestamp current_user cursor cycle data day deallocate declare default deferrable deferred delete depth deref desc describe descriptor deterministic diagnostics disconnect distinct do domain drop dynamic each else elseif end end-exec equals escape except exception exec execute exists exit external fetch first for foreign found from free full function general get global go goto grant group grouping handle having hold hour identity if immediate in indicator initially inner inout input insert intersect into is isolation join key language last lateral leading leave left level like limit local localtime localtimestamp locator loop map match method minute modifies module month names natural nesting new next no none not of old on only open option or order ordinality out outer output overlaps pad parameter partial path prepare preserve primary prior privileges procedure public read reads recursive redo ref references referencing relative release repeat resignal restrict result return returns revoke right role rollback rollup routine row rows savepoint schema scroll search second section select session session_user set sets signal similar size some space specific specifictype sql sqlexception sqlstate sqlwarning start state static system_user table temporary then timezone_hour timezone_minute to trailing transaction translation treat trigger under undo union unique unnest until update usage user using value values view when whenever where while with without work write year zone ",Oh={backslashEscapes:!1,hashComments:!1,spaceAfterDashes:!1,slashComments:!1,doubleQuotedStrings:!1,doubleDollarQuotedStrings:!1,unquotedBitLiterals:!1,treatBitsAsBytes:!1,charSetCasts:!1,plsqlQuotingMechanism:!1,operatorChars:"*+-%<>!=&|~^/",specialVar:"?",identifierQuotes:'"',caseInsensitiveIdentifiers:!1,words:$g(LO,AO)};function ZY(O,e,t,i){let r={};for(let n in Oh)r[n]=(O.hasOwnProperty(n)?O:Oh)[n];return e&&(r.words=$g(e,t||"",i)),r}function Qg(O){return new q(e=>{var t;let{next:i}=e;if(e.advance(),GO(i,Jc)){for(;GO(e.next,Jc);)e.advance();e.acceptToken(cY)}else if(i==36&&O.doubleDollarQuotedStrings){let r=th(e,"");e.next==36&&(e.advance(),vY(e,r),e.acceptToken(wi))}else if(i==39||i==34&&O.doubleQuotedStrings)EO(e,i,O.backslashEscapes),e.acceptToken(wi);else if(i==35&&O.hashComments||i==47&&e.next==47&&O.slashComments)lg(e),e.acceptToken(rg);else if(i==45&&e.next==45&&(!O.spaceAfterDashes||e.peek(1)==32))lg(e),e.acceptToken(rg);else if(i==47&&e.next==42){e.advance();for(let r=1;;){let n=e.next;if(e.next<0)break;if(e.advance(),n==42&&e.next==47){if(r--,e.advance(),!r)break}else n==47&&e.next==42&&(r++,e.advance())}e.acceptToken(hY)}else if((i==101||i==69)&&e.next==39)e.advance(),EO(e,39,!0),e.acceptToken(wi);else if((i==110||i==78)&&e.next==39&&O.charSetCasts)e.advance(),EO(e,39,O.backslashEscapes),e.acceptToken(wi);else if(i==95&&O.charSetCasts)for(let r=0;;r++){if(e.next==39&&r>1){e.advance(),EO(e,39,O.backslashEscapes),e.acceptToken(wi);break}if(!eh(e.next))break;e.advance()}else if(O.plsqlQuotingMechanism&&(i==113||i==81)&&e.next==39&&e.peek(1)>0&&!GO(e.peek(1),Jc)){let r=e.peek(1);e.advance(2),YY(e,r),e.acceptToken(wi)}else if(GO(i,O.identifierQuotes)){let r=i==91?93:i;EO(e,r,!1),e.acceptToken(bY)}else if(i==40)e.acceptToken(uY);else if(i==41)e.acceptToken($Y);else if(i==123)e.acceptToken(QY);else if(i==125)e.acceptToken(pY);else if(i==91)e.acceptToken(mY);else if(i==93)e.acceptToken(gY);else if(i==59)e.acceptToken(PY);else if(O.unquotedBitLiterals&&i==48&&e.next==98)e.advance(),ag(e),e.acceptToken(sg);else if((i==98||i==66)&&(e.next==39||e.next==34)){let r=e.next;e.advance(),O.treatBitsAsBytes?(EO(e,r,O.backslashEscapes),e.acceptToken(xY)):(ag(e,r),e.acceptToken(sg))}else if(i==48&&(e.next==120||e.next==88)||(i==120||i==88)&&e.next==39){let r=e.next==39;for(e.advance();kY(e.next);)e.advance();r&&e.next==39&&e.advance(),e.acceptToken(Kc)}else if(i==46&&e.next>=48&&e.next<=57)og(e,!0),e.acceptToken(Kc);else if(i==46)e.acceptToken(SY);else if(i>=48&&i<=57)og(e,!1),e.acceptToken(Kc);else if(GO(i,O.operatorChars)){for(;GO(e.next,O.operatorChars);)e.advance();e.acceptToken(XY
Line truncated
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
var c=(r,t=0,e=1)=>r>e?e:r<t?t:r,n=(r,t=0,e=Math.pow(10,t))=>Math.round(e*r)/e;var at={grad:360/400,turn:360,rad:360/(Math.PI*2)},F=r=>G($(r)),$=r=>(r[0]==="#"&&(r=r.substring(1)),r.length<6?{r:parseInt(r[0]+r[0],16),g:parseInt(r[1]+r[1],16),b:parseInt(r[2]+r[2],16),a:r.length===4?n(parseInt(r[3]+r[3],16)/255,2):1}:{r:parseInt(r.substring(0,2),16),g:parseInt(r.substring(2,4),16),b:parseInt(r.substring(4,6),16),a:r.length===8?n(parseInt(r.substring(6,8),16)/255,2):1}),it=(r,t="deg")=>Number(r)*(at[t]||1),lt=r=>{let e=/hsla?\(?\s*(-?\d*\.?\d+)(deg|rad|grad|turn)?[,\s]+(-?\d*\.?\d+)%?[,\s]+(-?\d*\.?\d+)%?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(r);return e?ct({h:it(e[1],e[2]),s:Number(e[3]),l:Number(e[4]),a:e[5]===void 0?1:Number(e[5])/(e[6]?100:1)}):{h:0,s:0,v:0,a:1}},D=lt,ct=({h:r,s:t,l:e,a:o})=>(t*=(e<50?e:100-e)/100,{h:r,s:t>0?2*t/(e+t)*100:0,v:e+t,a:o}),J=r=>pt(O(r)),X=({h:r,s:t,v:e,a:o})=>{let s=(200-t)*e/100;return{h:n(r),s:n(s>0&&s<200?t*e/100/(s<=100?s:200-s)*100:0),l:n(s/2),a:n(o,2)}};var h=r=>{let{h:t,s:e,l:o}=X(r);return`hsl(${t}, ${e}%, ${o}%)`},S=r=>{let{h:t,s:e,l:o,a:s}=X(r);return`hsla(${t}, ${e}%, ${o}%, ${s})`},O=({h:r,s:t,v:e,a:o})=>{r=r/360*6,t=t/100,e=e/100;let s=Math.floor(r),a=e*(1-t),l=e*(1-(r-s)*t),u=e*(1-(1-r+s)*t),i=s%6;return{r:n([e,l,a,a,u,e][i]*255),g:n([u,e,e,l,a,a][i]*255),b:n([a,a,u,e,e,l][i]*255),a:n(o,2)}},Y=r=>{let{r:t,g:e,b:o}=O(r);return`rgb(${t}, ${e}, ${o})`},B=r=>{let{r:t,g:e,b:o,a:s}=O(r);return`rgba(${t}, ${e}, ${o}, ${s})`};var A=r=>{let e=/rgba?\(?\s*(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(r);return e?G({r:Number(e[1])/(e[2]?100/255:1),g:Number(e[3])/(e[4]?100/255:1),b:Number(e[5])/(e[6]?100/255:1),a:e[7]===void 0?1:Number(e[7])/(e[8]?100:1)}):{h:0,s:0,v:0,a:1}},U=A,v=r=>{let t=r.toString(16);return t.length<2?"0"+t:t},pt=({r,g:t,b:e,a:o})=>{let s=o<1?v(n(o*255)):"";return"#"+v(r)+v(t)+v(e)+s},G=({r,g:t,b:e,a:o})=>{let s=Math.max(r,t,e),a=s-Math.min(r,t,e),l=a?s===r?(t-e)/a:s===t?2+(e-r)/a:4+(r-t)/a:0;return{h:n(60*(l<0?l+6:l)),s:n(s?a/s*100:0),v:n(s/255*100),a:o}};var L=(r,t)=>{if(r===t)return!0;for(let e in r)if(r[e]!==t[e])return!1;return!0},m=(r,t)=>r.replace(/\s/g,"")===t.replace(/\s/g,""),K=(r,t)=>r.toLowerCase()===t.toLowerCase()?!0:L($(r),$(t));var Q={},H=r=>{let t=Q[r];return t||(t=document.createElement("template"),t.innerHTML=r,Q[r]=t),t},g=(r,t,e)=>{r.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:e}))};var f=!1,I=r=>"touches"in r,ut=r=>f&&!I(r)?!1:(f||(f=I(r)),!0),W=(r,t)=>{let e=I(t)?t.touches[0]:t,o=r.el.getBoundingClientRect();g(r.el,"move",r.getMove({x:c((e.pageX-(o.left+window.pageXOffset))/o.width),y:c((e.pageY-(o.top+window.pageYOffset))/o.height)}))},dt=(r,t)=>{let e=t.keyCode;e>40||r.xy&&e<37||e<33||(t.preventDefault(),g(r.el,"move",r.getMove({x:e===39?.01:e===37?-.01:e===34?.05:e===33?-.05:e===35?1:e===36?-1:0,y:e===40?.01:e===38?-.01:0},!0)))},d=class{constructor(t,e,o,s){let a=H(`<div role="slider" tabindex="0" part="${e}" ${o}><div part="${e}-pointer"></div></div>`);t.appendChild(a.content.cloneNode(!0));let l=t.querySelector(`[part=${e}]`);l.addEventListener("mousedown",this),l.addEventListener("touchstart",this),l.addEventListener("keydown",this),this.el=l,this.xy=s,this.nodes=[l.firstChild,l]}set dragging(t){let e=t?document.addEventListener:document.removeEventListener;e(f?"touchmove":"mousemove",this),e(f?"touchend":"mouseup",this)}handleEvent(t){switch(t.type){case"mousedown":case"touchstart":if(t.preventDefault(),!ut(t)||!f&&t.button!=0)return;this.el.focus(),W(this,t),this.dragging=!0;break;case"mousemove":case"touchmove":t.preventDefault(),W(this,t);break;case"mouseup":case"touchend":this.dragging=!1;break;case"keydown":dt(this,t);break}}style(t){t.forEach((e,o)=>{for(let s in e)this.nodes[o].style.setProperty(s,e[s])})}};var w=class extends d{constructor(t){super(t,"hue",'aria-label="Hue" aria-valuemin="0" aria-valuemax="360"',!1)}update({h:t}){this.h=t,this.style([{left:`${t/360*100}%`,color:h({h:t,s:100,v:100,a:1})}]),this.el.setAttribute("aria-valuenow",`${n(t)}`)}getMove(t,e){return{h:e?c(this.h+t.x*360,0,360):360*t.x}}};var y=class extends d{constructor(t){super(t,"saturation",'aria-label="Color"',!0)}update(t){this.hsva=t,this.style([{top:`${100-t.v}%`,left:`${t.s}%`,color:h(t)},{"background-color":h({h:t.h,s:100,v:100,a:1})}]),this.el.setAttribute("aria-valuetext",`Saturation ${n(t.s)}%, Brightness ${n(t.v)}%`)}getMove(t,e){return{s:e?c(this.hsva.s+t.x*100,0,100):t.x*100,v:e?c(this.hsva.v-t.y*100,0,100):Math.round(100-t.y*100)}}};var Z=':host{display:flex;flex-direction:column;position:relative;width:200px;height:200px;user-select:none;-webkit-user-select:none;cursor:default}:host([hidden]){display:none!important}[role=slider]{position:relative;touch-action:none;user-select:none;-webkit-user-select:none;outline:0}[role=slider]:last-child{border-radius:0 0 8px 8px}[part$=pointer]{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;dLine truncated
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
var Mr=Object.create;var yi=Object.defineProperty;var yr=Object.getOwnPropertyDescriptor;var pr=Object.getOwnPropertyNames;var Yr=Object.getPrototypeOf,gr=Object.prototype.hasOwnProperty;var k=(t,e)=>()=>{try{return e||t((e={exports:{}}).exports,e),e.exports}catch(s){throw e=0,s}};var Lr=(t,e,s,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of pr(e))!gr.call(t,n)&&n!==s&&yi(t,n,{get:()=>e[n],enumerable:!(i=yr(e,n))||i.enumerable});return t};var Te=(t,e,s)=>(s=t!=null?Mr(Yr(t)):{},Lr(e||!t||!t.__esModule?yi(s,"default",{value:t,enumerable:!0}):s,t));var us=k((_t,mt)=>{(function(t,e){typeof _t=="object"&&typeof mt<"u"?mt.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self).dayjs_plugin_advancedFormat=e()})(_t,(function(){"use strict";return function(t,e){var s=e.prototype,i=s.format;s.format=function(n){var r=this,a=this.$locale();if(!this.isValid())return i.bind(this)(n);var d=this.$utils(),l=(n||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,(function(o){switch(o){case"Q":return Math.ceil((r.$M+1)/3);case"Do":return a.ordinal(r.$D);case"gggg":return r.weekYear();case"GGGG":return r.isoWeekYear();case"wo":return a.ordinal(r.week(),"W");case"w":case"ww":return d.s(r.week(),o==="w"?1:2,"0");case"W":case"WW":return d.s(r.isoWeek(),o==="W"?1:2,"0");case"k":case"kk":return d.s(String(r.$H===0?24:r.$H),o==="k"?1:2,"0");case"X":return Math.floor(r.$d.getTime()/1e3);case"x":return r.$d.getTime();case"z":return"["+r.offsetName()+"]";case"zzz":return"["+r.offsetName("long")+"]";default:return o}}));return i.bind(this)(l)}}}))});var ds=k((ht,Mt)=>{(function(t,e){typeof ht=="object"&&typeof Mt<"u"?Mt.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self).dayjs_plugin_customParseFormat=e()})(ht,(function(){"use strict";var t={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},e=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,s=/\d/,i=/\d\d/,n=/\d\d?/,r=/\d*[^-_:/,()\s\d]+/,a={},d=function(m){return(m=+m)+(m>68?1900:2e3)},l=function(m){return function(h){this[m]=+h}},o=[/[+-]\d\d:?(\d\d)?|Z/,function(m){(this.zone||(this.zone={})).offset=(function(h){if(!h||h==="Z")return 0;var p=h.match(/([+-]|\d\d)/g),M=60*p[1]+(+p[2]||0);return M===0?0:p[0]==="+"?-M:M})(m)}],u=function(m){var h=a[m];return h&&(h.indexOf?h:h.s.concat(h.f))},f=function(m,h){var p,M=a.meridiem;if(M){for(var D=1;D<=24;D+=1)if(m.indexOf(M(D,0,h))>-1){p=D>12;break}}else p=m===(h?"pm":"PM");return p},c={A:[r,function(m){this.afternoon=f(m,!1)}],a:[r,function(m){this.afternoon=f(m,!0)}],Q:[s,function(m){this.month=3*(m-1)+1}],S:[s,function(m){this.milliseconds=100*+m}],SS:[i,function(m){this.milliseconds=10*+m}],SSS:[/\d{3}/,function(m){this.milliseconds=+m}],s:[n,l("seconds")],ss:[n,l("seconds")],m:[n,l("minutes")],mm:[n,l("minutes")],H:[n,l("hours")],h:[n,l("hours")],HH:[n,l("hours")],hh:[n,l("hours")],D:[n,l("day")],DD:[i,l("day")],Do:[r,function(m){var h=a.ordinal,p=m.match(/\d+/);if(this.day=p[0],h)for(var M=1;M<=31;M+=1)h(M).replace(/\[|\]/g,"")===m&&(this.day=M)}],w:[n,l("week")],ww:[i,l("week")],M:[n,l("month")],MM:[i,l("month")],MMM:[r,function(m){var h=u("months"),p=(u("monthsShort")||h.map((function(M){return M.slice(0,3)}))).indexOf(m)+1;if(p<1)throw new Error;this.month=p%12||p}],MMMM:[r,function(m){var h=u("months").indexOf(m)+1;if(h<1)throw new Error;this.month=h%12||h}],Y:[/[+-]?\d+/,l("year")],YY:[i,function(m){this.year=d(m)}],YYYY:[/\d{4}/,l("year")],Z:o,ZZ:o};function _(m){var h,p;h=m,p=a&&a.formats;for(var M=(m=h.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(O,$,q){var I=q&&q.toUpperCase();return $||p[q]||t[q]||p[I].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(S,g,y){return g||y.slice(1)}))}))).match(e),D=M.length,L=0;L<D;L+=1){var T=M[L],x=c[T],C=x&&x[0],A=x&&x[1];M[L]=A?{regex:C,parser:A}:T.replace(/^\[|\]$/g,"")}return function(O){for(var $={},q=0,I=0;q<D;q+=1){var S=M[q];if(typeof S=="string")I+=S.length;else{var g=S.regex,y=S.parser,v=O.slice(I),Y=g.exec(v)[0];y.call($,Y),O=O.replace(Y,"")}}return(function(w){var b=w.afternoon;if(b!==void 0){var H=w.hours;b?H<12&&(w.hours+=12):H===12&&(w.hours=0),delete w.afternoon}})($),$}}return function(m,h,p){p.p.customParseFormat=!0,m&&m.parseTwoDigitYear&&(d=m.parseTwoDigitYear);var M=h.prototype,D=M.parse;M.parse=function(L){var T=L.date,x=L.utc,C=L.args;this.$u=x;var A=C[1];if(typeof A=="string"){var O=C[2]===!0,$=C[3]===!0,q=O||$,I=C[2];$&&(I=C[2]),a=this.$locale(),!O&&I&&(a=p.Ls[I]),this.$d=(function(v,Y,w,b){try{if(["x","X"].indexOf(Y)>-1)return new Date((Y==="X"?1e3:1)*v);var H=_(Y)(v),R=H.year,F=H.month,P=H.day,J=H.hours,ue=H.minutes,ie=H.seconds,he=H.milliseconds,Q=H.zone,W=H.week,V=new Date,se=P||(R||F?1:V.getDate()),de=R||V.getFullYear(),Ee=0;R&&!F||(Ee=F>0?F-1:V.getMonth());var Fe,Xe=J||0,Qe=uLine truncated
|
||||||
@@ -0,0 +1,116 @@
|
|||||||
|
var zr=Object.defineProperty;var Fr=(e,t)=>{for(var i in t)zr(e,i,{get:t[i],enumerable:!0})};var da={};Fr(da,{FileOrigin:()=>Gt,FileStatus:()=>Rt,OptionTypes:()=>qi,Status:()=>pl,create:()=>It,destroy:()=>si,find:()=>$i,getOptions:()=>Xi,parse:()=>Yi,registerPlugin:()=>_e,setOptions:()=>Ki,supported:()=>ji});var Or=e=>e instanceof HTMLElement,Dr=(e,t=[],i=[])=>{let a={...e},n=[],l=[],o=()=>({...a}),r=()=>{let g=[...n];return n.length=0,g},s=()=>{let g=[...l];l.length=0,g.forEach(({type:f,data:b})=>{p(f,b)})},p=(g,f,b)=>{if(b&&!document.hidden){l.push({type:g,data:f});return}u[g]&&u[g](f),n.push({type:g,data:f})},c=(g,...f)=>m[g]?m[g](...f):null,d={getState:o,processActionQueue:r,processDispatchQueue:s,dispatch:p,query:c},m={};t.forEach(g=>{m={...g(a),...m}});let u={};return i.forEach(g=>{u={...g(p,c,a),...u}}),d},Cr=(e,t,i)=>{if(typeof i=="function"){e[t]=i;return}Object.defineProperty(e,t,{...i})},ae=(e,t)=>{for(let i in e)e.hasOwnProperty(i)&&t(i,e[i])},Xe=e=>{let t={};return ae(e,i=>{Cr(t,i,e[i])}),t},pe=(e,t,i=null)=>{if(i===null)return e.getAttribute(t)||e.hasAttribute(t);e.setAttribute(t,i)},Br="http://www.w3.org/2000/svg",kr=["svg","path"],ka=e=>kr.includes(e),ci=(e,t,i={})=>{typeof t=="object"&&(i=t,t=null);let a=ka(e)?document.createElementNS(Br,e):document.createElement(e);return t&&(ka(e)?pe(a,"class",t):a.className=t),ae(i,(n,l)=>{pe(a,n,l)}),a},Nr=e=>(t,i)=>{typeof i<"u"&&e.children[i]?e.insertBefore(t,e.children[i]):e.appendChild(t)},Vr=(e,t)=>(i,a)=>(typeof a<"u"?t.splice(a,0,i):t.push(i),i),Gr=(e,t)=>i=>(t.splice(t.indexOf(i),1),i.element.parentNode&&e.removeChild(i.element),i),Ur=typeof window<"u"&&typeof window.document<"u",Rn=()=>Ur,Hr=Rn()?ci("svg"):{},Wr="children"in Hr?e=>e.children.length:e=>e.childNodes.length,Sn=(e,t,i,a)=>{let n=i[0]||e.left,l=i[1]||e.top,o=n+e.width,r=l+e.height*(a[1]||1),s={element:{...e},inner:{left:e.left,top:e.top,right:e.right,bottom:e.bottom},outer:{left:n,top:l,right:o,bottom:r}};return t.filter(p=>!p.isRectIgnored()).map(p=>p.rect).forEach(p=>{Na(s.inner,{...p.inner}),Na(s.outer,{...p.outer})}),Va(s.inner),s.outer.bottom+=s.element.marginBottom,s.outer.right+=s.element.marginRight,Va(s.outer),s},Na=(e,t)=>{t.top+=e.top,t.right+=e.left,t.bottom+=e.top,t.left+=e.left,t.bottom>e.bottom&&(e.bottom=t.bottom),t.right>e.right&&(e.right=t.right)},Va=e=>{e.width=e.right-e.left,e.height=e.bottom-e.top},tt=e=>typeof e=="number",jr=(e,t,i,a=.001)=>Math.abs(e-t)<a&&Math.abs(i)<a,qr=({stiffness:e=.5,damping:t=.75,mass:i=10}={})=>{let a=null,n=null,l=0,o=!1,p=Xe({interpolate:(c,d)=>{if(o)return;if(!(tt(a)&&tt(n))){o=!0,l=0;return}let m=-(n-a)*e;l+=m/i,n+=l,l*=t,jr(n,a,l)||d?(n=a,l=0,o=!0,p.onupdate(n),p.oncomplete(n)):p.onupdate(n)},target:{set:c=>{if(tt(c)&&!tt(n)&&(n=c),a===null&&(a=c,n=c),a=c,n===a||typeof a>"u"){o=!0,l=0,p.onupdate(n),p.oncomplete(n);return}o=!1},get:()=>a},resting:{get:()=>o},onupdate:c=>{},oncomplete:c=>{}});return p};var Yr=e=>e<.5?2*e*e:-1+(4-2*e)*e,$r=({duration:e=500,easing:t=Yr,delay:i=0}={})=>{let a=null,n,l,o=!0,r=!1,s=null,c=Xe({interpolate:(d,m)=>{o||s===null||(a===null&&(a=d),!(d-a<i)&&(n=d-a-i,n>=e||m?(n=1,l=r?0:1,c.onupdate(l*s),c.oncomplete(l*s),o=!0):(l=n/e,c.onupdate((n>=0?t(r?1-l:l):0)*s))))},target:{get:()=>r?0:s,set:d=>{if(s===null){s=d,c.onupdate(d),c.oncomplete(d);return}d<s?(s=1,r=!0):(r=!1,s=d),o=!1,a=null}},resting:{get:()=>o},onupdate:d=>{},oncomplete:d=>{}});return c},Ga={spring:qr,tween:$r},Xr=(e,t,i)=>{let a=e[t]&&typeof e[t][i]=="object"?e[t][i]:e[t]||e,n=typeof a=="string"?a:a.type,l=typeof a=="object"?{...a}:{};return Ga[n]?Ga[n](l):null},Zi=(e,t,i,a=!1)=>{t=Array.isArray(t)?t:[t],t.forEach(n=>{e.forEach(l=>{let o=l,r=()=>i[l],s=p=>i[l]=p;typeof l=="object"&&(o=l.key,r=l.getter||r,s=l.setter||s),!(n[o]&&!a)&&(n[o]={get:r,set:s})})})},Kr=({mixinConfig:e,viewProps:t,viewInternalAPI:i,viewExternalAPI:a})=>{let n={...t},l=[];return ae(e,(o,r)=>{let s=Xr(r);if(!s)return;s.onupdate=c=>{t[o]=c},s.target=n[o],Zi([{key:o,setter:c=>{s.target!==c&&(s.target=c)},getter:()=>t[o]}],[i,a],t,!0),l.push(s)}),{write:o=>{let r=document.hidden,s=!0;return l.forEach(p=>{p.resting||(s=!1),p.interpolate(o,r)}),s},destroy:()=>{}}},Zr=e=>(t,i)=>{e.addEventListener(t,i)},Qr=e=>(t,i)=>{e.removeEventListener(t,i)},Jr=({mixinConfig:e,viewProps:t,viewInternalAPI:i,viewExternalAPI:a,viewState:n,view:l})=>{let o=[],r=Zr(l.element),s=Qr(l.element);return a.on=(p,c)=>{o.push({type:p,fn:c}),r(p,c)},a.off=(p,c)=>{o.splice(o.findIndex(d=>d.type===p&&d.fn===c),1),s(p,c)},{write:()=>!0,destroy:()=>{o.forEach(p=>{s(p.type,p.fn)})}}},es=({mixinConfig:e,viewProps:t,viewExternalAPI:i})=>{Zi(e,i,t)},be=e=>e!=null,ts={opacity:1,scaleX:1,scaleY:1,translateX:0,translateY:0,rotateX:0,rotateY:0,rotateZ:0,originX:0,originY:0},is=({mixinConfig:e,viewProps:t,viewInternalAPI:i,viewExternalAPI:a,view:n})=>{let l={...t},o={};Zi(e,[i,a],t);let r=()=>[t.translateX||0,t.translateY||0],s=()=>[t.scaleX||0,t.scaleY||0],p=()=>n.rect?Sn(n.rect,n.childViews,r(),s()):null;return i.Line truncated
|
||||||
|
`);for(let a of i){let n=Xs(a);if(n){t.name=n;continue}let l=Ks(a);if(l){t.size=l;continue}let o=Zs(a);if(o){t.source=o;continue}}return t},Qs=e=>{let t={source:null,complete:!1,progress:0,size:null,timestamp:null,duration:0,request:null},i=()=>t.progress,a=()=>{t.request&&t.request.abort&&t.request.abort()},n=()=>{let r=t.source;o.fire("init",r),r instanceof File?o.fire("load",r):r instanceof Blob?o.fire("load",xt(r,r.name)):ki(r)?o.fire("load",$s(r)):l(r)},l=r=>{if(!e){o.fire("error",{type:"error",body:"Can't load URL",code:400});return}t.timestamp=Date.now(),t.request=e(r,s=>{t.duration=Date.now()-t.timestamp,t.complete=!0,s instanceof Blob&&(s=xt(s,s.name||Vt(r))),o.fire("load",s instanceof Blob?s:s?s.body:null)},s=>{o.fire("error",typeof s=="string"?{type:"error",code:0,body:s}:s)},(s,p,c)=>{if(c&&(t.size=c),t.duration=Date.now()-t.timestamp,!s){t.progress=null;return}t.progress=p/c,o.fire("progress",t.progress)},()=>{o.fire("abort")},s=>{let p=ta(typeof s=="string"?s:s.headers);o.fire("meta",{size:t.size||p.size,filename:p.name,source:p.source})})},o={...hi(),setSource:r=>t.source=r,getProgress:i,abort:a,load:n};return o},Xa=e=>/GET|HEAD/.test(e),nt=(e,t,i)=>{let a={onheaders:()=>{},onprogress:()=>{},onload:()=>{},ontimeout:()=>{},onerror:()=>{},onabort:()=>{},abort:()=>{n=!0,o.abort()}},n=!1,l=!1;i={method:"POST",headers:{},withCredentials:!1,...i},t=encodeURI(t),Xa(i.method)&&e&&(t=`${t}${encodeURIComponent(typeof e=="string"?e:JSON.stringify(e))}`);let o=new XMLHttpRequest,r=Xa(i.method)?o:o.upload;return r.onprogress=s=>{n||a.onprogress(s.lengthComputable,s.loaded,s.total)},o.onreadystatechange=()=>{o.readyState<2||o.readyState===4&&o.status===0||l||(l=!0,a.onheaders(o))},o.onload=()=>{o.status>=200&&o.status<300?a.onload(o):a.onerror(o)},o.onerror=()=>a.onerror(o),o.onabort=()=>{n=!0,a.onabort()},o.ontimeout=()=>a.ontimeout(o),o.open(i.method,t,!0),yt(i.timeout)&&(o.timeout=i.timeout),Object.keys(i.headers).forEach(s=>{let p=unescape(encodeURIComponent(i.headers[s]));o.setRequestHeader(s,p)}),i.responseType&&(o.responseType=i.responseType),i.withCredentials&&(o.withCredentials=!0),o.send(e),a},ne=(e,t,i,a)=>({type:e,code:t,body:i,headers:a}),lt=e=>t=>{e(ne("error",0,"Timeout",t.getAllResponseHeaders()))},Ka=e=>/\?/.test(e),Nt=(...e)=>{let t="";return e.forEach(i=>{t+=Ka(t)&&Ka(i)?i.replace(/\?/,"&"):i}),t},Pi=(e="",t)=>{if(typeof t=="function")return t;if(!t||!Ee(t.url))return null;let i=t.onload||(n=>n),a=t.onerror||(n=>null);return(n,l,o,r,s,p)=>{let c=nt(n,Nt(e,t.url),{...t,responseType:"blob"});return c.onload=d=>{let m=d.getAllResponseHeaders(),u=ta(m).name||Vt(n);l(ne("load",d.status,t.method==="HEAD"?null:xt(i(d.response),u),m))},c.onerror=d=>{o(ne("error",d.status,a(d.response)||d.statusText,d.getAllResponseHeaders()))},c.onheaders=d=>{p(ne("headers",d.status,null,d.getAllResponseHeaders()))},c.ontimeout=lt(o),c.onprogress=r,c.onabort=s,c}},we={QUEUED:0,COMPLETE:1,PROCESSING:2,ERROR:3,WAITING:4},Js=(e,t,i,a,n,l,o,r,s,p,c)=>{let d=[],{chunkTransferId:m,chunkServer:u,chunkSize:g,chunkRetryDelays:f}=c,b={serverId:m,aborted:!1},v=t.ondata||(w=>w),h=t.onload||((w,F)=>F==="HEAD"?w.getResponseHeader("Upload-Offset"):w.response),T=t.onerror||(w=>null),I=w=>{let F=new FormData;me(n)&&F.append(i,JSON.stringify(n));let S=typeof t.headers=="function"?t.headers(a,n):{...t.headers,"Upload-Length":a.size},L={...t,headers:S},D=nt(v(F),Nt(e,t.url),L);D.onload=O=>w(h(O,L.method)),D.onerror=O=>o(ne("error",O.status,T(O.response)||O.statusText,O.getAllResponseHeaders())),D.ontimeout=lt(o)},y=w=>{let F=Nt(e,u.url,b.serverId),L={headers:typeof t.headers=="function"?t.headers(b.serverId):{...t.headers},method:"HEAD"},D=nt(null,F,L);D.onload=O=>w(h(O,L.method)),D.onerror=O=>o(ne("error",O.status,T(O.response)||O.statusText,O.getAllResponseHeaders())),D.ontimeout=lt(o)},E=Math.floor(a.size/g);for(let w=0;w<=E;w++){let F=w*g,S=a.slice(F,F+g,"application/offset+octet-stream");d[w]={index:w,size:S.size,offset:F,data:S,file:a,progress:0,retries:[...f],status:we.QUEUED,error:null,request:null,timeout:null}}let _=()=>l(b.serverId),x=w=>w.status===we.QUEUED||w.status===we.ERROR,R=w=>{if(b.aborted)return;if(w=w||d.find(x),!w){d.every(C=>C.status===we.COMPLETE)&&_();return}w.status=we.PROCESSING,w.progress=null;let F=u.ondata||(C=>C),S=u.onerror||(C=>null),L=u.onload||(()=>{}),D=Nt(e,u.url,b.serverId),O=typeof u.headers=="function"?u.headers(w):{...u.headers,"Content-Type":"application/offset+octet-stream","Upload-Offset":w.offset,"Upload-Length":a.size,"Upload-Name":a.name},G=w.request=nt(F(w.data),D,{...u,headers:O});G.onload=C=>{L(C,w.index,d.length),w.status=we.COMPLETE,w.request=null,A()},G.onprogress=(C,$,K)=>{w.progress=C?$:null,P()},G.onerror=C=>{w.status=we.ERROR,w.request=null,w.error=S(C.response)||C.statusText,z(w)||o(ne("error",C.status,S(C.response)||C.statusText,C.getAllResponseHeaders()))},G.ontimeout=C=>{w.status=we.ERROR,w.request=null,z(w)||lt(o)(C)},G.onabort=()=>{w.status=we.QUEUED,w.request=null,s()
Line truncated
|
||||||
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var yi=typeof window<"u"&&typeof window.document<"u",Ve=yi?window:{},ya=yi&&Ve.document.documentElement?"ontouchstart"in Ve.document.documentElement:!1,Ra=yi?"PointerEvent"in Ve:!1,ee="cropper",Sa="all",Pl="crop",zl="move",Fl="zoom",dt="e",pt="w",St="s",Ke="n",Ut="ne",Ht="nw",Wt="se",jt="sw",fa="".concat(ee,"-crop"),gl="".concat(ee,"-disabled"),ye="".concat(ee,"-hidden"),fl="".concat(ee,"-hide"),Yp="".concat(ee,"-invisible"),xi="".concat(ee,"-modal"),ha="".concat(ee,"-move"),Yt="".concat(ee,"Action"),vi="".concat(ee,"Preview"),_a="crop",Ol="move",Dl="none",ba="crop",Ea="cropend",Ta="cropmove",va="cropstart",hl="dblclick",$p=ya?"touchstart":"mousedown",Xp=ya?"touchmove":"mousemove",Kp=ya?"touchend touchcancel":"mouseup",bl=Ra?"pointerdown":$p,El=Ra?"pointermove":Xp,Tl=Ra?"pointerup pointercancel":Kp,vl="ready",Il="resize",xl="wheel",Ia="zoom",yl="image/jpeg",Zp=/^e|w|s|n|se|sw|ne|nw|all|crop|move|zoom$/,Qp=/^data:/,Jp=/^data:image\/jpeg;base64,/,em=/^img|canvas$/i,Cl=200,Bl=100,Rl={viewMode:0,dragMode:_a,initialAspectRatio:NaN,aspectRatio:NaN,data:null,preview:"",responsive:!0,restore:!0,checkCrossOrigin:!0,checkOrientation:!0,modal:!0,guides:!0,center:!0,highlight:!0,background:!0,autoCrop:!0,autoCropArea:.8,movable:!0,rotatable:!0,scalable:!0,zoomable:!0,zoomOnTouch:!0,zoomOnWheel:!0,wheelZoomRatio:.1,cropBoxMovable:!0,cropBoxResizable:!0,toggleDragModeOnDblclick:!0,minCanvasWidth:0,minCanvasHeight:0,minCropBoxWidth:0,minCropBoxHeight:0,minContainerWidth:Cl,minContainerHeight:Bl,ready:null,cropstart:null,cropmove:null,cropend:null,crop:null,zoom:null},tm='<div class="cropper-container" touch-action="none"><div class="cropper-wrap-box"><div class="cropper-canvas"></div></div><div class="cropper-drag-box"></div><div class="cropper-crop-box"><span class="cropper-view-box"></span><span class="cropper-dashed dashed-h"></span><span class="cropper-dashed dashed-v"></span><span class="cropper-center"></span><span class="cropper-face"></span><span class="cropper-line line-e" data-cropper-action="e"></span><span class="cropper-line line-n" data-cropper-action="n"></span><span class="cropper-line line-w" data-cropper-action="w"></span><span class="cropper-line line-s" data-cropper-action="s"></span><span class="cropper-point point-e" data-cropper-action="e"></span><span class="cropper-point point-n" data-cropper-action="n"></span><span class="cropper-point point-w" data-cropper-action="w"></span><span class="cropper-point point-s" data-cropper-action="s"></span><span class="cropper-point point-ne" data-cropper-action="ne"></span><span class="cropper-point point-nw" data-cropper-action="nw"></span><span class="cropper-point point-sw" data-cropper-action="sw"></span><span class="cropper-point point-se" data-cropper-action="se"></span></div></div>',im=Number.isNaN||Ve.isNaN;function q(e){return typeof e=="number"&&!im(e)}var Sl=function(t){return t>0&&t<1/0};function pa(e){return typeof e>"u"}function mt(e){return ua(e)==="object"&&e!==null}var am=Object.prototype.hasOwnProperty;function _t(e){if(!mt(e))return!1;try{var t=e.constructor,i=t.prototype;return t&&i&&am.call(i,"isPrototypeOf")}catch{return!1}}function xe(e){return typeof e=="function"}var nm=Array.prototype.slice;function kl(e){return Array.from?Array.from(e):nm.call(e)}function se(e,t){return e&&xe(t)&&(Array.isArray(e)||q(e.length)?kl(e).forEach(function(i,a){t.call(e,i,a,e)}):mt(e)&&Object.keys(e).forEach(function(i){t.call(e,e[i],i,e)})),e}var te=Object.assign||function(t){for(var i=arguments.length,a=new Array(i>1?i-1:0),n=1;n<i;n++)a[n-1]=arguments[n];return mt(t)&&a.length>0&&a.forEach(function(l){mt(l)&&Object.keys(l).forEach(function(o){t[o]=l[o]})}),t},lm=/\.\d*(?:0|9){12}\d*$/;function Lt(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e11;return lm.test(e)?Math.round(e*t)/t:e}var om=/^width|height|left|top|marginLeft|marginTop$/;function Ze(e,t){var i=e.style;se(t,function(a,n){om.test(n)&&q(a)&&(a="".concat(a,"px")),i[n]=a})}function rm(e,t){return e.classList?e.classList.contains(t):e.className.indexOf(t)>-1}function ue(e,t){if(t){if(q(e.length)){se(e,function(a){ue(a,t)});return}if(e.classList){e.classList.add(t);return}var i=e.className.trim();i?i.indexOf(t)<0&&(e.className="".concat(i," ").concat(t)):e.className=t}}function Ne(e,t){if(t){if(q(e.length)){se(e,function(i){Ne(i,t)});return}if(e.classList){e.classList.remove(t);return}e.className.indexOf(t)>=0&&(e.className=e.className.replace(t,""))}}function wt(e,t,i){if(t){if(q(e.length)){se(e,function(a){wt(a,t,i)});return}i?ue(e,t):Ne(e,t)}}var sm=/([a-z\d])([A-Z])/g;function wa(e){return e.replace(sm,"$1-$2").toLowerCase()}function xa(e,t){return mt(e[t])?e[t]:e.dataset?e.dataset[t]:e.getAttribute("data-".concat(wa(t)))}function $t(e,t,i){mt(i)?e[t]=i:e.dataset?e.dataset[t]=i:e.setAttribute("data-".concat(wa(t)),i)}function cm(e,t){if(mt(e[t]))try{delete e[t]}catch{e[t]=void 0}else if(e.d
Line truncated
|
||||||
|
<defs>
|
||||||
|
<radialGradient id="gradient-__UID__" cx=".5" cy="1.25" r="1.15">
|
||||||
|
<stop offset='50%' stop-color='#000000'/>
|
||||||
|
<stop offset='56%' stop-color='#0a0a0a'/>
|
||||||
|
<stop offset='63%' stop-color='#262626'/>
|
||||||
|
<stop offset='69%' stop-color='#4f4f4f'/>
|
||||||
|
<stop offset='75%' stop-color='#808080'/>
|
||||||
|
<stop offset='81%' stop-color='#b1b1b1'/>
|
||||||
|
<stop offset='88%' stop-color='#dadada'/>
|
||||||
|
<stop offset='94%' stop-color='#f6f6f6'/>
|
||||||
|
<stop offset='100%' stop-color='#ffffff'/>
|
||||||
|
</radialGradient>
|
||||||
|
<mask id="mask-__UID__">
|
||||||
|
<rect x="0" y="0" width="500" height="200" fill="url(#gradient-__UID__)"></rect>
|
||||||
|
</mask>
|
||||||
|
</defs>
|
||||||
|
<rect x="0" width="500" height="200" fill="currentColor" mask="url(#mask-__UID__)"></rect>
|
||||||
|
</svg>`,uo=0,vu=e=>e.utils.createView({name:"image-preview-overlay",tag:"div",ignoreRect:!0,create:({root:t,props:i})=>{let a=Tu;if(document.querySelector("base")){let n=new URL(window.location.href.replace(window.location.hash,"")).href;a=a.replace(/url\(\#/g,"url("+n+"#")}uo++,t.element.classList.add(`filepond--image-preview-overlay-${i.status}`),t.element.innerHTML=a.replace(/__UID__/g,uo)},mixins:{styles:["opacity"],animations:{opacity:{type:"spring",mass:25}}}}),Iu=function(){self.onmessage=e=>{createImageBitmap(e.data.message.file).then(t=>{self.postMessage({id:e.data.id,message:t},[t])})}},xu=function(){self.onmessage=e=>{let t=e.data.message.imageData,i=e.data.message.colorMatrix,a=t.data,n=a.length,l=i[0],o=i[1],r=i[2],s=i[3],p=i[4],c=i[5],d=i[6],m=i[7],u=i[8],g=i[9],f=i[10],b=i[11],v=i[12],h=i[13],T=i[14],I=i[15],y=i[16],E=i[17],_=i[18],x=i[19],R=0,z=0,P=0,A=0,B=0;for(;R<n;R+=4)z=a[R]/255,P=a[R+1]/255,A=a[R+2]/255,B=a[R+3]/255,a[R]=Math.max(0,Math.min((z*l+P*o+A*r+B*s+p)*255,255)),a[R+1]=Math.max(0,Math.min((z*c+P*d+A*m+B*u+g)*255,255)),a[R+2]=Math.max(0,Math.min((z*f+P*b+A*v+B*h+T)*255,255)),a[R+3]=Math.max(0,Math.min((z*I+P*y+A*E+B*_+x)*255,255));self.postMessage({id:e.data.id,message:t},[t.data.buffer])}},yu=(e,t)=>{let i=new Image;i.onload=()=>{let a=i.naturalWidth,n=i.naturalHeight;i=null,t(a,n)},i.src=e},Ru={1:()=>[1,0,0,1,0,0],2:e=>[-1,0,0,1,e,0],3:(e,t)=>[-1,0,0,-1,e,t],4:(e,t)=>[1,0,0,-1,0,t],5:()=>[0,1,1,0,0,0],6:(e,t)=>[0,1,-1,0,t,0],7:(e,t)=>[0,-1,-1,0,t,e],8:e=>[0,-1,1,0,0,e]},Su=(e,t,i,a)=>{a!==-1&&e.transform.apply(e,Ru[a](t,i))},_u=(e,t,i,a)=>{t=Math.round(t),i=Math.round(i);let n=document.createElement("canvas");n.width=t,n.height=i;let l=n.getContext("2d");return a>=5&&a<=8&&([t,i]=[i,t]),Su(l,t,i,a),l.drawImage(e,0,0,t,i),n},ho=e=>/^image/.test(e.type)&&!/svg/.test(e.type),wu=10,Lu=10,Mu=e=>{let t=Math.min(wu/e.width,Lu/e.height),i=document.createElement("canvas"),a=i.getContext("2d"),n=i.width=Math.ceil(e.width*t),l=i.height=Math.ceil(e.height*t);a.drawImage(e,0,0,n,l);let o=null;try{o=a.getImageData(0,0,n,l).data}catch{return null}let r=o.length,s=0,p=0,c=0,d=0;for(;d<r;d+=4)s+=o[d]*o[d],p+=o[d+1]*o[d+1],c+=o[d+2]*o[d+2];return s=za(s,r),p=za(p,r),c=za(c,r),{r:s,g:p,b:c}},za=(e,t)=>Math.floor(Math.sqrt(e/(t/4))),Au=(e,t)=>(t=t||document.createElement("canvas"),t.width=e.width,t.height=e.height,t.getContext("2d").drawImage(e,0,0),t),Pu=e=>{let t;try{t=new ImageData(e.width,e.height)}catch{t=document.createElement("canvas").getContext("2d").createImageData(e.width,e.height)}return t.data.set(new Uint8ClampedArray(e.data)),t},zu=e=>new Promise((t,i)=>{let a=new Image;a.crossOrigin="Anonymous",a.onload=()=>{t(a)},a.onerror=n=>{i(n)},a.src=e}),Fu=e=>{let t=vu(e),i=Eu(e),{createWorker:a}=e.utils,n=(h,T,I)=>new Promise(y=>{h.ref.imageData||(h.ref.imageData=I.getContext("2d").getImageData(0,0,I.width,I.height));let E=Pu(h.ref.imageData);if(!T||T.length!==20)return I.getContext("2d").putImageData(E,0,0),y();let _=a(xu);_.post({imageData:E,colorMatrix:T},x=>{I.getContext("2d").putImageData(x,0,0),_.terminate(),y()},[E.data.buffer])}),l=(h,T)=>{h.removeChildView(T),T.image.width=1,T.image.height=1,T._destroy()},o=({root:h})=>{let T=h.ref.images.shift();return T.opacity=0,T.translateY=-15,h.ref.imageViewBin.push(T),T},r=({root:h,props:T,image:I})=>{let y=T.id,E=h.query("GET_ITEM",{id:y});if(!E)return;let _=E.getMetadata("crop")||{center:{x:.5,y:.5},flip:{horizontal:!1,vertical:!1},zoom:1,rotation:0,aspectRatio:null},x=h.query("GET_IMAGE_TRANSFORM_CANVAS_BACKGROUND_COLOR"),R,z,P=!1;h.query("GET_IMAGE_PREVIEW_MARKUP_SHOW")&&(R=E.getMetadata("markup")||[],z=E.getMetadata("resize"),P=!0);let A=h.appendChildView(h.createChildView(i,{id:y,image:I,crop:_,resize:z,markup:R,dirty:P,background:x,opacity:0,scaleX:1.15,scaleY:1.15,translateY:15}),h.childViews.length);h.ref.images.push(A),A.opacity=1,A.scaleX=1,A.scaleY=1,A.translateY=0,setTimeout(()=>{h.dispatch("DID_IMAGE_PREVIEW_SHOW",{id:y})},250)},s=({root:h,props:T})=>{let I=h.query("GET_ITEM",{id:T.id});if(!I)return;let y=h.ref.images[h.ref.images.length-1];y.crop=I.getMetadata("crop"),y.background=h.query("GET_IMAGE_TRANSFORM_CANVAS_BACKGROUND_COLOR"),h.query("GET_IMAGE_PREVIEW_MARKUP_SHOW")&&(y.dirty=!0,y.resize=I.getMetadata("resize"),y.markup=I.getMetadata("markup"))},p=({root:h,props:T,action:I})=>{if(!/crop|filter|markup|resize/.test(I.change.key)||!h.ref.images.length)return;let y=h.query("GET_ITEM",{id:T.id});if(y){if(/filter/.test(I.change.key)){let E=h.ref.images[h.ref.images.length-1];n(h,I.change.value,E.image);return}if(/crop|markup|resize/.test(I.change.key)){let E=y.getMetadata("crop"),_=h.ref.images[h.ref.images.length-1];if(E&&E.aspectRatio&&_.crop&&_.crop.aspectRatio&&Math.abs(E.aspectRatio-_.crop.aspectRatio)>1e-5){let x=o({root:h});r({root:h,props:T,image:Au(x.image)})}else s({root:h,props:T})}}},c=h=>{let I=window.navigator.userAgent.match(/Firefox\/([0-9]+)\./),y=I?parseInt(I[1]):null;return y!==null&&y<=58?!1:"createImagLine truncated
|
||||||
|
`+W.outerHTML+`
|
||||||
|
`},""),_=`
|
||||||
|
|
||||||
|
<g>${_.replace(/ /g," ")}</g>
|
||||||
|
|
||||||
|
`}let x=t.aspectRatio||E/y,R=y,z=R*x,P=typeof t.scaleToFit>"u"||t.scaleToFit,A=t.center?t.center.x:.5,B=t.center?t.center.y:.5,w=_o({width:y,height:E},wo({width:R,height:z},x),t.rotation,P?{x:A,y:B}:{x:.5,y:.5}),F=t.zoom*w,S=t.rotation*(180/Math.PI),L={x:R*.5,y:z*.5},D={x:L.x-y*A,y:L.y-E*B},O=[`rotate(${S} ${L.x} ${L.y})`,`translate(${L.x} ${L.y})`,`scale(${F})`,`translate(${-L.x} ${-L.y})`,`translate(${D.x} ${D.y})`],G=t.flip&&t.flip.horizontal,C=t.flip&&t.flip.vertical,$=[`scale(${G?-1:1} ${C?-1:1})`,`translate(${G?-y:0} ${C?-E:0})`],K=`<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<svg width="${R}${v}" height="${z}${h}"
|
||||||
|
viewBox="0 0 ${R} ${z}" ${l?'style="background:'+l+'" ':""}
|
||||||
|
preserveAspectRatio="xMinYMin"
|
||||||
|
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||||
|
xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<!-- Generated by PQINA - https://pqina.nl/ -->
|
||||||
|
<title>${d?d.textContent:""}</title>
|
||||||
|
<g transform="${O.join(" ")}">
|
||||||
|
<g transform="${$.join(" ")}">
|
||||||
|
${p.outerHTML}${_}
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>`;n(K)},o.readAsText(e)}),hg=e=>{let t;try{t=new ImageData(e.width,e.height)}catch{t=document.createElement("canvas").getContext("2d").createImageData(e.width,e.height)}return t.data.set(e.data),t},bg=()=>{let e={resize:c,filter:p},t=(d,m)=>(d.forEach(u=>{m=e[u.type](m,u.data)}),m),i=(d,m)=>{let u=d.transforms,g=null;if(u.forEach(f=>{f.type==="filter"&&(g=f)}),g){let f=null;u.forEach(b=>{b.type==="resize"&&(f=b)}),f&&(f.data.matrix=g.data,u=u.filter(b=>b.type!=="filter"))}m(t(u,d.imageData))};self.onmessage=d=>{i(d.data.message,m=>{self.postMessage({id:d.data.id,message:m},[m.data.buffer])})};let a=1,n=1,l=1;function o(d,m,u){let g=m[d]/255,f=m[d+1]/255,b=m[d+2]/255,v=m[d+3]/255,h=g*u[0]+f*u[1]+b*u[2]+v*u[3]+u[4],T=g*u[5]+f*u[6]+b*u[7]+v*u[8]+u[9],I=g*u[10]+f*u[11]+b*u[12]+v*u[13]+u[14],y=g*u[15]+f*u[16]+b*u[17]+v*u[18]+u[19],E=Math.max(0,h*y)+a*(1-y),_=Math.max(0,T*y)+n*(1-y),x=Math.max(0,I*y)+l*(1-y);m[d]=Math.max(0,Math.min(1,E))*255,m[d+1]=Math.max(0,Math.min(1,_))*255,m[d+2]=Math.max(0,Math.min(1,x))*255}let r=self.JSON.stringify([1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0]);function s(d){return self.JSON.stringify(d||[])===r}function p(d,m){if(!m||s(m))return d;let u=d.data,g=u.length,f=m[0],b=m[1],v=m[2],h=m[3],T=m[4],I=m[5],y=m[6],E=m[7],_=m[8],x=m[9],R=m[10],z=m[11],P=m[12],A=m[13],B=m[14],w=m[15],F=m[16],S=m[17],L=m[18],D=m[19],O=0,G=0,C=0,$=0,K=0,X=0,ge=0,N=0,W=0,Y=0,ce=0,ie=0;for(;O<g;O+=4)G=u[O]/255,C=u[O+1]/255,$=u[O+2]/255,K=u[O+3]/255,X=G*f+C*b+$*v+K*h+T,ge=G*I+C*y+$*E+K*_+x,N=G*R+C*z+$*P+K*A+B,W=G*w+C*F+$*S+K*L+D,Y=Math.max(0,X*W)+a*(1-W),ce=Math.max(0,ge*W)+n*(1-W),ie=Math.max(0,N*W)+l*(1-W),u[O]=Math.max(0,Math.min(1,Y))*255,u[O+1]=Math.max(0,Math.min(1,ce))*255,u[O+2]=Math.max(0,Math.min(1,ie))*255;return d}function c(d,m){let{mode:u="contain",upscale:g=!1,width:f,height:b,matrix:v}=m;if(v=!v||s(v)?null:v,!f&&!b)return p(d,v);if(f===null?f=b:b===null&&(b=f),u!=="force"){let A=f/d.width,B=b/d.height,w=1;if(u==="cover"?w=Math.max(A,B):u==="contain"&&(w=Math.min(A,B)),w>1&&g===!1)return p(d,v);f=d.width*w,b=d.height*w}let h=d.width,T=d.height,I=Math.round(f),y=Math.round(b),E=d.data,_=new Uint8ClampedArray(I*y*4),x=h/I,R=T/y,z=Math.ceil(x*.5),P=Math.ceil(R*.5);for(let A=0;A<y;A++)for(let B=0;B<I;B++){let w=(B+A*I)*4,F=0,S=0,L=0,D=0,O=0,G=0,C=0,$=(A+.5)*R;for(let K=Math.floor(A*R);K<(A+1)*R;K++){let X=Math.abs($-(K+.5))/P,ge=(B+.5)*x,N=X*X;for(let W=Math.floor(B*x);W<(B+1)*x;W++){let Y=Math.abs(ge-(W+.5))/z,ce=Math.sqrt(N+Y*Y);if(ce>=-1&&ce<=1&&(F=2*ce*ce*ce-3*ce*ce+1,F>0)){Y=4*(W+K*h);let ie=E[Y+3];C+=F*ie,L+=F,ie<255&&(F=F*ie/250),D+=F*E[Y],O+=F*E[Y+1],G+=F*E[Y+2],S+=F}}}_[w]=D/S,_[w+1]=O/S,_[w+2]=G/S,_[w+3]=C/L,v&&o(w,_,v)}return{data:_,width:I,height:y}}},Eg=(e,t)=>{if(e.getUint32(t+4,!1)!==1165519206)return;t+=4;let i=e.getUint16(t+=6,!1)===18761;t+=e.getUint32(t+4,i);let a=e.getUint16(t,i);t+=2;for(let n=0;n<a;n++)if(e.getUint16(t+n*12,i)===274)return e.setUint16(t+n*12+8,1,i),!0;return!1},Tg=e=>{let t=new DataView(e);if(t.getUint16(0)!==65496)return null;let i=2,a,n,l=!1;for(;i<t.byteLength&&(a=t.getUint16(i,!1),n=t.getUint16(i+2,!1)+2,!(!(a>=65504&&a<=65519||a===65534)||(l||(l=Eg(t,i,n)),i+n>t.byteLength)));)i+=n;return e.slice(0,i)},vg=e=>new Promise(t=>{let i=new FileReader;i.onload=()=>t(Tg(i.result)||null),i.readAsArrayBuffer(e.slice(0,256*1024))}),Ig=()=>window.BlobBuilder=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder,xg=(e,t)=>{let i=Ig();if(i){let a=new i;return a.append(e),a.getBlob(t)}return new Blob([e],{type:t})},yg=()=>Math.random().toString(36).substr(2,9),Rg=e=>{let t=new Blob(["(",e.toString(),")()"],{type:"application/javascript"}),i=URL.createObjectURL(t),a=new Worker(i),n=[];return{transfer:()=>{},post:(l,o,r)=>{let s=yg();n[s]=o,a.onmessage=p=>{let c=n[p.data.id];c&&(c(p.data.message),delete n[p.data.id])},a.postMessage({id:s,message:l},r)},terminate:()=>{a.terminate(),URL.revokeObjectURL(i)}}},Sg=e=>new Promise((t,i)=>{let a=new Image;a.onload=()=>{t(a)},a.onerror=n=>{i(n)},a.src=e}),_g=e=>e.reduce((t,i)=>t.then(a=>i().then(Array.prototype.concat.bind(a))),Promise.resolve([])),wg=(e,t)=>new Promise(i=>{let a={width:e.width,height:e.height},n=e.getContext("2d"),l=t.sort(Ao).map(o=>()=>new Promise(r=>{Og[o[0]](n,a,o[1],r)&&r()}));_g(l).then(()=>i(e))}),Ot=(e,t)=>{e.beginPath(),e.lineCap=t["stroke-linecap"],e.lineJoin=t["stroke-linejoin"],e.lineWidth=t["stroke-width"],t["stroke-dasharray"].length&&e.setLineDash(t["stroke-dasharray"].split(",")),e.fillStyle=t.fill,e.strokeStyle=t.stroke,e.globalAlpha=t.opacity||1},Dt=e=>{e.fill(),e.stroke(),e.globalAlpha=1},Lg=(e,t,i)=>{let a=Ft(i,t),n=ht(i,t);return Ot(e,n),e.rect(a.x,a.y,a.width,a.height),Dt(e,n),!0},Mg=(e,t,i)=>{let a=Ft(i,t),n=ht(i,t);Ot(e,n);let l=a.x,o=a.y,r=a.width,s=a.height,p=.5522848,c=r/2*p,d=s/2*p,m=l+r,u=o+s,g=l+r/2,f=o+s/2;return e.moveTo(l,f),e.bezierCurveTo(l,f-d,g-c,o,g,o),e.bezierCurveTo(g+c,o,m,f-d,m,f),e.bezierCurveTo(m,f+d,g+c,u,g,u),e.bezierCurveTo(Line truncated
|
||||||
|
/*! Bundled license information:
|
||||||
|
|
||||||
|
filepond/dist/filepond.esm.js:
|
||||||
|
(*!
|
||||||
|
* FilePond 4.32.12
|
||||||
|
* Licensed under MIT, https://opensource.org/licenses/MIT/
|
||||||
|
* Please visit https://pqina.nl/filepond/ for details.
|
||||||
|
*)
|
||||||
|
|
||||||
|
cropperjs/dist/cropper.esm.js:
|
||||||
|
(*!
|
||||||
|
* Cropper.js v1.6.2
|
||||||
|
* https://fengyuanchen.github.io/cropperjs
|
||||||
|
*
|
||||||
|
* Copyright 2015-present Chen Fengyuan
|
||||||
|
* Released under the MIT license
|
||||||
|
*
|
||||||
|
* Date: 2024-04-21T07:43:05.335Z
|
||||||
|
*)
|
||||||
|
|
||||||
|
filepond-plugin-file-validate-size/dist/filepond-plugin-file-validate-size.esm.js:
|
||||||
|
(*!
|
||||||
|
* FilePondPluginFileValidateSize 2.2.8
|
||||||
|
* Licensed under MIT, https://opensource.org/licenses/MIT/
|
||||||
|
* Please visit https://pqina.nl/filepond/ for details.
|
||||||
|
*)
|
||||||
|
|
||||||
|
filepond-plugin-file-validate-type/dist/filepond-plugin-file-validate-type.esm.js:
|
||||||
|
(*!
|
||||||
|
* FilePondPluginFileValidateType 1.2.9
|
||||||
|
* Licensed under MIT, https://opensource.org/licenses/MIT/
|
||||||
|
* Please visit https://pqina.nl/filepond/ for details.
|
||||||
|
*)
|
||||||
|
|
||||||
|
filepond-plugin-image-crop/dist/filepond-plugin-image-crop.esm.js:
|
||||||
|
(*!
|
||||||
|
* FilePondPluginImageCrop 2.0.6
|
||||||
|
* Licensed under MIT, https://opensource.org/licenses/MIT/
|
||||||
|
* Please visit https://pqina.nl/filepond/ for details.
|
||||||
|
*)
|
||||||
|
|
||||||
|
filepond-plugin-image-edit/dist/filepond-plugin-image-edit.esm.js:
|
||||||
|
(*!
|
||||||
|
* FilePondPluginImageEdit 1.6.3
|
||||||
|
* Licensed under MIT, https://opensource.org/licenses/MIT/
|
||||||
|
* Please visit https://pqina.nl/filepond/ for details.
|
||||||
|
*)
|
||||||
|
|
||||||
|
filepond-plugin-image-exif-orientation/dist/filepond-plugin-image-exif-orientation.esm.js:
|
||||||
|
(*!
|
||||||
|
* FilePondPluginImageExifOrientation 1.0.11
|
||||||
|
* Licensed under MIT, https://opensource.org/licenses/MIT/
|
||||||
|
* Please visit https://pqina.nl/filepond/ for details.
|
||||||
|
*)
|
||||||
|
|
||||||
|
filepond-plugin-image-preview/dist/filepond-plugin-image-preview.esm.js:
|
||||||
|
(*!
|
||||||
|
* FilePondPluginImagePreview 4.6.12
|
||||||
|
* Licensed under MIT, https://opensource.org/licenses/MIT/
|
||||||
|
* Please visit https://pqina.nl/filepond/ for details.
|
||||||
|
*)
|
||||||
|
|
||||||
|
filepond-plugin-image-resize/dist/filepond-plugin-image-resize.esm.js:
|
||||||
|
(*!
|
||||||
|
* FilePondPluginImageResize 2.0.10
|
||||||
|
* Licensed under MIT, https://opensource.org/licenses/MIT/
|
||||||
|
* Please visit https://pqina.nl/filepond/ for details.
|
||||||
|
*)
|
||||||
|
|
||||||
|
filepond-plugin-image-transform/dist/filepond-plugin-image-transform.esm.js:
|
||||||
|
(*!
|
||||||
|
* FilePondPluginImageTransform 3.8.7
|
||||||
|
* Licensed under MIT, https://opensource.org/licenses/MIT/
|
||||||
|
* Please visit https://pqina.nl/filepond/ for details.
|
||||||
|
*)
|
||||||
|
*/
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
function h({state:o,reordering:r={}}){return{state:o,rows:[],nextRowId:0,init(){this.updateRows(),this.rows.length<=0?this.addRow():this.updateState(),this.$watch("state",(t,i)=>{if(!Array.isArray(t)||JSON.stringify(t)===JSON.stringify(this.getState()))return;let e=s=>s===null?0:Array.isArray(s)?s.length:typeof s!="object"?0:Object.keys(s).length;e(t)===0&&e(i)===0||this.updateRows()})},addRow(){this.rows.push({id:this.nextRowId++,key:"",value:""}),this.updateState()},deleteRow(t){this.rows.splice(t,1),this.rows.length<=0&&this.addRow(),this.updateState()},reorderRows(t){t.oldDraggableIndex!==t.newDraggableIndex&&this.moveRow(this.rows[t.oldDraggableIndex].id,t.newDraggableIndex)},moveRow(t,i,e=document.activeElement){let s=this.rows.findIndex(a=>a.id===t);if(s<0||i<0||i>=this.rows.length||s===i)return;let[n]=this.rows.splice(s,1);this.rows.splice(i,0,n),this.updateState(),r.moved&&(this.$refs.reorderStatus.textContent="",this.$nextTick(()=>{!this.$root.isConnected||!this.rows.includes(n)||(this.$refs.reorderStatus.textContent=this.rowDescription(n,this.rows.indexOf(n),r.moved),[document.body,e].includes(document.activeElement)&&e.isConnected&&this.$root.contains(e)&&!e.disabled&&!e.hasAttribute("data-reorder-hidden")&&e.focus({preventScroll:!0}))}))},rowDescription(t,i,e=r.position){return e.replace(/:label|:position|:count/g,s=>({":label":String(t.key??"").trim()||r.row,":position":String(i+1),":count":String(this.rows.length)})[s])},updateRows(){let i=Alpine.raw(this.state).map(({key:e,value:s})=>({id:this.nextRowId++,key:e,value:s}));this.rows.forEach(e=>{(e.key===""||e.key===null)&&i.push(e)}),this.rows=i},getState(){return this.rows.filter(t=>t.key!==""&&t.key!==null).map(({key:t,value:i})=>({key:t,value:i}))},updateState(){let t=this.getState();JSON.stringify(this.state)!==JSON.stringify(t)&&(this.state=t)}}}export{h as default};
|
||||||
@@ -0,0 +1,51 @@
|
|||||||
|
var ss=Object.defineProperty;var Ld=Object.getOwnPropertyDescriptor;var Cd=Object.getOwnPropertyNames;var Ed=Object.prototype.hasOwnProperty;var zd=(o,p,m)=>()=>{if(m)throw m[0];try{return o&&(p=o(o=0)),p}catch(S){throw m=[S],S}};var Ke=(o,p)=>()=>{try{return p||o((p={exports:{}}).exports,p),p.exports}catch(m){throw p=0,m}};var Md=(o,p,m,S)=>{if(p&&typeof p=="object"||typeof p=="function")for(let b of Cd(p))!Ed.call(o,b)&&b!==m&&ss(o,b,{get:()=>p[b],enumerable:!(S=Ld(p,b))||S.enumerable});return o};var Ad=o=>Md(ss({},"__esModule",{value:!0}),o);var We=Ke((Yo,Qo)=>{(function(o,p){typeof Yo=="object"&&typeof Qo<"u"?Qo.exports=p():typeof define=="function"&&define.amd?define(p):(o=o||self,o.CodeMirror=p())})(Yo,(function(){"use strict";var o=navigator.userAgent,p=navigator.platform,m=/gecko\/\d/i.test(o),S=/MSIE \d/.test(o),b=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(o),T=/Edge\/(\d+)/.exec(o),s=S||b||T,h=s&&(S?document.documentMode||6:+(T||b)[1]),g=!T&&/WebKit\//.test(o),C=g&&/Qt\/\d+\.\d+/.test(o),_=!T&&/Chrome\/(\d+)/.exec(o),c=_&&+_[1],d=/Opera\//.test(o),w=/Apple Computer/.test(navigator.vendor),E=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(o),z=/PhantomJS/.test(o),k=w&&(/Mobile\/\w+/.test(o)||navigator.maxTouchPoints>2),R=/Android/.test(o),M=k||R||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(o),I=k||/Mac/.test(p),U=/\bCrOS\b/.test(o),J=/win/i.test(p),re=d&&o.match(/Version\/(\d*\.\d*)/);re&&(re=Number(re[1])),re&&re>=15&&(d=!1,g=!0);var F=I&&(C||d&&(re==null||re<12.11)),q=m||s&&h>=9;function D(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var Q=function(e,t){var n=e.className,r=D(t).exec(n);if(r){var i=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(i?r[1]+i:"")}};function j(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function V(e,t){return j(e).appendChild(t)}function y(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),typeof t=="string")i.appendChild(document.createTextNode(t));else if(t)for(var a=0;a<t.length;++a)i.appendChild(t[a]);return i}function G(e,t,n,r){var i=y(e,t,n,r);return i.setAttribute("role","presentation"),i}var X;document.createRange?X=function(e,t,n,r){var i=document.createRange();return i.setEnd(r||e,n),i.setStart(e,t),i}:X=function(e,t,n){var r=document.body.createTextRange();try{r.moveToElementText(e.parentNode)}catch{return r}return r.collapse(!0),r.moveEnd("character",n),r.moveStart("character",t),r};function O(e,t){if(t.nodeType==3&&(t=t.parentNode),e.contains)return e.contains(t);do if(t.nodeType==11&&(t=t.host),t==e)return!0;while(t=t.parentNode)}function H(e){var t=e.ownerDocument||e,n;try{n=e.activeElement}catch{n=t.body||null}for(;n&&n.shadowRoot&&n.shadowRoot.activeElement;)n=n.shadowRoot.activeElement;return n}function se(e,t){var n=e.className;D(t).test(n)||(e.className+=(n?" ":"")+t)}function _e(e,t){for(var n=e.split(" "),r=0;r<n.length;r++)n[r]&&!D(n[r]).test(t)&&(t+=" "+n[r]);return t}var N=function(e){e.select()};k?N=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:s&&(N=function(e){try{e.select()}catch{}});function L(e){return e.display.wrapper.ownerDocument}function he(e){return ze(e.display.wrapper)}function ze(e){return e.getRootNode?e.getRootNode():e.ownerDocument}function de(e){return L(e).defaultView}function Ee(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function ge(e,t,n){t||(t={});for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n!==!1||!Object.prototype.hasOwnProperty.call(t,r))&&(t[r]=e[r]);return t}function Oe(e,t,n,r,i){t==null&&(t=e.search(/[^\s\u00a0]/),t==-1&&(t=e.length));for(var a=r||0,l=i||0;;){var u=e.indexOf(" ",a);if(u<0||u>=t)return l+(t-a);l+=u-a,l+=n-l%n,a=u+1}}var qe=function(){this.id=null,this.f=null,this.time=0,this.handler=Ee(this.onTimeout,this)};qe.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},qe.prototype.set=function(e,t){this.f=t;var n=+new Date+e;(!this.id||n<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=n)};function Se(e,t){for(var n=0;n<e.length;++n)if(e[n]==t)return n;return-1}var Be=50,Ze={toString:function(){return"CodeMirror.Pass"}},ke={scroll:!1},Je={origin:"*mouse"},Re={origin:"+move"};function Ge(e,t,n){for(var r=0,i=0;;){var a=e.indexOf(" ",r);a==-1&&(a=e.length);var l=a-r;if(a==e.length||i+l>=t)return r+Math.min(l,t-i);if(i+=a-r,i+=n-i%n,r=a+1,i>=t)return r}}var $=[""];function Z(e){for(;$.length<=e;)$.push(ce($)+" ");return $[e]}function ce(e){return e[e.length-1]}function He(e,t){for(var n=[],r=0;r<e.length;r++)n[r]=t(e[r],r);return n}function te(e,t,n){for(var r=0,i=n(t);r<e.length&&n(e[r])<=i;)r++;e.splice(r,0,t)}function fe(){}function oe(e,t){var n;return Object.create?n=Object.create(e):(fe.prototype=e,n=new fe),t&&ge(t,n),n}var Ue=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function we(e){return/\Line truncated
|
||||||
|
|
||||||
|
b`.split(/\n/).length!=3?function(e){for(var t=0,n=[],r=e.length;t<=r;){var i=e.indexOf(`
|
||||||
|
`,t);i==-1&&(i=e.length);var a=e.slice(t,e.charAt(i-1)=="\r"?i-1:i),l=a.indexOf("\r");l!=-1?(n.push(a.slice(0,l)),t+=l+1):(n.push(a),t=i+1)}return n}:function(e){return e.split(/\r\n?|\n/)},hr=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch{return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch{}return!t||t.parentElement()!=e?!1:t.compareEndPoints("StartToEnd",t)!=0},ti=(function(){var e=y("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")})(),$t=null;function to(e){if($t!=null)return $t;var t=V(e,y("span","x")),n=t.getBoundingClientRect(),r=X(t,0,1).getBoundingClientRect();return $t=Math.abs(n.left-r.left)>1}var Wr={},Kt={};function Gt(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Wr[e]=t}function Cr(e,t){Kt[e]=t}function Ur(e){if(typeof e=="string"&&Kt.hasOwnProperty(e))e=Kt[e];else if(e&&typeof e.name=="string"&&Kt.hasOwnProperty(e.name)){var t=Kt[e.name];typeof t=="string"&&(t={name:t}),e=oe(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Ur("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Ur("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function $r(e,t){t=Ur(t);var n=Wr[t.name];if(!n)return $r(e,"text/plain");var r=n(e,t);if(gr.hasOwnProperty(t.name)){var i=gr[t.name];for(var a in i)i.hasOwnProperty(a)&&(r.hasOwnProperty(a)&&(r["_"+a]=r[a]),r[a]=i[a])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var l in t.modeProps)r[l]=t.modeProps[l];return r}var gr={};function Kr(e,t){var n=gr.hasOwnProperty(e)?gr[e]:gr[e]={};ge(t,n)}function Vt(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var i=t[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n}function _n(e,t){for(var n;e.innerMode&&(n=e.innerMode(t),!(!n||n.mode==e));)t=n.state,e=n.mode;return n||{mode:e,state:t}}function Gr(e,t,n){return e.startState?e.startState(t,n):!0}var at=function(e,t,n){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};at.prototype.eol=function(){return this.pos>=this.string.length},at.prototype.sol=function(){return this.pos==this.lineStart},at.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},at.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},at.prototype.eat=function(e){var t=this.string.charAt(this.pos),n;if(typeof e=="string"?n=t==e:n=t&&(e.test?e.test(t):e(t)),n)return++this.pos,t},at.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},at.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},at.prototype.skipToEnd=function(){this.pos=this.string.length},at.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},at.prototype.backUp=function(e){this.pos-=e},at.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=Oe(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?Oe(this.string,this.lineStart,this.tabSize):0)},at.prototype.indentation=function(){return Oe(this.string,null,this.tabSize)-(this.lineStart?Oe(this.string,this.lineStart,this.tabSize):0)},at.prototype.match=function(e,t,n){if(typeof e=="string"){var r=function(l){return n?l.toLowerCase():l},i=this.string.substr(this.pos,e.length);if(r(i)==r(e))return t!==!1&&(this.pos+=e.length),!0}else{var a=this.string.slice(this.pos).match(e);return a&&a.index>0?null:(a&&t!==!1&&(this.pos+=a[0].length),a)}},at.prototype.current=function(){return this.string.slice(this.start,this.pos)},at.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},at.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},at.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function Ae(e,t){if(t-=e.first,t<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var r=0;;++r){var i=n.children[r],a=i.chunkSize();if(t<a){n=i;break}t-=a}return n.lines[t]}function ir(e,t,n){var r=[],i=t.line;return e.iter(t.line,n.line+1,function(a){var l=a.text;i==n.line&&(l=l.slice(0,n.ch)),i==t.line&&(l=l.slice(t.ch)),r.push(l),++i}),r}function kn(e,t,n){var r=[];return e.iter(t,n,function(i){r.push(i.text)}),r}function Bt(e,t){var n=t-e.height;if(n)for(var r=e;r;r=r.parent)r.height+=n}function x(e){if(e.parent==null)return null;for(var t=e.parent,n=Se(t.lines,e),r=t.parent;r;t=r,r=r.parent)for(var i=0;r.children[i]!=t;++i)n+=r.children[i].chunkSize();return n+t.first}function P(e,t){var n=e.first;e:do{for(var r=0;r<e.children.length;++r){var
Line truncated
|
||||||
|
`?(ue=A.appendChild(y("span",ee[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),ue.setAttribute("cm-text",ee[0]),e.col+=1):(ue=e.cm.options.specialCharPlaceholder(ee[0]),ue.setAttribute("cm-text",ee[0]),s&&h<9?A.appendChild(y("span",[ue])):A.appendChild(ue),e.col+=1);e.map.push(e.pos,e.pos+1,ue),e.pos++}}if(e.trailingSpace=u.charCodeAt(t.length-1)==32,n||r||i||v||a||l){var xe=n||"";r&&(xe+=r),i&&(xe+=i);var be=y("span",[A],xe,a);if(l)for(var Ce in l)l.hasOwnProperty(Ce)&&Ce!="style"&&Ce!="class"&&be.setAttribute(Ce,l[Ce]);return e.content.appendChild(be)}e.content.appendChild(A)}}function $c(e,t){if(e.length>1&&!/ /.test(e))return e;for(var n=t,r="",i=0;i<e.length;i++){var a=e.charAt(i);a==" "&&n&&(i==e.length-1||e.charCodeAt(i+1)==32)&&(a="\xA0"),r+=a,n=a==" "}return r}function Kc(e,t){return function(n,r,i,a,l,u,f){i=i?i+" cm-force-border":"cm-force-border";for(var v=n.pos,A=v+r.length;;){for(var B=void 0,ee=0;ee<t.length&&(B=t[ee],!(B.to>v&&B.from<=v));ee++);if(B.to>=A)return e(n,r,i,a,l,u,f);e(n,r.slice(0,B.to-v),i,a,null,u,f),a=null,r=r.slice(B.to-v),v=B.to}}}function Ea(e,t,n,r){var i=!r&&n.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!r&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",n.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function Gc(e,t,n){var r=e.markedSpans,i=e.text,a=0;if(!r){for(var l=1;l<n.length;l+=2)t.addToken(t,i.slice(a,a=n[l]),La(n[l+1],t.cm.options));return}for(var u=i.length,f=0,v=1,A="",B,ee,Y=0,ie,ue,me,ve,xe;;){if(Y==f){ie=ue=me=ee="",xe=null,ve=null,Y=1/0;for(var be=[],Ce=void 0,Ne=0;Ne<r.length;++Ne){var Fe=r[Ne],$e=Fe.marker;if($e.type=="bookmark"&&Fe.from==f&&$e.widgetNode)be.push($e);else if(Fe.from<=f&&(Fe.to==null||Fe.to>f||$e.collapsed&&Fe.to==f&&Fe.from==f)){if(Fe.to!=null&&Fe.to!=f&&Y>Fe.to&&(Y=Fe.to,ue=""),$e.className&&(ie+=" "+$e.className),$e.css&&(ee=(ee?ee+";":"")+$e.css),$e.startStyle&&Fe.from==f&&(me+=" "+$e.startStyle),$e.endStyle&&Fe.to==Y&&(Ce||(Ce=[])).push($e.endStyle,Fe.to),$e.title&&((xe||(xe={})).title=$e.title),$e.attributes)for(var Ve in $e.attributes)(xe||(xe={}))[Ve]=$e.attributes[Ve];$e.collapsed&&(!ve||oo(ve.marker,$e)<0)&&(ve=Fe)}else Fe.from>f&&Y>Fe.from&&(Y=Fe.from)}if(Ce)for(var vt=0;vt<Ce.length;vt+=2)Ce[vt+1]==Y&&(ue+=" "+Ce[vt]);if(!ve||ve.from==f)for(var rt=0;rt<be.length;++rt)Ea(t,0,be[rt]);if(ve&&(ve.from||0)==f){if(Ea(t,(ve.to==null?u+1:ve.to)-f,ve.marker,ve.from==null),ve.to==null)return;ve.to==f&&(ve=!1)}}if(f>=u)break;for(var Ot=Math.min(u,Y);;){if(A){var At=f+A.length;if(!ve){var ut=At>Ot?A.slice(0,Ot-f):A;t.addToken(t,ut,B?B+ie:ie,me,f+ut.length==Y?ue:"",ee,xe)}if(At>=Ot){A=A.slice(Ot-f),f=Ot;break}f=At,me=""}A=i.slice(a,a=n[v++]),B=La(n[v++],t.cm.options)}}}function za(e,t,n){this.line=t,this.rest=Pc(t),this.size=this.rest?x(ce(this.rest))-n+1:1,this.node=this.text=null,this.hidden=mr(e,t)}function si(e,t,n){for(var r=[],i,a=t;a<n;a=i){var l=new za(e.doc,Ae(e.doc,a),a);i=a+l.size,r.push(l)}return r}var Yr=null;function Zc(e){Yr?Yr.ops.push(e):e.ownsGroup=Yr={ops:[e],delayedCallbacks:[]}}function Xc(e){var t=e.delayedCallbacks,n=0;do{for(;n<t.length;n++)t[n].call(null);for(var r=0;r<e.ops.length;r++){var i=e.ops[r];if(i.cursorActivityHandlers)for(;i.cursorActivityCalled<i.cursorActivityHandlers.length;)i.cursorActivityHandlers[i.cursorActivityCalled++].call(null,i.cm)}}while(n<t.length)}function Yc(e,t){var n=e.ownsGroup;if(n)try{Xc(n)}finally{Yr=null,t(n)}}var Tn=null;function ht(e,t){var n=nr(e,t);if(n.length){var r=Array.prototype.slice.call(arguments,2),i;Yr?i=Yr.delayedCallbacks:Tn?i=Tn:(i=Tn=[],setTimeout(Qc,0));for(var a=function(u){i.push(function(){return n[u].apply(null,r)})},l=0;l<n.length;++l)a(l)}}function Qc(){var e=Tn;Tn=null;for(var t=0;t<e.length;++t)e[t]()}function Ma(e,t,n,r){for(var i=0;i<t.changes.length;i++){var a=t.changes[i];a=="text"?Jc(e,t):a=="gutter"?Da(e,t,n,r):a=="class"?uo(e,t):a=="widget"&&ef(e,t,r)}t.changes=null}function Ln(e){return e.node==e.text&&(e.node=y("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),s&&h<8&&(e.node.style.zIndex=2)),e.node}function Vc(e,t){var n=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(n&&(n+=" CodeMirror-linebackground"),t.background)n?t.background.className=n:(t.background.parentNode.removeChild(t.background),t.background=null);else if(n){var r=Ln(t);t.background=r.insertBefore(y("div",null,n),r.firstChild),e.display.input.setUneditable(t.background)}}function Aa(e,t){var n=e.display.externalMeasured;return n&&n.line==t.line?(e.display.externalMeasured=null,t.measure=n.measure,n.built):Ca(e,t)}function Jc(e,t){var n=t.text.className,r=Aa(e,t);t.text==t.node&&(t.node=r.pre),t.text.parentNode.replaceChild(r.pre,t.text),t.text=r.pre,r.bgClass!=t.bgClass||r.textClass!=t.textClass?(t.bgClass=r.bgClass,t.textClass=r.textClass,uo(e,t)):n&&(t.te
Line truncated
|
||||||
|
top: `+Ce+"px; width: "+(Ne??f-be)+`px;
|
||||||
|
height: `+(Fe-Ce)+"px"))}function B(be,Ce,Ne){var Fe=Ae(i,be),$e=Fe.text.length,Ve,vt;function rt(ut,Dt){return fi(e,ne(be,ut),"div",Fe,Dt)}function Ot(ut,Dt,yt){var ft=Ga(e,Fe,null,ut),ct=Dt=="ltr"==(yt=="after")?"left":"right",lt=yt=="after"?ft.begin:ft.end-(/\s/.test(Fe.text.charAt(ft.end-1))?2:1);return rt(lt,ct)[ct]}var At=Pe(Fe,i.direction);return nt(At,Ce||0,Ne??$e,function(ut,Dt,yt,ft){var ct=yt=="ltr",lt=rt(ut,ct?"left":"right"),qt=rt(Dt-1,ct?"right":"left"),pn=Ce==null&&ut==0,Sr=Ne==null&&Dt==$e,St=ft==0,rr=!At||ft==At.length-1;if(qt.top-lt.top<=3){var bt=(v?pn:Sr)&&St,Zo=(v?Sr:pn)&&rr,cr=bt?u:(ct?lt:qt).left,Nr=Zo?f:(ct?qt:lt).right;A(cr,lt.top,Nr-cr,lt.bottom)}else{var Or,Lt,hn,Xo;ct?(Or=v&&pn&&St?u:lt.left,Lt=v?f:Ot(ut,yt,"before"),hn=v?u:Ot(Dt,yt,"after"),Xo=v&&Sr&&rr?f:qt.right):(Or=v?Ot(ut,yt,"before"):u,Lt=!v&&pn&&St?f:lt.right,hn=!v&&Sr&&rr?u:qt.left,Xo=v?Ot(Dt,yt,"after"):f),A(Or,lt.top,Lt-Or,lt.bottom),lt.bottom<qt.top&&A(u,lt.bottom,null,qt.top),A(hn,qt.top,Xo-hn,qt.bottom)}(!Ve||pi(lt,Ve)<0)&&(Ve=lt),pi(qt,Ve)<0&&(Ve=qt),(!vt||pi(lt,vt)<0)&&(vt=lt),pi(qt,vt)<0&&(vt=qt)}),{start:Ve,end:vt}}var ee=t.from(),Y=t.to();if(ee.line==Y.line)B(ee.line,ee.ch,Y.ch);else{var ie=Ae(i,ee.line),ue=Ae(i,Y.line),me=Zt(ie)==Zt(ue),ve=B(ee.line,ee.ch,me?ie.text.length+1:null).end,xe=B(Y.line,me?0:null,Y.ch).start;me&&(ve.top<xe.top-2?(A(ve.right,ve.top,null,ve.bottom),A(u,xe.top,xe.left,xe.bottom)):A(ve.right,ve.top,xe.left-ve.right,ve.bottom)),ve.bottom<xe.top&&A(u,ve.bottom,null,xe.top)}n.appendChild(a)}function ko(e){if(e.state.focused){var t=e.display;clearInterval(t.blinker);var n=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval(function(){e.hasFocus()||en(e),t.cursorDiv.style.visibility=(n=!n)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Qa(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||So(e))}function wo(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&en(e))},100)}function So(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),e.options.readOnly!="nocursor"&&(e.state.focused||(it(e,"focus",e,t),e.state.focused=!0,se(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),g&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),ko(e))}function en(e,t){e.state.delayingBlurEvent||(e.state.focused&&(it(e,"blur",e,t),e.state.focused=!1,Q(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function hi(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=Math.max(0,t.scroller.getBoundingClientRect().top),i=t.lineDiv.getBoundingClientRect().top,a=0,l=0;l<t.view.length;l++){var u=t.view[l],f=e.options.lineWrapping,v=void 0,A=0;if(!u.hidden){if(i+=u.line.height,s&&h<8){var B=u.node.offsetTop+u.node.offsetHeight;v=B-n,n=B}else{var ee=u.node.getBoundingClientRect();v=ee.bottom-ee.top,!f&&u.text.firstChild&&(A=u.text.firstChild.getBoundingClientRect().right-ee.left-1)}var Y=u.line.height-v;if((Y>.005||Y<-.005)&&(i<r&&(a-=Y),Bt(u.line,v),Va(u.line),u.rest))for(var ie=0;ie<u.rest.length;ie++)Va(u.rest[ie]);if(A>e.display.sizerWidth){var ue=Math.ceil(A/Jr(e.display));ue>e.display.maxLineLength&&(e.display.maxLineLength=ue,e.display.maxLine=u.line,e.display.maxLineChanged=!0)}}}Math.abs(a)>2&&(t.scroller.scrollTop+=a)}function Va(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var n=e.widgets[t],r=n.node.parentNode;r&&(n.height=r.offsetHeight)}}function gi(e,t,n){var r=n&&n.top!=null?Math.max(0,n.top):e.scroller.scrollTop;r=Math.floor(r-ui(e));var i=n&&n.bottom!=null?n.bottom:r+e.wrapper.clientHeight,a=P(t,r),l=P(t,i);if(n&&n.ensure){var u=n.ensure.from.line,f=n.ensure.to.line;u<a?(a=u,l=P(t,ar(Ae(t,u))+e.wrapper.clientHeight)):Math.min(f,t.lastLine())>=l&&(a=P(t,ar(Ae(t,f))-e.wrapper.clientHeight),l=f)}return{from:a,to:Math.max(l,a+1)}}function hf(e,t){if(!ot(e,"scrollCursorIntoView")){var n=e.display,r=n.sizer.getBoundingClientRect(),i=null,a=n.wrapper.ownerDocument;if(t.top+r.top<0?i=!0:t.bottom+r.top>(a.defaultView.innerHeight||a.documentElement.clientHeight)&&(i=!1),i!=null&&!z){var l=y("div","\u200B",null,`position: absolute;
|
||||||
|
top: `+(t.top-n.viewOffset-ui(e.display))+`px;
|
||||||
|
height: `+(t.bottom-t.top+er(e)+n.barHeight)+`px;
|
||||||
|
left: `+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(l),l.scrollIntoView(i),e.display.lineSpace.removeChild(l)}}}function gf(e,t,n,r){r==null&&(r=0);var i;!e.options.lineWrapping&&t==n&&(n=t.sticky=="before"?ne(t.line,t.ch+1,"before"):t,t=t.ch?ne(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t);for(var a=0;a<5;a++){var l=!1,u=Xt(e,t),f=!n||n==t?u:Xt(e,n);i={left:Math.min(u.left,f.left),top:Math.min(u.top,f.top)-r,right:Math.max(u.left,f.left),bottom:Math.max(u.bottom,f.bottom)+r};var v=To(e,i),A=e.doc.scrollTop,B=e.doc.scrollLeft;if(v.scrollTop!=null&&(An(e,v.scrollTop),Math.abs(e.doc.scrollTop-A)>1&&(l=!0)),v.scrollLeft!=null&&(Dr(e,v.scrollLeft),Math.abs(e.doc.scrollLeft-B)>1&&(l=!0)),!l)break}return i}function mf(e,t){var n=To(e,t);n.scrollTop!=null&&An(e,n.scrollTop),n.scrollLeft!=null&&Dr(e,n.scrollLeft)}function To(e,t){var n=e.display,r=Vr(e.display);t.top<0&&(t.top=0);var i=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:n.scroller.scrollTop,a=fo(e),l={};t.bottom-t.top>a&&(t.bottom=t.top+a);var u=e.doc.height+co(n),f=t.top<r,v=t.bottom>u-r;if(t.top<i)l.scrollTop=f?0:t.top;else if(t.bottom>i+a){var A=Math.min(t.top,(v?u:t.bottom)-a);A!=i&&(l.scrollTop=A)}var B=e.options.fixedGutter?0:n.gutters.offsetWidth,ee=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:n.scroller.scrollLeft-B,Y=Er(e)-n.gutters.offsetWidth,ie=t.right-t.left>Y;return ie&&(t.right=t.left+Y),t.left<10?l.scrollLeft=0:t.left<ee?l.scrollLeft=Math.max(0,t.left+B-(ie?0:10)):t.right>Y+ee-3&&(l.scrollLeft=t.right+(ie?0:10)-Y),l}function Lo(e,t){t!=null&&(mi(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t)}function tn(e){mi(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Mn(e,t,n){(t!=null||n!=null)&&mi(e),t!=null&&(e.curOp.scrollLeft=t),n!=null&&(e.curOp.scrollTop=n)}function vf(e,t){mi(e),e.curOp.scrollToPos=t}function mi(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var n=$a(e,t.from),r=$a(e,t.to);Ja(e,n,r,t.margin)}}function Ja(e,t,n,r){var i=To(e,{left:Math.min(t.left,n.left),top:Math.min(t.top,n.top)-r,right:Math.max(t.right,n.right),bottom:Math.max(t.bottom,n.bottom)+r});Mn(e,i.scrollLeft,i.scrollTop)}function An(e,t){Math.abs(e.doc.scrollTop-t)<2||(m||Eo(e,{top:t}),el(e,t,!0),m&&Eo(e),Fn(e,100))}function el(e,t,n){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),!(e.display.scroller.scrollTop==t&&!n)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function Dr(e,t,n,r){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),!((n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!r)&&(e.doc.scrollLeft=t,ol(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function Dn(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+co(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+er(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}var qr=function(e,t,n){this.cm=n;var r=this.vert=y("div",[y("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=y("div",[y("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=i.tabIndex=-1,e(r),e(i),Ie(r,"scroll",function(){r.clientHeight&&t(r.scrollTop,"vertical")}),Ie(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,s&&h<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};qr.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var i=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.scrollTop=0,this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var a=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+a)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(r==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:t?r:0}},qr.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},qr.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.di
Line truncated
|
||||||
|
`},setDirection:mt(function(e){e!="rtl"&&(e="ltr"),e!=this.direction&&(this.direction=e,this.iter(function(t){return t.order=null}),this.cm&&qf(this.cm))})}),Mt.prototype.eachLine=Mt.prototype.iter;var Nl=0;function Kf(e){var t=this;if(Ol(t),!(ot(t,e)||lr(t.display,e))){kt(e),s&&(Nl=+new Date);var n=Mr(t,e,!0),r=e.dataTransfer.files;if(!(!n||t.isReadOnly()))if(r&&r.length&&window.FileReader&&window.File)for(var i=r.length,a=Array(i),l=0,u=function(){++l==i&>(t,function(){n=je(t.doc,n);var Y={from:n,to:n,text:t.doc.splitLines(a.filter(function(ie){return ie!=null}).join(t.doc.lineSeparator())),origin:"paste"};an(t.doc,Y),_l(t.doc,yr(je(t.doc,n),je(t.doc,xr(Y))))})()},f=function(Y,ie){if(t.options.allowDropFileTypes&&Se(t.options.allowDropFileTypes,Y.type)==-1){u();return}var ue=new FileReader;ue.onerror=function(){return u()},ue.onload=function(){var me=ue.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(me)){u();return}a[ie]=me,u()},ue.readAsText(Y)},v=0;v<r.length;v++)f(r[v],v);else{if(t.state.draggingText&&t.doc.sel.contains(n)>-1){t.state.draggingText(e),setTimeout(function(){return t.display.input.focus()},20);return}try{var A=e.dataTransfer.getData("Text");if(A){var B;if(t.state.draggingText&&!t.state.draggingText.copy&&(B=t.listSelections()),ki(t.doc,yr(n,n)),B)for(var ee=0;ee<B.length;++ee)ln(t.doc,"",B[ee].anchor,B[ee].head,"drag");t.replaceSelection(A,"around","paste"),t.display.input.focus()}}catch{}}}}function Gf(e,t){if(s&&(!e.state.draggingText||+new Date-Nl<100)){dr(t);return}if(!(ot(e,t)||lr(e.display,t))&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!w)){var n=y("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",d&&(n.width=n.height=1,e.display.wrapper.appendChild(n),n._top=n.offsetTop),t.dataTransfer.setDragImage(n,0,0),d&&n.parentNode.removeChild(n)}}function Zf(e,t){var n=Mr(e,t);if(n){var r=document.createDocumentFragment();_o(e,n,r),e.display.dragCursor||(e.display.dragCursor=y("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),V(e.display.dragCursor,r)}}function Ol(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function Pl(e){if(document.getElementsByClassName){for(var t=document.getElementsByClassName("CodeMirror"),n=[],r=0;r<t.length;r++){var i=t[r].CodeMirror;i&&n.push(i)}n.length&&n[0].operation(function(){for(var a=0;a<n.length;a++)e(n[a])})}}var Bl=!1;function Xf(){Bl||(Yf(),Bl=!0)}function Yf(){var e;Ie(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,Pl(Qf)},100))}),Ie(window,"blur",function(){return Pl(en)})}function Qf(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var wr={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},Wn=0;Wn<10;Wn++)wr[Wn+48]=wr[Wn+96]=String(Wn);for(var Ti=65;Ti<=90;Ti++)wr[Ti]=String.fromCharCode(Ti);for(var Un=1;Un<=12;Un++)wr[Un+111]=wr[Un+63235]="F"+Un;var ur={};ur.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},ur.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},ur.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transpoLine truncated
|
||||||
|
`,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function Wl(e,t){var n=Ae(e.doc,t),r=Zt(n);return r!=n&&(t=x(r)),jo(!0,e,r,t,1)}function td(e,t){var n=Ae(e.doc,t),r=Oc(n);return r!=n&&(t=x(r)),jo(!0,e,n,t,-1)}function Ul(e,t){var n=Wl(e,t.line),r=Ae(e.doc,n.line),i=Pe(r,e.doc.direction);if(!i||i[0].level==0){var a=Math.max(n.ch,r.text.search(/\S/)),l=t.line==n.line&&t.ch<=a&&t.ch;return ne(n.line,l?0:a,n.sticky)}return n}function Ci(e,t,n){if(typeof t=="string"&&(t=$n[t],!t))return!1;e.display.input.ensurePolled();var r=e.display.shift,i=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),n&&(e.display.shift=!1),i=t(e)!=Ze}finally{e.display.shift=r,e.state.suppressEdits=!1}return i}function rd(e,t,n){for(var r=0;r<e.state.keyMaps.length;r++){var i=un(t,e.state.keyMaps[r],n,e);if(i)return i}return e.options.extraKeys&&un(t,e.options.extraKeys,n,e)||un(t,e.options.keyMap,n,e)}var nd=new qe;function Kn(e,t,n,r){var i=e.state.keySeq;if(i){if(jl(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:nd.set(50,function(){e.state.keySeq==i&&(e.state.keySeq=null,e.display.input.reset())}),$l(e,i+" "+t,n,r))return!0}return $l(e,t,n,r)}function $l(e,t,n,r){var i=rd(e,t,r);return i=="multi"&&(e.state.keySeq=t),i=="handled"&&ht(e,"keyHandled",e,t,n),(i=="handled"||i=="multi")&&(kt(n),ko(e)),!!i}function Kl(e,t){var n=Hl(t,!0);return n?t.shiftKey&&!e.state.keySeq?Kn(e,"Shift-"+n,t,function(r){return Ci(e,r,!0)})||Kn(e,n,t,function(r){if(typeof r=="string"?/^go[A-Z]/.test(r):r.motion)return Ci(e,r)}):Kn(e,n,t,function(r){return Ci(e,r)}):!1}function id(e,t,n){return Kn(e,"'"+n+"'",t,function(r){return Ci(e,r,!0)})}var Ro=null;function Gl(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField())&&(t.curOp.focus=H(he(t)),!ot(t,e))){s&&h<11&&e.keyCode==27&&(e.returnValue=!1);var n=e.keyCode;t.display.shift=n==16||e.shiftKey;var r=Kl(t,e);d&&(Ro=r?n:null,!r&&n==88&&!ti&&(I?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),m&&!I&&!r&&n==46&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),n==18&&!/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)&&od(t)}}function od(e){var t=e.display.lineDiv;se(t,"CodeMirror-crosshair");function n(r){(r.keyCode==18||!r.altKey)&&(Q(t,"CodeMirror-crosshair"),_t(document,"keyup",n),_t(document,"mouseover",n))}Ie(document,"keyup",n),Ie(document,"mouseover",n)}function Zl(e){e.keyCode==16&&(this.doc.sel.shift=!1),ot(this,e)}function Xl(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField())&&!(lr(t.display,e)||ot(t,e)||e.ctrlKey&&!e.altKey||I&&e.metaKey)){var n=e.keyCode,r=e.charCode;if(d&&n==Ro){Ro=null,kt(e);return}if(!(d&&(!e.which||e.which<10)&&Kl(t,e))){var i=String.fromCharCode(r??n);i!="\b"&&(id(t,e,i)||t.display.input.onKeyPress(e))}}}var ad=400,Ho=function(e,t,n){this.time=e,this.pos=t,this.button=n};Ho.prototype.compare=function(e,t,n){return this.time+ad>e&&ye(t,this.pos)==0&&n==this.button};var Gn,Zn;function ld(e,t){var n=+new Date;return Zn&&Zn.compare(n,e,t)?(Gn=Zn=null,"triple"):Gn&&Gn.compare(n,e,t)?(Zn=new Ho(n,e,t),Gn=null,"double"):(Gn=new Ho(n,e,t),Zn=null,"single")}function Yl(e){var t=this,n=t.display;if(!(ot(t,e)||n.activeTouch&&n.input.supportsTouch())){if(n.input.ensurePolled(),n.shift=e.shiftKey,lr(n,e)){g||(n.scroller.draggable=!1,setTimeout(function(){return n.scroller.draggable=!0},100));return}if(!Wo(t,e)){var r=Mr(t,e),i=Ut(e),a=r?ld(r,i):"single";de(t).focus(),i==1&&t.state.selectingText&&t.state.selectingText(e),!(r&&sd(t,i,r,a,e))&&(i==1?r?cd(t,r,a,e):yn(e)==n.scroller&&kt(e):i==2?(r&&_i(t.doc,r),setTimeout(function(){return n.input.focus()},20)):i==3&&(q?t.display.input.onContextMenu(e):wo(t)))}}}function sd(e,t,n,r,i){var a="Click";return r=="double"?a="Double"+a:r=="triple"&&(a="Triple"+a),a=(t==1?"Left":t==2?"Middle":"Right")+a,Kn(e,Rl(a,i),i,function(l){if(typeof l=="string"&&(l=$n[l]),!l)return!1;var u=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),u=l(e,n)!=Ze}finally{e.state.suppressEdits=!1}return u})}function ud(e,t,n){var r=e.getOption("configureMouse"),i=r?r(e,t,n):{};if(i.unit==null){var a=U?n.shiftKey&&n.metaKey:n.altKey;i.unit=a?"rectangle":t=="single"?"char":t=="double"?"word":"line"}return(i.extend==null||e.doc.extend)&&(i.extend=e.doc.extend||n.shiftKey),i.addNew==null&&(i.addNew=I?n.metaKey:n.ctrlKey),i.moveOnDrag==null&&(i.moveOnDrag=!(I?n.altKey:n.ctrlKey)),i}function cd(e,t,n,r){s?setTimeout(Ee(Qa,e),0):e.curOp.focus=H(he(e));var i=ud(e,n,r),a=e.doc.sel,l;e.options.dragDrop&&eo&&!e.isReadOnly()&&n=="single"&&(l=a.contains(t))>-1&&(ye((l=a.ranges[l]).from(),t)<0||t.xRel>0)&&(ye(l.to(),t)>0||t.xRel<0)?fd(e,r,t,i):dd(e,r,t,i)}function fd(e,t,n,r){var i=e.display,a=!1,l=gt(e,function(v){g&&(i.scroller.draggable=!1),e.state.draggingText=!1,e.state.delayingBlurEvent&&(e.hasFocus()?e.state.delayingBlurEvent=!1:wo(e)),_t(i.wrapper.ownerDocument,"mouseup",l),_t(i.wrapper.ownerDocument,"mousemove",u),_t(i.scroller,"dragstart",f),_t(i.scroller,"drop",l),a||(kt(v),r.a
Line truncated
|
||||||
|
`)==t){if(r.ranges.length%Qt.text.length==0){v=[];for(var A=0;A<Qt.text.length;A++)v.push(a.splitLines(Qt.text[A]))}}else f.length==r.ranges.length&&e.options.pasteLinesPerSelection&&(v=He(f,function(ve){return[ve]}));for(var B=e.curOp.updateInput,ee=r.ranges.length-1;ee>=0;ee--){var Y=r.ranges[ee],ie=Y.from(),ue=Y.to();Y.empty()&&(n&&n>0?ie=ne(ie.line,ie.ch-n):e.state.overwrite&&!u?ue=ne(ue.line,Math.min(Ae(a,ue.line).text.length,ue.ch+ce(f).length)):u&&Qt&&Qt.lineWise&&Qt.text.join(`
|
||||||
|
`)==f.join(`
|
||||||
|
`)&&(ie=ue=ne(ie.line,0)));var me={from:ie,to:ue,text:v?v[ee%v.length]:f,origin:i||(u?"paste":e.state.cutIncoming>l?"cut":"+input")};an(e.doc,me),ht(e,"inputRead",e,me)}t&&!u&&ns(e,t),tn(e),e.curOp.updateInput<2&&(e.curOp.updateInput=B),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function rs(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&t.hasFocus()&&Nt(t,function(){return $o(t,n,0,null,"paste")}),!0}function ns(e,t){if(!(!e.options.electricChars||!e.options.smartIndent))for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var i=n.ranges[r];if(!(i.head.ch>100||r&&n.ranges[r-1].head.line==i.head.line)){var a=e.getModeAt(i.head),l=!1;if(a.electricChars){for(var u=0;u<a.electricChars.length;u++)if(t.indexOf(a.electricChars.charAt(u))>-1){l=Xn(e,i.head.line,"smart");break}}else a.electricInput&&a.electricInput.test(Ae(e.doc,i.head.line).text.slice(0,i.head.ch))&&(l=Xn(e,i.head.line,"smart"));l&&ht(e,"electricInput",e,i.head.line)}}}function is(e){for(var t=[],n=[],r=0;r<e.doc.sel.ranges.length;r++){var i=e.doc.sel.ranges[r].head.line,a={anchor:ne(i,0),head:ne(i+1,0)};n.push(a),t.push(e.getRange(a.anchor,a.head))}return{text:t,ranges:n}}function Ko(e,t,n,r){e.setAttribute("autocorrect",n?"on":"off"),e.setAttribute("autocapitalize",r?"on":"off"),e.setAttribute("spellcheck",!!t)}function os(){var e=y("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; min-height: 1em; outline: none"),t=y("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return g?e.style.width="1000px":e.setAttribute("wrap","off"),k&&(e.style.border="1px solid black"),t}function yd(e){var t=e.optionHandlers,n=e.helpers={};e.prototype={constructor:e,focus:function(){de(this).focus(),this.display.input.focus()},setOption:function(r,i){var a=this.options,l=a[r];a[r]==i&&r!="mode"||(a[r]=i,t.hasOwnProperty(r)&>(this,t[r])(this,i,l),it(this,"optionChange",this,r))},getOption:function(r){return this.options[r]},getDoc:function(){return this.doc},addKeyMap:function(r,i){this.state.keyMaps[i?"push":"unshift"](Li(r))},removeKeyMap:function(r){for(var i=this.state.keyMaps,a=0;a<i.length;++a)if(i[a]==r||i[a].name==r)return i.splice(a,1),!0},addOverlay:Tt(function(r,i){var a=r.token?r:e.getMode(this.options,r);if(a.startState)throw new Error("Overlays may not be stateful.");te(this.state.overlays,{mode:a,modeSpec:r,opaque:i&&i.opaque,priority:i&&i.priority||0},function(l){return l.priority}),this.state.modeGen++,zt(this)}),removeOverlay:Tt(function(r){for(var i=this.state.overlays,a=0;a<i.length;++a){var l=i[a].modeSpec;if(l==r||typeof r=="string"&&l.name==r){i.splice(a,1),this.state.modeGen++,zt(this);return}}}),indentLine:Tt(function(r,i,a){typeof i!="string"&&typeof i!="number"&&(i==null?i=this.options.smartIndent?"smart":"prev":i=i?"add":"subtract"),ae(this.doc,r)&&Xn(this,r,i,a)}),indentSelection:Tt(function(r){for(var i=this.doc.sel.ranges,a=-1,l=0;l<i.length;l++){var u=i[l];if(u.empty())u.head.line>a&&(Xn(this,u.head.line,r,!0),a=u.head.line,l==this.doc.sel.primIndex&&tn(this));else{var f=u.from(),v=u.to(),A=Math.max(a,f.line);a=Math.min(this.lastLine(),v.line-(v.ch?0:1))+1;for(var B=A;B<a;++B)Xn(this,B,r);var ee=this.doc.sel.ranges;f.ch==0&&i.length==ee.length&&ee[l].from().ch>0&&Oo(this.doc,l,new Ye(f,ee[l].to()),ke)}}}),getTokenAt:function(r,i){return ga(this,r,i)},getLineTokens:function(r,i){return ga(this,ne(r),i,!0)},getTokenTypeAt:function(r){r=je(this.doc,r);var i=da(this,Ae(this.doc,r.line)),a=0,l=(i.length-1)/2,u=r.ch,f;if(u==0)f=i[2];else for(;;){var v=a+l>>1;if((v?i[v*2-1]:0)>=u)l=v;else if(i[v*2+1]<u)a=v+1;else{f=i[v*2+2];break}}var A=f?f.indexOf("overlay "):-1;return A<0?f:A==0?null:f.slice(0,A-1)},getModeAt:function(r){var i=this.doc.mode;return i.innerMode?e.innerMode(i,this.getTokenAt(r).state).mode:i},getHelper:function(r,i){return this.getHelpers(r,i)[0]},getHelpers:function(r,i){var a=[];if(!n.hasOwnProperty(i))return a;var l=n[i],u=this.getModeAt(r);if(typeof u[i]=="string")l[u[i]]&&a.push(l[u[i]]);else if(u[i])for(var f=0;f<u[i].length;f++){var v=l[u[i][f]];v&&a.push(v)}else u.helperType&&l[u.helperType]?a.push(l[u.helperType]):l[u.name]&&a.push(l[u.name]);for(var A=0;A<l._global.length;A++){var B=l._global[A];B.pred(u,this)&&Se(a,B.val)==-1&&a.push(B.val)}return a},getStateAfter:function(r,i){var a=this.doc;return r=ua(a,r??a.first+a.size-1),wn(this,r+1,i).state},cursorCoords:function(r,i){var a,l=this.doc.sel.primary();return r==null?a=l.head:typeof r=="object"?a=je(this.doc,r):a=r?l.from():l.to(),Xt(this,a,i||"page")},charCoords:function(r,i){return fi(this,je(this.doc,r),i||"page")},coordsChar:function(r,i){return r=Ua(this,r,i||"page"),mo(this,r.left,r.top)},lineAtHeight:function(r,i){return r=Ua(this,{top:r,left:0},i||"page").top,P(this.doc,r+this.display.viewOffset)},heightAtLine:function(r,i,a){var l=!1,u;if(typeof r=="number"){var f=this.doc.first+
Line truncated
|
||||||
|
`,me=Me(ue,Y)?"w":ee&&ue==`
|
||||||
|
`?"n":!ee||/\s/.test(ue)?null:"p";if(ee&&!ie&&!me&&(me="s"),B&&B!=me){n<0&&(n=1,A(),t.sticky="after");break}if(me&&(B=me),n>0&&!A(!ie))break}var ve=wi(e,t,a,l,!0);return Xe(a,ve)&&(ve.hitSide=!0),ve}function as(e,t,n,r){var i=e.doc,a=t.left,l;if(r=="page"){var u=Math.min(e.display.wrapper.clientHeight,de(e).innerHeight||i(e).documentElement.clientHeight),f=Math.max(u-.5*Vr(e.display),3);l=(n>0?t.bottom:t.top)+n*f}else r=="line"&&(l=n>0?t.bottom+3:t.top-3);for(var v;v=mo(e,a,l),!!v.outside;){if(n<0?l<=0:l>=i.height){v.hitSide=!0;break}l+=n*5}return v}var Qe=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new qe,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Qe.prototype.init=function(e){var t=this,n=this,r=n.cm,i=n.div=e.lineDiv;i.contentEditable=!0,Ko(i,r.options.spellcheck,r.options.autocorrect,r.options.autocapitalize);function a(u){for(var f=u.target;f;f=f.parentNode){if(f==i)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(f.className))break}return!1}Ie(i,"paste",function(u){!a(u)||ot(r,u)||rs(u,r)||h<=11&&setTimeout(gt(r,function(){return t.updateFromDOM()}),20)}),Ie(i,"compositionstart",function(u){t.composing={data:u.data,done:!1}}),Ie(i,"compositionupdate",function(u){t.composing||(t.composing={data:u.data,done:!1})}),Ie(i,"compositionend",function(u){t.composing&&(u.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),Ie(i,"touchstart",function(){return n.forceCompositionEnd()}),Ie(i,"input",function(){t.composing||t.readFromDOMSoon()});function l(u){if(!(!a(u)||ot(r,u))){if(r.somethingSelected())zi({lineWise:!1,text:r.getSelections()}),u.type=="cut"&&r.replaceSelection("",null,"cut");else if(r.options.lineWiseCopyCut){var f=is(r);zi({lineWise:!0,text:f.text}),u.type=="cut"&&r.operation(function(){r.setSelections(f.ranges,0,ke),r.replaceSelection("",null,"cut")})}else return;if(u.clipboardData){u.clipboardData.clearData();var v=Qt.text.join(`
|
||||||
|
`);if(u.clipboardData.setData("Text",v),u.clipboardData.getData("Text")==v){u.preventDefault();return}}var A=os(),B=A.firstChild;Ko(B),r.display.lineSpace.insertBefore(A,r.display.lineSpace.firstChild),B.value=Qt.text.join(`
|
||||||
|
`);var ee=H(ze(i));N(B),setTimeout(function(){r.display.lineSpace.removeChild(A),ee.focus(),ee==i&&n.showPrimarySelection()},50)}}Ie(i,"copy",l),Ie(i,"cut",l)},Qe.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},Qe.prototype.prepareSelection=function(){var e=Ya(this.cm,!1);return e.focus=H(ze(this.div))==this.div,e},Qe.prototype.showSelection=function(e,t){!e||!this.cm.display.view.length||((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},Qe.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Qe.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,n=t.doc.sel.primary(),r=n.from(),i=n.to();if(t.display.viewTo==t.display.viewFrom||r.line>=t.display.viewTo||i.line<t.display.viewFrom){e.removeAllRanges();return}var a=Mi(t,e.anchorNode,e.anchorOffset),l=Mi(t,e.focusNode,e.focusOffset);if(!(a&&!a.bad&&l&&!l.bad&&ye(Zr(a,l),r)==0&&ye(Et(a,l),i)==0)){var u=t.display.view,f=r.line>=t.display.viewFrom&&ls(t,r)||{node:u[0].measure.map[2],offset:0},v=i.line<t.display.viewTo&&ls(t,i);if(!v){var A=u[u.length-1].measure,B=A.maps?A.maps[A.maps.length-1]:A.map;v={node:B[B.length-1],offset:B[B.length-2]-B[B.length-3]}}if(!f||!v){e.removeAllRanges();return}var ee=e.rangeCount&&e.getRangeAt(0),Y;try{Y=X(f.node,f.offset,v.offset,v.node)}catch{}Y&&(!m&&t.state.focused?(e.collapse(f.node,f.offset),Y.collapsed||(e.removeAllRanges(),e.addRange(Y))):(e.removeAllRanges(),e.addRange(Y)),ee&&e.anchorNode==null?e.addRange(ee):m&&this.startGracePeriod()),this.rememberSelection()}},Qe.prototype.startGracePeriod=function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation(function(){return e.cm.curOp.selectionChanged=!0})},20)},Qe.prototype.showMultipleSelections=function(e){V(this.cm.display.cursorDiv,e.cursors),V(this.cm.display.selectionDiv,e.selection)},Qe.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},Qe.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return O(this.div,t)},Qe.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||H(ze(this.div))!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Qe.prototype.blur=function(){this.div.blur()},Qe.prototype.getField=function(){return this.div},Qe.prototype.supportsTouch=function(){return!0},Qe.prototype.receivedFocus=function(){var e=this,t=this;this.selectionInEditor()?setTimeout(function(){return e.pollSelection()},20):Nt(this.cm,function(){return t.cm.curOp.selectionChanged=!0});function n(){t.cm.state.focused&&(t.pollSelection(),t.polling.set(t.cm.options.pollInterval,n))}this.polling.set(this.cm.options.pollInterval,n)},Qe.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},Qe.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var e=this.getSelection(),t=this.cm;if(R&&_&&this.cm.display.gutterSpecs.length&&xd(e.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var n=Mi(t,e.anchorNode,e.anchorOffset),r=Mi(t,e.focusNode,e.focusOffset);n&&r&&Nt(t,function(){wt(t.doc,yr(n,r),ke),(n.bad||r.bad)&&(t.curOp.selectionChanged=!0)})}}},Qe.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e=this.cm,t=e.display,n=e.doc.sel.primary(),r=n.from(),i=n.to();if(r.ch==0&&r.line>e.firstLine()&&(r=ne(r.line-1,Ae(e.doc,r.line-1).length)),i.ch==Ae(e.doc,i.line).text.length&&i.line<e.lastLine()&&(i=ne(i.line+1,0)),r.line<t.viewFrom||i.line>t.viewTo-1)return!1;var a,l,u;r.line==t.viewFrom||(a=Ar(e,r.line))==0?(l=x(t.view[0].line),u=t.view[0].node):(l=x(t.view[a].line),u=t.view[a-1].node.nextSibling);var f=Ar(e,i.line),v,A;if(f==t.view.length-1?(v=t.viewTo-1,A=t.lineDiv.lastChild):(v=x(t.view[f+1].line)-1,A=t.view[f+1].node.previousSibling),!u)return!1;for(var B=e.doc.splitLines(_d(e,u,A,l,v)),ee=ir(e.doc,ne(l,0),ne(v,Ae(e.doc,v).text.length));B.length>1&&ee.length>1;)if(ce(B)==ce(ee))B.pop(),ee.pop(),v--;else if(B[0]==ee[0])B.shift(),ee.shift(),l++;else break;for(var Y=0,ie=0,ue=B[0],me=ee[0],ve=Math.min(ue.length,me.length);Y<ve&&ue.charCodeAt(Y)==me.charCodeAt(Y);)++Y;for(var xe=ce(B),be=ce(ee),Ce=Math.min(xe.length-(B.length==1?Y:0),be.length-(ee.length==1?Y:0));ie<Ce&&xe.charCodeAt(xe.length-ie-1)==be.charCodeAt(be.length-ie-1);)++ie;if(B.l
Line truncated
|
||||||
|
`),N(i))}else return;l.type=="cut"&&(r.state.cutIncoming=+new Date)}}Ie(i,"cut",a),Ie(i,"copy",a),Ie(e.scroller,"paste",function(l){if(!(lr(e,l)||ot(r,l))){if(!i.dispatchEvent){r.state.pasteIncoming=+new Date,n.focus();return}var u=new Event("paste");u.clipboardData=l.clipboardData,i.dispatchEvent(u)}}),Ie(e.lineSpace,"selectstart",function(l){lr(e,l)||kt(l)}),Ie(i,"compositionstart",function(){var l=r.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:l,range:r.markText(l,r.getCursor("to"),{className:"CodeMirror-composing"})}}),Ie(i,"compositionend",function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)})},st.prototype.createField=function(e){this.wrapper=os(),this.textarea=this.wrapper.firstChild;var t=this.cm.options;Ko(this.textarea,t.spellcheck,t.autocorrect,t.autocapitalize)},st.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},st.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=Ya(e);if(e.options.moveInputWithCursor){var i=Xt(e,n.sel.primary().head,"div"),a=t.wrapper.getBoundingClientRect(),l=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+l.top-a.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+l.left-a.left))}return r},st.prototype.showSelection=function(e){var t=this.cm,n=t.display;V(n.cursorDiv,e.cursors),V(n.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},st.prototype.reset=function(e){if(!(this.contextMenuPending||this.composing&&e)){var t=this.cm;if(this.resetting=!0,t.somethingSelected()){this.prevInput="";var n=t.getSelection();this.textarea.value=n,t.state.focused&&N(this.textarea),s&&h>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",s&&h>=9&&(this.hasSelection=null));this.resetting=!1}},st.prototype.getField=function(){return this.textarea},st.prototype.supportsTouch=function(){return!1},st.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!M||H(ze(this.textarea))!=this.textarea))try{this.textarea.focus()}catch{}},st.prototype.blur=function(){this.textarea.blur()},st.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},st.prototype.receivedFocus=function(){this.slowPoll()},st.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},st.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0;function n(){var r=t.poll();!r&&!e?(e=!0,t.polling.set(60,n)):(t.pollingFast=!1,t.slowPoll())}t.polling.set(20,n)},st.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||this.resetting||!t.state.focused||hr(n)&&!r&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=n.value;if(i==r&&!t.somethingSelected())return!1;if(s&&h>=9&&this.hasSelection===i||I&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var a=i.charCodeAt(0);if(a==8203&&!r&&(r="\u200B"),a==8666)return this.reset(),this.cm.execCommand("undo")}for(var l=0,u=Math.min(r.length,i.length);l<u&&r.charCodeAt(l)==i.charCodeAt(l);)++l;return Nt(t,function(){$o(t,i.slice(l),r.length-l,null,e.composing?"*compose":null),i.length>1e3||i.indexOf(`
|
||||||
|
`)>-1?n.value=e.prevInput="":e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},st.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},st.prototype.onKeyPress=function(){s&&h>=9&&(this.hasSelection=null),this.fastPoll()},st.prototype.onContextMenu=function(e){var t=this,n=t.cm,r=n.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var a=Mr(n,e),l=r.scroller.scrollTop;if(!a||d)return;var u=n.options.resetSelectionOnContextMenu;u&&n.doc.sel.contains(a)==-1&>(n,wt)(n.doc,yr(a),ke);var f=i.style.cssText,v=t.wrapper.style.cssText,A=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText="position: static",i.style.cssText=`position: absolute; width: 30px; height: 30px;
|
||||||
|
top: `+(e.clientY-A.top-5)+"px; left: "+(e.clientX-A.left-5)+`px;
|
||||||
|
z-index: 1000; background: `+(s?"rgba(255, 255, 255, .05)":"transparent")+`;
|
||||||
|
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var B;g&&(B=i.ownerDocument.defaultView.scrollY),r.input.focus(),g&&i.ownerDocument.defaultView.scrollTo(null,B),r.input.reset(),n.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=Y,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll);function ee(){if(i.selectionStart!=null){var ue=n.somethingSelected(),me="\u200B"+(ue?i.value:"");i.value="\u21DA",i.value=me,t.prevInput=ue?"":"\u200B",i.selectionStart=1,i.selectionEnd=me.length,r.selForContextMenu=n.doc.sel}}function Y(){if(t.contextMenuPending==Y&&(t.contextMenuPending=!1,t.wrapper.style.cssText=v,i.style.cssText=f,s&&h<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=l),i.selectionStart!=null)){(!s||s&&h<9)&&ee();var ue=0,me=function(){r.selForContextMenu==n.doc.sel&&i.selectionStart==0&&i.selectionEnd>0&&t.prevInput=="\u200B"?gt(n,Ll)(n):ue++<10?r.detectingSelectAll=setTimeout(me,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(me,200)}}if(s&&h>=9&&ee(),q){dr(e);var ie=function(){_t(window,"mouseup",ie),setTimeout(Y,20)};Ie(window,"mouseup",ie)}else setTimeout(Y,50)},st.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},st.prototype.setUneditable=function(){},st.prototype.needsContentAttribute=!1;function wd(e,t){if(t=t?ge(t):{},t.value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),t.autofocus==null){var n=H(ze(e));t.autofocus=n==e||e.getAttribute("autofocus")!=null&&n==document.body}function r(){e.value=u.getValue()}var i;if(e.form&&(Ie(e.form,"submit",r),!t.leaveSubmitMethodAlone)){var a=e.form;i=a.submit;try{var l=a.submit=function(){r(),a.submit=i,a.submit(),a.submit=l}}catch{}}t.finishInit=function(f){f.save=r,f.getTextArea=function(){return e},f.toTextArea=function(){f.toTextArea=isNaN,r(),e.parentNode.removeChild(f.getWrapperElement()),e.style.display="",e.form&&(_t(e.form,"submit",r),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=i))}},e.style.display="none";var u=tt(function(f){return e.parentNode.insertBefore(f,e.nextSibling)},t);return u}function Sd(e){e.off=_t,e.on=Ie,e.wheelEventPixels=Af,e.Doc=Mt,e.splitLines=Ht,e.countColumn=Oe,e.findColumn=Ge,e.isWordChar=we,e.Pass=Ze,e.signal=it,e.Line=Xr,e.changeEnd=xr,e.scrollbarModel=rl,e.Pos=ne,e.cmpPos=ye,e.modes=Wr,e.mimeModes=Kt,e.resolveMode=Ur,e.getMode=$r,e.modeExtensions=gr,e.extendMode=Kr,e.copyState=Vt,e.startState=Gr,e.innerMode=_n,e.commands=$n,e.keyMap=ur,e.keyName=Hl,e.isModifierKey=jl,e.lookupKey=un,e.normalizeKeyMap=Jf,e.StringStream=at,e.SharedTextMarker=Hn,e.TextMarker=kr,e.LineWidget=Rn,e.e_preventDefault=kt,e.e_stopPropagation=Rr,e.e_stop=dr,e.addClass=se,e.contains=O,e.rmClass=Q,e.keyNames=wr}gd(tt),yd(tt);var Td="iter insert remove copy getEditor constructor".split(" ");for(var Ai in Mt.prototype)Mt.prototype.hasOwnProperty(Ai)&&Se(Td,Ai)<0&&(tt.prototype[Ai]=(function(e){return function(){return e.apply(this.doc,arguments)}})(Mt.prototype[Ai]));return Wt(Mt),tt.inputStyles={textarea:st,contenteditable:Qe},tt.defineMode=function(e){!tt.defaults.mode&&e!="null"&&(tt.defaults.mode=e),Gt.apply(this,arguments)},tt.defineMIME=Cr,tt.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),tt.defineMIME("text/plain","null"),tt.defineExtension=function(e,t){tt.prototype[e]=t},tt.defineDocExtension=function(e,t){Mt.prototype[e]=t},tt.fromTextArea=wd,Sd(tt),tt.version="5.65.21",tt}))});var Yn=Ke((fs,ds)=>{(function(o){typeof fs=="object"&&typeof ds=="object"?o(We()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)})(function(o){"use strict";o.overlayMode=function(p,m,S){return{startState:function(){return{base:o.startState(p),overlay:o.startState(m),basePos:0,baseCur:null,overlayPos:0,overlayCur:null,streamSeen:null}},copyState:function(b){return{base:o.copyState(p,b.base),overlay:o.copyState(m,b.overlay),basePos:b.basePos,baseCur:null,overlayPos:b.overlayPos,overlayCur:null}},token:function(b,T){return(b!=T.streamSeen||Math.min(T.basePos,T.overlayPos)<b.start)&&(T.streamSeen=b,T.basePos=T.overlayPos=b.start),b.start==T.basePos&&(T.baseCur=p.token(b,T.base),T.basePos=b.pos),b.start==T.overlayPos&&(b.pos=b.start,T.overlayCur=m.token(b,T.overlay),T.overlayPos=b.pos),b.pos=Math.min(T.basePos,T.overlayPos),T.overlayCur==null?T.baseCur:T.baseCur!=null&&T.overlay.combineTokens||S&&T.overlay.combineTokens==null?T.baseCur+" "+T.overlayCur:T.overlayCur},indent:p.indent&&function(b,T,s){return p.indent(b.base,T,s)},electricChars:p.electricChars,innerMode:function(b){return{state:b.base,mode:p}},blankLine:function(b){var T,s;return p.blankLine&&(T=p.blankLine(b.base)),m.blankLine&&(s=m.blankLine(b.overlay)),s==null?T:S&&T!=null?T+" "+s:s}}}})});var gs=Ke((ps,hs)=>{(function(o){typeof ps=="object"&&type
Line truncated
|
||||||
|
`}else{var I=z[1],U=z[5],J=!(S.test(z[2])||z[2].indexOf(">")>=0),re=J?parseInt(z[3],10)+1+z[4]:z[2].replace("x"," ");h[g]=`
|
||||||
|
`+I+re+U,J&&b(T,C)}}T.replaceSelections(h)};function b(T,s){var h=s.line,g=0,C=0,_=p.exec(T.getLine(h)),c=_[1];do{g+=1;var d=h+g,w=T.getLine(d),E=p.exec(w);if(E){var z=E[1],k=parseInt(_[3],10)+g-C,R=parseInt(E[3],10),M=R;if(c===z&&!isNaN(R))k===R&&(M=R+1),k>R&&(M=k+1),T.replaceRange(w.replace(p,z+M+E[4]+E[5]),{line:d,ch:0},{line:d,ch:w.length});else{if(c.length>z.length||c.length<z.length&&g===1)return;C+=1}}}while(E)}})});var bs=Ke((ms,vs)=>{(function(o){typeof ms=="object"&&typeof vs=="object"?o(We()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)})(function(o){o.defineOption("placeholder","",function(h,g,C){var _=C&&C!=o.Init;if(g&&!_)h.on("blur",b),h.on("change",T),h.on("swapDoc",T),o.on(h.getInputField(),"compositionupdate",h.state.placeholderCompose=function(){S(h)}),T(h);else if(!g&&_){h.off("blur",b),h.off("change",T),h.off("swapDoc",T),o.off(h.getInputField(),"compositionupdate",h.state.placeholderCompose),p(h);var c=h.getWrapperElement();c.className=c.className.replace(" CodeMirror-empty","")}g&&!h.hasFocus()&&b(h)});function p(h){h.state.placeholder&&(h.state.placeholder.parentNode.removeChild(h.state.placeholder),h.state.placeholder=null)}function m(h){p(h);var g=h.state.placeholder=document.createElement("pre");g.style.cssText="height: 0; overflow: visible",g.style.direction=h.getOption("direction"),g.className="CodeMirror-placeholder CodeMirror-line-like";var C=h.getOption("placeholder");typeof C=="string"&&(C=document.createTextNode(C)),g.appendChild(C),h.display.lineSpace.insertBefore(g,h.display.lineSpace.firstChild)}function S(h){setTimeout(function(){var g=!1;if(h.lineCount()==1){var C=h.getInputField();g=C.nodeName=="TEXTAREA"?!h.getLine(0).length:!/[^\u200b]/.test(C.querySelector(".CodeMirror-line").textContent)}g?m(h):p(h)},20)}function b(h){s(h)&&m(h)}function T(h){var g=h.getWrapperElement(),C=s(h);g.className=g.className.replace(" CodeMirror-empty","")+(C?" CodeMirror-empty":""),C?m(h):p(h)}function s(h){return h.lineCount()===1&&h.getLine(0)===""}})});var _s=Ke((ys,xs)=>{(function(o){typeof ys=="object"&&typeof xs=="object"?o(We()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)})(function(o){"use strict";o.defineOption("styleSelectedText",!1,function(_,c,d){var w=d&&d!=o.Init;c&&!w?(_.state.markedSelection=[],_.state.markedSelectionStyle=typeof c=="string"?c:"CodeMirror-selectedtext",g(_),_.on("cursorActivity",p),_.on("change",m)):!c&&w&&(_.off("cursorActivity",p),_.off("change",m),h(_),_.state.markedSelection=_.state.markedSelectionStyle=null)});function p(_){_.state.markedSelection&&_.operation(function(){C(_)})}function m(_){_.state.markedSelection&&_.state.markedSelection.length&&_.operation(function(){h(_)})}var S=8,b=o.Pos,T=o.cmpPos;function s(_,c,d,w){if(T(c,d)!=0)for(var E=_.state.markedSelection,z=_.state.markedSelectionStyle,k=c.line;;){var R=k==c.line?c:b(k,0),M=k+S,I=M>=d.line,U=I?d:b(M,0),J=_.markText(R,U,{className:z});if(w==null?E.push(J):E.splice(w++,0,J),I)break;k=M}}function h(_){for(var c=_.state.markedSelection,d=0;d<c.length;++d)c[d].clear();c.length=0}function g(_){h(_);for(var c=_.listSelections(),d=0;d<c.length;d++)s(_,c[d].from(),c[d].to())}function C(_){if(!_.somethingSelected())return h(_);if(_.listSelections().length>1)return g(_);var c=_.getCursor("start"),d=_.getCursor("end"),w=_.state.markedSelection;if(!w.length)return s(_,c,d);var E=w[0].find(),z=w[w.length-1].find();if(!E||!z||d.line-c.line<=S||T(c,z.to)>=0||T(d,E.from)<=0)return g(_);for(;T(c,E.from)>0;)w.shift().clear(),E=w[0].find();for(T(c,E.from)<0&&(E.to.line-c.line<S?(w.shift().clear(),s(_,c,E.to,0)):s(_,c,E.from,0));T(d,z.to)<0;)w.pop().clear(),z=w[w.length-1].find();T(d,z.to)>0&&(d.line-z.from.line<S?(w.pop().clear(),s(_,z.from,d)):s(_,z.to,d))}})});var Ss=Ke((ks,ws)=>{(function(o){typeof ks=="object"&&typeof ws=="object"?o(We()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)})(function(o){"use strict";var p=o.Pos;function m(k){var R=k.flags;return R??(k.ignoreCase?"i":"")+(k.global?"g":"")+(k.multiline?"m":"")}function S(k,R){for(var M=m(k),I=M,U=0;U<R.length;U++)I.indexOf(R.charAt(U))==-1&&(I+=R.charAt(U));return M==I?k:new RegExp(k.source,I)}function b(k){return/\\s|\\n|\n|\\W|\\D|\[\^/.test(k.source)}function T(k,R,M){R=S(R,"g");for(var I=M.line,U=M.ch,J=k.lastLine();I<=J;I++,U=0){R.lastIndex=U;var re=k.getLine(I),F=R.exec(re);if(F)return{from:p(I,F.index),to:p(I,F.index+F[0].length),match:F}}}function s(k,R,M){if(!b(R))return T(k,R,M);R=S(R,"gm");for(var I,U=1,J=M.line,re=k.lastLine();J<=re;){for(var F=0;F<U&&!(J>re);F++){var q=k.getLine(J++);I=I==null?q:I+`
|
||||||
|
`+q}U=U*2,R.lastIndex=M.ch;var D=R.exec(I);if(D){var Q=I.slice(0,D.index).split(`
|
||||||
|
`),j=D[0].split(`
|
||||||
|
`),V=M.line+Q.length-1,y=Q[Q.length-1].length;return{from:p(V,y),to:p(V+j.length-1,j.length==1?y+j[0].length:j[j.length-1].length),match:D}}}}function h(k,R,M){for(var I,U=0;U<=k.length;){R.lastIndex=U;var J=R.exec(k);if(!J)break;var re=J.index+J[0].length;if(re>k.length-M)break;(!I||re>I.index+I[0].length)&&(I=J),U=J.index+1}return I}function g(k,R,M){R=S(R,"g");for(var I=M.line,U=M.ch,J=k.firstLine();I>=J;I--,U=-1){var re=k.getLine(I),F=h(re,R,U<0?0:re.length-U);if(F)return{from:p(I,F.index),to:p(I,F.index+F[0].length),match:F}}}function C(k,R,M){if(!b(R))return g(k,R,M);R=S(R,"gm");for(var I,U=1,J=k.getLine(M.line).length-M.ch,re=M.line,F=k.firstLine();re>=F;){for(var q=0;q<U&&re>=F;q++){var D=k.getLine(re--);I=I==null?D:D+`
|
||||||
|
`+I}U*=2;var Q=h(I,R,J);if(Q){var j=I.slice(0,Q.index).split(`
|
||||||
|
`),V=Q[0].split(`
|
||||||
|
`),y=re+j.length,G=j[j.length-1].length;return{from:p(y,G),to:p(y+V.length-1,V.length==1?G+V[0].length:V[V.length-1].length),match:Q}}}}var _,c;String.prototype.normalize?(_=function(k){return k.normalize("NFD").toLowerCase()},c=function(k){return k.normalize("NFD")}):(_=function(k){return k.toLowerCase()},c=function(k){return k});function d(k,R,M,I){if(k.length==R.length)return M;for(var U=0,J=M+Math.max(0,k.length-R.length);;){if(U==J)return U;var re=U+J>>1,F=I(k.slice(0,re)).length;if(F==M)return re;F>M?J=re:U=re+1}}function w(k,R,M,I){if(!R.length)return null;var U=I?_:c,J=U(R).split(/\r|\n\r?/);e:for(var re=M.line,F=M.ch,q=k.lastLine()+1-J.length;re<=q;re++,F=0){var D=k.getLine(re).slice(F),Q=U(D);if(J.length==1){var j=Q.indexOf(J[0]);if(j==-1)continue e;var M=d(D,Q,j,U)+F;return{from:p(re,d(D,Q,j,U)+F),to:p(re,d(D,Q,j+J[0].length,U)+F)}}else{var V=Q.length-J[0].length;if(Q.slice(V)!=J[0])continue e;for(var y=1;y<J.length-1;y++)if(U(k.getLine(re+y))!=J[y])continue e;var G=k.getLine(re+J.length-1),X=U(G),O=J[J.length-1];if(X.slice(0,O.length)!=O)continue e;return{from:p(re,d(D,Q,V,U)+F),to:p(re+J.length-1,d(G,X,O.length,U))}}}}function E(k,R,M,I){if(!R.length)return null;var U=I?_:c,J=U(R).split(/\r|\n\r?/);e:for(var re=M.line,F=M.ch,q=k.firstLine()-1+J.length;re>=q;re--,F=-1){var D=k.getLine(re);F>-1&&(D=D.slice(0,F));var Q=U(D);if(J.length==1){var j=Q.lastIndexOf(J[0]);if(j==-1)continue e;return{from:p(re,d(D,Q,j,U)),to:p(re,d(D,Q,j+J[0].length,U))}}else{var V=J[J.length-1];if(Q.slice(0,V.length)!=V)continue e;for(var y=1,M=re-J.length+1;y<J.length-1;y++)if(U(k.getLine(M+y))!=J[y])continue e;var G=k.getLine(re+1-J.length),X=U(G);if(X.slice(X.length-J[0].length)!=J[0])continue e;return{from:p(re+1-J.length,d(G,X,G.length-J[0].length,U)),to:p(re,d(D,Q,V.length,U))}}}}function z(k,R,M,I){this.atOccurrence=!1,this.afterEmptyMatch=!1,this.doc=k,M=M?k.clipPos(M):p(0,0),this.pos={from:M,to:M};var U;typeof I=="object"?U=I.caseFold:(U=I,I=null),typeof R=="string"?(U==null&&(U=!1),this.matches=function(J,re){return(J?E:w)(k,R,re,U)}):(R=S(R,"gm"),!I||I.multiline!==!1?this.matches=function(J,re){return(J?C:s)(k,R,re)}:this.matches=function(J,re){return(J?g:T)(k,R,re)})}z.prototype={findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(k){var R=this.doc.clipPos(k?this.pos.from:this.pos.to);if(this.afterEmptyMatch&&this.atOccurrence&&(R=p(R.line,R.ch),k?(R.ch--,R.ch<0&&(R.line--,R.ch=(this.doc.getLine(R.line)||"").length)):(R.ch++,R.ch>(this.doc.getLine(R.line)||"").length&&(R.ch=0,R.line++)),o.cmpPos(R,this.doc.clipPos(R))!=0))return this.atOccurrence=!1;var M=this.matches(k,R);if(this.afterEmptyMatch=M&&o.cmpPos(M.from,M.to)==0,M)return this.pos=M,this.atOccurrence=!0,this.pos.match||!0;var I=p(k?this.doc.firstLine():this.doc.lastLine()+1,0);return this.pos={from:I,to:I},this.atOccurrence=!1},from:function(){if(this.atOccurrence)return this.pos.from},to:function(){if(this.atOccurrence)return this.pos.to},replace:function(k,R){if(this.atOccurrence){var M=o.splitLines(k);this.doc.replaceRange(M,this.pos.from,this.pos.to,R),this.pos.to=p(this.pos.from.line+M.length-1,M[M.length-1].length+(M.length==1?this.pos.from.ch:0))}}},o.defineExtension("getSearchCursor",function(k,R,M){return new z(this.doc,k,R,M)}),o.defineDocExtension("getSearchCursor",function(k,R,M){return new z(this,k,R,M)}),o.defineExtension("selectMatches",function(k,R){for(var M=[],I=this.getSearchCursor(k,this.getCursor("from"),R);I.findNext()&&!(o.cmpPos(I.to(),this.getCursor("to"))>0);)M.push({anchor:I.from(),head:I.to()});M.length&&this.setSelections(M,0)})})});var Vo=Ke((Ts,Ls)=>{(function(o){typeof Ts=="object"&&typeof Ls=="object"?o(We()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)})(function(o){"use strict";function p(O,H,se,_e,N,L){this.indented=O,this.column=H,this.type=se,this.info=_e,this.align=N,this.prev=L}function m(O,H,se,_e){var N=O.indented;return O.context&&O.context.type=="statement"&&se!="statement"&&(N=O.context.indented),O.context=new p(N,H,se,_e,null,O.context)}function S(O){var H=O.context.type;return(H==")"||H=="]"||H=="}")&&(O.indented=O.context.indented),O.context=O.context.prev}function b(O,H,se){if(H.prevToken=="variable"||H.prevToken=="type"||/\S(?:[^- ]>|[*\]])\s*$|\*$/.test(O.string.slice(0,se))||H.typeAtEndOfLine&&O.column()==O.indentation())return!0}function T(O){for(;;){if(!O||O.type=="top")return!0;if(O.type=="}"&&O.prev.info!="namespace")return!1;O=O.prev}}o.defineMode("clike",function(O,H){var se=O.indentUnit,_e=H.statementIndentUnit||se,N=H.dontAlignCalls,L=H.keywords||{},he=H.types||{},ze=H.builtin||{},de=H.blockKeywords||{},Ee=H.defKeywords||{},ge=H.atoms||{},Oe=H.hooks||{},qe=H.multiLineStrings,Se=H.indentStatements!==!1,Be=H.indentSwitch!==!1,Ze=H.namespaceSeparator,ke=H.isPunctuationChar||/[\[\]{}\(\),;\:\.]/,Je=H.numberStart||/[\d\.]/,Re=H.number||/^(?:0x[a-f\d]+|0b[01]+|(?:\d+\.?\d*|\.\d+)(?:e[-+]?\d+)?)(u|ll?|l|f)
Line truncated
|
||||||
|
`&&(b.innerActive=b.inner=null);else for(var s=0;s<m.length;++s){var h=m[s];h.open===`
|
||||||
|
`&&(b.innerActive=h,b.inner=o.startState(h.mode,T.indent?T.indent(b.outer,"",""):0))}},electricChars:p.electricChars,innerMode:function(b){return b.inner?{state:b.inner,mode:b.innerActive.mode}:{state:b.outer,mode:p}}}}})});var uc=Ke((lc,sc)=>{(function(o){typeof lc=="object"&&typeof sc=="object"?o(We(),Di(),ac()):typeof define=="function"&&define.amd?define(["../../lib/codemirror","../../addon/mode/simple","../../addon/mode/multiplex"],o):o(CodeMirror)})(function(o){"use strict";o.defineSimpleMode("handlebars-tags",{start:[{regex:/\{\{\{/,push:"handlebars_raw",token:"tag"},{regex:/\{\{!--/,push:"dash_comment",token:"comment"},{regex:/\{\{!/,push:"comment",token:"comment"},{regex:/\{\{/,push:"handlebars",token:"tag"}],handlebars_raw:[{regex:/\}\}\}/,pop:!0,token:"tag"}],handlebars:[{regex:/\}\}/,pop:!0,token:"tag"},{regex:/"(?:[^\\"]|\\.)*"?/,token:"string"},{regex:/'(?:[^\\']|\\.)*'?/,token:"string"},{regex:/>|[#\/]([A-Za-z_]\w*)/,token:"keyword"},{regex:/(?:else|this)\b/,token:"keyword"},{regex:/\d+/i,token:"number"},{regex:/=|~|@|true|false/,token:"atom"},{regex:/(?:\.\.\/)*(?:[A-Za-z_][\w\.]*)+/,token:"variable-2"}],dash_comment:[{regex:/--\}\}/,pop:!0,token:"comment"},{regex:/./,token:"comment"}],comment:[{regex:/\}\}/,pop:!0,token:"comment"},{regex:/./,token:"comment"}],meta:{blockCommentStart:"{{--",blockCommentEnd:"--}}"}}),o.defineMode("handlebars",function(p,m){var S=o.getMode(p,"handlebars-tags");return!m||!m.base?S:o.multiplexingMode(o.getMode(p,m.base),{open:"{{",close:/\}\}\}?/,mode:S,parseDelimiters:!0})}),o.defineMIME("text/x-handlebars-template","handlebars")})});var dc=Ke((cc,fc)=>{(function(o){"use strict";typeof cc=="object"&&typeof fc=="object"?o(We(),Yn(),mn(),vn(),ec(),gn(),ea(),ta(),nc(),uc()):typeof define=="function"&&define.amd?define(["../../lib/codemirror","../../addon/mode/overlay","../xml/xml","../javascript/javascript","../coffeescript/coffeescript","../css/css","../sass/sass","../stylus/stylus","../pug/pug","../handlebars/handlebars"],o):o(CodeMirror)})(function(o){var p={script:[["lang",/coffee(script)?/,"coffeescript"],["type",/^(?:text|application)\/(?:x-)?coffee(?:script)?$/,"coffeescript"],["lang",/^babel$/,"javascript"],["type",/^text\/babel$/,"javascript"],["type",/^text\/ecmascript-\d+$/,"javascript"]],style:[["lang",/^stylus$/i,"stylus"],["lang",/^sass$/i,"sass"],["lang",/^less$/i,"text/x-less"],["lang",/^scss$/i,"text/x-scss"],["type",/^(text\/)?(x-)?styl(us)?$/i,"stylus"],["type",/^text\/sass/i,"sass"],["type",/^(text\/)?(x-)?scss$/i,"text/x-scss"],["type",/^(text\/)?(x-)?less$/i,"text/x-less"]],template:[["lang",/^vue-template$/i,"vue"],["lang",/^pug$/i,"pug"],["lang",/^handlebars$/i,"handlebars"],["type",/^(text\/)?(x-)?pug$/i,"pug"],["type",/^text\/x-handlebars-template$/i,"handlebars"],[null,null,"vue-template"]]};o.defineMode("vue-template",function(m,S){var b={token:function(T){if(T.match(/^\{\{.*?\}\}/))return"meta mustache";for(;T.next()&&!T.match("{{",!1););return null}};return o.overlayMode(o.getMode(m,S.backdrop||"text/html"),b)}),o.defineMode("vue",function(m){return o.getMode(m,{name:"htmlmixed",tags:p})},"htmlmixed","xml","javascript","coffeescript","css","sass","stylus","pug","handlebars"),o.defineMIME("script/x-vue","vue"),o.defineMIME("text/x-vue","vue")})});var gc=Ke((pc,hc)=>{(function(o){typeof pc=="object"&&typeof hc=="object"?o(We()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)})(function(o){"use strict";o.defineMode("yaml",function(){var p=["true","false","on","off","yes","no"],m=new RegExp("\\b(("+p.join(")|(")+"))$","i");return{token:function(S,b){var T=S.peek(),s=b.escaped;if(b.escaped=!1,T=="#"&&(S.pos==0||/\s/.test(S.string.charAt(S.pos-1))))return S.skipToEnd(),"comment";if(S.match(/^('([^']|\\.)*'?|"([^"]|\\.)*"?)/))return"string";if(b.literal&&S.indentation()>b.keyCol)return S.skipToEnd(),"string";if(b.literal&&(b.literal=!1),S.sol()){if(b.keyCol=0,b.pair=!1,b.pairStart=!1,S.match("---")||S.match("..."))return"def";if(S.match(/\s*-\s+/))return"meta"}if(S.match(/^(\{|\}|\[|\])/))return T=="{"?b.inlinePairs++:T=="}"?b.inlinePairs--:T=="["?b.inlineList++:b.inlineList--,"meta";if(b.inlineList>0&&!s&&T==",")return S.next(),"meta";if(b.inlinePairs>0&&!s&&T==",")return b.keyCol=0,b.pair=!1,b.pairStart=!1,S.next(),"meta";if(b.pairStart){if(S.match(/^\s*(\||\>)\s*/))return b.literal=!0,"meta";if(S.match(/^\s*(\&|\*)[a-z0-9\._-]+\b/i))return"variable-2";if(b.inlinePairs==0&&S.match(/^\s*-?[0-9\.\,]+\s?$/)||b.inlinePairs>0&&S.match(/^\s*-?[0-9\.\,]+\s?(?=(,|}))/))return"number";if(S.match(m))return"keyword"}return!b.pair&&S.match(/^\s*(?:[,\[\]{}&*!|>'"%@`][^\s'":]|[^\s,\[\]{}#&*!|>'"%@`])[^#:]*(?=:($|\s))/)?(b.pair=!0,b.keyCol=S.indentation(),"atom"):b.pair&&S.match(/^:\s*/)?(b.pairStart=!0,"meta"):(b.pairStart=!1,b.escaped=T=="\\",S.next(),null)},startState:function(){return{pair:!1,pairStart:!1,keyCol:0,inlinePairs:0,inlineList:0,literal:!1,escaped:!1}},lineComment:"#",fold:"indent"}}),o.defineMIME(Line truncated
|
||||||
|
`,L=`
|
||||||
|
`+O;_e&&se++,_e&&X.ch===0&&(L=O+`
|
||||||
|
`,se--),jr(y,!1,[N,L]),y.setSelection({line:H,ch:0},{line:se,ch:0})}var s=o.codemirror,h=s.getCursor("start"),g=s.getCursor("end"),C=s.getTokenAt({line:h.line,ch:h.ch||1}),_=s.getLineHandle(h.line),c=b(s,h.line,_,C),d,w,E;if(c==="single"){var z=_.text.slice(0,h.ch).replace("`",""),k=_.text.slice(h.ch).replace("`","");s.replaceRange(z+k,{line:h.line,ch:0},{line:h.line,ch:99999999999999}),h.ch--,h!==g&&g.ch--,s.setSelection(h,g),s.focus()}else if(c==="fenced")if(h.line!==g.line||h.ch!==g.ch){for(d=h.line;d>=0&&(_=s.getLineHandle(d),!m(_));d--);var R=s.getTokenAt({line:d,ch:1}),M=S(R).fencedChars,I,U,J,re;m(s.getLineHandle(h.line))?(I="",U=h.line):m(s.getLineHandle(h.line-1))?(I="",U=h.line-1):(I=M+`
|
||||||
|
`,U=h.line),m(s.getLineHandle(g.line))?(J="",re=g.line,g.ch===0&&(re+=1)):g.ch!==0&&m(s.getLineHandle(g.line+1))?(J="",re=g.line+1):(J=M+`
|
||||||
|
`,re=g.line+1),g.ch===0&&(re-=1),s.operation(function(){s.replaceRange(J,{line:re,ch:0},{line:re+(J?0:1),ch:0}),s.replaceRange(I,{line:U,ch:0},{line:U+(I?0:1),ch:0})}),s.setSelection({line:U+(I?1:0),ch:0},{line:re+(I?1:-1),ch:0}),s.focus()}else{var F=h.line;if(m(s.getLineHandle(h.line))&&(b(s,h.line+1)==="fenced"?(d=h.line,F=h.line+1):(w=h.line,F=h.line-1)),d===void 0)for(d=F;d>=0&&(_=s.getLineHandle(d),!m(_));d--);if(w===void 0)for(E=s.lineCount(),w=F;w<E&&(_=s.getLineHandle(w),!m(_));w++);s.operation(function(){s.replaceRange("",{line:d,ch:0},{line:d+1,ch:0}),s.replaceRange("",{line:w-1,ch:0},{line:w,ch:0})}),s.focus()}else if(c==="indented"){if(h.line!==g.line||h.ch!==g.ch)d=h.line,w=g.line,g.ch===0&&w--;else{for(d=h.line;d>=0;d--)if(_=s.getLineHandle(d),!_.text.match(/^\s*$/)&&b(s,d,_)!=="indented"){d+=1;break}for(E=s.lineCount(),w=h.line;w<E;w++)if(_=s.getLineHandle(w),!_.text.match(/^\s*$/)&&b(s,w,_)!=="indented"){w-=1;break}}var q=s.getLineHandle(w+1),D=q&&s.getTokenAt({line:w+1,ch:q.text.length-1}),Q=D&&S(D).indentedCode;s.operation(function(){Q&&s.replaceRange(`
|
||||||
|
`,{line:w+1,ch:0});for(var y=d;y<=w;y++)s.indentLine(y,"subtract")}),s.focus()}else{var j=h.line===g.line&&h.ch===g.ch&&h.ch===0,V=h.line!==g.line;j||V?T(s,h,g,p):jr(s,!1,["`","`"])}}function Bi(o){la(o.codemirror,"quote")}function Jn(o){Lr(o.codemirror,"smaller")}function ji(o){Lr(o.codemirror,"bigger")}function Ri(o){Lr(o.codemirror,void 0,1)}function Hi(o){Lr(o.codemirror,void 0,2)}function Wi(o){Lr(o.codemirror,void 0,3)}function na(o){Lr(o.codemirror,void 0,4)}function ia(o){Lr(o.codemirror,void 0,5)}function oa(o){Lr(o.codemirror,void 0,6)}function Ui(o){var p=o.codemirror,m="*";["-","+","*"].includes(o.options.unorderedListStyle)&&(m=o.options.unorderedListStyle),la(p,"unordered-list",m)}function $i(o){la(o.codemirror,"ordered-list")}function Ki(o){jd(o.codemirror)}function Gi(o){var p=o.options,m="https://";if(p.promptURLs){var S=prompt(p.promptTexts.link,m);if(!S)return!1;m=xc(S)}kc(o,"link",p.insertTexts.link,m)}function Zi(o){var p=o.options,m="https://";if(p.promptURLs){var S=prompt(p.promptTexts.image,m);if(!S)return!1;m=xc(S)}kc(o,"image",p.insertTexts.image,m)}function xc(o){return encodeURI(o).replace(/([\\()])/g,"\\$1")}function aa(o){o.openBrowseFileWindow()}function _c(o,p){var m=o.codemirror,S=Tr(m),b=o.options,T=p.substr(p.lastIndexOf("/")+1),s=T.substring(T.lastIndexOf(".")+1).replace(/\?.*$/,"").toLowerCase();if(["png","jpg","jpeg","gif","svg","apng","avif","webp"].includes(s))jr(m,S.image,b.insertTexts.uploadedImage,p);else{var h=b.insertTexts.link;h[0]="["+T,jr(m,S.link,h,p)}o.updateStatusBar("upload-image",o.options.imageTexts.sbOnUploaded.replace("#image_name#",T)),setTimeout(function(){o.updateStatusBar("upload-image",o.options.imageTexts.sbInit)},1e3)}function Xi(o){var p=o.codemirror,m=Tr(p),S=o.options;jr(p,m.table,S.insertTexts.table)}function Yi(o){var p=o.codemirror,m=Tr(p),S=o.options;jr(p,m.image,S.insertTexts.horizontalRule)}function Qi(o){var p=o.codemirror;p.undo(),p.focus()}function Vi(o){var p=o.codemirror;p.redo(),p.focus()}function bn(o){var p=o.codemirror,m=p.getWrapperElement(),S=m.nextSibling,b=o.toolbarElements&&o.toolbarElements["side-by-side"],T=!1,s=m.parentNode;S.classList.contains("editor-preview-active-side")?(o.options.sideBySideFullscreen===!1&&s.classList.remove("sided--no-fullscreen"),S.classList.remove("editor-preview-active-side"),b&&b.classList.remove("active"),m.classList.remove("CodeMirror-sided")):(setTimeout(function(){p.getOption("fullScreen")||(o.options.sideBySideFullscreen===!1?s.classList.add("sided--no-fullscreen"):Br(o)),S.classList.add("editor-preview-active-side")},1),b&&b.classList.add("active"),m.classList.add("CodeMirror-sided"),T=!0);var h=m.lastChild;if(h.classList.contains("editor-preview-active")){h.classList.remove("editor-preview-active");var g=o.toolbarElements.preview,C=o.toolbar_div;g.classList.remove("active"),C.classList.remove("disabled-for-preview")}var _=function(){var d=o.options.previewRender(o.value(),S);d!=null&&(S.innerHTML=d)};if(p.sideBySideRenderingFunction||(p.sideBySideRenderingFunction=_),T){var c=o.options.previewRender(o.value(),S);c!=null&&(S.innerHTML=c),p.on("update",p.sideBySideRenderingFunction)}else p.off("update",p.sideBySideRenderingFunction);p.refresh()}function Ji(o){var p=o.codemirror,m=p.getWrapperElement(),S=o.toolbar_div,b=o.options.toolbar?o.toolbarElements.preview:!1,T=m.lastChild,s=p.getWrapperElement().nextSibling;if(s.classList.contains("editor-preview-active-side")&&bn(o),!T||!T.classList.contains("editor-preview-full")){if(T=document.createElement("div"),T.className="editor-preview-full",o.options.previewClass)if(Array.isArray(o.options.previewClass))for(var h=0;h<o.options.previewClass.length;h++)T.classList.add(o.options.previewClass[h]);else typeof o.options.previewClass=="string"&&T.classList.add(o.options.previewClass);m.appendChild(T)}T.classList.contains("editor-preview-active")?(T.classList.remove("editor-preview-active"),b&&(b.classList.remove("active"),S.classList.remove("disabled-for-preview"))):(setTimeout(function(){T.classList.add("editor-preview-active")},1),b&&(b.classList.add("active"),S.classList.add("disabled-for-preview")));var g=o.options.previewRender(o.value(),T);g!==null&&(T.innerHTML=g)}function jr(o,p,m,S){if(!o.getWrapperElement().lastChild.classList.contains("editor-preview-active")){var b,T=m[0],s=m[1],h={},g={};Object.assign(h,o.getCursor("start")),Object.assign(g,o.getCursor("end")),S&&(T=T.replace("#url#",S),s=s.replace("#url#",S)),p?(b=o.getLine(h.line),T=b.slice(0,h.ch),s=b.slice(h.ch),o.replaceRange(T+s,{line:h.line,ch:0})):(b=o.getSelection(),o.replaceSelection(T+b+s),h.ch+=T.length,h!==g&&(g.ch+=T.length)),o.setSelection(h,g),o.focus()}}function Lr(o,p,m){if(!o.getWrapperElement().lastChild.classList.contains("editor-preview-active")){for(var S=o.getCursor("start"),b=o.getCursor("end"),T=S.line;T<=b.line;T++)(function(s){var h=o.getLine(s),g=h.search(/[^#]/);p!==void 0?g<=0?p=="bigger"?h="###### "+h:h="# "+h:g==6&&p=="smaller"?h=h.substr(7):g==1&&p
Line truncated
|
||||||
|
|
||||||
|
| Column 1 | Column 2 | Column 3 |
|
||||||
|
| -------- | -------- | -------- |
|
||||||
|
| Text | Text | Text |
|
||||||
|
|
||||||
|
`],horizontalRule:["",`
|
||||||
|
|
||||||
|
-----
|
||||||
|
|
||||||
|
`]},Hd={link:"URL for the link:",image:"URL of the image:"},Wd={locale:"en-US",format:{hour:"2-digit",minute:"2-digit"}},Ud={bold:"**",code:"```",italic:"*"},$d={sbInit:"Attach files by drag and dropping or pasting from clipboard.",sbOnDragEnter:"Drop image to upload it.",sbOnDrop:"Uploading image #images_names#...",sbProgress:"Uploading #file_name#: #progress#%",sbOnUploaded:"Uploaded #image_name#",sizeUnits:" B, KB, MB"},Kd={noFileGiven:"You must select a file.",typeNotAllowed:"This image type is not allowed.",fileTooLarge:`Image #image_name# is too big (#image_size#).
|
||||||
|
Maximum file size is #image_max_size#.`,importError:"Something went wrong when uploading the image #image_name#."};Te.prototype.uploadImages=function(o,p,m){if(o.length!==0){for(var S=[],b=0;b<o.length;b++)S.push(o[b].name),this.uploadImage(o[b],p,m);this.updateStatusBar("upload-image",this.options.imageTexts.sbOnDrop.replace("#images_names#",S.join(", ")))}};Te.prototype.uploadImagesUsingCustomFunction=function(o,p){if(p.length!==0){for(var m=[],S=0;S<p.length;S++)m.push(p[S].name),this.uploadImageUsingCustomFunction(o,p[S]);this.updateStatusBar("upload-image",this.options.imageTexts.sbOnDrop.replace("#images_names#",m.join(", ")))}};Te.prototype.updateStatusBar=function(o,p){if(this.gui.statusbar){var m=this.gui.statusbar.getElementsByClassName(o);m.length===1?this.gui.statusbar.getElementsByClassName(o)[0].textContent=p:m.length===0?console.log("EasyMDE: status bar item "+o+" was not found."):console.log("EasyMDE: Several status bar items named "+o+" was found.")}};Te.prototype.markdown=function(o){if(marked){var p;if(this.options&&this.options.renderingConfig&&this.options.renderingConfig.markedOptions?p=this.options.renderingConfig.markedOptions:p={},this.options&&this.options.renderingConfig&&this.options.renderingConfig.singleLineBreaks===!1?p.breaks=!1:p.breaks=!0,this.options&&this.options.renderingConfig&&this.options.renderingConfig.codeSyntaxHighlighting===!0){var m=this.options.renderingConfig.hljs||window.hljs;m&&(p.highlight=function(b,T){return T&&m.getLanguage(T)?m.highlight(T,b).value:m.highlightAuto(b).value})}marked.setOptions(p);var S=marked.parse(o);return this.options.renderingConfig&&typeof this.options.renderingConfig.sanitizerFunction=="function"&&(S=this.options.renderingConfig.sanitizerFunction.call(this,S)),S=Id(S),S=Nd(S),S}};Te.prototype.render=function(o){if(o||(o=this.element||document.getElementsByTagName("textarea")[0]),this._rendered&&this._rendered===o)return;this.element=o;var p=this.options,m=this,S={};function b(I){let U=I.getInputField(),J=U.form;if(J){let re=Array.from(J.elements).filter(q=>!(q.closest&&q.closest(".editor-toolbar")||q.offsetParent===null)),F=re.indexOf(U);F!==-1&&F+1<re.length&&re[F+1]&&re[F+1].focus()}}function T(I){let U=I.getInputField(),J=U.form;if(J){let re=Array.from(J.elements).filter(q=>!(q.closest&&q.closest(".editor-toolbar")||q.offsetParent===null)),F=re.indexOf(U);if(F!==-1)for(let q=F-1;q>=0;q--){let D=re[q];if(D){D.focus();break}}}}for(var s in p.shortcuts)p.shortcuts[s]!==null&&Vn[s]!==null&&(function(I){S[yc(p.shortcuts[I])]=function(){var U=Vn[I];typeof U=="function"?U(m):typeof U=="string"&&window.open(U,"_blank")}})(s);S.Enter="newlineAndIndentContinueMarkdownList",S.Tab=I=>{let U=I.getSelection();U&&U.length>0?I.execCommand("indentMore"):b(I)},S["Shift-Tab"]=I=>{let U=I.getSelection();U&&U.length>0?I.execCommand("indentLess"):T(I)},S.Esc=function(I){I.getOption("fullScreen")&&Br(m)},this.documentOnKeyDown=function(I){I=I||window.event,I.keyCode==27&&m.codemirror.getOption("fullScreen")&&Br(m)},document.addEventListener("keydown",this.documentOnKeyDown,!1);var h,g;p.overlayMode?(CodeMirror.defineMode("overlay-mode",function(I){return CodeMirror.overlayMode(CodeMirror.getMode(I,p.spellChecker!==!1?"spell-checker":"gfm"),p.overlayMode.mode,p.overlayMode.combine)}),h="overlay-mode",g=p.parsingConfig,g.gitHubSpice=!1):(h=p.parsingConfig,h.name="gfm",h.gitHubSpice=!1),p.spellChecker!==!1&&(h="spell-checker",g=p.parsingConfig,g.name="gfm",g.gitHubSpice=!1,typeof p.spellChecker=="function"?p.spellChecker({codeMirrorInstance:CodeMirror}):CodeMirrorSpellChecker({codeMirrorInstance:CodeMirror}));function C(I,U,J){return{addNew:!1}}CodeMirror.getMode("php").mime="text/x-php",this.codemirror=CodeMirror.fromTextArea(o,{mode:h,backdrop:g,theme:p.theme!=null?p.theme:"easymde",tabSize:p.tabSize!=null?p.tabSize:2,indentUnit:p.tabSize!=null?p.tabSize:2,indentWithTabs:p.indentWithTabs!==!1,lineNumbers:p.lineNumbers===!0,autofocus:p.autofocus===!0,extraKeys:S,direction:p.direction,lineWrapping:p.lineWrapping!==!1,allowDropFileTypes:["text/plain"],placeholder:p.placeholder||o.getAttribute("placeholder")||"",styleSelectedText:p.styleSelectedText!=null?p.styleSelectedText:!ra(),scrollbarStyle:p.scrollbarStyle!=null?p.scrollbarStyle:"native",configureMouse:C,inputStyle:p.inputStyle!=null?p.inputStyle:ra()?"contenteditable":"textarea",spellcheck:p.nativeSpellcheck!=null?p.nativeSpellcheck:!0,autoRefresh:p.autoRefresh!=null?p.autoRefresh:!1,leaveSubmitMethodAlone:!0});var _=this.codemirror.getScrollerElement();if(_.style.minHeight=p.minHeight,typeof p.maxHeight<"u"&&(_.setAttribute("tabindex","0"),_.style.setProperty(this.hasExplicitMinHeight?"max-height":"height",p.maxHeight)),p.forceSync===!0){var c=this.codemirror;c.on("change",function(){c.save()})}this.gui={};var d=document.createElement("div");d.classList.add("EasyMDEContainer"),d.setAttribute("role","application");var w=this.codemirror.getWrapperElement();w.parentNode.insertBefore(d,w),d.appendChil
Line truncated
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
function $({statePath:l,isCollapsed:c,collapseKey:f}){return{isCollapsed:f?Alpine.$persist(c).as(f):c,collapseFromEvent(m){m.detail===l&&(this.isCollapsed=!0)},expandFromEvent(m){m.detail===l&&(this.isCollapsed=!1)},expand(){this.isCollapsed=!1},toggleCollapsed(){this.isCollapsed=!this.isCollapsed},get itemClasses(){return{"fi-collapsed":this.isCollapsed}}}}function x({schemaComponent:l,moveUpAction:c,moveDownAction:f,reorderAction:m,message:y,hasCustomReorderAction:w}){let A=e=>JSON.stringify({name:e?.name,arguments:e?.arguments,context:e?.context});return{pending:null,frame:null,destroyed:!1,listeners:[],removeCommitHook:null,init(){let e=(t,s,d,g=!0)=>{t.addEventListener(s,d,g),this.listeners.push(()=>t.removeEventListener(s,d,g))};e(document,"pointerdown",t=>{this.pending?.control?.contains(t.target)||this.relinquishFocus()}),e(document,"keydown",t=>{t.key==="Tab"&&this.relinquishFocus()}),e(document,"focusin",t=>{this.pending&&t.target!==this.pending.control&&this.relinquishFocus()}),e(this.$root,"click",t=>{let s=t.target.closest("[data-reorder-direction]");if(!(!s||!this.owns(s))){if(this.pending){t.preventDefault(),t.stopImmediatePropagation();return}!s.dataset.reorderAction?.startsWith("mountAction(")||s.getAttribute("wire:click")!==s.dataset.reorderAction||s.getAttributeNames().some(d=>d==="wire:confirm"||d.startsWith("wire:confirm."))||s.disabled||this.begin(s.closest("[x-sortable-item]").getAttribute("x-sortable-item"),s.dataset.reorderDirection,s)}}),e(this.$root,"start",t=>{t.target===this.$refs.reorderItems&&this.begin(t.item.getAttribute("x-sortable-item"),"drag")}),e(this.$root,"end",t=>{if(t.target===this.$refs.reorderItems){if(t.oldDraggableIndex===t.newDraggableIndex){this.finish(),t.stopImmediatePropagation();return}this.setSortingDisabled(!0)}}),this.removeCommitHook=Livewire.hook("commit",({component:t,commit:s,succeed:d,fail:g})=>{let i=this.pending;if(t.id!==this.$wire.$id)return;let n=[];for(let r=this.$root;r&&!(r.hasAttribute("wire:id")&&r.getAttribute("wire:id")!==t.id);r=r.parentElement){let u=r.getAttribute("wire:partial");if(u&&n.push(u),r===t.el)break}let b=r=>r.html||n.some(u=>r.partials?.[u]);if(d(({effects:r})=>{this.pending===i&&(i&&(!i.synchronizing||!b(r))||this.schedule(()=>{this.destroyed||!this.$root.isConnected||(this.updateHandles(),i?.synchronizing&&this.isCurrent(i)&&this.finish())}))}),!i||i.synchronizing)return;let a=t.canonical.mountedActions??[],o=r=>r?.context?.schemaComponent===l&&r.name===i.action&&(i.direction==="drag"||String(r.arguments?.item)===i.item),C=a.some(o)&&!o(a.at(-1));if(!s.calls.some(r=>r.method==="mountAction"?o({name:r.params[0],arguments:r.params[1],context:r.params[2]}):["callMountedAction","unmountAction"].includes(r.method)&&a.some(o)))return;let S=s.calls.some(r=>r.method==="unmountAction");d(({effects:r})=>{if(!this.isCurrent(i))return;let u=t.canonical.mountedActions??[],I=u.some(o);for(let[h,p]of i.reopenedModals??[])A(u[h])!==p&&i.reopenedModals.delete(h);if(I){i.focus=!1,i.modal=!0,this.setSortingDisabled(!0);let h=u.length-1;u.length<a.length&&i.reopenedModals?.has(h)&&this.schedule(()=>{if(!this.isCurrent(i))return;let p=t.canonical.mountedActions??[];p.length===h+1&&A(p[h])===i.reopenedModals.get(h)&&this.$dispatch("open-modal",{id:`fi-${t.id}-action-${h}`})});return}if(!b(r)||C){this.resynchronize(i);return}this.schedule(()=>this.reconcile(i))}),g(()=>{this.isCurrent(i)&&(i.focus=!1,i.modal&&S&&(i.reopenedModals??(i.reopenedModals=new Map),i.reopenedModals.set(a.length-1,A(a.at(-1))),this.$dispatch("open-modal",{id:`fi-${t.id}-action-${a.length-1}`})),!i.modal&&(i.direction==="drag"?this.resynchronize(i):this.finish()))})}),this.updateHandles()},owns(e){return e.closest("[data-reorder-owner]")===this.$root},order(){return JSON.parse(this.$root.dataset.reorderItems)},reorder(e){e.target===this.$refs.reorderItems&&this.$wire.mountAction(m,{items:e.target.sortable.toArray()},{schemaComponent:l})},begin(e,t,s=null){this.pending={item:e,direction:t,control:s,focus:!s?.hasAttribute("data-reorder-hidden")&&document.activeElement===s,before:this.order(),action:t==="drag"?m:t==="up"?c:f},t!=="drag"&&this.setSortingDisabled(!0)},relinquishFocus(){this.pending&&(this.pending.focus=!1)},isCurrent(e){return!this.destroyed&&this.$root.isConnected&&this.pending===e},schedule(e){cancelAnimationFrame(this.frame),this.frame=requestAnimationFrame(e)},resynchronize(e){this.setSortingDisabled(!0),e.synchronizing=!0,this.$wire.forceRender().catch(()=>{})},reconcile(e){if(!this.isCurrent(e))return;this.updateHandles();let t=this.order(),s=e.before.filter(n=>t.includes(n)),d=t.filter(n=>e.before.includes(n)),g=t.includes(e.item)&&s.indexOf(e.item)!==d.indexOf(e.item),i=[...this.$root.querySelectorAll("[data-reorder-description]")].find(n=>this.owns(n)&&n.dataset.reorderDescription===e.item);if(g&&i&&(this.$refs.reorderStatus.textContent=y.replace(/:label|:position|:count/g,n=>({":label":i.dataset.reorderLabel,":position":String(t.indexOf(e.item)+1Line truncated
|
||||||
@@ -0,0 +1,161 @@
|
|||||||
|
var $g=Object.defineProperty;var $o=(t,e)=>{for(var n in e)$g(t,n,{get:e[n],enumerable:!0})};var Ri={};$o(Ri,{CommandManager:()=>Rn,DECORATION_MANAGER_PLUGIN_KEY:()=>Nn,Decoration:()=>mo,DecorationManager:()=>Zf,Editor:()=>Dx,Extendable:()=>Ei,Extension:()=>Z,Fragment:()=>Bx,InlineDecoration:()=>Ch,InputRule:()=>cn,MappablePosition:()=>va,Mark:()=>le,MarkView:()=>vx,Node:()=>j,NodeDecoration:()=>vh,NodePos:()=>Sh,NodeView:()=>Wx,PasteRule:()=>wr,ResizableNodeView:()=>Ni,ResizableNodeview:()=>Vx,Tracker:()=>Ux,WidgetDecoration:()=>Mh,attrsEqual:()=>Ta,callOrReturn:()=>G,canInsertNode:()=>Aa,combineTransactionSteps:()=>wi,commands:()=>_f,createAtomBlockMarkdownSpec:()=>ih,createBlockMarkdownSpec:()=>br,createChainableState:()=>lo,createDocument:()=>mi,createElement:()=>Hx,createInlineMarkdownSpec:()=>sh,createMappablePosition:()=>Vf,createNodeFromContent:()=>Ln,createStyleTag:()=>eh,createWidgetDecoration:()=>Px,decodeHtmlEntities:()=>ax,defaultBlockAt:()=>gr,deleteProps:()=>sa,elementFromString:()=>fr,encodeHtmlEntities:()=>cx,escapeForRegEx:()=>Ea,extensions:()=>Ox,findChildren:()=>yr,findChildrenInRange:()=>pa,findDuplicates:()=>Lf,findParentNode:()=>Ht,findParentNodeClosestToPos:()=>dt,flattenExtensions:()=>xi,fromString:()=>Df,generateHTML:()=>aw,generateJSON:()=>cw,generateText:()=>dw,getAttributes:()=>vi,getAttributesFromExtensions:()=>ga,getChangedRanges:()=>Pn,getDebugJSON:()=>$f,getExtensionField:()=>P,getHTMLFromFragment:()=>co,getMarkAttributes:()=>ha,getMarkRange:()=>bi,getMarkType:()=>wt,getMarksBetween:()=>uo,getNodeAtPosition:()=>xa,getNodeAttributes:()=>If,getNodeType:()=>de,getPreviousBlockSibling:()=>ka,getRenderedAttributes:()=>zt,getSchema:()=>Si,getSchemaByResolvedExtensions:()=>ya,getSchemaTypeByName:()=>On,getSchemaTypeNameByName:()=>ao,getSplittedAttributes:()=>oo,getStyleProperty:()=>Oa,getText:()=>wa,getTextBetween:()=>ba,getTextContentFromNodes:()=>Bf,getTextSerializersFromSchema:()=>Ci,getUpdatedPosition:()=>Ff,h:()=>Hx,injectExtensionAttributesToParseRule:()=>la,inputRulesPlugin:()=>lh,isActive:()=>Mi,isAndroid:()=>so,isAtEndOfNode:()=>Sa,isAtStartOfNode:()=>Ca,isEmptyObject:()=>Rf,isExtensionRulesEnabled:()=>aa,isFirefox:()=>dx,isFunction:()=>ma,isList:()=>hi,isMacOS:()=>fa,isMarkActive:()=>gi,isNodeActive:()=>ct,isNodeEmpty:()=>$n,isNodeSelection:()=>fo,isNodeViewSelected:()=>fw,isNumber:()=>th,isPlainObject:()=>no,isProseMirrorAddMarkStep:()=>hw,isProseMirrorAddNodeMarkStep:()=>pw,isProseMirrorAttrStep:()=>mw,isProseMirrorCellSelection:()=>gw,isProseMirrorDocAttrStep:()=>yw,isProseMirrorFragment:()=>zf,isProseMirrorNodeSelection:()=>bw,isProseMirrorRemoveMarkStep:()=>ww,isProseMirrorRemoveNodeMarkStep:()=>xw,isProseMirrorReplaceAroundStep:()=>kw,isProseMirrorReplaceStep:()=>Sw,isProseMirrorSlice:()=>Cw,isProseMirrorStep:()=>Ft,isProseMirrorStepResult:()=>vw,isRegExp:()=>yi,isSafari:()=>Af,isString:()=>fx,isTextSelection:()=>mr,isiOS:()=>Dn,liveWidgetKeys:()=>Qf,markInputRule:()=>Le,markPasteRule:()=>Ae,markdown:()=>Sx,marksEqual:()=>Cx,mergeAttributes:()=>D,mergeDeep:()=>Ra,minMax:()=>bt,nodeInputRule:()=>go,nodePasteRule:()=>jx,objectIncludes:()=>io,parseAttributes:()=>Ti,parseIndentedBlocks:()=>ho,pasteRulesPlugin:()=>ch,posToDOMRect:()=>Ma,removeDuplicates:()=>Pf,renderNestedMarkdownContent:()=>po,resolveExtensions:()=>ki,resolveFocusPosition:()=>pi,rewriteUnknownContent:()=>Mw,selectionToInsertionEnd:()=>ua,serializeAttributes:()=>Ai,sortExtensions:()=>hr,splitExtensions:()=>In,textInputRule:()=>$x,textPasteRule:()=>_x,textblockTypeInputRule:()=>xr,updateMarkViewAttributes:()=>Da,wrappingInputRule:()=>Vt});var Uc=Object.defineProperty,Bo=(t,e)=>{let n={};for(var r in t)Uc(n,r,{get:t[r],enumerable:!0});return e||Uc(n,Symbol.toStringTag,{value:"Module"}),n};function Ce(t){this.content=t}Ce.prototype={constructor:Ce,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 Ce(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 Ce(n)},addToStart:function(t,e){return new Ce([t,e].concat(this.remove(t).content))},addToEnd:function(t,e){var n=this.remove(t).content.slice();return n.push(t,e),new Ce(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 Ce(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=Ce.from(t),t.size?new Ce(t.content.concat(this.subtract(t).content)):this},append:function(t){return t=Ce.from(t),t.size?new Ce(this.subtract(t).content.concat(t.content)):this},subtract:function(t){var e=this;t=Ce.from(t);for(var n=0;n<t.content.length;n+=2)e=e.remove(t.content[n]);return e},toObject:function(){vaLine truncated
|
||||||
|
`)}};en.empty=new en(!0);var qs=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 ud(t){let e=[];do e.push(Vg(t));while(t.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function Vg(t){let e=[];do e.push(Wg(t));while(t.next&&t.next!=")"&&t.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function Wg(t){let e=Ug(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=jg(t,e);else break;return e}function qc(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");let e=Number(t.next);return t.pos++,e}function jg(t,e){let n=qc(t),r=n;return t.eat(",")&&(t.next!="}"?r=qc(t):r=-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:e}}function _g(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 Ug(t){if(t.eat("(")){let e=ud(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=_g(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 Kg(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 fd(t,e){return e-t}function Jc(t,e){let n=[];return r(e),n.sort(fd);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 qg(t){let e=Object.create(null);return n(Jc(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]);Jc(t,a).forEach(d=>{c||o.push([l,c=[]]),c.indexOf(d)==-1&&c.push(d)})})});let i=e[r.join(",")]=new en(r.indexOf(t.length-1)>-1);for(let s=0;s<o.length;s++){let l=o[s][1].sort(fd);i.next.push({type:o[s][0],next:e[l.join(",")]||n(l)})}return i}}function Jg(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 hd(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 pd(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 md(t,e,n,r){for(let o in e)if(!(o in t))throw new RangeError(`Unsupported attribute ${o} for ${n} of type ${r}`);for(let o in t)t[o].validate&&t[o].validate(e[o])}function gd(t,e){let n=Object.create(null);if(e)for(let r in e)n[r]=new Js(t,r,e[r]);return n}var Lr=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=gd(e,r.attrs),this.defaultAttrs=hd(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==en.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.defaultAtt
Line truncated
|
||||||
|
`);else if(s.linebreakReplacement&&/[\r\n]/.test(r)&&this.top.findWrapping(s.linebreakReplacement.create())){let l=r.split(/\r?\n|\r/);for(let a=0;a<l.length;a++)a&&this.insertNode(s.linebreakReplacement.create(),n,!0),l[a]&&this.insertNode(s.text(l[a]),n,!/\S/.test(l[a]));r=""}else r=r.replace(/\r?\n|\r/g," ");else if(r=r.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(r)&&this.open==this.nodes.length-1){let l=o.content[o.content.length-1],a=e.previousSibling;(!l||a&&a.nodeName=="BR"||l.isText&&/[ \t\r\n\u000c]$/.test(l.text))&&(r=r.slice(1))}r&&this.insertNode(s.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;bd.hasOwnProperty(s)&&this.parser.normalizeLists&&Zg(e);let a=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(l=this.parser.matchTag(e,this,r));e:if(a?a.ignore:Qg.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(yd.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=Q.none;for(let l of o.concat(e.marks))(i.type?i.type.allowsMarkType(l.type):Qc(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=Xc(e,i,s.options);s.options&Rr&&s.content.length==0&&(l|=Rr);let a=Q.none;return r=r.filter(c=>(s.type?s.type.allowsMarkType(c.type):Qc(c.type,e))?(a=c.addToSet(a),!1):!0),this.nodes.push(new Gn(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|=Ir)}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 Zg(t){for(let e=t.firstChild,n=null;e;e=e.nextSibling){let r=e.nodeType==1?e.nodeName.toLowerCase():null;r&&bd.hasOwnProperty(r)&&n?(n.appendChild(e),e=n):r=="li"?n=e:r&&(n=null)}}function ey(t,e){return(t.matches||t.msMatchesSelector||t.webkitM
Line truncated
|
||||||
|
`))}})}function hy(t,e,n){let r=t.resolve(e),o=r.index();return r.parent.canReplaceWith(o,o+1,n)}function py(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 ue(e,e+i.nodeSize,e+1,e+i.nodeSize-1,new T(v.from(s),0,0),1,!0))}function Ye(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 g=r&&r[d]||u;if(!u.canReplace(f+1,u.childCount)||!g.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 my(t,e,n=1,r){let o=t.doc.resolve(e),i=v.empty,s=v.empty;for(let l=o.depth,a=o.depth-n,c=n-1;l>a;l--,c--){i=v.from(o.node(l).copy(i));let d=r&&r[c];s=v.from(d?d.type.create(d.attrs,s):o.node(l).copy(s))}t.step(new ge(e,e,new T(i.append(s),n,n),!0))}function lt(t,e){let n=t.resolve(e),r=n.index();return Ed(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function gy(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 Ed(t,e){return!!(t&&e&&!t.isLeaf&&gy(t,e))}function tr(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&&Ed(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 yy(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);Ad(t,d.node(),d.before(),l)}s.inlineContent&&nl(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 ge(c,a.map(e+n,-1),T.empty,!0)),r===!0){let d=t.doc.resolve(c);Td(t,d.node(),d.before(),t.steps.length)}return t}function by(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 qo(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 Vr(t,e,n=e,r=T.empty){if(e==n&&!r.size)return null;let o=t.resolve(e),i=t.resolve(n);return Od(o,i,r)?new ge(e,n,r):new el(o,i,r).fit()}function Od(t,e,n){return!n.openStart&&!n.openEnd&&t.start()==e.start()&&t.parent.canReplace(t.index(),e.index(),n.content)}var el=class{constructor(e,n,r){this.$from=e,this.$to=n,this.unplaced=r,this.frontier=[],this.placed=v.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=v.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 T(i,s,l);return e>-1?new ue(r.pos,e,this.$to.pos,this.$to.end(),a,n):a.size||r.pos!=this.$to.pos?new ge(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
|
||||||
|
`).scrollIntoView()),!0)};function pl(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 ml=(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=pl(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(B.near(a.doc.resolve(l),1)),e(a.scrollIntoView())}return!0},gl=(t,e)=>{let n=t.selection,{$from:r,$to:o}=n;if(n instanceof ve||r.parent.inlineContent||o.parent.inlineContent)return!1;let i=pl(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(N.create(l.doc,s+1)),e(l.scrollIntoView())}return!0},yl=(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(Ye(t.doc,i))return e&&e(t.tr.split(i).scrollIntoView()),!0}let r=n.blockRange(),o=r&&Rt(r);return o==null?!1:(e&&e(t.tr.lift(r,o).scrollIntoView()),!0)};function Ty(t){return(e,n)=>{let{$from:r,$to:o}=e.selection;if(e.selection instanceof I&&e.selection.node.isBlock)return!r.parentOffset||!Ye(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=pl(r.node(h-1).contentMatchAt(r.indexAfter(h-1)));let g=t&&t(o.parent,a,r);i.unshift(g||(a&&l?{type:l}:null)),s=h;break}else{if(h==1)return!1;i.unshift(null)}let d=e.tr;(e.selection instanceof N||e.selection instanceof ve)&&d.deleteSelection();let u=d.mapping.map(r.pos),f=Ye(d.doc,u,i.length,i);if(f||(i[0]=l?{type:l}:null,f=Ye(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 Ay=Ty();var Yd=(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(I.create(t.doc,o))),!0)},Ey=(t,e)=>(e&&e(t.tr.setSelection(new ve(t.doc))),!0);function Oy(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||lt(t.doc,e.pos))?!1:(n&&n(t.tr.join(e.pos).scrollIntoView()),!0)}function Qd(t,e,n,r){let o=e.nodeBefore,i=e.nodeAfter,s,l,a=o.type.spec.isolating||i.type.spec.isolating;if(!a&&Oy(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=v.empty;for(let y=s.length-1;y>=0;y--)p=v.from(s[y].create(null,p));p=v.from(o.copy(p));let g=t.tr.step(new ue(e.pos-1,h,e.pos,h,new T(p,1,0),s.length,!0)),m=g.doc.resolve(h+2*s.length);m.nodeAfter&&m.nodeAfter.type==o.type&<(g.doc,m.pos)&&g.join(m.pos),n(g.scrollIntoView())}return!0}let d=i.type.spec.isolating||r>0&&a?null:B.findFrom(e,1),u=d&&d.$from.blockRange(d.$to),f=u&&Rt(u);if(f!=null&&f>=e.depth)return n&&n(t.tr.lift(u,f).scrollIntoView()),!0;if(c&&or(i,"start",!0)&&or(o,"end")){let h=o,p=[];for(;p.push(h),!h.isTextblock;)h=h.lastChild;let g=i,m=1;for(;!g.isTextblock;g=g.firstChild)m++;if(h.canReplace(h.childCount,h.childCount,g.content)){if(n){let y=v.empty;for(let b=p.length-1;b>=0;b--)y=v.from(p[b].copy(y));let x=t.tr.step(new ue(e.pos-p.length,e.pos+i.nodeSize,e.pos+m,e.pos+i.nodeSize-m,new T(y,p.length,0),0,!0));n(x.scrollIntoView())}return!0}}return!1}function Zd(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(N.create(e.doc,t<0?o.start(i):o.end(i)))),!0):!1}}var bl=Zd(-1),wl=Zd(1);function eu(t,e=null){return function(n,r){let{$from:o,$to:i}=n.selection,s=o.blockRange(i),l=s&&er(s,t,e);return l?(r&&r(n.tr.wrap(s,l).scrollIntoView()),!0):!1}}function xl(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 kl(...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 sl=kl(Wd,ll,al),Vd=kl(Wd,dl,ul),nn={Enter:kl(hl,gl,yl,Ay),"Mod-Enter":ml,Backspace:sl,"Mod-
Line truncated
|
||||||
|
`),u&&p==h.nodeValue.length)for(let g=h,m;g;g=g.parentNode){if(m=g.nextSibling){m.nodeName=="BR"&&(l=a={node:m.parentNode,offset:we(m)+1});break}let y=g.pmViewDesc;if(y&&y.node&&y.node.isBlock)break}}else{let g=h.childNodes[p-1];u=g&&(g.nodeName=="BR"||g.contentEditable=="false")}}if(et&&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&&Te)&&Tn(l.node,l.offset,d.anchorNode,d.anchorOffset)&&Tn(a.node,a.offset,d.focusNode,d.focusOffset))return;let f=!1;if((c.extend||e==n)&&!(u&&et)){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?xn:du,e==l&&n==a&&(i.contentLost||i.dom.parentNode!=this.contentDOM)?i.dirty=at:i.markDirty(e-l,n-l);return}else i.dirty=i.dom==i.contentDOM&&i.dom.parentNode==this.contentDOM&&!i.children.length?xn:at}r=s}this.dirty=xn}markParentsDirty(){let e=1;for(let n=this.parent;n;n=n.parent,e++){let r=e==1?xn:du;n.dirty<r&&(n.dirty=r)}}get domAtom(){return!1}get ignoreForCoords(){return!1}get ignoreForSelection(){return!1}isText(e){return!1}},Qo=class extends An{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.hasAttribute("contenteditable")||(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==tt&&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}},Dl=class extends An{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}},Sn=class t extends An{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=gt.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&at||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return this.dirty!=at&&this.mark.eq(e)}markDirty(e,n){if(super.markDirty(e,n),this.dirty!=tt){let r=this.parent;for(;!r.node;)r=r.parent;r.dirty<this.dirty&&(r.dirty=this.dirty),this.dirty=tt}}slice(e,n,r){let o=t.create(this.parent,this.mark,!0,r),i=this.children,s=this.size;n<s&&(i=$l(i,n,s,r)),e>0&&(i=$l(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()}},ln=class t extends An{constructor(e,n,r,o,i,s,l){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}=gt.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=Uu(d,r,n),c?a=new Ll(e,n,r,o,d,u||null,f,c):n.isText?new Zo(e,n,r,o,d,f):new t(e,n,r,o,d,u||null,f)}parseRule(e){if(this.node.type.spec.reparseInView)return null;let n={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(n.preserveWhitespace="full"),!this.contentDOM)n.getContent=()=>this.node.content;else if(!this.contentLost)n.contentElement=this.contentDOM;else{for(let r=this.children.length-1;r>=0;r--){let o=this.children[r];if(this.dom.contains(o.dom.parentNode)){n.contentElemen
Line truncated
|
||||||
|
|
||||||
|
`);return{dom:a,text:f,slice:e}}function Yl(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 T(v.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=gt.fromSchema(h);s=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach(g=>{let m=s.appendChild(document.createElement("p"));g&&m.appendChild(p.serializeNode(h.text(g,f)))})}}else t.someProp("transformPastedHTML",u=>{n=u(n,t)}),s=C0(n),Qr&&v0(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")||_e.fromSchema(t.state.schema)).parseSlice(s,{preserveWhitespace:!!(a||d),context:o,ruleFromNode(f){return f.nodeName=="BR"&&!f.nextSibling&&f.parentNode&&!x0.test(f.parentNode.nodeName)?{ignore:!0}:null}})),d)l=M0(Cu(l,+d[1],+d[2]),d[4]);else if(l=T.maxOpen(k0(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=Cu(l,u,f)}return t.someProp("transformPasted",u=>{l=u(l,t,a)}),l}var x0=/^(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 k0(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&&Yu(a,i,l,s[s.length-1],0))s[s.length-1]=c;else{s.length&&(s[s.length-1]=Qu(s[s.length-1],i.length));let d=Xu(l,a);s.push(d),o=o.matchType(d.type),i=a}}),s)return v.from(s)}return t}function Xu(t,e,n=0){for(let r=e.length-1;r>=n;r--)t=e[r].create(null,v.from(t));return t}function Yu(t,e,n,r,o){if(o<t.length&&o<e.length&&t[o]==e[o]){let i=Yu(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(v.from(Xu(n,t,o+1))))}}function Qu(t,e){if(e==0)return t;let n=t.content.replaceChild(t.childCount-1,Qu(t.lastChild,e-1)),r=t.contentMatchAt(t.childCount).fillBefore(v.empty,!0);return t.copy(n.append(r))}function Hl(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=Hl(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(v.empty,!0))),t.replaceChild(e<0?0:t.childCount-1,s.copy(l))}function Cu(t,e,n){return e<t.openStart&&(t=new T(Hl(t.content,-1,e,t.openStart,0,t.openEnd),e,t.openEnd)),n<t.openEnd&&(t=new T(Hl(t.content,1,n,t.openEnd,0,0),t.openStart,n)),t}var Zu={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]};function ef(){return document.implementation.createHTMLDocument("title")}var _r=null;function S0(t){let e=window.trustedTypes;if(!e)return t;if(!_r){if(_r=e.defaultPolicy)try{return _r.createHTML(t)}catch{}_r=e.createPolicy("ProseMirrorClipboard",{createHTML:n=>n})}return _r.createHTML(t)}function C0(t){let e=/^(\s*<meta [^>]*>)*/.exec(t);e&&(t=t.slice(e[0].length));let n=ef(),r=n.body,o=/<([a-z][^>\s]+)/i.exec(t),i;if((i=o&&Zu[o[1].toLowerCase()])&&(t=i.map(s=>"<"+s+">").join("")+t+i.map(s=>"</"+s+">").reverse().join("")),r.innerHTML=S0(t),i)for(let s=0;s<i.length;s++)r=r.querySelector(i[s])||r;for(let s=0;s<n.styleSheets.length;s++){let l=n.styleSheets[s];for(let a=0;a<l.rules.length;a++){let c=l.rules[a];if(c instanceof CSSStyleRule){let d=r.querySelectorAll(c.selectorText);for(let u=0;u<d.length;u++)d[u].style.cssText+=c.style.cssText}}}return r}function v0(t){let e=t.querySelectorAll(xe?"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 M0(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;try{a.checkAttrs(r[l+1])}catch{break}o=v.from(a.create(r[l+1],o)),i++,s++}return new T(o,i,s)}var Re={},De={},T0={touchstart:!0,touchmove:!0},Fl=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.com
Line truncated
|
||||||
|
|
||||||
|
`,textSerializers:s={}}=n||{},l="";return t.nodesBetween(r,o,(a,c,d,u)=>{a.isBlock&&c>r&&(l+=i);let f=s?.[a.type.name];if(f)return d&&(l+=f({node:a,pos:c,parent:d,index:u,range:e})),!1;if(a.isText){var h;l+=a==null||(h=a.text)===null||h===void 0?void 0:h.slice(Math.max(r,c)-c,o-c)}}),l}function wa(t,e){return ba(t,{from:0,to:t.content.size},e)}function Ci(t){return Object.fromEntries(Object.entries(t.nodes).filter(([,e])=>e.spec.toText).map(([e,n])=>[e,n.spec.toText]))}function dw(t,e,n){let{blockSeparator:r=`
|
||||||
|
|
||||||
|
`,textSerializers:o={}}=n||{},i=Si(e);return wa(pe.fromJSON(i,t),{blockSeparator:r,textSerializers:{...Ci(i),...o}})}function If(t,e){let n=de(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 vi(t,e){let n=ao(typeof e=="string"?e:e.name,t.schema);return n==="node"?If(t,e):n==="mark"?ha(t,e):{}}function Pf(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 uw(t){let e=Pf(t);return e.length===1?e:e.filter((n,r)=>!e.filter((o,i)=>i!==r).some(o=>n.oldRange.from>=o.oldRange.from&&n.oldRange.to<=o.oldRange.to&&n.newRange.from>=o.newRange.from&&n.newRange.to<=o.newRange.to))}function Pn(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}})})}),uw(r)}function $f(t,e=0){let n=t.type===t.type.schema.topNodeType?0:1,r=e,o=r+t.nodeSize,i=t.marks.map(a=>{let c={type:a.type.name};return Object.keys(a.attrs).length&&(c.attrs={...a.attrs}),c}),s={...t.attrs},l={type:t.type.name,from:r,to:o};return Object.keys(s).length&&(l.attrs=s),i.length&&(l.marks=i),t.content.childCount&&(l.content=[],t.forEach((a,c)=>{var d;(d=l.content)===null||d===void 0||d.push($f(a,e+c+n))})),t.text&&(l.text=t.text),l}function uo(t,e,n){let r=[];return t===e?n.resolve(t).marks().forEach(o=>{let i=bi(n.resolve(t),o.type);i&&r.push({mark:o,...i})}):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 xa=(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]},ka=t=>{let e=t.depth-1;if(e<0)return null;let n=t.index(e);return n===0?null:t.node(e).child(n-1)};function On(t,e){return e.nodes[t]||e.marks[t]||null}function oo(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 Bf=(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=((a=(c=o.type.spec).toText)===null||a===void 0?void 0:a.call(c,{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 gi(t,e,n={}){let{empty:r,ranges:o}=t.selection,i=e?wt(e,t.schema):null;if(r)return!!(t.storedMarks||t.selection.$from.marks()).filter(d=>i?i.name===d.type.name:!0).find(d=>io(d.attrs,n,{strict:!1}));let s=0,l=[];if(o.forEach(({$from:d,$to:u})=>{let f=d.pos,h=u.pos;t.doc.nodesBetween(f,h,(p,g)=>{if(i&&p.inlineContent&&!p.type.allowsMarkType(i))return!1;if(!p.isText&&!p.marks.length)return;let m=Math.max(f,g),y=Math.min(h,g+p.nodeSize),x=y-m;s+=x,l.push(...p.marks.map(b=>({mark:b,from:m,to:y})))})}),s===0)return!1;let a=l.filter(d=>i?i.name===d.mark.type.name:!0).filter(d=>io(d.mark.attrs,n,{strict:!1})).reduce((d,u)=>d+u.to-u.from,0),c=l.filter(d=>i?d.mark.type!==i&&d.mark.type.excludes(i):!0).reduce((d,u)=>d+u.to-u.from,0);return(a>0?a+c:a)>=s}function Mi(t,e,n={}){if(!e)return ct(t,null,n)||gi(t,null,n);let r=ao(e,t.schema);return r==="node"?ct(t,e,n):r==="mark"?gi(t,e,n):!1}var Sa=(t,e)=>{let{$from:n,$to:r,$anchor:o}=t.selection;if(e){let i=Ht(l=>l.type.name===e)(t.selection);if(!i)return!1;let s=t.doc.resolve(i.pos+1);return o.pos+1===s.end()}return!(r.parentOffset<r.parent.nodeSize-2||n.pos!==r.pos)},Ca=t=>{let{$from:e,$to:n}=t.selection;return!(e.parentOffset>0||e.pos!==n.pos)};function aa(t,e){return Array.isArray(e)?e.some(n=>(typeof n=="string"?n:n.name)===t.name):e}function hi(t,e){let{nodeExtensions:n}=In(e),r=n.find(i=>i.name===t);if(!r)return!1;let o=G(P(r,"group",{name:r.name,options:r.options,storage:r.storage}));return typeof o!="string"?!1:o.split(" ").includes("list")}function $n(t,{checkChildren:e=!0,ignoreWhitespace:n=!1}={}){if(n){if(t.type.name==="hardBreak")return!0;if(t.isText){var r;return!/\S/.test((r=t.text)!==null&&r!==void 0?r:"")}}if(t.isText)return!t.text;if(t.isAtom||t.isLeaf)return!1;if(t.content.childCount===0)return!0;if(e){let o=!0;return t.content.forEach(i=>{o!==!1&&($n(i,{ignoreWhitespace:n,checkChildren:e})||(o=!1))}),o}return!1}function fo(t){return t instanceof I}function fw({selection:t,pos:e,nodeSize:n,selectedOnTextSelection:r=!1}){let{from:o,to:i}=t;return!!(o<=e&&i>=e+n||r&&mr(t)&&o>e&&i<e+n)}function Ft(t){if(t===null||typeof t!="object")return!1;let e=t;return!(typeof e.apply!="function"||typeof e.getMap!="function"||typeof e.invert!="function"||typeof e.map!="function"||typeof e.merge!="function"||typeof e.toJSON!="function")}function hw(t){if(t===null||typeof t!="object")return!1;let e=t
Line truncated
|
||||||
|
|
||||||
|
`);return`:::${c}${g}
|
||||||
|
|
||||||
|
${m}
|
||||||
|
|
||||||
|
:::`}}}function xx(t){let e={};return oh(t,"shortcode").forEach(n=>{n.type==="keyValue"&&(e[n.name]=n.value)}),e}function kx(t){return Object.entries(t).filter(([,e])=>e!=null).map(([e,n])=>`${e}="${n}"`).join(" ")}function sh(t){let{nodeName:e,name:n,getContent:r,parseAttributes:o=xx,serializeAttributes:i=kx,defaultAttributes:s={},selfClosing:l=!1,allowedAttributes:a}=t,c=n||e,d=f=>{if(!a)return f;let h={};return a.forEach(p=>{let g=typeof p=="string"?p:p.name,m=typeof p=="string"?void 0:p.skipIfDefault;if(g in f){let y=f[g];if(m!==void 0&&y===m)return;h[g]=y}}),h},u=c.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return{parseMarkdown:(f,h)=>{let p={...s,...f.attributes};if(l)return h.createNode(e,p);let g=r?r(f):f.content||"";return g?h.createNode(e,p,[h.createTextNode(g)]):h.createNode(e,p,[])},markdownTokenizer:{name:e,level:"inline",start(f){let h=l?new RegExp(`\\[${u}\\s*[^\\]]*\\]`):new RegExp(`\\[${u}\\s*[^\\]]*\\][\\s\\S]*?\\[\\/${u}\\]`),p=f.match(h),g=p?.index;return g!==void 0?g:-1},tokenize(f,h,p){let g=l?new RegExp(`^\\[${u}\\s*([^\\]]*)\\]`):new RegExp(`^\\[${u}\\s*([^\\]]*)\\]([\\s\\S]*?)\\[\\/${u}\\]`),m=f.match(g);if(!m)return;let y="",x="";if(l){let[,w]=m;x=w}else{let[,w,k]=m;x=w,y=k||""}let b=o(x.trim());return{type:e,raw:m[0],content:y.trim(),attributes:b}}},renderMarkdown:f=>{let h="";r?h=r(f):f.content&&f.content.length>0&&(h=f.content.filter(y=>y.type==="text").map(y=>y.text).join(""));let p=d(f.attrs||{}),g=i(p),m=g?` ${g}`:"";return l?`[${c}${m}]`:`[${c}${m}]${h}[/${c}]`}}}function ho(t,e,n){let r=t.split(`
|
||||||
|
`),o=[],i="",s=0,l=e.baseIndentSize||2;for(;s<r.length;){let d=r[s],u=d.match(e.itemPattern);if(!u){if(o.length>0)break;if(d.trim()===""){s+=1,i=`${i}${d}
|
||||||
|
`;continue}else return}let f=e.extractItemData(u),{indentLevel:h,mainContent:p}=f;i=`${i}${d}
|
||||||
|
`;let g=[p];for(s+=1;s<r.length;){var a;let b=r[s];if(b.trim()===""){var c;let w=r.slice(s+1).findIndex(k=>k.trim()!=="");if(w===-1)break;if((((c=r[s+1+w].match(/^(\s*)/))===null||c===void 0||(c=c[1])===null||c===void 0?void 0:c.length)||0)>h){g.push(b),i=`${i}${b}
|
||||||
|
`,s+=1;continue}else break}if((((a=b.match(/^(\s*)/))===null||a===void 0||(a=a[1])===null||a===void 0?void 0:a.length)||0)>h)g.push(b),i=`${i}${b}
|
||||||
|
`,s+=1;else break}let m,y=g.slice(1);if(y.length>0){let b=y.map(w=>w.slice(h+l)).join(`
|
||||||
|
`);b.trim()&&(e.customNestedParser?m=e.customNestedParser(b):m=n.blockTokens(b))}let x=e.createToken(f,m);o.push(x)}if(o.length!==0)return{items:o,raw:i}}function po(t,e,n,r){if(!t||!Array.isArray(t.content))return"";let o=typeof n=="function"?n(r):n,[i,...s]=t.content,l=`${o}${e.renderChildren([i])}`;return s&&s.length>0&&s.forEach((a,c)=>{var d,u;let f=(d=(u=e.renderChild)===null||u===void 0?void 0:u.call(e,a,c+1))!==null&&d!==void 0?d:e.renderChildren([a]);if(f!=null){let h=f.split(`
|
||||||
|
`).map(p=>p?e.indent(p):e.indent("")).join(`
|
||||||
|
`);l+=a.type==="paragraph"?`
|
||||||
|
|
||||||
|
${h}`:`
|
||||||
|
${h}`}}),l}var Sx=Bo({createAtomBlockMarkdownSpec:()=>ih,createBlockMarkdownSpec:()=>br,createInlineMarkdownSpec:()=>sh,parseAttributes:()=>Ti,parseIndentedBlocks:()=>ho,renderNestedMarkdownContent:()=>po,serializeAttributes:()=>Ai});function Cf(t){return typeof t.type=="string"?t.type:t.type.name}function Cx(t,e){if(t.length!==e.length)return!1;let n=Array.from({length:e.length},()=>!1);return t.every(r=>{let o=Cf(r),i=e.findIndex((s,l)=>!n[l]&&o===Cf(s)&&Ta(r.attrs,s.attrs));return i===-1?!1:(n[i]=!0,!0)})}function Ra(t,e){let n={...t};return no(t)&&no(e)&&Object.keys(e).forEach(r=>{no(e[r])&&no(t[r])?n[r]=Ra(t[r],e[r]):n[r]=e[r]}),n}function Da(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 vx=class{constructor(t,e,n){this.component=t,this.editor=e.editor,this.options={...n},this.mark=e.mark,this.HTMLAttributes=e.HTMLAttributes}get dom(){return this.editor.view.dom}get contentDOM(){return null}updateAttributes(t,e){Da(e||this.mark,this.editor,t)}ignoreMutation(t){return!this.dom||!this.contentDOM?!0:typeof this.options.ignoreMutation=="function"?this.options.ignoreMutation({mutation:t}):t.type==="selection"||this.dom.contains(t.target)&&t.type==="childList"&&(Dn()||so())&&this.editor.isFocused&&[...Array.from(t.addedNodes),...Array.from(t.removedNodes)].every(e=>e.isContentEditable)?!1:this.contentDOM===t.target&&t.type==="attributes"?!0:!this.contentDOM.contains(t.target)}},cn=class{constructor(t){var e;this.find=t.find,this.handler=t.handler,this.undoable=(e=t.undoable)!==null&&e!==void 0?e:!0}},Mx=(t,e)=>{if(yi(e))return e.exec(t);let n=e(t);if(!n)return null;let r=[n.text];return r.index=n.index,r.input=t,r.data=n.data,n.replaceWith&&(n.text.includes(n.replaceWith)||console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'),r.push(n.replaceWith)),r};function ui(t){var e;let{editor:n,from:r,to:o,text:i,rules:s,plugin:l}=t,{view:a}=n;if(a.composing)return!1;let c=a.state.doc.resolve(r);if(c.parent.type.spec.code||!((e=c.nodeBefore||c.nodeAfter)===null||e===void 0)&&e.marks.find(f=>f.type.spec.code))return!1;let d=!1,u=Bf(c)+i;return s.forEach(f=>{if(d)return;let h=Mx(u,f.find);if(!h)return;let p=h[0].length-i.length;if(p>0){let k=c.parentOffset-p;if(k<0||c.parent.textBetween(k,c.parentOffset)!==h[0].slice(0,p))return}let g=a.state.tr,m=lo({state:a.state,transaction:g}),y={from:r-(h[0].length-i.length),to:o},{commands:x,chain:b,can:w}=new Rn({editor:n,state:m});f.handler({state:m,range:y,match:h,commands:x,chain:b,can:w})===null||!g.steps.length||(f.undoable&&g.setMeta(l,{transform:g,from:r,to:o,text:i}),a.dispatch(g),d=!0)}),d}function lh(t){let{editor:e,rules:n}=t,r=new F({state:{init(){return null},apply(o,i,s){let l=o.getMeta(r);if(l)return l;let a=o.getMeta("applyInputRules");return a&&setTimeout(()=>{let{text:c}=a;typeof c=="string"?c=c:c=co(v.from(c),s.schema);let{from:d}=a,u=d+c.length;ui({editor:e,from:d,to:u,text:c,rules:n,plugin:r})}),o.selectionSet||o.docChanged?null:i}},props:{handleTextInput(o,i,s,l){return ui({editor:e,from:i,to:s,text:l,rules:n,plugin:r})},handleDOMEvents:{compositionend:o=>(setTimeout(()=>{let{$cursor:i}=o.state.selection;i&&ui({editor:e,from:i.pos,to:i.pos,text:"",rules:n,plugin:r})}),!1)},handleKeyDown(o,i){if(i.key!=="Enter")return!1;let{$cursor:s}=o.state.selection;return s?ui({editor:e,from:s.pos,to:s.pos,text:`
|
||||||
|
`,rules:n,plugin:r}):!1}},isInputRules:!0});return r}var Ei=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{...G(P(this,"addOptions",{name:this.name}))}}get storage(){return{...G(P(this,"addStorage",{name:this.name,options:this.options}))}}configure(t={}){let e=this.extend({...this.config,addOptions:()=>Ra(this.options,t)});return e.name=this.name,e.parent=this.parent,this.child=null,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}},le=class ah extends Ei{constructor(...e){super(...e),this.type="mark"}static create(e={}){let n=typeof e=="function"?e():e;return new ah(n)}static handleExit({editor:e,mark:n}){let{tr:r}=e.state,o=e.state.selection.$from;if(o.pos===o.end()){let i=o.marks();if(!i.find(l=>l?.type.name===n.name))return!1;let s=i.find(l=>l?.type.name===n.name);return s&&r.removeStoredMark(s),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)}},wr=class{constructor(t){this.find=t.find,this.handler=t.handler}},Tx=(t,e,n)=>{if(yi(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 Ax(t){let{editor:e,state:n,from:r,to:o,rule:i,pasteEvent:s,dropEvent:l}=t,{commands:a,chain:c,can:d}=new Rn({editor:e,state:n}),u=[];return n.doc.nodesBetween(r,o,(f,h)=>{var p,g,m,y;if(!((p=f.type)===null||p===void 0||(p=p.spec)===null||p===void 0)&&p.code||!(f.isText||f.isTextblock||f.isInline))return;let x=(g=(m=(y=f.content)===null||y===void 0?void 0:y.size)!==null&&m!==void 0?m:f.nodeSize)!==null&&g!==void 0?g:0,b=Math.max(r,h),w=Math.min(o,h+x);if(b>=w)return;let k=f.isText?f.text||"":f.textBetween(b-h,w-h,void 0,"\uFFFC");Tx(k,i.find,s).forEach(C=>{if(C.index===void 0)return;let S=b+C.index+1,O=S+C[0].length,R={from:n.tr.mapping.map(S),to:n.tr.mapping.map(O)},A=i.handler({state:n,range:R,match:C,commands:a,chain:c,can:d,pasteEvent:s,dropEvent:l});u.push(A)})}),u.every(f=>f!==null)}var fi=null,Ex=t=>{var e;let n=new ClipboardEvent("paste",{clipboardData:new DataTransfer});return(e=n.clipboardData)===null||e===void 0||e.setData("text/html",t),n};function ch(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:c,from:d,to:u,rule:f,pasteEvt:h})=>{let p=c.tr,g=lo({state:c,transaction:p});if(!(!Ax({editor:e,state:g,from:Math.max(d-1,0),to:u.b-1,rule:f,pasteEvent:h,dropEvent:l})||!p.steps.length)){try{l=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{l=null}return s=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,p}};return n.map(c=>new F({view(d){let u=h=>{var p;r=!((p=d.dom.parentElement)===null||p===void 0)&&p.contains(h.target)?d.dom.parentElement:null,r&&(fi=e)},f=()=>{fi&&(fi=null)};return window.addEventListener("dragstart",u),window.addEventListener("dragend",f),{destroy(){window.removeEventListener("dragstart",u),window.removeEventListener("dragend",f)}}},props:{handleDOMEvents:{drop:(d,u)=>{if(i=r===d.dom.parentElement,l=u,!i){let f=fi;f?.isEditable&&setTimeout(()=>{let h=f.state.selection;h&&f.commands.deleteRange({from:h.from,to:h.to})},10)}return!1},paste:(d,u)=>{var f;let h=(f=u.clipboardData)===null||f===void 0?void 0:f.getData("text/html");return s=u,o=!!h?.includes("data-pm-slice"),!1}}},appendTransaction:(d,u,f)=>{let h=d[0],p=h.getMeta("uiEvent")==="paste"&&!o,g=h.getMeta("uiEvent")==="drop"&&!i,m=h.getMeta("applyPasteRules"),y=!!m;if(!p&&!g&&!y)return;if(y){let{text:w}=m;typeof w=="string"?w=w:w=co(v.from(w),f.schema);let{from:k}=m,C=k+w.length,S=Ex(w);return a({rule:c,state:f,from:k,to:{b:C},pasteEvt:S})}let x=u.doc.content.findDiffStart(f.doc.content),b=u.doc.content.findDiffEnd(f.doc.content);if(!(!th(x)||!b||x===b.b))return a({rule:c,state:f,from:x,to:b,pasteEvt:s})}}))}var Oi=class{constructor(t,e){this.splittableMarks=[],this.nonClearableMarks=[],this.decorationManager=null,this.editor=e,this.baseExtensions=t,this.extensions=ki(t),this.schema=ya(this.extensions,e),this.setupExtensions()}get commands(){return this.extensions.reduce((t,e)=>{let n=P(e,"addCommands",{name:e.name,options:e.options,storage:this.editor.extensionStorage[e.name],editor:this.editor,type:On(e.name,this.schema)});return n?{...t,...n()}:t},{})}get plugins(){let{editor:t}=this,e=hr([...this.extensions].reverse()).flatMap(r=>{let o={name:r.name,options:r.options,storage:this.editor.extensionStorage[r.name],editor:t,type:On(r.name,this.schema)},i=[],s=P(r,"addKeyboardShortcuts",o)
Line truncated
|
||||||
|
|
||||||
|
`)}}})]}}),fh=Z.create({name:"commands",addCommands(){return{..._f}}}),hh=Z.create({name:"delete",onUpdate({transaction:t,appendedTransactions:e}){var n,r;let o=()=>{var i,s,l;if((i=(s=this.editor.options.coreExtensionOptions)===null||s===void 0||(s=s.delete)===null||s===void 0||(l=s.filterTransaction)===null||l===void 0?void 0:l.call(s,t))!==null&&i!==void 0?i:t.getMeta("y-sync$"))return;let a=wi(t.before,[t,...e]);Pn(a).forEach(d=>{a.mapping.mapResult(d.oldRange.from).deletedAfter&&a.mapping.mapResult(d.oldRange.to).deletedBefore&&a.before.nodesBetween(d.oldRange.from,d.oldRange.to,(u,f)=>{let h=f+u.nodeSize-2,p=d.oldRange.from<=f&&h<=d.oldRange.to;this.editor.emit("delete",{type:"node",node:u,from:f,to:h,newFrom:a.mapping.map(f),newTo:a.mapping.map(h),deletedRange:d.oldRange,newRange:d.newRange,partial:!p,editor:this.editor,transaction:t,combinedTransform:a})})});let c=a.mapping;a.steps.forEach((d,u)=>{if(d instanceof Nt){var f,h;let p=c.slice(u).map(d.from,-1),g=c.slice(u).map(d.to),m=c.invert().map(p,-1),y=c.invert().map(g),x=p>0?(f=a.doc.nodeAt(p-1))===null||f===void 0?void 0:f.marks.some(w=>w.eq(d.mark)):!1,b=(h=a.doc.nodeAt(g))===null||h===void 0?void 0:h.marks.some(w=>w.eq(d.mark));this.editor.emit("delete",{type:"mark",mark:d.mark,from:d.from,to:d.to,deletedRange:{from:m,to:y},newRange:{from:p,to:g},partial:!!(b||x),editor:this.editor,transaction:t,combinedTransform:a})}})};!((n=(r=this.editor.options.coreExtensionOptions)===null||r===void 0||(r=r.delete)===null||r===void 0?void 0:r.async)!==null&&n!==void 0)||n?setTimeout(o,0):o()}}),ph=Z.create({name:"drop",addProseMirrorPlugins(){return[new F({key:new _("tiptapDrop"),props:{handleDrop:(t,e,n,r)=>{this.editor.emit("drop",{editor:this.editor,event:e,slice:n,moved:r})}}})]}}),mh=Z.create({name:"editable",addProseMirrorPlugins(){return[new F({key:new _("editable"),props:{editable:()=>this.editor.options.editable}})]}}),gh=new _("focusEvents"),yh=Z.create({name:"focusEvents",addProseMirrorPlugins(){let{editor:t}=this;return[new F({key:gh,props:{handleDOMEvents:{focus:(e,n)=>{t.isFocused=!0;let r=t.state.tr.setMeta("focus",{event:n}).setMeta("addToHistory",!1);return e.dispatch(r),!1},blur:(e,n)=>{t.isFocused=!1;let r=t.state.tr.setMeta("blur",{event:n}).setMeta("addToHistory",!1);return e.dispatch(r),!1}}}})]}}),bh=Z.create({name:"keymap",addKeyboardShortcuts(){let t=()=>this.editor.commands.first(({commands:s})=>[()=>s.undoInputRule(),()=>s.command(({tr:l})=>{let{selection:a,doc:c}=l,{empty:d,$anchor:u}=a,{pos:f,parent:h}=u,p=u.parent.isTextblock&&f>0?l.doc.resolve(f-1):u,g=p.parent.type.spec.isolating,m=u.pos-u.parentOffset,y=g&&p.parent.childCount===1?m===u.pos:B.atStart(c).from===f;return!d||!h.type.isTextblock||h.textContent.length||!y||y&&u.parent.type.name==="paragraph"?!1:s.clearNodes()}),()=>s.deleteSelection(),()=>s.joinBackward(),()=>s.selectNodeBackward()]),e=()=>this.editor.commands.first(({commands:s})=>[()=>s.deleteSelection(),()=>s.deleteCurrentNode(),()=>s.joinForward(),()=>s.selectNodeForward()]),r={Enter:()=>this.editor.commands.first(({commands:s})=>[()=>s.newlineInCode(),()=>s.createParagraphNear(),()=>s.liftEmptyBlock(),()=>s.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:t,"Mod-Backspace":t,"Shift-Backspace":t,Delete:e,"Mod-Delete":e,"Mod-a":()=>this.editor.commands.selectAll()},o={...r},i={...r,"Ctrl-h":t,"Alt-Backspace":t,"Ctrl-d":e,"Ctrl-Alt-Backspace":e,"Alt-Delete":e,"Alt-d":e,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return Dn()||fa()?i:o},addProseMirrorPlugins(){return[new F({key:new _("clearDocument"),appendTransaction:(t,e,n)=>{if(t.some(h=>h.getMeta("composition")))return;let r=t.some(h=>h.docChanged)&&!e.doc.eq(n.doc),o=t.some(h=>h.getMeta("preventClearDocument"));if(!r||o)return;let{empty:i,from:s,to:l}=e.selection,a=B.atStart(e.doc).from,c=B.atEnd(e.doc).to;if(i||!(s===a&&l===c)||!$n(n.doc))return;let d=n.tr,u=lo({state:n,transaction:d}),{commands:f}=new Rn({editor:this.editor,state:u});if(f.clearNodes(),!!d.steps.length)return d}})]}}),wh=Z.create({name:"paste",addProseMirrorPlugins(){return[new F({key:new _("tiptapPaste"),props:{handlePaste:(t,e,n)=>{this.editor.emit("paste",{editor:this.editor,event:e,slice:n})}}})]}}),xh=Z.create({name:"tabindex",addOptions(){return{value:void 0}},addProseMirrorPlugins(){return[new F({key:new _("tabindex"),props:{attributes:()=>{var t;return!this.editor.isEditable&&this.options.value===void 0?{}:{tabindex:(t=this.options.value)!==null&&t!==void 0?t:"0"}}}})]}}),kh=Z.create({name:"textDirection",addOptions(){return{direction:void 0}},addGlobalAttributes(){if(!this.options.direction)return[];let{nodeExtensions:t}=In(this.extensions);return[{types:t.filter(e=>e.name!=="text").map(e=>e.name),attributes:{dir:{default:this.options.direction,parseHTML:e=>{let n=e.getAttribute("dir");return n&&(n==="ltr"||n==="rtl"||n==="auto")?n:this.options.direction},renderHTML:e=>e.dir?{dir:e.dir}:{}}
Line truncated
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ProseMirror {
|
||||||
|
word-wrap: break-word;
|
||||||
|
white-space: pre-wrap;
|
||||||
|
white-space: break-spaces;
|
||||||
|
-webkit-font-variant-ligatures: none;
|
||||||
|
font-variant-ligatures: none;
|
||||||
|
font-feature-settings: "liga" 0; /* the above doesn't seem to work in Edge */
|
||||||
|
}
|
||||||
|
|
||||||
|
.ProseMirror [contenteditable="false"] {
|
||||||
|
white-space: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ProseMirror [contenteditable="false"] [contenteditable="true"] {
|
||||||
|
white-space: pre-wrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ProseMirror pre {
|
||||||
|
white-space: pre-wrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
img.ProseMirror-separator {
|
||||||
|
display: inline !important;
|
||||||
|
border: none !important;
|
||||||
|
margin: 0 !important;
|
||||||
|
width: 0 !important;
|
||||||
|
height: 0 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ProseMirror-gapcursor {
|
||||||
|
display: none;
|
||||||
|
pointer-events: none;
|
||||||
|
position: absolute;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ProseMirror-gapcursor:after {
|
||||||
|
content: "";
|
||||||
|
display: block;
|
||||||
|
position: absolute;
|
||||||
|
top: -2px;
|
||||||
|
width: 20px;
|
||||||
|
border-top: 1px solid black;
|
||||||
|
animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes ProseMirror-cursor-blink {
|
||||||
|
to {
|
||||||
|
visibility: hidden;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.ProseMirror-hideselection *::selection {
|
||||||
|
background: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ProseMirror-hideselection *::-moz-selection {
|
||||||
|
background: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ProseMirror-hideselection * {
|
||||||
|
caret-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ProseMirror-focused .ProseMirror-gapcursor {
|
||||||
|
display: block;
|
||||||
|
}`,Dx=class extends Yw{constructor(t={}){super(),this.css=null,this.className="tiptap",this.editorView=null,this.isFocused=!1,this.destroyed=!1,this.isInitialized=!1,this.extensionStorage={},this.instanceId=Math.random().toString(36).slice(2,9),this.hasWarnedStaleDecorationRead=!1,this.options={element:typeof document<"u"?document.createElement("div"):null,content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,textDirection:void 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:n})=>{throw n},onPaste:()=>null,onDrop:()=>null,onDelete:()=>null,enableExtensionDispatchTransaction:!0},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.utils={getUpdatedPosition:Ff,createMappablePosition:Vf},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:n,slice:r,moved:o})=>this.options.onDrop(n,r,o)),this.on("paste",({event:n,slice:r})=>this.options.onPaste(n,r)),this.on("delete",this.options.onDelete);let e=this.createDoc();if(!this.editorState){let n=pi(e,this.options.autofocus);this.editorState=rr.create({doc:e,schema:this.schema,selection:n||void 0})}Nx(this.schema),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}),this.css&&!document.head.contains(this.css)&&document.head.appendChild(this.css),window.setTimeout(()=>{this.isDestroyed||(this.options.autofocus!==!1&&this.options.autofocus!==null&&this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}),this.isInitialized=!0)},0)}unmount(){if(this.editorView){this.editorState=this.editorView.state;let t=this.editorView.dom;t?.editor&&delete t.editor,this.editorView.destroy()}if(this.editorView=null,this.isInitialized=!1,this.css&&!document.querySelectorAll(`.${this.className}`).length)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?this.commandManager.chain():Rn.createFakeChain()}can(){return this.commandManager?this.commandManager.can():Rn.createFallbackCan()}injectCSS(){this.options.injectCSS&&typeof document<"u"&&(this.css=eh(Rx,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.dispatchTransaction(t)},composing:!1,dragging:null,editable:!0,isDestroyed:!1},{get:(t,e)=>{if(this.editorView)return this.editorView[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 Uf&&!this.hasWarnedStaleDecorationRead&&Xw(this)&&(this.hasWarnedStaleDecorationRead=!0,console.warn("[tiptap warn]: `editor.state` was read while decoration `create()` was running. It returns the pre-transaction document. Use the `state` argument passed to `create()` instead. Helpers like `editor.isActive()` read `editor.state` too, so pass `state` to their standalone versions instead of calling them on the editor.")),this.editorView&&(this.editorState=this.view.state),this.editorState}registerPlugin(t,e){let n=ma(e)?e(t,[...this.state.plugins]):[...this.state.plugins,t],r=this.state.reconfigure({plugins:n});return this.vi
Line truncated
|
||||||
|
|
||||||
|
`,textSerializers:n={}}=t||{};return wa(this.state.doc,{blockSeparator:e,textSerializers:{...Ci(this.schema),...n}})}get isEmpty(){return $n(this.state.doc)}destroy(){this.destroyed||(this.destroyed=!0,this.emit("destroy"),this.unmount(),this.removeAllListeners(),this.extensionManager.destroy(),this.extensionManager=null,this.schema=null,this.commandManager=null,this.extensionStorage={})}get isDestroyed(){var t,e;return(t=(e=this.editorView)===null||e===void 0?void 0:e.isDestroyed)!==null&&t!==void 0?t:!0}$node(t,e){var n;return((n=this.$doc)===null||n===void 0?void 0:n.querySelector(t,e))||null}$nodes(t,e){var n;return((n=this.$doc)===null||n===void 0?void 0:n.querySelectorAll(t,e))||null}$pos(t){let e=this.state.doc.resolve(t),n=t>0&&e.nodeAfter&&!e.nodeAfter.isText&&e.nodeAfter.isAtom?e.nodeAfter:null;return new Sh(e,this,!1,n)}get $doc(){return this.$pos(0)}},mo=class{static Inline(t,e,n={},r){return new Ch(t,e,n,r)}static Node(t,e,n={},r){return new vh(t,e,n,r)}static Widget(t,e,n){let{key:r,...o}=n;return new Mh(t,e,r,o)}},Ch=class extends mo{constructor(t,e,n={},r){super(),this.kind="inline",this.from=t,this.to=e,this.attrs=n,this.spec=r}get anchor(){return this.from}toPMDecoration(t){let e=t?{...this.spec,extensionName:t}:this.spec;return ie.inline(this.from,this.to,this.attrs,e)}},vh=class extends mo{constructor(t,e,n={},r){super(),this.kind="node",this.from=t,this.to=e,this.attrs=n,this.spec=r}get anchor(){return this.from}toPMDecoration(t){let e=t?{...this.spec,extensionName:t}:this.spec;return ie.node(this.from,this.to,this.attrs,e)}},Mh=class extends mo{constructor(t,e,n,r){super(),this.kind="widget",this.pos=t,this.render=e,this.key=n,this.spec=r}get anchor(){return this.pos}toPMDecoration(t){let e=t?{...this.spec,key:this.key,extensionName:t}:{...this.spec,key:this.key};return ie.widget(this.pos,this.render,e)}};function Lx(t,e){let n=t,r=n[e];if(!r){r={renderers:new Map,props:new Map,pendingProps:new Map,flushScheduled:!1},n[e]=r;let o=r;t.on("destroy",()=>{o.pendingProps.clear(),o.renderers.forEach(i=>i.destroy()),o.renderers.clear(),o.props.clear()})}return r}function Ix(t){t.flushScheduled=!1;for(let[e,n]of t.pendingProps){let r=t.renderers.get(e);r&&(r.updateProps(n),t.props.set(e,{...n}))}t.pendingProps.clear()}function Px(t){let{editor:e,pos:n,key:r,props:o,cacheKey:i,context:s,create:l,materialize:a,side:c,relaxedSide:d,marks:u,stopEvent:f,ignoreSelection:h,destroy:p}=t,g=Lx(e,i);if(g.renderers.has(r)){var m;let x=(m=g.pendingProps.get(r))!==null&&m!==void 0?m:g.props.get(r);(!x||!Ta(x,o))&&(g.pendingProps.set(r,o),g.flushScheduled||(g.flushScheduled=!0,queueMicrotask(()=>Ix(g))))}let y=(x,b)=>{let w={...o,...s(b)},k=g.renderers.get(r);return k?k.updateProps(w):(k=l(w),g.renderers.set(r,k),g.props.set(r,{...o})),a(k)};return mo.Widget(n,y,{key:r,side:c,relaxedSide:d,marks:u,stopEvent:f,ignoreSelection:h,destroy:x=>{if(!Qf(e).has(r))try{var b;(b=g.renderers.get(r))===null||b===void 0||b.destroy(),g.renderers.delete(r),g.props.delete(r),g.pendingProps.delete(r)}finally{p?.(x)}}})}function Le(t){return new cn({find:t.find,handler:({state:e,range:n,match:r})=>{let o=G(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(uo(n.from,n.to,e.doc).filter(f=>f.mark.type.excluded.find(h=>h===t.type&&h!==f.mark.type)).filter(f=>f.to>c).length)return null;d<n.to&&i.delete(d,n.to),c>n.from&&i.delete(n.from+a,c);let u=n.from+a+s.length;i.addMark(n.from+a,u,t.type.create(o||{})),i.removeStoredMark(t.type)}},undoable:t.undoable})}function go(t){return new cn({find:t.find,handler:({state:e,range:n,match:r})=>{let o=G(t.getAttributes,void 0,r)||{},{tr:i}=e,s=n.from,l=n.to,a=t.type.create(o);if(r[1]){let c=s+r[0].lastIndexOf(r[1]);c>l?c=l:l=c+r[1].length;let d=r[0][r[0].length-1];i.insertText(d,s+r[0].length-1),i.replaceWith(c,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()},undoable:t.undoable})}function xr(t){return new cn({find:t.find,handler:({state:e,range:n,match:r})=>{let o=e.doc.resolve(n.from),i=G(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)},undoable:t.undoable})}function $x(t){return new cn({find:t.find,handler:({state:e,range:n,match:r})=>{let o=t.replace,i=n.from,s=n.to;if(r[1]){let l=r[0].lastIndexOf(r[1]);o+=r[0].slice(l+r[1].length),i+=l;let a=i-s;a>0&&(o=r[0].slice(l-a,l)+o,i=s)}e.tr.insertText(o,i,s)},undoable:t.undoable})}function Vt(t){return new cn({find:t.find,handler:({state:e,range:n,match:r,chain:o})=>{let i=G(t.getAttributes,void 0,r)||{},s=e.tr.delete(n.from,n.to),l=s.doc.resolve(n.from).blockRange(),a=l&&er(l,t.type,i);if(!a)return null;if(s.wrap(l,a),t.keepMarks&&t.editor){let{selection:d,storedMarks:u}=e,{splittableMarks:f}=t.editor.extensionManager,h=u||d.$to.
Line truncated
|
||||||
|
`).map(c=>c.trim()===""?n:`${n} ${c}`);r.push(a.join(`
|
||||||
|
`))}),r.join(`
|
||||||
|
${n}
|
||||||
|
`)},addCommands(){return{setBlockquote:()=>({commands:t})=>t.wrapIn(this.name),toggleBlockquote:()=>({commands:t})=>t.toggleWrap(this.name),unsetBlockquote:()=>({commands:t})=>t.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote(),Backspace:()=>wk(this.editor,this.type)}},addInputRules(){return[Vt({find:xk,type:this.type})]}}),Gh=kk;var Sk=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,Ck=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,vk=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,Mk=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,Tk=le.create({name:"bold",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:t=>t.style.fontWeight!=="normal"&&null},{style:"font-weight=400",clearMark:t=>t.type.name===this.name},{style:"font-weight",getAttrs:t=>/^(bold(er)?|[5-9]\d{2,})$/.test(t)&&null}]},renderHTML({HTMLAttributes:t}){return kr("strong",{...D(this.options.HTMLAttributes,t),children:kr("slot",{})})},markdownTokenName:"strong",parseMarkdown:(t,e)=>e.applyMark("bold",e.parseInline(t.tokens||[])),markdownOptions:{htmlReopen:{open:"<strong>",close:"</strong>"}},renderMarkdown:(t,e)=>`**${e.renderChildren(t)}**`,addCommands(){return{setBold:()=>({commands:t})=>t.setMark(this.name),toggleBold:()=>({commands:t})=>t.toggleMark(this.name),unsetBold:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[Le({find:Sk,type:this.type}),Le({find:vk,type:this.type})]},addPasteRules(){return[Ae({find:Ck,type:this.type}),Ae({find:Mk,type:this.type})]}}),Xh=Tk;var Ak=t=>{let e=/`([^`]+)`(?!`)$/.exec(t);return!e||e.index>0&&t[e.index-1]==="`"?null:{index:e.index,text:e[0],replaceWith:e[1]}},Ek=t=>{let e=/`([^`]+)`(?!`)/g,n=[],r;for(;(r=e.exec(t))!==null;)r.index>0&&t[r.index-1]==="`"||n.push({index:r.index,text:r[0],replaceWith:r[1]});return n},Ok=le.create({name:"code",addOptions(){return{HTMLAttributes:{}}},excludes:"_",code:!0,exitable:!0,parseHTML(){return[{tag:"code"}]},renderHTML({HTMLAttributes:t}){return["code",D(this.options.HTMLAttributes,t),0]},markdownTokenName:"codespan",parseMarkdown:(t,e)=>e.applyMark("code",[{type:"text",text:t.text||""}]),renderMarkdown:(t,e)=>t.content?`\`${e.renderChildren(t.content)}\``:"",addCommands(){return{setCode:()=>({commands:t})=>t.setMark(this.name),toggleCode:()=>({commands:t})=>t.toggleMark(this.name),unsetCode:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[Le({find:Ak,type:this.type})]},addPasteRules(){return[Ae({find:Ek,type:this.type})]}}),Yh=Ok;var _a=4,Nk=/^```([a-z]+)?[\s\n]$/,Rk=/^~~~([a-z]+)?[\s\n]$/,Dk=j.create({name:"codeBlock",addOptions(){return{languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,exitOnArrowUp:!0,defaultLanguage:null,enableTabIndentation:!1,tabSize:_a,HTMLAttributes:{}}},content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:this.options.defaultLanguage,parseHTML:t=>{var e;let{languageClassPrefix:n}=this.options;if(!n)return null;let r=[...((e=t.firstElementChild)===null||e===void 0?void 0:e.classList)||[]].filter(o=>o.startsWith(n)).map(o=>o.replace(n,""))[0];return r||null},rendered:!1}}},parseHTML(){return[{tag:"pre",preserveWhitespace:"full"}]},renderHTML({node:t,HTMLAttributes:e}){return["pre",D(this.options.HTMLAttributes,e),["code",{class:t.attrs.language?this.options.languageClassPrefix+t.attrs.language:null},0]]},markdownTokenName:"code",parseMarkdown:(t,e)=>{var n,r;return((n=t.raw)===null||n===void 0?void 0:n.startsWith("```"))===!1&&((r=t.raw)===null||r===void 0?void 0:r.startsWith("~~~"))===!1&&t.codeBlockStyle!=="indented"?[]:e.createNode("codeBlock",{language:t.lang||null},t.text?[e.createTextNode(t.text)]:[])},renderMarkdown:(t,e)=>{var n;let r="",o=((n=t.attrs)===null||n===void 0?void 0:n.language)||"";return t.content?r=[`\`\`\`${o}`,e.renderChildren(t.content),"```"].join(`
|
||||||
|
`):r=`\`\`\`${o}
|
||||||
|
|
||||||
|
\`\`\``,r},addCommands(){return{setCodeBlock:t=>({commands:e})=>e.setNode(this.name,t),toggleCodeBlock:t=>({commands:e})=>e.toggleNode(this.name,"paragraph",t)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{let{empty:t,$anchor:e}=this.editor.state.selection,n=e.pos===1;return!t||e.parent.type.name!==this.name?!1:n||!e.parent.textContent.length?this.editor.commands.clearNodes():!1},Tab:({editor:t})=>{var e;if(!this.options.enableTabIndentation)return!1;let n=(e=this.options.tabSize)!==null&&e!==void 0?e:_a,{state:r}=t,{selection:o}=r,{$from:i,empty:s}=o;if(i.parent.type!==this.type)return!1;let l=" ".repeat(n);return s?t.commands.insertContent(l):t.commands.command(({tr:a})=>{let{from:c,to:d}=o,u=r.doc.textBetween(c,d,`
|
||||||
|
`,`
|
||||||
|
`).split(`
|
||||||
|
`).map(f=>l+f).join(`
|
||||||
|
`);return a.replaceWith(c,d,r.schema.text(u)),!0})},"Shift-Tab":({editor:t})=>{var e;if(!this.options.enableTabIndentation)return!1;let n=(e=this.options.tabSize)!==null&&e!==void 0?e:_a,{state:r}=t,{selection:o}=r,{$from:i,empty:s}=o;return i.parent.type!==this.type?!1:s?t.commands.command(({tr:l})=>{var a;let{pos:c}=i,d=i.start(),u=i.end(),f=r.doc.textBetween(d,u,`
|
||||||
|
`,`
|
||||||
|
`).split(`
|
||||||
|
`),h=0,p=0,g=c-d;for(let b=0;b<f.length;b+=1){if(p+f[b].length>=g){h=b;break}p+=f[b].length+1}let m=((a=f[h].match(/^ */))===null||a===void 0?void 0:a[0])||"",y=Math.min(m.length,n);if(y===0)return!0;let x=d;for(let b=0;b<h;b+=1)x+=f[b].length+1;return l.delete(x,x+y),c-x<=y&&l.setSelection(N.create(l.doc,x)),!0}):t.commands.command(({tr:l})=>{let{from:a,to:c}=o,d=r.doc.textBetween(a,c,`
|
||||||
|
`,`
|
||||||
|
`).split(`
|
||||||
|
`).map(u=>{var f;let h=((f=u.match(/^ */))===null||f===void 0?void 0:f[0])||"",p=Math.min(h.length,n);return u.slice(p)}).join(`
|
||||||
|
`);return l.replaceWith(a,c,r.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()},ArrowUp:({editor:t})=>{if(!this.options.exitOnArrowUp)return!1;let{state:e}=t,{selection:n}=e,{$from:r,empty:o}=n;if(!o||r.parent.type!==this.type||r.parentOffset!==0)return!1;let i=r.before();return i>0?!1:t.commands.insertDefaultBlock({pos:i})},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 s=o.after();return s===void 0?!1:r.nodeAt(s)?t.commands.command(({tr:l})=>(l.setSelection(B.near(r.resolve(s))),!0)):t.commands.exitCode()}}},addInputRules(){return[xr({find:Nk,type:this.type,getAttributes:t=>({language:t[1]})}),xr({find:Rk,type:this.type,getAttributes:t=>({language:t[1]})})]},addProseMirrorPlugins(){return[new F({key:new _("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(N.near(s.doc.resolve(Math.max(0,s.selection.from-2)))),s.setMeta("paste",!0),t.dispatch(s),!0}}})]}}),Qh=Dk;var Zh=j.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",JSON.stringify(e.attrs.config)),s.setAttribute("data-id",e.attrs.id),s.setAttribute("data-testid","rich-editor-custom-block"),s.setAttribute("data-type","customBlock"),i.options.hasMinimalCustomBlockControls&&e.attrs.preview&&s.classList.add("fi-fo-rich-editor-custom-block-minimal");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.dataset.testid="rich-editor-custom-block-edit-button",d.type="button",i.options.editCustomBlockButtonLabel&&d.setAttribute("aria-label",i.options.editCustomBlockButtonLabel),d.innerHTML=i.options.editCustomBlockButtonIconHtml,d.addEventListener("click",()=>{t.commands.setNodeSelection(n()),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.dataset.testid="rich-editor-custom-block-delete-button",d.type="button",i.options.deleteCustomBlockButtonLabel&&d.setAttribute("aria-label",i.options.deleteCustomBlockButtonLabel),d.innerHTML=i.options.deleteCustomBlockButtonIconHtml,d.addEventListener("click",()=>t.chain().focus().setNodeSelection(n()).deleteSelection().run()),c.appendChild(d)}if(e.attrs.preview){let c=document.createElement("div"),d=["fi-fo-rich-editor-custom-block-preview"];e.attrs.shouldApplyProseStylingToPreview||d.push("fi-not-prose"),c.className=d.join(" "),c.innerHTML=new TextDecoder().decode(Uint8Array.from(atob(e.attrs.preview),u=>u.charCodeAt(0))),s.appendChild(c)}return{dom:s,stopEvent:c=>c.target instanceof Element&&l.contains(c.target.closest("button"))}}},addOptions(){return{deleteCustomBlockButtonIconHtml:null,deleteCustomBlockButtonLabel:null,editCustomBlockButtonIconHtml:null,editCustomBlockButtonLabel:null,editCustomBlockUsing:()=>{},getCustomBlockPreviewsUsing:async()=>[],hasMinimalCustomBlockControls:!1,insertCustomBlockUsing:()=>{}}},addAttributes(){return{config:{default:null,parseHTML:t=>JSON.parse(t.getAttribute("data-config")),renderHTML:t=>t.config?{"data-config":JSON.stringify(t.config)}:{}},id:{default:null,parseHTML:t=>t.getAttribute("data-id"),renderHTML:t=>t.id?{"data-id":t.id}:{}},label:{default:null,parseHTML:()=>null,rendered:!1},preview:{default:null,parseHTML:()=>null,rendered:!1},shouldApplyProseStylingToPreview:{default:!1,parseHTML:()=>!1,rendered:!1}}},parseHTML(){return[{tag:`div[data-type="${this.name}"]`}]},renderHTML({HTMLAttributes:t}){return["div",D({"data-type":"customBlock"},t)]},addKeyboardShortcuts(){return{Backspace:()=>this.editor.commands.command(({state:t})=>{let e=!1,{selection:n}=t,{empty:r,anchor:o}=n;return r?(t.doc.nodesBetween(o-1,o,i=>{if(i.type.name===this.name)return e=!0,!1}),e):!1})}},addProseMirrorPlugins(){let{getCustomBlockPreviewsUsing:t,insertCustomBlockUsing:e}=this.options,n=new Map,r=new Set,o=s=>JSON.stringify([s.attrs.id,s.attrs.config]),i=async s=>{if(this.editor.isDestroyed)return;let l=[],a=[],c=new Map;if(s.state.doc.descendants(u=>{if(u.type.name!==this.name)return;let f=o(u);if(u.attrs.preview!==null){n.set(f,{label:u.attrs.label,preview:u.attrs.preview,shouldApplyProseStylingToPreview:u.attrs.shouldApplyProseStylingToPreview});return}!u.attrs.id||r.has(f)||c.set(f,{config:u.attrs.config,id:u.attrs.id})}),c.forEach((u,f)=>{n.has(f)||(r.add(f),a.push(f),l.push({...u,key:l.length}))}),l.length){let u,f;try{u=await Promise.race([t(l),new Promise((h,p)=>{f=setTimeout(()=>p(new Error("Preview request timed out")),3e4)})])}catch(h){this.editor.isDestroyed||console.error("Failed to hydrate custom block previews",h);return}finally{clearTimeout(f),a.forEach(h=>{r.delete(h)})}if(this.editor.isDestroyed)return;a.forEach(h=>{n.set(h,null)}),u.forEach(h=>{let p=a[h.key];p!==void 0&&n.set(p,{label:h.label,preview:h.preview,shouldApplyProseStylingToPreview:h.shouldApplyProseStylingToPreview})})}let d=s.state.tr;s.state.doc.descendants((u,f)=>{if(u.type.name!==this.name||u.attrs.preview!==null
Line truncated
|
||||||
|
|
||||||
|
`):""}),op=Ik;var Pk=12,sp=(t,e)=>{let n=dt(t.$from,o=>o.type.name===e),r=t.node?.type.name==="gridColumn"?{node:t.node,pos:t.from,depth:t.$from.depth+1}:dt(t.$from,o=>o.type.name==="gridColumn");return n&&r&&r.depth===n.depth+1?{grid:n,column:r}:null},lp=t=>Math.max(1,Number(t.attrs["data-col-span"])||1),ap=(t,e)=>e?ap(e,t%e):t,$k=t=>{let e=!0;return t.forEach(n=>{lp(n)!==1&&(e=!1)}),e},ip=({tr:t,dispatch:e,editor:n,gridNodeName:r,shouldInsertAfter:o})=>{let i=sp(t.selection,r);if(!i||!$k(i.grid.node)||i.grid.node.childCount>=Pk)return!1;if(e){let s=n.schema.nodes.gridColumn.createAndFill({"data-col-span":1}),l=o?i.column.pos+i.column.node.nodeSize:i.column.pos;t.setNodeMarkup(i.grid.pos,void 0,{...i.grid.node.attrs,"data-cols":i.grid.node.childCount+1}).insert(l,s).scrollIntoView()}return!0},cp=j.create({name:"grid",group:"block",defining:!0,isolating:!0,allowGapCursor:!1,content:"gridColumn+",addOptions(){return{HTMLAttributes:{class:"grid-layout"}}},addAttributes(){return{"data-cols":{default:2,parseHTML:t=>t.getAttribute("data-cols")},"data-from-breakpoint":{default:"md",parseHTML:t=>t.getAttribute("data-from-breakpoint")},style:{default:null,parseHTML:t=>t.getAttribute("style"),renderHTML:t=>({style:`--cols: repeat(${Math.max(1,Number(t["data-cols"])||1)}, minmax(0, 1fr))`})}}},parseHTML(){return[{tag:"div",getAttrs:t=>t.classList.contains("grid-layout")&&null}]},renderHTML({HTMLAttributes:t}){return["div",D(this.options.HTMLAttributes,t),0]},addCommands(){return{addGridColumnBefore:()=>({tr:t,dispatch:e,editor:n})=>ip({tr:t,dispatch:e,editor:n,gridNodeName:this.name,shouldInsertAfter:!1}),addGridColumnAfter:()=>({tr:t,dispatch:e,editor:n})=>ip({tr:t,dispatch:e,editor:n,gridNodeName:this.name,shouldInsertAfter:!0}),deleteGridColumn:()=>({tr:t,dispatch:e})=>{let n=sp(t.selection,this.name);if(!n||n.grid.node.childCount<=1)return!1;if(e){let r=[];n.grid.node.forEach((s,l)=>{let a=n.grid.pos+1+l;a!==n.column.pos&&r.push({column:s,position:a,span:lp(s)})});let o=r.map(s=>s.span).reduce(ap),i=r.reduce((s,l)=>s+l.span/o,0);r.forEach(({column:s,position:l,span:a})=>{t.setNodeMarkup(l,void 0,{...s.attrs,"data-col-span":a/o})}),t.setNodeMarkup(n.grid.pos,void 0,{...n.grid.node.attrs,"data-cols":i}).delete(n.column.pos,n.column.pos+n.column.node.nodeSize).setSelection(N.near(t.doc.resolve(n.column.pos))).scrollIntoView()}return!0},deleteGrid:()=>({tr:t,dispatch:e})=>{let n=dt(t.selection.$from,r=>r.type.name===this.name);if(!n)return!1;if(e){let r=[];n.node.forEach(o=>{o.forEach(i=>r.push(i))}),t.replaceWith(n.pos,n.pos+n.node.nodeSize,r).setSelection(N.near(t.doc.resolve(n.pos))).scrollIntoView()}return!0},insertGrid:({columns:t=[1,1],fromBreakpoint:e,coordinates:n=null}={})=>({tr:r,dispatch:o,editor:i})=>{let s=i.schema.nodes.gridColumn,l=Array.isArray(t)&&t.length?t:[1,1],a=[];for(let u=0;u<l.length;u+=1)a.push(s.createAndFill({"data-col-span":Number(l[u]??1)||1}));let c=l.map(u=>Number(u)||1).reduce((u,f)=>u+f,0),d=i.schema.nodes.grid.createChecked({"data-cols":c,"data-from-breakpoint":e},a);if(o){let u=r.selection.anchor+1;[null,void 0].includes(n?.from)?r.replaceSelectionWith(d).scrollIntoView().setSelection(N.near(r.doc.resolve(u))):r.replaceRangeWith(n.from,n.to,d).scrollIntoView().setSelection(N.near(r.doc.resolve(n.from)))}return!0}}}});var dp=j.create({name:"gridColumn",content:"block+",isolating:!0,addOptions(){return{HTMLAttributes:{class:"grid-layout-col"}}},addAttributes(){return{"data-col-span":{default:1,parseHTML:t=>t.getAttribute("data-col-span"),renderHTML:t=>({"data-col-span":t["data-col-span"]??1})},style:{default:null,parseHTML:t=>t.getAttribute("style"),renderHTML:t=>{let e=Math.max(1,Number(t["data-col-span"])||1);return{style:`--col-span: span ${e} / span ${e}`}}}}},parseHTML(){return[{tag:"div",getAttrs:t=>t.classList.contains("grid-layout-col")&&null}]},renderHTML({HTMLAttributes:t}){return["div",D(this.options.HTMLAttributes,t),0]}});var Bk=j.create({name:"hardBreak",markdownTokenName:"br",addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,linebreakReplacement:!0,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:t}){return["br",D(this.options.HTMLAttributes,t)]},renderText(){return`
|
||||||
|
`},renderMarkdown:()=>`
|
||||||
|
`,parseMarkdown:()=>({type:"hardBreak"}),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}).scrollIntoView().run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),up=Bk;var zk=j.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]}`,D(this.options.HTMLAttributes,e),0]},parseMarkdown:(t,e)=>e.createNode("heading",{level:t.depth||1},e.parseInline(t.tokens||[])),renderMarkdown:(t,e)=>{var n;let r=!((n=t.attrs)===null||n===void 0)&&n.level?parseInt(t.attrs.level,10):1,o="#".repeat(r);return t.content?`${o} ${e.renderChildren(t.content)}`:""},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=>xr({find:new RegExp(`^(#{${Math.min(...this.options.levels)},${t}})\\s$`),type:this.type,getAttributes:{level:t}}))}}),fp=zk;var Hk=/(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))$/,Fk=/(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))/g,Vk=le.create({name:"highlight",addOptions(){return{multicolor:!1,HTMLAttributes:{}}},addAttributes(){return this.options.multicolor?{color:{default:null,parseHTML:t=>t.getAttribute("data-color")||Oa(t,"background-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",D(this.options.HTMLAttributes,t),0]},renderMarkdown:(t,e)=>`==${e.renderChildren(t)}==`,parseMarkdown:(t,e)=>e.applyMark("highlight",e.parseInline(t.tokens||[])),markdownTokenizer:{name:"highlight",level:"inline",start:t=>t.indexOf("=="),tokenize(t,e,n){let r=/^(==)([^=]+)(==)/.exec(t);if(r){let o=r[2].trim(),i=n.inlineTokens(o);return{type:"highlight",raw:r[0],text:o,tokens:i}}}},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:Hk,type:this.type})]},addPasteRules(){return[Ae({find:Fk,type:this.type})]}}),hp=Vk;var Wk=j.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{},nextNodeType:"paragraph"}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:t}){return["hr",D(this.options.HTMLAttributes,t)]},markdownTokenName:"hr",parseMarkdown:(t,e)=>e.createNode("horizontalRule"),renderMarkdown:()=>"---",addCommands(){return{setHorizontalRule:()=>({chain:t,state:e})=>{if(!Aa(e,e.schema.nodes[this.name]))return!1;let{selection:n}=e,{$to:r}=n,o=t();return fo(n)?o.insertContentAt(r.pos,{type:this.name}):o.insertContent({type:this.name}),o.command(({state:i,tr:s,dispatch:l})=>{if(l){let{$to:a}=s.selection,c=a.end();if(a.nodeAfter)a.nodeAfter.isTextblock?s.setSelection(N.create(s.doc,a.pos+1)):a.nodeAfter.isBlock?s.setSelection(I.create(s.doc,a.pos)):s.setSelection(N.create(s.doc,a.pos));else{let d=i.schema.nodes[this.options.nextNodeType]||a.parent.type.contentMatch.defaultType,u=d?.create();u&&(s.insert(c,u),s.setSelection(N.create(s.doc,c+1)))}s.scrollIntoView()}return!0}).run()}}},addInputRules(){return[go({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}}),pp=Wk;var jk=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,_k=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,Uk=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,Kk=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,qk=le.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",D(this.options.HTMLAttributes,t),0]},addCommands(){return{setItalic:()=>({commands:t})=>t.setMark(this.name),toggleItalic:()=>({co
Line truncated
|
||||||
|
`,nS="\uFE0F",rS="\u200D",Ga="\uFFFC",Bi=null,zi=null;function oS(t=[]){let e={};ze.groups=e;let n=new ze;Bi==null&&(Bi=Sp(Xk)),zi==null&&(zi=Sp(Yk)),M(n,"'",ns),M(n,"{",So),M(n,"}",Co),M(n,"[",Vi),M(n,"]",Wi),M(n,"(",ji),M(n,")",_i),M(n,"<",Ui),M(n,">",Ki),M(n,"\uFF08",qi),M(n,"\uFF09",Ji),M(n,"\u300C",Gi),M(n,"\u300D",Xi),M(n,"\u300E",Yi),M(n,"\u300F",Qi),M(n,"\uFF1C",Zi),M(n,"\uFF1E",es),M(n,"&",ts),M(n,"*",rs),M(n,"@",un),M(n,"`",ss),M(n,"^",ls),M(n,":",Vn),M(n,",",lc),M(n,"$",as),M(n,".",St),M(n,"=",cs),M(n,"!",ac),M(n,"-",rt),M(n,"%",vo),M(n,"|",ds),M(n,"+",us),M(n,"#",fs),M(n,"?",Mo),M(n,'"',cc),M(n,"/",Ct),M(n,";",dc),M(n,"~",To),M(n,"_",hs),M(n,"\\",is),M(n,"\u30FB",Ep);let r=ae(n,jt,ic,{[Ya]:!0});ae(r,jt,r);let o=ae(r,Wt,Tp,{[ko]:!0}),i=ae(r,wo,Ap,{[xo]:!0}),s=ae(n,Wt,_t,{[Qa]:!0});ae(s,jt,o),ae(s,Wt,s),ae(o,jt,o),ae(o,Wt,o);let l=ae(n,wo,tc,{[Za]:!0});ae(l,Wt),ae(l,jt,i),ae(l,wo,l),ae(i,jt,i),ae(i,Wt),ae(i,wo,i);let a=M(n,Ja,sc,{[Ua]:!0}),c=M(n,kp,oc,{[Ua]:!0}),d=ae(n,qa,oc,{[Ua]:!0});M(n,Ga,d),M(c,Ja,a),M(c,Ga,d),ae(c,qa,d),M(d,kp),M(d,Ja),ae(d,qa,d),M(d,Ga,d);let u=ae(n,Ka,Op,{[Mp]:!0});M(u,"#"),ae(u,Ka,u),M(u,nS,u);let f=M(u,rS);M(f,"#"),ae(f,Ka,u);let h=[[Wt,s],[jt,o]],p=[[Wt,null],[wo,l],[jt,i]];for(let g=0;g<Bi.length;g++)dn(n,Bi[g],nc,_t,h);for(let g=0;g<zi.length;g++)dn(n,zi[g],rc,tc,p);Fn(nc,{tld:!0,ascii:!0},e),Fn(rc,{utld:!0,alpha:!0},e),dn(n,"file",Fi,_t,h),dn(n,"mailto",Fi,_t,h),dn(n,"http",Sr,_t,h),dn(n,"https",Sr,_t,h),dn(n,"ftp",Sr,_t,h),dn(n,"ftps",Sr,_t,h),Fn(Fi,{scheme:!0,ascii:!0},e),Fn(Sr,{slashscheme:!0,ascii:!0},e),t=t.sort((g,m)=>g[0]>m[0]?1:-1);for(let g=0;g<t.length;g++){let m=t[g][0],x=t[g][1]?{[Qk]:!0}:{[Zk]:!0};m.indexOf("-")>=0?x[ec]=!0:Wt.test(m)?jt.test(m)?x[ko]=!0:x[Qa]=!0:x[Ya]=!0,xp(n,m,m,x)}return xp(n,"localhost",Ao,{ascii:!0}),n.jd=new ze(ps),{start:n,tokens:Object.assign({groups:e},Np)}}function Rp(t,e){let n=iS(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 iS(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 dn(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 ze(r),i.jr=o.slice(),t.j[a]=i),t=i}return i=new ze(n),i.jr=o.slice(),t.j[e[s-1]]=i,i}function Sp(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 Eo={defaultProtocol:"http",events:null,format:Cp,formatHref:Cp,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function uc(t,e=null){let n=Object.assign({},Eo);t&&(n=Object.assign(n,t instanceof uc?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}uc.prototype={o:Eo,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]:Eo[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 Cp(t){return t}function Dp(t,e){this.t="token",this.v=t,this.tk=e}Dp.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=Eo.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 ms(t,e){class n extends Dp{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`);se.customSchemes.push([t,e])}function fS(){se.scanner=oS(se.customSchemes);for(let t=0;t<se.tokenQueue.length;t++)se.tokenQueue[t][1]({scanner:se.scanner});se.parser=aS(se.scanner.tokens);for(let t=0;t<se.pluginQueue.length;t++)se.pluginQueue[t][1]({scanner:se.scanner,parser:se.parser});return se.initialized=!0,se}function gs(t){return se.initialized||fS(),cS(se.parser.start,t,Rp(se.scanner.start,t))}gs.scan=Rp;function hc(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 uc(n),o=gs(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 pc="[\0- \xA0\u1680\u180E\u2000-\u2029\u205F\u3000]",hS=new RegExp(pc),pS=new RegExp(`${pc}$`),mS=new RegExp(pc,"g");function gS(t){return t.length===1?t[0].isLink:t.length===3&&t[1].isLink?["()","[]"].includes(t[0].value+t[2].value):!1}function yS(t){return new F({key:new _("autolink"),appendTransaction:(e,n,r)=>{let o=e.some(a=>a.docChanged)&&!n.doc.eq(r.doc),i=e.some(a=>a.getMeta("preventAutolink"));if(!o||i)return;let{tr:s}=r,l=wi(n.doc,[...e]);if(Pn(l).forEach(({newRange:a})=>{let c=pa(r.doc,a,f=>f.isTextblock),d,u;if(c.length>1)d=c[0],u=r.doc.textBetween(d.pos,d.pos+d.node.nodeSize,void 0," ");else if(c.length){let f=r.doc.textBetween(a.from,a.to," "," ");if(!pS.test(f))return;d=c[0],u=r.doc.textBetween(d.pos,a.to,void 0," ")}if(d&&u){let f=u.split(hS).filter(Boolean);if(f.length<=0)return!1;let h=f[f.length-1],p=d.pos+u.lastIndexOf(h);if(!h)return!1;let g=gs(h).map(m=>m.toObject(t.defaultProtocol));if(!gS(g))return!1;g.filter(m=>m.isLink).map(m=>({...m,from:p+m.start+1,to:p+m.end+1})).filter(m=>r.schema.marks.code?!r.doc.rangeHasMark(m.from,m.to,r.schema.marks.code):!0).filter(m=>t.validate(m.value)).filter(m=>t.shouldAutoLink(m.value)).forEach(m=>{uo(m.from,m.to,r.doc).some(y=>y.mark.type===t.type)||s.addMark(m.from,m.to,t.type.create({href:m.href}))})}}),!!s.steps.length)return s}})}function bS(t){return new F({key:new _("handleClickLink"),props:{handleClick:(e,n,r)=>{if(r.button!==0||!e.editable)return!1;let o=null;if(r.target instanceof HTMLAnchorElement)o=r.target;else{let a=r.target;if(!a)return!1;let c=t.editor.view.dom;o=a.closest("a"),o&&!c.contains(o)&&(o=null)}if(!o)return!1;let i=!1;if(t.enableClickSelection&&(i=t.editor.commands.extendMarkRange(t.type.name)),t.openOnClick){var s,l;let a=vi(e.state,t.type.name),c=(s=o.href)!==null&&s!==void 0?s:a.href,d=(l=o.target)!==null&&l!==void 0?l:a.target;c&&(window.open(c,d),i=!0)}return i}}})}var wS=/\[([^[\]]+)\]\(((?:[^\s()]|\([^\s()]*\))+)(?:\s+(?:(["'])(.*?)\3|“(.*?)”|‘(.*?)’))?\)$/,xS=/\[([^[\]]+)\]\(((?:[^\s()]|\([^\s()]*\))+)(?:\s+(?:(["'])(.*?)\3|“(.*?)”|‘(.*?)’))?\)/g;function Ip(t,e){let n=0;for(let r=e-1;r>=0&&t[r]==="\\";r-=1)n+=1;return n%2===1}function kS(t,e){let n=0,r=0;for(;r<e;){if(t[r]!=="`"){r+=1;continue}if(n===0&&Ip(t,r)){r+=1;continue}let o=0;for(;r<e&&t[r]==="`";)o+=1,r+=1;n===0?n=o:o===n&&(n=0)}return n>0}function Pp(t,e,n){var r,o;let[,i,s]=e;return(e.index?t[e.index-1]:void 0)==="!"||Ip(t,(r=e.index)!==null&&r!==void 0?r:0)||kS(t,(o=e.index)!==null&&o!==void 0?o:0)?!1:!!i.trim()&&n(s)}function $p(t){var e,n;let[r,o,i,,s,l,a]=t,c=(e=s??l)!==null&&e!==void 0?e:a;return{index:(n=t.index)!==null&&n!==void 0?n:0,text:r,replaceWith:o,data:{href:i,title:c||null,markdown:!0}}}function SS(t,e){return t.index<e.index+e.text.length&&e.index<t.index+t.text.length}function Bp(t){var e,n,r;return{href:(e=t.data)===null||e===void 0?void 0:e.href,title:(n=(r=t.data)===null||r===void 0?void 0:r.title)!==null&&n!==void 0?n:null}}function CS(t){let e=Le({find:n=>{let r=wS.exec(n);return!r||!Pp(n,r,t.isAllowedHref)?null:$p(r)},type:t.type,getAttributes:Bp});return new cn({find:e.find,handler:n=>{let r=e.handler(n);return r!==null&&n.state.tr.steps.length&&n.state.tr.setMeta("preventAutolink",!0),r}})}function vS(t){let e=Ae({find:n=>{var r,o;let i=[];for(let l of n.matchAll(xS))Pp(n,l,t.isAllowedHref)&&i.push($p(l));let s=((r=(o=t.findPlainUrls)===null||o===void 0?void 0:o.call(t,n))!==null&&r!==void 0?r:[]).filter(l=>!i.some(a=>SS(a,l)));return[...i,...s]},type:t.type,getAttributes:Bp});return new wr({find:e.find,handler:n=>{var r;let o=e.handler(n);return o!==null&&n.state.tr.steps.length&&(!((r=n.match.data)===null||r===void 0)&&r.markdown)&&n.state.tr.setMeta("preventAutolink",!0),o}})}function MS(t){return new F({key:new _("handlePasteLink"),props:{handlePaste:(e,n,r)=>{let{shouldAutoLink:o}=t,{state:i}=e,{selection:s}=i,{empty:l}=s;if(l)return!1;let a="";r.content.forEach(d=>{a+=d.textContent});let c=hc(a,{defaultProtocol:t.defaultProtocol}).find(d=>d.isLink&&d.value===a);return!a||!c||o!==void 0&&!o(c.value)?!1:t.editor.commands.setMark(t.type,{href:c.href})}}})}function Ut(t,e){let n=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];return e&&e.forEach(r=>{let o=typeof r=="string"?
Line truncated
|
||||||
|
`):"",markdownOptions:{indentsContent:!0},addCommands(){return{toggleBulletList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(AS,this.editor.getAttributes(Hp)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let t=Vt({find:Fp,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(t=Vt({find:Fp,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(Hp),editor:this.editor})),[t]}}),ES=(t,e,n)=>{let{selection:r}=t;if(!r.empty)return null;let{$from:o}=r;if(!o.parent.isTextblock||o.parentOffset!==o.parent.content.size)return null;let i=-1;for(let h=o.depth;h>0;h-=1)if(o.node(h).type.name===e){i=h;break}if(i<0)return null;let s=o.node(i),l=o.index(i);if(l+1>=s.childCount)return null;let a=s.child(l+1);if(!n.includes(a.type.name))return null;let c=t.schema.nodes[e],d=!1;if(a.forEach(h=>{h.type===c&&h.childCount>1&&(d=!0)}),!d)return null;let u=t.doc.resolve(o.after()).nodeAfter;if(!u||!n.includes(u.type.name))return null;let f=[];return u.forEach(h=>{f.push(h)}),f.length===0?null:{listItemDepth:i,nestedList:u,nestedListPos:o.after(),insertPos:o.after(i),items:f}},OS=(t,e,n,r)=>{let o=ES(t,n,r);if(!o)return!1;let{selection:i}=t,{nestedList:s,nestedListPos:l,insertPos:a,items:c}=o,d=t.tr;d.delete(l,l+s.nodeSize);let u=d.mapping.map(a);return d.insert(u,v.from(c)),d.setSelection(i.map(d.doc,d.mapping)),e&&e(d),!0},NS=(t,e,n)=>OS(t.state,t.view.dispatch,e,n),Kp=(t,e)=>Z.create({name:`${t}BranchingDeleteKeymap`,priority:101,addKeyboardShortcuts(){let n=()=>NS(this.editor,t,e);return{Delete:n,"Mod-Delete":n}}}),qp=[[1e3,"m"],[900,"cm"],[500,"d"],[400,"cd"],[100,"c"],[90,"xc"],[50,"l"],[40,"xl"],[10,"x"],[9,"ix"],[5,"v"],[4,"iv"],[1,"i"]],ys="abcdefghijklmnopqrstuvwxyz",Jp=String.raw`\d+|[ivxlcdmIVXLCDM]+|${"[a-zA-Z]{1,2}"}`;function ws(t){let e=t,n="";for(let[r,o]of qp)for(;e>=r;)n+=o,e-=r;return n}function yc(t){return ws(t).toUpperCase()}function Gp(t){let e=t.toLowerCase(),n=0,r=0;for(;n<e.length;){let o=!1;for(let[i,s]of qp)if(e.startsWith(s,n)){r+=i,n+=s.length,o=!0;break}if(!o)return 0}return r}function RS(t){if(!/^[ivxlcdmIVXLCDM]+$/.test(t))return!1;let e=Gp(t);return e<=0?!1:(t===t.toLowerCase()?ws(e):yc(e))===t}function DS(t){let e=t.toLowerCase();if(e.length===1)return e.charCodeAt(0)-97+1;if(e.length===2){let n=e.charCodeAt(0)-97,r=e.charCodeAt(1)-97;return(n+1)*26+r+1}return 0}function bs(t){if(t<=26)return ys[t-1];let e=Math.floor((t-1)/26)-1,n=(t-1)%26;return e<0?ys[n]:ys[e]+ys[n]}function xs(t){if(!(!t||/^\d+$/.test(t))){if(RS(t))return t===t.toLowerCase()?"i":"I";if(/^[a-z]{1,2}$/.test(t))return"a";if(/^[A-Z]{1,2}$/.test(t))return"A"}}function bc(t){if(/^\d+$/.test(t))return parseInt(t,10);let e=xs(t);if(e==="i"||e==="I")return Gp(t);if(e==="a"||e==="A"){let r=DS(t);return r>0?r:1}let n=parseInt(t,10);return Number.isNaN(n)?1:n}function LS(t,e){if(t==="numeric")return String(e);switch(t){case"a":return bs(e);case"A":return bs(e).toUpperCase();case"i":return ws(e);case"I":return yc(e);default:return String(e)}}function IS(t){var e;if(t.length===0)return!1;let n=(e=xs(t[0]))!==null&&e!==void 0?e:"numeric",r=bc(t[0]);if(r<1)return!1;for(let o=0;o<t.length;o++){let i=LS(n,r+o);if(t[o]!==i)return!1}return!0}function PS(t){return{type:xs(t),start:bc(t)}}function $S(t){let{type:e,start:n}=PS(t),r={};return e&&(r.type=e),n!==1&&(r.start=n),r}function BS(t,e,n=". "){let r=e+1;if(!t||t==="1")return`${r}${n}`;switch(t){case"a":return`${bs(r)}${n}`;case"A":return`${bs(r).toUpperCase()}${n}`;case"i":return`${ws(r)}${n}`;case"I":return`${yc(r)}${n}`;default:return`${r}${n}`}}function zS(t){var e,n;let r=(e=t.tokens)===null||e===void 0?void 0:e[0];return!!(t.text&&((n=t.tokens)===null||n===void 0?void 0:n.length)===1&&r?.type==="list"&&r.ordered&&r.raw===t.text)}function HS(t,e){return e.tokenizeInline?e.parseInline(e.tokenizeInline(t)):e.parseInline([{type:"text",raw:t,text:t}])}var wc=j.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:t}){return["li",D(this.options.HTMLAttributes,t),0]},markdownTokenName:"list_item",parseMarkdown:(t,e)=>{var n;if(t.type!=="list_item")return[];let r=(n=e.parseBlockChildren)!==null&&n!==void 0?n:e.parseChildren,o=[];if(t.tokens&&t.tokens.length>0){if(zS(t))return{type:"listItem",content:[{type:"paragraph",content:HS(t.text||"",e)}]};if(t.tokens.some(i=>i.type==="paragraph"))o=r(t.tokens);else{let i=t.tokens[0];if(i&&i.type==="text"&&i.tokens&&i.tokens.length>0){if(o=[{type:"paragraph",content:e.parseInline(i.tokens)}],t.tokens.length>1){let s=r(t.tokens.slice(1));o.push
Line truncated
|
||||||
|
`).trim(),contentLines:p,raw:m.join(`
|
||||||
|
`)}),r=g,n=g}return[e,r]}var YS=new RegExp(`^(${Jp})([.)])\\s+(.+)$`);function QS(t){let e=t.split(`
|
||||||
|
`).filter(r=>r.trim().length>0);if(e.length===0)return null;let n=[];for(let r of e){let o=r.trim().match(YS);if(!o)return null;n.push({marker:o[1],content:o[3]})}return IS(n.map(r=>r.marker))?{type:"orderedList",attrs:$S(n[0].marker),content:n.map(r=>({type:"listItem",content:[{type:"paragraph",content:[{type:"text",text:r.content}]}]}))}:null}function Yp(t,e,n){let r=[],o=0;for(;o<t.length;){let i=t[o];if(i.indent===e){let{paragraphLines:s,blockLines:l}=GS(i.contentLines),a=s.join(`
|
||||||
|
`).trim(),c=[];a&&c.push({type:"paragraph",raw:a,tokens:n.inlineTokens(a)});let d=l.join(`
|
||||||
|
`).trim();if(d){let h=n.blockTokens(d);c.push(...h)}let u=o+1,f=[];for(;u<t.length&&t[u].indent>e;)f.push(t[u]),u+=1;if(f.length>0){let h=Yp(f,Math.min(...f.map(p=>p.indent)),n);c.push({type:"list",ordered:!0,start:f[0].number,typeMarker:f[0].type,items:h,raw:f.map(p=>p.raw).join(`
|
||||||
|
`)})}r.push({type:"list_item",raw:i.raw,tokens:c}),o=u}else o+=1}return r}function ZS(t,e){return t.map(n=>{if(n.type!=="list_item")return e.parseChildren([n])[0];let r=[];return n.tokens&&n.tokens.length>0&&n.tokens.forEach(o=>{if(o.type==="paragraph"||o.type==="list"||o.type==="blockquote"||o.type==="code")r.push(...e.parseChildren([o]));else if(o.type==="text"&&o.tokens){let i=e.parseChildren([o]);r.push({type:"paragraph",content:i})}else{let i=e.parseChildren([o]);i.length>0&&r.push(...i)}}),{type:"listItem",content:r}})}var e1="listItem",jp="textStyle",_p=/^(\d+)\.\s$/;function Up(t){let e=t.match(/list-style-type\s*:\s*([^;]+)/i);if(!e)return null;switch(e[1].trim().toLowerCase()){case"upper-roman":return"I";case"lower-roman":return"i";case"upper-alpha":case"upper-latin":return"A";case"lower-alpha":case"lower-latin":return"a";default:return null}}var kc=j.create({name:"orderedList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes(){return{start:{default:1,parseHTML:t=>t.hasAttribute("start")?parseInt(t.getAttribute("start")||"",10):1},type:{default:null,parseHTML:t=>{let e=t.getAttribute("type");if(e)return e;let n=t.getAttribute("style");if(n){let o=Up(n);if(o)return o}let r=t.querySelector("li");if(r){let o=r.getAttribute("style");if(o){let i=Up(o);if(i)return i}}return null}}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:t}){let{start:e,type:n,...r}=t,o=D(this.options.HTMLAttributes,r);return e!==1&&(o.start=e),n&&n!=="1"&&(o.type=n),["ol",o,0]},markdownTokenName:"list",parseMarkdown:(t,e)=>{if(t.type!=="list"||!t.ordered)return[];let n=t.start||1,r=t.typeMarker,o=t.items?ZS(t.items,e):[],i={};return n!==1&&(i.start=n),r&&(i.type=r),Object.keys(i).length>0?{type:"orderedList",attrs:i,content:o}:{type:"orderedList",content:o}},renderMarkdown:(t,e)=>t.content?e.renderChildren(t.content,`
|
||||||
|
`):"",markdownTokenizer:{name:"orderedList",level:"block",start:()=>-1,tokenize:(t,e,n)=>{var r,o;let i=t.split(`
|
||||||
|
`),[s,l]=XS(i);if(s.length===0)return;let a=Yp(s,s[0].indent,n);if(a.length!==0)return{type:"list",ordered:!0,start:((r=s[0])===null||r===void 0?void 0:r.number)||1,typeMarker:(o=s[0])===null||o===void 0?void 0:o.type,items:a,raw:i.slice(0,l).join(`
|
||||||
|
`)}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleOrderedList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(e1,this.editor.getAttributes(jp)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addProseMirrorPlugins(){return[new F({props:{handlePaste:(t,e)=>{var n,r;let o=(n=e.clipboardData)===null||n===void 0?void 0:n.getData("text/html");if(o?.trim())return!1;let i=(r=e.clipboardData)===null||r===void 0?void 0:r.getData("text/plain");if(!i)return!1;let s=QS(i);if(!s)return!1;try{let l=t.state.schema.nodeFromJSON(s),a=t.state.tr.replaceSelectionWith(l);return t.dispatch(a),!0}catch{return!1}}}})]},addInputRules(){let t=(n,r)=>(!r.attrs.type||r.attrs.type==="1")&&r.childCount+r.attrs.start===+n[1],e=Vt({find:_p,type:this.type,getAttributes:n=>({start:+n[1]}),joinPredicate:t});return(this.options.keepMarks||this.options.keepAttributes)&&(e=Vt({find:_p,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:n=>({start:+n[1],...this.editor.getAttributes(jp)}),joinPredicate:t,editor:this.editor})),[e]}}),t1=/^\s*(\[([( |x])?\])\s$/,n1="position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0",r1=(t,e,n)=>{var r;return(n==null||(r=n.checkboxLabel)===null||r===void 0?void 0:r.call(n,t,e))||`Task item checkbox for ${t.textContent||"empty task item"}`},o1=j.create({name:"taskItem",addOptions(){return{nested:!1,HTMLAttributes:{},taskListTypeName:"taskList",a11y:void 0}},content(){return this.options.nested?"paragraph block*":"paragraph+"},defining:!0,addAttributes(){return{checked:{default:!1,keepOnSplit:!1,parseHTML:t=>{let e=t.getAttribute("data-checked");return e===""||e==="true"},renderHTML:t=>({"data-checked":t.checked})}}},parseHTML(){return[{tag:`li[data-type="${this.name}"]`,priority:51,contentElement:t=>{var e;return(e=t.querySelector("div"))!==null&&e!==void 0?e:t}}]},renderHTML({node:t,HTMLAttributes:e}){return["li",D(this.options.HTMLAttributes,e,{"data-type":this.name}),["label",["input",{type:"checkbox",checked:t.attrs.checked?"checked":null}],["span"]],["div",0]]},parseMarkdown:(t,e)=>{let n=[];if(t.tokens&&t.tokens.length>0?n.push(e.createNode("paragraph",{},e.parseInline(t.tokens))):t.text?n.push(e.createNode("paragraph",{},[e.createNode("text",{text:t.text})])):n.push(e.createNode("paragraph",{},[])),t.nestedTokens&&t.nestedTokens.length>0){let r=e.parseChildren(t.nestedTokens);n.push(...r)}return e.createNode("taskItem",{checked:t.checked||!1},n)},renderMarkdown:(t,e)=>{var n;let r=`- [${!((n=t.attrs)===null||n===void 0)&&n.checked?"x":" "}] `;return po(t,e,r)},addExtensions(){return this.options.nested?[Kp(this.name,[this.options.taskListTypeName])]:[]},addKeyboardShortcuts(){let t={Enter:()=>this.editor.commands.splitListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)};return this.options.nested?{...t,Tab:()=>this.editor.commands.sinkListItem(this.name)}:t},addNodeView(){return({node:t,HTMLAttributes:e,getPos:n,editor:r})=>{let o=document.createElement("li"),i=document.createElement("label"),s=document.createElement("span"),l=document.createElement("input"),a=document.createElement("div");s.style.cssText=n1;let c=u=>{let f=r1(u,u.attrs.checked,this.options.a11y);l.setAttribute("aria-label",f),s.textContent=f};c(t),i.contentEditable="false",l.type="checkbox",l.addEventListener("mousedown",u=>u.preventDefault()),l.addEventListener("change",u=>{if(!r.isEditable&&!this.options.onReadOnlyChecked){l.checked=!l.checked;return}let{checked:f}=u.target;r.isEditable&&typeof n=="function"&&r.chain().focus(void 0,{scrollIntoView:!1}).command(({tr:h})=>{let p=n();if(typeof p!="number")return!1;let g=h.doc.nodeAt(p);return h.setNodeMarkup(p,void 0,{...g?.attrs,checked:f}),!0}).run(),!r.isEditable&&this.options.onReadOnlyChecked&&(this.options.onReadOnlyChecked(t,f)||(l.checked=!l.checked))}),Object.entries(this.options.HTMLAttributes).forEach(([u,f])=>{o.setAttribute(u,f)}),o.dataset.checked=t.attrs.checked,l.checked=t.attrs.checked,i.append(l,s),o.append(i,a),Object.entries(e).forEach(([u,f])=>{o.setAttribute(u,f)});let d=new Set(Object.keys(e));return{dom:o,contentDOM:a,update:u=>{if(u.type!==this.type)return!1;o.dataset.checked=u.attrs.checked,l.checked=u.attrs.checked,c(u);let f=r.extensionManager.attributes,h=zt(u,f),p=new Set(Object.keys(h)),g=this.options.HTMLAttributes;return d.forEach(m=>{p.has(m)||(m in g?o.setAttribute(m,g[m]):o.removeAttribute(m))}),Object.entries(h).forEach(([m,y])=>{y==null?m in g?o.setAttribute(m,g[m]):o.removeAttribute(m):o.setAttribute(m,y)}),d=p,!0}}}},addInputRules(){return[Vt({find:t1,type:this.type,getAttributes:t=>({checked:t[t.length-1]==="x"})})]}}),i1=j.create({name:"taskList",addOptions()
Line truncated
|
||||||
|
`):"",markdownTokenizer:{name:"taskList",level:"block",start(t){var e;let n=(e=t.match(/^\s*[-+*]\s+\[([ xX])\]\s+/))===null||e===void 0?void 0:e.index;return n!==void 0?n:-1},tokenize(t,e,n){let r=i=>{let s=ho(i,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:l=>({indentLevel:l[1].length,mainContent:l[4],checked:l[3].toLowerCase()==="x"}),createToken:(l,a)=>({type:"taskItem",raw:"",mainContent:l.mainContent,indentLevel:l.indentLevel,checked:l.checked,text:l.mainContent,tokens:n.inlineTokens(l.mainContent),nestedTokens:a}),customNestedParser:r},n);if(s){let l={type:"taskList",raw:s.raw,items:s.items},a=i.slice(s.raw.length);return a.trim()?[l,...n.blockTokens(a)]:[l]}return n.blockTokens(i)},o=ho(t,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:i=>({indentLevel:i[1].length,mainContent:i[4],checked:i[3].toLowerCase()==="x"}),createToken:(i,s)=>({type:"taskItem",raw:"",mainContent:i.mainContent,indentLevel:i.indentLevel,checked:i.checked,text:i.mainContent,tokens:n.inlineTokens(i.mainContent),nestedTokens:s}),customNestedParser:r},n);if(o)return{type:"taskList",raw:o.raw,items:o.items}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleTaskList:()=>({commands:t})=>t.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}}),nA=Z.create({name:"listKit",addExtensions(){let t=[];return this.options.bulletList!==!1&&t.push(gc.configure(this.options.bulletList)),this.options.listItem!==!1&&t.push(wc.configure(this.options.listItem)),this.options.listKeymap!==!1&&t.push(_S.configure(this.options.listKeymap)),this.options.orderedList!==!1&&t.push(kc.configure(this.options.orderedList)),this.options.taskItem!==!1&&t.push(o1.configure(this.options.taskItem)),this.options.taskList!==!1&&t.push(i1.configure(this.options.taskList)),t}});var Qp=(t,e,n={})=>{t?.dispatchEvent(new CustomEvent(e,{composed:!0,cancelable:!0,detail:n}))},Sc=({files:t,acceptedTypes:e,acceptedTypesValidationMessage:n,maxSize:r,maxSizeValidationMessage:o})=>{for(let i of t){if(e&&!e.includes(i.type))return n;if(r&&i.size>+r*1024)return o}return null},s1=()=>("10000000-1000-4000-8000"+-1e11).replace(/[018]/g,t=>(t^crypto.getRandomValues(new Uint8Array(1))[0]&15>>t/4).toString(16)),l1=({editor:t,acceptedTypes:e,acceptedTypesValidationMessage:n,get$WireUsing:r,key:o,maxSize:i,maxSizeValidationMessage:s,statePath:l,uploadingMessage:a})=>{let c=new Set,d,u=!1;t.on("destroy",()=>{u=!0,c.forEach(m=>m())});let f=m=>r().callSchemaComponentMethod(o,"getUploadedFileAttachmentTemporaryUrl",{attachment:m}),h=m=>{let y=m.dom.closest("form");c.size||(d=t.isEditable);let x=()=>{c.delete(x)&&(!u&&!c.size&&(t.setEditable(d),m.dom.dispatchEvent(new CustomEvent("rich-editor-uploaded-file",{bubbles:!0,detail:{key:o,livewireId:r().id}}))),Qp(y,"form-processing-finished"))};return c.add(x),t.setEditable(!1),Qp(y,"form-processing-started",{message:a}),m.dom.dispatchEvent(new CustomEvent("rich-editor-uploading-file",{bubbles:!0,detail:{key:o,livewireId:r().id}})),{finish:x,isCurrent:()=>!u&&c.has(x)}},p=(m,y)=>new Promise(x=>{let b=s1();r().upload(`componentFileAttachments.${l}.${b}`,m,async()=>{if(!y.isCurrent()){x(null);return}try{let w=await f(b);x(w?{id:b,src:w}:null)}catch{x(null)}},()=>x(null),()=>{},()=>x(null))}).catch(()=>null),g=async(m,y,x)=>{let b=h(m);try{(await Promise.allSettled(y.map(async k=>{let C=await p(k,b);!C||!b.isCurrent()||t.chain().insertContentAt(x(),{type:"image",attrs:C}).run()}))).forEach(k=>{k.status==="rejected"&&console.error("Failed to insert uploaded file attachment",k.reason)})}finally{b.finish()}};return new F({key:new _("localFiles"),props:{handleDrop(m,y){if(!y.dataTransfer?.files.length)return!1;let x=Array.from(y.dataTransfer.files),b=Sc({files:x,acceptedTypes:e,acceptedTypesValidationMessage:n,maxSize:i,maxSizeValidationMessage:s});if(b)return m.dom.dispatchEvent(new CustomEvent("rich-editor-file-validation-message",{bubbles:!0,detail:{key:o,livewireId:r().id,validationMessage:b}})),!1;if(!x.length)return!1;y.preventDefault(),y.stopPropagation();let w=m.posAtCoords({left:y.clientX,top:y.clientY});return g(m,x,()=>w?.pos??0),!0},handlePaste(m,y){let x=y.clipboardData?.files?.length?Array.from(y.clipboardData.files):[],b=y.clipboardData?.getData("text")?.length>0,w=y.clipboardData?.getData("text/html")||"";if(x.length&&!b){let k=Sc({files:x,acceptedTypes:e,acceptedTypesValidationMessage:n,maxSize:i,maxSizeValidationMessage:s});return k?(m.dom.dispatchEvent(new CustomEvent("rich-editor-file-validation-message",{bubbles:!0,detail:{key:o,livewireId:r().id,validationMessage:k}})),!1):(y.preventDefault(),y.stopPropagation(),g(m,x,()=>t.state.selection.anchor),!0)}if(w){let C=new DOMParser().parseFromString(w,"text/html"),S=C.querySelectorAll("img[src]");if(S.length){y.stopPropagation();let{from:O,to:R}=t.state.selection,A=h(m);return(async()=>{try{for(let z of S){if(!A.isCurrent())return;let $=z.getAttribu
Line truncated
|
||||||
|
`);return/\s/.test(r)}):!1}function B1(t){return()=>{let e=t.state.selection.$anchor.pos,{top:n,right:r,bottom:o,left:i}=t.view.coordsAtPos(e);try{return new DOMRect(i,n,r-i,o-n)}catch{return null}}}function z1(t,e,n,r){return n?()=>{let o=r.getState(t.state),i=o?.decorationId,s=e.dom.querySelector(`[data-decoration-id="${i}"]`);return s?.getBoundingClientRect()||null}:B1(t)}function H1({match:t,dismissedRange:e,state:n,transaction:r,editor:o,shouldResetDismissed:i,effectiveAllowSpaces:s}){return i?.({editor:o,state:n,range:e,match:t,transaction:r,allowSpaces:s})?!1:s?t.range.from===e.from:t.range.from===e.from&&!$1(r)}function F1({view:t,pluginKeyRef:e}){let n=t.state.tr.setMeta(e,{exit:!0});t.dispatch(n)}function V1({pluginKey:t,decorationTag:e,decorationClass:n,decorationContent:r,decorationEmptyClass:o,renderer:i,dispatchExit:s}){return{handleKeyDown(l,a){var c;let d=t.getState(l.state);if(!d.active)return!1;if(a.key==="Escape"||a.key==="Esc"){var u;return i==null||(u=i.onKeyDown)===null||u===void 0||u.call(i,{view:l,event:a,range:d.range}),s(l),!0}return(i==null||(c=i.onKeyDown)===null||c===void 0?void 0:c.call(i,{view:l,event:a,range:d.range}))||!1},decorations(l){let{active:a,range:c,decorationId:d,query:u}=t.getState(l);if(!a)return null;let f=!u?.length,h=[n];return f&&h.push(o),Y.create(l.doc,[ie.inline(c.from,c.to,{nodeName:e,class:h.join(" "),"data-decoration-id":d||void 0,"data-decoration-content":r})])}}}function W1({editor:t,char:e,effectiveAllowSpaces:n,allowToIncludeChar:r,allowedPrefixes:o,startOfLine:i,findSuggestionMatch:s,allow:l,shouldShow:a,shouldKeepDismissed:c,pluginKey:d}){return{init(){return{active:!1,range:{from:0,to:0},query:null,text:null,composing:!1,dismissedRange:null}},apply(u,f,h,p){let{isEditable:g}=t,{composing:m}=t.view,{selection:y}=u,{empty:x,from:b}=y,w={...f},k=u.getMeta(d);if(k&&k.exit)return w.active=!1,w.decorationId=null,w.range={from:0,to:0},w.query=null,w.text=null,w.dismissedRange=f.active?{...f.range}:f.dismissedRange,w;if(w.composing=m,u.docChanged&&w.dismissedRange!==null&&(w.dismissedRange={from:u.mapping.map(w.dismissedRange.from),to:u.mapping.map(w.dismissedRange.to)}),g&&(x||t.view.composing)){(b<f.range.from||b>f.range.to)&&!m&&!f.composing&&(w.active=!1);let C=s({char:e,allowSpaces:n,allowToIncludeChar:r,allowedPrefixes:o,startOfLine:i,$position:y.$from}),S=`id_${Math.floor(Math.random()*4294967295)}`;C&&l({editor:t,state:p,range:C.range,isActive:f.active})&&(!a||a({editor:t,range:C.range,query:C.query,text:C.text,transaction:u}))?(w.dismissedRange!==null&&!c({match:C,dismissedRange:w.dismissedRange,state:p,transaction:u})&&(w.dismissedRange=null),w.dismissedRange===null?(w.active=!0,w.decorationId=f.decorationId||S,w.range=C.range,w.query=C.query,w.text=C.text):w.active=!1):(C||(w.dismissedRange=null),w.active=!1)}else w.active=!1;return w.active||(w.decorationId=null,w.range={from:0,to:0},w.query=null,w.text=null),w}}}function j1({editor:t,items:e}){let n=null,r=null,o=null,i=()=>{r!==null&&(clearTimeout(r),r=null),o?.(),o=null},s=c=>new Promise(d=>{o=d,r=setTimeout(()=>{r=null;let u=o;o=null,u?.()},c)}),l=()=>{n?.abort(),i(),n=null};return{abort:l,fetch:async(c,d)=>{l(),n=new AbortController;let u=n;if(d>0&&await s(d),n!==u||u.signal.aborted)return{status:"aborted"};try{let f=await e({editor:t,query:c,signal:u.signal});return n!==u||u.signal.aborted?{status:"aborted"}:{status:"resolved",items:f}}catch{return n!==u||u.signal.aborted?{status:"aborted"}:{status:"error"}}}}}function _1({placement:t,offset:e,flip:n,floatingUi:r}){var o,i,s,l;let a=[Ns({mainAxis:(o=e.mainAxis)!==null&&o!==void 0?o:4,crossAxis:(i=e.crossAxis)!==null&&i!==void 0?i:0})];return n&&a.push(Ar()),!(r==null||(s=r.middleware)===null||s===void 0)&&s.length&&a.push(...r.middleware),{placement:t,strategy:(l=r?.strategy)!==null&&l!==void 0?l:"absolute",middleware:a}}function U1(t){if(t instanceof HTMLElement)return t;if(typeof t=="string")try{let e=document.querySelector(t);if(e)return e}catch{return document.body}return document.body}function K1({getReferenceRect:t,contextElement:e,config:n,container:r,dismissOnOutsideClick:o,dismiss:i}){return(s,l={})=>{let a={getBoundingClientRect:()=>{var p;return(p=t())!==null&&p!==void 0?p:new DOMRect},contextElement:e},c=!1,d=!s.isConnected;d&&U1(r).appendChild(s),l.onPosition||(s.style.visibility="hidden",s.style.width="max-content");let f=Lm(a,s,()=>{Er(a,s,{placement:n.placement,strategy:n.strategy,middleware:n.middleware}).then(({x:p,y:g,placement:m,strategy:y})=>{if(l.onPosition){l.onPosition({x:p,y:g,placement:m,strategy:y});return}Object.assign(s.style,{position:y,left:`${p}px`,top:`${g}px`}),c||(c=!0,s.style.visibility="")})},l.autoUpdate),h;return o&&(h=p=>{let g=p.target;!(g instanceof Node)||s.contains(g)||e.contains(g)||i()},document.addEventListener("pointerdown",h,!0)),()=>{f(),h&&document.removeEventListener("pointerdown",h,!0),d&&s.remove()}}}function q1({editor:t,pluginKey:e,items:n,renderer:r,minQueryLength:o,debounce:i,in
Line truncated
|
||||||
|
`).map(e=>!e.includes("|")||!e.includes("`")?e:nv(e)).join(`
|
||||||
|
`)}function ov(t){return(t||"").replace(/\s+/g," ").trim()}function iv(t,e,n={}){var r;let o=(r=n.cellLineSeparator)!==null&&r!==void 0?r:"";if(!t||!t.content||t.content.length===0)return"";let i=[];t.content.forEach(p=>{let g=[];p.content&&p.content.forEach(m=>{let y="";m.content&&Array.isArray(m.content)&&m.content.length>1?y=m.content.map(k=>e.renderChildren(k)).join(o):y=m.content?e.renderChildren(m.content):"";let x=ov(y.split(o).join(`
|
||||||
|
`).replace(/[ \t]*\r?\n[ \t]*/g,"<br>")),b=m.type==="tableHeader",w=UC(m.attrs);g.push({text:x,isHeader:b,align:w})}),i.push(g)});let s=i.reduce((p,g)=>Math.max(p,g.length),0);if(s===0)return"";let l=Array.from({length:s}).fill(0);i.forEach(p=>{for(let m=0;m<s;m+=1){var g;let y=(((g=p[m])===null||g===void 0?void 0:g.text)||"").length;y>l[m]&&(l[m]=y),l[m]<3&&(l[m]=3)}});let a=(p,g)=>p+" ".repeat(Math.max(0,g-p.length)),c=i[0],d=c.some(p=>p.isHeader),u=Array.from({length:s}).fill(null);i.forEach(p=>{for(let m=0;m<s;m+=1){var g;!u[m]&&(!((g=p[m])===null||g===void 0)&&g.align)&&(u[m]=p[m].align)}});let f=`
|
||||||
|
`,h=Array.from({length:s}).map((p,g)=>d&&c[g]&&c[g].text||"");return f+=`| ${h.map((p,g)=>a(p,l[g])).join(" | ")} |
|
||||||
|
`,f+=`| ${l.map((p,g)=>{let m=Math.max(3,p),y=u[g];return y==="left"?`:${"-".repeat(m)}`:y==="right"?`${"-".repeat(m)}:`:y==="center"?`:${"-".repeat(m)}:`:"-".repeat(m)}).join(" | ")} |
|
||||||
|
`,(d?i.slice(1):i).forEach(p=>{f+=`| ${Array.from({length:s}).fill(0).map((g,m)=>a(p[m]&&p[m].text||"",l[m])).join(" | ")} |
|
||||||
|
`}),f}var sv=j.create({name:"table",addOptions(){return{HTMLAttributes:{},resizable:!1,renderWrapper:!1,handleWidth:5,cellMinWidth:25,View:YC,lastColumnResizable:!0,allowTableNodeSelection:!1}},content:"tableRow+",tableRole:"table",isolating:!0,group:"block",parseHTML(){return[{tag:"table"}]},renderHTML({node:t,HTMLAttributes:e}){let{colgroup:n,tableWidth:r,tableMinWidth:o}=QC(t,this.options.cellMinWidth),i=e.style;function s(){return i||(r?`width: ${r}`:`min-width: ${o}`)}let l=["table",D(this.options.HTMLAttributes,e,{style:s()}),n,["tbody",0]];return this.options.renderWrapper?["div",{class:"tableWrapper"},l]:l},parseMarkdown:(t,e)=>{let n=[],r=Array.isArray(t.align)?t.align:[];if(t.header){let o=[];t.header.forEach((i,s)=>{var l;let a=Vs((l=r[s])!==null&&l!==void 0?l:i.align),c=a?{align:a}:{};o.push(e.createNode("tableHeader",c,[{type:"paragraph",content:e.parseInline(i.tokens)}]))}),n.push(e.createNode("tableRow",{},o))}return t.rows&&t.rows.forEach(o=>{let i=[];o.forEach((s,l)=>{var a;let c=Vs((a=r[l])!==null&&a!==void 0?a:s.align),d=c?{align:c}:{};i.push(e.createNode("tableCell",d,[{type:"paragraph",content:e.parseInline(s.tokens)}]))}),n.push(e.createNode("tableRow",{},i))}),e.createNode("table",void 0,n)},renderMarkdown:(t,e)=>iv(t,e),markdownTokenizer:{name:"table",level:"block",start:t=>{let e=t.split(`
|
||||||
|
`);if(e.length<2)return-1;let n=e[1];return!/^[ \t|:]*-[ \t|:-]*$/.test(n)||!n.includes("|")?-1:e[0].includes("|")?0:-1},tokenize(t,e,n){let r=t.indexOf(`
|
||||||
|
|
||||||
|
`),o=r>=0?t.slice(0,r):t,i=o.split(`
|
||||||
|
`);if(i.length<2)return;let s=i[1];if(!/^[ \t|:]*-[ \t|:-]*$/.test(s)||!s.includes("|"))return;let l=rv(o);if(l===o)return;let a=n.blockTokens(l)[0];if(a?.type!=="table"||!a.raw)return;let c=a.raw.split(`
|
||||||
|
`).length,d=t.split(`
|
||||||
|
`).slice(0,c).join(`
|
||||||
|
`);return{...a,raw:d}}},addCommands(){return{insertTable:({rows:t=3,cols:e=3,withHeaderRow:n=!0}={})=>({tr:r,dispatch:o,editor:i})=>{let s=ev(i.schema,t,e,n);if(o){let l=r.selection.from+1;r.replaceSelectionWith(s).scrollIntoView().setSelection(N.near(r.doc.resolve(l)))}return!0},addColumnBefore:()=>({state:t,dispatch:e})=>ag(t,e),addColumnAfter:()=>({state:t,dispatch:e})=>cg(t,e),deleteColumn:()=>({state:t,dispatch:e})=>{let n=dt(t.selection.$from,r=>r.type.name==="table");return dg(t,e&&(r=>{n&&vg(r,n.pos),e(r)}))},addRowBefore:()=>({state:t,dispatch:e})=>fg(t,e),addRowAfter:()=>({state:t,dispatch:e})=>hg(t,e),deleteRow:()=>({state:t,dispatch:e})=>{let n=dt(t.selection.$from,r=>r.type.name==="table");return pg(t,e&&(r=>{n&&vg(r,n.pos),e(r)}))},deleteTable:()=>({state:t,dispatch:e})=>yg(t,e),mergeCells:()=>({state:t,dispatch:e})=>Fc(t,e),splitCell:()=>({state:t,dispatch:e})=>Vc(t,e),toggleHeaderColumn:()=>({state:t,dispatch:e})=>Or("column")(t,e),toggleHeaderRow:()=>({state:t,dispatch:e})=>Or("row")(t,e),toggleHeaderCell:()=>({state:t,dispatch:e})=>gg(t,e),mergeOrSplit:()=>({state:t,dispatch:e})=>Fc(t,e)?!0:Vc(t,e),setCellAttribute:(t,e)=>({state:n,dispatch:r})=>mg(t,e)(n,r),goToNextCell:()=>({state:t,dispatch:e})=>Wc(1)(t,e),goToPreviousCell:()=>({state:t,dispatch:e})=>Wc(-1)(t,e),fixTables:()=>({state:t,dispatch:e})=>(e&&Hc(t),!0),setCellSelection:t=>({tr:e,dispatch:n})=>{if(n){let r=te.create(e.doc,t.anchorCell,t.headCell);e.setSelection(r)}return!0}}},addKeyboardShortcuts(){return{Tab:()=>this.editor.commands.goToNextCell()?!0:this.editor.can().addRowAfter()?this.editor.chain().addRowAfter().goToNextCell().run():!1,"Shift-Tab":()=>this.editor.commands.goToPreviousCell(),Backspace:Fs,"Mod-Backspace":Fs,Delete:Fs,"Mod-Delete":Fs}},addProseMirrorPlugins(){return[...this.options.resizable&&this.editor.isEditable?[wg({handleWidth:this.options.handleWidth,cellMinWidth:this.options.cellMinWidth,defaultCellMinWidth:this.options.cellMinWidth,View:this.options.View,lastColumnResizable:this.options.lastColumnResizable})]:[],kg({allowTableNodeSelection:this.options.allowTableNodeSelection})]},addNodeView(){let t=this.options.resizable&&this.editor.isEditable,e=this.options.View;return t||!e?null:({node:n,view:r,HTMLAttributes:o})=>{let i=D(this.options.HTMLAttributes,o);return new e(n,this.options.cellMinWidth,r,i)}},extendNodeSchema(t){let e={name:t.name,options:t.options,storage:t.storage};return{tableRole:G(P(t,"tableRole",e))}}}),Og=Z.create({name:"tableKit",addExtensions(){let t=[];return this.options.table!==!1&&t.push(sv.configure(this.options.table)),this.options.tableCell!==!1&&t.push(JC.configure(this.options.tableCell)),this.options.tableHeader!==!1&&t.push(GC.configure(this.options.tableHeader)),this.options.tableRow!==!1&&t.push(XC.configure(this.options.tableRow)),t}});var lv=j.create({name:"text",group:"inline",parseMarkdown:t=>({type:"text",text:t.text||""}),renderMarkdown:t=>t.text||""}),Ng=lv;var av=Z.create({name:"textAlign",addOptions(){return{types:[],alignments:["left","center","right","justify"],defaultAlignment:null}},addGlobalAttributes(){return[{types:this.options.types,attributes:{textAlign:{default:this.options.defaultAlignment,parseHTML:t=>{let e=t.style.textAlign;return this.options.alignments.includes(e)?e:this.options.defaultAlignment},renderHTML:t=>t.textAlign?{style:`text-align: ${t.textAlign}`}:{}}}}]},addCommands(){return{setTextAlign:t=>({commands:e})=>this.options.alignments.includes(t)?this.options.types.map(n=>e.updateAttributes(n,{textAlign:t})).some(n=>n):!1,unsetTextAlign:()=>({commands:t})=>this.options.types.map(e=>t.resetAttributes(e,"textAlign")).some(e=>e),toggleTextAlign:t=>({editor:e,commands:n})=>this.options.alignments.includes(t)?e.isActive({textAlign:t})?n.unsetTextAlign():n.setTextAlign(t):!1}},addKeyboardShortcuts(){return{"Mod-Shift-l":()=>this.editor.commands.setTextAlign("left"),"Mod-Shift-e":()=>this.editor.commands.setTextAlign("center"),"Mod-Shift-r":()=>this.editor.commands.setTextAlign("right"),"Mod-Shift-j":()=>this.editor.commands.setTextAlign("justify")}}}),Rg=av;var cv=le.create({name:"underline",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:t=>t.includes("underline")?{}:!1}]},renderHTML({HTMLAttributes:t}){return["u",D(this.options.HTMLAttributes,t),0]},parseMarkdown(t,e){return e.applyMark(this.name||"underline",e.parseInline(t.tokens||[]))},renderMarkdown(t,e){return`++${e.renderChildren(t)}++`},markdownTokenizer:{name:"underline",level:"inline",start(t){return t.indexOf("++")},tokenize(t,e,n){let r=/^(\+\+)([\s\S]+?)(\+\+)/.exec(t);if(!r)return;let o=r[2].trim();return{type:"underline",raw:r[0],text:o,tokens:n.inlineTokens(o)}}},addCommands(){return{setUnderline:()=>({commands:t})=>t.setMark(this.name),toggleUnderline:()=>({commands:t})=>t.toggleMark(this.name),unsetUnderline:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.
Line truncated
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
var Yt=Math.min,yt=Math.max,Kt=Math.round;var ot=n=>({x:n,y:n}),on={left:"right",right:"left",bottom:"top",top:"bottom"};function Re(n,t,e){return yt(n,Yt(t,e))}function jt(n,t){return typeof n=="function"?n(t):n}function wt(n){return n.split("-")[0]}function Ut(n){return n.split("-")[1]}function Me(n){return n==="x"?"y":"x"}function _e(n){return n==="y"?"height":"width"}function pt(n){let t=n[0];return t==="t"||t==="b"?"y":"x"}function Pe(n){return Me(pt(n))}function ni(n,t,e){e===void 0&&(e=!1);let i=Ut(n),s=Pe(n),o=_e(s),r=s==="x"?i===(e?"end":"start")?"right":"left":i==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(r=Xt(r)),[r,Xt(r)]}function si(n){let t=Xt(n);return[ce(n),t,ce(t)]}function ce(n){return n.includes("start")?n.replace("start","end"):n.replace("end","start")}var ei=["left","right"],ii=["right","left"],rn=["top","bottom"],an=["bottom","top"];function ln(n,t,e){switch(n){case"top":case"bottom":return e?t?ii:ei:t?ei:ii;case"left":case"right":return t?rn:an;default:return[]}}function oi(n,t,e,i){let s=Ut(n),o=ln(wt(n),e==="start",i);return s&&(o=o.map(r=>r+"-"+s),t&&(o=o.concat(o.map(ce)))),o}function Xt(n){let t=wt(n);return on[t]+n.slice(t.length)}function cn(n){return{top:0,right:0,bottom:0,left:0,...n}}function ri(n){return typeof n!="number"?cn(n):{top:n,right:n,bottom:n,left:n}}function xt(n){let{x:t,y:e,width:i,height:s}=n;return{width:i,height:s,top:e,left:t,right:t+i,bottom:e+s,x:t,y:e}}function ai(n,t,e){let{reference:i,floating:s}=n,o=pt(t),r=Pe(t),a=_e(r),l=wt(t),c=o==="y",h=i.x+i.width/2-s.width/2,u=i.y+i.height/2-s.height/2,p=i[a]/2-s[a]/2,f;switch(l){case"top":f={x:h,y:i.y-s.height};break;case"bottom":f={x:h,y:i.y+i.height};break;case"right":f={x:i.x+i.width,y:u};break;case"left":f={x:i.x-s.width,y:u};break;default:f={x:i.x,y:i.y}}switch(Ut(t)){case"start":f[r]-=p*(e&&c?-1:1);break;case"end":f[r]+=p*(e&&c?-1:1);break}return f}async function li(n,t){var e;t===void 0&&(t={});let{x:i,y:s,platform:o,rects:r,elements:a,strategy:l}=n,{boundary:c="clippingAncestors",rootBoundary:h="viewport",elementContext:u="floating",altBoundary:p=!1,padding:f=0}=jt(t,n),m=ri(f),S=a[p?u==="floating"?"reference":"floating":u],O=xt(await o.getClippingRect({element:(e=await(o.isElement==null?void 0:o.isElement(S)))==null||e?S:S.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:c,rootBoundary:h,strategy:l})),w=u==="floating"?{x:i,y:s,width:r.floating.width,height:r.floating.height}:r.reference,x=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),A=await(o.isElement==null?void 0:o.isElement(x))?await(o.getScale==null?void 0:o.getScale(x))||{x:1,y:1}:{x:1,y:1},M=xt(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:w,offsetParent:x,strategy:l}):w);return{top:(O.top-M.top+m.top)/A.y,bottom:(M.bottom-O.bottom+m.bottom)/A.y,left:(O.left-M.left+m.left)/A.x,right:(M.right-O.right+m.right)/A.x}}var un=50,ci=async(n,t,e)=>{let{placement:i="bottom",strategy:s="absolute",middleware:o=[],platform:r}=e,a=r.detectOverflow?r:{...r,detectOverflow:li},l=await(r.isRTL==null?void 0:r.isRTL(t)),c=await r.getElementRects({reference:n,floating:t,strategy:s}),{x:h,y:u}=ai(c,i,l),p=i,f=0,m={};for(let g=0;g<o.length;g++){let S=o[g];if(!S)continue;let{name:O,fn:w}=S,{x,y:A,data:M,reset:C}=await w({x:h,y:u,initialPlacement:i,placement:p,strategy:s,middlewareData:m,rects:c,platform:a,elements:{reference:n,floating:t}});h=x??h,u=A??u,m[O]={...m[O],...M},C&&f<un&&(f++,typeof C=="object"&&(C.placement&&(p=C.placement),C.rects&&(c=C.rects===!0?await r.getElementRects({reference:n,floating:t,strategy:s}):C.rects),{x:h,y:u}=ai(c,p,l)),g=-1)}return{x:h,y:u,placement:p,strategy:s,middlewareData:m}};var ui=function(n){return n===void 0&&(n={}),{name:"flip",options:n,async fn(t){var e,i;let{placement:s,middlewareData:o,rects:r,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:h=!0,crossAxis:u=!0,fallbackPlacements:p,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:g=!0,...S}=jt(n,t);if((e=o.arrow)!=null&&e.alignmentOffset)return{};let O=wt(s),w=pt(a),x=wt(a)===a,A=await(l.isRTL==null?void 0:l.isRTL(c.floating)),M=p||(x||!g?[Xt(a)]:si(a)),C=m!=="none";!p&&C&&M.push(...oi(a,g,m,A));let q=[a,...M],J=await l.detectOverflow(t,S),I=[],V=((i=o.flip)==null?void 0:i.overflows)||[];if(h&&I.push(J[O]),u){let B=ni(s,r,A);I.push(J[B[0]],J[B[1]])}if(V=[...V,{placement:s,overflows:I}],!I.every(B=>B<=0)){var X,et;let B=(((X=o.flip)==null?void 0:X.index)||0)+1,Q=q[B];if(Q&&(!(u==="alignment"?w!==pt(Q):!1)||V.every(_=>pt(_.placement)===w?_.overflows[0]>0:!0)))return{data:{index:B,overflows:V},reset:{placement:Q}};let k=(et=V.filter($=>$.overflows[0]<=0).sort(($,_)=>$.overflows[1]-_.overflows[1])[0])==null?void 0:et.placement;if(!k)switch(f){case"bestFit":{var W;let $=(W=V.filter(_=>{if(C){let K=pt(_.placement);return K===w||K==="y"}return!0}).map(_=>[_.placement,_Line truncated
|
||||||
|
/*! Bundled license information:
|
||||||
|
|
||||||
|
sortablejs/modular/sortable.esm.js:
|
||||||
|
(**!
|
||||||
|
* Sortable 1.15.7
|
||||||
|
* @author RubaXa <trash@rubaxa.org>
|
||||||
|
* @author owenm <owen23355@gmail.com>
|
||||||
|
* @license MIT
|
||||||
|
*)
|
||||||
|
*/
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
var K;(function(r){r.Range="range",r.Steps="steps",r.Positions="positions",r.Count="count",r.Values="values"})(K||(K={}));var H;(function(r){r[r.None=-1]="None",r[r.NoValue=0]="NoValue",r[r.LargeValue=1]="LargeValue",r[r.SmallValue=2]="SmallValue"})(H||(H={}));function Ce(r){return rt(r)&&typeof r.from=="function"}function rt(r){return typeof r=="object"&&typeof r.to=="function"}function zt(r){r.parentElement.removeChild(r)}function bt(r){return r!=null}function jt(r){r.preventDefault()}function Ae(r){return r.filter(function(t){return this[t]?!1:this[t]=!0},{})}function ye(r,t){return Math.round(r/t)*t}function Pe(r,t){var s=r.getBoundingClientRect(),u=r.ownerDocument,f=u.documentElement,v=qt(u);return/webkit.*Chrome.*Mobile/i.test(navigator.userAgent)&&(v.x=0),t?s.top+v.y-f.clientTop:s.left+v.x-f.clientLeft}function j(r){return typeof r=="number"&&!isNaN(r)&&isFinite(r)}function Rt(r,t,s){s>0&&(L(r,t),setTimeout(function(){et(r,t)},s))}function Nt(r){return Math.max(Math.min(r,100),0)}function it(r){return Array.isArray(r)?r:[r]}function Ve(r){r=String(r);var t=r.split(".");return t.length>1?t[1].length:0}function L(r,t){r.classList&&!/\s/.test(t)?r.classList.add(t):r.className+=" "+t}function et(r,t){r.classList&&!/\s/.test(t)?r.classList.remove(t):r.className=r.className.replace(new RegExp("(^|\\b)"+t.split(" ").join("|")+"(\\b|$)","gi")," ")}function De(r,t){return r.classList?r.classList.contains(t):new RegExp("\\b"+t+"\\b").test(r.className)}function qt(r){var t=window.pageXOffset!==void 0,s=(r.compatMode||"")==="CSS1Compat",u=t?window.pageXOffset:s?r.documentElement.scrollLeft:r.body.scrollLeft,f=t?window.pageYOffset:s?r.documentElement.scrollTop:r.body.scrollTop;return{x:u,y:f}}function ke(){return window.navigator.pointerEnabled?{start:"pointerdown",move:"pointermove",end:"pointerup"}:window.navigator.msPointerEnabled?{start:"MSPointerDown",move:"MSPointerMove",end:"MSPointerUp"}:{start:"mousedown touchstart",move:"mousemove touchmove",end:"mouseup touchend"}}function Ue(){var r=!1;try{var t=Object.defineProperty({},"passive",{get:function(){r=!0}});window.addEventListener("test",null,t)}catch{}return r}function Me(){return window.CSS&&CSS.supports&&CSS.supports("touch-action","none")}function wt(r,t){return 100/(t-r)}function xt(r,t,s){return t*100/(r[s+1]-r[s])}function Oe(r,t){return xt(r,r[0]<0?t+Math.abs(r[0]):t-r[0],0)}function _e(r,t){return t*(r[1]-r[0])/100+r[0]}function J(r,t){for(var s=1;r>=t[s];)s+=1;return s}function Le(r,t,s){if(s>=r.slice(-1)[0])return 100;var u=J(s,r),f=r[u-1],v=r[u],d=t[u-1],w=t[u];return d+Oe([f,v],s)/wt(d,w)}function He(r,t,s){if(s>=100)return r.slice(-1)[0];var u=J(s,t),f=r[u-1],v=r[u],d=t[u-1],w=t[u];return _e([f,v],(s-d)*wt(d,w))}function Fe(r,t,s,u){if(u===100)return u;var f=J(u,r),v=r[f-1],d=r[f];return s?u-v>(d-v)/2?d:v:t[f-1]?r[f-1]+ye(u-r[f-1],t[f-1]):u}var Kt=(function(){function r(t,s,u){this.xPct=[],this.xVal=[],this.xSteps=[],this.xNumSteps=[],this.xHighestCompleteStep=[],this.xSteps=[u||!1],this.xNumSteps=[!1],this.snap=s;var f,v=[];for(Object.keys(t).forEach(function(d){v.push([it(t[d]),d])}),v.sort(function(d,w){return d[0][0]-w[0][0]}),f=0;f<v.length;f++)this.handleEntryPoint(v[f][1],v[f][0]);for(this.xNumSteps=this.xSteps.slice(0),f=0;f<this.xNumSteps.length;f++)this.handleStepPoint(f,this.xNumSteps[f])}return r.prototype.getDistance=function(t){for(var s=[],u=0;u<this.xNumSteps.length-1;u++)s[u]=xt(this.xVal,t,u);return s},r.prototype.getAbsoluteDistance=function(t,s,u){var f=0;if(t<this.xPct[this.xPct.length-1])for(;t>this.xPct[f+1];)f++;else t===this.xPct[this.xPct.length-1]&&(f=this.xPct.length-2);!u&&t===this.xPct[f+1]&&f++,s===null&&(s=[]);var v,d=1,w=s[f],E=0,p=0,V=0,D=0;for(u?v=(t-this.xPct[f])/(this.xPct[f+1]-this.xPct[f]):v=(this.xPct[f+1]-t)/(this.xPct[f+1]-this.xPct[f]);w>0;)E=this.xPct[f+1+D]-this.xPct[f+D],s[f+D]*d+100-v*100>100?(p=E*v,d=(w-100*v)/s[f+D],v=1):(p=s[f+D]*E/100*d,d=0),u?(V=V-p,this.xPct.length+D>=1&&D--):(V=V+p,this.xPct.length-D>=1&&D++),w=s[f+D]*d;return t+V},r.prototype.toStepping=function(t){return t=Le(this.xVal,this.xPct,t),t},r.prototype.fromStepping=function(t){return He(this.xVal,this.xPct,t)},r.prototype.getStep=function(t){return t=Fe(this.xPct,this.xSteps,this.snap,t),t},r.prototype.getDefaultStep=function(t,s,u){var f=J(t,this.xPct);return(t===100||s&&t===this.xPct[f-1])&&(f=Math.max(f-1,1)),(this.xVal[f]-this.xVal[f-1])/u},r.prototype.getNearbySteps=function(t){var s=J(t,this.xPct);return{stepBefore:{startValue:this.xVal[s-2],step:this.xNumSteps[s-2],highestStep:this.xHighestCompleteStep[s-2]},thisStep:{startValue:this.xVal[s-1],step:this.xNumSteps[s-1],highestStep:this.xHighestCompleteStep[s-1]},stepAfter:{startValue:this.xVal[s],step:this.xNumSteps[s],highestStep:this.xHighestCompleteStep[s]}}},r.prototype.countStepDecimals=function(){var t=this.xNumSteps.map(Ve);return Math.max.apply(null,t)},r.prototype.hasNoSize=function(){return this.xVal[0]===this.xVal[this.xVal.length-1]},r.prototype.convert=funLine truncated
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
function r({state:n,splitKeys:i,tagAddedMessage:a,tagRemovedMessage:s}){return{newTag:"",state:n,liveRegionClearTimeout:null,announce(e){let t=this.$refs.liveRegion;t&&(this.liveRegionClearTimeout!==null&&clearTimeout(this.liveRegionClearTimeout),t.textContent=e,this.liveRegionClearTimeout=setTimeout(()=>{t.textContent="",this.liveRegionClearTimeout=null},3e3))},createTag(){if(this.newTag=this.newTag.trim(),this.newTag!==""){if(this.state.includes(this.newTag)){this.newTag="";return}this.state.push(this.newTag),this.announce(a?.replace(":tag",()=>this.newTag)),this.newTag=""}},deleteTag(e){this.state=this.state.filter(t=>t!==e),this.announce(s?.replace(":tag",()=>e))},reorderTags(e){let t=this.state.splice(e.oldIndex,1)[0];this.state.splice(e.newIndex,0,t),this.state=[...this.state]},input:{"x-on:blur":"createTag()","x-model":"newTag","x-on:keydown"(e){["Enter",...i].includes(e.key)&&(e.preventDefault(),e.stopPropagation(),this.createTag())},"x-on:paste"(){this.$nextTick(()=>{if(i.length===0){this.createTag();return}let e=i.map(t=>t.replace(/[/\-\\^$*+?.()|[\]{}]/g,"\\$&")).join("|");this.newTag.split(new RegExp(e,"g")).forEach(t=>{this.newTag=t,this.createTag()})})}}}}export{r as default};
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
function u(){return{isPasswordRevealed:!1,passwordRevealFocusRequest:0,destroy(){this.passwordRevealFocusRequest++},setPasswordRevealed(s){let e=this.$root.querySelector("input.fi-input"),t=++this.passwordRevealFocusRequest,r=e.selectionStart,i=e.selectionEnd,c=e.selectionDirection;this.isPasswordRevealed=s,this.$nextTick(()=>{t===this.passwordRevealFocusRequest&&requestAnimationFrame(()=>{if(t!==this.passwordRevealFocusRequest)return;let a=s?"hidePasswordAction":"showPasswordAction",o=Array.from(this.$root.querySelectorAll(`[x-ref="${a}"]`)).find(n=>n.isConnected&&n.getClientRects().length);o&&(o.focus(),e.setSelectionRange(r,i,c))})})}}}export{u as default};
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
function n({initialHeight:e,shouldAutosize:s,state:i}){return{state:i,resizeObserver:null,wrapperEl:null,init(){this.wrapperEl=this.$el.parentNode,this.setInitialHeight(),s?this.$watch("state",()=>{this.resize()}):this.setUpResizeObserver()},setInitialHeight(){this.$el.scrollHeight<=0||(this.wrapperEl.style.height=e+"rem")},resize(){if(this.$el.scrollHeight<=0)return;let r=this.$el.style.height;this.$el.style.height="0px";let h=this.$el.scrollHeight;this.$el.style.height=r;let l=parseFloat(e)*parseFloat(getComputedStyle(document.documentElement).fontSize),t=Math.max(h,l)+"px";this.wrapperEl.style.height!==t&&(this.wrapperEl.style.height=t)},setUpResizeObserver(){this.resizeObserver=new ResizeObserver(()=>{this.wrapperEl.style.height=this.$el.style.height}),this.resizeObserver.observe(this.$el)},destroy(){this.resizeObserver?.disconnect()}}}export{n as default};
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
function l({state:r,stateBindingModifiers:e}){let t=!1,o,n=e.includes("blur"),u=e.some(s=>["live","lazy","change"].includes(s)),c=e.includes("debounce"),i=String(e[e.indexOf("debounce")+1]??250),b=i.endsWith("s")&&!i.endsWith("ms")?Number.parseFloat(i)*1e3:Number.parseFloat(i);return{state:r,submissionLocked:!1,submissionLockObserver:null,init(){this.submissionLocked=this.$refs.submissionLock.disabled,this.submissionLockObserver=new MutationObserver(()=>{this.submissionLocked=this.$refs.submissionLock.disabled}),this.submissionLockObserver.observe(this.$refs.submissionLock,{attributes:!0,attributeFilter:["disabled"]})},isSelected(s){return["string","number"].includes(typeof this.state)&&String(this.state)===s},select(s){this.$refs.submissionLock.disabled||(this.state=this.isSelected(s)?null:s,u&&!n&&this.$nextTick(()=>{t||(c?(clearTimeout(o),o=setTimeout(()=>{t||this.$wire.$commit()},b)):this.$wire.$commit())}))},blur(){n&&this.$wire.$commit()},destroy(){t=!0,clearTimeout(o),this.submissionLockObserver?.disconnect()}}}export{l as default};
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
(()=>{function d(e,t=()=>{}){let i=!1;return function(){i?t.apply(this,arguments):(i=!0,e.apply(this,arguments))}}function c({notification:e}){return{isShown:!1,computedStyle:null,transitionDuration:null,transitionEasing:null,closeTimeout:null,durationTimeout:null,remainingDuration:null,durationStartedAt:null,isHovered:!1,isFocusedWithin:!1,isClosing:!1,focusOrigin:null,unsubscribeLivewireHook:null,transitionEffect:null,isDestroyed:!1,init(){this.computedStyle=window.getComputedStyle(this.$el),this.transitionDuration=parseFloat(this.computedStyle.transitionDuration)*1e3,this.transitionEasing=this.computedStyle.transitionTimingFunction,this.configureTransitions(),this.configureAnimations(),e.duration&&e.duration!=="persistent"&&(this.$root.classList.contains("fi-inline")?this.durationTimeout=setTimeout(()=>{if(!this.$el.matches(":hover")){this.close();return}this.$el.addEventListener("mouseleave",()=>this.close())},e.duration):(this.remainingDuration=e.duration,this.isHovered=this.$el.matches(":hover"),this.isFocusedWithin=this.$el.contains(document.activeElement),!this.isHovered&&!this.isFocusedWithin&&this.resumeDuration())),this.isShown=!0},pauseDuration(t){if(this.isClosing)return;let i=this.isHovered||this.isFocusedWithin;t==="hover"?this.isHovered=!0:this.isFocusedWithin=!0,!(i||!this.durationTimeout)&&(this.remainingDuration=Math.max(0,this.remainingDuration-(performance.now()-this.durationStartedAt)),clearTimeout(this.durationTimeout),this.durationTimeout=null,this.durationStartedAt=null)},resumeDuration(t=null){t==="hover"?this.isHovered=!1:t==="focus"&&(this.isFocusedWithin=!1),!(this.isClosing||this.isHovered||this.isFocusedWithin||this.remainingDuration===null||this.durationTimeout)&&(this.durationStartedAt=performance.now(),this.durationTimeout=setTimeout(()=>{this.durationTimeout=null,this.durationStartedAt=null,this.remainingDuration=0,this.close()},this.remainingDuration))},handleFocusIn(t){this.$el.contains(t.relatedTarget)||(this.focusOrigin=t.relatedTarget instanceof HTMLElement?t.relatedTarget:null),this.pauseDuration("focus")},handleFocusOut(t){this.$el.contains(t.relatedTarget)||this.resumeDuration("focus")},handleEscape(t){this.$el.contains(document.activeElement)&&(t.preventDefault(),t.stopImmediatePropagation(),this.dismiss())},configureTransitions(){let t=this.computedStyle.display,i=()=>{Alpine.mutateDom(()=>{this.$el.style.setProperty("display",t),this.$el.style.setProperty("visibility","visible")}),this.$el._x_isShown=!0},s=()=>{Alpine.mutateDom(()=>{this.$el._x_isShown?this.$el.style.setProperty("visibility","hidden"):this.$el.style.setProperty("display","none")})},o=d(n=>n?i():s(),n=>{this.$el._x_toggleAndCascadeWithTransitions(this.$el,n,i,s)});this.transitionEffect=Alpine.effect(()=>{this.isDestroyed||o(this.isShown)})},configureAnimations(){this.$el.classList.contains("fi-inline")||(this.unsubscribeLivewireHook=Livewire.hook("commit",({component:t,succeed:i})=>{t.snapshot.data.isFilamentNotificationsComponent&&requestAnimationFrame(()=>{if(this.isDestroyed)return;let s=()=>this.$el.getBoundingClientRect().top,o=s();i(()=>{this.isDestroyed||queueMicrotask(()=>queueMicrotask(()=>{if(this.isDestroyed||!this.isShown)return;this.$el.getAnimations().forEach(r=>r.finish());let n=s();o!==n&&(window.matchMedia("(prefers-reduced-motion: reduce)").matches||this.$el.animate([{transform:`translateY(${o-n}px)`},{transform:"translateY(0px)"}],{duration:this.transitionDuration,easing:this.transitionEasing}))}))})})}))},close(t=!1){if(this.isClosing)return;this.isClosing=!0,clearTimeout(this.closeTimeout),clearTimeout(this.durationTimeout),this.durationTimeout=null,this.durationStartedAt=null;let i=()=>window.dispatchEvent(new CustomEvent("notificationClosed",{detail:{id:e.id}}));if(t===!0){this.isShown=!1,i();return}if(this.$root.classList.contains("fi-inline")){i();return}let s=this.$el.closest("[wire\\:id]");this.isShown=!1,this.closeTimeout=setTimeout(()=>{s&&!s.isConnected||i()},this.transitionDuration)},dismiss(){let t=this.focusOrigin;this.focusOrigin=null,this.$el.contains(document.activeElement)&&t instanceof HTMLElement&&t.isConnected&&!this.$el.contains(t)&&t.focus({preventScroll:!0}),this.close()},markAsRead(){window.dispatchEvent(new CustomEvent("markedNotificationAsRead",{detail:{id:e.id}}))},markAsUnread(){window.dispatchEvent(new CustomEvent("markedNotificationAsUnread",{detail:{id:e.id}}))},destroy(){this.isDestroyed=!0,clearTimeout(this.durationTimeout),this.durationTimeout=null,this.unsubscribeLivewireHook?.(),this.unsubscribeLivewireHook=null,Alpine.release(this.transitionEffect)}}}var a=class{constructor(){return this.id(crypto.randomUUID?.()??"10000000-1000-4000-8000-100000000000".replace(/[018]/g,t=>(+t^crypto.getRandomValues(new Uint8Array(1))[0]&15>>+t/4).toString(16))),this}id(t){return this._id=t,this}title(t){return this._title=t,this}body(t){return this._body=t,this}actions(t){return this._actions=t,this}status(t){return this._status=t,this}color(t){return this.Line truncated
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
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};
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
var _=Math.min,R=Math.max,nt=Math.round,ot=Math.floor,H=t=>({x:t,y:t}),ee={left:"right",right:"left",bottom:"top",top:"bottom"};function mt(t,e,o){return R(t,_(e,o))}function X(t,e){return typeof t=="function"?t(e):t}function $(t){return t.split("-")[0]}function G(t){return t.split("-")[1]}function gt(t){return t==="x"?"y":"x"}function pt(t){return t==="y"?"height":"width"}function V(t){let e=t[0];return e==="t"||e==="b"?"y":"x"}function bt(t){return gt(V(t))}function Rt(t,e,o){o===void 0&&(o=!1);let n=G(t),r=bt(t),a=pt(r),c=r==="x"?n===(o?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[a]>e.floating[a]&&(c=it(c)),[c,it(c)]}function St(t){let e=it(t);return[lt(t),e,lt(e)]}function lt(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}var At=["left","right"],Et=["right","left"],ie=["top","bottom"],ne=["bottom","top"];function oe(t,e,o){switch(t){case"top":case"bottom":return o?e?Et:At:e?At:Et;case"left":case"right":return e?ie:ne;default:return[]}}function Ft(t,e,o,n){let r=G(t),a=oe($(t),o==="start",n);return r&&(a=a.map(c=>c+"-"+r),e&&(a=a.concat(a.map(lt)))),a}function it(t){let e=$(t);return ee[e]+t.slice(e.length)}function se(t){return{top:0,right:0,bottom:0,left:0,...t}}function Ct(t){return typeof t!="number"?se(t):{top:t,right:t,bottom:t,left:t}}function I(t){let{x:e,y:o,width:n,height:r}=t;return{width:n,height:r,top:o,left:e,right:e+n,bottom:o+r,x:e,y:o}}function Lt(t,e,o){let{reference:n,floating:r}=t,a=V(e),c=bt(e),f=pt(c),m=$(e),g=a==="y",h=n.x+n.width/2-r.width/2,i=n.y+n.height/2-r.height/2,l=n[f]/2-r[f]/2,s;switch(m){case"top":s={x:h,y:n.y-r.height};break;case"bottom":s={x:h,y:n.y+n.height};break;case"right":s={x:n.x+n.width,y:i};break;case"left":s={x:n.x-r.width,y:i};break;default:s={x:n.x,y:n.y}}switch(G(e)){case"start":s[c]-=l*(o&&g?-1:1);break;case"end":s[c]+=l*(o&&g?-1:1);break}return s}async function Pt(t,e){var o;e===void 0&&(e={});let{x:n,y:r,platform:a,rects:c,elements:f,strategy:m}=t,{boundary:g="clippingAncestors",rootBoundary:h="viewport",elementContext:i="floating",altBoundary:l=!1,padding:s=0}=X(e,t),u=Ct(s),y=f[l?i==="floating"?"reference":"floating":i],p=I(await a.getClippingRect({element:(o=await(a.isElement==null?void 0:a.isElement(y)))==null||o?y:y.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(f.floating)),boundary:g,rootBoundary:h,strategy:m})),v=i==="floating"?{x:n,y:r,width:c.floating.width,height:c.floating.height}:c.reference,d=await(a.getOffsetParent==null?void 0:a.getOffsetParent(f.floating)),w=await(a.isElement==null?void 0:a.isElement(d))?await(a.getScale==null?void 0:a.getScale(d))||{x:1,y:1}:{x:1,y:1},O=I(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:f,rect:v,offsetParent:d,strategy:m}):v);return{top:(p.top-O.top+u.top)/w.y,bottom:(O.bottom-p.bottom+u.bottom)/w.y,left:(p.left-O.left+u.left)/w.x,right:(O.right-p.right+u.right)/w.x}}var re=50,Dt=async(t,e,o)=>{let{placement:n="bottom",strategy:r="absolute",middleware:a=[],platform:c}=o,f=c.detectOverflow?c:{...c,detectOverflow:Pt},m=await(c.isRTL==null?void 0:c.isRTL(e)),g=await c.getElementRects({reference:t,floating:e,strategy:r}),{x:h,y:i}=Lt(g,n,m),l=n,s=0,u={};for(let b=0;b<a.length;b++){let y=a[b];if(!y)continue;let{name:p,fn:v}=y,{x:d,y:w,data:O,reset:T}=await v({x:h,y:i,initialPlacement:n,placement:l,strategy:r,middlewareData:u,rects:g,platform:f,elements:{reference:t,floating:e}});h=d??h,i=w??i,u[p]={...u[p],...O},T&&s<re&&(s++,typeof T=="object"&&(T.placement&&(l=T.placement),T.rects&&(g=T.rects===!0?await c.getElementRects({reference:t,floating:e,strategy:r}):T.rects),{x:h,y:i}=Lt(g,l,m)),b=-1)}return{x:h,y:i,placement:l,strategy:r,middlewareData:u}};var Mt=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var o,n;let{placement:r,middlewareData:a,rects:c,initialPlacement:f,platform:m,elements:g}=e,{mainAxis:h=!0,crossAxis:i=!0,fallbackPlacements:l,fallbackStrategy:s="bestFit",fallbackAxisSideDirection:u="none",flipAlignment:b=!0,...y}=X(t,e);if((o=a.arrow)!=null&&o.alignmentOffset)return{};let p=$(r),v=V(f),d=$(f)===f,w=await(m.isRTL==null?void 0:m.isRTL(g.floating)),O=l||(d||!b?[it(f)]:St(f)),T=u!=="none";!l&&T&&O.push(...Ft(f,b,u,w));let x=[f,...O],S=await m.detectOverflow(e,y),A=[],E=((n=a.flip)==null?void 0:n.overflows)||[];if(h&&A.push(S[p]),i){let K=Rt(r,c,w);A.push(S[K[0]],S[K[1]])}if(E=[...E,{placement:r,overflows:A}],!A.every(K=>K<=0)){var C,L;let K=(((C=a.flip)==null?void 0:C.index)||0)+1,ht=x[K];if(ht&&(!(i==="alignment"?v!==V(ht):!1)||E.every(M=>V(M.placement)===v?M.overflows[0]>0:!0)))return{data:{index:K,overflows:E},reset:{placement:ht}};let et=(L=E.filter(z=>z.overflows[0]<=0).sort((z,M)=>z.overflows[1]-M.overflows[1])[0])==null?void 0:L.placement;if(!et)switch(s){case"bestFit":{var tt;let z=(tt=E.filter(M=>{if(T){let N=V(M.placement);return N===v||N==="y"}return!0}).map(M=>[M.placement,M.overflows.Line truncated
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
function d({isSkippable:n,isStepPersistedInQueryString:i,key:h,livewireId:l,schemaKey:c,startStep:r,stepQueryStringKey:o}){return{boundResetHandler:null,step:null,init(){let t=this.getSteps(),e=new URLSearchParams(window.location.search).get(o);this.step=i&&t.includes(e)?e:t.at(r-1),this.$watch("step",()=>{this.updateQueryString(),this.autofocusFields()}),this.autofocusFields(!0),this.boundResetHandler=s=>{s.detail.livewireId!==l||s.detail.schemaKey!==c||i||this.$nextTick(()=>{this.step=this.getSteps().at(r-1)??this.step})},window.addEventListener("reset-schema-component-state",this.boundResetHandler)},async requestNextStep(){await this.$wire.callSchemaComponentMethod(h,"nextStep",{currentStepIndex:this.getStepIndex(this.step),currentStepKey:this.step})},goToNextStep(t=null,e=null){if(!(e!==null&&this.step!==e)){if(t===null){let s=this.getStepIndex(this.step);if(s===-1)return;t=this.getSteps()[s+1]}this.getSteps().includes(t)&&(this.step=t,this.scroll())}},goToPreviousStep(){let t=this.getStepIndex(this.step)-1;t<0||(this.step=this.getSteps()[t],this.scroll())},goToStep(t){let e=this.getStepIndex(t);e<=-1||!n&&e>this.getStepIndex(this.step)||(this.step=t,this.scroll())},scroll(){this.$nextTick(()=>{this.$refs.header?.children[this.getStepIndex(this.step)].scrollIntoView({behavior:"smooth",block:"start"})})},autofocusFields(t=!1){this.$nextTick(()=>{if(t&&document.activeElement&&document.activeElement!==document.body&&this.$el.compareDocumentPosition(document.activeElement)&Node.DOCUMENT_POSITION_PRECEDING)return;let e=this.$refs[`step-${this.step}`]?.querySelectorAll("[autofocus]")??[];for(let s of e)if(s.focus(),document.activeElement===s)break})},getStepIndex(t){return this.getSteps().findIndex(e=>e===t)},getSteps(){return JSON.parse(this.$refs.stepsData.value)},isFirstStep(){return this.getStepIndex(this.step)<=0},isLastStep(){return this.getStepIndex(this.step)+1>=this.getSteps().length},isStepAccessible(t){return this.getStepIndex(t)!==-1&&(n||this.getStepIndex(this.step)>this.getStepIndex(t))},updateQueryString(){if(!i)return;let t=new URL(window.location.href);t.searchParams.set(o,this.step),history.replaceState(null,document.title,t.toString())},destroy(){this.boundResetHandler&&window.removeEventListener("reset-schema-component-state",this.boundResetHandler)}}}export{d as default};
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
(()=>{var f=()=>({isSticky:!1,width:0,resizeObserver:null,boundUpdateWidth:null,init(){let i=this.$el.parentElement;i&&(this.updateWidth(),this.resizeObserver=new ResizeObserver(()=>this.updateWidth()),this.resizeObserver.observe(i),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 i=this.$el.parentElement;if(!i)return;let e=getComputedStyle(this.$root.querySelector(".fi-ac"));this.width=i.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 h=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}`},p=i=>{let e=Alpine.findClosest(i,n=>n.__livewire);if(!e)throw"Could not find Livewire component in DOM tree.";return e.__livewire},l=!1;document.addEventListener("invalid",i=>{let e=i.target;if(!e.closest("[data-field-wrapper]")||e.offsetParent!==null&&getComputedStyle(e).visibility!=="hidden"||(i.preventDefault(),l)||Array.from(e.form?.elements??[]).some(t=>t.willValidate&&!t.validity.valid&&t.offsetParent!==null&&getComputedStyle(t).visibility!=="hidden"))return;l=!0;let n=e;for(;n;)n.dispatchEvent(new CustomEvent("expand")),n=n.parentNode;requestAnimationFrame(()=>requestAnimationFrame(()=>{e.form?.reportValidity(),setTimeout(()=>l=!1,100)}))},!0);document.addEventListener("alpine:init",()=>{window.Alpine.data("filamentSchema",({livewireId:i,schemaKey:e,isLoadingDeferred:n=!1})=>({intersectionObserver:null,isLoadingDeferredSchema:!1,init(){n&&(this.intersectionObserver=new IntersectionObserver(async t=>{if(!(!t[0]?.isIntersecting||this.isLoadingDeferredSchema)){this.isLoadingDeferredSchema=!0;try{await this.$wire.loadDeferredSchema(e),this.intersectionObserver?.disconnect()}catch{}finally{this.isLoadingDeferredSchema=!1}}}),this.intersectionObserver.observe(this.$el))},handleFormValidationError(t){t.detail.livewireId===i&&this.$nextTick(()=>{let r=this.$el.querySelector("[data-validation-error]");if(!r)return;let s=r;for(;s;)s.dispatchEvent(new CustomEvent("expand")),s=s.parentNode;setTimeout(()=>{r.isConnected&&r.closest("[data-field-wrapper]")?.scrollIntoView({behavior:"smooth",block:"start",inline:"start"})},200)})},handleClientSideStateReset(t){t.detail.livewireId!==i||t.detail.schemaKey!==e||this.$nextTick(()=>{let r=this.$el.querySelectorAll("[autofocus]");for(let s of r)if(s.offsetParent!==null&&(s.focus(),document.activeElement===s))break})},isStateChanged(t,r){if(t===void 0)return!1;try{return JSON.stringify(t)!==JSON.stringify(r)}catch{return t!==r}},destroy(){this.intersectionObserver?.disconnect()}})),window.Alpine.data("filamentSchemaComponent",({path:i,containerPath:e,$wire:n})=>({$statePath:i,$get:(t,r)=>n.$get(h(e,t,r)),$set:(t,r,s,o=!1)=>n.$set(h(e,t,s),r,o),get $state(){return n.$get(i)}})),window.Alpine.data("filamentActionsSchemaComponent",f),Livewire.hook("commit",({component:i,commit:e,respond:n,succeed:t,fail:r})=>{t(({snapshot:s,effects:o})=>{i.el.isConnected&&o.dispatches?.forEach(a=>{if(!a.params?.awaitSchemaComponent)return;let d=Array.from(i.el.querySelectorAll(`[wire\\:partial="schema-component::${a.params.awaitSchemaComponent}"]`)).filter(m=>p(m)===i);if(d.length===1)return;if(d.length>1)throw`Multiple schema components found with key [${a.params.awaitSchemaComponent}].`;let u=`schema-component-${i.id}-${a.params.awaitSchemaComponent}-loaded`,c=()=>{window.dispatchEvent(new CustomEvent(a.name,{detail:a.params}))};window.addEventListener(u,c,{once:!0}),i.addCleanup(()=>window.removeEventListener(u,c))})})})});})();
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
(()=>{var al=Object.create;var ta=Object.defineProperty;var sl=Object.getOwnPropertyDescriptor;var ll=Object.getOwnPropertyNames;var ul=Object.getPrototypeOf,cl=Object.prototype.hasOwnProperty;var Zi=(t,e)=>()=>{try{return e||t((e={exports:{}}).exports,e),e.exports}catch(r){throw e=0,r}};var fl=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of ll(e))!cl.call(t,i)&&i!==r&&ta(t,i,{get:()=>e[i],enumerable:!(n=sl(e,i))||n.enumerable});return t};var pl=(t,e,r)=>(r=t!=null?al(ul(t)):{},fl(e||!t||!t.__esModule?ta(r,"default",{value:t,enumerable:!0}):r,t));var Na=Zi(()=>{});var ja=Zi(()=>{});var Ba=Zi((af,Si)=>{(function(){"use strict";var t="input is invalid type",e="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 Si=="object"&&Si.exports,l=typeof define=="function"&&define.amd,s=!n.JS_MD5_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",u="0123456789abcdef".split(""),p=[128,32768,8388608,-2147483648],g=[0,8,16,24],O=["hex","array","digest","buffer","arrayBuffer","base64"],y="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),E=[],D;if(s){var T=new ArrayBuffer(68);D=new Uint8Array(T),E=new Uint32Array(T)}var N=Array.isArray;(n.JS_MD5_NO_NODE_JS||!N)&&(N=function(c){return Object.prototype.toString.call(c)==="[object Array]"});var S=ArrayBuffer.isView;s&&(n.JS_MD5_NO_ARRAY_BUFFER_IS_VIEW||!S)&&(S=function(c){return typeof c=="object"&&c.buffer&&c.buffer.constructor===ArrayBuffer});var j=function(c){var d=typeof c;if(d==="string")return[c,!0];if(d!=="object"||c===null)throw new Error(t);if(s&&c.constructor===ArrayBuffer)return[new Uint8Array(c),!1];if(!N(c)&&!S(c))throw new Error(t);return[c,!1]},b=function(c){return function(d){return new H(!0).update(d)[c]()}},U=function(){var c=b("hex");o&&(c=k(c)),c.create=function(){return new H},c.update=function(m){return c.create().update(m)};for(var d=0;d<O.length;++d){var v=O[d];c[v]=b(v)}return c},k=function(c){var d=Na(),v=ja().Buffer,m;v.from&&!n.JS_MD5_NO_BUFFER_FROM?m=v.from:m=function(P){return new v(P)};var B=function(P){if(typeof P=="string")return d.createHash("md5").update(P,"utf8").digest("hex");if(P==null)throw new Error(t);return P.constructor===ArrayBuffer&&(P=new Uint8Array(P)),N(P)||S(P)||P.constructor===v?d.createHash("md5").update(m(P)).digest("hex"):c(P)};return B},$=function(c){return function(d,v){return new X(d,!0).update(v)[c]()}},ee=function(){var c=$("hex");c.create=function(m){return new X(m)},c.update=function(m,B){return c.create(m).update(B)};for(var d=0;d<O.length;++d){var v=O[d];c[v]=$(v)}return c};function H(c){if(c)E[0]=E[16]=E[1]=E[2]=E[3]=E[4]=E[5]=E[6]=E[7]=E[8]=E[9]=E[10]=E[11]=E[12]=E[13]=E[14]=E[15]=0,this.blocks=E,this.buffer8=D;else if(s){var d=new ArrayBuffer(68);this.buffer8=new Uint8Array(d),this.blocks=new Uint32Array(d)}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}H.prototype.update=function(c){if(this.finalized)throw new Error(e);var d=j(c);c=d[0];for(var v=d[1],m,B=0,P,I=c.length,Q=this.blocks,Me=this.buffer8;B<I;){if(this.hashed&&(this.hashed=!1,Q[0]=Q[16],Q[16]=Q[1]=Q[2]=Q[3]=Q[4]=Q[5]=Q[6]=Q[7]=Q[8]=Q[9]=Q[10]=Q[11]=Q[12]=Q[13]=Q[14]=Q[15]=0),v)if(s)for(P=this.start;B<I&&P<64;++B)m=c.charCodeAt(B),m<128?Me[P++]=m:m<2048?(Me[P++]=192|m>>>6,Me[P++]=128|m&63):m<55296||m>=57344?(Me[P++]=224|m>>>12,Me[P++]=128|m>>>6&63,Me[P++]=128|m&63):(m=65536+((m&1023)<<10|c.charCodeAt(++B)&1023),Me[P++]=240|m>>>18,Me[P++]=128|m>>>12&63,Me[P++]=128|m>>>6&63,Me[P++]=128|m&63);else for(P=this.start;B<I&&P<64;++B)m=c.charCodeAt(B),m<128?Q[P>>>2]|=m<<g[P++&3]:m<2048?(Q[P>>>2]|=(192|m>>>6)<<g[P++&3],Q[P>>>2]|=(128|m&63)<<g[P++&3]):m<55296||m>=57344?(Q[P>>>2]|=(224|m>>>12)<<g[P++&3],Q[P>>>2]|=(128|m>>>6&63)<<g[P++&3],Q[P>>>2]|=(128|m&63)<<g[P++&3]):(m=65536+((m&1023)<<10|c.charCodeAt(++B)&1023),Q[P>>>2]|=(240|m>>>18)<<g[P++&3],Q[P>>>2]|=(128|m>>>12&63)<<g[P++&3],Q[P>>>2]|=(128|m>>>6&63)<<g[P++&3],Q[P>>>2]|=(128|m&63)<<g[P++&3]);else if(s)for(P=this.start;B<I&&P<64;++B)Me[P++]=c[B];else for(P=this.start;B<I&&P<64;++B)Q[P>>>2]|=c[B]<<g[P++&3];this.lastByteIndex=P,this.bytes+=P-this.start,P>=64?(this.start=P-64,this.hash(),this.hashed=!0):this.start=P}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this},H.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var c=this.blocks,d=this.lastByteIndex;c[d>>>2]|=p[d&3],d>=56&&(this.hashed||this.hash(),c[0]=c[16],c[16]=c[1]=c[2]=c[3]=c[4]=c[5]=c[6]=c[7]=c[8]=c[9]=c[10]=c[11]=c[12]=c[13]=c[14]=c[15]=0),c[14]=this.bytes<<3,c[15]=this.hBytes<<3|this.bytes>>>29,this.hash()}},H.prototype.hash=function(){var c,d,v,m,B,P,I=this.blocks;this.first?(c=I[0]-680876937,c=(cLine 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.",`
|
||||||
|
|
||||||
|
`,"We recommend using the popper element as a wrapper around an inner","element that can have any CSS property transitioned for animations."].join(" "));var J={placement:Ve(f.placement),popper:f.elements.popper,popperRect:f.rects.popper,gpuAcceleration:F};f.modifiersData.popperOffsets!=null&&(f.styles.popper=Object.assign({},f.styles.popper,Yn(Object.assign({},J,{offsets:f.modifiersData.popperOffsets,position:f.options.strategy,adaptive:G,roundOffsets:re})))),f.modifiersData.arrow!=null&&(f.styles.arrow=Object.assign({},f.styles.arrow,Yn(Object.assign({},J,{offsets:f.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:re})))),f.attributes.popper=Object.assign({},f.attributes.popper,{"data-popper-placement":f.placement})}var A={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:w,data:{}};function _(h){var f=h.state;Object.keys(f.elements).forEach(function(x){var R=f.styles[x]||{},F=f.attributes[x]||{},V=f.elements[x];!o(V)||!u(V)||(Object.assign(V.style,R),Object.keys(F).forEach(function(G){var Y=F[G];Y===!1?V.removeAttribute(G):V.setAttribute(G,Y===!0?"":Y)}))})}function W(h){var f=h.state,x={popper:{position:f.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(f.elements.popper.style,x.popper),f.styles=x,f.elements.arrow&&Object.assign(f.elements.arrow.style,x.arrow),function(){Object.keys(f.elements).forEach(function(R){var F=f.elements[R],V=f.attributes[R]||{},G=Object.keys(f.styles.hasOwnProperty(R)?f.styles[R]:x[R]),Y=G.reduce(function(re,ce){return re[ce]="",re},{});!o(F)||!u(F)||(Object.assign(F.style,Y),Object.keys(V).forEach(function(re){F.removeAttribute(re)}))})}}var te={name:"applyStyles",enabled:!0,phase:"write",fn:_,effect:W,requires:["computeStyles"]};function K(h,f,x){var R=Ve(h),F=[X,$].indexOf(R)>=0?-1:1,V=typeof x=="function"?x(Object.assign({},f,{placement:h})):x,G=V[0],Y=V[1];return G=G||0,Y=(Y||0)*F,[X,H].indexOf(R)>=0?{x:Y,y:G}:{x:G,y:Y}}function q(h){var f=h.state,x=h.options,R=h.name,F=x.offset,V=F===void 0?[0,0]:F,G=Me.reduce(function(J,Re){return J[Re]=K(Re,f.rects,V),J},{}),Y=G[f.placement],re=Y.x,ce=Y.y;f.modifiersData.popperOffsets!=null&&(f.modifiersData.popperOffsets.x+=re,f.modifiersData.popperOffsets.y+=ce),f.modifiersData[R]=G}var xe={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:q},de={left:"right",right:"left",bottom:"top",top:"bottom"};function ge(h){return h.replace(/left|right|bottom|top/g,function(f){return de[f]})}var Oe={start:"end",end:"start"};function Ie(h){return h.replace(/start|end/g,function(f){return Oe[f]})}function Ye(h,f){f===void 0&&(f={});var x=f,R=x.placement,F=x.boundary,V=x.rootBoundary,G=x.padding,Y=x.flipVariations,re=x.allowedAutoPlacements,ce=re===void 0?Me:re,J=Dr(R),Re=J?Y?Q:Q.filter(function(Se){return Dr(Se)===J}):c,He=Re.filter(function(Se){return ce.indexOf(Se)>=0});He.length===0&&(He=Re,console.error(["Popper: The `allowedAutoPlacements` option did not allow any","placements. Ensure the `placement` option matches the variation","of the allowed placements.",'For example, "auto" cannot be used to allow "bottom-start".','Use "auto-start" instead.'].join(" ")));var Le=He.reduce(function(Se,Ne){return Se[Ne]=Ue(h,{placement:Ne,boundary:F,rootBoundary:V,padding:G})[Ve(Ne)],Se},{});return Object.keys(Le).sort(function(Se,Ne){return Le[Se]-Le[Ne]})}function _e(h){if(Ve(h)===ie)return[];var f=ge(h);return[Ie(h),f,Ie(f)]}function Be(h){var f=h.state,x=h.options,R=h.name;if(!f.modifiersData[R]._skip){for(var F=x.mainAxis,V=F===void 0?!0:F,G=x.altAxis,Y=G===void 0?!0:G,re=x.fallbackPlacements,ce=x.padding,J=x.boundary,Re=x.rootBoundary,He=x.altBoundary,Le=x.flipVariations,Se=Le===void 0?!0:Le,Ne=x.allowedAutoPlacements,Pe=f.options.placement,Xe=Ve(Pe),je=Xe===Pe,Ke=re||(je||!Se?[ge(Pe)]:_e(Pe)),he=[Pe].concat(Ke).reduce(function(ae,we){return ae.concat(Ve(we)===ie?Ye(f,{placement:we,boundary:J,rootBoundary:Re,padding:ce,flipVariations:Se,allowedAutoPlacements:Ne}):we)},[]),Fe=f.rects.reference,ke=f.rects.popper,We=new Map,$e=!0,rt=he[0],Ge=0;Ge<he.length;Ge++){var Ze=he[Ge],ir=Ve(Ze),Ot=Dr(Ze)===d,_r=[$,ee].indexOf(ir)>=0,cn=_r?"width":"height",Kr=Ue(f,{placement:Ze,boundary:J,rootBoundary:Re,altBoundary:He,padding:ce}),Lr=_r?Ot?H:X:Ot?ee:$;Fe[cn]>ke[cn]&&(Lr=ge(Lr));var Xn=ge(Lr),Gr=[];if(V&&Gr.push(Kr[ir]<=0),Y&&Gr.push(Kr[Lr]<=0,Kr[Xn]<=0),Gr.every(function(ae){return ae})){rt=Ze,$e=!1;break}We.set(Ze,Gr)}if($e)for(var Dn=Se?3:1,Kn=function(we){var Ae=he.find(function(ct){var ft=We.get(ct);if(ft)return ft.slice(0,we).every(function(wr){return wr})});if(Ae)return rt=Ae,"break"},L=Dn;L>0;L--){var ne=Kn(L);if(ne==="break")break}f.placement!==rt&&(f.modifiersData[R]._skip=!0,f.placement=rt,f.reset=!0)}}var le={name:"flip",enabled:!0,phase:"main",fn:Be,requiresIfExists:["offset"],data:{_skip:!1}};function be(h){return h==="x"?"y":"x"}function ye(h,f,x){return lt(h,jt(f,x))}function oe(h){var f=h.state,x=h.options,R=h.name,F=x.mainAxis,V=F===void 0?!0:F,G=
Line truncated
|
||||||
|
%ctippy.js
|
||||||
|
|
||||||
|
%c`+Zt(w)+`
|
||||||
|
|
||||||
|
%c\u{1F477}\u200D This is a development-only message. It will be removed in production.
|
||||||
|
`)}function er(w){return[Nt(w),"color: #00C584; font-size: 1.3em; font-weight: bold;","line-height: 1.5","color: #a6a095;"]}var mt;dr();function dr(){mt=new Set}function Et(w,A){if(w&&!mt.has(A)){var _;mt.add(A),(_=console).warn.apply(_,er(A))}}function Rt(w,A){if(w&&!mt.has(A)){var _;mt.add(A),(_=console).error.apply(_,er(A))}}function Tt(w){var A=!w,_=Object.prototype.toString.call(w)==="[object Object]"&&!w.addEventListener;Rt(A,["tippy() was passed","`"+String(w)+"`","as its targets (first) argument. Valid types are: String, Element,","Element[], or NodeList."].join(" ")),Rt(_,["tippy() was passed a plain object which is not supported as an argument","for virtual positioning. Use props.getReferenceClientRect instead."].join(" "))}var Dt={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},Cr={allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999},Qe=Object.assign({appendTo:function(){return document.body},aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},Dt,{},Cr),Wr=Object.keys(Qe),Vr=function(A){lt(A,[]);var _=Object.keys(A);_.forEach(function(W){Qe[W]=A[W]})};function Ve(w){var A=w.plugins||[],_=A.reduce(function(W,te){var K=te.name,q=te.defaultValue;return K&&(W[K]=w[K]!==void 0?w[K]:q),W},{});return Object.assign({},w,{},_)}function zt(w,A){var _=A?Object.keys(Ve(Object.assign({},Qe,{plugins:A}))):Wr,W=_.reduce(function(te,K){var q=(w.getAttribute("data-tippy-"+K)||"").trim();if(!q)return te;if(K==="content")te[K]=q;else try{te[K]=JSON.parse(q)}catch{te[K]=q}return te},{});return W}function hr(w,A){var _=Object.assign({},A,{content:O(A.content,[w])},A.ignoreAttributes?{}:zt(w,A.plugins));return _.aria=Object.assign({},Qe.aria,{},_.aria),_.aria={expanded:_.aria.expanded==="auto"?A.interactive:_.aria.expanded,content:_.aria.content==="auto"?A.interactive?null:"describedby":_.aria.content},_}function lt(w,A){w===void 0&&(w={}),A===void 0&&(A=[]);var _=Object.keys(w);_.forEach(function(W){var te=E(Qe,Object.keys(Dt)),K=!u(te,W);K&&(K=A.filter(function(q){return q.name===W}).length===0),Et(K,["`"+W+"`","is not a valid prop. You may have spelled it incorrectly, or if it's","a plugin, forgot to pass it in an array as props.plugins.",`
|
||||||
|
|
||||||
|
`,`All props: https://atomiks.github.io/tippyjs/v6/all-props/
|
||||||
|
`,"Plugins: https://atomiks.github.io/tippyjs/v6/plugins/"].join(" "))})}var jt=function(){return"innerHTML"};function Bt(w,A){w[jt()]=A}function Tr(w){var A=k();return w===!0?A.className=a:(A.className=l,$(w)?A.appendChild(w):Bt(A,w)),A}function mr(w,A){$(A.content)?(Bt(w,""),w.appendChild(A.content)):typeof A.content!="function"&&(A.allowHTML?Bt(w,A.content):w.textContent=A.content)}function $t(w){var A=w.firstElementChild,_=b(A.children);return{box:A,content:_.find(function(W){return W.classList.contains(i)}),arrow:_.find(function(W){return W.classList.contains(a)||W.classList.contains(l)}),backdrop:_.find(function(W){return W.classList.contains(o)})}}function Cn(w){var A=k(),_=k();_.className=n,_.setAttribute("data-state","hidden"),_.setAttribute("tabindex","-1");var W=k();W.className=i,W.setAttribute("data-state","hidden"),mr(W,w.props),A.appendChild(_),_.appendChild(W),te(w.props,w.props);function te(K,q){var xe=$t(A),de=xe.box,ge=xe.content,Oe=xe.arrow;q.theme?de.setAttribute("data-theme",q.theme):de.removeAttribute("data-theme"),typeof q.animation=="string"?de.setAttribute("data-animation",q.animation):de.removeAttribute("data-animation"),q.inertia?de.setAttribute("data-inertia",""):de.removeAttribute("data-inertia"),de.style.maxWidth=typeof q.maxWidth=="number"?q.maxWidth+"px":q.maxWidth,q.role?de.setAttribute("role",q.role):de.removeAttribute("role"),(K.content!==q.content||K.allowHTML!==q.allowHTML)&&mr(ge,w.props),q.arrow?Oe?K.arrow!==q.arrow&&(de.removeChild(Oe),de.appendChild(Tr(q.arrow))):de.appendChild(Tr(q.arrow)):Oe&&de.removeChild(Oe)}return{popper:A,onUpdate:te}}Cn.$$tippy=!0;var Tn=1,Ur=[],zr=[];function Dr(w,A){var _=hr(w,Object.assign({},Qe,{},Ve(U(A)))),W,te,K,q=!1,xe=!1,de=!1,ge=!1,Oe,Ie,Ye,_e=[],Be=y(je,_.interactiveDebounce),le,be=Tn++,ye=null,oe=S(_.plugins),ue={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},C={id:be,reference:w,popper:k(),popperInstance:ye,props:_,state:ue,plugins:oe,clearDelayTimeouts:_r,setProps:cn,setContent:Kr,show:Lr,hide:Xn,hideWithInteractivity:Gr,enable:ir,disable:Ot,unmount:Dn,destroy:Kn};if(!_.render)return Rt(!0,"render() function has not been supplied."),C;var ut=_.render(C),me=ut.popper,Mr=ut.onUpdate;me.setAttribute("data-tippy-root",""),me.id="tippy-"+C.id,C.popper=me,w._tippy=C,me._tippy=C;var rr=oe.map(function(L){return L.fn(C)}),qr=w.hasAttribute("aria-expanded");return Ne(),F(),f(),x("onCreate",[C]),_.showOnCreate&&Ge(),me.addEventListener("mouseenter",function(){C.props.interactive&&C.state.isVisible&&C.clearDelayTimeouts()}),me.addEventListener("mouseleave",function(L){C.props.interactive&&C.props.trigger.indexOf("mouseenter")>=0&&(nr().addEventListener("mousemove",Be),Be(L))}),C;function Yr(){var L=C.props.touch;return Array.isArray(L)?L:[L,0]}function Xr(){return Yr()[0]==="hold"}function Mt(){var L;return!!((L=C.props.render)!=null&&L.$$tippy)}function Ht(){return le||w}function nr(){var L=Ht().parentNode;return L?v(L):document}function un(){return $t(me)}function h(L){return C.state.isMounted&&!C.state.isVisible||P.isTouch||Oe&&Oe.type==="focus"?0:p(C.props.delay,L?0:1,Qe.delay)}function f(){me.style.pointerEvents=C.props.interactive&&C.state.isVisible?"":"none",me.style.zIndex=""+C.props.zIndex}function x(L,ne,ae){if(ae===void 0&&(ae=!0),rr.forEach(function(Ae){Ae[L]&&Ae[L].apply(void 0,ne)}),ae){var we;(we=C.props)[L].apply(we,ne)}}function R(){var L=C.props.aria;if(L.content){var ne="aria-"+L.content,ae=me.id,we=T(C.props.triggerTarget||w);we.forEach(function(Ae){var ct=Ae.getAttribute(ne);if(C.state.isVisible)Ae.setAttribute(ne,ct?ct+" "+ae:ae);else{var ft=ct&&ct.replace(ae,"").trim();ft?Ae.setAttribute(ne,ft):Ae.removeAttribute(ne)}})}}function F(){if(!(qr||!C.props.aria.expanded)){var L=T(C.props.triggerTarget||w);L.forEach(function(ne){C.props.interactive?ne.setAttribute("aria-expanded",C.state.isVisible&&ne===Ht()?"true":"false"):ne.removeAttribute("aria-expanded")})}}function V(){nr().removeEventListener("mousemove",Be),Ur=Ur.filter(function(L){return L!==Be})}function G(L){if(!(P.isTouch&&(de||L.type==="mousedown"))&&!(C.props.interactive&&me.contains(L.target))){if(Ht().contains(L.target)){if(P.isTouch||C.state.isVisible&&C.props.trigger.indexOf("click")>=0)return}else x("onClickOutside",[C,L]);C.props.hideOnClick===!0&&(C.clearDelayTimeouts(),C.hide(),xe=!0,setTimeout(function(){xe=!1}),C.state.isMounted||J())}}function Y(){de=!0}function re(){de=!1}function ce(){var L=nr();L.addEventListener("mousedown",G,!0),L.addEventListener("touchend",G,s),L.addEventListener("touchstart",re,s),L.addEventListener("touchmove",Y,s)}function J(){var L=nr();L.removeEventListener("mousedown",G,!0),L.removeEventListener("touchend",G,s),L.removeEventListener("touchstart",re,s),L.removeEventListener("touchmove",Y,s)}function Re(L,ne){Le(L,function(){!C.state.isVisible&&me.parentNode&&me.parentNode.contains(me)&&ne()})}function He(L,ne){Le(L,ne)}function Le(L,ne){var ae=un().box;function we(Ae){Ae.target===ae&&(B(ae,"remove",w
Line truncated
|
||||||
|
|
||||||
|
`,"Using a wrapper <div> or <span> tag around the reference element","solves this by creating a new parentNode context.",`
|
||||||
|
|
||||||
|
`,"Specifying `appendTo: document.body` silences this warning, but it","assumes you are using a focus management solution to handle","keyboard navigation.",`
|
||||||
|
|
||||||
|
`,"See: https://atomiks.github.io/tippyjs/v6/accessibility/#interactivity"].join(" "))}function rt(){return b(me.querySelectorAll("[data-tippy-root]"))}function Ge(L){C.clearDelayTimeouts(),L&&x("onTrigger",[C,L]),ce();var ne=h(!0),ae=Yr(),we=ae[0],Ae=ae[1];P.isTouch&&we==="hold"&&Ae&&(ne=Ae),ne?W=setTimeout(function(){C.show()},ne):C.show()}function Ze(L){if(C.clearDelayTimeouts(),x("onUntrigger",[C,L]),!C.state.isVisible){J();return}if(!(C.props.trigger.indexOf("mouseenter")>=0&&C.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(L.type)>=0&&q)){var ne=h(!1);ne?te=setTimeout(function(){C.state.isVisible&&C.hide()},ne):K=requestAnimationFrame(function(){C.hide()})}}function ir(){C.state.isEnabled=!0}function Ot(){C.hide(),C.state.isEnabled=!1}function _r(){clearTimeout(W),clearTimeout(te),cancelAnimationFrame(K)}function cn(L){if(Et(C.state.isDestroyed,ht("setProps")),!C.state.isDestroyed){x("onBeforeUpdate",[C,L]),Pe();var ne=C.props,ae=hr(w,Object.assign({},C.props,{},L,{ignoreAttributes:!0}));C.props=ae,Ne(),ne.interactiveDebounce!==ae.interactiveDebounce&&(V(),Be=y(je,ae.interactiveDebounce)),ne.triggerTarget&&!ae.triggerTarget?T(ne.triggerTarget).forEach(function(we){we.removeAttribute("aria-expanded")}):ae.triggerTarget&&w.removeAttribute("aria-expanded"),F(),f(),Mr&&Mr(ne,ae),C.popperInstance&&(ke(),rt().forEach(function(we){requestAnimationFrame(we._tippy.popperInstance.forceUpdate)})),x("onAfterUpdate",[C,L])}}function Kr(L){C.setProps({content:L})}function Lr(){Et(C.state.isDestroyed,ht("show"));var L=C.state.isVisible,ne=C.state.isDestroyed,ae=!C.state.isEnabled,we=P.isTouch&&!C.props.touch,Ae=p(C.props.duration,0,Qe.duration);if(!(L||ne||ae||we)&&!Ht().hasAttribute("disabled")&&(x("onShow",[C],!1),C.props.onShow(C)!==!1)){if(C.state.isVisible=!0,Mt()&&(me.style.visibility="visible"),f(),ce(),C.state.isMounted||(me.style.transition="none"),Mt()){var ct=un(),ft=ct.box,wr=ct.content;c([ft,wr],0)}Ye=function(){var xr;if(!(!C.state.isVisible||ge)){if(ge=!0,me.offsetHeight,me.style.transition=C.props.moveTransition,Mt()&&C.props.animation){var Pn=un(),fn=Pn.box,Jr=Pn.content;c([fn,Jr],Ae),d([fn,Jr],"visible")}R(),F(),N(zr,C),(xr=C.popperInstance)==null||xr.forceUpdate(),C.state.isMounted=!0,x("onMount",[C]),C.props.animation&&Mt()&&He(Ae,function(){C.state.isShown=!0,x("onShown",[C])})}},$e()}}function Xn(){Et(C.state.isDestroyed,ht("hide"));var L=!C.state.isVisible,ne=C.state.isDestroyed,ae=!C.state.isEnabled,we=p(C.props.duration,1,Qe.duration);if(!(L||ne||ae)&&(x("onHide",[C],!1),C.props.onHide(C)!==!1)){if(C.state.isVisible=!1,C.state.isShown=!1,ge=!1,q=!1,Mt()&&(me.style.visibility="hidden"),V(),J(),f(),Mt()){var Ae=un(),ct=Ae.box,ft=Ae.content;C.props.animation&&(c([ct,ft],we),d([ct,ft],"hidden"))}R(),F(),C.props.animation?Mt()&&Re(we,C.unmount):C.unmount()}}function Gr(L){Et(C.state.isDestroyed,ht("hideWithInteractivity")),nr().addEventListener("mousemove",Be),N(Ur,Be),Be(L)}function Dn(){Et(C.state.isDestroyed,ht("unmount")),C.state.isVisible&&C.hide(),C.state.isMounted&&(We(),rt().forEach(function(L){L._tippy.unmount()}),me.parentNode&&me.parentNode.removeChild(me),zr=zr.filter(function(L){return L!==C}),C.state.isMounted=!1,x("onHidden",[C]))}function Kn(){Et(C.state.isDestroyed,ht("destroy")),!C.state.isDestroyed&&(C.clearDelayTimeouts(),C.unmount(),Pe(),delete w._tippy,C.state.isDestroyed=!0,x("onDestroy",[C]))}}function M(w,A){A===void 0&&(A={});var _=Qe.plugins.concat(A.plugins||[]);Tt(w),lt(A,_),st();var W=Object.assign({},A,{plugins:_}),te=ie(w),K=$(W.content),q=te.length>1;Et(K&&q,["tippy() was passed an Element as the `content` prop, but more than","one tippy instance was created by this invocation. This means the","content element will only be appended to the last tippy instance.",`
|
||||||
|
|
||||||
|
`,"Instead, pass the .innerHTML of the element, or use a function that","returns a cloned version of the element instead.",`
|
||||||
|
|
||||||
|
`,`1) content: element.innerHTML
|
||||||
|
`,"2) content: () => element.cloneNode(true)"].join(" "));var xe=te.reduce(function(de,ge){var Oe=ge&&Dr(ge,W);return Oe&&de.push(Oe),de},[]);return $(w)?xe[0]:xe}M.defaultProps=Qe,M.setDefaultProps=Vr,M.currentInput=P;var Z=function(A){var _=A===void 0?{}:A,W=_.exclude,te=_.duration;zr.forEach(function(K){var q=!1;if(W&&(q=X(W)?K.reference===W:K.popper===W.popper),!q){var xe=K.props.duration;K.setProps({duration:te}),K.hide(),K.state.isDestroyed||K.setProps({duration:xe})}})},se=Object.assign({},e.applyStyles,{effect:function(A){var _=A.state,W={popper:{position:_.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(_.elements.popper.style,W.popper),_.styles=W,_.elements.arrow&&Object.assign(_.elements.arrow.style,W.arrow)}}),De=function(A,_){var W;_===void 0&&(_={}),Rt(!Array.isArray(A),["The first argument passed to createSingleton() must be an array of","tippy instances. The passed value was",String(A)].join(" "));var te=A,K=[],q,xe=_.overrides,de=[],ge=!1;function Oe(){K=te.map(function(oe){return oe.reference})}function Ie(oe){te.forEach(function(ue){oe?ue.enable():ue.disable()})}function Ye(oe){return te.map(function(ue){var C=ue.setProps;return ue.setProps=function(ut){C(ut),ue.reference===q&&oe.setProps(ut)},function(){ue.setProps=C}})}function _e(oe,ue){var C=K.indexOf(ue);if(ue!==q){q=ue;var ut=(xe||[]).concat("content").reduce(function(me,Mr){return me[Mr]=te[C].props[Mr],me},{});oe.setProps(Object.assign({},ut,{getReferenceClientRect:typeof ut.getReferenceClientRect=="function"?ut.getReferenceClientRect:function(){return ue.getBoundingClientRect()}}))}}Ie(!1),Oe();var Be={fn:function(){return{onDestroy:function(){Ie(!0)},onHidden:function(){q=null},onClickOutside:function(C){C.props.showOnCreate&&!ge&&(ge=!0,q=null)},onShow:function(C){C.props.showOnCreate&&!ge&&(ge=!0,_e(C,K[0]))},onTrigger:function(C,ut){_e(C,ut.currentTarget)}}}},le=M(k(),Object.assign({},E(_,["overrides"]),{plugins:[Be].concat(_.plugins||[]),triggerTarget:K,popperOptions:Object.assign({},_.popperOptions,{modifiers:[].concat(((W=_.popperOptions)==null?void 0:W.modifiers)||[],[se])})})),be=le.show;le.show=function(oe){if(be(),!q&&oe==null)return _e(le,K[0]);if(!(q&&oe==null)){if(typeof oe=="number")return K[oe]&&_e(le,K[oe]);if(te.includes(oe)){var ue=oe.reference;return _e(le,ue)}if(K.includes(oe))return _e(le,oe)}},le.showNext=function(){var oe=K[0];if(!q)return le.show(0);var ue=K.indexOf(q);le.show(K[ue+1]||oe)},le.showPrevious=function(){var oe=K[K.length-1];if(!q)return le.show(oe);var ue=K.indexOf(q),C=K[ue-1]||oe;le.show(C)};var ye=le.setProps;return le.setProps=function(oe){xe=oe.overrides||xe,ye(oe)},le.setInstances=function(oe){Ie(!0),de.forEach(function(ue){return ue()}),te=oe,Ie(!1),Oe(),Ye(le),le.setProps({triggerTarget:K})},de=Ye(le),le},Ee={mouseover:"mouseenter",focusin:"focus",click:"click"};function Ue(w,A){Rt(!(A&&A.target),["You must specity a `target` prop indicating a CSS selector string matching","the target elements that should receive a tippy."].join(" "));var _=[],W=[],te=!1,K=A.target,q=E(A,["target"]),xe=Object.assign({},q,{trigger:"manual",touch:!1}),de=Object.assign({},q,{showOnCreate:!0}),ge=M(w,xe),Oe=T(ge);function Ie(be){if(!(!be.target||te)){var ye=be.target.closest(K);if(ye){var oe=ye.getAttribute("data-tippy-trigger")||A.trigger||Qe.trigger;if(!ye._tippy&&!(be.type==="touchstart"&&typeof de.touch=="boolean")&&!(be.type!=="touchstart"&&oe.indexOf(Ee[be.type])<0)){var ue=M(ye,de);ue&&(W=W.concat(ue))}}}}function Ye(be,ye,oe,ue){ue===void 0&&(ue=!1),be.addEventListener(ye,oe,ue),_.push({node:be,eventType:ye,handler:oe,options:ue})}function _e(be){var ye=be.reference;Ye(ye,"touchstart",Ie,s),Ye(ye,"mouseover",Ie),Ye(ye,"focusin",Ie),Ye(ye,"click",Ie)}function Be(){_.forEach(function(be){var ye=be.node,oe=be.eventType,ue=be.handler,C=be.options;ye.removeEventListener(oe,ue,C)}),_=[]}function le(be){var ye=be.destroy,oe=be.enable,ue=be.disable;be.destroy=function(C){C===void 0&&(C=!0),C&&W.forEach(function(ut){ut.destroy()}),W=[],Be(),ye()},be.enable=function(){oe(),W.forEach(function(C){return C.enable()}),te=!1},be.disable=function(){ue(),W.forEach(function(C){return C.disable()}),te=!0},_e(be)}return Oe.forEach(le),ge}var yt={name:"animateFill",defaultValue:!1,fn:function(A){var _;if(!((_=A.props.render)!=null&&_.$$tippy))return Rt(A.props.animateFill,"The `animateFill` plugin requires the default render function."),{};var W=$t(A.popper),te=W.box,K=W.content,q=A.props.animateFill?vr():null;return{onCreate:function(){q&&(te.insertBefore(q,te.firstElementChild),te.setAttribute("data-animatefill",""),te.style.overflow="hidden",A.setProps({arrow:!1,animation:"shift-away"}))},onMount:function(){if(q){var de=te.style.transitionDuration,ge=Number(de.replace("ms",""));K.style.transitionDelay=Math.round(ge/10)+"ms",q.style.transitionDuration=de,d([q],"visible")}},onShow:function(){q&&(q.style.transitionDuration="0ms")},onHide:function(){q&&d([q],"hidd
Line truncated
|
||||||
|
/*! Bundled license information:
|
||||||
|
|
||||||
|
js-md5/src/md5.js:
|
||||||
|
(**
|
||||||
|
* [js-md5]{@link https://github.com/emn178/js-md5}
|
||||||
|
*
|
||||||
|
* @namespace md5
|
||||||
|
* @version 0.8.3
|
||||||
|
* @author Chen, Yi-Cyuan [emn178@gmail.com]
|
||||||
|
* @copyright Chen, Yi-Cyuan 2014-2023
|
||||||
|
* @license MIT
|
||||||
|
*)
|
||||||
|
|
||||||
|
sortablejs/modular/sortable.esm.js:
|
||||||
|
(**!
|
||||||
|
* Sortable 1.15.7
|
||||||
|
* @author RubaXa <trash@rubaxa.org>
|
||||||
|
* @author owenm <owen23355@gmail.com>
|
||||||
|
* @license MIT
|
||||||
|
*)
|
||||||
|
*/
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
function h({name:r,recordKey:u,state:f,messages:a}){let d=e=>e.method==="updateTableColumnState"&&e.params[0]===r&&String(e.params[1])===String(u);return{error:void 0,isLoading:!1,isDestroyed:!1,isRefreshing:!1,hasRenderedState:!1,state:f,status:void 0,unsubscribeLivewireHook:null,unsubscribeRequestHook:null,initEditableColumn(){this.unsubscribeLivewireHook=Livewire.hook("commit",({component:e,commit:t,succeed:o,fail:i})=>{if(e.id!==this.$wire.$id)return;let n=t.calls.some(d),s=this.isRefreshing;(n||s)&&i(()=>this.handleSaveFailure()),o(({effects:l})=>{(n||s)&&(this.hasRenderedState=!!l.html),s&&(this.isRefreshing=!1),l.html&&this.$nextTick(()=>{!this.isDestroyed&&!this.isLoading&&this.syncServerState()})})}),this.$watch("state",async()=>{let e=this.getServerState();if(!(this.isDestroyed||this.isLoading||e===void 0||this.getNormalizedState()===e)){this.clearError(),this.isLoading=!0,this.hasRenderedState=!1,this.status=a?.saving,this.unsubscribeRequestHook=Livewire.hook("request",({payload:t,respond:o})=>{JSON.parse(t).components.some(i=>JSON.parse(i.snapshot).memo.id===this.$wire.$id&&(this.isRefreshing||i.calls.some(d)))&&o(({response:i})=>{let n=i.text.bind(i);i.text=async()=>{try{return await n()}catch(s){throw this.handleSaveFailure(),s}}})});try{let t=await this.$wire.updateTableColumnState(r,u,this.state);if(await this.$nextTick(),!this.isDestroyed&&!this.hasRenderedState&&(this.isRefreshing=!0,await this.$wire.$refresh(),await this.$nextTick(),!this.hasRenderedState)){this.handleSaveFailure();return}if(this.unsubscribeRequestHook?.(),this.unsubscribeRequestHook=null,this.isDestroyed)return;this.error=t?.error??void 0,this.status=this.error??a?.saved,this.isLoading=!1,this.syncServerState()}catch{this.handleSaveFailure()}}})},syncServerState(){let e=this.getServerState();e!==void 0&&(this.state=e)},getNormalizedState(){return Alpine.raw(this.state)??""},clearError(){this.isLoading||(this.error=void 0,this.status=void 0)},handleSaveFailure(){this.unsubscribeRequestHook?.(),this.unsubscribeRequestHook=null,!this.isDestroyed&&(this.error=a?.failure??"The save could not be confirmed. Refresh the page before trying again.",this.status=this.error,this.isRefreshing=!1,this.isLoading=!1)},blockEdit(e){!this.isLoading||e.type==="keydown"&&["Tab","Escape"].includes(e.key)||(e.preventDefault(),e.stopImmediatePropagation())},getAccessibilityAttributes(e={}){return{...e,"aria-invalid":this.error?"true":e["aria-invalid"]??null,"aria-busy":this.isLoading?"true":e["aria-busy"]??null,"aria-describedby":[e["aria-describedby"],this.error&&a?this.$id("table-column-error"):null].filter(Boolean).join(" ")||null}},destroy(){this.isDestroyed=!0,this.unsubscribeLivewireHook?.(),this.unsubscribeRequestHook?.(),this.unsubscribeRequestHook=null}}}function c(r){return{...h(r),init(){this.initEditableColumn()},getServerState(){if(this.$refs.serverState)return[1,"1"].includes(this.$refs.serverState.value)}}}export{c as default};
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
var Vt=Math.min,vt=Math.max,Wt=Math.round;var ot=n=>({x:n,y:n}),rn={left:"right",right:"left",bottom:"top",top:"bottom"};function Le(n,t,e){return vt(n,Vt(t,e))}function zt(n,t){return typeof n=="function"?n(t):n}function yt(n){return n.split("-")[0]}function Xt(n){return n.split("-")[1]}function Re(n){return n==="x"?"y":"x"}function Te(n){return n==="y"?"height":"width"}function ft(n){let t=n[0];return t==="t"||t==="b"?"y":"x"}function Ie(n){return Re(ft(n))}function ei(n,t,e){e===void 0&&(e=!1);let i=Xt(n),s=Ie(n),o=Te(s),r=s==="x"?i===(e?"end":"start")?"right":"left":i==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(r=$t(r)),[r,$t(r)]}function ii(n){let t=$t(n);return[oe(n),t,oe(t)]}function oe(n){return n.includes("start")?n.replace("start","end"):n.replace("end","start")}var Ze=["left","right"],ti=["right","left"],an=["top","bottom"],ln=["bottom","top"];function cn(n,t,e){switch(n){case"top":case"bottom":return e?t?ti:Ze:t?Ze:ti;case"left":case"right":return t?an:ln;default:return[]}}function ni(n,t,e,i){let s=Xt(n),o=cn(yt(n),e==="start",i);return s&&(o=o.map(r=>r+"-"+s),t&&(o=o.concat(o.map(oe)))),o}function $t(n){let t=yt(n);return rn[t]+n.slice(t.length)}function un(n){return{top:0,right:0,bottom:0,left:0,...n}}function si(n){return typeof n!="number"?un(n):{top:n,right:n,bottom:n,left:n}}function Ot(n){let{x:t,y:e,width:i,height:s}=n;return{width:i,height:s,top:e,left:t,right:t+i,bottom:e+s,x:t,y:e}}function oi(n,t,e){let{reference:i,floating:s}=n,o=ft(t),r=Ie(t),a=Te(r),l=yt(t),c=o==="y",h=i.x+i.width/2-s.width/2,u=i.y+i.height/2-s.height/2,p=i[a]/2-s[a]/2,f;switch(l){case"top":f={x:h,y:i.y-s.height};break;case"bottom":f={x:h,y:i.y+i.height};break;case"right":f={x:i.x+i.width,y:u};break;case"left":f={x:i.x-s.width,y:u};break;default:f={x:i.x,y:i.y}}switch(Xt(t)){case"start":f[r]-=p*(e&&c?-1:1);break;case"end":f[r]+=p*(e&&c?-1:1);break}return f}async function ri(n,t){var e;t===void 0&&(t={});let{x:i,y:s,platform:o,rects:r,elements:a,strategy:l}=n,{boundary:c="clippingAncestors",rootBoundary:h="viewport",elementContext:u="floating",altBoundary:p=!1,padding:f=0}=zt(t,n),m=si(f),S=a[p?u==="floating"?"reference":"floating":u],E=Ot(await o.getClippingRect({element:(e=await(o.isElement==null?void 0:o.isElement(S)))==null||e?S:S.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:c,rootBoundary:h,strategy:l})),w=u==="floating"?{x:i,y:s,width:r.floating.width,height:r.floating.height}:r.reference,x=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),A=await(o.isElement==null?void 0:o.isElement(x))?await(o.getScale==null?void 0:o.getScale(x))||{x:1,y:1}:{x:1,y:1},_=Ot(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:w,offsetParent:x,strategy:l}):w);return{top:(E.top-_.top+m.top)/A.y,bottom:(_.bottom-E.bottom+m.bottom)/A.y,left:(E.left-_.left+m.left)/A.x,right:(_.right-E.right+m.right)/A.x}}var hn=50,ai=async(n,t,e)=>{let{placement:i="bottom",strategy:s="absolute",middleware:o=[],platform:r}=e,a=r.detectOverflow?r:{...r,detectOverflow:ri},l=await(r.isRTL==null?void 0:r.isRTL(t)),c=await r.getElementRects({reference:n,floating:t,strategy:s}),{x:h,y:u}=oi(c,i,l),p=i,f=0,m={};for(let g=0;g<o.length;g++){let S=o[g];if(!S)continue;let{name:E,fn:w}=S,{x,y:A,data:_,reset:C}=await w({x:h,y:u,initialPlacement:i,placement:p,strategy:s,middlewareData:m,rects:c,platform:a,elements:{reference:n,floating:t}});h=x??h,u=A??u,m[E]={...m[E],..._},C&&f<hn&&(f++,typeof C=="object"&&(C.placement&&(p=C.placement),C.rects&&(c=C.rects===!0?await r.getElementRects({reference:n,floating:t,strategy:s}):C.rects),{x:h,y:u}=oi(c,p,l)),g=-1)}return{x:h,y:u,placement:p,strategy:s,middlewareData:m}};var li=function(n){return n===void 0&&(n={}),{name:"flip",options:n,async fn(t){var e,i;let{placement:s,middlewareData:o,rects:r,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:h=!0,crossAxis:u=!0,fallbackPlacements:p,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:g=!0,...S}=zt(n,t);if((e=o.arrow)!=null&&e.alignmentOffset)return{};let E=yt(s),w=ft(a),x=yt(a)===a,A=await(l.isRTL==null?void 0:l.isRTL(c.floating)),_=p||(x||!g?[$t(a)]:ii(a)),C=m!=="none";!p&&C&&_.push(...ni(a,g,m,A));let G=[a,..._],J=await l.detectOverflow(t,S),I=[],W=((i=o.flip)==null?void 0:i.overflows)||[];if(h&&I.push(J[E]),u){let B=ei(s,r,A);I.push(J[B[0]],J[B[1]])}if(W=[...W,{placement:s,overflows:I}],!I.every(B=>B<=0)){var Y,et;let B=(((Y=o.flip)==null?void 0:Y.index)||0)+1,Q=G[B];if(Q&&(!(u==="alignment"?w!==ft(Q):!1)||W.every(R=>ft(R.placement)===w?R.overflows[0]>0:!0)))return{data:{index:B,overflows:W},reset:{placement:Q}};let k=(et=W.filter(H=>H.overflows[0]<=0).sort((H,R)=>H.overflows[1]-R.overflows[1])[0])==null?void 0:et.placement;if(!k)switch(f){case"bestFit":{var z;let H=(z=W.filter(R=>{if(C){let $=ft(R.placement);return $===w||$==="y"}return!0}).map(R=>[R.placement,RLine truncated
|
||||||
|
/*! Bundled license information:
|
||||||
|
|
||||||
|
sortablejs/modular/sortable.esm.js:
|
||||||
|
(**!
|
||||||
|
* Sortable 1.15.7
|
||||||
|
* @author RubaXa <trash@rubaxa.org>
|
||||||
|
* @author owenm <owen23355@gmail.com>
|
||||||
|
* @license MIT
|
||||||
|
*)
|
||||||
|
*/
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
function h({name:r,recordKey:u,state:f,messages:a}){let l=e=>e.method==="updateTableColumnState"&&e.params[0]===r&&String(e.params[1])===String(u);return{error:void 0,isLoading:!1,isDestroyed:!1,isRefreshing:!1,hasRenderedState:!1,state:f,status:void 0,unsubscribeLivewireHook:null,unsubscribeRequestHook:null,initEditableColumn(){this.unsubscribeLivewireHook=Livewire.hook("commit",({component:e,commit:i,succeed:o,fail:t})=>{if(e.id!==this.$wire.$id)return;let n=i.calls.some(l),s=this.isRefreshing;(n||s)&&t(()=>this.handleSaveFailure()),o(({effects:d})=>{(n||s)&&(this.hasRenderedState=!!d.html),s&&(this.isRefreshing=!1),d.html&&this.$nextTick(()=>{!this.isDestroyed&&!this.isLoading&&this.syncServerState()})})}),this.$watch("state",async()=>{let e=this.getServerState();if(!(this.isDestroyed||this.isLoading||e===void 0||this.getNormalizedState()===e)){this.clearError(),this.isLoading=!0,this.hasRenderedState=!1,this.status=a?.saving,this.unsubscribeRequestHook=Livewire.hook("request",({payload:i,respond:o})=>{JSON.parse(i).components.some(t=>JSON.parse(t.snapshot).memo.id===this.$wire.$id&&(this.isRefreshing||t.calls.some(l)))&&o(({response:t})=>{let n=t.text.bind(t);t.text=async()=>{try{return await n()}catch(s){throw this.handleSaveFailure(),s}}})});try{let i=await this.$wire.updateTableColumnState(r,u,this.state);if(await this.$nextTick(),!this.isDestroyed&&!this.hasRenderedState&&(this.isRefreshing=!0,await this.$wire.$refresh(),await this.$nextTick(),!this.hasRenderedState)){this.handleSaveFailure();return}if(this.unsubscribeRequestHook?.(),this.unsubscribeRequestHook=null,this.isDestroyed)return;this.error=i?.error??void 0,this.status=this.error??a?.saved,this.isLoading=!1,this.syncServerState()}catch{this.handleSaveFailure()}}})},syncServerState(){let e=this.getServerState();e!==void 0&&(this.state=e)},getNormalizedState(){return Alpine.raw(this.state)??""},clearError(){this.isLoading||(this.error=void 0,this.status=void 0)},handleSaveFailure(){this.unsubscribeRequestHook?.(),this.unsubscribeRequestHook=null,!this.isDestroyed&&(this.error=a?.failure??"The save could not be confirmed. Refresh the page before trying again.",this.status=this.error,this.isRefreshing=!1,this.isLoading=!1)},blockEdit(e){!this.isLoading||e.type==="keydown"&&["Tab","Escape"].includes(e.key)||(e.preventDefault(),e.stopImmediatePropagation())},getAccessibilityAttributes(e={}){return{...e,"aria-invalid":this.error?"true":e["aria-invalid"]??null,"aria-busy":this.isLoading?"true":e["aria-busy"]??null,"aria-describedby":[e["aria-describedby"],this.error&&a?this.$id("table-column-error"):null].filter(Boolean).join(" ")||null}},destroy(){this.isDestroyed=!0,this.unsubscribeLivewireHook?.(),this.unsubscribeRequestHook?.(),this.unsubscribeRequestHook=null}}}function c(r){return{...h(r),init(){this.initEditableColumn()},getServerState(){if(this.$refs.serverState)return[null,void 0].includes(this.$refs.serverState.value)?"":this.$refs.serverState.value.replaceAll('\\"','"')}}}export{c as default};
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
function h({name:r,recordKey:u,state:f,messages:a}){let l=e=>e.method==="updateTableColumnState"&&e.params[0]===r&&String(e.params[1])===String(u);return{error:void 0,isLoading:!1,isDestroyed:!1,isRefreshing:!1,hasRenderedState:!1,state:f,status:void 0,unsubscribeLivewireHook:null,unsubscribeRequestHook:null,initEditableColumn(){this.unsubscribeLivewireHook=Livewire.hook("commit",({component:e,commit:t,succeed:o,fail:i})=>{if(e.id!==this.$wire.$id)return;let n=t.calls.some(l),s=this.isRefreshing;(n||s)&&i(()=>this.handleSaveFailure()),o(({effects:d})=>{(n||s)&&(this.hasRenderedState=!!d.html),s&&(this.isRefreshing=!1),d.html&&this.$nextTick(()=>{!this.isDestroyed&&!this.isLoading&&this.syncServerState()})})}),this.$watch("state",async()=>{let e=this.getServerState();if(!(this.isDestroyed||this.isLoading||e===void 0||this.getNormalizedState()===e)){this.clearError(),this.isLoading=!0,this.hasRenderedState=!1,this.status=a?.saving,this.unsubscribeRequestHook=Livewire.hook("request",({payload:t,respond:o})=>{JSON.parse(t).components.some(i=>JSON.parse(i.snapshot).memo.id===this.$wire.$id&&(this.isRefreshing||i.calls.some(l)))&&o(({response:i})=>{let n=i.text.bind(i);i.text=async()=>{try{return await n()}catch(s){throw this.handleSaveFailure(),s}}})});try{let t=await this.$wire.updateTableColumnState(r,u,this.state);if(await this.$nextTick(),!this.isDestroyed&&!this.hasRenderedState&&(this.isRefreshing=!0,await this.$wire.$refresh(),await this.$nextTick(),!this.hasRenderedState)){this.handleSaveFailure();return}if(this.unsubscribeRequestHook?.(),this.unsubscribeRequestHook=null,this.isDestroyed)return;this.error=t?.error??void 0,this.status=this.error??a?.saved,this.isLoading=!1,this.syncServerState()}catch{this.handleSaveFailure()}}})},syncServerState(){let e=this.getServerState();e!==void 0&&(this.state=e)},getNormalizedState(){return Alpine.raw(this.state)??""},clearError(){this.isLoading||(this.error=void 0,this.status=void 0)},handleSaveFailure(){this.unsubscribeRequestHook?.(),this.unsubscribeRequestHook=null,!this.isDestroyed&&(this.error=a?.failure??"The save could not be confirmed. Refresh the page before trying again.",this.status=this.error,this.isRefreshing=!1,this.isLoading=!1)},blockEdit(e){!this.isLoading||e.type==="keydown"&&["Tab","Escape"].includes(e.key)||(e.preventDefault(),e.stopImmediatePropagation())},getAccessibilityAttributes(e={}){return{...e,"aria-invalid":this.error?"true":e["aria-invalid"]??null,"aria-busy":this.isLoading?"true":e["aria-busy"]??null,"aria-describedby":[e["aria-describedby"],this.error&&a?this.$id("table-column-error"):null].filter(Boolean).join(" ")||null}},destroy(){this.isDestroyed=!0,this.unsubscribeLivewireHook?.(),this.unsubscribeRequestHook?.(),this.unsubscribeRequestHook=null}}}function c(r){return{...h(r),init(){this.initEditableColumn()},getServerState(){if(this.$refs.serverState)return[1,"1"].includes(this.$refs.serverState.value)}}}export{c as default};
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
(()=>{var H=Math.min,k=Math.max,N=Math.round,I=Math.floor,A=e=>({x:e,y:e});function Z(e,t,o){return k(e,H(t,o))}function X(e,t){return typeof e=="function"?e(t):e}function K(e){return e.split("-")[0]}function ee(e){return e.split("-")[1]}function te(e){return e==="x"?"y":"x"}function re(e){return e==="y"?"height":"width"}function q(e){let t=e[0];return t==="t"||t==="b"?"y":"x"}function le(e){return te(q(e))}function $e(e){return{top:0,right:0,bottom:0,left:0,...e}}function ce(e){return typeof e!="number"?$e(e):{top:e,right:e,bottom:e,left:e}}function E(e){let{x:t,y:o,width:i,height:s}=e;return{width:i,height:s,top:o,left:t,right:t+i,bottom:o+s,x:t,y:o}}function ae(e,t,o){let{reference:i,floating:s}=e,c=q(t),l=le(t),n=re(l),r=K(t),a=c==="y",u=i.x+i.width/2-s.width/2,f=i.y+i.height/2-s.height/2,h=i[n]/2-s[n]/2,d;switch(r){case"top":d={x:u,y:i.y-s.height};break;case"bottom":d={x:u,y:i.y+i.height};break;case"right":d={x:i.x+i.width,y:f};break;case"left":d={x:i.x-s.width,y:f};break;default:d={x:i.x,y:i.y}}switch(ee(t)){case"start":d[l]-=h*(o&&a?-1:1);break;case"end":d[l]+=h*(o&&a?-1:1);break}return d}async function de(e,t){var o;t===void 0&&(t={});let{x:i,y:s,platform:c,rects:l,elements:n,strategy:r}=e,{boundary:a="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:h=!1,padding:d=0}=X(t,e),m=ce(d),b=n[h?f==="floating"?"reference":"floating":f],g=E(await c.getClippingRect({element:(o=await(c.isElement==null?void 0:c.isElement(b)))==null||o?b:b.contextElement||await(c.getDocumentElement==null?void 0:c.getDocumentElement(n.floating)),boundary:a,rootBoundary:u,strategy:r})),w=f==="floating"?{x:i,y:s,width:l.floating.width,height:l.floating.height}:l.reference,R=await(c.getOffsetParent==null?void 0:c.getOffsetParent(n.floating)),x=await(c.isElement==null?void 0:c.isElement(R))?await(c.getScale==null?void 0:c.getScale(R))||{x:1,y:1}:{x:1,y:1},L=E(c.convertOffsetParentRelativeRectToViewportRelativeRect?await c.convertOffsetParentRelativeRectToViewportRelativeRect({elements:n,rect:w,offsetParent:R,strategy:r}):w);return{top:(g.top-L.top+m.top)/x.y,bottom:(L.bottom-g.bottom+m.bottom)/x.y,left:(g.left-L.left+m.left)/x.x,right:(L.right-g.right+m.right)/x.x}}var Me=50,fe=async(e,t,o)=>{let{placement:i="bottom",strategy:s="absolute",middleware:c=[],platform:l}=o,n=l.detectOverflow?l:{...l,detectOverflow:de},r=await(l.isRTL==null?void 0:l.isRTL(t)),a=await l.getElementRects({reference:e,floating:t,strategy:s}),{x:u,y:f}=ae(a,i,r),h=i,d=0,m={};for(let p=0;p<c.length;p++){let b=c[p];if(!b)continue;let{name:g,fn:w}=b,{x:R,y:x,data:L,reset:T}=await w({x:u,y:f,initialPlacement:i,placement:h,strategy:s,middlewareData:m,rects:a,platform:n,elements:{reference:e,floating:t}});u=R??u,f=x??f,m[g]={...m[g],...L},T&&d<Me&&(d++,typeof T=="object"&&(T.placement&&(h=T.placement),T.rects&&(a=T.rects===!0?await l.getElementRects({reference:e,floating:t,strategy:s}):T.rects),{x:u,y:f}=ae(a,h,r)),p=-1)}return{x:u,y:f,placement:h,strategy:s,middlewareData:m}};var He=new Set(["left","top"]);async function Ve(e,t){let{placement:o,platform:i,elements:s}=e,c=await(i.isRTL==null?void 0:i.isRTL(s.floating)),l=K(o),n=ee(o),r=q(o)==="y",a=He.has(l)?-1:1,u=c&&r?-1:1,f=X(t,e),{mainAxis:h,crossAxis:d,alignmentAxis:m}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return n&&typeof m=="number"&&(d=n==="end"?m*-1:m),r?{x:d*u,y:h*a}:{x:h*a,y:d*u}}var ue=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var o,i;let{x:s,y:c,placement:l,middlewareData:n}=t,r=await Ve(t,e);return l===((o=n.offset)==null?void 0:o.placement)&&(i=n.arrow)!=null&&i.alignmentOffset?{}:{x:s+r.x,y:c+r.y,data:{...r,placement:l}}}}},he=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:o,y:i,placement:s,platform:c}=t,{mainAxis:l=!0,crossAxis:n=!1,limiter:r={fn:g=>{let{x:w,y:R}=g;return{x:w,y:R}}},...a}=X(e,t),u={x:o,y:i},f=await c.detectOverflow(t,a),h=q(K(s)),d=te(h),m=u[d],p=u[h];if(l){let g=d==="y"?"top":"left",w=d==="y"?"bottom":"right",R=m+f[g],x=m-f[w];m=Z(R,m,x)}if(n){let g=h==="y"?"top":"left",w=h==="y"?"bottom":"right",R=p+f[g],x=p-f[w];p=Z(R,p,x)}let b=r.fn({...t,[d]:m,[h]:p});return{...b,data:{x:b.x-o,y:b.y-i,enabled:{[d]:l,[h]:n}}}}}};function j(){return typeof window<"u"}function D(e){return ge(e)?(e.nodeName||"").toLowerCase():"#document"}function y(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function O(e){var t;return(t=(ge(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ge(e){return j()?e instanceof Node||e instanceof y(e).Node:!1}function v(e){return j()?e instanceof Element||e instanceof y(e).Element:!1}function S(e){return j()?e instanceof HTMLElement||e instanceof y(e).HTMLElement:!1}function me(e){return!j()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof y(e).ShadowRoot}function B(e){let{overflowLine truncated
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
var Nc=Object.defineProperty;var zc=(s,t,e)=>t in s?Nc(s,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[t]=e;var S=(s,t,e)=>zc(s,typeof t!="symbol"?t+"":t,e);function ps(s){return s+.5|0}var Jt=(s,t,e)=>Math.max(Math.min(s,e),t);function gs(s){return Jt(ps(s*2.55),0,255)}function Kt(s){return Jt(ps(s*255),0,255)}function Wt(s){return Jt(ps(s/2.55)/100,0,1)}function oo(s){return Jt(ps(s*100),0,100)}var bt={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},kn=[..."0123456789ABCDEF"],Vc=s=>kn[s&15],Wc=s=>kn[(s&240)>>4]+kn[s&15],ni=s=>(s&240)>>4===(s&15),Bc=s=>ni(s.r)&&ni(s.g)&&ni(s.b)&&ni(s.a);function Hc(s){var t=s.length,e;return s[0]==="#"&&(t===4||t===5?e={r:255&bt[s[1]]*17,g:255&bt[s[2]]*17,b:255&bt[s[3]]*17,a:t===5?bt[s[4]]*17:255}:(t===7||t===9)&&(e={r:bt[s[1]]<<4|bt[s[2]],g:bt[s[3]]<<4|bt[s[4]],b:bt[s[5]]<<4|bt[s[6]],a:t===9?bt[s[7]]<<4|bt[s[8]]:255})),e}var $c=(s,t)=>s<255?t(s):"";function jc(s){var t=Bc(s)?Vc:Wc;return s?"#"+t(s.r)+t(s.g)+t(s.b)+$c(s.a,t):void 0}var Uc=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function ho(s,t,e){let i=t*Math.min(e,1-e),n=(r,o=(r+s/30)%12)=>e-i*Math.max(Math.min(o-3,9-o,1),-1);return[n(0),n(8),n(4)]}function Yc(s,t,e){let i=(n,r=(n+s/60)%6)=>e-e*t*Math.max(Math.min(r,4-r,1),0);return[i(5),i(3),i(1)]}function Zc(s,t,e){let i=ho(s,1,.5),n;for(t+e>1&&(n=1/(t+e),t*=n,e*=n),n=0;n<3;n++)i[n]*=1-t-e,i[n]+=t;return i}function qc(s,t,e,i,n){return s===n?(t-e)/i+(t<e?6:0):t===n?(e-s)/i+2:(s-t)/i+4}function vn(s){let e=s.r/255,i=s.g/255,n=s.b/255,r=Math.max(e,i,n),o=Math.min(e,i,n),a=(r+o)/2,l,c,h;return r!==o&&(h=r-o,c=a>.5?h/(2-r-o):h/(r+o),l=qc(e,i,n,h,r),l=l*60+.5),[l|0,c||0,a]}function Sn(s,t,e,i){return(Array.isArray(t)?s(t[0],t[1],t[2]):s(t,e,i)).map(Kt)}function Mn(s,t,e){return Sn(ho,s,t,e)}function Gc(s,t,e){return Sn(Zc,s,t,e)}function Xc(s,t,e){return Sn(Yc,s,t,e)}function uo(s){return(s%360+360)%360}function Jc(s){let t=Uc.exec(s),e=255,i;if(!t)return;t[5]!==i&&(e=t[6]?gs(+t[5]):Kt(+t[5]));let n=uo(+t[2]),r=+t[3]/100,o=+t[4]/100;return t[1]==="hwb"?i=Gc(n,r,o):t[1]==="hsv"?i=Xc(n,r,o):i=Mn(n,r,o),{r:i[0],g:i[1],b:i[2],a:e}}function Kc(s,t){var e=vn(s);e[0]=uo(e[0]+t),e=Mn(e),s.r=e[0],s.g=e[1],s.b=e[2]}function Qc(s){if(!s)return;let t=vn(s),e=t[0],i=oo(t[1]),n=oo(t[2]);return s.a<255?`hsla(${e}, ${i}%, ${n}%, ${Wt(s.a)})`:`hsl(${e}, ${i}%, ${n}%)`}var ao={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},lo={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};functionLine truncated
|
||||||
|
`)>-1?s.split(`
|
||||||
|
`):s}function Df(s,t){let{element:e,datasetIndex:i,index:n}=t,r=s.getDatasetMeta(i).controller,{label:o,value:a}=r.getLabelAndValue(n);return{chart:s,label:o,parsed:r.getParsed(n),raw:s.data.datasets[i].data[n],formattedValue:a,dataset:r.getDataset(),dataIndex:n,datasetIndex:i,element:e}}function Ta(s,t){let e=s.chart.ctx,{body:i,footer:n,title:r}=s,{boxWidth:o,boxHeight:a}=t,l=X(t.bodyFont),c=X(t.titleFont),h=X(t.footerFont),u=r.length,d=n.length,f=i.length,g=st(t.padding),m=g.height,p=0,b=i.reduce((w,x)=>w+x.before.length+x.lines.length+x.after.length,0);if(b+=s.beforeBody.length+s.afterBody.length,u&&(m+=u*c.lineHeight+(u-1)*t.titleSpacing+t.titleMarginBottom),b){let w=t.displayColors?Math.max(a,l.lineHeight):l.lineHeight;m+=f*w+(b-f)*l.lineHeight+(b-1)*t.bodySpacing}d&&(m+=t.footerMarginTop+d*h.lineHeight+(d-1)*t.footerSpacing);let y=0,_=function(w){p=Math.max(p,e.measureText(w).width+y)};return e.save(),e.font=c.string,N(s.title,_),e.font=l.string,N(s.beforeBody.concat(s.afterBody),_),y=t.displayColors?o+2+t.boxPadding:0,N(i,w=>{N(w.before,_),N(w.lines,_),N(w.after,_)}),y=0,e.font=h.string,N(s.footer,_),e.restore(),p+=g.width,{width:p,height:m}}function Cf(s,t){let{y:e,height:i}=t;return e<i/2?"top":e>s.height-i/2?"bottom":"center"}function Pf(s,t,e,i){let{x:n,width:r}=i,o=e.caretSize+e.caretPadding;if(s==="left"&&n+r+o>t.width||s==="right"&&n-r-o<0)return!0}function Af(s,t,e,i){let{x:n,width:r}=e,{width:o,chartArea:{left:a,right:l}}=s,c="center";return i==="center"?c=n<=(a+l)/2?"left":"right":n<=r/2?c="left":n>=o-r/2&&(c="right"),Pf(c,s,t,e)&&(c="center"),c}function Oa(s,t,e){let i=e.yAlign||t.yAlign||Cf(s,e);return{xAlign:e.xAlign||t.xAlign||Af(s,t,e,i),yAlign:i}}function Ef(s,t){let{x:e,width:i}=s;return t==="right"?e-=i:t==="center"&&(e-=i/2),e}function If(s,t,e){let{y:i,height:n}=s;return t==="top"?i+=e:t==="bottom"?i-=n+e:i-=n/2,i}function Da(s,t,e,i){let{caretSize:n,caretPadding:r,cornerRadius:o}=s,{xAlign:a,yAlign:l}=e,c=n+r,{topLeft:h,topRight:u,bottomLeft:d,bottomRight:f}=jt(o),g=Ef(t,a),m=If(t,l,c);return l==="center"?a==="left"?g+=c:a==="right"&&(g-=c):a==="left"?g-=Math.max(h,d)+n:a==="right"&&(g+=Math.max(u,f)+n),{x:K(g,0,i.width-t.width),y:K(m,0,i.height-t.height)}}function $i(s,t,e){let i=st(e.padding);return t==="center"?s.x+s.width/2:t==="right"?s.x+s.width-i.right:s.x+i.left}function Ca(s){return Rt([],Zt(s))}function Lf(s,t,e){return Ft(s,{tooltip:t,tooltipItems:e,type:"tooltip"})}function Pa(s,t){let e=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return e?s.override(e):s}var rl={beforeTitle:Ot,title(s){if(s.length>0){let t=s[0],e=t.chart.data.labels,i=e?e.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(i>0&&t.dataIndex<i)return e[t.dataIndex]}return""},afterTitle:Ot,beforeBody:Ot,beforeLabel:Ot,label(s){if(this&&this.options&&this.options.mode==="dataset")return s.label+": "+s.formattedValue||s.formattedValue;let t=s.dataset.label||"";t&&(t+=": ");let e=s.formattedValue;return E(e)||(t+=e),t},labelColor(s){let e=s.chart.getDatasetMeta(s.datasetIndex).controller.getStyle(s.dataIndex);return{borderColor:e.borderColor,backgroundColor:e.backgroundColor,borderWidth:e.borderWidth,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(s){let e=s.chart.getDatasetMeta(s.datasetIndex).controller.getStyle(s.dataIndex);return{pointStyle:e.pointStyle,rotation:e.rotation}},afterLabel:Ot,afterBody:Ot,beforeFooter:Ot,footer:Ot,afterFooter:Ot};function lt(s,t,e,i){let n=s[t].call(e,i);return typeof n>"u"?rl[t].call(e,i):n}var $s=class extends ft{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){let t=this._cachedAnimations;if(t)return t;let e=this.chart,i=this.options.setContext(this.getContext()),n=i.enabled&&e.options.animation&&i.animations,r=new Zi(this.chart,n);return n._cacheable&&(this._cachedAnimations=Object.freeze(r)),r}getContext(){return this.$context||(this.$context=Lf(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,e){let{callbacks:i}=e,n=lt(i,"beforeTitle",this,t),r=lt(i,"title",this,t),o=lt(i,"afterTitle",this,t),a=[];return a=Rt(a,Zt(n)),a=Rt(a,Zt(r)),a=Rt(a,Zt(o)),a}getBeforeBody(t,e){return Ca(lt(e.callbacks,"beforeBody",this,t))}getBody(t,e){let{callbacks:i}=e,n=[];return N(t
Line truncated
|
||||||
|
/*! Bundled license information:
|
||||||
|
|
||||||
|
@kurkle/color/dist/color.esm.js:
|
||||||
|
(*!
|
||||||
|
* @kurkle/color v0.3.4
|
||||||
|
* https://github.com/kurkle/color#readme
|
||||||
|
* (c) 2024 Jukka Kurkela
|
||||||
|
* Released under the MIT License
|
||||||
|
*)
|
||||||
|
|
||||||
|
chart.js/dist/chunks/helpers.dataset.js:
|
||||||
|
chart.js/dist/chart.js:
|
||||||
|
chart.js/dist/helpers.js:
|
||||||
|
(*!
|
||||||
|
* Chart.js v4.5.1
|
||||||
|
* https://www.chartjs.org
|
||||||
|
* (c) 2025 Chart.js Contributors
|
||||||
|
* Released under the MIT License
|
||||||
|
*)
|
||||||
|
|
||||||
|
chartjs-adapter-luxon/dist/chartjs-adapter-luxon.esm.js:
|
||||||
|
(*!
|
||||||
|
* chartjs-adapter-luxon v1.3.1
|
||||||
|
* https://www.chartjs.org
|
||||||
|
* (c) 2023 chartjs-adapter-luxon Contributors
|
||||||
|
* Released under the MIT license
|
||||||
|
*)
|
||||||
|
*/
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
var Qn=Object.defineProperty;var to=(i,t,e)=>t in i?Qn(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e;var v=(i,t,e)=>to(i,typeof t!="symbol"?t+"":t,e);function qt(i){return i+.5|0}var rt=(i,t,e)=>Math.max(Math.min(i,e),t);function Xt(i){return rt(qt(i*2.55),0,255)}function lt(i){return rt(qt(i*255),0,255)}function et(i){return rt(qt(i/2.55)/100,0,1)}function Gi(i){return rt(qt(i*100),0,100)}var K={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},Ge=[..."0123456789ABCDEF"],eo=i=>Ge[i&15],io=i=>Ge[(i&240)>>4]+Ge[i&15],pe=i=>(i&240)>>4===(i&15),so=i=>pe(i.r)&&pe(i.g)&&pe(i.b)&&pe(i.a);function no(i){var t=i.length,e;return i[0]==="#"&&(t===4||t===5?e={r:255&K[i[1]]*17,g:255&K[i[2]]*17,b:255&K[i[3]]*17,a:t===5?K[i[4]]*17:255}:(t===7||t===9)&&(e={r:K[i[1]]<<4|K[i[2]],g:K[i[3]]<<4|K[i[4]],b:K[i[5]]<<4|K[i[6]],a:t===9?K[i[7]]<<4|K[i[8]]:255})),e}var oo=(i,t)=>i<255?t(i):"";function ao(i){var t=so(i)?eo:io;return i?"#"+t(i.r)+t(i.g)+t(i.b)+oo(i.a,t):void 0}var ro=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function ts(i,t,e){let s=t*Math.min(e,1-e),n=(o,a=(o+i/30)%12)=>e-s*Math.max(Math.min(a-3,9-a,1),-1);return[n(0),n(8),n(4)]}function lo(i,t,e){let s=(n,o=(n+i/60)%6)=>e-e*t*Math.max(Math.min(o,4-o,1),0);return[s(5),s(3),s(1)]}function co(i,t,e){let s=ts(i,1,.5),n;for(t+e>1&&(n=1/(t+e),t*=n,e*=n),n=0;n<3;n++)s[n]*=1-t-e,s[n]+=t;return s}function ho(i,t,e,s,n){return i===n?(t-e)/s+(t<e?6:0):t===n?(e-i)/s+2:(i-t)/s+4}function Je(i){let e=i.r/255,s=i.g/255,n=i.b/255,o=Math.max(e,s,n),a=Math.min(e,s,n),r=(o+a)/2,l,c,h;return o!==a&&(h=o-a,c=r>.5?h/(2-o-a):h/(o+a),l=ho(e,s,n,h,o),l=l*60+.5),[l|0,c||0,r]}function Ze(i,t,e,s){return(Array.isArray(t)?i(t[0],t[1],t[2]):i(t,e,s)).map(lt)}function Qe(i,t,e){return Ze(ts,i,t,e)}function uo(i,t,e){return Ze(co,i,t,e)}function fo(i,t,e){return Ze(lo,i,t,e)}function es(i){return(i%360+360)%360}function go(i){let t=ro.exec(i),e=255,s;if(!t)return;t[5]!==s&&(e=t[6]?Xt(+t[5]):lt(+t[5]));let n=es(+t[2]),o=+t[3]/100,a=+t[4]/100;return t[1]==="hwb"?s=uo(n,o,a):t[1]==="hsv"?s=fo(n,o,a):s=Qe(n,o,a),{r:s[0],g:s[1],b:s[2],a:e}}function po(i,t){var e=Je(i);e[0]=es(e[0]+t),e=Qe(e),i.r=e[0],i.g=e[1],i.b=e[2]}function mo(i){if(!i)return;let t=Je(i),e=t[0],s=Gi(t[1]),n=Gi(t[2]);return i.a<255?`hsla(${e}, ${s}%, ${n}%, ${et(i.a)})`:`hsl(${e}, ${s}%, ${n}%)`}var Ji={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},Zi={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function bo(){let i={Line truncated
|
||||||
|
/*! Bundled license information:
|
||||||
|
|
||||||
|
@kurkle/color/dist/color.esm.js:
|
||||||
|
(*!
|
||||||
|
* @kurkle/color v0.3.4
|
||||||
|
* https://github.com/kurkle/color#readme
|
||||||
|
* (c) 2024 Jukka Kurkela
|
||||||
|
* Released under the MIT License
|
||||||
|
*)
|
||||||
|
|
||||||
|
chart.js/dist/chunks/helpers.dataset.js:
|
||||||
|
chart.js/dist/chart.js:
|
||||||
|
(*!
|
||||||
|
* Chart.js v4.5.1
|
||||||
|
* https://www.chartjs.org
|
||||||
|
* (c) 2025 Chart.js Contributors
|
||||||
|
* Released under the MIT License
|
||||||
|
*)
|
||||||
|
*/
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 91 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 62 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 4.0 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 15 KiB |
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" width="151" height="150" viewBox="0 0 151 150"><metadata><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/"><rdf:Description><dc:creator>RealFaviconGenerator</dc:creator><dc:source>https://realfavicongenerator.net</dc:source></rdf:Description></rdf:RDF></metadata><image width="151" height="150" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJcAAACWCAYAAADTwxrcAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAOdEVYdFNvZnR3YXJlAEZpZ21hnrGWYwAACYRJREFUeAHtnctuG0cWhv8qJuuRgWSAWU1nMrO28gRuP4FkzANIegJZyAXIStQqQOLA8hOY2ieR/QSmnyDMOgnSuwCJAzLrmF05p6spURSvYpNddfp8gO6UxGb9fc6p21+AoiiKoiiKoiiKoiiKoiiKoiiKoiiKoiiKRAyUxVz2d+j9TvH5o3sZlKVQcY1z2d9FjhQW9+GwS99JMBLVbbLizaCHIV6jhS4JbwDlChXXZT+l93skpkPMFtKydOnvXOD/9zpQGiwuFpXDKX2Wono4onXo40WT02jzxLVZUU3iRfbo3hkaSHPE5YvyUxLWY2wfFtnDpkUxiybAhbrD9zUJi0nof/9Cz+MUDUK+uF72D6hhX8H3/OrFoU0Ce4qGIDstcqTgBg2PLr3yj6QPXcgVV7jCGtEr6zCxApOZFr/p7wcuLIbrwEsIRp64LvsJXdVzxEEquQaTlRZ5uIF7hSEU76vg02MXwpAWubirnyA2HEVaPw4nCjni8mNZdY1jrUsCf2OIQo64Yi+O+cbwk+hikCGub/uHiDEdTuJkRS8Z4jJiGiWVFL3iF5dvjARScNiHECRErgPI4kBKzzF+cQm600t2kMu4prjF5VOiuPEhWPsAAohbXPlWVpNuH5dr5KodAxF3+BR2ijnSyIm95pKXEq/ZReTELq7oG2Amefw3TrziEjjRO0GCyIk5ckkXV/Q0Y/ePUgsqLmVjqLiUjRGvuOTvXo5+V1DskUvuvj9bWDRFTeziyiAXjVw18wPk0kPkxC0uhy5k0pOwEztucVmx4noNAcQtLt9j7EIaBi8gAAkrUUXc5WNkUnZfxy8ui3NIGpIwEGNxGb+4fOF7ARlkEJTmpexblBG9nCz3Zxni4gZxeIa4ycoULwY5E9e+YTLECtdawlwG5YiLG8bgCDFiLHvVdyAMWUtufBc+tvSYAbnIQxBkGu5+12dr8BThw9H2I6nLh2QuFmQb7hjqL07jgtelyRSXr78eImSBeWGJmOaZhdxlzhwRwhTYoBRWB8KRvYZ+JLBwJoJHB0x10ACac2rZt/12rQ6ExpDA3VGTTpNt1nmLbO7hjXm3aQPAafCkKdFqnGaeFHvZPyzNbRNsjkExJcUzBw09+7rZZ1x7kbHtZYrqaLyoRugB6oz3wuLDqPZwN6ENyk4DL/0Rsf69ClRck3j3nN3ijW2MLP596zEOf9Irl9HPB8U6/gYfkq4oiqIoiqIoiqIoihIIWxnn+hVfJNO+/y98nkHZCO6XwpB4minxwHywnW14lYqrj6c7b/GWBiDtnoFLDMyuo4+Y/wR6Dsjosa+HGHb/ic+itw7aNoWQhjTD4E8U4QHgBPPdrnlGoUeDwb3CDqGFHgkuQ8VUIq7f8VVK4jigt30S01oW3vQ3MhJbtwV7dg8nGZSpFILKcUgv2B4JJMW6GJppyHFh/osOKmItcb3B14d0mVVP/I5hOiqym5Tp7piE8Bib8eLnzbkd+nixbjS7k7jKSMVLVlJsBRXZFkQ1Ce9iP1snkq0kLq6pcuSnlPoeY8uU6fLsPXzcQcMgYaUkqueo48gWTpcGR3eJYkuLi4S1S8K6XFSgbxoHc/4+Pj5BQyBhcbSq20OCo9gJRbGV9iIsJa43eMLF+vm6xXpVcBSzsA8lp8myYOdotY9QsGhTBFt6d/hCcf2BrzkNthEYkgVWCot3jW9zrf9yrCCwueL6A0+Oqc4J1tZHqsDcz/geYZ8l2TEfLjZ9mblvkVLhfsjCYrj+ozrwFdWDCYRAUespwj+k9JCe58JtelPFxY1FUeEpIoAFRiP7zyEAilin5VBD+ORok8AO5j3ETv+9/FXdvcIVSWnsLY5GmUEx3AC0ERPUi6Xnncz68S1xlQX8zF8IFY60v+HL0NPJVIoG8j3D2Nih1DHzed8QF6fDEHuGy0LFfRSpfArHqGOAtApoXpPS+dSscUNcAmqX1M93xkMZtaJO6cRpOT11gytx8Xwh4nDjmwuNrdRnNnIX8sie73R2pt0gV+IqJ6Kjh+vFWKJXWQwfQgbHk9GrEFc5TpRCDO4AMSAjao3w68vGKMQ1RC7pIpm0TPOhk0ISpvDauML67wm7SE+KgHE/Fs8vgSS45ziWGi0vpYlxXGsRFmYPIWMDWu1QJWOp0VJKjHLgcRE0L7rLixsRLg8gEYv715/CiRQX43ciBYvM1z2/Lke45roPuQTZgFSXiL2hMVZHWhrfSiCUYK/tLUJO12szmsy2Eov5Mf6BEDHCeom3KW4e2YccKHWh4lI2i4pL2RgqLmVjcG8xg1z+RJhsxcKoRjJ+x4OoYi+UesIZQqQV8UHvy1FoiqZ/8AOEEnBUziCXK3M5SouuB6HkyDMESPniZ5AIm8qVcEEvUlwctYJ2KWRHP4mMXZd9H592IbDAZHdChE0XErHX11UMReTAS4jDhX1NrWCORq6SjFJ+d/RFuRLVdSAITonv4ZOgG6+ou5y46NUd/6IQl7TUGEFK9Ljlva6iwN68nqsRehoTegYhsH8qIsD8j24COdGrM2lteSWud/DOuYzRetOJyq9LSvSyt6/jSlzUIAM2tEXE8M0RS9QaISR6daYZ8t6YuC6dkruIFL45onQZbCFmA+FsWtRibq2KaKHFdoQRFvemE6uNON31PNgbp8DYq36Gjfgtcfk730R1oTGmw0nMhziPMD3OPQRhpuHuGzxhP9RjBA4Ja2BhP5JgulvaKbGLc4LQMeia/+DhvIfMXCxIg5BsiXOBwBlieCLFzblIL7ZosNDLkoxP1Vj0oLkrUan+emwCntjOkR/R5HQHgohAYMXzW+a4lrni4uEJixZfaFBTKZwKJQprRFHge4FlCIvessJilj7753d81Q7BIK482OARCV/sOrQRQdVgDs8olbVXOWV2pVPL2POKGvZ5fRtpzQvqFR5xREWDcD+iTRGjrht7QAI/o8He8xV/bzVxMexCSEU0F/tb60n64/DcSegrHTZJLVFsjePw/K/fERbZXxi2qWjbmEVkWVs943nPpkWrWbifiqOHOYol2BQsqmERrbpYgzuLa8QmRKaiWkwhMn7NTYUOihWJ6vrPVQQbrQ2R7+dwaQvmwap1Gae+IdxLA/eiXF+mLEGZLvep4N67g9AGxYYKh5d8rvUqxfoyVCauSVhsbL5mYBOHPMHUf26zHMPeu3g30whVDYX315AE5510plk18QrYAfX8uuaD4IY6FEVRFEVRFEVRFEVRFEVRFEVRFEVRFEVRFKXJ/A2oC/VTZ0o/1AAAAABJRU5ErkJggg=="></image></svg>
|
||||||
|
After Width: | Height: | Size: 3.8 KiB |
+104
-6
@@ -1,12 +1,12 @@
|
|||||||
@import "tailwindcss";
|
@import "tailwindcss";
|
||||||
@import "./fonts.css";
|
@import "./fonts.css";
|
||||||
@import "./dropdown.css";
|
@import "./dropdown.css";
|
||||||
|
@import "./checkout.css";
|
||||||
|
|
||||||
/* Note for anyone theming the checkout module (resources/css/checkout.css,
|
/* checkout.css themes the cart/checkout module (.bbk-* classes). Its base
|
||||||
.bbk-* classes): it's deliberately plain, unlayered CSS, not inside any
|
styles (boboko-core's checkout.css) are plain, unlayered CSS, so theme
|
||||||
@layer — so override it with plain rules here too, not from inside
|
overrides must be plain rules too, never inside @layer components/utilities,
|
||||||
@layer components/utilities, which would lose to it. See checkout.css's
|
which would lose to them. */
|
||||||
file-level comment for why. */
|
|
||||||
@source '../../vendor/laravel/framework/src/Illuminate/Pagination/resources/views/*.blade.php';
|
@source '../../vendor/laravel/framework/src/Illuminate/Pagination/resources/views/*.blade.php';
|
||||||
@source '../../storage/framework/views/*.php';
|
@source '../../storage/framework/views/*.php';
|
||||||
@source '../**/*.blade.php';
|
@source '../**/*.blade.php';
|
||||||
@@ -241,6 +241,103 @@ @layer components {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* The page behind is dimmed while searching, fading with the overlay. */
|
||||||
|
#search-overlay::backdrop {
|
||||||
|
background-color: rgb(0 0 0 / 0);
|
||||||
|
transition:
|
||||||
|
background-color 0.2s ease,
|
||||||
|
display 0.2s allow-discrete,
|
||||||
|
overlay 0.2s allow-discrete;
|
||||||
|
}
|
||||||
|
|
||||||
|
#search-overlay:popover-open::backdrop {
|
||||||
|
background-color: rgb(0 0 0 / 0.3);
|
||||||
|
}
|
||||||
|
|
||||||
|
@starting-style {
|
||||||
|
#search-overlay:popover-open::backdrop {
|
||||||
|
background-color: rgb(0 0 0 / 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ── Mobile menu (popover) — wipes down from under the header ──── */
|
||||||
|
/* clip-path, not height: compositor-only, so the reveal never counts
|
||||||
|
toward CLS. */
|
||||||
|
.mobile-menu {
|
||||||
|
clip-path: inset(0 0 100% 0);
|
||||||
|
transition:
|
||||||
|
clip-path 0.4s cubic-bezier(0.61, 1, 0.88, 1),
|
||||||
|
display 0.4s allow-discrete,
|
||||||
|
overlay 0.4s allow-discrete;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mobile-menu:popover-open {
|
||||||
|
clip-path: inset(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
@starting-style {
|
||||||
|
.mobile-menu:popover-open {
|
||||||
|
clip-path: inset(0 0 100% 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ── Burger — three lines that morph into a flat X while the menu is
|
||||||
|
open. Lines are 4px tall, 7px apart, so ±11px meets in the middle. ── */
|
||||||
|
.burger span {
|
||||||
|
transition:
|
||||||
|
transform 0.4s cubic-bezier(0.61, 1, 0.88, 1),
|
||||||
|
opacity 0.2s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
header:has(#mobile-nav:popover-open) .burger span:nth-child(1) {
|
||||||
|
transform: translateY(11px) rotate(25deg);
|
||||||
|
}
|
||||||
|
|
||||||
|
header:has(#mobile-nav:popover-open) .burger span:nth-child(2) {
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
header:has(#mobile-nav:popover-open) .burger span:nth-child(3) {
|
||||||
|
transform: translateY(-11px) rotate(-25deg);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ── Drawer (popover) — slides in from the left; mobile filters ─── */
|
||||||
|
.drawer {
|
||||||
|
transform: translateX(-100%);
|
||||||
|
transition:
|
||||||
|
transform 0.3s cubic-bezier(0.2, 0.78, 0.12, 0.86),
|
||||||
|
display 0.3s allow-discrete,
|
||||||
|
overlay 0.3s allow-discrete;
|
||||||
|
}
|
||||||
|
|
||||||
|
.drawer:popover-open {
|
||||||
|
transform: translateX(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
@starting-style {
|
||||||
|
.drawer:popover-open {
|
||||||
|
transform: translateX(-100%);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.drawer::backdrop {
|
||||||
|
background-color: rgb(0 0 0 / 0);
|
||||||
|
transition:
|
||||||
|
background-color 0.3s ease,
|
||||||
|
display 0.3s allow-discrete,
|
||||||
|
overlay 0.3s allow-discrete;
|
||||||
|
}
|
||||||
|
|
||||||
|
.drawer:popover-open::backdrop {
|
||||||
|
background-color: rgb(0 0 0 / 0.3);
|
||||||
|
}
|
||||||
|
|
||||||
|
@starting-style {
|
||||||
|
.drawer:popover-open::backdrop {
|
||||||
|
background-color: rgb(0 0 0 / 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* ── Shared underline-slide animation ────────────────────────── */
|
/* ── Shared underline-slide animation ────────────────────────── */
|
||||||
.underline-slide {
|
.underline-slide {
|
||||||
background-image: linear-gradient(currentColor, currentColor);
|
background-image: linear-gradient(currentColor, currentColor);
|
||||||
@@ -396,8 +493,9 @@ @layer components {
|
|||||||
@apply font-bold text-black;
|
@apply font-bold text-black;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Wide tables scroll sideways on phones instead of pushing the page wider. */
|
||||||
.legal-content table {
|
.legal-content table {
|
||||||
@apply w-full border-collapse text-left text-sm;
|
@apply w-full border-collapse text-left text-sm max-sm:block max-sm:overflow-x-auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.legal-content th,
|
.legal-content th,
|
||||||
|
|||||||
@@ -0,0 +1,504 @@
|
|||||||
|
/*
|
||||||
|
* 3dealer theme for the cart + checkout module (.bbk-* classes).
|
||||||
|
*
|
||||||
|
* Sits on top of boboko-core's generic checkout.css, which loads first (its
|
||||||
|
* own @vite entry). Rules here are deliberately plain and unlayered: the base
|
||||||
|
* file is unlayered too, and an unlayered rule beats any rule inside
|
||||||
|
* @layer components/utilities. Don't wrap this file in a layer.
|
||||||
|
*
|
||||||
|
* Everything maps onto an existing 3dealer pattern (x-ui.input, x-ui.button,
|
||||||
|
* x-ui.checkbox, x-ui.quantity, account-page headings). Square everywhere:
|
||||||
|
* no border-radius.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* ═══════════════════════════════════════════════════════════════════
|
||||||
|
TOKENS — the module's own variables, pointed at ours
|
||||||
|
═══════════════════════════════════════════════════════════════════ */
|
||||||
|
:root {
|
||||||
|
--bbk-font: var(--font-sans);
|
||||||
|
|
||||||
|
--bbk-color-text: var(--color-black);
|
||||||
|
--bbk-color-muted: var(--color-neutral-500);
|
||||||
|
--bbk-color-bg: var(--color-neutral-200);
|
||||||
|
--bbk-color-bg-muted: var(--color-neutral-300);
|
||||||
|
--bbk-color-border: var(--color-black);
|
||||||
|
--bbk-color-accent: var(--color-black);
|
||||||
|
--bbk-color-accent-text: var(--color-neutral-200);
|
||||||
|
--bbk-color-danger: var(--color-red-600);
|
||||||
|
|
||||||
|
--bbk-radius: 0;
|
||||||
|
--bbk-radius-sm: 0;
|
||||||
|
--bbk-shadow: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bbk-cart,
|
||||||
|
.bbk-checkout-page,
|
||||||
|
.bbk-confirmation {
|
||||||
|
font-size: inherit;
|
||||||
|
line-height: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ═══════════════════════════════════════════════════════════════════
|
||||||
|
SHARED CONTROLS
|
||||||
|
═══════════════════════════════════════════════════════════════════ */
|
||||||
|
|
||||||
|
/* Primary CTA — x-ui.button "primary". The offset black block is a
|
||||||
|
box-shadow here rather than .btn-primary's ::before/::after, because the
|
||||||
|
module's buttons have no inner <span> to lift the label above a
|
||||||
|
positioned ::before. Same look, same easing. No `uppercase`: the module
|
||||||
|
markup can't carry the class strip-accents.js needs for Greek. */
|
||||||
|
.bbk-cart-checkout,
|
||||||
|
.bbk-checkout-continue {
|
||||||
|
@apply border-black bg-neutral-200 px-6 py-3.5 text-base font-bold italic text-black;
|
||||||
|
box-shadow: 10px 10px 0 var(--color-black);
|
||||||
|
transition: box-shadow 0.35s cubic-bezier(0.2, 0.78, 0.12, 0.86);
|
||||||
|
}
|
||||||
|
|
||||||
|
.bbk-checkout-continue {
|
||||||
|
@apply px-[46px] py-5 text-[19px];
|
||||||
|
}
|
||||||
|
|
||||||
|
.bbk-cart-checkout:hover,
|
||||||
|
.bbk-checkout-continue:hover {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bbk-cart-checkout:not(:disabled):hover,
|
||||||
|
.bbk-checkout-continue:not(:disabled):hover {
|
||||||
|
box-shadow: 0 0 0 var(--color-black);
|
||||||
|
}
|
||||||
|
|
||||||
|
.bbk-cart-checkout:disabled,
|
||||||
|
.bbk-checkout-continue:disabled {
|
||||||
|
@apply opacity-50;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Secondary button — x-ui.button "secondary", size sm */
|
||||||
|
.bbk-cart-coupon-submit {
|
||||||
|
@apply border-black bg-transparent px-6 py-2 text-sm font-semibold transition-colors hover:bg-black hover:text-neutral-200;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Text inputs — x-ui.input: bottom border only, transparent */
|
||||||
|
.bbk-field-input,
|
||||||
|
.bbk-cart-coupon-input,
|
||||||
|
.bbk-checkout-box-now-locker-search {
|
||||||
|
@apply border-0 border-b border-black bg-transparent px-0 py-2 placeholder:text-neutral-400;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bbk-field-input:focus,
|
||||||
|
.bbk-field-input:focus-visible,
|
||||||
|
.bbk-cart-coupon-input:focus-visible,
|
||||||
|
.bbk-checkout-box-now-locker-search:focus {
|
||||||
|
@apply outline-none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bbk-field-input:disabled {
|
||||||
|
@apply cursor-not-allowed bg-transparent text-black opacity-50;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bbk-field-input--error {
|
||||||
|
@apply border-red-600;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* x-ui.select — native arrow off, arrow-down icon in its place */
|
||||||
|
select.bbk-field-input {
|
||||||
|
@apply cursor-pointer appearance-none pr-10;
|
||||||
|
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' stroke='black'%3E%3Cpath fill='none' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' d='M12 5V19M12 19L6 13M12 19L18 13'/%3E%3C/svg%3E");
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-position: right 1rem center;
|
||||||
|
background-size: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* x-ui.textarea */
|
||||||
|
textarea.bbk-field-input {
|
||||||
|
@apply resize-none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Read-only value (the store's single country) — x-ui.input read-only */
|
||||||
|
.bbk-field-static {
|
||||||
|
@apply border-0 border-b border-black bg-transparent px-0 py-2 text-black opacity-60;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* x-ui.field */
|
||||||
|
.bbk-field {
|
||||||
|
@apply gap-2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bbk-field-row {
|
||||||
|
@apply gap-8;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bbk-field-label {
|
||||||
|
@apply text-black;
|
||||||
|
font-size: inherit;
|
||||||
|
font-weight: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bbk-field-error {
|
||||||
|
@apply text-sm;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* x-ui.checkbox — square box, brand fill when ticked. Radios in the
|
||||||
|
shipping/payment cards use the same box (square design, no circles). */
|
||||||
|
.bbk-checkbox {
|
||||||
|
@apply gap-3;
|
||||||
|
font-size: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bbk-checkbox--stacked {
|
||||||
|
@apply mt-0 text-sm;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bbk-checkbox--stacked a,
|
||||||
|
.bbk-checkout-withdrawal a,
|
||||||
|
.bbk-checkout-login-prompt a,
|
||||||
|
.bbk-checkout-note a {
|
||||||
|
@apply underline hover:no-underline;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bbk-checkbox input[type="checkbox"],
|
||||||
|
.bbk-checkout-shipping-option input[type="radio"],
|
||||||
|
.bbk-checkout-payment-option input[type="radio"] {
|
||||||
|
@apply relative size-4 shrink-0 cursor-pointer appearance-none border border-current bg-transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bbk-checkbox input[type="checkbox"]:checked::after,
|
||||||
|
.bbk-checkout-shipping-option input[type="radio"]:checked::after,
|
||||||
|
.bbk-checkout-payment-option input[type="radio"]:checked::after {
|
||||||
|
content: "";
|
||||||
|
position: absolute;
|
||||||
|
inset: 2px;
|
||||||
|
background: var(--color-brand);
|
||||||
|
}
|
||||||
|
|
||||||
|
.bbk-checkbox input[type="checkbox"]:focus-visible,
|
||||||
|
.bbk-checkout-shipping-option input[type="radio"]:focus-visible,
|
||||||
|
.bbk-checkout-payment-option input[type="radio"]:focus-visible {
|
||||||
|
@apply outline-2 outline-offset-2 outline-current;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ═══════════════════════════════════════════════════════════════════
|
||||||
|
CART DRAWER
|
||||||
|
═══════════════════════════════════════════════════════════════════ */
|
||||||
|
.bbk-cart-panel {
|
||||||
|
@apply border-l border-black;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bbk-cart-panel-header {
|
||||||
|
@apply px-8 py-6;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bbk-cart-heading {
|
||||||
|
@apply font-display text-h4 font-extrabold;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Icon buttons — same as the header's icons */
|
||||||
|
.bbk-cart-dismiss,
|
||||||
|
.bbk-cart-item-remove {
|
||||||
|
@apply text-black transition-opacity hover:bg-transparent hover:text-black hover:opacity-70;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bbk-cart-panel-body {
|
||||||
|
@apply p-8;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bbk-cart-error {
|
||||||
|
@apply px-8;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bbk-cart-items {
|
||||||
|
@apply mb-8 gap-6;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bbk-cart-item-media img,
|
||||||
|
.bbk-confirmation-line .bbk-cart-item-media img {
|
||||||
|
@apply border border-black;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bbk-cart-item-title {
|
||||||
|
@apply font-bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bbk-cart-item-variant,
|
||||||
|
.bbk-cart-item-unit,
|
||||||
|
.bbk-line-fields {
|
||||||
|
@apply text-sm;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bbk-cart-item-total {
|
||||||
|
@apply font-display font-bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Quantity stepper — x-ui.quantity */
|
||||||
|
.bbk-cart-qty-btn {
|
||||||
|
@apply size-8 bg-transparent text-xl font-bold text-black transition-colors hover:bg-black hover:text-neutral-200;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bbk-cart-qty-input {
|
||||||
|
@apply h-8 w-10 bg-transparent font-display font-bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bbk-cart-qty-btn:focus-visible,
|
||||||
|
.bbk-cart-qty-input:focus-visible {
|
||||||
|
@apply outline-2 outline-offset-0 outline-black;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Summary */
|
||||||
|
.bbk-cart-summary {
|
||||||
|
@apply gap-3 pt-6;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bbk-cart-coupon {
|
||||||
|
@apply mb-3;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bbk-cart-coupon-form {
|
||||||
|
@apply items-end gap-4;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Applied coupon — x-ui.status box */
|
||||||
|
.bbk-cart-coupon-applied {
|
||||||
|
@apply border-black bg-brand px-6 py-3 text-black;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bbk-cart-coupon-remove {
|
||||||
|
@apply text-sm text-black underline hover:text-black hover:no-underline;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bbk-cart-summary-row--total {
|
||||||
|
@apply mt-3 pt-4 font-display text-xl font-extrabold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bbk-cart-summary .bbk-cart-checkout {
|
||||||
|
@apply mt-6;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bbk-cart-empty {
|
||||||
|
@apply py-10;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ═══════════════════════════════════════════════════════════════════
|
||||||
|
CHECKOUT PAGE
|
||||||
|
═══════════════════════════════════════════════════════════════════ */
|
||||||
|
.bbk-checkout-page {
|
||||||
|
@apply max-w-6xl px-8 py-16 lg:px-16;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bbk-checkout-heading {
|
||||||
|
@apply mb-12 font-display text-h3 font-black tracking-tight sm:text-h2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bbk-checkout {
|
||||||
|
@apply gap-16;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bbk-checkout-main {
|
||||||
|
@apply gap-10;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bbk-checkout-section {
|
||||||
|
@apply gap-8 pb-10;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bbk-checkout-section-heading,
|
||||||
|
.bbk-checkout-summary-heading {
|
||||||
|
@apply font-display text-h4 font-extrabold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bbk-checkout-note,
|
||||||
|
.bbk-checkout-status,
|
||||||
|
.bbk-checkout-withdrawal,
|
||||||
|
.bbk-checkout-error {
|
||||||
|
@apply text-sm;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bbk-checkout-login-prompt a {
|
||||||
|
@apply font-bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bbk-invoice,
|
||||||
|
.bbk-checkout-shipping-fields {
|
||||||
|
@apply gap-8;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Shipping / payment choices — bordered cards that fill black when picked,
|
||||||
|
like x-ui.option-buttons' pressed state. */
|
||||||
|
.bbk-checkout-shipping-option,
|
||||||
|
.bbk-checkout-payment-option,
|
||||||
|
.bbk-checkout-shipping-confirmed {
|
||||||
|
@apply gap-4 px-6 py-4;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bbk-checkout-shipping-option,
|
||||||
|
.bbk-checkout-payment-option {
|
||||||
|
@apply transition-colors;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bbk-checkout-shipping-option:has(input:checked),
|
||||||
|
.bbk-checkout-payment-option:has(input:checked) {
|
||||||
|
@apply bg-black text-neutral-200;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bbk-checkout-shipping-option-name,
|
||||||
|
.bbk-checkout-payment-option-name {
|
||||||
|
@apply font-bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bbk-checkout-shipping-option-description {
|
||||||
|
@apply text-sm;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bbk-checkout-shipping-option:has(input:checked) .bbk-checkout-shipping-option-description {
|
||||||
|
@apply text-neutral-400;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bbk-checkout-shipping-option-price {
|
||||||
|
@apply font-display font-bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Box Now locker picker. Leaflet's own CSS arrives in a lazy chunk (after
|
||||||
|
this file), so its selectors are scoped under the picker to outrank it. */
|
||||||
|
.bbk-checkout-box-now-locker {
|
||||||
|
@apply mt-4 gap-4 p-6;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bbk-checkout-box-now-locker-label {
|
||||||
|
@apply text-base font-bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bbk-checkout-box-now-locker-map {
|
||||||
|
@apply border border-black;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bbk-checkout-box-now-locker-chosen {
|
||||||
|
@apply text-sm font-bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bbk-checkout-box-now-locker .leaflet-popup-content-wrapper,
|
||||||
|
.bbk-box-now-popup-image,
|
||||||
|
.bbk-box-now-popup-name::before {
|
||||||
|
border-radius: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bbk-checkout-box-now-locker .leaflet-popup-content-wrapper {
|
||||||
|
@apply border border-black bg-neutral-200 shadow-none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bbk-checkout-box-now-locker .leaflet-popup-tip {
|
||||||
|
@apply bg-neutral-200;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bbk-box-now-popup-name::before {
|
||||||
|
@apply bg-brand;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bbk-box-now-popup-note {
|
||||||
|
@apply bg-neutral-300;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bbk-box-now-popup-select {
|
||||||
|
@apply border border-black bg-black text-sm text-neutral-200 transition-colors hover:bg-neutral-200 hover:text-black;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bbk-box-now-popup-select:hover {
|
||||||
|
transform: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bbk-box-now-popup-select--selected,
|
||||||
|
.bbk-box-now-popup-select--selected:hover {
|
||||||
|
@apply border-neutral-500 bg-neutral-500 text-neutral-200;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Order summary column. The header is sticky too (lg:h-26), so the
|
||||||
|
aside sticks below it rather than behind it. */
|
||||||
|
.bbk-checkout-aside {
|
||||||
|
@apply top-32;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bbk-checkout-summary {
|
||||||
|
@apply bg-transparent p-8;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bbk-checkout-summary-heading {
|
||||||
|
@apply mb-6;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Payment */
|
||||||
|
.bbk-payment-element {
|
||||||
|
@apply my-2;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Processing overlay — square spinner, no radius */
|
||||||
|
.bbk-spinner {
|
||||||
|
@apply size-8;
|
||||||
|
border-color: var(--color-neutral-300);
|
||||||
|
border-top-color: var(--color-black);
|
||||||
|
border-radius: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ═══════════════════════════════════════════════════════════════════
|
||||||
|
CONFIRMATION PAGE — same shape as account/orders/show
|
||||||
|
═══════════════════════════════════════════════════════════════════ */
|
||||||
|
.bbk-confirmation {
|
||||||
|
@apply max-w-4xl px-8 py-16 lg:px-16;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bbk-confirmation-heading {
|
||||||
|
@apply mb-12 font-display text-h3 font-black tracking-tight sm:text-h2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bbk-confirmation-meta {
|
||||||
|
@apply mb-6 gap-3 border-y border-black py-6;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bbk-confirmation-meta-row {
|
||||||
|
font-size: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bbk-confirmation-meta-row dt {
|
||||||
|
@apply text-sm;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bbk-confirmation-meta-row dd {
|
||||||
|
@apply font-bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bbk-confirmation .bbk-checkout-note + .bbk-checkout-note {
|
||||||
|
@apply mt-2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bbk-confirmation-body {
|
||||||
|
@apply my-12 gap-12;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bbk-confirmation-lines {
|
||||||
|
@apply gap-6;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bbk-confirmation-line-name {
|
||||||
|
@apply font-bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bbk-confirmation-line-qty {
|
||||||
|
@apply font-normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bbk-confirmation-line-total {
|
||||||
|
@apply font-display font-bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bbk-confirmation-lines .bbk-cart-summary {
|
||||||
|
@apply mt-6;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bbk-confirmation-addresses {
|
||||||
|
@apply gap-8;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bbk-confirmation-address-heading {
|
||||||
|
@apply mb-3 font-display text-xl font-extrabold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bbk-address-lines {
|
||||||
|
@apply text-base text-black;
|
||||||
|
}
|
||||||
@@ -11,10 +11,19 @@ import { Controller } from '@hotwired/stimulus'
|
|||||||
// `change` covers native inputs (checkbox, select); the range slider emits its
|
// `change` covers native inputs (checkbox, select); the range slider emits its
|
||||||
// own `range-slider:change` on commit. Uses requestSubmit() (not submit()) so a
|
// own `range-slider:change` on commit. Uses requestSubmit() (not submit()) so a
|
||||||
// <turbo-frame> around the form still captures the navigation and validation runs.
|
// <turbo-frame> around the form still captures the navigation and validation runs.
|
||||||
|
//
|
||||||
|
// Optional data-auto-submit-media-value="(min-width: 64rem)" limits auto-submit
|
||||||
|
// to viewports matching that query — below it the form waits for its own submit
|
||||||
|
// button (e.g. the mobile filters drawer's "Apply").
|
||||||
export default class extends Controller {
|
export default class extends Controller {
|
||||||
static values = { delay: { type: Number, default: 300 } }
|
static values = {
|
||||||
|
delay: { type: Number, default: 300 },
|
||||||
|
media: String,
|
||||||
|
}
|
||||||
|
|
||||||
submit() {
|
submit() {
|
||||||
|
if (this.mediaValue && !window.matchMedia(this.mediaValue).matches) return
|
||||||
|
|
||||||
clearTimeout(this.#timer)
|
clearTimeout(this.#timer)
|
||||||
this.#timer = setTimeout(() => this.element.requestSubmit(), this.delayValue)
|
this.#timer = setTimeout(() => this.element.requestSubmit(), this.delayValue)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,8 +4,24 @@ import { Controller } from '@hotwired/stimulus'
|
|||||||
// header has no fixed height below `lg`, so on open we copy its current height
|
// header has no fixed height below `lg`, so on open we copy its current height
|
||||||
// onto --search-overlay-h and move focus into the field. Escape / click-away
|
// onto --search-overlay-h and move focus into the field. Escape / click-away
|
||||||
// close come from the Popover API; the fade is CSS (#search-overlay).
|
// close come from the Popover API; the fade is CSS (#search-overlay).
|
||||||
|
//
|
||||||
|
// Live search: as the shopper types (from minChars characters, after a short
|
||||||
|
// pause), the results frame under the bar loads the same /search endpoint the
|
||||||
|
// form submits to; SearchController answers that frame with the first few
|
||||||
|
// matches. Turbo cancels a frame's previous request when its src changes, so
|
||||||
|
// only the latest query's results land.
|
||||||
|
//
|
||||||
|
// ARIA combobox: the input keeps focus while ArrowUp/ArrowDown move
|
||||||
|
// aria-selected over the options (aria-activedescendant points at the current
|
||||||
|
// one) and Enter follows it; with nothing highlighted, Enter submits the form
|
||||||
|
// as usual. Each load's hidden summary is copied into the persistent
|
||||||
|
// role="status" region so screen readers announce the result count.
|
||||||
export default class extends Controller {
|
export default class extends Controller {
|
||||||
static targets = ['input']
|
static targets = ['input', 'form', 'results', 'status', 'summary', 'listbox', 'option']
|
||||||
|
static values = { minChars: { type: Number, default: 3 } }
|
||||||
|
|
||||||
|
#timer = null
|
||||||
|
#active = -1
|
||||||
|
|
||||||
connect() {
|
connect() {
|
||||||
this.element.addEventListener('toggle', this.#onToggle)
|
this.element.addEventListener('toggle', this.#onToggle)
|
||||||
@@ -13,6 +29,68 @@ export default class extends Controller {
|
|||||||
|
|
||||||
disconnect() {
|
disconnect() {
|
||||||
this.element.removeEventListener('toggle', this.#onToggle)
|
this.element.removeEventListener('toggle', this.#onToggle)
|
||||||
|
clearTimeout(this.#timer)
|
||||||
|
}
|
||||||
|
|
||||||
|
suggest() {
|
||||||
|
clearTimeout(this.#timer)
|
||||||
|
this.#timer = setTimeout(() => this.#load(), 250)
|
||||||
|
}
|
||||||
|
|
||||||
|
#load() {
|
||||||
|
const query = this.inputTarget.value.trim()
|
||||||
|
|
||||||
|
if (query.length < this.minCharsValue) {
|
||||||
|
this.resultsTarget.removeAttribute('src')
|
||||||
|
this.resultsTarget.innerHTML = ''
|
||||||
|
this.statusTarget.textContent = ''
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
const url = new URL(this.formTarget.action, window.location.href)
|
||||||
|
url.searchParams.set('q', query)
|
||||||
|
this.resultsTarget.src = url.toString()
|
||||||
|
}
|
||||||
|
|
||||||
|
navigate(event) {
|
||||||
|
const options = this.optionTargets
|
||||||
|
if (options.length === 0) return
|
||||||
|
|
||||||
|
if (event.key === 'ArrowDown') {
|
||||||
|
event.preventDefault()
|
||||||
|
this.#highlight((this.#active + 1) % options.length)
|
||||||
|
} else if (event.key === 'ArrowUp') {
|
||||||
|
event.preventDefault()
|
||||||
|
this.#highlight(this.#active <= 0 ? options.length - 1 : this.#active - 1)
|
||||||
|
} else if (event.key === 'Enter' && this.#active >= 0) {
|
||||||
|
event.preventDefault()
|
||||||
|
options[this.#active].click()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
summaryTargetConnected(summary) {
|
||||||
|
this.statusTarget.textContent = summary.textContent
|
||||||
|
}
|
||||||
|
|
||||||
|
listboxTargetConnected() {
|
||||||
|
this.#active = -1
|
||||||
|
this.inputTarget.setAttribute('aria-expanded', 'true')
|
||||||
|
this.inputTarget.removeAttribute('aria-activedescendant')
|
||||||
|
}
|
||||||
|
|
||||||
|
listboxTargetDisconnected() {
|
||||||
|
this.#active = -1
|
||||||
|
this.inputTarget.setAttribute('aria-expanded', 'false')
|
||||||
|
this.inputTarget.removeAttribute('aria-activedescendant')
|
||||||
|
}
|
||||||
|
|
||||||
|
#highlight(index) {
|
||||||
|
this.#active = index
|
||||||
|
this.optionTargets.forEach((option, i) => option.setAttribute('aria-selected', String(i === index)))
|
||||||
|
|
||||||
|
const option = this.optionTargets[index]
|
||||||
|
this.inputTarget.setAttribute('aria-activedescendant', option.id)
|
||||||
|
option.scrollIntoView({ block: 'nearest' })
|
||||||
}
|
}
|
||||||
|
|
||||||
#onToggle = (event) => {
|
#onToggle = (event) => {
|
||||||
|
|||||||
@@ -3,20 +3,25 @@ import { Controller } from "@hotwired/stimulus";
|
|||||||
const SCROLL_STEP = 1;
|
const SCROLL_STEP = 1;
|
||||||
|
|
||||||
export default class extends Controller {
|
export default class extends Controller {
|
||||||
static targets = ["main", "thumb", "track", "lightbox", "lightboxImage", "lightboxCounter"];
|
static targets = ["main", "thumb", "track", "arrow", "lightbox", "lightboxImage", "lightboxCounter"];
|
||||||
|
|
||||||
connect() {
|
connect() {
|
||||||
this.offset = 0;
|
this.offset = 0;
|
||||||
this.lightboxIndex = 0;
|
this.lightboxIndex = 0;
|
||||||
this.#syncHeight();
|
this.#syncHeight();
|
||||||
|
|
||||||
this.mainTarget.addEventListener("load", () => this.#syncHeight());
|
// Main image and thumbnails resize as their images load and on viewport
|
||||||
|
// changes; re-sync the track height and arrow visibility each time.
|
||||||
|
this._resizeObserver = new ResizeObserver(() => this.#syncHeight());
|
||||||
|
this._resizeObserver.observe(this.mainTarget);
|
||||||
|
this.thumbTargets.forEach((t) => this._resizeObserver.observe(t));
|
||||||
|
|
||||||
this._onKeydown = this.#handleKeydown.bind(this);
|
this._onKeydown = this.#handleKeydown.bind(this);
|
||||||
document.addEventListener("keydown", this._onKeydown);
|
document.addEventListener("keydown", this._onKeydown);
|
||||||
}
|
}
|
||||||
|
|
||||||
disconnect() {
|
disconnect() {
|
||||||
|
this._resizeObserver?.disconnect();
|
||||||
document.removeEventListener("keydown", this._onKeydown);
|
document.removeEventListener("keydown", this._onKeydown);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -103,6 +108,14 @@ export default class extends Controller {
|
|||||||
if (h > 0) {
|
if (h > 0) {
|
||||||
this.trackTarget.style.maxHeight = h + "px";
|
this.trackTarget.style.maxHeight = h + "px";
|
||||||
}
|
}
|
||||||
|
this.#toggleArrows();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Arrows stay in the layout (invisible, not hidden) so the thumbnail
|
||||||
|
// column keeps its alignment with the main image.
|
||||||
|
#toggleArrows() {
|
||||||
|
const overflowing = this.trackTarget.scrollHeight > this.trackTarget.clientHeight;
|
||||||
|
this.arrowTargets.forEach((a) => a.classList.toggle("invisible", !overflowing));
|
||||||
}
|
}
|
||||||
|
|
||||||
#handleKeydown(e) {
|
#handleKeydown(e) {
|
||||||
|
|||||||
@@ -0,0 +1,13 @@
|
|||||||
|
---
|
||||||
|
name: "Επικοινωνία"
|
||||||
|
slug: "contact"
|
||||||
|
|
||||||
|
meta_title: "Επικοινωνία"
|
||||||
|
meta_description: "Επικοινώνησε μαζί μας για οποιαδήποτε απορία ή ιδέα έχεις και θα σου απαντήσουμε το συντομότερο δυνατό."
|
||||||
|
og_image: ""
|
||||||
|
|
||||||
|
heading_first: "Επικοινώνησε"
|
||||||
|
heading_second: "μαζί μας"
|
||||||
|
heading_highlight: "άμεσα"
|
||||||
|
intro: "Έχεις απορία, ιδέα ή θες να μας πεις κάτι; Γράψε μας το μήνυμά σου και θα σου απαντήσουμε το συντομότερο δυνατό."
|
||||||
|
---
|
||||||
File renamed without changes.
File renamed without changes.
+8
-8
@@ -18,12 +18,12 @@ ## 1. Υπεύθυνος επεξεργασίας
|
|||||||
|
|
||||||
Υπεύθυνος επεξεργασίας των προσωπικών δεδομένων που συλλέγονται μέσω του ηλεκτρονικού καταστήματος είναι:
|
Υπεύθυνος επεξεργασίας των προσωπικών δεδομένων που συλλέγονται μέσω του ηλεκτρονικού καταστήματος είναι:
|
||||||
|
|
||||||
**3DEALER**
|
**{store_legal_name}**
|
||||||
Πάρου 31, Κυψέλη, ΤΚ 11255, Αθήνα
|
Πάρου 31, Κυψέλη, ΤΚ 11255, Αθήνα
|
||||||
ΑΦΜ: @TODO
|
ΑΦΜ: {store_tax_identifier}
|
||||||
ΓΕΜΗ: @TODO
|
ΓΕΜΗ: {store_registration_number}
|
||||||
Email: [print@3dealer.gr](mailto:print@3dealer.gr)
|
Email: [{store_contact_email}](mailto:{store_contact_email})
|
||||||
Τηλέφωνο: 6976 443140
|
Τηλέφωνο: {store_phone}
|
||||||
|
|
||||||
Η 3DEALER καθορίζει τους σκοπούς και τα μέσα επεξεργασίας των προσωπικών δεδομένων των πελατών και χρηστών του ηλεκτρονικού καταστήματος.
|
Η 3DEALER καθορίζει τους σκοπούς και τα μέσα επεξεργασίας των προσωπικών δεδομένων των πελατών και χρηστών του ηλεκτρονικού καταστήματος.
|
||||||
|
|
||||||
@@ -81,7 +81,7 @@ ## 6. Newsletter και εμπορική επικοινωνία
|
|||||||
|
|
||||||
Η εγγραφή στο newsletter πραγματοποιείται με τη συγκατάθεσή σας.
|
Η εγγραφή στο newsletter πραγματοποιείται με τη συγκατάθεσή σας.
|
||||||
|
|
||||||
Μπορείτε να ανακαλέσετε τη συγκατάθεσή σας οποιαδήποτε στιγμή, χρησιμοποιώντας τον σύνδεσμο απεγγραφής που περιλαμβάνεται στα emails ή επικοινωνώντας μαζί μας στο [print@3dealer.gr](mailto:print@3dealer.gr).
|
Μπορείτε να ανακαλέσετε τη συγκατάθεσή σας οποιαδήποτε στιγμή, χρησιμοποιώντας τον σύνδεσμο απεγγραφής που περιλαμβάνεται στα emails ή επικοινωνώντας μαζί μας στο [{store_contact_email}](mailto:{store_contact_email}).
|
||||||
|
|
||||||
Η ανάκληση της συγκατάθεσης δεν επηρεάζει τη νομιμότητα της επεξεργασίας που πραγματοποιήθηκε πριν από αυτήν.
|
Η ανάκληση της συγκατάθεσης δεν επηρεάζει τη νομιμότητα της επεξεργασίας που πραγματοποιήθηκε πριν από αυτήν.
|
||||||
|
|
||||||
@@ -186,8 +186,8 @@ ## 16. Τα δικαιώματά σας
|
|||||||
|
|
||||||
Για την άσκηση των δικαιωμάτων σας μπορείτε να επικοινωνήσετε μαζί μας:
|
Για την άσκηση των δικαιωμάτων σας μπορείτε να επικοινωνήσετε μαζί μας:
|
||||||
|
|
||||||
**Email:** [print@3dealer.gr](mailto:print@3dealer.gr)
|
**Email:** [{store_contact_email}](mailto:{store_contact_email})
|
||||||
**Τηλέφωνο:** 6976 443140
|
**Τηλέφωνο:** {store_phone}
|
||||||
|
|
||||||
Θα απαντήσουμε στο αίτημά σας χωρίς αδικαιολόγητη καθυστέρηση και, κατά κανόνα, εντός ενός (1) μήνα από την παραλαβή του.
|
Θα απαντήσουμε στο αίτημά σας χωρίς αδικαιολόγητη καθυστέρηση και, κατά κανόνα, εντός ενός (1) μήνα από την παραλαβή του.
|
||||||
|
|
||||||
+4
-4
@@ -45,7 +45,7 @@ ## 3. Χρόνος παράδοσης
|
|||||||
|
|
||||||
Η 3DEALER δεν ευθύνεται για καθυστερήσεις που οφείλονται αποκλειστικά στην εταιρεία μεταφοράς, σε ακραία καιρικά φαινόμενα, απεργίες, προβλήματα στο δίκτυο μεταφορών ή άλλες περιστάσεις που βρίσκονται εκτός του εύλογου ελέγχου της.
|
Η 3DEALER δεν ευθύνεται για καθυστερήσεις που οφείλονται αποκλειστικά στην εταιρεία μεταφοράς, σε ακραία καιρικά φαινόμενα, απεργίες, προβλήματα στο δίκτυο μεταφορών ή άλλες περιστάσεις που βρίσκονται εκτός του εύλογου ελέγχου της.
|
||||||
|
|
||||||
Σε περίπτωση καθυστέρησης, μπορείτε να επικοινωνήσετε μαζί μας στο [print@3dealer.gr](mailto:print@3dealer.gr).
|
Σε περίπτωση καθυστέρησης, μπορείτε να επικοινωνήσετε μαζί μας στο [{store_contact_email}](mailto:{store_contact_email}).
|
||||||
|
|
||||||
## 4. Παραλαβή παραγγελίας
|
## 4. Παραλαβή παραγγελίας
|
||||||
|
|
||||||
@@ -55,7 +55,7 @@ ## 4. Παραλαβή παραγγελίας
|
|||||||
|
|
||||||
## 5. Προϊόν που παραδόθηκε κατεστραμμένο
|
## 5. Προϊόν που παραδόθηκε κατεστραμμένο
|
||||||
|
|
||||||
Σε περίπτωση που το προϊόν παραδοθεί εμφανώς κατεστραμμένο, παρακαλούμε να επικοινωνήσετε μαζί μας το συντομότερο δυνατό στο [print@3dealer.gr](mailto:print@3dealer.gr) και να μας αποστείλετε φωτογραφίες του προϊόντος και της συσκευασίας.
|
Σε περίπτωση που το προϊόν παραδοθεί εμφανώς κατεστραμμένο, παρακαλούμε να επικοινωνήσετε μαζί μας το συντομότερο δυνατό στο [{store_contact_email}](mailto:{store_contact_email}) και να μας αποστείλετε φωτογραφίες του προϊόντος και της συσκευασίας.
|
||||||
|
|
||||||
Η 3DEALER θα εξετάσει το περιστατικό και, εφόσον διαπιστωθεί ζημιά που προέκυψε κατά τη μεταφορά ή άλλη έλλειψη συμμόρφωσης, θα προχωρήσει στην κατάλληλη λύση σύμφωνα με την ισχύουσα νομοθεσία.
|
Η 3DEALER θα εξετάσει το περιστατικό και, εφόσον διαπιστωθεί ζημιά που προέκυψε κατά τη μεταφορά ή άλλη έλλειψη συμμόρφωσης, θα προχωρήσει στην κατάλληλη λύση σύμφωνα με την ισχύουσα νομοθεσία.
|
||||||
|
|
||||||
@@ -63,7 +63,7 @@ ## 6. Δικαίωμα υπαναχώρησης
|
|||||||
|
|
||||||
Για τις αγορές που εμπίπτουν στο πεδίο εφαρμογής του δικαιώματος υπαναχώρησης, ο καταναλωτής μπορεί να υπαναχωρήσει από τη σύμβαση εντός δεκατεσσάρων (14) ημερολογιακών ημερών από την ημέρα παραλαβής του προϊόντος.
|
Για τις αγορές που εμπίπτουν στο πεδίο εφαρμογής του δικαιώματος υπαναχώρησης, ο καταναλωτής μπορεί να υπαναχωρήσει από τη σύμβαση εντός δεκατεσσάρων (14) ημερολογιακών ημερών από την ημέρα παραλαβής του προϊόντος.
|
||||||
|
|
||||||
Για την άσκηση του δικαιώματος υπαναχώρησης, ο πελάτης πρέπει να ενημερώσει την 3DEALER με σαφή δήλωση στο [print@3dealer.gr](mailto:print@3dealer.gr).
|
Για την άσκηση του δικαιώματος υπαναχώρησης, ο πελάτης πρέπει να ενημερώσει την 3DEALER με σαφή δήλωση στο [{store_contact_email}](mailto:{store_contact_email}).
|
||||||
|
|
||||||
Το προϊόν πρέπει να επιστραφεί χωρίς αδικαιολόγητη καθυστέρηση και, σε κάθε περίπτωση, εντός δεκατεσσάρων (14) ημερών από την ημέρα κατά την οποία ο πελάτης ενημέρωσε την 3DEALER για την απόφασή του να υπαναχωρήσει.
|
Το προϊόν πρέπει να επιστραφεί χωρίς αδικαιολόγητη καθυστέρηση και, σε κάθε περίπτωση, εντός δεκατεσσάρων (14) ημερών από την ημέρα κατά την οποία ο πελάτης ενημέρωσε την 3DEALER για την απόφασή του να υπαναχωρήσει.
|
||||||
|
|
||||||
@@ -101,4 +101,4 @@ ## 10. Ελαττωματικά ή μη συμμορφούμενα προϊόν
|
|||||||
|
|
||||||
Η ύπαρξη μικρών αισθητικών χαρακτηριστικών που είναι φυσιολογικά για την τρισδιάστατη εκτύπωση, όπως γραμμές στρώσεων ή μικρές διαφοροποιήσεις, δεν αποτελεί από μόνη της ελάττωμα.
|
Η ύπαρξη μικρών αισθητικών χαρακτηριστικών που είναι φυσιολογικά για την τρισδιάστατη εκτύπωση, όπως γραμμές στρώσεων ή μικρές διαφοροποιήσεις, δεν αποτελεί από μόνη της ελάττωμα.
|
||||||
|
|
||||||
Για οποιοδήποτε πρόβλημα με προϊόν, επικοινωνήστε μαζί μας στο [print@3dealer.gr](mailto:print@3dealer.gr), αναφέροντας τον αριθμό παραγγελίας και, όπου είναι δυνατόν, επισυνάπτοντας φωτογραφίες.
|
Για οποιοδήποτε πρόβλημα με προϊόν, επικοινωνήστε μαζί μας στο [{store_contact_email}](mailto:{store_contact_email}), αναφέροντας τον αριθμό παραγγελίας και, όπου είναι δυνατόν, επισυνάπτοντας φωτογραφίες.
|
||||||
Loaded 100 of 150 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user